tanya-chatbot 0.9.8 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,19 +1,19 @@
1
- import { useEffect as be, useState as x, useRef as Ye, forwardRef as On, createElement as hr, useMemo as Zr } from "react";
1
+ import { useEffect as xe, useState as b, useRef as Ve, forwardRef as $n, createElement as hr, useMemo as en } from "react";
2
2
  import { jsx as a, jsxs as d, Fragment as ke } from "react/jsx-runtime";
3
- import { createHttpLink as Uo, ApolloClient as Ro, InMemoryCache as qo, ApolloProvider as Ho } from "@apollo/client";
4
- import { Provider as Vo, useDispatch as $n, useSelector as er } from "react-redux";
5
- import { createSlice as Ln, configureStore as Yo } from "@reduxjs/toolkit";
6
- import * as zn from "@radix-ui/react-popover";
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";
5
+ import { createSlice as zn, configureStore as Yo } from "@reduxjs/toolkit";
6
+ import * as Dn from "@radix-ui/react-popover";
7
7
  import "clsx";
8
8
  import "tailwind-merge";
9
- import re from "axios";
9
+ import de from "axios";
10
10
  import "crypto-js";
11
11
  import { Icon as Jo } from "@iconify/react";
12
- import { toast as Ue } from "react-toastify";
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 gi() {
16
- return be(() => {
15
+ function hi() {
16
+ return xe(() => {
17
17
  if (typeof document < "u") {
18
18
  const e = document.createElement("style");
19
19
  return e.textContent = Wo, document.head.appendChild(e), () => {
@@ -56,7 +56,7 @@ const Qo = {
56
56
  mobile: []
57
57
  }
58
58
  }
59
- }, Dn = Ln({
59
+ }, Mn = zn({
60
60
  name: "store",
61
61
  initialState: Qo,
62
62
  reducers: {
@@ -64,9 +64,9 @@ const Qo = {
64
64
  e.store = t.payload;
65
65
  }
66
66
  }
67
- }), { setStore: wi } = Dn.actions, Go = Dn.reducer, Xo = {
67
+ }), { setStore: gi } = Mn.actions, Go = Mn.reducer, Xo = {
68
68
  product: null
69
- }, Mn = Ln({
69
+ }, Bn = zn({
70
70
  name: "product",
71
71
  initialState: Xo,
72
72
  reducers: {
@@ -74,7 +74,7 @@ const Qo = {
74
74
  e.product = t.payload;
75
75
  }
76
76
  }
77
- }), { setProduct: gr } = Mn.actions, Zo = Mn.reducer, ea = Yo({
77
+ }), { setProduct: gr } = Bn.actions, Zo = Bn.reducer, ea = Yo({
78
78
  reducer: {
79
79
  store: Go,
80
80
  product: Zo
@@ -91,28 +91,28 @@ const Qo = {
91
91
  function ra({
92
92
  ...e
93
93
  }) {
94
- return /* @__PURE__ */ a(zn.Root, { "data-slot": "popover", ...e });
94
+ return /* @__PURE__ */ a(Dn.Root, { "data-slot": "popover", ...e });
95
95
  }
96
96
  function na({
97
97
  ...e
98
98
  }) {
99
- return /* @__PURE__ */ a(zn.Trigger, { "data-slot": "popover-trigger", ...e });
99
+ return /* @__PURE__ */ a(Dn.Trigger, { "data-slot": "popover-trigger", ...e });
100
100
  }
101
- const Je = () => ({ 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" }), Bn = async () => {
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 re.post(
105
- `${e}api/auth/token-bm-grant?baseUrl=${Re()}&siteId=${Oe()}`
104
+ const t = await de.post(
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 re.isAxiosError(t) ? console.error("Error fetching token:", t.response || t.message) : console.error("Unexpected error:", t), null;
109
+ return de.isAxiosError(t) ? console.error("Error fetching token:", t.response || t.message) : console.error("Unexpected error:", t), null;
110
110
  }
111
- }, Un = async (e) => {
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 re.post(
115
- `${t}api/auth/token-existing-guest-customer?dwsid=${r}&baseUrl=${Re()}&siteId=${Oe()}&pubCfg=${Ke()}&envRef=${We()}&orgRef=${Qe()}`,
114
+ const r = JSON.parse(sessionStorage.getItem("customerData") || "{}").dwsid, n = await de.post(
115
+ `${t}api/auth/token-existing-guest-customer?dwsid=${r}&baseUrl=${Ye()}&siteId=${Ue()}&pubCfg=${Ze()}&envRef=${et()}&orgRef=${tt()}`,
116
116
  {},
117
117
  {
118
118
  headers: {
@@ -123,12 +123,12 @@ const Je = () => ({ 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 re.isAxiosError(r) ? console.error("Error creating basket:", r.response || r.message) : console.error("Unexpected error:", r), null;
126
+ return de.isAxiosError(r) ? console.error("Error creating basket:", r.response || r.message) : console.error("Unexpected error:", r), null;
127
127
  }
128
128
  };
129
- async function rt() {
129
+ async function Ge() {
130
130
  var s;
131
- const e = Oe(), t = "access_token_" + e, r = "expires_in_" + e, n = localStorage.getItem(r), o = localStorage.getItem(t);
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
134
  const wr = async (e, t) => {
@@ -156,18 +156,18 @@ const wr = async (e, t) => {
156
156
  } catch (r) {
157
157
  return console.error("Error obtaining JWT token:", r), e = null, t = null, null;
158
158
  }
159
- }, Re = () => sessionStorage.getItem("Host"), Oe = () => sessionStorage.getItem("SiteId"), Ke = () => sessionStorage.getItem("pubCfg"), We = () => sessionStorage.getItem("envRef"), Qe = () => sessionStorage.getItem("orgRef"), oa = async (e) => {
159
+ }, Ye = () => sessionStorage.getItem("Host"), Ue = () => sessionStorage.getItem("SiteId"), Ze = () => sessionStorage.getItem("pubCfg"), et = () => sessionStorage.getItem("envRef"), tt = () => sessionStorage.getItem("orgRef"), oa = async (e) => {
160
160
  console.log("fetching results");
161
- const { serverUrl: t, basePath: r } = Je();
161
+ const { serverUrl: t, basePath: r } = Xe();
162
162
  let n = "";
163
163
  {
164
- const o = await rt();
164
+ const o = await Ge();
165
165
  console.log("the token from getSearchResults", o), n = o.access_token;
166
166
  }
167
167
  try {
168
- const o = Re();
169
- return (await re.get(
170
- `${t}${r}/search-sfcc?baseUrl=${o}&query=${e}&siteId=${Oe()}&pubCfg=${Ke()}&envRef=${We()}&orgRef=${Qe()}`,
168
+ const o = Ye();
169
+ return (await de.get(
170
+ `${t}${r}/search-sfcc?baseUrl=${o}&query=${e}&siteId=${Ue()}&pubCfg=${Ze()}&envRef=${et()}&orgRef=${tt()}`,
171
171
  {
172
172
  headers: {
173
173
  "Content-Type": "application/json",
@@ -180,11 +180,11 @@ const wr = async (e, t) => {
180
180
  }
181
181
  }, Rn = async (e) => {
182
182
  if (!e) throw new Error("Product ID is required");
183
- const { serverUrl: t, basePath: r } = Je(), n = Re();
183
+ const { serverUrl: t, basePath: r } = Xe(), n = Ye();
184
184
  console.log("calling access");
185
- const { access_token: o } = await rt();
186
- return (await re.get(
187
- `${t}${r}/product-sfcc/${e}?baseUrl=${n}&siteId=${Oe()}&pubCfg=${Ke()}&envRef=${We()}&orgRef=${Qe()}`,
185
+ const { access_token: o } = await Ge();
186
+ return (await de.get(
187
+ `${t}${r}/product-sfcc/${e}?baseUrl=${n}&siteId=${Ue()}&pubCfg=${Ze()}&envRef=${et()}&orgRef=${tt()}`,
188
188
  {
189
189
  headers: {
190
190
  "Content-Type": "application/json",
@@ -194,11 +194,11 @@ const wr = async (e, t) => {
194
194
  )).data;
195
195
  }, aa = async (e) => {
196
196
  if (!e) throw new Error("customerId is required");
197
- const t = await Bn(), { customer_token: r } = await Un(
197
+ const t = await Un(), { customer_token: r } = await qn(
198
198
  t
199
- ), { serverUrl: n, basePath: o } = Je(), i = (await rt()).access_token;
200
- return (await re.get(
201
- `${n}${o}/get-interest?baseUrl=${Re()}&customerId=${e}&siteId=${Oe()}&pubCfg=${Ke()}&envRef=${We()}&orgRef=${Qe()}`,
199
+ ), { serverUrl: n, basePath: o } = Xe(), i = (await Ge()).access_token;
200
+ return (await de.get(
201
+ `${n}${o}/get-interest?baseUrl=${Ye()}&customerId=${e}&siteId=${Ue()}&pubCfg=${Ze()}&envRef=${et()}&orgRef=${tt()}`,
202
202
  {
203
203
  headers: {
204
204
  "Content-Type": "application/json",
@@ -206,10 +206,10 @@ const wr = async (e, t) => {
206
206
  }
207
207
  }
208
208
  )).data;
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", {
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", {
210
210
  style: "currency",
211
211
  currency: t || "USD"
212
- }), rn = (e) => {
212
+ }), nn = (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,13 +218,13 @@ 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), nn = (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), on = (e, t) => e.length < t ? e : e.slice(0, t) + "...", lr = (e) => e.split("\\n").map((t, r) => {
222
222
  const n = t.match(/^(\d+)\.\s(.+)/);
223
223
  return n ? `<p key=${r} class="mb-2"><strong>${n[1]}.</strong> ${n[2]}</p>` : t.trim() ? `<p key=${r} class="mb-2">${t}</p>` : "<br/>";
224
224
  }).join("");
225
225
  function la() {
226
- const e = () => window.innerWidth < 425 ? 1 : window.innerWidth < 768 ? 2 : 4, [t, r] = x(e);
227
- return be(() => {
226
+ const e = () => window.innerWidth < 425 ? 1 : window.innerWidth < 768 ? 2 : 4, [t, r] = b(e);
227
+ return xe(() => {
228
228
  const n = () => r(e());
229
229
  return window.addEventListener("resize", n), () => window.removeEventListener("resize", n);
230
230
  }, []), t;
@@ -232,7 +232,7 @@ function la() {
232
232
  const ca = ({
233
233
  product: e
234
234
  }) => {
235
- const t = $n(), r = la(), [n, o] = x(0), s = () => {
235
+ const t = Ln(), r = la(), [n, o] = b(0), s = () => {
236
236
  o(
237
237
  (l) => l + r >= e.length ? 0 : l + r
238
238
  );
@@ -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, b;
262
+ var h, 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 = tn(l)[0]) == null ? void 0 : h.link) || tn(l)[0] || // fallback if it's a string
274
+ src: ((h = rn(l)[0]) == null ? void 0 : h.link) || rn(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 : nn(
287
- en((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 : on(
287
+ tn((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 : nn(
302
- en((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 : on(
302
+ tn((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) : rn(l).centAmount || 0,
311
- (b = rn(l)) == null ? void 0 : b.currencyCode
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
312
312
  ) }),
313
313
  /* @__PURE__ */ d("p", { className: "text-[#14121F] font-normal line-through text-sm font-nunitoSans truncate", children: [
314
314
  "$",
@@ -363,12 +363,12 @@ const ca = ({
363
363
  ]
364
364
  },
365
365
  n
366
- )) }), qn = async (e, t) => {
366
+ )) }), Ir = async (e, t) => {
367
367
  var s, i;
368
- const { serverUrl: r, basePath: n } = Je(), o = `${r}`;
368
+ const { serverUrl: r, basePath: n } = Xe(), o = `${r}`;
369
369
  try {
370
- const c = await re.post(
371
- `${o}${n}/basket/create?baseUrl=${Re()}&siteId=${Oe()}&pubCfg=${Ke()}&envRef=${We()}&orgRef=${Qe()}`,
370
+ const c = await de.post(
371
+ `${o}${n}/basket/create?baseUrl=${Ye()}&siteId=${Ue()}&pubCfg=${Ze()}&envRef=${et()}&orgRef=${tt()}`,
372
372
  t,
373
373
  {
374
374
  headers: {
@@ -385,37 +385,13 @@ const ca = ({
385
385
  "*"
386
386
  ), c.data;
387
387
  } catch (c) {
388
- return re.isAxiosError(c) ? console.error("Error creating basket:", c.response || c.message) : console.error("Unexpected error:", c), null;
389
- }
390
- }, ua = async () => {
391
- var s, i;
392
- const e = await rt(), t = "Bearer " + (e == null ? void 0 : e.access_token), { serverUrl: r, basePath: n } = Je(), o = `${r}`;
393
- try {
394
- const c = await re.post(
395
- `${o}${n}/basket/agentic-create?baseUrl=${Re()}&siteId=${Oe()}&pubCfg=${Ke()}&envRef=${We()}&orgRef=${Qe()}`,
396
- {},
397
- {
398
- headers: {
399
- "Content-Type": "application/json",
400
- Authorization: t
401
- }
402
- }
403
- );
404
- return window.postMessage(
405
- {
406
- type: "WIDGET_CREATED_BASKET",
407
- basketId: ((s = c.data) == null ? void 0 : s.basket_id) || ((i = c.data) == null ? void 0 : i.basketId)
408
- },
409
- "*"
410
- ), c.data;
411
- } catch (c) {
412
- return re.isAxiosError(c) ? console.error("Error creating basket:", c.response || c.message) : console.error("Unexpected error:", c), null;
388
+ return de.isAxiosError(c) ? console.error("Error creating basket:", c.response || c.message) : console.error("Unexpected error:", c), null;
413
389
  }
414
390
  }, yr = async (e, t, r) => {
415
- const { serverUrl: n, basePath: o } = Je(), s = `${n}`;
391
+ const { serverUrl: n, basePath: o } = Xe(), s = `${n}`;
416
392
  try {
417
- const i = await re.post(
418
- `${s}${o}/basket/add-product/${e}?baseUrl=${Re()}&siteId=${Oe()}&pubCfg=${Ke()}&envRef=${We()}&orgRef=${Qe()}`,
393
+ const i = await de.post(
394
+ `${s}${o}/basket/add-product/${e}?baseUrl=${Ye()}&siteId=${Ue()}&pubCfg=${Ze()}&envRef=${et()}&orgRef=${tt()}`,
419
395
  t,
420
396
  {
421
397
  headers: {
@@ -426,7 +402,7 @@ const ca = ({
426
402
  );
427
403
  return i.status === 200 && i.data ? i.data : null;
428
404
  } catch (i) {
429
- return re.isAxiosError(i) ? console.error(
405
+ return de.isAxiosError(i) ? console.error(
430
406
  "Error adding products to basket:",
431
407
  i.response || i.message
432
408
  ) : console.error("Unexpected error:", i), null;
@@ -436,10 +412,10 @@ const ca = ({
436
412
  customer_token: t
437
413
  }) => {
438
414
  var s;
439
- const { serverUrl: r, basePath: n } = Je(), o = `${r}`;
415
+ const { serverUrl: r, basePath: n } = Xe(), o = `${r}`;
440
416
  try {
441
- const i = await re.get(
442
- `${o}${n}/basket/${e}?baseUrl=${Re()}&siteId=${Oe()}&pubCfg=${Ke()}&envRef=${We()}&orgRef=${Qe()}`,
417
+ const i = await de.get(
418
+ `${o}${n}/basket/${e}?baseUrl=${Ye()}&siteId=${Ue()}&pubCfg=${Ze()}&envRef=${et()}&orgRef=${tt()}`,
443
419
  {
444
420
  headers: {
445
421
  "Content-Type": "application/json",
@@ -449,27 +425,29 @@ const ca = ({
449
425
  );
450
426
  return { status: i.status, data: i.data };
451
427
  } catch (i) {
452
- return re.isAxiosError(i) ? { status: (s = i.response) == null ? void 0 : s.status, data: null } : { status: null, data: null };
428
+ return de.isAxiosError(i) ? { status: (s = i.response) == null ? void 0 : s.status, data: null } : { status: null, data: null };
453
429
  }
454
- }, fa = async (e) => {
455
- const { serverUrl: t, basePath: r } = Je(), n = `${t}`, o = await rt(), s = "Bearer " + (o == null ? void 0 : o.access_token);
430
+ }, ua = async (e) => {
431
+ var i;
432
+ const { serverUrl: t, basePath: r } = Xe(), n = `${t}`, o = await Ge(), s = "Bearer " + (o == null ? void 0 : o.access_token);
456
433
  try {
457
- return (await re.get(
458
- `${n}${r}/basket/shipping-methods/${e}?baseUrl=${Re()}&siteId=${Oe()}&pubCfg=${Ke()}&envRef=${We()}&orgRef=${Qe()}`,
434
+ const c = await de.get(
435
+ `${n}${r}/basket/shipping-methods/${e}?baseUrl=${Ye()}&siteId=${Ue()}&pubCfg=${Ze()}&envRef=${et()}&orgRef=${tt()}`,
459
436
  {
460
437
  headers: {
461
438
  "Content-Type": "application/json",
462
439
  Authorization: s
463
440
  }
464
441
  }
465
- )).data;
466
- } catch (i) {
467
- return re.isAxiosError(i) ? console.error(
442
+ );
443
+ return ((i = c == null ? void 0 : c.data) == null ? void 0 : i.applicableShippingMethods) || [];
444
+ } catch (c) {
445
+ return de.isAxiosError(c) ? console.error(
468
446
  "Error fetching shipping methods:",
469
- i.response || i.message
470
- ) : console.error("Unexpected error:", i), [];
447
+ c.response || c.message
448
+ ) : console.error("Unexpected error:", c), [];
471
449
  }
472
- }, Lt = "sfcc_basket_id", on = "sfcc_customer_token", zt = "sfcc_token_expiry", ma = 300 * 1e3, Vt = "1.0.0";
450
+ }, Lt = "sfcc_basket_id", an = "sfcc_customer_token", zt = "sfcc_token_expiry", fa = 300 * 1e3, Vt = "1.0.0";
473
451
  const lt = (e) => {
474
452
  try {
475
453
  e ? localStorage.setItem(Lt, e) : localStorage.removeItem(Lt);
@@ -479,25 +457,25 @@ const lt = (e) => {
479
457
  }, rr = (e) => {
480
458
  try {
481
459
  if (e) {
482
- localStorage.setItem(on, e);
483
- const t = Date.now() + ma;
460
+ localStorage.setItem(an, e);
461
+ const t = Date.now() + fa;
484
462
  localStorage.setItem(zt, t.toString());
485
463
  } else
486
- localStorage.removeItem(on);
464
+ localStorage.removeItem(an);
487
465
  } catch (t) {
488
466
  console.error("Error storing token:", t);
489
467
  }
490
- }, an = 300, pa = ({ addToCartPwa: e }) => {
491
- var l, h, g, y, b, _;
492
- const t = $n(), r = er((k) => k.product.product), n = er((k) => k.store.store), [o, s] = x(!!r);
493
- if (be(() => {
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);
471
+ if (xe(() => {
494
472
  s(!!r);
495
473
  }, [r]), !r) return null;
496
474
  const i = async () => {
497
- var k, T, v, P, J, R, Y, Ie, C, K, ne, ye, xe, dt, S, ve;
475
+ var S, A, k, P, J, q, Y, _e, C, K, te, ye, be, ct, N, ve;
498
476
  try {
499
- if (!((T = (k = r == null ? void 0 : r.variants) == null ? void 0 : k[0]) != null && T.product_id) && !(r.type.item || r.type.bundle) && !((P = (v = r == null ? void 0 : r.variants) == null ? void 0 : v[0]) != null && P.productId)) {
500
- Ue.error("Variants not available", {
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)) {
478
+ Be.error("Variants not available", {
501
479
  position: "bottom-right",
502
480
  autoClose: 1e3
503
481
  }), console.error("No product variant found");
@@ -505,49 +483,49 @@ const lt = (e) => {
505
483
  }
506
484
  const V = [
507
485
  {
508
- product_id: ((J = r.variants) == null ? void 0 : J[0].product_id) || ((R = r.variants) == null ? void 0 : R[0].productId) || (r == null ? void 0 : r.id),
486
+ product_id: ((J = r.variants) == null ? void 0 : J[0].product_id) || ((q = r.variants) == null ? void 0 : q[0].productId) || (r == null ? void 0 : r.id),
509
487
  quantity: 1
510
488
  }
511
489
  ], $ = JSON.parse(
512
490
  sessionStorage.getItem("customerData") || "{}"
513
- ), Ge = ($ == null ? void 0 : $.basketId) || localStorage.getItem(Lt), ut = !1, qe = localStorage.getItem(zt), nt = Date.now();
514
- if (!ut || !qe || nt >= parseInt(qe)) {
515
- let fe = "";
516
- if (fe = "Bearer " + (await rt()).access_token, !fe) {
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) {
517
495
  console.error("Failed to get customer_token");
518
496
  return;
519
497
  }
520
- const _e = nt + 300 * 1e3;
521
- if (rr(fe), localStorage.setItem(zt, _e.toString()), Ge) {
498
+ const Ie = rt + 300 * 1e3;
499
+ if (rr(ue), localStorage.setItem(zt, Ie.toString()), Je) {
522
500
  const Se = await Hn({
523
- basketId: Ge,
524
- customer_token: fe
501
+ basketId: Je,
502
+ customer_token: ue
525
503
  });
526
504
  if (Se.status === 200 && Se) {
527
- const oe = await yr(
528
- Ge,
505
+ const re = await yr(
506
+ Je,
529
507
  V,
530
- fe
508
+ ue
531
509
  );
532
- (((Y = oe == null ? void 0 : oe.product_items) == null ? void 0 : Y.length) > 0 || ((Ie = oe == null ? void 0 : oe.productItems) == null ? void 0 : Ie.length) > 0) && (Ue.success("Added to cart", {
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", {
533
511
  position: "bottom-right",
534
512
  autoClose: 3e3,
535
513
  hideProgressBar: !1,
536
514
  closeOnClick: !0,
537
515
  pauseOnHover: !0,
538
516
  draggable: !0
539
- }), tr(Ge));
517
+ }), tr(Je));
540
518
  return;
541
519
  }
542
520
  }
543
- const $e = {
521
+ const je = {
544
522
  productItems: [
545
523
  {
546
524
  productId: ((C = r.variants) == null ? void 0 : C[0].product_id) || ((K = r.variants) == null ? void 0 : K[0].productId) || (r == null ? void 0 : r.id),
547
525
  quantity: 1
548
526
  }
549
527
  ]
550
- }, z = await qn(fe, $e);
528
+ }, z = await Ir(ue, je);
551
529
  if (!(z != null && z.basket_id) && !(z != null && z.basketId)) {
552
530
  console.error("Failed to create basket");
553
531
  return;
@@ -558,9 +536,9 @@ const lt = (e) => {
558
536
  const Te = await yr(
559
537
  (z == null ? void 0 : z.basket_id) || (z == null ? void 0 : z.basketId),
560
538
  V,
561
- fe
539
+ ue
562
540
  );
563
- console.log("object added to basket"), (((ne = Te == null ? void 0 : Te.product_items) == null ? void 0 : ne.length) > 0 || ((ye = Te == null ? void 0 : Te.productItems) == null ? void 0 : ye.length) > 0) && Ue.success("Added to cart", {
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", {
564
542
  position: "bottom-right",
565
543
  autoClose: 3e3,
566
544
  hideProgressBar: !1,
@@ -570,19 +548,19 @@ const lt = (e) => {
570
548
  }), tr(z.basket_id || (z == null ? void 0 : z.basketId));
571
549
  }
572
550
  } catch (V) {
573
- console.error("Error adding to cart:", V), Ue.error("Failed to add product to cart", {
551
+ console.error("Error adding to cart:", V), Be.error("Failed to add product to cart", {
574
552
  position: "bottom-right",
575
553
  autoClose: 3e3
576
- }), ((xe = V == null ? void 0 : V.response) == null ? void 0 : xe.status) === 404 || // Basket not found
577
- ((dt = V == null ? void 0 : V.response) == null ? void 0 : dt.status) === 401 ? (((S = V == null ? void 0 : V.response) == null ? void 0 : S.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), Ue.error("Failed to add product to cart", {
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", {
578
556
  position: "bottom-right",
579
557
  autoClose: 3e3
580
558
  }));
581
559
  }
582
560
  }, c = () => {
583
561
  if (!r) return;
584
- const k = window.location.origin + "/product/" + r.id;
585
- console.log("path", k), window.location.href = k;
562
+ const S = window.location.origin + "/product/" + r.id;
563
+ console.log("path", S), window.location.href = S;
586
564
  };
587
565
  return console.log(r, "the prod"), /* @__PURE__ */ d(ke, { children: [
588
566
  /* @__PURE__ */ a(
@@ -590,7 +568,7 @@ const lt = (e) => {
590
568
  {
591
569
  className: "fixed inset-0 z-40 bg-black/30",
592
570
  onClick: () => {
593
- s(!1), setTimeout(() => t(gr(null)), an);
571
+ s(!1), setTimeout(() => t(gr(null)), sn);
594
572
  }
595
573
  }
596
574
  ),
@@ -603,7 +581,7 @@ const lt = (e) => {
603
581
  ${o ? "translate-y-0 md:translate-y-0 md:translate-x-0 opacity-100" : "translate-y-full md:translate-y-0 md:translate-x-full opacity-0 pointer-events-none"}
604
582
  `,
605
583
  style: { willChange: "transform, opacity" },
606
- onClick: (k) => k.stopPropagation(),
584
+ onClick: (S) => S.stopPropagation(),
607
585
  children: [
608
586
  /* @__PURE__ */ d("div", { className: "mt-3 flex flex-row justify-between w-full ", children: [
609
587
  /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("p", { className: "text-[#000000] font-bold font-nunitoSans", children: r.name }) }),
@@ -614,7 +592,7 @@ const lt = (e) => {
614
592
  onClick: () => {
615
593
  s(!1), setTimeout(
616
594
  () => t(gr(null)),
617
- an
595
+ sn
618
596
  );
619
597
  },
620
598
  children: "✕"
@@ -631,14 +609,14 @@ const lt = (e) => {
631
609
  }
632
610
  ) }),
633
611
  /* @__PURE__ */ a("div", { className: "flex flex-col items-center gap-2", children: r.imageGroups.slice(1, 2).map(
634
- (k) => k.images.slice(1, 2).map((T) => /* @__PURE__ */ a(
612
+ (S) => S.images.slice(1, 2).map((A) => /* @__PURE__ */ a(
635
613
  "img",
636
614
  {
637
- src: T.link,
615
+ src: A.link,
638
616
  alt: r.name,
639
617
  className: "rounded-[10px] w-[60px] h-[60px]"
640
618
  },
641
- T.link
619
+ A.link
642
620
  ))
643
621
  ) })
644
622
  ] }),
@@ -674,19 +652,19 @@ const lt = (e) => {
674
652
  /* @__PURE__ */ d("div", { className: "mt-4 flex flex-col gap-2 w-full p-2", children: [
675
653
  /* @__PURE__ */ a("div", { className: "flex flex-row items-center gap-2", children: /* @__PURE__ */ d("div", { className: "flex items-center gap-2 text-left font-nunitoSans", children: [
676
654
  /* @__PURE__ */ d("div", { className: "text-[#323135] font-bold", children: [
677
- ((b = r == null ? void 0 : r.rating) == null ? void 0 : b.rate) || 0,
655
+ ((x = r == null ? void 0 : r.rating) == null ? void 0 : x.rate) || 0,
678
656
  " /",
679
657
  " ",
680
658
  /* @__PURE__ */ a("span", { className: "text-[#68656E]", children: "5" })
681
659
  ] }),
682
660
  /* @__PURE__ */ a("div", { className: "text-[#323135] font-semibold text-sm", children: "Overall Rating" }),
683
661
  /* @__PURE__ */ d("div", { className: "text-[#68656E] font-semibold text-sm", children: [
684
- ((_ = r == null ? void 0 : r.rating) == null ? void 0 : _.count) || 0,
662
+ ((I = r == null ? void 0 : r.rating) == null ? void 0 : I.count) || 0,
685
663
  " ratings"
686
664
  ] })
687
665
  ] }) }),
688
- /* @__PURE__ */ a("div", { className: "mt-2 flex flex-row items-center gap-2", children: Array.from({ length: 5 }).map((k, T) => {
689
- var v;
666
+ /* @__PURE__ */ a("div", { className: "mt-2 flex flex-row items-center gap-2", children: Array.from({ length: 5 }).map((S, A) => {
667
+ var k;
690
668
  return /* @__PURE__ */ a(
691
669
  Jo,
692
670
  {
@@ -694,10 +672,10 @@ const lt = (e) => {
694
672
  width: "20",
695
673
  height: "20",
696
674
  className: `text-yellow-500
697
- ${((v = r == null ? void 0 : r.rating) == null ? void 0 : v.rate) > T ? "text-yellow-500" : "text-gray-300"}
675
+ ${((k = r == null ? void 0 : r.rating) == null ? void 0 : k.rate) > A ? "text-yellow-500" : "text-gray-300"}
698
676
  `
699
677
  },
700
- T
678
+ A
701
679
  );
702
680
  }) })
703
681
  ] }),
@@ -732,7 +710,7 @@ const lt = (e) => {
732
710
  }
733
711
  )
734
712
  ] });
735
- }, ha = ({
713
+ }, pa = ({
736
714
  tanyaConfig: e,
737
715
  basketId: t,
738
716
  addToCart: r
@@ -751,63 +729,63 @@ const lt = (e) => {
751
729
  "Niece/Nephew": "his/her niece/nephew",
752
730
  "My Friends": "his/her friends",
753
731
  Others: "others"
754
- }, s = Ye(null), i = Ye(null), c = Ye(null), l = Ye(null), [h, g] = x(null);
755
- Ye(null);
756
- const [y, b] = x(!1), [_, k] = x(!1), [T, v] = x(!1), [P, J] = x(!1), [R, Y] = x(!1), [Ie, C] = x(!1), [K, ne] = x(""), [ye, xe] = x(""), dt = (p) => ({
732
+ }, s = Ve(null), i = Ve(null), c = Ve(null), l = Ve(null), [h, g] = b(null);
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) => ({
757
735
  id: p.id,
758
736
  title: p.name,
759
737
  image: p.image ?? "",
760
738
  price: p.price ?? 0
761
- }), [S, ve] = x([]), V = Ye(null), $ = er((p) => p.store.store), Ge = er((p) => p.product.product);
762
- be(() => {
739
+ }), [N, ve] = b([]), V = Ve(null), $ = er((p) => p.store.store), Je = er((p) => p.product.product);
740
+ xe(() => {
763
741
  const p = localStorage.getItem(
764
742
  `access_token_${e.siteId}`
765
- ), j = localStorage.getItem(
743
+ ), O = localStorage.getItem(
766
744
  `chat-token-${e.siteId}`
767
745
  );
768
- if (p && j === p) {
769
- const M = localStorage.getItem("chatHistory");
770
- M && ve(JSON.parse(M));
746
+ if (p && O === p) {
747
+ const B = localStorage.getItem("chatHistory");
748
+ B && ve(JSON.parse(B));
771
749
  } else
772
750
  localStorage.setItem("chatHistory", JSON.stringify([])), localStorage.setItem(
773
751
  `chat-token-${e.siteId}`,
774
752
  p || ""
775
753
  );
776
- }, []), be(() => {
777
- localStorage.setItem("chatHistory", JSON.stringify(S));
754
+ }, []), xe(() => {
755
+ localStorage.setItem("chatHistory", JSON.stringify(N));
778
756
  const p = localStorage.getItem(
779
757
  `access_token_${e.siteId}`
780
758
  );
781
759
  p && localStorage.setItem(`chat-token-${e.siteId}`, p);
782
- }, [S]);
783
- const ut = () => {
784
- v(!0), setTimeout(() => k(!0), 10);
760
+ }, [N]);
761
+ const dt = () => {
762
+ k(!0), setTimeout(() => S(!0), 10);
785
763
  }, qe = () => {
786
- k(!1), setTimeout(() => v(!1), 300);
764
+ S(!1), setTimeout(() => k(!1), 300);
787
765
  };
788
- be(() => {
789
- y ? ut() : qe();
766
+ xe(() => {
767
+ y ? dt() : qe();
790
768
  }, [y]);
791
- const nt = (p) => {
792
- xe(o[p]);
769
+ const rt = (p) => {
770
+ be(o[p]);
793
771
  };
794
- be(() => {
795
- T && V.current && V.current.scrollTo({
772
+ xe(() => {
773
+ A && V.current && V.current.scrollTo({
796
774
  top: V.current.scrollHeight,
797
775
  behavior: "smooth"
798
776
  });
799
- }, [S, T]);
800
- const fe = null, _e = null, $e = async () => {
801
- const p = await rt();
777
+ }, [N, A]);
778
+ const ue = null, Ie = null, je = async () => {
779
+ const p = await Ge();
802
780
  p != null && g(p);
803
781
  };
804
- be(() => {
782
+ xe(() => {
805
783
  if (e != null && e.siteId) {
806
- const { clientID: p, host: j, organizationID: M, shortCode: Q, siteId: B } = e;
807
- sessionStorage.setItem("Host", j), sessionStorage.setItem("SiteId", B), sessionStorage.setItem("pubCfg", btoa(p)), sessionStorage.setItem("envRef", Q), sessionStorage.setItem("orgRef", M);
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);
808
786
  }
809
- $e(), console.log("scapi environment v1");
810
- }, []), be(() => {
787
+ je(), console.log("scapi environment v1");
788
+ }, []), xe(() => {
811
789
  t && (console.log("setting the basket id", t), lt(t));
812
790
  }, [t]);
813
791
  const z = async () => {
@@ -815,69 +793,69 @@ const lt = (e) => {
815
793
  sessionStorage.getItem("customerData") || "{}"
816
794
  ).customerId;
817
795
  return (await aa(p || "")).c_interests;
818
- }, Te = async (p, j) => {
796
+ }, Te = async (p, O) => {
819
797
  console.log("in secondary flow", Vt);
820
- const M = await z();
821
- if (console.log(M, "interests of customer", Vt), !!M)
798
+ const B = await z();
799
+ if (console.log(B, "interests of customer", Vt), !!B)
822
800
  try {
823
801
  ve(
824
802
  (me) => me.map(
825
803
  (Ne, pe) => pe === me.length - 1 ? { ...Ne, secondaryLoading: !0 } : Ne
826
804
  )
827
805
  );
828
- const Q = await wr(fe, _e);
806
+ const Q = await wr(ue, Ie);
829
807
  if (!Q) throw new Error("Failed to fetch token");
830
- const B = localStorage.getItem("customerNumber"), L = localStorage.getItem("isLoggedIn"), Z = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
808
+ const U = localStorage.getItem("customerNumber"), L = localStorage.getItem("isLoggedIn"), X = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
831
809
  registered: String(L || !1),
832
- userId: String(B || (/* @__PURE__ */ new Date()).getTime())
833
- }).toString()}`, q = JSON.stringify({
810
+ userId: String(U || (/* @__PURE__ */ new Date()).getTime())
811
+ }).toString()}`, R = JSON.stringify({
834
812
  flowId: "Q166PR519W",
835
813
  flowAliasId: "HKFUVLWVH2",
836
814
  input: {
837
815
  loyaltyPoints: "",
838
816
  productName: p,
839
- productPoints: String(j || 0),
840
- interests: M
817
+ productPoints: String(O || 0),
818
+ interests: B
841
819
  }
842
- }), ae = await fetch(Z, {
820
+ }), ne = await fetch(X, {
843
821
  signal: AbortSignal.timeout(3e4),
844
822
  method: "POST",
845
823
  headers: {
846
824
  "Content-Type": "application/json",
847
825
  Authorization: `Bearer ${Q}`
848
826
  },
849
- body: q
827
+ body: R
850
828
  });
851
- if (!ae.body) throw new Error("Readable stream not supported");
852
- const Le = ae.body.getReader(), He = new TextDecoder();
829
+ if (!ne.body) throw new Error("Readable stream not supported");
830
+ const $e = ne.body.getReader(), Re = new TextDecoder();
853
831
  let G = "";
854
832
  for (; ; ) {
855
- const { done: me, value: Ne } = await Le.read();
833
+ const { done: me, value: Ne } = await $e.read();
856
834
  if (me) break;
857
- G += He.decode(Ne, { stream: !0 });
835
+ G += Re.decode(Ne, { stream: !0 });
858
836
  const pe = G.split(`
859
837
  `);
860
838
  G = pe.pop() || "";
861
839
  for (const he of pe)
862
840
  if (he.startsWith("data:")) {
863
- const I = he.slice(5).trim();
841
+ const _ = he.slice(5).trim();
864
842
  try {
865
- const ee = JSON.parse(I);
866
- ee.index === 0 && ve(
843
+ const Z = JSON.parse(_);
844
+ Z.index === 0 && ve(
867
845
  (D) => D.map(
868
- (se, ie) => ie === D.length - 1 ? {
869
- ...se,
870
- secondaryResponse: ee.data,
846
+ (oe, ae) => ae === D.length - 1 ? {
847
+ ...oe,
848
+ secondaryResponse: Z.data,
871
849
  secondaryLoading: !1
872
- } : se
850
+ } : oe
873
851
  )
874
852
  );
875
- } catch (ee) {
853
+ } catch (Z) {
876
854
  ve(
877
855
  (D) => D.map(
878
- (se, ie) => ie === D.length - 1 ? { ...se, secondaryLoading: !1 } : se
856
+ (oe, ae) => ae === D.length - 1 ? { ...oe, secondaryLoading: !1 } : oe
879
857
  )
880
- ), console.error("Secondary flow JSON parse error:", ee);
858
+ ), console.error("Secondary flow JSON parse error:", Z);
881
859
  }
882
860
  }
883
861
  }
@@ -885,12 +863,12 @@ const lt = (e) => {
885
863
  console.error("Secondary flow error:", Q);
886
864
  }
887
865
  }, Se = async (p) => {
888
- const j = p || K.trim();
889
- if (j) {
890
- Y(!0), ne(""), s.current = null, i.current = null, c.current = null, l.current = null, ve((M) => [
891
- ...M,
866
+ const O = p || K.trim();
867
+ if (O) {
868
+ Y(!0), te(""), s.current = null, i.current = null, c.current = null, l.current = null, ve((B) => [
869
+ ...B,
892
870
  {
893
- query: j,
871
+ query: O,
894
872
  response: "Thinking for what suits you best...",
895
873
  potentialQuestions: "",
896
874
  products: [],
@@ -898,52 +876,52 @@ const lt = (e) => {
898
876
  }
899
877
  ]);
900
878
  try {
901
- const M = ye, Q = localStorage.getItem("customerNumber"), B = localStorage.getItem("isLoggedIn"), L = await wr(fe, _e);
879
+ const B = ye, Q = localStorage.getItem("customerNumber"), U = localStorage.getItem("isLoggedIn"), L = await wr(ue, Ie);
902
880
  if (!L)
903
881
  throw new Error("Failed to obtain access token");
904
- const Z = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
905
- registered: String(B || !1),
882
+ const X = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
883
+ registered: String(U || !1),
906
884
  userId: String(Q || (/* @__PURE__ */ new Date()).getTime())
907
- }).toString()}`, q = JSON.stringify({
885
+ }).toString()}`, R = JSON.stringify({
908
886
  flowId: "MMHQKYI1NE",
909
887
  flowAliasId: "SZF9ZK1ATE",
910
888
  input: {
911
- userPrompt: j,
912
- whom: M
889
+ userPrompt: O,
890
+ whom: B
913
891
  }
914
- }), ae = await fetch(Z, {
892
+ }), ne = await fetch(X, {
915
893
  signal: AbortSignal.timeout(3e4),
916
894
  method: "POST",
917
895
  headers: {
918
896
  "Content-Type": "application/json",
919
897
  Authorization: `Bearer ${L}`
920
898
  },
921
- body: q
899
+ body: R
922
900
  });
923
- if (!ae.ok)
924
- throw new Error(`HTTP error! status: ${ae.status}`);
925
- if (!ae.body) throw new Error("Readable stream not supported");
926
- const Le = ae.body.getReader(), He = new TextDecoder();
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();
927
905
  let G = "", me = "";
928
906
  for (; ; ) {
929
907
  C(!0);
930
- const { done: Ne, value: pe } = await Le.read();
908
+ const { done: Ne, value: pe } = await $e.read();
931
909
  if (Ne) break;
932
- G += He.decode(pe, { stream: !0 });
910
+ G += Re.decode(pe, { stream: !0 });
933
911
  const he = G.split(`
934
912
  `);
935
913
  G = he.pop() || "";
936
- for (const I of he)
937
- if (I.startsWith("data:")) {
938
- const ee = I.slice(5).trim();
914
+ for (const _ of he)
915
+ if (_.startsWith("data:")) {
916
+ const Z = _.slice(5).trim();
939
917
  try {
940
- const D = JSON.parse(ee);
918
+ const D = JSON.parse(Z);
941
919
  D.index == 1 && (me = D.data), ve(
942
- (se) => se.map(
943
- (ie, Ae) => Ae === se.length - 1 ? {
944
- ...ie,
920
+ (oe) => oe.map(
921
+ (ae, Ae) => Ae === oe.length - 1 ? {
922
+ ...ae,
945
923
  [D.index == 0 ? "response" : D.index == 1 ? "keywords" : D.index == 2 ? "potentialQuestions" : "end"]: D.data
946
- } : ie
924
+ } : ae
947
925
  )
948
926
  );
949
927
  } catch (D) {
@@ -951,124 +929,124 @@ const lt = (e) => {
951
929
  }
952
930
  }
953
931
  }
954
- X(oe(me));
955
- } catch (M) {
956
- console.error("Error sending message to Tanya:", M);
932
+ fe(re(me));
933
+ } catch (B) {
934
+ console.error("Error sending message to Tanya:", B);
957
935
  } finally {
958
936
  Y(!1);
959
937
  }
960
938
  }
961
- }, oe = (p) => {
962
- const j = p.match(
939
+ }, re = (p) => {
940
+ const O = p.match(
963
941
  /top five relevant product or category names are: (.*)/i
964
- ), B = (j ? j[1] : p).split(", ").map((W) => W.replace(/\s*(Toys|Bags|Miniature|etc\.*)\s*/gi, "").trim());
965
- return [...new Set(B)].filter(Boolean).join(",");
966
- }, X = async (p) => {
967
- var M, Q, B;
968
- const j = typeof p == "string" ? p.split(",") : p;
942
+ ), U = (O ? O[1] : p).split(", ").map((W) => W.replace(/\s*(Toys|Bags|Miniature|etc\.*)\s*/gi, "").trim());
943
+ return [...new Set(U)].filter(Boolean).join(",");
944
+ }, fe = async (p) => {
945
+ var B, Q, U;
946
+ const O = typeof p == "string" ? p.split(",") : p;
969
947
  C(!0);
970
948
  try {
971
949
  const L = await Promise.all(
972
- j.map((q) => oa(q).catch(() => []))
950
+ O.map((R) => oa(R).catch(() => []))
973
951
  // prevent Promise.all crash
974
- ), W = j.map((q, ae) => ({
975
- keyword: q,
976
- items: L[ae] ?? [],
952
+ ), W = O.map((R, ne) => ({
953
+ keyword: R,
954
+ items: L[ne] ?? [],
977
955
  loading: !1
978
- })).filter((q) => q.items.length > 0), Z = (Q = (M = W[0]) == null ? void 0 : M.items) == null ? void 0 : Q[0];
979
- if (Z) {
980
- i.current = Z.product_id, s.current = Z.product_name, c.current = (B = Z.image) == null ? void 0 : B.link;
981
- const q = typeof Z.price == "number" ? Z.price : null;
982
- l.current = q;
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;
960
+ l.current = R;
983
961
  }
984
962
  if (ve(
985
- (q) => q.map(
986
- (ae, Le) => Le === q.length - 1 ? {
987
- ...ae,
963
+ (R) => R.map(
964
+ (ne, $e) => $e === R.length - 1 ? {
965
+ ...ne,
988
966
  products: W,
989
- productSnapshot: Z ? {
967
+ productSnapshot: X ? {
990
968
  id: i.current,
991
969
  name: s.current,
992
970
  image: c.current,
993
971
  price: l.current,
994
972
  points: 0,
995
973
  quantity: 1
996
- } : ae.productSnapshot
997
- } : ae
974
+ } : ne.productSnapshot
975
+ } : ne
998
976
  )
999
- ), Z) {
1000
- const q = JSON.parse(
977
+ ), X) {
978
+ const R = JSON.parse(
1001
979
  sessionStorage.getItem("customerData") || "{}"
1002
980
  );
1003
- q != null && q.isGuest || (console.log("running secondary flow", Vt), Te(s.current, 0));
981
+ R != null && R.isGuest || (console.log("running secondary flow", Vt), Te(s.current, 0));
1004
982
  }
1005
983
  } catch (L) {
1006
984
  console.error("error in keyword search", L);
1007
985
  } finally {
1008
986
  C(!1);
1009
987
  }
1010
- }, kt = async (p, j) => {
1011
- var M, Q, B, L, W, Z, q, ae, Le, He, G, me, Ne, pe, he;
988
+ }, kt = async (p, O) => {
989
+ var B, Q, U, L, W, X, R, ne, $e, Re, G, me, Ne, pe, he;
1012
990
  J(!0);
1013
991
  try {
1014
- const I = await Rn(p.id);
1015
- if (!((Q = (M = I == null ? void 0 : I.variants) == null ? void 0 : M[0]) != null && Q.product_id || (L = (B = I == null ? void 0 : I.variants) == null ? void 0 : B[0]) != null && L.productId) && !(I.type.item || I.type.bundle)) {
1016
- J(!1), Ue.error("Variants not found", {
992
+ const _ = await Rn(p.id);
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
+ J(!1), Be.error("Variants not found", {
1017
995
  position: "bottom-right",
1018
996
  autoClose: 1e3
1019
997
  }), console.error("No product variant found");
1020
998
  return;
1021
999
  }
1022
- const ee = [
1000
+ const Z = [
1023
1001
  {
1024
- product_id: ((W = I.variants) == null ? void 0 : W[0].product_id) || ((Z = I.variants) == null ? void 0 : Z[0].productId) || (I == null ? void 0 : I.id),
1025
- quantity: j
1002
+ product_id: ((W = _.variants) == null ? void 0 : W[0].product_id) || ((X = _.variants) == null ? void 0 : X[0].productId) || (_ == null ? void 0 : _.id),
1003
+ quantity: O
1026
1004
  }
1027
1005
  ];
1028
- console.log(ee, "product data", "app version", Vt);
1006
+ console.log(Z, "product data", "app version", Vt);
1029
1007
  const D = JSON.parse(
1030
1008
  sessionStorage.getItem("customerData") || "{}"
1031
- ), se = (D == null ? void 0 : D.basketId) || localStorage.getItem(Lt), ie = !1, Ae = localStorage.getItem(zt), St = Date.now();
1032
- if (!ie || !Ae || St >= parseInt(Ae)) {
1033
- const je = await Bn();
1034
- let { customer_token: le } = await Un(
1035
- je
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)) {
1011
+ const Oe = await Un();
1012
+ let { customer_token: se } = await qn(
1013
+ Oe
1036
1014
  );
1037
- if (le = "Bearer " + h.access_token, !le) {
1015
+ if (se = "Bearer " + h.access_token, !se) {
1038
1016
  console.error("Failed to get customer_token");
1039
1017
  return;
1040
1018
  }
1041
1019
  const Nt = St + 300 * 1e3;
1042
- if (rr(le), localStorage.setItem(zt, Nt.toString()), console.log(se, "basketIdFromCustomer"), se) {
1020
+ if (rr(se), localStorage.setItem(zt, Nt.toString()), console.log(oe, "basketIdFromCustomer"), oe) {
1043
1021
  const Ct = await Hn({
1044
- basketId: se,
1045
- customer_token: le
1022
+ basketId: oe,
1023
+ customer_token: se
1046
1024
  });
1047
1025
  if (Ct.status === 200 && Ct) {
1048
- const It = await yr(
1049
- se,
1050
- ee,
1051
- le
1026
+ const _t = await yr(
1027
+ oe,
1028
+ Z,
1029
+ se
1052
1030
  );
1053
- ((q = It == null ? void 0 : It.product_items) == null ? void 0 : q.length) > 0 && (Ue.success("Added to cart", {
1031
+ ((R = _t == null ? void 0 : _t.product_items) == null ? void 0 : R.length) > 0 && (Be.success("Added to cart", {
1054
1032
  position: "bottom-right",
1055
1033
  autoClose: 3e3,
1056
1034
  hideProgressBar: !1,
1057
1035
  closeOnClick: !0,
1058
1036
  pauseOnHover: !0,
1059
1037
  draggable: !0
1060
- }), tr(se), J(!1));
1038
+ }), tr(oe), J(!1));
1061
1039
  return;
1062
1040
  }
1063
1041
  }
1064
1042
  const Ce = {
1065
1043
  productItems: [
1066
1044
  {
1067
- productId: ((ae = I.variants) == null ? void 0 : ae[0].product_id) || ((Le = I.variants) == null ? void 0 : Le[0].productId) || (I == null ? void 0 : I.id),
1045
+ productId: ((ne = _.variants) == null ? void 0 : ne[0].product_id) || (($e = _.variants) == null ? void 0 : $e[0].productId) || (_ == null ? void 0 : _.id),
1068
1046
  quantity: 1
1069
1047
  }
1070
1048
  ]
1071
- }, F = await qn(le, Ce);
1049
+ }, F = await Ir(se, Ce);
1072
1050
  if (console.log(
1073
1051
  F,
1074
1052
  F == null ? void 0 : F.basket_id,
@@ -1081,14 +1059,14 @@ const lt = (e) => {
1081
1059
  lt(
1082
1060
  (F == null ? void 0 : F.basket_id) || (F == null ? void 0 : F.basketId)
1083
1061
  );
1084
- const te = await r(
1062
+ const ee = await r(
1085
1063
  {
1086
1064
  productId: i,
1087
- quantity: j
1065
+ quantity: O
1088
1066
  },
1089
1067
  (F == null ? void 0 : F.basket_id) || (F == null ? void 0 : F.basketId)
1090
1068
  );
1091
- (((He = te == null ? void 0 : te.product_items) == null ? void 0 : He.length) > 0 || ((G = te == null ? void 0 : te.productItems) == null ? void 0 : G.length) > 0) && Ue.success("Added to cart", {
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", {
1092
1070
  position: "bottom-right",
1093
1071
  autoClose: 3e3,
1094
1072
  hideProgressBar: !1,
@@ -1097,25 +1075,25 @@ const lt = (e) => {
1097
1075
  draggable: !0
1098
1076
  }), tr(F.basket_id || (F == null ? void 0 : F.basketId));
1099
1077
  }
1100
- } catch (I) {
1101
- J(!1), console.error("Error adding to cart:", I), Ue.error("Failed to add product to cart", {
1078
+ } catch (_) {
1079
+ J(!1), console.error("Error adding to cart:", _), Be.error("Failed to add product to cart", {
1102
1080
  position: "bottom-right",
1103
1081
  autoClose: 3e3
1104
- }), ((me = I == null ? void 0 : I.response) == null ? void 0 : me.status) === 404 || // Basket not found
1105
- ((Ne = I == null ? void 0 : I.response) == null ? void 0 : Ne.status) === 401 ? (((pe = I == null ? void 0 : I.response) == null ? void 0 : pe.status) === 404 && lt(null), ((he = I == null ? void 0 : I.response) == null ? void 0 : he.status) === 401 && (lt(null), rr(null))) : (console.error("Failed to add product to basket:", I.message), Ue.error("Failed to add product to cart", {
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", {
1106
1084
  position: "bottom-right",
1107
1085
  autoClose: 3e3
1108
1086
  }));
1109
1087
  }
1110
1088
  J(!1);
1111
1089
  };
1112
- return be(() => {
1113
- T ? setTimeout(() => k(!0), 10) : k(!1);
1114
- }, [T]), /* @__PURE__ */ a("div", { className: "relative flex justify-center", children: /* @__PURE__ */ d(ra, { open: y, onOpenChange: b, children: [
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: [
1115
1093
  /* @__PURE__ */ a(
1116
1094
  na,
1117
1095
  {
1118
- onClick: () => b(!0),
1096
+ onClick: () => x(!0),
1119
1097
  style: {
1120
1098
  // background: storeDetails.tanyaThemeColor,
1121
1099
  },
@@ -1175,12 +1153,12 @@ const lt = (e) => {
1175
1153
  ) })
1176
1154
  }
1177
1155
  ),
1178
- T && /* @__PURE__ */ d(ke, { children: [
1156
+ A && /* @__PURE__ */ d(ke, { children: [
1179
1157
  /* @__PURE__ */ a(
1180
1158
  "div",
1181
1159
  {
1182
1160
  className: "fixed inset-0 z-40 bg-black/30",
1183
- onClick: () => b(!1)
1161
+ onClick: () => x(!1)
1184
1162
  }
1185
1163
  ),
1186
1164
  /* @__PURE__ */ d(
@@ -1267,7 +1245,7 @@ const lt = (e) => {
1267
1245
  gap: "1.25rem",
1268
1246
  margin: "0.75rem"
1269
1247
  },
1270
- children: /* @__PURE__ */ a("button", { onClick: () => b(!1), children: /* @__PURE__ */ d(
1248
+ children: /* @__PURE__ */ a("button", { onClick: () => x(!1), children: /* @__PURE__ */ d(
1271
1249
  "svg",
1272
1250
  {
1273
1251
  width: "24",
@@ -1319,7 +1297,7 @@ const lt = (e) => {
1319
1297
  /* @__PURE__ */ d(
1320
1298
  "div",
1321
1299
  {
1322
- className: `flex flex-col h-full ${Ge ? "lg:w-2/3 w-full" : "w-full"}`,
1300
+ className: `flex flex-col h-full ${Je ? "lg:w-2/3 w-full" : "w-full"}`,
1323
1301
  children: [
1324
1302
  /* @__PURE__ */ d(
1325
1303
  "div",
@@ -1336,7 +1314,7 @@ const lt = (e) => {
1336
1314
  /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2 mt-2", children: n.map((p) => /* @__PURE__ */ a(
1337
1315
  "button",
1338
1316
  {
1339
- onClick: () => nt(p),
1317
+ onClick: () => rt(p),
1340
1318
  className: "px-2 py-2 font-semibold text-xs text-[#18181B] bg-[#F3F3F3] rounded-2xl",
1341
1319
  style: {
1342
1320
  backgroundColor: ye === o[p] ? "#FFFFFF" : "#F3F3F3",
@@ -1349,8 +1327,8 @@ const lt = (e) => {
1349
1327
  ]
1350
1328
  }
1351
1329
  ),
1352
- S.map((p, j) => {
1353
- var M, Q;
1330
+ N.map((p, O) => {
1331
+ var B, Q;
1354
1332
  return /* @__PURE__ */ d("div", { children: [
1355
1333
  /* @__PURE__ */ a(
1356
1334
  "div",
@@ -1376,7 +1354,7 @@ const lt = (e) => {
1376
1354
  }
1377
1355
  }
1378
1356
  ) }),
1379
- Ie && !p.response.includes("Thinking") && ((M = p.products) == null ? void 0 : M.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" }) }),
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" }) }),
1380
1358
  (p == null ? void 0 : p.products) && ((Q = p == null ? void 0 : p.products) == null ? void 0 : Q.length) > 0 && /* @__PURE__ */ a(
1381
1359
  da,
1382
1360
  {
@@ -1393,15 +1371,15 @@ const lt = (e) => {
1393
1371
  children: "Why not explore these inquiries..."
1394
1372
  }
1395
1373
  ),
1396
- p.potentialQuestions.split(",").map((B, L) => /* @__PURE__ */ a(
1374
+ p.potentialQuestions.split(",").map((U, L) => /* @__PURE__ */ a(
1397
1375
  "button",
1398
1376
  {
1399
1377
  className: `cursor-pointer font-nunitoSans font-semibold text-[#232323] border bg-[#804C9E0D] border-${$.themeDarkColor} m-1 rounded-xl px-2 py-1`,
1400
- onClick: () => Se(B),
1378
+ onClick: () => Se(U),
1401
1379
  style: {
1402
1380
  backgroundColor: $.tanyaThemeColorLight
1403
1381
  },
1404
- children: B
1382
+ children: U
1405
1383
  },
1406
1384
  L
1407
1385
  ))
@@ -1508,8 +1486,8 @@ const lt = (e) => {
1508
1486
  {
1509
1487
  className: "px-3 py-1 text-sm",
1510
1488
  onClick: () => ve(
1511
- (B) => B.map(
1512
- (L, W) => W === j && L.productSnapshot ? {
1489
+ (U) => U.map(
1490
+ (L, W) => W === O && L.productSnapshot ? {
1513
1491
  ...L,
1514
1492
  productSnapshot: {
1515
1493
  ...L.productSnapshot,
@@ -1534,8 +1512,8 @@ const lt = (e) => {
1534
1512
  {
1535
1513
  className: "px-3 py-1 text-sm",
1536
1514
  onClick: () => ve(
1537
- (B) => B.map(
1538
- (L, W) => W === j && L.productSnapshot ? {
1515
+ (U) => U.map(
1516
+ (L, W) => W === O && L.productSnapshot ? {
1539
1517
  ...L,
1540
1518
  productSnapshot: {
1541
1519
  ...L.productSnapshot,
@@ -1557,7 +1535,7 @@ const lt = (e) => {
1557
1535
  {
1558
1536
  onClick: () => {
1559
1537
  kt(
1560
- dt(
1538
+ ct(
1561
1539
  p.productSnapshot
1562
1540
  ),
1563
1541
  p.productSnapshot.quantity
@@ -1580,7 +1558,7 @@ const lt = (e) => {
1580
1558
  ) })
1581
1559
  ] }) }),
1582
1560
  /* @__PURE__ */ a("div", { className: "mb-20" })
1583
- ] }, j);
1561
+ ] }, O);
1584
1562
  })
1585
1563
  ]
1586
1564
  }
@@ -1600,9 +1578,9 @@ const lt = (e) => {
1600
1578
  placeholder: "How can I help you...",
1601
1579
  value: K,
1602
1580
  autoFocus: !0,
1603
- onChange: (p) => ne(p.target.value),
1581
+ onChange: (p) => te(p.target.value),
1604
1582
  onKeyDown: (p) => {
1605
- p.key === "Enter" && !R && Se();
1583
+ p.key === "Enter" && !q && Se();
1606
1584
  }
1607
1585
  }
1608
1586
  ),
@@ -1610,10 +1588,10 @@ const lt = (e) => {
1610
1588
  "button",
1611
1589
  {
1612
1590
  type: "submit",
1613
- disabled: R,
1591
+ disabled: q,
1614
1592
  className: "p-3",
1615
1593
  onClick: () => Se(),
1616
- children: R ? /* @__PURE__ */ a(
1594
+ children: q ? /* @__PURE__ */ a(
1617
1595
  "div",
1618
1596
  {
1619
1597
  className: "p-3 animate-spin rounded-full h-3 w-3 border-b-2",
@@ -1647,7 +1625,7 @@ const lt = (e) => {
1647
1625
  ]
1648
1626
  }
1649
1627
  ),
1650
- /* @__PURE__ */ a(pa, { addToCartPwa: r })
1628
+ /* @__PURE__ */ a(ma, { addToCartPwa: r })
1651
1629
  ] })
1652
1630
  ]
1653
1631
  }
@@ -1655,32 +1633,32 @@ const lt = (e) => {
1655
1633
  ] })
1656
1634
  ] }) });
1657
1635
  };
1658
- var br = function(e, t) {
1659
- return br = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, n) {
1636
+ var xr = function(e, t) {
1637
+ return xr = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, n) {
1660
1638
  r.__proto__ = n;
1661
1639
  } || function(r, n) {
1662
1640
  for (var o in n) Object.prototype.hasOwnProperty.call(n, o) && (r[o] = n[o]);
1663
- }, br(e, t);
1641
+ }, xr(e, t);
1664
1642
  };
1665
- function ga(e, t) {
1643
+ function ha(e, t) {
1666
1644
  if (typeof t != "function" && t !== null)
1667
1645
  throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
1668
- br(e, t);
1646
+ xr(e, t);
1669
1647
  function r() {
1670
1648
  this.constructor = e;
1671
1649
  }
1672
1650
  e.prototype = t === null ? Object.create(t) : (r.prototype = t.prototype, new r());
1673
1651
  }
1674
- var tt = function() {
1675
- return tt = Object.assign || function(t) {
1652
+ var Qe = function() {
1653
+ return Qe = Object.assign || function(t) {
1676
1654
  for (var r, n = 1, o = arguments.length; n < o; n++) {
1677
1655
  r = arguments[n];
1678
1656
  for (var s in r) Object.prototype.hasOwnProperty.call(r, s) && (t[s] = r[s]);
1679
1657
  }
1680
1658
  return t;
1681
- }, tt.apply(this, arguments);
1659
+ }, Qe.apply(this, arguments);
1682
1660
  };
1683
- function wa(e, t) {
1661
+ function ga(e, t) {
1684
1662
  var r = {};
1685
1663
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
1686
1664
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
@@ -1688,16 +1666,16 @@ function wa(e, t) {
1688
1666
  t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
1689
1667
  return r;
1690
1668
  }
1691
- var cr = "Invariant Violation", sn = Object.setPrototypeOf, ya = sn === void 0 ? function(e, t) {
1669
+ var cr = "Invariant Violation", ln = Object.setPrototypeOf, wa = ln === void 0 ? function(e, t) {
1692
1670
  return e.__proto__ = t, e;
1693
- } : sn, Vn = (
1671
+ } : ln, Vn = (
1694
1672
  /** @class */
1695
1673
  (function(e) {
1696
- ga(t, e);
1674
+ ha(t, e);
1697
1675
  function t(r) {
1698
1676
  r === void 0 && (r = cr);
1699
1677
  var n = e.call(this, typeof r == "number" ? cr + ": " + r + " (see https://github.com/apollographql/invariant-packages)" : r) || this;
1700
- return n.framesToPop = 1, n.name = cr, ya(n, t.prototype), n;
1678
+ return n.framesToPop = 1, n.name = cr, wa(n, t.prototype), n;
1701
1679
  }
1702
1680
  return t;
1703
1681
  })(Error)
@@ -1706,10 +1684,10 @@ function it(e, t) {
1706
1684
  if (!e)
1707
1685
  throw new Vn(t);
1708
1686
  }
1709
- var Yn = ["debug", "log", "warn", "error", "silent"], ba = Yn.indexOf("log");
1687
+ var Yn = ["debug", "log", "warn", "error", "silent"], ya = Yn.indexOf("log");
1710
1688
  function Yt(e) {
1711
1689
  return function() {
1712
- if (Yn.indexOf(e) >= ba) {
1690
+ if (Yn.indexOf(e) >= ya) {
1713
1691
  var t = console[e] || console.log;
1714
1692
  return t.apply(console, arguments);
1715
1693
  }
@@ -1719,19 +1697,19 @@ function Yt(e) {
1719
1697
  e.debug = Yt("debug"), e.log = Yt("log"), e.warn = Yt("warn"), e.error = Yt("error");
1720
1698
  })(it || (it = {}));
1721
1699
  var Jn = "3.14.0";
1722
- function ht(e) {
1700
+ function pt(e) {
1723
1701
  try {
1724
1702
  return e();
1725
1703
  } catch {
1726
1704
  }
1727
1705
  }
1728
- const xr = ht(function() {
1706
+ const br = pt(function() {
1729
1707
  return globalThis;
1730
- }) || ht(function() {
1708
+ }) || pt(function() {
1731
1709
  return window;
1732
- }) || ht(function() {
1710
+ }) || pt(function() {
1733
1711
  return self;
1734
- }) || ht(function() {
1712
+ }) || pt(function() {
1735
1713
  return global;
1736
1714
  }) || // We don't expect the Function constructor ever to be invoked at runtime, as
1737
1715
  // long as at least one of globalThis, window, self, or global is defined, so
@@ -1739,15 +1717,15 @@ const xr = ht(function() {
1739
1717
  // detect syntactic usage of the Function constructor. If you think you can
1740
1718
  // improve your static analysis to detect this obfuscation, think again. This
1741
1719
  // is an arms race you cannot win, at least not in JavaScript.
1742
- ht(function() {
1743
- return ht.constructor("return this")();
1720
+ pt(function() {
1721
+ return pt.constructor("return this")();
1744
1722
  });
1745
- var ln = /* @__PURE__ */ new Map();
1723
+ var cn = /* @__PURE__ */ new Map();
1746
1724
  function xa(e) {
1747
- var t = ln.get(e) || 1;
1748
- return ln.set(e, t + 1), "".concat(e, ":").concat(t, ":").concat(Math.random().toString(36).slice(2));
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));
1749
1727
  }
1750
- function va(e, t) {
1728
+ function ba(e, t) {
1751
1729
  var r = xa("stringifyForDisplay");
1752
1730
  return JSON.stringify(e, function(n, o) {
1753
1731
  return o === void 0 ? r : o;
@@ -1759,7 +1737,7 @@ function Jt(e) {
1759
1737
  r[n - 1] = arguments[n];
1760
1738
  if (typeof t == "number") {
1761
1739
  var o = t;
1762
- t = _r(o), t || (t = Pr(o, r), r = []);
1740
+ t = Pr(o), t || (t = Fr(o, r), r = []);
1763
1741
  }
1764
1742
  e.apply(void 0, [t].concat(r));
1765
1743
  };
@@ -1767,7 +1745,7 @@ function Jt(e) {
1767
1745
  var dr = Object.assign(function(t, r) {
1768
1746
  for (var n = [], o = 2; o < arguments.length; o++)
1769
1747
  n[o - 2] = arguments[o];
1770
- t || it(t, _r(r, n) || Pr(r, n));
1748
+ t || it(t, Pr(r, n) || Fr(r, n));
1771
1749
  }, {
1772
1750
  debug: Jt(it.debug),
1773
1751
  log: Jt(it.log),
@@ -1777,23 +1755,23 @@ var dr = Object.assign(function(t, r) {
1777
1755
  function Kn(e) {
1778
1756
  for (var t = [], r = 1; r < arguments.length; r++)
1779
1757
  t[r - 1] = arguments[r];
1780
- return new Vn(_r(e, t) || Pr(e, t));
1758
+ return new Vn(Pr(e, t) || Fr(e, t));
1781
1759
  }
1782
- var cn = Symbol.for("ApolloErrorMessageHandler_" + Jn);
1760
+ var dn = Symbol.for("ApolloErrorMessageHandler_" + Jn);
1783
1761
  function Wn(e) {
1784
1762
  if (typeof e == "string")
1785
1763
  return e;
1786
1764
  try {
1787
- return va(e, 2).slice(0, 1e3);
1765
+ return ba(e, 2).slice(0, 1e3);
1788
1766
  } catch {
1789
1767
  return "<non-serializable>";
1790
1768
  }
1791
1769
  }
1792
- function _r(e, t) {
1770
+ function Pr(e, t) {
1793
1771
  if (t === void 0 && (t = []), !!e)
1794
- return xr[cn] && xr[cn](e, t.map(Wn));
1772
+ return br[dn] && br[dn](e, t.map(Wn));
1795
1773
  }
1796
- function Pr(e, t) {
1774
+ function Fr(e, t) {
1797
1775
  if (t === void 0 && (t = []), !!e)
1798
1776
  return "An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({
1799
1777
  version: Jn,
@@ -1801,98 +1779,98 @@ function Pr(e, t) {
1801
1779
  args: t.map(Wn)
1802
1780
  })));
1803
1781
  }
1804
- function ka(e) {
1782
+ function va(e) {
1805
1783
  return e.definitions.filter(function(t) {
1806
1784
  return t.kind === "OperationDefinition" && !!t.name;
1807
1785
  }).map(function(t) {
1808
1786
  return t.name.value;
1809
1787
  })[0] || null;
1810
1788
  }
1811
- let ue = null;
1812
- const dn = {};
1813
- let Sa = 1;
1814
- const Na = () => class {
1789
+ let le = null;
1790
+ const un = {};
1791
+ let ka = 1;
1792
+ const Sa = () => class {
1815
1793
  constructor() {
1816
1794
  this.id = [
1817
1795
  "slot",
1818
- Sa++,
1796
+ ka++,
1819
1797
  Date.now(),
1820
1798
  Math.random().toString(36).slice(2)
1821
1799
  ].join(":");
1822
1800
  }
1823
1801
  hasValue() {
1824
- for (let t = ue; t; t = t.parent)
1802
+ for (let t = le; t; t = t.parent)
1825
1803
  if (this.id in t.slots) {
1826
1804
  const r = t.slots[this.id];
1827
- if (r === dn)
1805
+ if (r === un)
1828
1806
  break;
1829
- return t !== ue && (ue.slots[this.id] = r), !0;
1807
+ return t !== le && (le.slots[this.id] = r), !0;
1830
1808
  }
1831
- return ue && (ue.slots[this.id] = dn), !1;
1809
+ return le && (le.slots[this.id] = un), !1;
1832
1810
  }
1833
1811
  getValue() {
1834
1812
  if (this.hasValue())
1835
- return ue.slots[this.id];
1813
+ return le.slots[this.id];
1836
1814
  }
1837
1815
  withValue(t, r, n, o) {
1838
1816
  const s = {
1839
1817
  __proto__: null,
1840
1818
  [this.id]: t
1841
- }, i = ue;
1842
- ue = { parent: i, slots: s };
1819
+ }, i = le;
1820
+ le = { parent: i, slots: s };
1843
1821
  try {
1844
1822
  return r.apply(o, n);
1845
1823
  } finally {
1846
- ue = i;
1824
+ le = i;
1847
1825
  }
1848
1826
  }
1849
1827
  // Capture the current context and wrap a callback function so that it
1850
1828
  // reestablishes the captured context when called.
1851
1829
  static bind(t) {
1852
- const r = ue;
1830
+ const r = le;
1853
1831
  return function() {
1854
- const n = ue;
1832
+ const n = le;
1855
1833
  try {
1856
- return ue = r, t.apply(this, arguments);
1834
+ return le = r, t.apply(this, arguments);
1857
1835
  } finally {
1858
- ue = n;
1836
+ le = n;
1859
1837
  }
1860
1838
  };
1861
1839
  }
1862
1840
  // Immediately run a callback function without any captured context.
1863
1841
  static noContext(t, r, n) {
1864
- if (ue) {
1865
- const o = ue;
1842
+ if (le) {
1843
+ const o = le;
1866
1844
  try {
1867
- return ue = null, t.apply(n, r);
1845
+ return le = null, t.apply(n, r);
1868
1846
  } finally {
1869
- ue = o;
1847
+ le = o;
1870
1848
  }
1871
1849
  } else
1872
1850
  return t.apply(n, r);
1873
1851
  }
1874
1852
  };
1875
- function un(e) {
1853
+ function fn(e) {
1876
1854
  try {
1877
1855
  return e();
1878
1856
  } catch {
1879
1857
  }
1880
1858
  }
1881
- const ur = "@wry/context:Slot", Ca = (
1859
+ const ur = "@wry/context:Slot", Na = (
1882
1860
  // Prefer globalThis when available.
1883
1861
  // https://github.com/benjamn/wryware/issues/347
1884
- un(() => globalThis) || // Fall back to global, which works in Node.js and may be converted by some
1862
+ fn(() => globalThis) || // Fall back to global, which works in Node.js and may be converted by some
1885
1863
  // bundlers to the appropriate identifier (window, self, ...) depending on the
1886
1864
  // bundling target. https://github.com/endojs/endo/issues/576#issuecomment-1178515224
1887
- un(() => global) || // Otherwise, use a dummy host that's local to this module. We used to fall
1865
+ fn(() => global) || // Otherwise, use a dummy host that's local to this module. We used to fall
1888
1866
  // back to using the Array constructor as a namespace, but that was flagged in
1889
1867
  // https://github.com/benjamn/wryware/issues/347, and can be avoided.
1890
1868
  /* @__PURE__ */ Object.create(null)
1891
- ), fn = Ca, Fr = fn[ur] || // Earlier versions of this package stored the globalKey property on the Array
1869
+ ), mn = Na, Er = mn[ur] || // Earlier versions of this package stored the globalKey property on the Array
1892
1870
  // constructor, so we check there as well, to prevent Slot class duplication.
1893
1871
  Array[ur] || (function(e) {
1894
1872
  try {
1895
- Object.defineProperty(fn, ur, {
1873
+ Object.defineProperty(mn, ur, {
1896
1874
  value: e,
1897
1875
  enumerable: !1,
1898
1876
  writable: !1,
@@ -1907,9 +1885,9 @@ Array[ur] || (function(e) {
1907
1885
  } finally {
1908
1886
  return e;
1909
1887
  }
1910
- })(Na()), { bind: bi, noContext: xi } = Fr;
1911
- new Fr();
1912
- function Ia(e, t) {
1888
+ })(Sa()), { bind: yi, noContext: xi } = Er;
1889
+ new Er();
1890
+ function Ca(e, t) {
1913
1891
  var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
1914
1892
  if (r) return (r = r.call(e)).next.bind(r);
1915
1893
  if (Array.isArray(e) || (r = _a(e)) || t) {
@@ -1924,36 +1902,36 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1924
1902
  }
1925
1903
  function _a(e, t) {
1926
1904
  if (e) {
1927
- if (typeof e == "string") return mn(e, t);
1905
+ if (typeof e == "string") return pn(e, t);
1928
1906
  var r = Object.prototype.toString.call(e).slice(8, -1);
1929
1907
  if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(e);
1930
- if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return mn(e, t);
1908
+ if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return pn(e, t);
1931
1909
  }
1932
1910
  }
1933
- function mn(e, t) {
1911
+ function pn(e, t) {
1934
1912
  (t == null || t > e.length) && (t = e.length);
1935
1913
  for (var r = 0, n = new Array(t); r < t; r++)
1936
1914
  n[r] = e[r];
1937
1915
  return n;
1938
1916
  }
1939
- function pn(e, t) {
1917
+ function hn(e, t) {
1940
1918
  for (var r = 0; r < t.length; r++) {
1941
1919
  var n = t[r];
1942
1920
  n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);
1943
1921
  }
1944
1922
  }
1945
- function Er(e, t, r) {
1946
- return t && pn(e.prototype, t), r && pn(e, r), Object.defineProperty(e, "prototype", { writable: !1 }), e;
1923
+ function Tr(e, t, r) {
1924
+ return t && hn(e.prototype, t), r && hn(e, r), Object.defineProperty(e, "prototype", { writable: !1 }), e;
1947
1925
  }
1948
- var Tr = function() {
1926
+ var Ar = function() {
1949
1927
  return typeof Symbol == "function";
1950
- }, Ar = function(e) {
1951
- return Tr() && !!Symbol[e];
1928
+ }, Or = function(e) {
1929
+ return Ar() && !!Symbol[e];
1952
1930
  }, jr = function(e) {
1953
- return Ar(e) ? Symbol[e] : "@@" + e;
1931
+ return Or(e) ? Symbol[e] : "@@" + e;
1954
1932
  };
1955
- Tr() && !Ar("observable") && (Symbol.observable = Symbol("observable"));
1956
- var Pa = jr("iterator"), vr = jr("observable"), Qn = jr("species");
1933
+ Ar() && !Or("observable") && (Symbol.observable = Symbol("observable"));
1934
+ var Ia = jr("iterator"), vr = jr("observable"), Qn = jr("species");
1957
1935
  function nr(e, t) {
1958
1936
  var r = e[t];
1959
1937
  if (r != null) {
@@ -1965,11 +1943,11 @@ function Tt(e) {
1965
1943
  var t = e.constructor;
1966
1944
  return t !== void 0 && (t = t[Qn], t === null && (t = void 0)), t !== void 0 ? t : we;
1967
1945
  }
1968
- function Fa(e) {
1946
+ function Pa(e) {
1969
1947
  return e instanceof we;
1970
1948
  }
1971
- function xt(e) {
1972
- xt.log ? xt.log(e) : setTimeout(function() {
1949
+ function bt(e) {
1950
+ bt.log ? bt.log(e) : setTimeout(function() {
1973
1951
  throw e;
1974
1952
  });
1975
1953
  }
@@ -1978,7 +1956,7 @@ function Wt(e) {
1978
1956
  try {
1979
1957
  e();
1980
1958
  } catch (t) {
1981
- xt(t);
1959
+ bt(t);
1982
1960
  }
1983
1961
  });
1984
1962
  }
@@ -1993,13 +1971,13 @@ function Gn(e) {
1993
1971
  r && r.call(t);
1994
1972
  }
1995
1973
  } catch (n) {
1996
- xt(n);
1974
+ bt(n);
1997
1975
  }
1998
1976
  }
1999
1977
  function kr(e) {
2000
1978
  e._observer = void 0, e._queue = void 0, e._state = "closed";
2001
1979
  }
2002
- function Ea(e) {
1980
+ function Fa(e) {
2003
1981
  var t = e._queue;
2004
1982
  if (t) {
2005
1983
  e._queue = void 0, e._state = "ready";
@@ -2025,7 +2003,7 @@ function Xn(e, t, r) {
2025
2003
  break;
2026
2004
  }
2027
2005
  } catch (s) {
2028
- xt(s);
2006
+ bt(s);
2029
2007
  }
2030
2008
  e._state === "closed" ? Gn(e) : e._state === "running" && (e._state = "ready");
2031
2009
  }
@@ -2043,17 +2021,17 @@ function fr(e, t, r) {
2043
2021
  type: t,
2044
2022
  value: r
2045
2023
  }], Wt(function() {
2046
- return Ea(e);
2024
+ return Fa(e);
2047
2025
  });
2048
2026
  return;
2049
2027
  }
2050
2028
  Xn(e, t, r);
2051
2029
  }
2052
2030
  }
2053
- var Ta = /* @__PURE__ */ (function() {
2031
+ var Ea = /* @__PURE__ */ (function() {
2054
2032
  function e(r, n) {
2055
2033
  this._cleanup = void 0, this._observer = r, this._queue = void 0, this._state = "initializing";
2056
- var o = new Aa(this);
2034
+ var o = new Ta(this);
2057
2035
  try {
2058
2036
  this._cleanup = n.call(void 0, o);
2059
2037
  } catch (s) {
@@ -2064,13 +2042,13 @@ var Ta = /* @__PURE__ */ (function() {
2064
2042
  var t = e.prototype;
2065
2043
  return t.unsubscribe = function() {
2066
2044
  this._state !== "closed" && (kr(this), Gn(this));
2067
- }, Er(e, [{
2045
+ }, Tr(e, [{
2068
2046
  key: "closed",
2069
2047
  get: function() {
2070
2048
  return this._state === "closed";
2071
2049
  }
2072
2050
  }]), e;
2073
- })(), Aa = /* @__PURE__ */ (function() {
2051
+ })(), Ta = /* @__PURE__ */ (function() {
2074
2052
  function e(r) {
2075
2053
  this._subscription = r;
2076
2054
  }
@@ -2081,7 +2059,7 @@ var Ta = /* @__PURE__ */ (function() {
2081
2059
  fr(this._subscription, "error", n);
2082
2060
  }, t.complete = function() {
2083
2061
  fr(this._subscription, "complete");
2084
- }, Er(e, [{
2062
+ }, Tr(e, [{
2085
2063
  key: "closed",
2086
2064
  get: function() {
2087
2065
  return this._subscription._state === "closed";
@@ -2099,7 +2077,7 @@ var Ta = /* @__PURE__ */ (function() {
2099
2077
  next: n,
2100
2078
  error: arguments[1],
2101
2079
  complete: arguments[2]
2102
- }), new Ta(n, this._subscriber);
2080
+ }), new Ea(n, this._subscriber);
2103
2081
  }, t.forEach = function(n) {
2104
2082
  var o = this;
2105
2083
  return new Promise(function(s, i) {
@@ -2173,12 +2151,12 @@ var Ta = /* @__PURE__ */ (function() {
2173
2151
  return new s(function(g) {
2174
2152
  return o.subscribe({
2175
2153
  next: function(y) {
2176
- var b = !c;
2177
- if (c = !0, !b || i)
2154
+ var x = !c;
2155
+ if (c = !0, !x || i)
2178
2156
  try {
2179
2157
  h = n(h, y);
2180
- } catch (_) {
2181
- return g.error(_);
2158
+ } catch (I) {
2159
+ return g.error(I);
2182
2160
  }
2183
2161
  else
2184
2162
  h = y;
@@ -2198,13 +2176,13 @@ var Ta = /* @__PURE__ */ (function() {
2198
2176
  var c = Tt(this);
2199
2177
  return new c(function(l) {
2200
2178
  var h, g = 0;
2201
- function y(b) {
2202
- h = b.subscribe({
2203
- next: function(_) {
2204
- l.next(_);
2179
+ function y(x) {
2180
+ h = x.subscribe({
2181
+ next: function(I) {
2182
+ l.next(I);
2205
2183
  },
2206
- error: function(_) {
2207
- l.error(_);
2184
+ error: function(I) {
2185
+ l.error(I);
2208
2186
  },
2209
2187
  complete: function() {
2210
2188
  g === s.length ? (h = void 0, l.complete()) : y(c.from(s[g++]));
@@ -2225,19 +2203,19 @@ var Ta = /* @__PURE__ */ (function() {
2225
2203
  if (n)
2226
2204
  try {
2227
2205
  g = n(g);
2228
- } catch (b) {
2229
- return i.error(b);
2206
+ } catch (x) {
2207
+ return i.error(x);
2230
2208
  }
2231
2209
  var y = s.from(g).subscribe({
2232
- next: function(b) {
2233
- i.next(b);
2210
+ next: function(x) {
2211
+ i.next(x);
2234
2212
  },
2235
- error: function(b) {
2236
- i.error(b);
2213
+ error: function(x) {
2214
+ i.error(x);
2237
2215
  },
2238
2216
  complete: function() {
2239
- var b = c.indexOf(y);
2240
- b >= 0 && c.splice(b, 1), h();
2217
+ var x = c.indexOf(y);
2218
+ x >= 0 && c.splice(x, 1), h();
2241
2219
  }
2242
2220
  });
2243
2221
  c.push(y);
@@ -2267,15 +2245,15 @@ var Ta = /* @__PURE__ */ (function() {
2267
2245
  if (s) {
2268
2246
  var i = s.call(n);
2269
2247
  if (Object(i) !== i) throw new TypeError(i + " is not an object");
2270
- return Fa(i) && i.constructor === o ? i : new o(function(c) {
2248
+ return Pa(i) && i.constructor === o ? i : new o(function(c) {
2271
2249
  return i.subscribe(c);
2272
2250
  });
2273
2251
  }
2274
- if (Ar("iterator") && (s = nr(n, Pa), s))
2252
+ if (Or("iterator") && (s = nr(n, Ia), s))
2275
2253
  return new o(function(c) {
2276
2254
  Wt(function() {
2277
2255
  if (!c.closed) {
2278
- for (var l = Ia(s.call(n)), h; !(h = l()).done; ) {
2256
+ for (var l = Ca(s.call(n)), h; !(h = l()).done; ) {
2279
2257
  var g = h.value;
2280
2258
  if (c.next(g), c.closed) return;
2281
2259
  }
@@ -2307,21 +2285,21 @@ var Ta = /* @__PURE__ */ (function() {
2307
2285
  }
2308
2286
  });
2309
2287
  });
2310
- }, Er(e, null, [{
2288
+ }, Tr(e, null, [{
2311
2289
  key: Qn,
2312
2290
  get: function() {
2313
2291
  return this;
2314
2292
  }
2315
2293
  }]), e;
2316
2294
  })();
2317
- Tr() && Object.defineProperty(we, Symbol("extensions"), {
2295
+ Ar() && Object.defineProperty(we, Symbol("extensions"), {
2318
2296
  value: {
2319
2297
  symbol: vr,
2320
- hostReportError: xt
2298
+ hostReportError: bt
2321
2299
  },
2322
2300
  configurable: !0
2323
2301
  });
2324
- function ja(e) {
2302
+ function Aa(e) {
2325
2303
  var t, r = e.Symbol;
2326
2304
  if (typeof r == "function")
2327
2305
  if (r.observable)
@@ -2337,11 +2315,11 @@ function ja(e) {
2337
2315
  t = "@@observable";
2338
2316
  return t;
2339
2317
  }
2340
- var bt;
2341
- typeof self < "u" ? bt = self : typeof window < "u" ? bt = window : typeof global < "u" ? bt = global : typeof module < "u" ? bt = module : bt = Function("return this")();
2342
- ja(bt);
2343
- var hn = we.prototype, gn = "@@observable";
2344
- hn[gn] || (hn[gn] = function() {
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() {
2345
2323
  return this;
2346
2324
  });
2347
2325
  function Oa(e) {
@@ -2358,11 +2336,11 @@ function Oa(e) {
2358
2336
  }
2359
2337
  return e;
2360
2338
  }
2361
- function $a(e, t) {
2362
- var r = tt({}, e), n = function(s) {
2363
- typeof s == "function" ? r = tt(tt({}, r), s(r)) : r = tt(tt({}, r), s);
2339
+ function ja(e, t) {
2340
+ var r = Qe({}, e), n = function(s) {
2341
+ typeof s == "function" ? r = Qe(Qe({}, r), s(r)) : r = Qe(Qe({}, r), s);
2364
2342
  }, o = function() {
2365
- return tt({}, r);
2343
+ return Qe({}, r);
2366
2344
  };
2367
2345
  return Object.defineProperty(t, "setContext", {
2368
2346
  enumerable: !1,
@@ -2372,23 +2350,23 @@ function $a(e, t) {
2372
2350
  value: o
2373
2351
  }), t;
2374
2352
  }
2375
- function La(e) {
2353
+ function $a(e) {
2376
2354
  var t = {
2377
2355
  variables: e.variables || {},
2378
2356
  extensions: e.extensions || {},
2379
2357
  operationName: e.operationName,
2380
2358
  query: e.query
2381
2359
  };
2382
- return t.operationName || (t.operationName = typeof t.query != "string" ? ka(t.query) || void 0 : ""), t;
2360
+ return t.operationName || (t.operationName = typeof t.query != "string" ? va(t.query) || void 0 : ""), t;
2383
2361
  }
2384
- var za = Symbol.for("apollo.deprecations"), Da = xr, Ma = new Fr();
2385
- function Ba(e) {
2386
- return Da[za] || (Ma.getValue() || []).includes(e);
2362
+ var La = Symbol.for("apollo.deprecations"), za = br, Da = new Er();
2363
+ function Ma(e) {
2364
+ return za[La] || (Da.getValue() || []).includes(e);
2387
2365
  }
2388
- function Ua(e, t) {
2389
- Ba(e) || t();
2366
+ function Ba(e, t) {
2367
+ Ma(e) || t();
2390
2368
  }
2391
- function wn(e, t) {
2369
+ function yn(e, t) {
2392
2370
  return t ? t(e) : we.of();
2393
2371
  }
2394
2372
  function At(e) {
@@ -2412,14 +2390,14 @@ var Zn = (
2412
2390
  return r.concat(n);
2413
2391
  });
2414
2392
  }, e.split = function(t, r, n) {
2415
- var o = At(r), s = At(n || new e(wn)), i;
2393
+ var o = At(r), s = At(n || new e(yn)), i;
2416
2394
  return Kt(o) && Kt(s) ? i = new e(function(c) {
2417
2395
  return t(c) ? o.request(c) || we.of() : s.request(c) || we.of();
2418
2396
  }) : i = new e(function(c, l) {
2419
2397
  return t(c) ? o.request(c, l) || we.of() : s.request(c, l) || we.of();
2420
2398
  }), Object.assign(i, { left: o, right: s });
2421
2399
  }, e.execute = function(t, r) {
2422
- return t.request($a(r.context, La(Oa(r)))) || we.of();
2400
+ return t.request(ja(r.context, $a(Oa(r)))) || we.of();
2423
2401
  }, e.concat = function(t, r) {
2424
2402
  var n = At(t);
2425
2403
  if (Kt(n))
@@ -2435,13 +2413,13 @@ var Zn = (
2435
2413
  }) || we.of();
2436
2414
  }), Object.assign(s, { left: n, right: o });
2437
2415
  }, e.prototype.split = function(t, r, n) {
2438
- return this.concat(e.split(t, r, n || new e(wn)));
2416
+ return this.concat(e.split(t, r, n || new e(yn)));
2439
2417
  }, e.prototype.concat = function(t) {
2440
2418
  return e.concat(this, t);
2441
2419
  }, e.prototype.request = function(t, r) {
2442
2420
  throw Kn(48);
2443
2421
  }, e.prototype.onError = function(t, r) {
2444
- if (globalThis.__DEV__ !== !1 && Ua("onError", function() {
2422
+ if (globalThis.__DEV__ !== !1 && Ba("onError", function() {
2445
2423
  globalThis.__DEV__ !== !1 && dr.warn(49);
2446
2424
  }), r && r.error)
2447
2425
  return r.error(t), !1;
@@ -2451,9 +2429,9 @@ var Zn = (
2451
2429
  }, e;
2452
2430
  })()
2453
2431
  );
2454
- function Ra(e) {
2432
+ function Ua(e) {
2455
2433
  return new Zn(function(t, r) {
2456
- var n = wa(t, []);
2434
+ var n = ga(t, []);
2457
2435
  return new we(function(o) {
2458
2436
  var s, i = !1;
2459
2437
  return Promise.resolve(n).then(function(c) {
@@ -2473,7 +2451,7 @@ function Ra(e) {
2473
2451
  const qa = async () => {
2474
2452
  const e = "https://auth.australia-southeast1.gcp.commercetools.com/oauth/token", n = "Basic " + btoa(encodeURIComponent("tfegsSBVOYnR7e_yE-AjxVVN") + ":" + encodeURIComponent("pyKWgHuTxuMwDygh9JH1ehLEaLvAhBo4"));
2475
2453
  try {
2476
- const o = await re.post(
2454
+ const o = await de.post(
2477
2455
  e,
2478
2456
  new URLSearchParams({ grant_type: "client_credentials" }),
2479
2457
  // Only grant_type in body
@@ -2486,11 +2464,11 @@ const qa = async () => {
2486
2464
  );
2487
2465
  return o.status === 200 && o.data.access_token ? o.data.access_token : (console.error("Failed to fetch token:", o.data), null);
2488
2466
  } catch (o) {
2489
- return re.isAxiosError(o) ? console.error("Error fetching token:", o.response || o.message) : console.error("Unexpected error:", o), null;
2467
+ return de.isAxiosError(o) ? console.error("Error fetching token:", o.response || o.message) : console.error("Unexpected error:", o), null;
2490
2468
  }
2491
- }, Ha = "https://api.australia-southeast1.gcp.commercetools.com/kt-demo/graphql", Va = Uo({
2492
- uri: `${Ha}`
2493
- }), Ya = Ra(async (e, { headers: t }) => {
2469
+ }, Ra = "https://api.australia-southeast1.gcp.commercetools.com/kt-demo/graphql", Ha = Uo({
2470
+ uri: `${Ra}`
2471
+ }), Va = Ua(async (e, { headers: t }) => {
2494
2472
  const r = await qa();
2495
2473
  return {
2496
2474
  headers: {
@@ -2498,19 +2476,19 @@ const qa = async () => {
2498
2476
  authorization: `Bearer ${r}`
2499
2477
  }
2500
2478
  };
2501
- }), Ja = new Ro({
2502
- link: Ya.concat(Va),
2503
- cache: new qo(),
2479
+ }), Ya = new qo({
2480
+ link: Va.concat(Ha),
2481
+ cache: new Ro(),
2504
2482
  defaultOptions: {
2505
2483
  watchQuery: {
2506
2484
  fetchPolicy: "cache-and-network"
2507
2485
  }
2508
2486
  }
2509
- }), vi = (e) => {
2487
+ }), bi = (e) => {
2510
2488
  const { tanyaConfig: t } = e;
2511
- return /* @__PURE__ */ a(Ho, { client: Ja, children: /* @__PURE__ */ a(ta, { children: /* @__PURE__ */ a(ha, { tanyaConfig: t }) }) });
2489
+ return /* @__PURE__ */ a(Ho, { client: Ya, children: /* @__PURE__ */ a(ta, { children: /* @__PURE__ */ a(pa, { tanyaConfig: t }) }) });
2512
2490
  };
2513
- function Ka(e, t) {
2491
+ function Ja(e, t) {
2514
2492
  const r = e.icons, n = e.aliases || /* @__PURE__ */ Object.create(null), o = /* @__PURE__ */ Object.create(null);
2515
2493
  function s(i) {
2516
2494
  if (r[i]) return o[i] = [];
@@ -2532,32 +2510,32 @@ const eo = Object.freeze({
2532
2510
  rotate: 0,
2533
2511
  vFlip: !1,
2534
2512
  hFlip: !1
2535
- }), Or = Object.freeze({
2513
+ }), $r = Object.freeze({
2536
2514
  ...eo,
2537
2515
  ...or
2538
2516
  }), Sr = Object.freeze({
2539
- ...Or,
2517
+ ...$r,
2540
2518
  body: "",
2541
2519
  hidden: !1
2542
2520
  });
2543
- function Wa(e, t) {
2521
+ function Ka(e, t) {
2544
2522
  const r = {};
2545
2523
  !e.hFlip != !t.hFlip && (r.hFlip = !0), !e.vFlip != !t.vFlip && (r.vFlip = !0);
2546
2524
  const n = ((e.rotate || 0) + (t.rotate || 0)) % 4;
2547
2525
  return n && (r.rotate = n), r;
2548
2526
  }
2549
- function yn(e, t) {
2550
- const r = Wa(e, t);
2527
+ function xn(e, t) {
2528
+ const r = Ka(e, t);
2551
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]);
2552
2530
  return r;
2553
2531
  }
2554
- function Qa(e, t, r) {
2532
+ function Wa(e, t, r) {
2555
2533
  const n = e.icons, o = e.aliases || /* @__PURE__ */ Object.create(null);
2556
2534
  let s = {};
2557
2535
  function i(c) {
2558
- s = yn(n[c] || o[c], s);
2536
+ s = xn(n[c] || o[c], s);
2559
2537
  }
2560
- return i(t), r.forEach(i), yn(e, s);
2538
+ return i(t), r.forEach(i), xn(e, s);
2561
2539
  }
2562
2540
  function to(e, t) {
2563
2541
  const r = [];
@@ -2565,14 +2543,14 @@ function to(e, t) {
2565
2543
  e.not_found instanceof Array && e.not_found.forEach((o) => {
2566
2544
  t(o, null), r.push(o);
2567
2545
  });
2568
- const n = Ka(e);
2546
+ const n = Ja(e);
2569
2547
  for (const o in n) {
2570
2548
  const s = n[o];
2571
- s && (t(o, Qa(e, o, s)), r.push(o));
2549
+ s && (t(o, Wa(e, o, s)), r.push(o));
2572
2550
  }
2573
2551
  return r;
2574
2552
  }
2575
- const Ga = {
2553
+ const Qa = {
2576
2554
  provider: "",
2577
2555
  aliases: {},
2578
2556
  not_found: {},
@@ -2585,7 +2563,7 @@ function mr(e, t) {
2585
2563
  function ro(e) {
2586
2564
  if (typeof e != "object" || e === null) return null;
2587
2565
  const t = e;
2588
- if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !mr(e, Ga)) return null;
2566
+ if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !mr(e, Qa)) return null;
2589
2567
  const r = t.icons;
2590
2568
  for (const o in r) {
2591
2569
  const s = r[o];
@@ -2599,7 +2577,7 @@ function ro(e) {
2599
2577
  return t;
2600
2578
  }
2601
2579
  const bn = /* @__PURE__ */ Object.create(null);
2602
- function Xa(e, t) {
2580
+ function Ga(e, t) {
2603
2581
  return {
2604
2582
  provider: e,
2605
2583
  prefix: t,
@@ -2609,14 +2587,14 @@ function Xa(e, t) {
2609
2587
  }
2610
2588
  function vt(e, t) {
2611
2589
  const r = bn[e] || (bn[e] = /* @__PURE__ */ Object.create(null));
2612
- return r[t] || (r[t] = Xa(e, t));
2590
+ return r[t] || (r[t] = Ga(e, t));
2613
2591
  }
2614
2592
  function no(e, t) {
2615
2593
  return ro(t) ? to(t, (r, n) => {
2616
2594
  n ? e.icons[r] = n : e.missing.add(r);
2617
2595
  }) : [];
2618
2596
  }
2619
- function Za(e, t, r) {
2597
+ function Xa(e, t, r) {
2620
2598
  try {
2621
2599
  if (typeof r.body == "string")
2622
2600
  return e.icons[t] = { ...r }, !0;
@@ -2662,25 +2640,25 @@ let Dt = !1;
2662
2640
  function ao(e) {
2663
2641
  return typeof e == "boolean" && (Dt = e), Dt;
2664
2642
  }
2665
- function xn(e) {
2643
+ function vn(e) {
2666
2644
  const t = typeof e == "string" ? ar(e, !0, Dt) : e;
2667
2645
  if (t) {
2668
2646
  const r = vt(t.provider, t.prefix), n = t.name;
2669
2647
  return r.icons[n] || (r.missing.has(n) ? null : void 0);
2670
2648
  }
2671
2649
  }
2672
- function es(e, t) {
2650
+ function Za(e, t) {
2673
2651
  const r = ar(e, !0, Dt);
2674
2652
  if (!r) return !1;
2675
2653
  const n = vt(r.provider, r.prefix);
2676
- return t ? Za(n, r.name, t) : (n.missing.add(r.name), !0);
2654
+ return t ? Xa(n, r.name, t) : (n.missing.add(r.name), !0);
2677
2655
  }
2678
- function ts(e, t) {
2656
+ function es(e, t) {
2679
2657
  if (typeof e != "object") return !1;
2680
2658
  if (typeof t != "string" && (t = e.provider || ""), Dt && !t && !e.prefix) {
2681
2659
  let o = !1;
2682
2660
  return ro(e) && (e.prefix = "", to(e, (s, i) => {
2683
- es(s, i) && (o = !0);
2661
+ Za(s, i) && (o = !0);
2684
2662
  })), o;
2685
2663
  }
2686
2664
  const r = e.prefix;
@@ -2697,15 +2675,15 @@ const so = Object.freeze({
2697
2675
  }), io = Object.freeze({
2698
2676
  ...so,
2699
2677
  ...or
2700
- }), rs = /(-?[0-9.]*[0-9]+[0-9.]*)/g, ns = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
2701
- function vn(e, t, r) {
2678
+ }), ts = /(-?[0-9.]*[0-9]+[0-9.]*)/g, rs = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
2679
+ function kn(e, t, r) {
2702
2680
  if (t === 1) return e;
2703
2681
  if (r = r || 100, typeof e == "number") return Math.ceil(e * t * r) / r;
2704
2682
  if (typeof e != "string") return e;
2705
- const n = e.split(rs);
2683
+ const n = e.split(ts);
2706
2684
  if (n === null || !n.length) return e;
2707
2685
  const o = [];
2708
- let s = n.shift(), i = ns.test(s);
2686
+ let s = n.shift(), i = rs.test(s);
2709
2687
  for (; ; ) {
2710
2688
  if (i) {
2711
2689
  const c = parseFloat(s);
@@ -2715,7 +2693,7 @@ function vn(e, t, r) {
2715
2693
  i = !i;
2716
2694
  }
2717
2695
  }
2718
- function os(e, t = "defs") {
2696
+ function ns(e, t = "defs") {
2719
2697
  let r = "";
2720
2698
  const n = e.indexOf("<" + t);
2721
2699
  for (; n >= 0; ) {
@@ -2730,17 +2708,17 @@ function os(e, t = "defs") {
2730
2708
  content: e
2731
2709
  };
2732
2710
  }
2733
- function as(e, t) {
2711
+ function os(e, t) {
2734
2712
  return e ? "<defs>" + e + "</defs>" + t : t;
2735
2713
  }
2736
- function ss(e, t, r) {
2737
- const n = os(e);
2738
- return as(n.defs, t + n.content + r);
2714
+ function as(e, t, r) {
2715
+ const n = ns(e);
2716
+ return os(n.defs, t + n.content + r);
2739
2717
  }
2740
- const is = (e) => e === "unset" || e === "undefined" || e === "none";
2741
- function ls(e, t) {
2718
+ const ss = (e) => e === "unset" || e === "undefined" || e === "none";
2719
+ function is(e, t) {
2742
2720
  const r = {
2743
- ...Or,
2721
+ ...$r,
2744
2722
  ...e
2745
2723
  }, n = {
2746
2724
  ...io,
@@ -2752,64 +2730,64 @@ function ls(e, t) {
2752
2730
  height: r.height
2753
2731
  };
2754
2732
  let s = r.body;
2755
- [r, n].forEach((T) => {
2756
- const v = [], P = T.hFlip, J = T.vFlip;
2757
- let R = T.rotate;
2758
- P ? J ? R += 2 : (v.push("translate(" + (o.width + o.left).toString() + " " + (0 - o.top).toString() + ")"), v.push("scale(-1 1)"), o.top = o.left = 0) : J && (v.push("translate(" + (0 - o.left).toString() + " " + (o.height + o.top).toString() + ")"), v.push("scale(1 -1)"), o.top = o.left = 0);
2733
+ [r, n].forEach((A) => {
2734
+ const k = [], P = A.hFlip, J = A.vFlip;
2735
+ let q = A.rotate;
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);
2759
2737
  let Y;
2760
- switch (R < 0 && (R -= Math.floor(R / 4) * 4), R = R % 4, R) {
2738
+ switch (q < 0 && (q -= Math.floor(q / 4) * 4), q = q % 4, q) {
2761
2739
  case 1:
2762
- Y = o.height / 2 + o.top, v.unshift("rotate(90 " + Y.toString() + " " + Y.toString() + ")");
2740
+ Y = o.height / 2 + o.top, k.unshift("rotate(90 " + Y.toString() + " " + Y.toString() + ")");
2763
2741
  break;
2764
2742
  case 2:
2765
- v.unshift("rotate(180 " + (o.width / 2 + o.left).toString() + " " + (o.height / 2 + o.top).toString() + ")");
2743
+ k.unshift("rotate(180 " + (o.width / 2 + o.left).toString() + " " + (o.height / 2 + o.top).toString() + ")");
2766
2744
  break;
2767
2745
  case 3:
2768
- Y = o.width / 2 + o.left, v.unshift("rotate(-90 " + Y.toString() + " " + Y.toString() + ")");
2746
+ Y = o.width / 2 + o.left, k.unshift("rotate(-90 " + Y.toString() + " " + Y.toString() + ")");
2769
2747
  break;
2770
2748
  }
2771
- R % 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)), v.length && (s = ss(s, '<g transform="' + v.join(" ") + '">', "</g>"));
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>"));
2772
2750
  });
2773
2751
  const i = n.width, c = n.height, l = o.width, h = o.height;
2774
2752
  let g, y;
2775
- i === null ? (y = c === null ? "1em" : c === "auto" ? h : c, g = vn(y, l / h)) : (g = i === "auto" ? l : i, y = c === null ? vn(g, h / l) : c === "auto" ? h : c);
2776
- const b = {}, _ = (T, v) => {
2777
- is(v) || (b[T] = v.toString());
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());
2778
2756
  };
2779
- _("width", g), _("height", y);
2780
- const k = [
2757
+ I("width", g), I("height", y);
2758
+ const S = [
2781
2759
  o.left,
2782
2760
  o.top,
2783
2761
  l,
2784
2762
  h
2785
2763
  ];
2786
- return b.viewBox = k.join(" "), {
2787
- attributes: b,
2788
- viewBox: k,
2764
+ return x.viewBox = S.join(" "), {
2765
+ attributes: x,
2766
+ viewBox: S,
2789
2767
  body: s
2790
2768
  };
2791
2769
  }
2792
- const cs = /\sid="(\S+)"/g, ds = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
2793
- let us = 0;
2794
- function fs(e, t = ds) {
2770
+ const ls = /\sid="(\S+)"/g, cs = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
2771
+ let ds = 0;
2772
+ function us(e, t = cs) {
2795
2773
  const r = [];
2796
2774
  let n;
2797
- for (; n = cs.exec(e); ) r.push(n[1]);
2775
+ for (; n = ls.exec(e); ) r.push(n[1]);
2798
2776
  if (!r.length) return e;
2799
2777
  const o = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
2800
2778
  return r.forEach((s) => {
2801
- const i = typeof t == "function" ? t(s) : t + (us++).toString(), c = s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
2779
+ const i = typeof t == "function" ? t(s) : t + (ds++).toString(), c = s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
2802
2780
  e = e.replace(new RegExp('([#;"])(' + c + ')([")]|\\.[a-z])', "g"), "$1" + i + o + "$3");
2803
2781
  }), e = e.replace(new RegExp(o, "g"), ""), e;
2804
2782
  }
2805
2783
  const Nr = /* @__PURE__ */ Object.create(null);
2806
- function ms(e, t) {
2784
+ function fs(e, t) {
2807
2785
  Nr[e] = t;
2808
2786
  }
2809
2787
  function Cr(e) {
2810
2788
  return Nr[e] || Nr[""];
2811
2789
  }
2812
- function $r(e) {
2790
+ function Lr(e) {
2813
2791
  let t;
2814
2792
  if (typeof e.resources == "string") t = [e.resources];
2815
2793
  else if (t = e.resources, !(t instanceof Array) || !t.length) return null;
@@ -2824,26 +2802,26 @@ function $r(e) {
2824
2802
  dataAfterTimeout: e.dataAfterTimeout !== !1
2825
2803
  };
2826
2804
  }
2827
- const Lr = /* @__PURE__ */ Object.create(null), jt = ["https://api.simplesvg.com", "https://api.unisvg.com"], Gt = [];
2828
- for (; jt.length > 0; ) jt.length === 1 || Math.random() > 0.5 ? Gt.push(jt.shift()) : Gt.push(jt.pop());
2829
- Lr[""] = $r({ resources: ["https://api.iconify.design"].concat(Gt) });
2830
- function ps(e, t) {
2831
- const r = $r(t);
2832
- return r === null ? !1 : (Lr[e] = r, !0);
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) });
2808
+ function ms(e, t) {
2809
+ const r = Lr(t);
2810
+ return r === null ? !1 : (zr[e] = r, !0);
2833
2811
  }
2834
- function zr(e) {
2835
- return Lr[e];
2812
+ function Dr(e) {
2813
+ return zr[e];
2836
2814
  }
2837
- const hs = () => {
2815
+ const ps = () => {
2838
2816
  let e;
2839
2817
  try {
2840
2818
  if (e = fetch, typeof e == "function") return e;
2841
2819
  } catch {
2842
2820
  }
2843
2821
  };
2844
- let kn = hs();
2845
- function gs(e, t) {
2846
- const r = zr(e);
2822
+ let Sn = ps();
2823
+ function hs(e, t) {
2824
+ const r = Dr(e);
2847
2825
  if (!r) return 0;
2848
2826
  let n;
2849
2827
  if (!r.maxURL) n = 0;
@@ -2857,11 +2835,11 @@ function gs(e, t) {
2857
2835
  }
2858
2836
  return n;
2859
2837
  }
2860
- function ws(e) {
2838
+ function gs(e) {
2861
2839
  return e === 404;
2862
2840
  }
2863
- const ys = (e, t, r) => {
2864
- const n = [], o = gs(e, t), s = "icons";
2841
+ const ws = (e, t, r) => {
2842
+ const n = [], o = hs(e, t), s = "icons";
2865
2843
  let i = {
2866
2844
  type: s,
2867
2845
  provider: e,
@@ -2877,19 +2855,19 @@ const ys = (e, t, r) => {
2877
2855
  }, c = l.length), i.icons.push(l);
2878
2856
  }), n.push(i), n;
2879
2857
  };
2880
- function bs(e) {
2858
+ function ys(e) {
2881
2859
  if (typeof e == "string") {
2882
- const t = zr(e);
2860
+ const t = Dr(e);
2883
2861
  if (t) return t.path;
2884
2862
  }
2885
2863
  return "/";
2886
2864
  }
2887
2865
  const xs = (e, t, r) => {
2888
- if (!kn) {
2866
+ if (!Sn) {
2889
2867
  r("abort", 424);
2890
2868
  return;
2891
2869
  }
2892
- let n = bs(t.provider);
2870
+ let n = ys(t.provider);
2893
2871
  switch (t.type) {
2894
2872
  case "icons": {
2895
2873
  const s = t.prefix, c = t.icons.join(","), l = new URLSearchParams({ icons: c });
@@ -2906,11 +2884,11 @@ const xs = (e, t, r) => {
2906
2884
  return;
2907
2885
  }
2908
2886
  let o = 503;
2909
- kn(e + n).then((s) => {
2887
+ Sn(e + n).then((s) => {
2910
2888
  const i = s.status;
2911
2889
  if (i !== 200) {
2912
2890
  setTimeout(() => {
2913
- r(ws(i) ? "abort" : "next", i);
2891
+ r(gs(i) ? "abort" : "next", i);
2914
2892
  });
2915
2893
  return;
2916
2894
  }
@@ -2928,8 +2906,8 @@ const xs = (e, t, r) => {
2928
2906
  }).catch(() => {
2929
2907
  r("next", o);
2930
2908
  });
2931
- }, vs = {
2932
- prepare: ys,
2909
+ }, bs = {
2910
+ prepare: ws,
2933
2911
  send: xs
2934
2912
  };
2935
2913
  function lo(e, t) {
@@ -2938,7 +2916,7 @@ function lo(e, t) {
2938
2916
  n && (r.loaderCallbacks = n.filter((o) => o.id !== t));
2939
2917
  });
2940
2918
  }
2941
- function ks(e) {
2919
+ function vs(e) {
2942
2920
  e.pendingCallbacksFlag || (e.pendingCallbacksFlag = !0, setTimeout(() => {
2943
2921
  e.pendingCallbacksFlag = !1;
2944
2922
  const t = e.loaderCallbacks ? e.loaderCallbacks.slice(0) : [];
@@ -2967,9 +2945,9 @@ function ks(e) {
2967
2945
  });
2968
2946
  }));
2969
2947
  }
2970
- let Ss = 0;
2971
- function Ns(e, t, r) {
2972
- const n = Ss++, o = lo.bind(null, r, n);
2948
+ let ks = 0;
2949
+ function Ss(e, t, r) {
2950
+ const n = ks++, o = lo.bind(null, r, n);
2973
2951
  if (!t.pending.length) return o;
2974
2952
  const s = {
2975
2953
  id: n,
@@ -2981,7 +2959,7 @@ function Ns(e, t, r) {
2981
2959
  (i.loaderCallbacks || (i.loaderCallbacks = [])).push(s);
2982
2960
  }), o;
2983
2961
  }
2984
- function Cs(e) {
2962
+ function Ns(e) {
2985
2963
  const t = {
2986
2964
  loaded: [],
2987
2965
  missing: [],
@@ -3007,7 +2985,7 @@ function Cs(e) {
3007
2985
  g.push(y);
3008
2986
  }), t;
3009
2987
  }
3010
- function Is(e, t = !0, r = !1) {
2988
+ function Cs(e, t = !0, r = !1) {
3011
2989
  const n = [];
3012
2990
  return e.forEach((o) => {
3013
2991
  const s = typeof o == "string" ? ar(o, t, r) : o;
@@ -3022,7 +3000,7 @@ const _s = {
3022
3000
  random: !1,
3023
3001
  dataAfterTimeout: !1
3024
3002
  };
3025
- function Ps(e, t, r, n) {
3003
+ function Is(e, t, r, n) {
3026
3004
  const o = e.resources.length, s = e.random ? Math.floor(Math.random() * o) : e.index;
3027
3005
  let i;
3028
3006
  if (e.random) {
@@ -3034,18 +3012,18 @@ function Ps(e, t, r, n) {
3034
3012
  i = i.concat(C);
3035
3013
  } else i = e.resources.slice(s).concat(e.resources.slice(0, s));
3036
3014
  const c = Date.now();
3037
- let l = "pending", h = 0, g, y = null, b = [], _ = [];
3038
- typeof n == "function" && _.push(n);
3039
- function k() {
3015
+ let l = "pending", h = 0, g, y = null, x = [], I = [];
3016
+ typeof n == "function" && I.push(n);
3017
+ function S() {
3040
3018
  y && (clearTimeout(y), y = null);
3041
3019
  }
3042
- function T() {
3043
- l === "pending" && (l = "aborted"), k(), b.forEach((C) => {
3020
+ function A() {
3021
+ l === "pending" && (l = "aborted"), S(), x.forEach((C) => {
3044
3022
  C.status === "pending" && (C.status = "aborted");
3045
- }), b = [];
3023
+ }), x = [];
3046
3024
  }
3047
- function v(C, K) {
3048
- K && (_ = []), typeof C == "function" && _.push(C);
3025
+ function k(C, K) {
3026
+ K && (I = []), typeof C == "function" && I.push(C);
3049
3027
  }
3050
3028
  function P() {
3051
3029
  return {
@@ -3053,24 +3031,24 @@ function Ps(e, t, r, n) {
3053
3031
  payload: t,
3054
3032
  status: l,
3055
3033
  queriesSent: h,
3056
- queriesPending: b.length,
3057
- subscribe: v,
3058
- abort: T
3034
+ queriesPending: x.length,
3035
+ subscribe: k,
3036
+ abort: A
3059
3037
  };
3060
3038
  }
3061
3039
  function J() {
3062
- l = "failed", _.forEach((C) => {
3040
+ l = "failed", I.forEach((C) => {
3063
3041
  C(void 0, g);
3064
3042
  });
3065
3043
  }
3066
- function R() {
3067
- b.forEach((C) => {
3044
+ function q() {
3045
+ x.forEach((C) => {
3068
3046
  C.status === "pending" && (C.status = "aborted");
3069
- }), b = [];
3047
+ }), x = [];
3070
3048
  }
3071
- function Y(C, K, ne) {
3049
+ function Y(C, K, te) {
3072
3050
  const ye = K !== "success";
3073
- switch (b = b.filter((xe) => xe !== C), l) {
3051
+ switch (x = x.filter((be) => be !== C), l) {
3074
3052
  case "pending":
3075
3053
  break;
3076
3054
  case "failed":
@@ -3080,29 +3058,29 @@ function Ps(e, t, r, n) {
3080
3058
  return;
3081
3059
  }
3082
3060
  if (K === "abort") {
3083
- g = ne, J();
3061
+ g = te, J();
3084
3062
  return;
3085
3063
  }
3086
3064
  if (ye) {
3087
- g = ne, b.length || (i.length ? Ie() : J());
3065
+ g = te, x.length || (i.length ? _e() : J());
3088
3066
  return;
3089
3067
  }
3090
- if (k(), R(), !e.random) {
3091
- const xe = e.resources.indexOf(C.resource);
3092
- xe !== -1 && xe !== e.index && (e.index = xe);
3068
+ if (S(), q(), !e.random) {
3069
+ const be = e.resources.indexOf(C.resource);
3070
+ be !== -1 && be !== e.index && (e.index = be);
3093
3071
  }
3094
- l = "completed", _.forEach((xe) => {
3095
- xe(ne);
3072
+ l = "completed", I.forEach((be) => {
3073
+ be(te);
3096
3074
  });
3097
3075
  }
3098
- function Ie() {
3076
+ function _e() {
3099
3077
  if (l !== "pending") return;
3100
- k();
3078
+ S();
3101
3079
  const C = i.shift();
3102
3080
  if (C === void 0) {
3103
- if (b.length) {
3081
+ if (x.length) {
3104
3082
  y = setTimeout(() => {
3105
- k(), l === "pending" && (R(), J());
3083
+ S(), l === "pending" && (q(), J());
3106
3084
  }, e.timeout);
3107
3085
  return;
3108
3086
  }
@@ -3112,13 +3090,13 @@ function Ps(e, t, r, n) {
3112
3090
  const K = {
3113
3091
  status: "pending",
3114
3092
  resource: C,
3115
- callback: (ne, ye) => {
3116
- Y(K, ne, ye);
3093
+ callback: (te, ye) => {
3094
+ Y(K, te, ye);
3117
3095
  }
3118
3096
  };
3119
- b.push(K), h++, y = setTimeout(Ie, e.rotate), r(C, t, K.callback);
3097
+ x.push(K), h++, y = setTimeout(_e, e.rotate), r(C, t, K.callback);
3120
3098
  }
3121
- return setTimeout(Ie), P;
3099
+ return setTimeout(_e), P;
3122
3100
  }
3123
3101
  function co(e) {
3124
3102
  const t = {
@@ -3130,8 +3108,8 @@ function co(e) {
3130
3108
  r = r.filter((c) => c().status === "pending");
3131
3109
  }
3132
3110
  function o(c, l, h) {
3133
- const g = Ps(t, c, l, (y, b) => {
3134
- n(), h && h(y, b);
3111
+ const g = Is(t, c, l, (y, x) => {
3112
+ n(), h && h(y, x);
3135
3113
  });
3136
3114
  return r.push(g), g;
3137
3115
  }
@@ -3148,12 +3126,12 @@ function co(e) {
3148
3126
  cleanup: n
3149
3127
  };
3150
3128
  }
3151
- function Sn() {
3129
+ function Nn() {
3152
3130
  }
3153
3131
  const pr = /* @__PURE__ */ Object.create(null);
3154
- function Fs(e) {
3132
+ function Ps(e) {
3155
3133
  if (!pr[e]) {
3156
- const t = zr(e);
3134
+ const t = Dr(e);
3157
3135
  if (!t) return;
3158
3136
  const r = co(t), n = {
3159
3137
  config: t,
@@ -3163,33 +3141,33 @@ function Fs(e) {
3163
3141
  }
3164
3142
  return pr[e];
3165
3143
  }
3166
- function Es(e, t, r) {
3144
+ function Fs(e, t, r) {
3167
3145
  let n, o;
3168
3146
  if (typeof e == "string") {
3169
3147
  const s = Cr(e);
3170
3148
  if (!s)
3171
- return r(void 0, 424), Sn;
3149
+ return r(void 0, 424), Nn;
3172
3150
  o = s.send;
3173
- const i = Fs(e);
3151
+ const i = Ps(e);
3174
3152
  i && (n = i.redundancy);
3175
3153
  } else {
3176
- const s = $r(e);
3154
+ const s = Lr(e);
3177
3155
  if (s) {
3178
3156
  n = co(s);
3179
3157
  const i = e.resources ? e.resources[0] : "", c = Cr(i);
3180
3158
  c && (o = c.send);
3181
3159
  }
3182
3160
  }
3183
- return !n || !o ? (r(void 0, 424), Sn) : n.query(t, o, r)().abort;
3161
+ return !n || !o ? (r(void 0, 424), Nn) : n.query(t, o, r)().abort;
3184
3162
  }
3185
- function Nn() {
3163
+ function Cn() {
3186
3164
  }
3187
- function Ts(e) {
3165
+ function Es(e) {
3188
3166
  e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
3189
- e.iconsLoaderFlag = !1, ks(e);
3167
+ e.iconsLoaderFlag = !1, vs(e);
3190
3168
  }));
3191
3169
  }
3192
- function As(e) {
3170
+ function Ts(e) {
3193
3171
  const t = [], r = [];
3194
3172
  return e.forEach((n) => {
3195
3173
  (n.match(oo) ? t : r).push(n);
@@ -3198,7 +3176,7 @@ function As(e) {
3198
3176
  invalid: r
3199
3177
  };
3200
3178
  }
3201
- function Ot(e, t, r) {
3179
+ function jt(e, t, r) {
3202
3180
  function n() {
3203
3181
  const o = e.pendingIcons;
3204
3182
  t.forEach((s) => {
@@ -3213,60 +3191,60 @@ function Ot(e, t, r) {
3213
3191
  } catch (o) {
3214
3192
  console.error(o);
3215
3193
  }
3216
- n(), Ts(e);
3194
+ n(), Es(e);
3217
3195
  }
3218
- function Cn(e, t) {
3196
+ function _n(e, t) {
3219
3197
  e instanceof Promise ? e.then((r) => {
3220
3198
  t(r);
3221
3199
  }).catch(() => {
3222
3200
  t(null);
3223
3201
  }) : t(e);
3224
3202
  }
3225
- function js(e, t) {
3203
+ function As(e, t) {
3226
3204
  e.iconsToLoad ? e.iconsToLoad = e.iconsToLoad.concat(t).sort() : e.iconsToLoad = t, e.iconsQueueFlag || (e.iconsQueueFlag = !0, setTimeout(() => {
3227
3205
  e.iconsQueueFlag = !1;
3228
3206
  const { provider: r, prefix: n } = e, o = e.iconsToLoad;
3229
3207
  if (delete e.iconsToLoad, !o || !o.length) return;
3230
3208
  const s = e.loadIcon;
3231
3209
  if (e.loadIcons && (o.length > 1 || !s)) {
3232
- Cn(e.loadIcons(o, n, r), (g) => {
3233
- Ot(e, o, g);
3210
+ _n(e.loadIcons(o, n, r), (g) => {
3211
+ jt(e, o, g);
3234
3212
  });
3235
3213
  return;
3236
3214
  }
3237
3215
  if (s) {
3238
3216
  o.forEach((g) => {
3239
3217
  const y = s(g, n, r);
3240
- Cn(y, (b) => {
3241
- const _ = b ? {
3218
+ _n(y, (x) => {
3219
+ const I = x ? {
3242
3220
  prefix: n,
3243
- icons: { [g]: b }
3221
+ icons: { [g]: x }
3244
3222
  } : null;
3245
- Ot(e, [g], _);
3223
+ jt(e, [g], I);
3246
3224
  });
3247
3225
  });
3248
3226
  return;
3249
3227
  }
3250
- const { valid: i, invalid: c } = As(o);
3251
- if (c.length && Ot(e, c, null), !i.length) return;
3228
+ const { valid: i, invalid: c } = Ts(o);
3229
+ if (c.length && jt(e, c, null), !i.length) return;
3252
3230
  const l = n.match(oo) ? Cr(r) : null;
3253
3231
  if (!l) {
3254
- Ot(e, i, null);
3232
+ jt(e, i, null);
3255
3233
  return;
3256
3234
  }
3257
3235
  l.prepare(r, n, i).forEach((g) => {
3258
- Es(r, g, (y) => {
3259
- Ot(e, g.icons, y);
3236
+ Fs(r, g, (y) => {
3237
+ jt(e, g.icons, y);
3260
3238
  });
3261
3239
  });
3262
3240
  }));
3263
3241
  }
3264
3242
  const Os = (e, t) => {
3265
- const r = Is(e, !0, ao()), n = Cs(r);
3243
+ const r = Cs(e, !0, ao()), n = Ns(r);
3266
3244
  if (!n.pending.length) {
3267
3245
  let l = !0;
3268
3246
  return t && setTimeout(() => {
3269
- l && t(n.loaded, n.missing, n.pending, Nn);
3247
+ l && t(n.loaded, n.missing, n.pending, Cn);
3270
3248
  }), () => {
3271
3249
  l = !1;
3272
3250
  };
@@ -3280,14 +3258,14 @@ const Os = (e, t) => {
3280
3258
  const y = o[h] || (o[h] = /* @__PURE__ */ Object.create(null));
3281
3259
  y[g] || (y[g] = []);
3282
3260
  }), n.pending.forEach((l) => {
3283
- const { provider: h, prefix: g, name: y } = l, b = vt(h, g), _ = b.pendingIcons || (b.pendingIcons = /* @__PURE__ */ new Set());
3284
- _.has(y) || (_.add(y), o[h][g].push(y));
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));
3285
3263
  }), s.forEach((l) => {
3286
3264
  const h = o[l.provider][l.prefix];
3287
- h.length && js(l, h);
3288
- }), t ? Ns(t, n, s) : Nn;
3265
+ h.length && As(l, h);
3266
+ }), t ? Ss(t, n, s) : Cn;
3289
3267
  };
3290
- function $s(e, t) {
3268
+ function js(e, t) {
3291
3269
  const r = { ...e };
3292
3270
  for (const n in t) {
3293
3271
  const o = t[n], s = typeof o;
@@ -3295,9 +3273,9 @@ function $s(e, t) {
3295
3273
  }
3296
3274
  return r;
3297
3275
  }
3298
- const Ls = /[\s,]+/;
3299
- function zs(e, t) {
3300
- t.split(Ls).forEach((r) => {
3276
+ const $s = /[\s,]+/;
3277
+ function Ls(e, t) {
3278
+ t.split($s).forEach((r) => {
3301
3279
  switch (r.trim()) {
3302
3280
  case "horizontal":
3303
3281
  e.hFlip = !0;
@@ -3308,7 +3286,7 @@ function zs(e, t) {
3308
3286
  }
3309
3287
  });
3310
3288
  }
3311
- function Ds(e, t = 0) {
3289
+ function zs(e, t = 0) {
3312
3290
  const r = e.replace(/^-?[0-9.]*/, "");
3313
3291
  function n(o) {
3314
3292
  for (; o < 0; ) o += 4;
@@ -3333,19 +3311,19 @@ function Ds(e, t = 0) {
3333
3311
  }
3334
3312
  return t;
3335
3313
  }
3336
- function Ms(e, t) {
3314
+ function Ds(e, t) {
3337
3315
  let r = e.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
3338
3316
  for (const n in t) r += " " + n + '="' + t[n] + '"';
3339
3317
  return '<svg xmlns="http://www.w3.org/2000/svg"' + r + ">" + e + "</svg>";
3340
3318
  }
3341
- function Bs(e) {
3319
+ function Ms(e) {
3342
3320
  return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
3343
3321
  }
3344
- function Us(e) {
3345
- return "data:image/svg+xml," + Bs(e);
3322
+ function Bs(e) {
3323
+ return "data:image/svg+xml," + Ms(e);
3346
3324
  }
3347
- function Rs(e) {
3348
- return 'url("' + Us(e) + '")';
3325
+ function Us(e) {
3326
+ return 'url("' + Bs(e) + '")';
3349
3327
  }
3350
3328
  let $t;
3351
3329
  function qs() {
@@ -3355,20 +3333,20 @@ function qs() {
3355
3333
  $t = null;
3356
3334
  }
3357
3335
  }
3358
- function Hs(e) {
3336
+ function Rs(e) {
3359
3337
  return $t === void 0 && qs(), $t ? $t.createHTML(e) : e;
3360
3338
  }
3361
3339
  const uo = {
3362
3340
  ...io,
3363
3341
  inline: !1
3364
- }, Vs = {
3342
+ }, Hs = {
3365
3343
  xmlns: "http://www.w3.org/2000/svg",
3366
3344
  xmlnsXlink: "http://www.w3.org/1999/xlink",
3367
3345
  "aria-hidden": !0,
3368
3346
  role: "img"
3369
- }, Ys = {
3347
+ }, Vs = {
3370
3348
  display: "inline-block"
3371
- }, Ir = {
3349
+ }, _r = {
3372
3350
  backgroundColor: "currentColor"
3373
3351
  }, fo = {
3374
3352
  backgroundColor: "transparent"
@@ -3376,43 +3354,43 @@ const uo = {
3376
3354
  Image: "var(--svg)",
3377
3355
  Repeat: "no-repeat",
3378
3356
  Size: "100% 100%"
3379
- }, _n = {
3380
- WebkitMask: Ir,
3381
- mask: Ir,
3357
+ }, Pn = {
3358
+ WebkitMask: _r,
3359
+ mask: _r,
3382
3360
  background: fo
3383
3361
  };
3384
- for (const e in _n) {
3385
- const t = _n[e];
3362
+ for (const e in Pn) {
3363
+ const t = Pn[e];
3386
3364
  for (const r in In)
3387
3365
  t[e + r] = In[r];
3388
3366
  }
3389
- const Js = {
3367
+ const Ys = {
3390
3368
  ...uo,
3391
3369
  inline: !0
3392
3370
  };
3393
- function Pn(e) {
3371
+ function Fn(e) {
3394
3372
  return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
3395
3373
  }
3396
- const Ks = (e, t, r) => {
3397
- const n = t.inline ? Js : uo, o = $s(n, t), s = t.mode || "svg", i = {}, c = t.style || {}, l = {
3398
- ...s === "svg" ? Vs : {}
3374
+ const Js = (e, t, r) => {
3375
+ const n = t.inline ? Ys : uo, o = js(n, t), s = t.mode || "svg", i = {}, c = t.style || {}, l = {
3376
+ ...s === "svg" ? Hs : {}
3399
3377
  };
3400
3378
  if (r) {
3401
- const v = ar(r, !1, !0);
3402
- if (v) {
3379
+ const k = ar(r, !1, !0);
3380
+ if (k) {
3403
3381
  const P = ["iconify"], J = [
3404
3382
  "provider",
3405
3383
  "prefix"
3406
3384
  ];
3407
- for (const R of J)
3408
- v[R] && P.push("iconify--" + v[R]);
3385
+ for (const q of J)
3386
+ k[q] && P.push("iconify--" + k[q]);
3409
3387
  l.className = P.join(" ");
3410
3388
  }
3411
3389
  }
3412
- for (let v in t) {
3413
- const P = t[v];
3390
+ for (let k in t) {
3391
+ const P = t[k];
3414
3392
  if (P !== void 0)
3415
- switch (v) {
3393
+ switch (k) {
3416
3394
  // Properties to ignore
3417
3395
  case "icon":
3418
3396
  case "style":
@@ -3428,17 +3406,17 @@ const Ks = (e, t, r) => {
3428
3406
  break;
3429
3407
  // Merge class names
3430
3408
  case "className":
3431
- l[v] = (l[v] ? l[v] + " " : "") + P;
3409
+ l[k] = (l[k] ? l[k] + " " : "") + P;
3432
3410
  break;
3433
3411
  // Boolean attributes
3434
3412
  case "inline":
3435
3413
  case "hFlip":
3436
3414
  case "vFlip":
3437
- o[v] = P === !0 || P === "true" || P === 1;
3415
+ o[k] = P === !0 || P === "true" || P === 1;
3438
3416
  break;
3439
3417
  // Flip as string: 'horizontal,vertical'
3440
3418
  case "flip":
3441
- typeof P == "string" && zs(o, P);
3419
+ typeof P == "string" && Ls(o, P);
3442
3420
  break;
3443
3421
  // Color: copy to style
3444
3422
  case "color":
@@ -3446,7 +3424,7 @@ const Ks = (e, t, r) => {
3446
3424
  break;
3447
3425
  // Rotation as string
3448
3426
  case "rotate":
3449
- typeof P == "string" ? o[v] = Ds(P) : typeof P == "number" && (o[v] = P);
3427
+ typeof P == "string" ? o[k] = zs(P) : typeof P == "number" && (o[k] = P);
3450
3428
  break;
3451
3429
  // Remove aria-hidden
3452
3430
  case "ariaHidden":
@@ -3455,37 +3433,37 @@ const Ks = (e, t, r) => {
3455
3433
  break;
3456
3434
  // Copy missing property if it does not exist in customisations
3457
3435
  default:
3458
- n[v] === void 0 && (l[v] = P);
3436
+ n[k] === void 0 && (l[k] = P);
3459
3437
  }
3460
3438
  }
3461
- const h = ls(e, o), g = h.attributes;
3439
+ const h = is(e, o), g = h.attributes;
3462
3440
  if (o.inline && (i.verticalAlign = "-0.125em"), s === "svg") {
3463
3441
  l.style = {
3464
3442
  ...i,
3465
3443
  ...c
3466
3444
  }, Object.assign(l, g);
3467
- let v = 0, P = t.id;
3445
+ let k = 0, P = t.id;
3468
3446
  return typeof P == "string" && (P = P.replace(/-/g, "_")), l.dangerouslySetInnerHTML = {
3469
- __html: Hs(fs(h.body, P ? () => P + "ID" + v++ : "iconifyReact"))
3447
+ __html: Rs(us(h.body, P ? () => P + "ID" + k++ : "iconifyReact"))
3470
3448
  }, hr("svg", l);
3471
3449
  }
3472
- const { body: y, width: b, height: _ } = e, k = s === "mask" || (s === "bg" ? !1 : y.indexOf("currentColor") !== -1), T = Ms(y, {
3450
+ const { body: y, width: x, height: I } = e, S = s === "mask" || (s === "bg" ? !1 : y.indexOf("currentColor") !== -1), A = Ds(y, {
3473
3451
  ...g,
3474
- width: b + "",
3475
- height: _ + ""
3452
+ width: x + "",
3453
+ height: I + ""
3476
3454
  });
3477
3455
  return l.style = {
3478
3456
  ...i,
3479
- "--svg": Rs(T),
3480
- width: Pn(g.width),
3481
- height: Pn(g.height),
3482
- ...Ys,
3483
- ...k ? Ir : fo,
3457
+ "--svg": Us(A),
3458
+ width: Fn(g.width),
3459
+ height: Fn(g.height),
3460
+ ...Vs,
3461
+ ...S ? _r : fo,
3484
3462
  ...c
3485
3463
  }, hr("span", l);
3486
3464
  };
3487
3465
  ao(!0);
3488
- ms("", vs);
3466
+ fs("", bs);
3489
3467
  if (typeof document < "u" && typeof window < "u") {
3490
3468
  const e = window;
3491
3469
  if (e.IconifyPreload !== void 0) {
@@ -3495,7 +3473,7 @@ if (typeof document < "u" && typeof window < "u") {
3495
3473
  // Check if item is an object and not null/array
3496
3474
  (typeof n != "object" || n === null || n instanceof Array || // Check for 'icons' and 'prefix'
3497
3475
  typeof n.icons != "object" || typeof n.prefix != "string" || // Add icon set
3498
- !ts(n)) && console.error(r);
3476
+ !es(n)) && console.error(r);
3499
3477
  } catch {
3500
3478
  console.error(r);
3501
3479
  }
@@ -3510,7 +3488,7 @@ if (typeof document < "u" && typeof window < "u") {
3510
3488
  const o = t[r];
3511
3489
  if (typeof o != "object" || !o || o.resources === void 0)
3512
3490
  continue;
3513
- ps(r, o) || console.error(n);
3491
+ ms(r, o) || console.error(n);
3514
3492
  } catch {
3515
3493
  console.error(n);
3516
3494
  }
@@ -3518,83 +3496,83 @@ if (typeof document < "u" && typeof window < "u") {
3518
3496
  }
3519
3497
  }
3520
3498
  function mo(e) {
3521
- const [t, r] = x(!!e.ssr), [n, o] = x({});
3522
- function s(_) {
3523
- if (_) {
3524
- const k = e.icon;
3525
- if (typeof k == "object")
3499
+ const [t, r] = b(!!e.ssr), [n, o] = b({});
3500
+ function s(I) {
3501
+ if (I) {
3502
+ const S = e.icon;
3503
+ if (typeof S == "object")
3526
3504
  return {
3527
3505
  name: "",
3528
- data: k
3506
+ data: S
3529
3507
  };
3530
- const T = xn(k);
3531
- if (T)
3508
+ const A = vn(S);
3509
+ if (A)
3532
3510
  return {
3533
- name: k,
3534
- data: T
3511
+ name: S,
3512
+ data: A
3535
3513
  };
3536
3514
  }
3537
3515
  return {
3538
3516
  name: ""
3539
3517
  };
3540
3518
  }
3541
- const [i, c] = x(s(!!e.ssr));
3519
+ const [i, c] = b(s(!!e.ssr));
3542
3520
  function l() {
3543
- const _ = n.callback;
3544
- _ && (_(), o({}));
3521
+ const I = n.callback;
3522
+ I && (I(), o({}));
3545
3523
  }
3546
- function h(_) {
3547
- if (JSON.stringify(i) !== JSON.stringify(_))
3548
- return l(), c(_), !0;
3524
+ function h(I) {
3525
+ if (JSON.stringify(i) !== JSON.stringify(I))
3526
+ return l(), c(I), !0;
3549
3527
  }
3550
3528
  function g() {
3551
- var _;
3552
- const k = e.icon;
3553
- if (typeof k == "object") {
3529
+ var I;
3530
+ const S = e.icon;
3531
+ if (typeof S == "object") {
3554
3532
  h({
3555
3533
  name: "",
3556
- data: k
3534
+ data: S
3557
3535
  });
3558
3536
  return;
3559
3537
  }
3560
- const T = xn(k);
3538
+ const A = vn(S);
3561
3539
  if (h({
3562
- name: k,
3563
- data: T
3540
+ name: S,
3541
+ data: A
3564
3542
  }))
3565
- if (T === void 0) {
3566
- const v = Os([k], g);
3543
+ if (A === void 0) {
3544
+ const k = Os([S], g);
3567
3545
  o({
3568
- callback: v
3546
+ callback: k
3569
3547
  });
3570
- } else T && ((_ = e.onLoad) === null || _ === void 0 || _.call(e, k));
3548
+ } else A && ((I = e.onLoad) === null || I === void 0 || I.call(e, S));
3571
3549
  }
3572
- be(() => (r(!0), l), []), be(() => {
3550
+ xe(() => (r(!0), l), []), xe(() => {
3573
3551
  t && g();
3574
3552
  }, [e.icon, t]);
3575
- const { name: y, data: b } = i;
3576
- return b ? Ks({
3577
- ...Or,
3578
- ...b
3553
+ const { name: y, data: x } = i;
3554
+ return x ? Js({
3555
+ ...$r,
3556
+ ...x
3579
3557
  }, e, y) : e.children ? e.children : e.fallback ? e.fallback : hr("span", {});
3580
3558
  }
3581
- const de = On((e, t) => mo({
3559
+ const ce = $n((e, t) => mo({
3582
3560
  ...e,
3583
3561
  _ref: t
3584
3562
  }));
3585
- On((e, t) => mo({
3563
+ $n((e, t) => mo({
3586
3564
  inline: !0,
3587
3565
  ...e,
3588
3566
  _ref: t
3589
3567
  }));
3590
- const ct = "USD", Ws = (e, t = ct) => {
3568
+ const xt = "USD", Ks = (e, t = xt) => {
3591
3569
  const r = (e == null ? void 0 : e.prices) ?? [];
3592
3570
  if (!r.length) return null;
3593
3571
  const n = (i) => {
3594
3572
  var h, g;
3595
3573
  const c = i.find((y) => {
3596
- var b;
3597
- return !!((b = y.discounted) != null && b.value);
3574
+ var x;
3575
+ return !!((x = y.discounted) != null && x.value);
3598
3576
  });
3599
3577
  if (c)
3600
3578
  return {
@@ -3611,21 +3589,21 @@ const ct = "USD", Ws = (e, t = ct) => {
3611
3589
  }
3612
3590
  ), s = n(o);
3613
3591
  return s || n(r) || null;
3614
- }, Qs = (e, t) => {
3592
+ }, Ws = (e, t) => {
3615
3593
  if (!Array.isArray(e)) return "";
3616
3594
  const r = e.find((n) => n.name === t) || e.find((n) => {
3617
3595
  var o;
3618
3596
  return ((o = n.name) == null ? void 0 : o.toLowerCase()) === t.toLowerCase();
3619
3597
  });
3620
3598
  return !r || !r.value ? "" : typeof r.value == "object" ? r.value.label || "" : r.value;
3621
- }, Gs = (e) => {
3599
+ }, Qs = (e) => {
3622
3600
  let t = "";
3623
3601
  if (Array.isArray(e)) {
3624
3602
  const r = e.find((n) => n.name === "size") || e.find((n) => n.name === "Size");
3625
3603
  r && r.value && (t = typeof r.value == "object" ? r.value.label || "" : r.value);
3626
3604
  }
3627
3605
  return { sizeLabel: t };
3628
- }, gt = (e) => Qs((e == null ? void 0 : e.attributesRaw) ?? [], "color"), wt = (e) => Gs((e == null ? void 0 : e.attributesRaw) ?? []).sizeLabel, Ze = (e) => e.charAt(0).toUpperCase() + e.slice(1), yt = {
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 = {
3629
3607
  standard: {
3630
3608
  label: "Standard Delivery",
3631
3609
  fee: 0,
@@ -3644,11 +3622,11 @@ const ct = "USD", Ws = (e, t = ct) => {
3644
3622
  subtitle: "Available in select locations (+$10)",
3645
3623
  icon: "mdi:truck-fast-outline"
3646
3624
  }
3647
- }, Xs = {
3625
+ }, Gs = {
3648
3626
  standard: "GROUND",
3649
3627
  express: "2-DAY SHIPPING",
3650
3628
  sameday: "OVERNIGHT"
3651
- }, et = (e, t) => {
3629
+ }, st = (e, t) => {
3652
3630
  try {
3653
3631
  return e.toLocaleString("en-US", {
3654
3632
  style: "currency",
@@ -3657,41 +3635,41 @@ const ct = "USD", Ws = (e, t = ct) => {
3657
3635
  } catch {
3658
3636
  return `${t} ${e.toFixed(2)}`;
3659
3637
  }
3660
- }, po = (e) => e == null ? void 0 : e.masterVariant, Fn = (e) => Array.isArray(e == null ? void 0 : e.variants) ? e.variants : [], Xt = (e) => {
3638
+ }, po = (e) => e == null ? void 0 : e.masterVariant, En = (e) => Array.isArray(e == null ? void 0 : e.variants) ? e.variants : [], Xt = (e) => {
3661
3639
  const t = po(e);
3662
- return t ? [t, ...Fn(e)] : Fn(e);
3663
- }, Zs = (e, t = 0) => Xt(e)[t], ei = (e) => {
3640
+ return t ? [t, ...En(e)] : En(e);
3641
+ }, Xs = (e, t = 0) => Xt(e)[t], Zs = (e) => {
3664
3642
  var t, r;
3665
3643
  return ((r = (t = e == null ? void 0 : e.images) == null ? void 0 : t[0]) == null ? void 0 : r.url) ?? "";
3666
- }, En = (e, t) => {
3644
+ }, Tn = (e, t) => {
3667
3645
  var r, n, o, s, i, c, l, h;
3668
- return ei(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) || "";
3669
- }, Tn = (e) => (e == null ? void 0 : e.name) || (e == null ? void 0 : e.title) || (e == null ? void 0 : e.productName) || "any", Zt = (e) => {
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) => {
3670
3648
  var s, i, c, l, h, g;
3671
- const t = e ? Ws(e, ct) : null;
3649
+ const t = e ? Ks(e, xt) : null;
3672
3650
  if (t != null && t.cent && (t != null && t.cur))
3673
3651
  return {
3674
3652
  amount: +(t.cent / 100),
3675
3653
  currency: t.cur,
3676
3654
  regularAmount: t.regularCent ? t.regularCent / 100 : void 0
3677
3655
  };
3678
- 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) ?? ct;
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;
3679
3657
  return { amount: Number.isFinite(r) ? +(Number(r) / 100) : 0, currency: n };
3680
- }, An = (e, t) => {
3658
+ }, On = (e, t) => {
3681
3659
  const { amount: r } = Zt(t);
3682
3660
  if (r) return r;
3683
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);
3684
3662
  return Number.isFinite(o) ? o : 0;
3685
- }, ti = (e) => {
3663
+ }, ei = (e) => {
3686
3664
  var t;
3687
3665
  return (e == null ? void 0 : e.sku) || ((t = e == null ? void 0 : e.variant) == null ? void 0 : t.sku) || (e == null ? void 0 : e.selectedSku) || "";
3688
- }, ri = (e) => {
3666
+ }, ti = (e) => {
3689
3667
  var t;
3690
3668
  return (e == null ? void 0 : e.color) || (e == null ? void 0 : e.selectedColor) || ((t = e == null ? void 0 : e.variant) == null ? void 0 : t.color) || "";
3691
- }, ni = (e) => {
3669
+ }, ri = (e) => {
3692
3670
  var t;
3693
3671
  return (e == null ? void 0 : e.size) || (e == null ? void 0 : e.selectedSize) || ((t = e == null ? void 0 : e.variant) == null ? void 0 : t.size) || "";
3694
- }, jn = 20, ki = ({
3672
+ }, jn = 20, vi = ({
3695
3673
  open: e,
3696
3674
  onClose: t,
3697
3675
  product: r,
@@ -3703,94 +3681,94 @@ const ct = "USD", Ws = (e, t = ct) => {
3703
3681
  const h = Xt(r), g = Math.min(
3704
3682
  Math.max(0, n || 0),
3705
3683
  Math.max(0, h.length - 1)
3706
- ), [y, b] = x([]), [_, k] = x(0), [T, v] = x([]);
3707
- be(() => {
3684
+ ), [y, x] = b([]), [I, S] = b(0), [A, k] = b([]);
3685
+ xe(() => {
3708
3686
  if (r != null && r.variants) {
3709
3687
  const u = P(
3710
3688
  r.variants,
3711
3689
  r.imageGroups,
3712
3690
  i
3713
3691
  );
3714
- b(u);
3692
+ x(u);
3715
3693
  }
3716
3694
  }, [r]);
3717
3695
  const P = (u, m, f) => {
3718
- const { colorMap: w, sizeMap: N } = J(f), O = {};
3696
+ const { colorMap: w, sizeMap: v } = J(f), j = {};
3719
3697
  m == null || m.forEach((E) => {
3720
- var ce, Pe, De;
3721
- const U = (ce = E.variationAttributes) == null ? void 0 : ce.find(
3722
- (Me) => Me.id === "color"
3723
- ), A = (De = (Pe = U == null ? void 0 : U.values) == null ? void 0 : Pe[0]) == null ? void 0 : De.value;
3724
- A && (O[A] || (O[A] = {}), O[A][E.viewType] = E.images);
3698
+ var ie, Pe, ze;
3699
+ const M = (ie = E.variationAttributes) == null ? void 0 : ie.find(
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);
3725
3703
  });
3726
- const H = u.reduce((E, U) => {
3727
- const A = U.variationValues.color, ce = U.variationValues.size;
3728
- return E[A] || (E[A] = {
3729
- color: A,
3730
- name: w[A] || A,
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,
3731
3709
  // ✅ DISPLAY NAME
3732
- images: O[A] || {},
3710
+ images: j[T] || {},
3733
3711
  variants: []
3734
- }), E[A].variants.push({
3735
- size: ce,
3736
- name: N[ce] || ce,
3712
+ }), E[T].variants.push({
3713
+ size: ie,
3714
+ name: v[ie] || ie,
3737
3715
  // ✅ DISPLAY NAME
3738
- ...U
3716
+ ...M
3739
3717
  }), E;
3740
3718
  }, {});
3741
- return Object.values(H).sort((E, U) => {
3742
- const A = E.colorName || E.color || "", ce = U.colorName || U.color || "";
3743
- return A.localeCompare(ce);
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);
3744
3722
  }).map((E) => ({
3745
3723
  ...E,
3746
3724
  variants: E.variants.sort(
3747
- (U, A) => Number(U.size) - Number(A.size)
3725
+ (M, T) => Number(M.size) - Number(T.size)
3748
3726
  )
3749
3727
  }));
3750
3728
  }, J = (u) => {
3751
3729
  const m = {}, f = {};
3752
3730
  return u == null || u.forEach((w) => {
3753
- w.id === "color" && w.values.forEach((N) => {
3754
- m[N.value] = N.name;
3755
- }), w.id === "size" && w.values.forEach((N) => {
3756
- f[N.value] = N.name;
3731
+ w.id === "color" && w.values.forEach((v) => {
3732
+ m[v.value] = v.name;
3733
+ }), w.id === "size" && w.values.forEach((v) => {
3734
+ f[v.value] = v.name;
3757
3735
  });
3758
3736
  }), { colorMap: m, sizeMap: f };
3759
- }, R = h.length, [Y, Ie] = x(g), [C, K] = x(null), [ne, ye] = x(null), xe = Ye(null), dt = Ye(null), S = Zs(r, Y), [ve, V] = x(""), [$, Ge] = x(""), [ut, qe] = x(!1), [nt, fe] = x(!1), [_e, $e] = x(!1), [z, Te] = x(""), [Se, oe] = x(!1), [X, kt] = x(null), [p, j] = x([]), [M, Q] = x([]), [B, L] = x([]), [W, Z] = x(!1), [q, ae] = x(), [Le, He] = x(!0), [G, me] = x(!1), [Ne, pe] = x(!1), [he, I] = x("standard"), [ee, D] = x(!1), [se, ie] = x(!1), [Ae, St] = x("card"), [je, le] = x(!1), [Nt, Ce] = x(!1), [F, te] = x(!1), [Ct, It] = x(null), [Mt, Dr] = x(null), [sr, Mr] = x(""), [Br, Ur] = x(!1), [_t, ho] = x(r == null ? void 0 : r.id), Bt = Ye(null);
3760
- be(() => {
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);
3738
+ xe(() => {
3761
3739
  const u = Xt(r), m = Math.min(
3762
3740
  Math.max(0, n || 0),
3763
3741
  Math.max(0, u.length - 1)
3764
3742
  );
3765
- Ie(m);
3766
- const f = po(r), w = gt(f), N = wt(f);
3767
- xe.current = w || null, dt.current = N || null, K(w || null), ye(N || null);
3768
- }, [n, r]), be(() => {
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);
3746
+ }, [n, r]), xe(() => {
3769
3747
  Bt.current && (Bt.current.scrollTop = Bt.current.scrollHeight);
3770
3748
  }, [
3771
3749
  p,
3772
3750
  W,
3773
3751
  G,
3774
3752
  Ne,
3775
- ee,
3776
- se,
3777
- je,
3753
+ Z,
3754
+ oe,
3755
+ Oe,
3778
3756
  Nt,
3779
3757
  F,
3780
- ut,
3781
- nt
3758
+ dt,
3759
+ rt
3782
3760
  ]);
3783
- const ft = "var(--tanya)", Rr = "var(--tanya-contrast)", Ut = ft, ze = "#804c9e", go = () => {
3761
+ const ut = "var(--tanya)", Rr = "var(--tanya-contrast)", Ut = ut, Le = "#804c9e", go = () => {
3784
3762
  console.log("AgenticShopping feedback:", {
3785
3763
  rating: Mt,
3786
3764
  comment: sr
3787
- }), Ur(!0);
3765
+ }), qr(!0);
3788
3766
  }, wo = () => {
3789
- Dr(null), Mr(""), Ur(!0);
3790
- }, qr = (u) => {
3767
+ Mr(null), Br(""), qr(!0);
3768
+ }, Hr = (u) => {
3791
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;
3792
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: [
3793
- /* @__PURE__ */ a("div", { className: "success-tick-animation", children: /* @__PURE__ */ a(de, { icon: "mdi:check-circle", width: "28", color: "#16a34a" }) }),
3771
+ /* @__PURE__ */ a("div", { className: "success-tick-animation", children: /* @__PURE__ */ a(ce, { icon: "mdi:check-circle", width: "28", color: "#16a34a" }) }),
3794
3772
  /* @__PURE__ */ d("div", { className: "text-sm w-full", children: [
3795
3773
  /* @__PURE__ */ a("div", { className: "font-semibold", children: "Success!" }),
3796
3774
  /* @__PURE__ */ a("div", { children: "Your smart order has been saved. I’ll watch the price and auto-purchase when the conditions are met." }),
@@ -3804,17 +3782,17 @@ const ct = "USD", Ws = (e, t = ct) => {
3804
3782
  }
3805
3783
  )
3806
3784
  ] }),
3807
- !Br && /* @__PURE__ */ d("div", { className: "mt-4 rounded-lg bg-white/70 p-3 text-gray-900", children: [
3785
+ !Ur && /* @__PURE__ */ d("div", { className: "mt-4 rounded-lg bg-white/70 p-3 text-gray-900", children: [
3808
3786
  /* @__PURE__ */ a("h4", { className: "font-semibold mb-1", children: "Please post your feedback here" }),
3809
3787
  /* @__PURE__ */ a("p", { className: "text-sm text-gray-700 mb-3", children: "Rate us on how much our response was helpful" }),
3810
3788
  /* @__PURE__ */ a("div", { className: "flex items-center gap-1 mb-3", children: [1, 2, 3, 4, 5].map((w) => /* @__PURE__ */ a(
3811
3789
  "button",
3812
3790
  {
3813
3791
  type: "button",
3814
- onClick: () => Dr(w),
3792
+ onClick: () => Mr(w),
3815
3793
  className: "p-0.5",
3816
3794
  children: /* @__PURE__ */ a(
3817
- de,
3795
+ ce,
3818
3796
  {
3819
3797
  icon: Mt && Mt >= w ? "mdi:star" : "mdi:star-outline",
3820
3798
  width: "20",
@@ -3829,7 +3807,7 @@ const ct = "USD", Ws = (e, t = ct) => {
3829
3807
  "textarea",
3830
3808
  {
3831
3809
  value: sr,
3832
- onChange: (w) => Mr(w.target.value),
3810
+ onChange: (w) => Br(w.target.value),
3833
3811
  rows: 3,
3834
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",
3835
3813
  placeholder: "Your feedback helps us improve..."
@@ -3851,14 +3829,14 @@ const ct = "USD", Ws = (e, t = ct) => {
3851
3829
  type: "button",
3852
3830
  onClick: go,
3853
3831
  className: "px-4 py-2 rounded-full text-sm font-semibold text-white shadow",
3854
- style: { background: ft },
3832
+ style: { background: ut },
3855
3833
  disabled: !Mt && !sr.trim(),
3856
3834
  children: "Submit"
3857
3835
  }
3858
3836
  )
3859
3837
  ] })
3860
3838
  ] }),
3861
- Br && /* @__PURE__ */ a("div", { className: "mt-3 text-xs text-green-900 font-medium", children: "Thanks for your feedback! 💚" })
3839
+ Ur && /* @__PURE__ */ a("div", { className: "mt-3 text-xs text-green-900 font-medium", children: "Thanks for your feedback! 💚" })
3862
3840
  ] })
3863
3841
  ] }) : null;
3864
3842
  }, yo = async () => {
@@ -3869,20 +3847,20 @@ const ct = "USD", Ws = (e, t = ct) => {
3869
3847
  );
3870
3848
  let m = (u == null ? void 0 : u.basketId) || localStorage.getItem(Lt);
3871
3849
  if (!m) {
3872
- const f = await ua();
3873
- m = (f == null ? void 0 : f.basket_id) || f.basketId;
3850
+ const f = await Ge(), w = "Bearer " + (f == null ? void 0 : f.access_token), v = await Ir(w);
3851
+ m = (v == null ? void 0 : v.basket_id) || v.basketId;
3874
3852
  }
3875
- bo(m), V(m);
3853
+ xo(m), V(m);
3876
3854
  } catch (u) {
3877
3855
  console.error("Error fetching addresses:", u);
3878
3856
  }
3879
- }, bo = async (u) => {
3880
- const m = await fa(u);
3881
- console.log(m, "shipping methods"), v(m);
3857
+ }, xo = async (u) => {
3858
+ const m = await ua(u);
3859
+ console.log(m, "shipping methods"), k(m);
3882
3860
  };
3883
3861
  console.log(ve, "the basket id");
3884
3862
  const Pt = (u, m) => {
3885
- j((f) => [
3863
+ O((f) => [
3886
3864
  ...f,
3887
3865
  {
3888
3866
  query: "",
@@ -3891,8 +3869,8 @@ const ct = "USD", Ws = (e, t = ct) => {
3891
3869
  snapshotPayload: m
3892
3870
  }
3893
3871
  ]);
3894
- }, Hr = (u, m) => {
3895
- j(
3872
+ }, Vr = (u, m) => {
3873
+ O(
3896
3874
  (f) => f.map(
3897
3875
  (w) => w.response === "__CARD__" ? {
3898
3876
  ...w,
@@ -3902,44 +3880,44 @@ const ct = "USD", Ws = (e, t = ct) => {
3902
3880
  } : w
3903
3881
  )
3904
3882
  );
3905
- }, xo = () => {
3906
- j(
3883
+ }, bo = () => {
3884
+ O(
3907
3885
  (u) => u.filter(
3908
3886
  (m) => !(m.query === "" && m.response !== "__SNAPSHOT__" && m.response !== "__TEXT__")
3909
3887
  )
3910
3888
  );
3911
- }, Rt = () => {
3912
- Ce(!1), Z(!1), pe(!1), ie(!1), me(!1), D(!1), le(!1), te(!1), oe(!1), kt(null), xo(), qe(!1), fe(!1);
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);
3913
3891
  }, vo = () => {
3914
- Z(!1), me(!1), pe(!1), I("standard"), D(!1), ie(!1), St("card"), le(!1), Ce(!1), te(!1), He(!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");
3915
- }, qt = Zr(() => Xt(r).map((m, f) => ({
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) => ({
3916
3894
  index: f,
3917
3895
  variant: m,
3918
3896
  images: ((m == null ? void 0 : m.images) || []).map((w) => (w == null ? void 0 : w.url) || "").filter(Boolean)
3919
- })), [r]), Ft = Zr(() => qt.length ? !!((C || void 0) && (ne || void 0)) : !1, [qt, C, ne, S]), ko = _e || Se || !Ft, Et = (u) => {
3897
+ })), [r]), Ft = en(() => Rt.length ? !!((C || void 0) && (te || void 0)) : !1, [Rt, C, te, N]), ko = Ie || Se || !Ft, Et = (u) => {
3920
3898
  const m = Number((u == null ? void 0 : u.quantity) ?? 1);
3921
3899
  return Number.isFinite(m) && m > 0 ? m : 1;
3922
- }, Vr = (u) => {
3923
- const m = Et(u), f = Number((u == null ? void 0 : u.max_price_minor) ?? 0);
3924
- return Number.isFinite(f) && f > 0 ? +(f / 100) : +(An(r, S) * m);
3925
3900
  }, Yr = (u) => {
3901
+ const m = Et(u), f = Number((u == null ? void 0 : u.max_price_minor) ?? 0);
3902
+ return Number.isFinite(f) && f > 0 ? +(f / 100) : +(On(r, N) * m);
3903
+ }, Jr = (u) => {
3926
3904
  var E;
3927
- const m = X, f = Zt(S), w = u || (m == null ? void 0 : m.currency) || f.currency || ct, N = Vr(m), O = +(N * 0.08).toFixed(2), H = ((E = yt[he]) == null ? void 0 : E.fee) || 0;
3928
- return { product_total: N, tax: O, shipping_fee: H, currency: w };
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;
3906
+ return { product_total: v, tax: j, shipping_fee: H, currency: w };
3929
3907
  }, ir = async (u, m, f) => {
3930
- Hr(), vo(), $e(!0), oe(!0), qe(!1), fe(!1);
3931
- const w = M.slice(-jn);
3908
+ Vr(), vo(), je(!0), re(!0), qe(!1), ue(!1);
3909
+ const w = B.slice(-jn);
3932
3910
  try {
3933
- const N = await wr(null, null);
3934
- if (!N) throw new Error("Failed to fetch token");
3935
- const O = localStorage.getItem("customerNumber"), H = localStorage.getItem("isLoggedIn"), U = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
3911
+ const v = await wr(null, null);
3912
+ if (!v) throw new Error("Failed to fetch token");
3913
+ const j = localStorage.getItem("customerNumber"), H = localStorage.getItem("isLoggedIn"), M = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
3936
3914
  registered: String(H || !1),
3937
- userId: String(O || (/* @__PURE__ */ new Date()).getTime())
3938
- }).toString()}`, A = await fetch(`${U}`, {
3915
+ userId: String(j || (/* @__PURE__ */ new Date()).getTime())
3916
+ }).toString()}`, T = await fetch(`${M}`, {
3939
3917
  method: "POST",
3940
3918
  headers: {
3941
3919
  "Content-Type": "application/json",
3942
- Authorization: `Bearer ${N}`
3920
+ Authorization: `Bearer ${v}`
3943
3921
  },
3944
3922
  body: JSON.stringify({
3945
3923
  flowId: "MTMI0P4LC6",
@@ -3955,38 +3933,38 @@ const ct = "USD", Ws = (e, t = ct) => {
3955
3933
  }
3956
3934
  })
3957
3935
  });
3958
- if (!A.body) throw new Error("Readable stream not supported");
3959
- const ce = A.body.getReader(), Pe = new TextDecoder();
3960
- let De = "", Me = "", ot = "";
3936
+ if (!T.body) throw new Error("Readable stream not supported");
3937
+ const ie = T.body.getReader(), Pe = new TextDecoder();
3938
+ let ze = "", De = "", nt = "";
3961
3939
  for (; ; ) {
3962
- const { done: Ee, value: Xe } = await ce.read();
3940
+ const { done: Ee, value: Ke } = await ie.read();
3963
3941
  if (Ee) break;
3964
- De += Pe.decode(Xe, { stream: !0 });
3965
- const mt = De.split(`
3942
+ ze += Pe.decode(Ke, { stream: !0 });
3943
+ const ft = ze.split(`
3966
3944
  `);
3967
- De = mt.pop() || "";
3968
- for (const pt of mt) {
3969
- if (!pt.startsWith("data:")) continue;
3970
- const at = pt.slice(5).trim();
3945
+ ze = ft.pop() || "";
3946
+ for (const mt of ft) {
3947
+ if (!mt.startsWith("data:")) continue;
3948
+ const ot = mt.slice(5).trim();
3971
3949
  try {
3972
- const Ve = JSON.parse(at), Be = Ve.index, ge = Ve.data;
3973
- Be === 0 ? Me = String(ge ?? "") : Be === 1 && (ot = String(ge ?? ""));
3974
- } catch (Ve) {
3975
- console.error("Error parsing JSON chunk:", Ve);
3950
+ const He = JSON.parse(ot), Me = He.index, ge = He.data;
3951
+ Me === 0 ? De = String(ge ?? "") : Me === 1 && (nt = String(ge ?? ""));
3952
+ } catch (He) {
3953
+ console.error("Error parsing JSON chunk:", He);
3976
3954
  }
3977
3955
  }
3978
3956
  }
3979
3957
  let Fe = null;
3980
- if (Me) {
3981
- const Ee = String(Me).replace(/\\n/g, "").trim();
3958
+ if (De) {
3959
+ const Ee = String(De).replace(/\\n/g, "").trim();
3982
3960
  if (Ee.startsWith("{") && Ee.endsWith("}"))
3983
3961
  try {
3984
3962
  Fe = JSON.parse(Ee), Fe.product_id = m, Fe.sku_id = m, localStorage.setItem("agentic_order", JSON.stringify(Fe));
3985
- } catch (Xe) {
3986
- console.log(Xe);
3963
+ } catch (Ke) {
3964
+ console.log(Ke);
3987
3965
  }
3988
3966
  }
3989
- kt(Fe), Fe && j((Ee) => [
3967
+ kt(Fe), Fe && O((Ee) => [
3990
3968
  ...Ee,
3991
3969
  {
3992
3970
  query: "",
@@ -3997,57 +3975,57 @@ const ct = "USD", Ws = (e, t = ct) => {
3997
3975
  ...Ee,
3998
3976
  {
3999
3977
  userQuery: u,
4000
- mainResponse: Me || "",
4001
- keywords: ot || ""
3978
+ mainResponse: De || "",
3979
+ keywords: nt || ""
4002
3980
  }
4003
3981
  ].slice(-jn));
4004
- } catch (N) {
4005
- console.error("Error sending message to Tanya:", N), oe(!1);
3982
+ } catch (v) {
3983
+ console.error("Error sending message to Tanya:", v), re(!1);
4006
3984
  } finally {
4007
- $e(!1);
3985
+ je(!1);
4008
3986
  }
4009
- }, Jr = async (u) => {
4010
- if (Se || _e || !Ft) return;
3987
+ }, Kr = async (u) => {
3988
+ if (Se || Ie || !Ft) return;
4011
3989
  const m = z.trim();
4012
3990
  if (!m) return;
4013
- j((w) => [...w, { query: m, response: "" }]), Te(""), Ge(m);
4014
- const f = _t || "";
4015
- if (R <= 1) {
3991
+ O((w) => [...w, { query: m, response: "" }]), Te(""), Je(m);
3992
+ const f = It || "";
3993
+ if (q <= 1) {
4016
3994
  if (f) {
4017
3995
  ir(m, f, Y);
4018
3996
  return;
4019
3997
  }
4020
- fe(!0), oe(!0);
3998
+ ue(!0), re(!0);
4021
3999
  return;
4022
4000
  }
4023
- f ? (qe(!0), oe(!0)) : (fe(!0), oe(!0));
4001
+ f ? (qe(!0), re(!0)) : (ue(!0), re(!0));
4024
4002
  }, So = () => {
4025
- const u = _t;
4003
+ const u = It;
4026
4004
  u && ir($, u, Y);
4027
4005
  }, No = () => {
4028
- qe(!1), fe(!0), oe(!0);
4006
+ qe(!1), ue(!0), re(!0);
4029
4007
  }, Co = () => {
4030
- if (!_t) return;
4031
- ir($, _t, Y);
4032
- }, Io = async () => {
4033
- Z(!0), pe(!1), ie(!1), Ce(!1), me(!1), D(!1), le(!1), te(!1), await yo(), console.log("calling"), Hr("initial", {
4034
- extractedDetails: X ?? void 0
4008
+ if (!It) return;
4009
+ ir($, It, Y);
4010
+ }, _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
4035
4013
  });
4036
- }, _o = () => {
4037
- if (!q) return;
4038
- const u = B.find(
4039
- (m) => String(m.addressId ?? m.id) === q
4014
+ }, Io = () => {
4015
+ if (!R) return;
4016
+ const u = U.find(
4017
+ (m) => String(m.addressId ?? m.id) === R
4040
4018
  ) || null;
4041
- u && (localStorage.setItem("agentic_order_address", JSON.stringify(u)), me(!0), pe(!0), D(!1), ie(!1), le(!1), Ce(!1), te(!1), Pt("address", u));
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));
4042
4020
  }, Po = () => {
4043
- me(!1), pe(!1), D(!1), ie(!1), le(!1), Ce(!1), te(!1), localStorage.removeItem("agentic_order_address");
4021
+ me(!1), pe(!1), D(!1), ae(!1), se(!1), Ce(!1), ee(!1), localStorage.removeItem("agentic_order_address");
4044
4022
  }, Fo = () => {
4045
- he && (localStorage.setItem("agentic_order_delivery", he), D(!0), ie(!0), le(!1), Ce(!1), te(!1), Pt("delivery", {
4023
+ he && (localStorage.setItem("agentic_order_delivery", he), D(!0), ae(!0), se(!1), Ce(!1), ee(!1), Pt("delivery", {
4046
4024
  method: he,
4047
- ...yt[he]
4025
+ ...wt[he]
4048
4026
  }));
4049
- }, Kr = () => {
4050
- pe(!1), D(!1), ie(!1), le(!1), Ce(!1), te(!1), oe(!1), Rt(), j((u) => [
4027
+ }, Wr = () => {
4028
+ pe(!1), D(!1), ae(!1), se(!1), Ce(!1), ee(!1), re(!1), qt(), O((u) => [
4051
4029
  ...u,
4052
4030
  {
4053
4031
  query: "",
@@ -4058,11 +4036,11 @@ const ct = "USD", Ws = (e, t = ct) => {
4058
4036
  }
4059
4037
  ]);
4060
4038
  }, Eo = () => {
4061
- D(!1), ie(!1), le(!1), Ce(!1), te(!1), localStorage.removeItem("agentic_order_delivery");
4039
+ D(!1), ae(!1), se(!1), Ce(!1), ee(!1), localStorage.removeItem("agentic_order_delivery");
4062
4040
  }, To = () => {
4063
- Ae && (localStorage.setItem("agentic_order_payment", Ae), le(!0), Ce(!0), te(!1), Pt("payment", { method: Ae }));
4041
+ Ae && (localStorage.setItem("agentic_order_payment", Ae), se(!0), Ce(!0), ee(!1), Pt("payment", { method: Ae }));
4064
4042
  }, Ao = () => {
4065
- ie(!1), le(!1), Ce(!1), te(!1), oe(!1), Rt(), j((u) => [
4043
+ ae(!1), se(!1), Ce(!1), ee(!1), re(!1), qt(), O((u) => [
4066
4044
  ...u,
4067
4045
  {
4068
4046
  query: "",
@@ -4072,81 +4050,81 @@ const ct = "USD", Ws = (e, t = ct) => {
4072
4050
  }
4073
4051
  }
4074
4052
  ]);
4075
- }, jo = () => {
4076
- le(!1), Ce(!1), te(!1), localStorage.removeItem("agentic_order_payment");
4077
- }, Oo = async () => {
4053
+ }, Oo = () => {
4054
+ se(!1), Ce(!1), ee(!1), localStorage.removeItem("agentic_order_payment");
4055
+ }, jo = async () => {
4078
4056
  try {
4079
- $e(!0);
4080
- const u = X || {}, m = JSON.parse(
4057
+ je(!0);
4058
+ const u = fe || {}, m = JSON.parse(
4081
4059
  localStorage.getItem("agentic_order_address") || "null"
4082
4060
  ), f = localStorage.getItem(
4083
4061
  "agentic_order_delivery"
4084
- ), w = localStorage.getItem("agentic_order_payment") || "card", { product_total: N, tax: O, shipping_fee: H, currency: E } = Yr(), U = u.shopper_id || localStorage.getItem("customerId") || void 0, A = (m == null ? void 0 : m.addressId) || (m == null ? void 0 : m.id) || void 0, ce = f ? Xs[f] : "GROUND", Pe = "card-visa", De = S == null ? void 0 : S.sku, Me = (r == null ? void 0 : r.id) || "", ot = Et(u), Fe = typeof u.max_price_minor == "number" ? u.max_price_minor : Math.round(N * 100), mt = {
4085
- shopper_id: U,
4086
- shipping_address_id: A,
4087
- shipping_method_id: ce,
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 = {
4063
+ shopper_id: M,
4064
+ shipping_address_id: T,
4065
+ shipping_method_id: ie,
4088
4066
  payment_method_id: Pe,
4089
- sku: De,
4067
+ sku: ze,
4090
4068
  platform: "SFCC",
4091
4069
  storeCode: "Sites-SiteGenesis-Site",
4092
- product_id: Me,
4093
- quantity: ot,
4070
+ product_id: De,
4071
+ quantity: nt,
4094
4072
  max_price_minor: Fe,
4095
4073
  currency: E,
4096
4074
  instruction_text: $
4097
4075
  };
4098
- if (!U || !A) {
4076
+ if (console.log(M, T, "the selected ids"), !M || !T) {
4099
4077
  console.error(
4100
4078
  "Missing shopper_id or shipping_address_id for intent-mandate",
4101
4079
  {
4102
- shopperId: U,
4103
- shippingAddressId: A
4080
+ shopperId: M,
4081
+ shippingAddressId: T
4104
4082
  }
4105
4083
  ), alert(
4106
4084
  "Missing customer or address information. Please re-select address and try again."
4107
- ), $e(!1);
4085
+ ), je(!1);
4108
4086
  return;
4109
4087
  }
4110
- const at = (await rt()).access_token;
4111
- if (!at)
4088
+ const ot = (await Ge()).access_token;
4089
+ if (!ot)
4112
4090
  throw new Error("Failed to fetch auth token for intent-mandate");
4113
- const { serverUrl: Ve } = Je(), Be = await fetch(`${Ve}/api/intent-mandate`, {
4091
+ const { serverUrl: He } = Xe(), Me = await fetch(`${He}/api/intent-mandate`, {
4114
4092
  method: "POST",
4115
4093
  headers: {
4116
4094
  "Content-Type": "application/json",
4117
- Authorization: `Bearer ${at}`
4095
+ Authorization: `Bearer ${ot}`
4118
4096
  },
4119
- body: JSON.stringify(mt)
4097
+ body: JSON.stringify(ft)
4120
4098
  });
4121
- if (!Be.ok) {
4122
- const Bo = await Be.text().catch(() => "");
4123
- console.error("intent-mandate failed", Be.status, Bo), alert(
4099
+ if (!Me.ok) {
4100
+ const Bo = await Me.text().catch(() => "");
4101
+ console.error("intent-mandate failed", Me.status, Bo), alert(
4124
4102
  "Something went wrong while saving your smart order. Please try again."
4125
- ), $e(!1);
4103
+ ), je(!1);
4126
4104
  return;
4127
4105
  }
4128
- const ge = await Be.json().catch(() => null);
4106
+ const ge = await Me.json().catch(() => null);
4129
4107
  console.log("intent-mandate success:", ge);
4130
- const st = (ge == null ? void 0 : ge.intent_mandate_id) || (ge == null ? void 0 : ge.intent_mandateId) || (ge == null ? void 0 : ge.key) || null;
4131
- st && It(st);
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);
4132
4110
  const Ht = {
4133
4111
  ...u,
4134
4112
  address: m,
4135
4113
  delivery: f,
4136
4114
  payment: w,
4137
- summary: { product_total: N, tax: O, shipping_fee: H, currency: E },
4138
- intent_mandate_id: st
4115
+ summary: { product_total: v, tax: j, shipping_fee: H, currency: E },
4116
+ intent_mandate_id: at
4139
4117
  };
4140
- localStorage.setItem("agentic_order_final", JSON.stringify(Ht)), te(!0), He(!1), Pt("final", Ht), Pt("success", { intentMandateId: st }), Rt();
4118
+ localStorage.setItem("agentic_order_final", JSON.stringify(Ht)), ee(!0), Re(!1), Pt("final", Ht), Pt("success", { intentMandateId: at }), qt();
4141
4119
  } catch (u) {
4142
4120
  console.error("Error in handleConfirmWatch / intent-mandate:", u), alert(
4143
4121
  "Unable to complete your smart order right now. Please try again in a moment."
4144
4122
  );
4145
4123
  } finally {
4146
- $e(!1);
4124
+ je(!1);
4147
4125
  }
4148
- }, Wr = () => {
4149
- Rt(), j((u) => [
4126
+ }, Qr = () => {
4127
+ qt(), O((u) => [
4150
4128
  ...u,
4151
4129
  {
4152
4130
  query: "",
@@ -4157,8 +4135,8 @@ const ct = "USD", Ws = (e, t = ct) => {
4157
4135
  }
4158
4136
  ]);
4159
4137
  }, $o = ({ selectedIndex: u }) => {
4160
- var A;
4161
- const m = ((A = y[u]) == null ? void 0 : A.images.large[0].link) || En(r, S), f = Tn(r), w = _t || "", N = gt(S) || "", O = wt(S) || "", { amount: H } = Zt(S), E = !!(r != null && r.id), U = E;
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;
4162
4140
  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: [
4163
4141
  /* @__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(
4164
4142
  "img",
@@ -4168,7 +4146,7 @@ const ct = "USD", Ws = (e, t = ct) => {
4168
4146
  className: "object-contain w-full h-full"
4169
4147
  }
4170
4148
  ) : /* @__PURE__ */ a(
4171
- de,
4149
+ ce,
4172
4150
  {
4173
4151
  icon: "mdi:image-outline",
4174
4152
  width: "28",
@@ -4179,31 +4157,31 @@ const ct = "USD", Ws = (e, t = ct) => {
4179
4157
  /* @__PURE__ */ a("div", { className: "text-2xl font-bold text-gray-900 mb-1", children: f }),
4180
4158
  /* @__PURE__ */ a("div", { className: "text-sm text-gray-700 mb-1", children: [
4181
4159
  w && `SKU: ${w}`,
4182
- N && `Color: ${N}`,
4183
- O && `Size: ${O}`
4160
+ v && `Color: ${v}`,
4161
+ j && `Size: ${j}`
4184
4162
  ].filter(Boolean).join(" • ") || "—" }),
4185
4163
  /* @__PURE__ */ a("div", { className: "mt-1 text-xl font-semibold text-gray-900", children: E ? (
4186
4164
  // ? formatCurrency(Number(unitPrice) || 0, CURRENCY_PREF)
4187
4165
  `$${r.price}`
4188
4166
  ) : "Currently unavailable" }),
4189
- E && !U && /* @__PURE__ */ a("div", { className: "mt-1 text-xs font-medium text-red-600", children: "Currently out of stock" })
4167
+ E && !M && /* @__PURE__ */ a("div", { className: "mt-1 text-xs font-medium text-red-600", children: "Currently out of stock" })
4190
4168
  ] })
4191
4169
  ] }) });
4192
- }, Qr = ({
4170
+ }, Gr = ({
4193
4171
  showSubmit: u = !0
4194
4172
  }) => {
4195
4173
  const m = {};
4196
- qt.map((w) => gt(w.variant)).filter((w) => !!w && !m[w] && (m[w] = !0));
4174
+ Rt.map((w) => ht(w.variant)).filter((w) => !!w && !m[w] && (m[w] = !0));
4197
4175
  const f = {};
4198
- return qt.map((w) => wt(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: [
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: [
4199
4177
  /* @__PURE__ */ a("h3", { className: "font-semibold text-gray-800", children: "Choose a variant" }),
4200
4178
  /* @__PURE__ */ d("div", { className: "mt-4", children: [
4201
4179
  /* @__PURE__ */ d("div", { className: "flex items-baseline gap-2", children: [
4202
4180
  /* @__PURE__ */ a("div", { className: "text-sm font-bold", children: "Color :" }),
4203
4181
  C && /* @__PURE__ */ a("div", { className: "text-sm text-gray-600", children: C })
4204
4182
  ] }),
4205
- /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-4 mt-2", children: y.map((w, N) => {
4206
- const O = w.name, H = C === O, E = w.images.large[0].disBaseLink || w.images.large[0].link;
4183
+ /* @__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;
4207
4185
  return /* @__PURE__ */ a(
4208
4186
  "div",
4209
4187
  {
@@ -4213,43 +4191,43 @@ const ct = "USD", Ws = (e, t = ct) => {
4213
4191
  "button",
4214
4192
  {
4215
4193
  onClick: () => {
4216
- K(O), ye(null), Ie(null), k(N);
4194
+ K(j), ye(null), _e(null), S(v);
4217
4195
  },
4218
4196
  className: "w-full h-20 flex items-center justify-center overflow-hidden",
4219
- title: O,
4197
+ title: j,
4220
4198
  children: E ? /* @__PURE__ */ a(
4221
4199
  "img",
4222
4200
  {
4223
4201
  src: E,
4224
- alt: O,
4202
+ alt: j,
4225
4203
  className: "w/full h-full object-contain"
4226
4204
  }
4227
- ) : /* @__PURE__ */ a("div", { className: "w-full h-full flex items-center justify-center text-xs px-1", children: O })
4205
+ ) : /* @__PURE__ */ a("div", { className: "w-full h-full flex items-center justify-center text-xs px-1", children: j })
4228
4206
  }
4229
4207
  )
4230
4208
  },
4231
- O
4209
+ j
4232
4210
  );
4233
4211
  }) })
4234
4212
  ] }),
4235
4213
  C && /* @__PURE__ */ d("div", { className: "mt-4", children: [
4236
4214
  /* @__PURE__ */ d("div", { className: "flex items-baseline gap-2", children: [
4237
4215
  /* @__PURE__ */ a("div", { className: "text-sm font-bold", children: "Size :" }),
4238
- ne && /* @__PURE__ */ a("div", { className: "text-sm text-gray-600", children: ne })
4216
+ te && /* @__PURE__ */ a("div", { className: "text-sm text-gray-600", children: te })
4239
4217
  ] }),
4240
4218
  /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2 mt-2", children: (() => {
4241
4219
  const w = y.find(
4242
- (N) => N.name === C
4220
+ (v) => v.name === C
4243
4221
  );
4244
- return w ? w.variants.map((N, O) => {
4245
- const H = N.name;
4222
+ return w ? w.variants.map((v, j) => {
4223
+ const H = v.name;
4246
4224
  return /* @__PURE__ */ a(
4247
4225
  "button",
4248
4226
  {
4249
4227
  onClick: () => {
4250
- ye(H), Ie(O), ho(N.productId);
4228
+ ye(H), _e(j), ho(v.productId);
4251
4229
  },
4252
- className: `px-4 py-2 rounded-md border text-sm ${ne === H ? "border-2 border-[#804c9e] font-semibold" : "border-gray-300"}`,
4230
+ className: `px-4 py-2 rounded-md border text-sm ${te === H ? "border-2 border-[#804c9e] font-semibold" : "border-gray-300"}`,
4253
4231
  title: H,
4254
4232
  children: H
4255
4233
  },
@@ -4263,17 +4241,17 @@ const ct = "USD", Ws = (e, t = ct) => {
4263
4241
  {
4264
4242
  onClick: Co,
4265
4243
  className: "px-6 py-2.5 rounded-full font-semibold text-white shadow-md",
4266
- style: { background: ze },
4244
+ style: { background: Le },
4267
4245
  disabled: !Ft,
4268
4246
  children: "Submit"
4269
4247
  }
4270
4248
  ) })
4271
4249
  ] });
4272
- }, Gr = (u, m = !0) => {
4250
+ }, Xr = (u, m = !0) => {
4273
4251
  !(u != null && u.extractedDetails) && u && (u = { extractedDetails: u });
4274
- const f = (u == null ? void 0 : u.extractedDetails) || X;
4252
+ const f = (u == null ? void 0 : u.extractedDetails) || fe;
4275
4253
  if (!f) return null;
4276
- const w = Et(f), { currency: N } = Zt(S), O = An(r, S), H = Number((f == null ? void 0 : f.max_price_minor) ?? 0), U = Number.isFinite(H) && H > 0 ? +(H / 100) : +(O * w), A = (f == null ? void 0 : f.currency) || N || ct, ce = S != null && S.sku ? S.sku : f.product_id;
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;
4277
4255
  return /* @__PURE__ */ d(
4278
4256
  "div",
4279
4257
  {
@@ -4291,26 +4269,26 @@ const ct = "USD", Ws = (e, t = ct) => {
4291
4269
  /* @__PURE__ */ d("div", { className: "w-full max-w-md bg-white rounded-xl shadow-inner p-4", children: [
4292
4270
  /* @__PURE__ */ d("div", { className: "grid grid-cols-2 gap-y-2 text-sm", children: [
4293
4271
  /* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "SKU:" }),
4294
- /* @__PURE__ */ a("p", { className: "text-gray-800", children: ce }),
4272
+ /* @__PURE__ */ a("p", { className: "text-gray-800", children: ie }),
4295
4273
  /* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "Quantity:" }),
4296
4274
  /* @__PURE__ */ a("p", { className: "text-gray-800", children: Et(f) }),
4297
4275
  /* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "Currency:" }),
4298
- /* @__PURE__ */ a("p", { className: "text-gray-800", children: A }),
4276
+ /* @__PURE__ */ a("p", { className: "text-gray-800", children: T }),
4299
4277
  /* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "Maximum Total Price:" }),
4300
- /* @__PURE__ */ a("p", { className: "text-gray-800", children: et(U, A) })
4278
+ /* @__PURE__ */ a("p", { className: "text-gray-800", children: st(M, T) })
4301
4279
  ] }),
4302
4280
  /* @__PURE__ */ d("div", { className: "mt-3 flex flex-wrap gap-2 text-xs", children: [
4303
- gt(S) && /* @__PURE__ */ d("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4281
+ ht(N) && /* @__PURE__ */ d("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4304
4282
  "Color: ",
4305
- gt(S)
4283
+ ht(N)
4306
4284
  ] }),
4307
- wt(S) && /* @__PURE__ */ d("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4285
+ gt(N) && /* @__PURE__ */ d("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4308
4286
  "Size: ",
4309
- wt(S)
4287
+ gt(N)
4310
4288
  ] }),
4311
- (S == null ? void 0 : S.sku) && /* @__PURE__ */ d("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4289
+ (N == null ? void 0 : N.sku) && /* @__PURE__ */ d("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4312
4290
  "SKU: ",
4313
- S.sku
4291
+ N.sku
4314
4292
  ] })
4315
4293
  ] })
4316
4294
  ] }),
@@ -4331,13 +4309,13 @@ const ct = "USD", Ws = (e, t = ct) => {
4331
4309
  /* @__PURE__ */ d(
4332
4310
  "button",
4333
4311
  {
4334
- onClick: Io,
4312
+ onClick: _o,
4335
4313
  disabled: W,
4336
4314
  className: `relative inline-flex items-center justify-center px-6 py-2.5 rounded-full font-semibold text-white shadow-md transition-all duration-300 ${W ? "opacity-60 cursor-not-allowed" : "hover:-translate-y-0.5 hover:shadow-lg"}`,
4337
- style: { background: ze },
4315
+ style: { background: Le },
4338
4316
  children: [
4339
4317
  /* @__PURE__ */ a(
4340
- de,
4318
+ ce,
4341
4319
  {
4342
4320
  icon: "fluent:checkmark-circle-24-filled",
4343
4321
  className: "mr-2",
@@ -4352,13 +4330,13 @@ const ct = "USD", Ws = (e, t = ct) => {
4352
4330
  /* @__PURE__ */ d(
4353
4331
  "button",
4354
4332
  {
4355
- onClick: Wr,
4333
+ onClick: Qr,
4356
4334
  disabled: W,
4357
4335
  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"}`,
4358
- style: { borderColor: ze, color: ze },
4336
+ style: { borderColor: Le, color: Le },
4359
4337
  children: [
4360
4338
  /* @__PURE__ */ a(
4361
- de,
4339
+ ce,
4362
4340
  {
4363
4341
  icon: "fluent:dismiss-circle-24-filled",
4364
4342
  className: "mr-2",
@@ -4375,41 +4353,41 @@ const ct = "USD", Ws = (e, t = ct) => {
4375
4353
  ]
4376
4354
  }
4377
4355
  );
4378
- }, Xr = (u, m = !0) => {
4379
- var pt, at, Ve, Be, ge, st;
4380
- const f = u || {}, w = ((pt = f == null ? void 0 : f.summary) == null ? void 0 : pt.currency) || (X == null ? void 0 : X.currency) || ct, N = En(r, S), O = Tn(r), H = S != null && S.sku ? S.sku : (r == null ? void 0 : r.id) ?? (X == null ? void 0 : X.product_id), E = (S == null ? void 0 : S.sku) ?? ti(r), U = gt(S) || ri(r), A = wt(S) || ni(r), ce = Et(f), Pe = ((at = f == null ? void 0 : f.summary) == null ? void 0 : at.product_total) != null ? +f.summary.product_total : Vr(f), De = ce > 0 ? +(Pe / ce).toFixed(2) : 0, Me = Pe, ot = ((Ve = f == null ? void 0 : f.summary) == null ? void 0 : Ve.tax) ?? +(Pe * 0.08).toFixed(2), Fe = ((Be = f == null ? void 0 : f.summary) == null ? void 0 : Be.shipping_fee) ?? (((ge = yt[he]) == null ? void 0 : ge.fee) || 0), Ee = f != null && f.address ? [
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 ? [
4381
4359
  f.address.addressLine1,
4382
4360
  f.address.addressLine2,
4383
4361
  f.address.street,
4384
4362
  [f.address.city, f.address.state, f.address.postalCode].filter(Boolean).join(", "),
4385
4363
  f.address.country
4386
- ].filter(Boolean).map((Ht) => Ze(String(Ht))).join(", ") : "—", Xe = (f == null ? void 0 : f.payment) || "card", mt = Xe === "card" ? /* @__PURE__ */ d(ke, { children: [
4364
+ ].filter(Boolean).map((Ht) => We(String(Ht))).join(", ") : "—", Ke = (f == null ? void 0 : f.payment) || "card", ft = Ke === "card" ? /* @__PURE__ */ d(ke, { children: [
4387
4365
  "Credit Card — Mastercard",
4388
4366
  /* @__PURE__ */ a("br", {}),
4389
4367
  "•••• 7820 Exp: 12/26"
4390
- ] }) : /* @__PURE__ */ a(ke, { children: Ze(Xe) });
4368
+ ] }) : /* @__PURE__ */ a(ke, { children: We(Ke) });
4391
4369
  return /* @__PURE__ */ d("div", { className: "mx-auto mt-3 mb-3 rounded-2xl bg-white", children: [
4392
4370
  /* @__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: [
4393
4371
  /* @__PURE__ */ a(
4394
- de,
4372
+ ce,
4395
4373
  {
4396
4374
  icon: "mdi:receipt-text-check-outline",
4397
4375
  width: "24",
4398
- color: ft
4376
+ color: ut
4399
4377
  }
4400
4378
  ),
4401
4379
  "All set! Here’s what your smart order looks like 🧾"
4402
4380
  ] }) }),
4403
4381
  /* @__PURE__ */ a("div", { className: "px-6 pb-4", children: /* @__PURE__ */ d("div", { className: "grid grid-cols-1 sm:grid-cols-12 gap-4 rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
4404
- /* @__PURE__ */ a("div", { className: "sm:col-span-2 flex", children: /* @__PURE__ */ a("div", { className: "w-30 h-26 sm:w-30 sm:h-26 overflow-hidden rounded-lg bg-white border border-gray-200 flex items-center justify-center mx-auto sm:mx-0", children: N ? /* @__PURE__ */ a(
4382
+ /* @__PURE__ */ a("div", { className: "sm:col-span-2 flex", children: /* @__PURE__ */ a("div", { className: "w-30 h-26 sm:w-30 sm:h-26 overflow-hidden rounded-lg bg-white border border-gray-200 flex items-center justify-center mx-auto sm:mx-0", children: v ? /* @__PURE__ */ a(
4405
4383
  "img",
4406
4384
  {
4407
- src: N,
4408
- alt: O,
4385
+ src: v,
4386
+ alt: j,
4409
4387
  className: "w-full h-full object-contain"
4410
4388
  }
4411
4389
  ) : /* @__PURE__ */ a(
4412
- de,
4390
+ ce,
4413
4391
  {
4414
4392
  icon: "mdi:image-outline",
4415
4393
  width: "24",
@@ -4418,44 +4396,44 @@ const ct = "USD", Ws = (e, t = ct) => {
4418
4396
  ) }) }),
4419
4397
  /* @__PURE__ */ d("div", { className: "sm:col-span-10", children: [
4420
4398
  /* @__PURE__ */ d("div", { className: "mb-3", children: [
4421
- /* @__PURE__ */ a("div", { className: "text-lg text-center font-bold text-gray-900", children: O }),
4399
+ /* @__PURE__ */ a("div", { className: "text-lg text-center font-bold text-gray-900", children: j }),
4422
4400
  /* @__PURE__ */ d("div", { className: "text-xs text-center font-bold text-gray-600", children: [
4423
4401
  /* @__PURE__ */ a("span", { className: "font-medium", children: "SKU:" }),
4424
4402
  " ",
4425
4403
  H ?? "—"
4426
4404
  ] }),
4427
- (E || U || A) && /* @__PURE__ */ d("div", { className: "text-xs text-gray-600 mt-0.5 text-center", children: [
4405
+ (E || M || T) && /* @__PURE__ */ d("div", { className: "text-xs text-gray-600 mt-0.5 text-center", children: [
4428
4406
  E && /* @__PURE__ */ d(ke, { children: [
4429
4407
  /* @__PURE__ */ a("span", { className: "font-medium", children: "SKU:" }),
4430
4408
  " ",
4431
4409
  E,
4432
4410
  "  "
4433
4411
  ] }),
4434
- U && /* @__PURE__ */ d(ke, { children: [
4412
+ M && /* @__PURE__ */ d(ke, { children: [
4435
4413
  /* @__PURE__ */ a("span", { className: "font-medium", children: "Color:" }),
4436
4414
  " ",
4437
- U,
4415
+ M,
4438
4416
  "  "
4439
4417
  ] }),
4440
- A && /* @__PURE__ */ d(ke, { children: [
4418
+ T && /* @__PURE__ */ d(ke, { children: [
4441
4419
  /* @__PURE__ */ a("span", { className: "font-medium", children: "Size:" }),
4442
4420
  " ",
4443
- A
4421
+ T
4444
4422
  ] })
4445
4423
  ] })
4446
4424
  ] }),
4447
4425
  /* @__PURE__ */ d("div", { className: "grid grid-cols-1 md-grid-cols-3 md:grid-cols-3 gap-3", children: [
4448
4426
  /* @__PURE__ */ d("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-white p-3 text-center", children: [
4449
4427
  /* @__PURE__ */ a("div", { className: "text-[11px] uppercase tracking-wide text-gray-500", children: "Unit Price" }),
4450
- /* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: et(De, w) })
4428
+ /* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: st(ze, w) })
4451
4429
  ] }),
4452
4430
  /* @__PURE__ */ d("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-white p-3 text-center", children: [
4453
4431
  /* @__PURE__ */ a("div", { className: "text-[11px] uppercase tracking-wide text-gray-500", children: "Quantity" }),
4454
- /* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: ce })
4432
+ /* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: ie })
4455
4433
  ] }),
4456
4434
  /* @__PURE__ */ d("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-white p-3 text-center", children: [
4457
4435
  /* @__PURE__ */ a("div", { className: "text-[11px] uppercase tracking-wide text-gray-500", children: "Subtotal" }),
4458
- /* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: et(Me, w) })
4436
+ /* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: st(De, w) })
4459
4437
  ] })
4460
4438
  ] })
4461
4439
  ] })
@@ -4468,25 +4446,25 @@ const ct = "USD", Ws = (e, t = ct) => {
4468
4446
  ] }),
4469
4447
  /* @__PURE__ */ d("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
4470
4448
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "💳 Payment" }),
4471
- /* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: mt })
4449
+ /* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: ft })
4472
4450
  ] }),
4473
4451
  /* @__PURE__ */ d("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
4474
4452
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "🚚 Delivery" }),
4475
- /* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: f != null && f.delivery && ((st = yt[f.delivery]) == null ? void 0 : st.label) || "—" })
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) || "—" })
4476
4454
  ] })
4477
4455
  ] }),
4478
4456
  /* @__PURE__ */ d("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-3", children: [
4479
4457
  /* @__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: [
4480
4458
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "💰 any(s)" }),
4481
- /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: et(Pe, w) })
4459
+ /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: st(Pe, w) })
4482
4460
  ] }),
4483
4461
  /* @__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: [
4484
4462
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "🏛️ Taxes" }),
4485
- /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: et(ot, w) })
4463
+ /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: st(nt, w) })
4486
4464
  ] }),
4487
4465
  /* @__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: [
4488
4466
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "🚚 Shipping" }),
4489
- /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: et(Fe, w) })
4467
+ /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: st(Fe, w) })
4490
4468
  ] })
4491
4469
  ] }),
4492
4470
  /* @__PURE__ */ d(
@@ -4496,19 +4474,19 @@ const ct = "USD", Ws = (e, t = ct) => {
4496
4474
  style: { background: Ut },
4497
4475
  children: [
4498
4476
  /* @__PURE__ */ a("div", { className: "text-sm/5 opacity-95", children: "🔹 Total Payable" }),
4499
- /* @__PURE__ */ a("div", { className: "mt-1 text-3xl font-extrabold tracking-tight", children: et(Pe + ot + Fe, w) })
4477
+ /* @__PURE__ */ a("div", { className: "mt-1 text-3xl font-extrabold tracking-tight", children: st(Pe + nt + Fe, w) })
4500
4478
  ]
4501
4479
  }
4502
4480
  )
4503
4481
  ] }),
4504
4482
  !m && /* @__PURE__ */ d("div", { className: "px-6 pb-5", children: [
4505
4483
  !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?" }),
4506
- F && qr({ intentMandateId: Ct }),
4507
- Le && !F && /* @__PURE__ */ d("div", { className: "mt-4 flex flex-wrap items-center justify-center gap-3", children: [
4484
+ F && Hr({ intentMandateId: Ct }),
4485
+ $e && !F && /* @__PURE__ */ d("div", { className: "mt-4 flex flex-wrap items-center justify-center gap-3", children: [
4508
4486
  /* @__PURE__ */ a(
4509
4487
  "button",
4510
4488
  {
4511
- onClick: Oo,
4489
+ onClick: jo,
4512
4490
  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",
4513
4491
  style: { background: Ut },
4514
4492
  children: "Confirm"
@@ -4517,7 +4495,7 @@ const ct = "USD", Ws = (e, t = ct) => {
4517
4495
  /* @__PURE__ */ a(
4518
4496
  "button",
4519
4497
  {
4520
- onClick: Wr,
4498
+ onClick: Qr,
4521
4499
  className: "inline-flex items-center justify-center rounded-full border px-6 py-2.5 font-semibold hover:bg-gray-50",
4522
4500
  style: { borderColor: Ut, color: Ut },
4523
4501
  children: "Cancel"
@@ -4534,7 +4512,7 @@ const ct = "USD", Ws = (e, t = ct) => {
4534
4512
  u.street,
4535
4513
  [u.city, u.state, u.postalCode].filter(Boolean).join(", "),
4536
4514
  u.country
4537
- ].filter((f) => !!f).map((f) => Ze(f)).join(", ");
4515
+ ].filter((f) => !!f).map((f) => We(f)).join(", ");
4538
4516
  return /* @__PURE__ */ a(
4539
4517
  "div",
4540
4518
  {
@@ -4542,7 +4520,7 @@ const ct = "USD", Ws = (e, t = ct) => {
4542
4520
  style: { backgroundColor: "var(--tanya-light)" },
4543
4521
  children: /* @__PURE__ */ d("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
4544
4522
  /* @__PURE__ */ d("div", { className: "flex items-center gap-2 mb-2", children: [
4545
- /* @__PURE__ */ a(de, { icon: "mdi:home-map-marker", width: "20", color: ft }),
4523
+ /* @__PURE__ */ a(ce, { icon: "mdi:home-map-marker", width: "20", color: ut }),
4546
4524
  /* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: "Delivery Address" })
4547
4525
  ] }),
4548
4526
  /* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: m })
@@ -4550,7 +4528,7 @@ const ct = "USD", Ws = (e, t = ct) => {
4550
4528
  }
4551
4529
  );
4552
4530
  }, zo = (u) => {
4553
- const m = u == null ? void 0 : u.method, f = m ? yt[m] : void 0;
4531
+ const m = u == null ? void 0 : u.method, f = m ? wt[m] : void 0;
4554
4532
  return /* @__PURE__ */ a(
4555
4533
  "div",
4556
4534
  {
@@ -4558,12 +4536,12 @@ const ct = "USD", Ws = (e, t = ct) => {
4558
4536
  style: { backgroundColor: "var(--tanya-light)" },
4559
4537
  children: /* @__PURE__ */ d("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
4560
4538
  /* @__PURE__ */ d("div", { className: "flex items-center gap-2 mb-1", children: [
4561
- /* @__PURE__ */ a(de, { icon: "mdi:truck-delivery", width: "20", color: ft }),
4539
+ /* @__PURE__ */ a(ce, { icon: "mdi:truck-delivery", width: "20", color: ut }),
4562
4540
  /* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: "Delivery Method" })
4563
4541
  ] }),
4564
4542
  /* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: f ? /* @__PURE__ */ d(ke, { children: [
4565
4543
  /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
4566
- /* @__PURE__ */ a(de, { icon: f.icon, width: "18" }),
4544
+ /* @__PURE__ */ a(ce, { icon: f.icon, width: "18" }),
4567
4545
  /* @__PURE__ */ a("span", { className: "font-medium", children: f.label })
4568
4546
  ] }),
4569
4547
  /* @__PURE__ */ a("div", { className: "text-gray-600", children: f.subtitle })
@@ -4581,11 +4559,11 @@ const ct = "USD", Ws = (e, t = ct) => {
4581
4559
  children: /* @__PURE__ */ d("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
4582
4560
  /* @__PURE__ */ d("div", { className: "flex items-center gap-2 mb-1", children: [
4583
4561
  /* @__PURE__ */ a(
4584
- de,
4562
+ ce,
4585
4563
  {
4586
4564
  icon: "mdi:credit-card-outline",
4587
4565
  width: "20",
4588
- color: ft
4566
+ color: ut
4589
4567
  }
4590
4568
  ),
4591
4569
  /* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: "Payment Method" })
@@ -4594,17 +4572,17 @@ const ct = "USD", Ws = (e, t = ct) => {
4594
4572
  "Credit Card — Mastercard",
4595
4573
  /* @__PURE__ */ a("br", {}),
4596
4574
  "•••• 7820   Exp: 12/26"
4597
- ] }) : Ze(m) })
4575
+ ] }) : We(m) })
4598
4576
  ] })
4599
4577
  }
4600
4578
  );
4601
4579
  }, Mo = (u, m) => {
4602
4580
  const f = u.snapshotStage;
4603
- if (!f || f === "address" && W || f === "delivery" && Ne || f === "payment" && se || f === "final" && Nt)
4581
+ if (!f || f === "address" && W || f === "delivery" && Ne || f === "payment" && oe || f === "final" && Nt)
4604
4582
  return null;
4605
4583
  switch (f) {
4606
4584
  case "initial":
4607
- return Gr(u.snapshotPayload, !m);
4585
+ return Xr(u.snapshotPayload, !m);
4608
4586
  case "address":
4609
4587
  return Lo(u.snapshotPayload);
4610
4588
  case "delivery":
@@ -4612,9 +4590,9 @@ const ct = "USD", Ws = (e, t = ct) => {
4612
4590
  case "payment":
4613
4591
  return Do(u.snapshotPayload);
4614
4592
  case "final":
4615
- return Xr(u.snapshotPayload, !m);
4593
+ return Zr(u.snapshotPayload, !m);
4616
4594
  case "success":
4617
- return qr(u.snapshotPayload);
4595
+ return Hr(u.snapshotPayload);
4618
4596
  default:
4619
4597
  return null;
4620
4598
  }
@@ -4646,7 +4624,7 @@ const ct = "USD", Ws = (e, t = ct) => {
4646
4624
  borderTopLeftRadius: "0.75rem",
4647
4625
  borderBottomLeftRadius: "0.75rem",
4648
4626
  padding: "0.25rem",
4649
- background: ze
4627
+ background: Le
4650
4628
  },
4651
4629
  children: [
4652
4630
  /* @__PURE__ */ d(
@@ -4692,7 +4670,7 @@ const ct = "USD", Ws = (e, t = ct) => {
4692
4670
  margin: "0.75rem"
4693
4671
  },
4694
4672
  children: /* @__PURE__ */ a(
4695
- de,
4673
+ ce,
4696
4674
  {
4697
4675
  icon: "fluent:dismiss-24-filled",
4698
4676
  color: "#ffffff",
@@ -4729,10 +4707,10 @@ const ct = "USD", Ws = (e, t = ct) => {
4729
4707
  ]
4730
4708
  }
4731
4709
  ),
4732
- /* @__PURE__ */ a($o, { selectedIndex: _ }),
4733
- R > 1 && /* @__PURE__ */ a(Qr, { showSubmit: !1 }),
4710
+ /* @__PURE__ */ a($o, { selectedIndex: I }),
4711
+ q > 1 && /* @__PURE__ */ a(Gr, { showSubmit: !1 }),
4734
4712
  p.map((u, m) => {
4735
- var N;
4713
+ var v;
4736
4714
  const f = m === p.length - 1, w = !!u.snapshotStage;
4737
4715
  return /* @__PURE__ */ d("div", { children: [
4738
4716
  u.query && /* @__PURE__ */ a("div", { className: "flex justify-end", children: /* @__PURE__ */ a(
@@ -4746,7 +4724,7 @@ const ct = "USD", Ws = (e, t = ct) => {
4746
4724
  children: u.query
4747
4725
  }
4748
4726
  ) }),
4749
- u.response === "__TEXT__" && ((N = u.snapshotPayload) == null ? void 0 : N.text) && /* @__PURE__ */ a("div", { className: "mt-2", children: /* @__PURE__ */ a(
4727
+ u.response === "__TEXT__" && ((v = u.snapshotPayload) == null ? void 0 : v.text) && /* @__PURE__ */ a("div", { className: "mt-2", children: /* @__PURE__ */ a(
4750
4728
  "div",
4751
4729
  {
4752
4730
  className: "text-sm text-tanya-contrast px-7 py-4 rounded-r-xl rounded-bl-2xl w-full",
@@ -4757,14 +4735,14 @@ const ct = "USD", Ws = (e, t = ct) => {
4757
4735
  children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ a("p", { children: u.snapshotPayload.text }) })
4758
4736
  }
4759
4737
  ) }),
4760
- f && ut && R > 1 && /* @__PURE__ */ d("div", { className: "mx-4 mt-2 rounded-xl border border-gray-200 bg-white p-4 animate-fade-in", children: [
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: [
4761
4739
  /* @__PURE__ */ d("div", { className: "text-sm text-gray-800", children: [
4762
4740
  "Proceed with color:",
4763
4741
  " ",
4764
4742
  /* @__PURE__ */ a("span", { className: "font-semibold", children: C || "—" }),
4765
4743
  ", size:",
4766
4744
  " ",
4767
- /* @__PURE__ */ a("span", { className: "font-semibold", children: ne || "—" }),
4745
+ /* @__PURE__ */ a("span", { className: "font-semibold", children: te || "—" }),
4768
4746
  "?"
4769
4747
  ] }),
4770
4748
  /* @__PURE__ */ d("div", { className: "mt-3 flex gap-3", children: [
@@ -4773,7 +4751,7 @@ const ct = "USD", Ws = (e, t = ct) => {
4773
4751
  {
4774
4752
  onClick: So,
4775
4753
  className: "px-5 py-2 rounded-full text-white font-semibold",
4776
- style: { background: ze },
4754
+ style: { background: Le },
4777
4755
  children: "Yes"
4778
4756
  }
4779
4757
  ),
@@ -4783,16 +4761,16 @@ const ct = "USD", Ws = (e, t = ct) => {
4783
4761
  onClick: No,
4784
4762
  className: "px-5 py-2 rounded-full font-semibold border",
4785
4763
  style: {
4786
- borderColor: ze,
4787
- color: ze
4764
+ borderColor: Le,
4765
+ color: Le
4788
4766
  },
4789
4767
  children: "No, change SKU"
4790
4768
  }
4791
4769
  )
4792
4770
  ] })
4793
4771
  ] }),
4794
- f && nt && /* @__PURE__ */ a(Qr, { showSubmit: !0 }),
4795
- f && _e && /* @__PURE__ */ a("div", { className: "mt-4", children: /* @__PURE__ */ a(
4772
+ f && rt && /* @__PURE__ */ a(Gr, { showSubmit: !0 }),
4773
+ f && Ie && /* @__PURE__ */ a("div", { className: "mt-4", children: /* @__PURE__ */ a(
4796
4774
  "div",
4797
4775
  {
4798
4776
  className: "text-sm text-tanya-contrast px-7 py-4 rounded-r-xl rounded-bl-2xl w-full",
@@ -4803,7 +4781,7 @@ const ct = "USD", Ws = (e, t = ct) => {
4803
4781
  children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2 tanya-pulse-text", children: /* @__PURE__ */ a("p", { children: "Reading your instruction and setting things up…" }) })
4804
4782
  }
4805
4783
  ) }),
4806
- (w || u.response === "__CARD__") && (!_e || !f) && /* @__PURE__ */ a(
4784
+ (w || u.response === "__CARD__") && (!Ie || !f) && /* @__PURE__ */ a(
4807
4785
  "div",
4808
4786
  {
4809
4787
  className: "mt-6 mb-4 mx-4 animate-fade-in",
@@ -4813,7 +4791,7 @@ const ct = "USD", Ws = (e, t = ct) => {
4813
4791
  boxShadow: "0 2px 8px rgba(0,0,0,0.08)",
4814
4792
  overflow: "hidden"
4815
4793
  },
4816
- children: w ? Mo(u, f) : Gr(
4794
+ children: w ? Mo(u, f) : Xr(
4817
4795
  u.snapshotPayload,
4818
4796
  !1
4819
4797
  )
@@ -4825,7 +4803,7 @@ const ct = "USD", Ws = (e, t = ct) => {
4825
4803
  /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
4826
4804
  /* @__PURE__ */ d("h3", { className: "font-semibold text-lg text-gray-800 flex items-center gap-2", children: [
4827
4805
  /* @__PURE__ */ a(
4828
- de,
4806
+ ce,
4829
4807
  {
4830
4808
  icon: "mdi:home-map-marker",
4831
4809
  width: "24",
@@ -4861,13 +4839,13 @@ const ct = "USD", Ws = (e, t = ct) => {
4861
4839
  }
4862
4840
  ),
4863
4841
  /* @__PURE__ */ a("p", { className: "ml-3 text-gray-600", children: "Fetching your addresses..." })
4864
- ] }) : (B == null ? void 0 : B.length) > 0 ? /* @__PURE__ */ d(
4842
+ ] }) : (U == null ? void 0 : U.length) > 0 ? /* @__PURE__ */ d(
4865
4843
  "div",
4866
4844
  {
4867
4845
  className: `space-y-3 ${G ? "opacity-70" : ""}`,
4868
4846
  children: [
4869
- B.map((u) => {
4870
- const m = [u.addressLine1, u.addressLine2].filter(Boolean).map((E) => Ze(E || "")).join(" "), f = Ze(u.city || ""), w = `${Ze(u.state || "")}${u.state && u.postalCode ? ", " : ""}${u.postalCode || ""}`, N = Ze(u.country || ""), O = String(u.addressId ?? u.id), H = q === O;
4847
+ 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;
4871
4849
  return /* @__PURE__ */ d(
4872
4850
  "label",
4873
4851
  {
@@ -4882,8 +4860,8 @@ const ct = "USD", Ws = (e, t = ct) => {
4882
4860
  className: "mt-1 accent-tanya-light",
4883
4861
  checked: H,
4884
4862
  disabled: G,
4885
- onChange: () => ae(O),
4886
- value: O
4863
+ onChange: () => ne(j),
4864
+ value: j
4887
4865
  }
4888
4866
  ),
4889
4867
  /* @__PURE__ */ d("div", { className: "flex-1", children: [
@@ -4893,19 +4871,19 @@ const ct = "USD", Ws = (e, t = ct) => {
4893
4871
  /* @__PURE__ */ a("br", {}),
4894
4872
  w,
4895
4873
  /* @__PURE__ */ a("br", {}),
4896
- N
4874
+ v
4897
4875
  ] })
4898
4876
  ] })
4899
4877
  ]
4900
4878
  },
4901
- O
4879
+ j
4902
4880
  );
4903
4881
  }),
4904
4882
  /* @__PURE__ */ d("div", { className: "flex justify-between pt-2", children: [
4905
4883
  /* @__PURE__ */ a(
4906
4884
  "button",
4907
4885
  {
4908
- onClick: Kr,
4886
+ onClick: Wr,
4909
4887
  className: "px-6 py-2.5 rounded-full font-semibold border transition-all hover:-translate-y-0.5 hover:shadow-sm",
4910
4888
  style: {
4911
4889
  borderColor: "var(--tanya-light)",
@@ -4917,10 +4895,10 @@ const ct = "USD", Ws = (e, t = ct) => {
4917
4895
  /* @__PURE__ */ a(
4918
4896
  "button",
4919
4897
  {
4920
- onClick: _o,
4898
+ onClick: Io,
4921
4899
  disabled: G,
4922
4900
  className: `px-6 py-2.5 rounded-full font-semibold text-white shadow-md transition-all duration-300 ${G ? "opacity-60 cursor-not-allowed" : "hover:-translate-y-0.5 hover:shadow-lg"}`,
4923
- style: { background: ze },
4901
+ style: { background: Le },
4924
4902
  children: G ? "Address Submitted" : "Submit Address"
4925
4903
  }
4926
4904
  )
@@ -4933,7 +4911,7 @@ const ct = "USD", Ws = (e, t = ct) => {
4933
4911
  /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
4934
4912
  /* @__PURE__ */ d("h3", { className: "font-semibold text-lg text-gray-800 flex items-center gap-2", children: [
4935
4913
  /* @__PURE__ */ a(
4936
- de,
4914
+ ce,
4937
4915
  {
4938
4916
  icon: "mdi:truck-delivery",
4939
4917
  width: "24",
@@ -4942,7 +4920,7 @@ const ct = "USD", Ws = (e, t = ct) => {
4942
4920
  ),
4943
4921
  "Great! Now choose how fast you want it delivered 🚚"
4944
4922
  ] }),
4945
- ee && /* @__PURE__ */ d(ke, { children: [
4923
+ Z && /* @__PURE__ */ d(ke, { children: [
4946
4924
  /* @__PURE__ */ a("span", { className: "ml-2 text-xs px-2 py-1 rounded-full bg-green-100 text-green-700 font-semibold", children: "Selected" }),
4947
4925
  !F && /* @__PURE__ */ a(
4948
4926
  "button",
@@ -4963,15 +4941,15 @@ const ct = "USD", Ws = (e, t = ct) => {
4963
4941
  /* @__PURE__ */ a(
4964
4942
  "div",
4965
4943
  {
4966
- className: `space-y-3 ${ee ? "opacity-70" : ""}`,
4967
- children: Object.keys(T).map(
4944
+ className: `space-y-3 ${Z ? "opacity-70" : ""}`,
4945
+ children: Object.keys(A).map(
4968
4946
  (u) => {
4969
- const m = yt[u], f = he === u;
4947
+ const m = wt[u], f = he === u;
4970
4948
  return /* @__PURE__ */ d(
4971
4949
  "label",
4972
4950
  {
4973
- className: `flex items-start gap-3 p-4 border rounded-lg cursor-pointer transition hover:shadow-sm ${f ? "border-tanya-light" : "border-gray-300"} ${ee ? "pointer-events-none" : ""}`,
4974
- title: ee ? "Delivery already submitted" : "",
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" : "",
4975
4953
  children: [
4976
4954
  /* @__PURE__ */ a(
4977
4955
  "input",
@@ -4980,22 +4958,15 @@ const ct = "USD", Ws = (e, t = ct) => {
4980
4958
  name: "delivery",
4981
4959
  className: "mt-1 accent-tanya-light",
4982
4960
  checked: f,
4983
- disabled: ee,
4984
- onChange: () => I(u)
4961
+ disabled: Z,
4962
+ onChange: () => _(u)
4985
4963
  }
4986
4964
  ),
4987
4965
  /* @__PURE__ */ d("div", { className: "flex-1", children: [
4988
- /* @__PURE__ */ d("div", { className: "font-semibold text-gray-800 flex items-center gap-2", children: [
4989
- /* @__PURE__ */ a(de, { icon: m.icon, width: "18" }),
4990
- " ",
4991
- m.label
4992
- ] }),
4993
- /* @__PURE__ */ a("div", { className: "text-sm text-gray-700", children: m.subtitle })
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 })
4994
4968
  ] }),
4995
- /* @__PURE__ */ a("div", { className: "text-sm font-semibold text-gray-800", children: m.fee === 0 ? "Free" : et(
4996
- m.fee,
4997
- (X == null ? void 0 : X.currency) || ct
4998
- ) })
4969
+ /* @__PURE__ */ a("div", { className: "text-sm font-semibold text-gray-800", children: m.price === 0 ? "Free" : m.price })
4999
4970
  ]
5000
4971
  },
5001
4972
  u
@@ -5008,7 +4979,7 @@ const ct = "USD", Ws = (e, t = ct) => {
5008
4979
  /* @__PURE__ */ a(
5009
4980
  "button",
5010
4981
  {
5011
- onClick: Kr,
4982
+ onClick: Wr,
5012
4983
  className: "px-6 py-2.5 rounded-full font-semibold border transition-all hover:-translate-y-0.5 hover:shadow-sm",
5013
4984
  style: {
5014
4985
  borderColor: "var(--tanya-light)",
@@ -5021,19 +4992,19 @@ const ct = "USD", Ws = (e, t = ct) => {
5021
4992
  "button",
5022
4993
  {
5023
4994
  onClick: Fo,
5024
- disabled: ee,
5025
- 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"}`,
5026
- style: { background: ze },
5027
- children: ee ? "Delivery Submitted" : "Submit Delivery Option"
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"}`,
4997
+ style: { background: Le },
4998
+ children: Z ? "Delivery Submitted" : "Submit Delivery Option"
5028
4999
  }
5029
5000
  )
5030
5001
  ] })
5031
5002
  ] }),
5032
- se && /* @__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: [
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: [
5033
5004
  /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
5034
5005
  /* @__PURE__ */ d("h3", { className: "font-semibold text-lg text-gray-800 flex items-center gap-2", children: [
5035
5006
  /* @__PURE__ */ a(
5036
- de,
5007
+ ce,
5037
5008
  {
5038
5009
  icon: "mdi:credit-card-outline",
5039
5010
  width: "24",
@@ -5042,12 +5013,12 @@ const ct = "USD", Ws = (e, t = ct) => {
5042
5013
  ),
5043
5014
  "Almost done! 💳"
5044
5015
  ] }),
5045
- je && /* @__PURE__ */ d(ke, { children: [
5016
+ Oe && /* @__PURE__ */ d(ke, { children: [
5046
5017
  /* @__PURE__ */ a("span", { className: "ml-2 text-xs px-2 py-1 rounded-full bg-green-100 text-green-700 font-semibold", children: "Selected" }),
5047
5018
  !F && /* @__PURE__ */ a(
5048
5019
  "button",
5049
5020
  {
5050
- onClick: jo,
5021
+ onClick: Oo,
5051
5022
  className: "ml-2 text-xs px-2 py-1 rounded-full border hover:bg-gray-50",
5052
5023
  style: {
5053
5024
  borderColor: "var(--tanya-light)",
@@ -5063,12 +5034,12 @@ const ct = "USD", Ws = (e, t = ct) => {
5063
5034
  /* @__PURE__ */ a(
5064
5035
  "div",
5065
5036
  {
5066
- className: `space-y-3 ${je ? "opacity-70" : ""}`,
5037
+ className: `space-y-3 ${Oe ? "opacity-70" : ""}`,
5067
5038
  children: /* @__PURE__ */ d(
5068
5039
  "label",
5069
5040
  {
5070
- className: `flex items-start gap-3 p-4 border rounded-lg cursor-pointer transition hover:shadow-sm ${Ae === "card" ? "border-tanya-light" : "border-gray-300"} ${je ? "pointer-events-none" : ""}`,
5071
- title: je ? "Payment already submitted" : "",
5041
+ className: `flex items-start gap-3 p-4 border rounded-lg cursor-pointer transition hover:shadow-sm ${Ae === "card" ? "border-tanya-light" : "border-gray-300"} ${Oe ? "pointer-events-none" : ""}`,
5042
+ title: Oe ? "Payment already submitted" : "",
5072
5043
  children: [
5073
5044
  /* @__PURE__ */ a(
5074
5045
  "input",
@@ -5077,13 +5048,13 @@ const ct = "USD", Ws = (e, t = ct) => {
5077
5048
  name: "payment",
5078
5049
  className: "mt-1 accent-tanya-light",
5079
5050
  checked: Ae === "card",
5080
- disabled: je,
5051
+ disabled: Oe,
5081
5052
  onChange: () => St("card")
5082
5053
  }
5083
5054
  ),
5084
5055
  /* @__PURE__ */ d("div", { className: "flex-1", children: [
5085
5056
  /* @__PURE__ */ d("div", { className: "font-semibold text-gray-800 flex items-center gap-2", children: [
5086
- /* @__PURE__ */ a(de, { icon: "mdi:credit-card-chip-outline", width: "18" }),
5057
+ /* @__PURE__ */ a(ce, { icon: "mdi:credit-card-chip-outline", width: "18" }),
5087
5058
  " ",
5088
5059
  "Credit Card"
5089
5060
  ] }),
@@ -5115,23 +5086,23 @@ const ct = "USD", Ws = (e, t = ct) => {
5115
5086
  "button",
5116
5087
  {
5117
5088
  onClick: To,
5118
- disabled: je,
5119
- className: `px-6 py-2.5 rounded-full font-semibold text-white shadow-md transition-all duration-300 ${je ? "opacity-60 cursor-not-allowed" : "hover:-translate-y-0.5 hover:shadow-lg"}`,
5089
+ disabled: Oe,
5090
+ className: `px-6 py-2.5 rounded-full font-semibold text-white shadow-md transition-all duration-300 ${Oe ? "opacity-60 cursor-not-allowed" : "hover:-translate-y-0.5 hover:shadow-lg"}`,
5120
5091
  style: { background: "var(--tanya)" },
5121
- children: je ? "Payment Submitted" : "Submit Payment Method"
5092
+ children: Oe ? "Payment Submitted" : "Submit Payment Method"
5122
5093
  }
5123
5094
  )
5124
5095
  ] })
5125
5096
  ] }),
5126
- Nt && Xr(
5097
+ Nt && Zr(
5127
5098
  {
5128
- ...X,
5099
+ ...fe,
5129
5100
  address: JSON.parse(
5130
5101
  localStorage.getItem("agentic_order_address") || "null"
5131
5102
  ),
5132
5103
  delivery: localStorage.getItem("agentic_order_delivery"),
5133
5104
  payment: localStorage.getItem("agentic_order_payment"),
5134
- summary: Yr(X == null ? void 0 : X.currency)
5105
+ summary: Jr(fe == null ? void 0 : fe.currency)
5135
5106
  },
5136
5107
  !1
5137
5108
  )
@@ -5148,7 +5119,7 @@ const ct = "USD", Ws = (e, t = ct) => {
5148
5119
  ${Ft ? "" : "placeholder:text-red-400 text-red-500"}`,
5149
5120
  value: z,
5150
5121
  onKeyDown: (u) => {
5151
- u.key === "Enter" && !_e && !Se && Jr();
5122
+ u.key === "Enter" && !Ie && !Se && Kr();
5152
5123
  },
5153
5124
  onChange: (u) => Te(u.target.value)
5154
5125
  }
@@ -5157,18 +5128,18 @@ const ct = "USD", Ws = (e, t = ct) => {
5157
5128
  "button",
5158
5129
  {
5159
5130
  type: "submit",
5160
- disabled: _e || Se,
5131
+ disabled: Ie || Se,
5161
5132
  className: "mr-6 font-medium",
5162
5133
  style: { color: "var(--tanya-light)" },
5163
- onClick: () => Jr(),
5164
- children: _e ? /* @__PURE__ */ a(
5134
+ onClick: () => Kr(),
5135
+ children: Ie ? /* @__PURE__ */ a(
5165
5136
  "div",
5166
5137
  {
5167
5138
  className: "m-3 animate-spin rounded-full h-6 w-6 border-b-2",
5168
5139
  style: { borderBottom: "2px solid" }
5169
5140
  }
5170
5141
  ) : /* @__PURE__ */ a(
5171
- de,
5142
+ ce,
5172
5143
  {
5173
5144
  icon: "fluent:send-48-filled",
5174
5145
  color: "var(--tanya-light)",
@@ -5187,8 +5158,8 @@ const ct = "USD", Ws = (e, t = ct) => {
5187
5158
  );
5188
5159
  };
5189
5160
  export {
5190
- ki as AgenticShoppingButton,
5191
- vi as TanyaChatbot,
5192
- gi as TanyaChatbotProvider
5161
+ vi as AgenticShoppingButton,
5162
+ bi as TanyaChatbot,
5163
+ hi as TanyaChatbotProvider
5193
5164
  };
5194
5165
  //# sourceMappingURL=tanya-chatbot.es.js.map