tanya-chatbot 0.10.5 → 0.10.6

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,7 +1,7 @@
1
1
  import { useEffect as he, useState as v, useRef as Je, forwardRef as $n, createElement as mr, useMemo as Zr } from "react";
2
2
  import { jsx as a, jsxs as d, Fragment as be } from "react/jsx-runtime";
3
- import { createHttpLink as qo, ApolloClient as Ro, InMemoryCache as Ho, ApolloProvider as Vo } from "@apollo/client";
4
- import { Provider as Yo, useDispatch as Ln, useSelector as Gt } from "react-redux";
3
+ import { createHttpLink as qo, ApolloClient as Ro, InMemoryCache as Vo, ApolloProvider as Ho } from "@apollo/client";
4
+ import { Provider as Yo, useDispatch as Ln, useSelector as Xt } from "react-redux";
5
5
  import { createSlice as zn, configureStore as Jo } from "@reduxjs/toolkit";
6
6
  import * as Dn from "@radix-ui/react-popover";
7
7
  import "clsx";
@@ -12,7 +12,7 @@ import { Icon as Ko } from "@iconify/react";
12
12
  import { toast as Ue } from "react-toastify";
13
13
  import { createPortal as Wo } from "react-dom";
14
14
  const Qo = '*,: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() {
15
+ function hi() {
16
16
  return he(() => {
17
17
  if (typeof document < "u") {
18
18
  const e = document.createElement("style");
@@ -22,7 +22,7 @@ function gi() {
22
22
  }
23
23
  }, []), null;
24
24
  }
25
- const Go = {
25
+ const Xo = {
26
26
  store: {
27
27
  storeCode: "",
28
28
  storeName: "",
@@ -58,13 +58,13 @@ const Go = {
58
58
  }
59
59
  }, Mn = zn({
60
60
  name: "store",
61
- initialState: Go,
61
+ initialState: Xo,
62
62
  reducers: {
63
63
  setStore: (e, t) => {
64
64
  e.store = t.payload;
65
65
  }
66
66
  }
67
- }), { setStore: wi } = Mn.actions, Xo = Mn.reducer, Zo = {
67
+ }), { setStore: gi } = Mn.actions, Go = Mn.reducer, Zo = {
68
68
  product: null
69
69
  }, Bn = zn({
70
70
  name: "product",
@@ -76,10 +76,10 @@ const Go = {
76
76
  }
77
77
  }), { setProduct: pr } = Bn.actions, ea = Bn.reducer, ta = Jo({
78
78
  reducer: {
79
- store: Xo,
79
+ store: Go,
80
80
  product: ea
81
81
  }
82
- }), ra = ({ children: e }) => /* @__PURE__ */ a(Yo, { store: ta, children: e }), Xt = (e) => {
82
+ }), ra = ({ children: e }) => /* @__PURE__ */ a(Yo, { store: ta, children: e }), Gt = (e) => {
83
83
  const t = new CustomEvent("reactCartUpdated", {
84
84
  detail: {
85
85
  cartUpdated: !0,
@@ -407,7 +407,7 @@ const da = ({
407
407
  i.response || i.message
408
408
  ) : console.error("Unexpected error:", i), null;
409
409
  }
410
- }, Hn = async ({
410
+ }, Vn = async ({
411
411
  basketId: e,
412
412
  customer_token: t
413
413
  }) => {
@@ -447,10 +447,10 @@ const da = ({
447
447
  c.response || c.message
448
448
  ) : console.error("Unexpected error:", c), [];
449
449
  }
450
- }, jt = "sfcc_basket_id", on = "sfcc_customer_token", $t = "sfcc_token_expiry", ma = 300 * 1e3, qt = "1.0.0";
450
+ }, Ot = "sfcc_basket_id", on = "sfcc_customer_token", $t = "sfcc_token_expiry", ma = 300 * 1e3, qt = "1.0.0";
451
451
  const ct = (e) => {
452
452
  try {
453
- e ? localStorage.setItem(jt, e) : localStorage.removeItem(jt);
453
+ e ? localStorage.setItem(Ot, e) : localStorage.removeItem(Ot);
454
454
  } catch (t) {
455
455
  console.error("Error saving basket ID to storage:", t);
456
456
  }
@@ -467,44 +467,44 @@ const ct = (e) => {
467
467
  }
468
468
  }, an = 300, pa = ({ addToCartPwa: e }) => {
469
469
  var l, h, g, x, y, I;
470
- const t = Ln(), r = Gt((C) => C.product.product), n = Gt((C) => C.store.store), [o, s] = v(!!r);
470
+ const t = Ln(), r = Xt((C) => C.product.product), n = Xt((C) => C.store.store), [o, s] = v(!!r);
471
471
  if (he(() => {
472
472
  s(!!r);
473
473
  }, [r]), !r) return null;
474
474
  const i = async () => {
475
- var C, T, N, P, G, V, K, ve, F, D, ge, te, se, dt, Re, k;
475
+ var C, T, S, F, X, H, K, ve, P, D, ge, te, se, dt, Re, N;
476
476
  try {
477
- if (!((T = (C = r == null ? void 0 : r.variants) == null ? void 0 : C[0]) != null && T.product_id) && !(r.type.item || r.type.bundle) && !((P = (N = r == null ? void 0 : r.variants) == null ? void 0 : N[0]) != null && P.productId)) {
477
+ if (!((T = (C = r == null ? void 0 : r.variants) == null ? void 0 : C[0]) != null && T.product_id) && !(r.type.item || r.type.bundle) && !((F = (S = r == null ? void 0 : r.variants) == null ? void 0 : S[0]) != null && F.productId)) {
478
478
  Ue.error("Variants not available", {
479
479
  position: "bottom-right",
480
480
  autoClose: 1e3
481
481
  }), console.error("No product variant found");
482
482
  return;
483
483
  }
484
- const H = [
484
+ const V = [
485
485
  {
486
- product_id: ((G = r.variants) == null ? void 0 : G[0].product_id) || ((V = r.variants) == null ? void 0 : V[0].productId) || (r == null ? void 0 : r.id),
486
+ product_id: ((X = r.variants) == null ? void 0 : X[0].product_id) || ((H = r.variants) == null ? void 0 : H[0].productId) || (r == null ? void 0 : r.id),
487
487
  quantity: 1
488
488
  }
489
489
  ], M = JSON.parse(
490
490
  sessionStorage.getItem("customerData") || "{}"
491
- ), je = (M == null ? void 0 : M.basketId) || localStorage.getItem(jt), kt = !1, ot = localStorage.getItem($t), He = Date.now();
492
- if (!kt || !ot || He >= parseInt(ot)) {
491
+ ), Oe = (M == null ? void 0 : M.basketId) || localStorage.getItem(Ot), St = !1, ot = localStorage.getItem($t), Ve = Date.now();
492
+ if (!St || !ot || Ve >= parseInt(ot)) {
493
493
  let ke = "";
494
494
  if (ke = "Bearer " + (await Ze()).access_token, !ke) {
495
495
  console.error("Failed to get customer_token");
496
496
  return;
497
497
  }
498
- const $e = He + 300 * 1e3;
499
- if (Zt(ke), localStorage.setItem($t, $e.toString()), je) {
500
- const Le = await Hn({
501
- basketId: je,
498
+ const $e = Ve + 300 * 1e3;
499
+ if (Zt(ke), localStorage.setItem($t, $e.toString()), Oe) {
500
+ const Le = await Vn({
501
+ basketId: Oe,
502
502
  customer_token: ke
503
503
  });
504
504
  if (Le.status === 200 && Le) {
505
505
  const we = await gr(
506
- je,
507
- H,
506
+ Oe,
507
+ V,
508
508
  ke
509
509
  );
510
510
  (((K = we == null ? void 0 : we.product_items) == null ? void 0 : K.length) > 0 || ((ve = we == null ? void 0 : we.productItems) == null ? void 0 : ve.length) > 0) && (Ue.success("Added to cart", {
@@ -514,14 +514,14 @@ const ct = (e) => {
514
514
  closeOnClick: !0,
515
515
  pauseOnHover: !0,
516
516
  draggable: !0
517
- }), Xt(je));
517
+ }), Gt(Oe));
518
518
  return;
519
519
  }
520
520
  }
521
521
  const Te = {
522
522
  productItems: [
523
523
  {
524
- productId: ((F = r.variants) == null ? void 0 : F[0].product_id) || ((D = r.variants) == null ? void 0 : D[0].productId) || (r == null ? void 0 : r.id),
524
+ productId: ((P = r.variants) == null ? void 0 : P[0].product_id) || ((D = r.variants) == null ? void 0 : D[0].productId) || (r == null ? void 0 : r.id),
525
525
  quantity: 1
526
526
  }
527
527
  ]
@@ -535,7 +535,7 @@ const ct = (e) => {
535
535
  ), console.log("adding product to basket");
536
536
  const Ae = await gr(
537
537
  (L == null ? void 0 : L.basket_id) || (L == null ? void 0 : L.basketId),
538
- H,
538
+ V,
539
539
  ke
540
540
  );
541
541
  console.log("object added to basket"), (((ge = Ae == null ? void 0 : Ae.product_items) == null ? void 0 : ge.length) > 0 || ((te = Ae == null ? void 0 : Ae.productItems) == null ? void 0 : te.length) > 0) && Ue.success("Added to cart", {
@@ -545,14 +545,14 @@ const ct = (e) => {
545
545
  closeOnClick: !0,
546
546
  pauseOnHover: !0,
547
547
  draggable: !0
548
- }), Xt(L.basket_id || (L == null ? void 0 : L.basketId));
548
+ }), Gt(L.basket_id || (L == null ? void 0 : L.basketId));
549
549
  }
550
- } catch (H) {
551
- console.error("Error adding to cart:", H), Ue.error("Failed to add product to cart", {
550
+ } catch (V) {
551
+ console.error("Error adding to cart:", V), Ue.error("Failed to add product to cart", {
552
552
  position: "bottom-right",
553
553
  autoClose: 3e3
554
- }), ((se = H == null ? void 0 : H.response) == null ? void 0 : se.status) === 404 || // Basket not found
555
- ((dt = H == null ? void 0 : H.response) == null ? void 0 : dt.status) === 401 ? (((Re = H == null ? void 0 : H.response) == null ? void 0 : Re.status) === 404 && ct(null), ((k = H == null ? void 0 : H.response) == null ? void 0 : k.status) === 401 && (ct(null), Zt(null))) : (console.error("Failed to add product to basket:", H.message), Ue.error("Failed to add product to cart", {
554
+ }), ((se = V == null ? void 0 : V.response) == null ? void 0 : se.status) === 404 || // Basket not found
555
+ ((dt = V == null ? void 0 : V.response) == null ? void 0 : dt.status) === 401 ? (((Re = V == null ? void 0 : V.response) == null ? void 0 : Re.status) === 404 && ct(null), ((N = V == null ? void 0 : V.response) == null ? void 0 : N.status) === 401 && (ct(null), Zt(null))) : (console.error("Failed to add product to basket:", V.message), Ue.error("Failed to add product to cart", {
556
556
  position: "bottom-right",
557
557
  autoClose: 3e3
558
558
  }));
@@ -664,7 +664,7 @@ const ct = (e) => {
664
664
  ] })
665
665
  ] }) }),
666
666
  /* @__PURE__ */ a("div", { className: "mt-2 flex flex-row items-center gap-2", children: Array.from({ length: 5 }).map((C, T) => {
667
- var N;
667
+ var S;
668
668
  return /* @__PURE__ */ a(
669
669
  Ko,
670
670
  {
@@ -672,7 +672,7 @@ const ct = (e) => {
672
672
  width: "20",
673
673
  height: "20",
674
674
  className: `text-yellow-500
675
- ${((N = r == null ? void 0 : r.rating) == null ? void 0 : N.rate) > T ? "text-yellow-500" : "text-gray-300"}
675
+ ${((S = r == null ? void 0 : r.rating) == null ? void 0 : S.rate) > T ? "text-yellow-500" : "text-gray-300"}
676
676
  `
677
677
  },
678
678
  T
@@ -731,12 +731,12 @@ const ct = (e) => {
731
731
  Others: "others"
732
732
  }, s = Je(null), i = Je(null), c = Je(null), l = Je(null), [h, g] = v(null);
733
733
  Je(null);
734
- const [x, y] = v(!1), [I, C] = v(!1), [T, N] = v(!1), [P, G] = v(!1), [V, K] = v(!1), [ve, F] = v(!1), [D, ge] = v(""), [te, se] = v(""), dt = (p) => ({
734
+ const [x, y] = v(!1), [I, C] = v(!1), [T, S] = v(!1), [F, X] = v(!1), [H, K] = v(!1), [ve, P] = v(!1), [D, ge] = v(""), [te, se] = v(""), dt = (p) => ({
735
735
  id: p.id,
736
736
  title: p.name,
737
737
  image: p.image ?? "",
738
738
  price: p.price ?? 0
739
- }), [Re, k] = v([]), H = Je(null), M = Gt((p) => p.store.store), je = Gt((p) => p.product.product);
739
+ }), [Re, N] = v([]), V = Je(null), M = Xt((p) => p.store.store), Oe = Xt((p) => p.product.product);
740
740
  he(() => {
741
741
  const p = localStorage.getItem(
742
742
  `access_token_${e.siteId}`
@@ -745,7 +745,7 @@ const ct = (e) => {
745
745
  );
746
746
  if (p && B === p) {
747
747
  const A = localStorage.getItem("chatHistory");
748
- A && k(JSON.parse(A));
748
+ A && N(JSON.parse(A));
749
749
  } else
750
750
  localStorage.setItem("chatHistory", JSON.stringify([])), localStorage.setItem(
751
751
  `chat-token-${e.siteId}`,
@@ -758,20 +758,20 @@ const ct = (e) => {
758
758
  );
759
759
  p && localStorage.setItem(`chat-token-${e.siteId}`, p);
760
760
  }, [Re]);
761
- const kt = () => {
762
- N(!0), setTimeout(() => C(!0), 10);
761
+ const St = () => {
762
+ S(!0), setTimeout(() => C(!0), 10);
763
763
  }, ot = () => {
764
- C(!1), setTimeout(() => N(!1), 300);
764
+ C(!1), setTimeout(() => S(!1), 300);
765
765
  };
766
766
  he(() => {
767
- x ? kt() : ot();
767
+ x ? St() : ot();
768
768
  }, [x]);
769
- const He = (p) => {
769
+ const Ve = (p) => {
770
770
  se(o[p]);
771
771
  };
772
772
  he(() => {
773
- T && H.current && H.current.scrollTo({
774
- top: H.current.scrollHeight,
773
+ T && V.current && V.current.scrollTo({
774
+ top: V.current.scrollHeight,
775
775
  behavior: "smooth"
776
776
  });
777
777
  }, [Re, T]);
@@ -781,8 +781,8 @@ const ct = (e) => {
781
781
  };
782
782
  he(() => {
783
783
  if (e != null && e.siteId) {
784
- const { clientID: p, host: B, organizationID: A, shortCode: X, siteId: W } = e;
785
- sessionStorage.setItem("Host", B), sessionStorage.setItem("SiteId", W), sessionStorage.setItem("pubCfg", btoa(p)), sessionStorage.setItem("envRef", X), sessionStorage.setItem("orgRef", A);
784
+ const { clientID: p, host: B, organizationID: A, shortCode: G, siteId: W } = e;
785
+ sessionStorage.setItem("Host", B), sessionStorage.setItem("SiteId", W), sessionStorage.setItem("pubCfg", btoa(p)), sessionStorage.setItem("envRef", G), sessionStorage.setItem("orgRef", A);
786
786
  }
787
787
  Te(), console.log("scapi environment v1");
788
788
  }, []), he(() => {
@@ -798,15 +798,15 @@ const ct = (e) => {
798
798
  const A = await L();
799
799
  if (console.log(A, "interests of customer", qt), !!A)
800
800
  try {
801
- k(
801
+ N(
802
802
  (ee) => ee.map(
803
803
  (fe, Ne) => Ne === ee.length - 1 ? { ...fe, secondaryLoading: !0 } : fe
804
804
  )
805
805
  );
806
- const X = await hr(ke, $e);
807
- if (!X) throw new Error("Failed to fetch token");
808
- const W = localStorage.getItem("customerNumber"), j = localStorage.getItem("isLoggedIn"), Y = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
809
- registered: String(j || !1),
806
+ const G = await hr(ke, $e);
807
+ if (!G) throw new Error("Failed to fetch token");
808
+ const W = localStorage.getItem("customerNumber"), O = localStorage.getItem("isLoggedIn"), Y = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
809
+ registered: String(O || !1),
810
810
  userId: String(W || (/* @__PURE__ */ new Date()).getTime())
811
811
  }).toString()}`, q = JSON.stringify({
812
812
  flowId: "Q166PR519W",
@@ -822,7 +822,7 @@ const ct = (e) => {
822
822
  method: "POST",
823
823
  headers: {
824
824
  "Content-Type": "application/json",
825
- Authorization: `Bearer ${X}`
825
+ Authorization: `Bearer ${G}`
826
826
  },
827
827
  body: q
828
828
  });
@@ -841,7 +841,7 @@ const ct = (e) => {
841
841
  const b = me.slice(5).trim();
842
842
  try {
843
843
  const _e = JSON.parse(b);
844
- _e.index === 0 && k(
844
+ _e.index === 0 && N(
845
845
  (z) => z.map(
846
846
  (J, Ie) => Ie === z.length - 1 ? {
847
847
  ...J,
@@ -851,7 +851,7 @@ const ct = (e) => {
851
851
  )
852
852
  );
853
853
  } catch (_e) {
854
- k(
854
+ N(
855
855
  (z) => z.map(
856
856
  (J, Ie) => Ie === z.length - 1 ? { ...J, secondaryLoading: !1 } : J
857
857
  )
@@ -859,13 +859,13 @@ const ct = (e) => {
859
859
  }
860
860
  }
861
861
  }
862
- } catch (X) {
863
- console.error("Secondary flow error:", X);
862
+ } catch (G) {
863
+ console.error("Secondary flow error:", G);
864
864
  }
865
865
  }, Le = async (p) => {
866
866
  const B = p || D.trim();
867
867
  if (B) {
868
- K(!0), ge(""), s.current = null, i.current = null, c.current = null, l.current = null, k((A) => [
868
+ K(!0), ge(""), s.current = null, i.current = null, c.current = null, l.current = null, N((A) => [
869
869
  ...A,
870
870
  {
871
871
  query: B,
@@ -876,12 +876,12 @@ const ct = (e) => {
876
876
  }
877
877
  ]);
878
878
  try {
879
- const A = te, X = localStorage.getItem("customerNumber"), W = localStorage.getItem("isLoggedIn"), j = await hr(ke, $e);
880
- if (!j)
879
+ const A = te, G = localStorage.getItem("customerNumber"), W = localStorage.getItem("isLoggedIn"), O = await hr(ke, $e);
880
+ if (!O)
881
881
  throw new Error("Failed to obtain access token");
882
882
  const Y = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
883
883
  registered: String(W || !1),
884
- userId: String(X || (/* @__PURE__ */ new Date()).getTime())
884
+ userId: String(G || (/* @__PURE__ */ new Date()).getTime())
885
885
  }).toString()}`, q = JSON.stringify({
886
886
  flowId: "MMHQKYI1NE",
887
887
  flowAliasId: "SZF9ZK1ATE",
@@ -894,7 +894,7 @@ const ct = (e) => {
894
894
  method: "POST",
895
895
  headers: {
896
896
  "Content-Type": "application/json",
897
- Authorization: `Bearer ${j}`
897
+ Authorization: `Bearer ${O}`
898
898
  },
899
899
  body: q
900
900
  });
@@ -904,7 +904,7 @@ const ct = (e) => {
904
904
  const ze = Z.body.getReader(), We = new TextDecoder();
905
905
  let Se = "", ee = "";
906
906
  for (; ; ) {
907
- F(!0);
907
+ P(!0);
908
908
  const { done: fe, value: Ne } = await ze.read();
909
909
  if (fe) break;
910
910
  Se += We.decode(Ne, { stream: !0 });
@@ -916,7 +916,7 @@ const ct = (e) => {
916
916
  const _e = b.slice(5).trim();
917
917
  try {
918
918
  const z = JSON.parse(_e);
919
- z.index == 1 && (ee = z.data), k(
919
+ z.index == 1 && (ee = z.data), N(
920
920
  (J) => J.map(
921
921
  (Ie, ye) => ye === J.length - 1 ? {
922
922
  ...Ie,
@@ -929,7 +929,7 @@ const ct = (e) => {
929
929
  }
930
930
  }
931
931
  }
932
- Oe(we(ee));
932
+ je(we(ee));
933
933
  } catch (A) {
934
934
  console.error("Error sending message to Tanya:", A);
935
935
  } finally {
@@ -941,25 +941,25 @@ const ct = (e) => {
941
941
  /top five relevant product or category names are: (.*)/i
942
942
  ), W = (B ? B[1] : p).split(", ").map((ue) => ue.replace(/\s*(Toys|Bags|Miniature|etc\.*)\s*/gi, "").trim());
943
943
  return [...new Set(W)].filter(Boolean).join(",");
944
- }, Oe = async (p) => {
945
- var A, X, W;
944
+ }, je = async (p) => {
945
+ var A, G, W;
946
946
  const B = typeof p == "string" ? p.split(",") : p;
947
- F(!0);
947
+ P(!0);
948
948
  try {
949
- const j = await Promise.all(
949
+ const O = await Promise.all(
950
950
  B.map((q) => aa(q).catch(() => []))
951
951
  // prevent Promise.all crash
952
952
  ), ue = B.map((q, Z) => ({
953
953
  keyword: q,
954
- items: j[Z] ?? [],
954
+ items: O[Z] ?? [],
955
955
  loading: !1
956
- })).filter((q) => q.items.length > 0), Y = (X = (A = ue[0]) == null ? void 0 : A.items) == null ? void 0 : X[0];
956
+ })).filter((q) => q.items.length > 0), Y = (G = (A = ue[0]) == null ? void 0 : A.items) == null ? void 0 : G[0];
957
957
  if (Y) {
958
958
  i.current = Y.product_id, s.current = Y.product_name, c.current = (W = Y.image) == null ? void 0 : W.link;
959
959
  const q = typeof Y.price == "number" ? Y.price : null;
960
960
  l.current = q;
961
961
  }
962
- if (k(
962
+ if (N(
963
963
  (q) => q.map(
964
964
  (Z, ze) => ze === q.length - 1 ? {
965
965
  ...Z,
@@ -980,18 +980,18 @@ const ct = (e) => {
980
980
  );
981
981
  q != null && q.isGuest || (console.log("running secondary flow", qt), Ae(s.current, 0));
982
982
  }
983
- } catch (j) {
984
- console.error("error in keyword search", j);
983
+ } catch (O) {
984
+ console.error("error in keyword search", O);
985
985
  } finally {
986
- F(!1);
986
+ P(!1);
987
987
  }
988
988
  }, ie = async (p, B) => {
989
- var A, X, W, j, ue, Y, q, Z, ze, We, Se, ee, fe, Ne, me;
990
- G(!0);
989
+ var A, G, W, O, ue, Y, q, Z, ze, We, Se, ee, fe, Ne, me;
990
+ X(!0);
991
991
  try {
992
992
  const b = await Rn(p.id);
993
- if (!((X = (A = b == null ? void 0 : b.variants) == null ? void 0 : A[0]) != null && X.product_id || (j = (W = b == null ? void 0 : b.variants) == null ? void 0 : W[0]) != null && j.productId) && !(b.type.item || b.type.bundle)) {
994
- G(!1), Ue.error("Variants not found", {
993
+ if (!((G = (A = b == null ? void 0 : b.variants) == null ? void 0 : A[0]) != null && G.product_id || (O = (W = b == null ? void 0 : b.variants) == null ? void 0 : W[0]) != null && O.productId) && !(b.type.item || b.type.bundle)) {
994
+ X(!1), Ue.error("Variants not found", {
995
995
  position: "bottom-right",
996
996
  autoClose: 1e3
997
997
  }), console.error("No product variant found");
@@ -1006,8 +1006,8 @@ const ct = (e) => {
1006
1006
  console.log(_e, "product data", "app version", qt);
1007
1007
  const z = JSON.parse(
1008
1008
  sessionStorage.getItem("customerData") || "{}"
1009
- ), J = (z == null ? void 0 : z.basketId) || localStorage.getItem(jt), Ie = !1, ye = localStorage.getItem($t), Ve = Date.now();
1010
- if (!Ie || !ye || Ve >= parseInt(ye)) {
1009
+ ), J = (z == null ? void 0 : z.basketId) || localStorage.getItem(Ot), Ie = !1, ye = localStorage.getItem($t), He = Date.now();
1010
+ if (!Ie || !ye || He >= parseInt(ye)) {
1011
1011
  const zt = await Un();
1012
1012
  let { customer_token: le } = await qn(
1013
1013
  zt
@@ -1016,9 +1016,9 @@ const ct = (e) => {
1016
1016
  console.error("Failed to get customer_token");
1017
1017
  return;
1018
1018
  }
1019
- const Ce = Ve + 300 * 1e3;
1019
+ const Ce = He + 300 * 1e3;
1020
1020
  if (Zt(le), localStorage.setItem($t, Ce.toString()), console.log(J, "basketIdFromCustomer"), J) {
1021
- const pe = await Hn({
1021
+ const pe = await Vn({
1022
1022
  basketId: J,
1023
1023
  customer_token: le
1024
1024
  });
@@ -1035,25 +1035,25 @@ const ct = (e) => {
1035
1035
  closeOnClick: !0,
1036
1036
  pauseOnHover: !0,
1037
1037
  draggable: !0
1038
- }), Xt(J), G(!1));
1038
+ }), Gt(J), X(!1));
1039
1039
  return;
1040
1040
  }
1041
1041
  }
1042
- const St = {
1042
+ const Nt = {
1043
1043
  productItems: [
1044
1044
  {
1045
1045
  productId: ((Z = b.variants) == null ? void 0 : Z[0].product_id) || ((ze = b.variants) == null ? void 0 : ze[0].productId) || (b == null ? void 0 : b.id),
1046
1046
  quantity: 1
1047
1047
  }
1048
1048
  ]
1049
- }, _ = await Cr(le, St);
1049
+ }, _ = await Cr(le, Nt);
1050
1050
  if (console.log(
1051
1051
  _,
1052
1052
  _ == null ? void 0 : _.basket_id,
1053
1053
  _ == null ? void 0 : _.basketId,
1054
1054
  "the basket response"
1055
1055
  ), !(_ != null && _.basket_id || !(_ != null && _.basketId))) {
1056
- G(!1), console.error("Failed to create basket");
1056
+ X(!1), console.error("Failed to create basket");
1057
1057
  return;
1058
1058
  }
1059
1059
  ct(
@@ -1073,10 +1073,10 @@ const ct = (e) => {
1073
1073
  closeOnClick: !0,
1074
1074
  pauseOnHover: !0,
1075
1075
  draggable: !0
1076
- }), Xt(_.basket_id || (_ == null ? void 0 : _.basketId));
1076
+ }), Gt(_.basket_id || (_ == null ? void 0 : _.basketId));
1077
1077
  }
1078
1078
  } catch (b) {
1079
- G(!1), console.error("Error adding to cart:", b), Ue.error("Failed to add product to cart", {
1079
+ X(!1), console.error("Error adding to cart:", b), Ue.error("Failed to add product to cart", {
1080
1080
  position: "bottom-right",
1081
1081
  autoClose: 3e3
1082
1082
  }), ((ee = b == null ? void 0 : b.response) == null ? void 0 : ee.status) === 404 || // Basket not found
@@ -1085,7 +1085,7 @@ const ct = (e) => {
1085
1085
  autoClose: 3e3
1086
1086
  }));
1087
1087
  }
1088
- G(!1);
1088
+ X(!1);
1089
1089
  };
1090
1090
  return he(() => {
1091
1091
  T ? setTimeout(() => C(!0), 10) : C(!1);
@@ -1297,12 +1297,12 @@ const ct = (e) => {
1297
1297
  /* @__PURE__ */ d(
1298
1298
  "div",
1299
1299
  {
1300
- className: `flex flex-col h-full ${je ? "lg:w-2/3 w-full" : "w-full"}`,
1300
+ className: `flex flex-col h-full ${Oe ? "lg:w-2/3 w-full" : "w-full"}`,
1301
1301
  children: [
1302
1302
  /* @__PURE__ */ d(
1303
1303
  "div",
1304
1304
  {
1305
- ref: H,
1305
+ ref: V,
1306
1306
  className: "overflow-y-auto pr-5 pb-2 space-y-4 hide-scrollbar flex-grow mb-24",
1307
1307
  children: [
1308
1308
  (M == null ? void 0 : M.whomRequired) && /* @__PURE__ */ d(
@@ -1314,7 +1314,7 @@ const ct = (e) => {
1314
1314
  /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2 mt-2", children: n.map((p) => /* @__PURE__ */ a(
1315
1315
  "button",
1316
1316
  {
1317
- onClick: () => He(p),
1317
+ onClick: () => Ve(p),
1318
1318
  className: "px-2 py-2 font-semibold text-xs text-[#18181B] bg-[#F3F3F3] rounded-2xl",
1319
1319
  style: {
1320
1320
  backgroundColor: te === o[p] ? "#FFFFFF" : "#F3F3F3",
@@ -1328,7 +1328,7 @@ const ct = (e) => {
1328
1328
  }
1329
1329
  ),
1330
1330
  Re.map((p, B) => {
1331
- var A, X;
1331
+ var A, G;
1332
1332
  return /* @__PURE__ */ d("div", { children: [
1333
1333
  /* @__PURE__ */ a(
1334
1334
  "div",
@@ -1355,7 +1355,7 @@ const ct = (e) => {
1355
1355
  }
1356
1356
  ) }),
1357
1357
  ve && !p.response.includes("Thinking") && ((A = p.products) == null ? void 0 : A.length) == 0 && /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("p", { className: "text-sm animate-pulse font-nunitoSans font-bold text-[#000000] bg-[#E2DBFF] border border-[#C9C2DE] rounded-l-xl p-2 m-3 mb-4 rounded-br-xl max-w-[75%]", children: "Finding best products for you" }) }),
1358
- (p == null ? void 0 : p.products) && ((X = p == null ? void 0 : p.products) == null ? void 0 : X.length) > 0 && /* @__PURE__ */ a(
1358
+ (p == null ? void 0 : p.products) && ((G = p == null ? void 0 : p.products) == null ? void 0 : G.length) > 0 && /* @__PURE__ */ a(
1359
1359
  ua,
1360
1360
  {
1361
1361
  chat: p.products,
@@ -1371,7 +1371,7 @@ const ct = (e) => {
1371
1371
  children: "Why not explore these inquiries..."
1372
1372
  }
1373
1373
  ),
1374
- p.potentialQuestions.split(",").map((W, j) => /* @__PURE__ */ a(
1374
+ p.potentialQuestions.split(",").map((W, O) => /* @__PURE__ */ a(
1375
1375
  "button",
1376
1376
  {
1377
1377
  className: `cursor-pointer font-nunitoSans font-semibold text-[#232323] border bg-[#804C9E0D] border-${M.themeDarkColor} m-1 rounded-xl px-2 py-1`,
@@ -1381,7 +1381,7 @@ const ct = (e) => {
1381
1381
  },
1382
1382
  children: W
1383
1383
  },
1384
- j
1384
+ O
1385
1385
  ))
1386
1386
  ] }),
1387
1387
  (p == null ? void 0 : p.secondaryLoading) && /* @__PURE__ */ a("div", { className: "mt-3 mb-4 px-4", children: /* @__PURE__ */ d(
@@ -1485,18 +1485,18 @@ const ct = (e) => {
1485
1485
  "button",
1486
1486
  {
1487
1487
  className: "px-3 py-1 text-sm",
1488
- onClick: () => k(
1488
+ onClick: () => N(
1489
1489
  (W) => W.map(
1490
- (j, ue) => ue === B && j.productSnapshot ? {
1491
- ...j,
1490
+ (O, ue) => ue === B && O.productSnapshot ? {
1491
+ ...O,
1492
1492
  productSnapshot: {
1493
- ...j.productSnapshot,
1493
+ ...O.productSnapshot,
1494
1494
  quantity: Math.max(
1495
1495
  1,
1496
- j.productSnapshot.quantity - 1
1496
+ O.productSnapshot.quantity - 1
1497
1497
  )
1498
1498
  }
1499
- } : j
1499
+ } : O
1500
1500
  )
1501
1501
  ),
1502
1502
  style: {
@@ -1511,15 +1511,15 @@ const ct = (e) => {
1511
1511
  "button",
1512
1512
  {
1513
1513
  className: "px-3 py-1 text-sm",
1514
- onClick: () => k(
1514
+ onClick: () => N(
1515
1515
  (W) => W.map(
1516
- (j, ue) => ue === B && j.productSnapshot ? {
1517
- ...j,
1516
+ (O, ue) => ue === B && O.productSnapshot ? {
1517
+ ...O,
1518
1518
  productSnapshot: {
1519
- ...j.productSnapshot,
1520
- quantity: j.productSnapshot.quantity + 1
1519
+ ...O.productSnapshot,
1520
+ quantity: O.productSnapshot.quantity + 1
1521
1521
  }
1522
- } : j
1522
+ } : O
1523
1523
  )
1524
1524
  ),
1525
1525
  style: {
@@ -1541,14 +1541,14 @@ const ct = (e) => {
1541
1541
  p.productSnapshot.quantity
1542
1542
  );
1543
1543
  },
1544
- disabled: P,
1544
+ disabled: F,
1545
1545
  className: "px-4 py-2 rounded-full font-medium",
1546
1546
  style: {
1547
1547
  background: M.tanyaThemeColor,
1548
1548
  color: (M == null ? void 0 : M.tanyaThemeContrastColor) || "#fff",
1549
- opacity: P ? 0.8 : 1
1549
+ opacity: F ? 0.8 : 1
1550
1550
  },
1551
- children: P ? "Adding..." : "Add to cart"
1551
+ children: F ? "Adding..." : "Add to cart"
1552
1552
  }
1553
1553
  )
1554
1554
  ] })
@@ -1580,7 +1580,7 @@ const ct = (e) => {
1580
1580
  autoFocus: !0,
1581
1581
  onChange: (p) => ge(p.target.value),
1582
1582
  onKeyDown: (p) => {
1583
- p.key === "Enter" && !V && Le();
1583
+ p.key === "Enter" && !H && Le();
1584
1584
  }
1585
1585
  }
1586
1586
  ),
@@ -1588,10 +1588,10 @@ const ct = (e) => {
1588
1588
  "button",
1589
1589
  {
1590
1590
  type: "submit",
1591
- disabled: V,
1591
+ disabled: H,
1592
1592
  className: "p-3",
1593
1593
  onClick: () => Le(),
1594
- children: V ? /* @__PURE__ */ a(
1594
+ children: H ? /* @__PURE__ */ a(
1595
1595
  "div",
1596
1596
  {
1597
1597
  className: "p-3 animate-spin rounded-full h-3 w-3 border-b-2",
@@ -1649,14 +1649,14 @@ function ga(e, t) {
1649
1649
  }
1650
1650
  e.prototype = t === null ? Object.create(t) : (r.prototype = t.prototype, new r());
1651
1651
  }
1652
- var Xe = function() {
1653
- return Xe = Object.assign || function(t) {
1652
+ var Ge = function() {
1653
+ return Ge = Object.assign || function(t) {
1654
1654
  for (var r, n = 1, o = arguments.length; n < o; n++) {
1655
1655
  r = arguments[n];
1656
1656
  for (var s in r) Object.prototype.hasOwnProperty.call(r, s) && (t[s] = r[s]);
1657
1657
  }
1658
1658
  return t;
1659
- }, Xe.apply(this, arguments);
1659
+ }, Ge.apply(this, arguments);
1660
1660
  };
1661
1661
  function wa(e, t) {
1662
1662
  var r = {};
@@ -1668,7 +1668,7 @@ function wa(e, t) {
1668
1668
  }
1669
1669
  var ir = "Invariant Violation", sn = Object.setPrototypeOf, ya = sn === void 0 ? function(e, t) {
1670
1670
  return e.__proto__ = t, e;
1671
- } : sn, Vn = (
1671
+ } : sn, Hn = (
1672
1672
  /** @class */
1673
1673
  (function(e) {
1674
1674
  ga(t, e);
@@ -1682,7 +1682,7 @@ var ir = "Invariant Violation", sn = Object.setPrototypeOf, ya = sn === void 0 ?
1682
1682
  );
1683
1683
  function lt(e, t) {
1684
1684
  if (!e)
1685
- throw new Vn(t);
1685
+ throw new Hn(t);
1686
1686
  }
1687
1687
  var Yn = ["debug", "log", "warn", "error", "silent"], xa = Yn.indexOf("log");
1688
1688
  function Rt(e) {
@@ -1697,19 +1697,19 @@ function Rt(e) {
1697
1697
  e.debug = Rt("debug"), e.log = Rt("log"), e.warn = Rt("warn"), e.error = Rt("error");
1698
1698
  })(lt || (lt = {}));
1699
1699
  var Jn = "3.14.0";
1700
- function ht(e) {
1700
+ function gt(e) {
1701
1701
  try {
1702
1702
  return e();
1703
1703
  } catch {
1704
1704
  }
1705
1705
  }
1706
- const yr = ht(function() {
1706
+ const yr = gt(function() {
1707
1707
  return globalThis;
1708
- }) || ht(function() {
1708
+ }) || gt(function() {
1709
1709
  return window;
1710
- }) || ht(function() {
1710
+ }) || gt(function() {
1711
1711
  return self;
1712
- }) || ht(function() {
1712
+ }) || gt(function() {
1713
1713
  return global;
1714
1714
  }) || // We don't expect the Function constructor ever to be invoked at runtime, as
1715
1715
  // long as at least one of globalThis, window, self, or global is defined, so
@@ -1717,8 +1717,8 @@ const yr = ht(function() {
1717
1717
  // detect syntactic usage of the Function constructor. If you think you can
1718
1718
  // improve your static analysis to detect this obfuscation, think again. This
1719
1719
  // is an arms race you cannot win, at least not in JavaScript.
1720
- ht(function() {
1721
- return ht.constructor("return this")();
1720
+ gt(function() {
1721
+ return gt.constructor("return this")();
1722
1722
  });
1723
1723
  var ln = /* @__PURE__ */ new Map();
1724
1724
  function ba(e) {
@@ -1731,7 +1731,7 @@ function va(e, t) {
1731
1731
  return o === void 0 ? r : o;
1732
1732
  }, t).split(JSON.stringify(r)).join("<undefined>");
1733
1733
  }
1734
- function Ht(e) {
1734
+ function Vt(e) {
1735
1735
  return function(t) {
1736
1736
  for (var r = [], n = 1; n < arguments.length; n++)
1737
1737
  r[n - 1] = arguments[n];
@@ -1747,15 +1747,15 @@ var lr = Object.assign(function(t, r) {
1747
1747
  n[o - 2] = arguments[o];
1748
1748
  t || lt(t, _r(r, n) || Ir(r, n));
1749
1749
  }, {
1750
- debug: Ht(lt.debug),
1751
- log: Ht(lt.log),
1752
- warn: Ht(lt.warn),
1753
- error: Ht(lt.error)
1750
+ debug: Vt(lt.debug),
1751
+ log: Vt(lt.log),
1752
+ warn: Vt(lt.warn),
1753
+ error: Vt(lt.error)
1754
1754
  });
1755
1755
  function Kn(e) {
1756
1756
  for (var t = [], r = 1; r < arguments.length; r++)
1757
1757
  t[r - 1] = arguments[r];
1758
- return new Vn(_r(e, t) || Ir(e, t));
1758
+ return new Hn(_r(e, t) || Ir(e, t));
1759
1759
  }
1760
1760
  var cn = Symbol.for("ApolloErrorMessageHandler_" + Jn);
1761
1761
  function Wn(e) {
@@ -1866,7 +1866,7 @@ const cr = "@wry/context:Slot", Ca = (
1866
1866
  // back to using the Array constructor as a namespace, but that was flagged in
1867
1867
  // https://github.com/benjamn/wryware/issues/347, and can be avoided.
1868
1868
  /* @__PURE__ */ Object.create(null)
1869
- ), fn = Ca, Pr = fn[cr] || // Earlier versions of this package stored the globalKey property on the Array
1869
+ ), fn = Ca, Fr = fn[cr] || // Earlier versions of this package stored the globalKey property on the Array
1870
1870
  // constructor, so we check there as well, to prevent Slot class duplication.
1871
1871
  Array[cr] || (function(e) {
1872
1872
  try {
@@ -1885,8 +1885,8 @@ Array[cr] || (function(e) {
1885
1885
  } finally {
1886
1886
  return e;
1887
1887
  }
1888
- })(Na()), { bind: xi, noContext: bi } = Pr;
1889
- new Pr();
1888
+ })(Na()), { bind: yi, noContext: xi } = Fr;
1889
+ new Fr();
1890
1890
  function _a(e, t) {
1891
1891
  var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
1892
1892
  if (r) return (r = r.call(e)).next.bind(r);
@@ -1920,7 +1920,7 @@ function pn(e, t) {
1920
1920
  n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);
1921
1921
  }
1922
1922
  }
1923
- function Fr(e, t, r) {
1923
+ function Pr(e, t, r) {
1924
1924
  return t && pn(e.prototype, t), r && pn(e, r), Object.defineProperty(e, "prototype", { writable: !1 }), e;
1925
1925
  }
1926
1926
  var Er = function() {
@@ -1931,7 +1931,7 @@ var Er = function() {
1931
1931
  return Tr(e) ? Symbol[e] : "@@" + e;
1932
1932
  };
1933
1933
  Er() && !Tr("observable") && (Symbol.observable = Symbol("observable"));
1934
- var Pa = Ar("iterator"), xr = Ar("observable"), Qn = Ar("species");
1934
+ var Fa = Ar("iterator"), xr = Ar("observable"), Qn = Ar("species");
1935
1935
  function er(e, t) {
1936
1936
  var r = e[t];
1937
1937
  if (r != null) {
@@ -1939,15 +1939,15 @@ function er(e, t) {
1939
1939
  return r;
1940
1940
  }
1941
1941
  }
1942
- function Ft(e) {
1942
+ function Pt(e) {
1943
1943
  var t = e.constructor;
1944
1944
  return t !== void 0 && (t = t[Qn], t === null && (t = void 0)), t !== void 0 ? t : de;
1945
1945
  }
1946
- function Fa(e) {
1946
+ function Pa(e) {
1947
1947
  return e instanceof de;
1948
1948
  }
1949
- function bt(e) {
1950
- bt.log ? bt.log(e) : setTimeout(function() {
1949
+ function vt(e) {
1950
+ vt.log ? vt.log(e) : setTimeout(function() {
1951
1951
  throw e;
1952
1952
  });
1953
1953
  }
@@ -1956,11 +1956,11 @@ function Yt(e) {
1956
1956
  try {
1957
1957
  e();
1958
1958
  } catch (t) {
1959
- bt(t);
1959
+ vt(t);
1960
1960
  }
1961
1961
  });
1962
1962
  }
1963
- function Gn(e) {
1963
+ function Xn(e) {
1964
1964
  var t = e._cleanup;
1965
1965
  if (t !== void 0 && (e._cleanup = void 0, !!t))
1966
1966
  try {
@@ -1971,7 +1971,7 @@ function Gn(e) {
1971
1971
  r && r.call(t);
1972
1972
  }
1973
1973
  } catch (n) {
1974
- bt(n);
1974
+ vt(n);
1975
1975
  }
1976
1976
  }
1977
1977
  function br(e) {
@@ -1981,11 +1981,11 @@ function Ea(e) {
1981
1981
  var t = e._queue;
1982
1982
  if (t) {
1983
1983
  e._queue = void 0, e._state = "ready";
1984
- for (var r = 0; r < t.length && (Xn(e, t[r].type, t[r].value), e._state !== "closed"); ++r)
1984
+ for (var r = 0; r < t.length && (Gn(e, t[r].type, t[r].value), e._state !== "closed"); ++r)
1985
1985
  ;
1986
1986
  }
1987
1987
  }
1988
- function Xn(e, t, r) {
1988
+ function Gn(e, t, r) {
1989
1989
  e._state = "running";
1990
1990
  var n = e._observer;
1991
1991
  try {
@@ -2003,9 +2003,9 @@ function Xn(e, t, r) {
2003
2003
  break;
2004
2004
  }
2005
2005
  } catch (s) {
2006
- bt(s);
2006
+ vt(s);
2007
2007
  }
2008
- e._state === "closed" ? Gn(e) : e._state === "running" && (e._state = "ready");
2008
+ e._state === "closed" ? Xn(e) : e._state === "running" && (e._state = "ready");
2009
2009
  }
2010
2010
  function dr(e, t, r) {
2011
2011
  if (e._state !== "closed") {
@@ -2025,7 +2025,7 @@ function dr(e, t, r) {
2025
2025
  });
2026
2026
  return;
2027
2027
  }
2028
- Xn(e, t, r);
2028
+ Gn(e, t, r);
2029
2029
  }
2030
2030
  }
2031
2031
  var Ta = /* @__PURE__ */ (function() {
@@ -2041,8 +2041,8 @@ var Ta = /* @__PURE__ */ (function() {
2041
2041
  }
2042
2042
  var t = e.prototype;
2043
2043
  return t.unsubscribe = function() {
2044
- this._state !== "closed" && (br(this), Gn(this));
2045
- }, Fr(e, [{
2044
+ this._state !== "closed" && (br(this), Xn(this));
2045
+ }, Pr(e, [{
2046
2046
  key: "closed",
2047
2047
  get: function() {
2048
2048
  return this._state === "closed";
@@ -2059,7 +2059,7 @@ var Ta = /* @__PURE__ */ (function() {
2059
2059
  dr(this._subscription, "error", n);
2060
2060
  }, t.complete = function() {
2061
2061
  dr(this._subscription, "complete");
2062
- }, Fr(e, [{
2062
+ }, Pr(e, [{
2063
2063
  key: "closed",
2064
2064
  get: function() {
2065
2065
  return this._subscription._state === "closed";
@@ -2103,7 +2103,7 @@ var Ta = /* @__PURE__ */ (function() {
2103
2103
  }, t.map = function(n) {
2104
2104
  var o = this;
2105
2105
  if (typeof n != "function") throw new TypeError(n + " is not a function");
2106
- var s = Ft(this);
2106
+ var s = Pt(this);
2107
2107
  return new s(function(i) {
2108
2108
  return o.subscribe({
2109
2109
  next: function(c) {
@@ -2125,7 +2125,7 @@ var Ta = /* @__PURE__ */ (function() {
2125
2125
  }, t.filter = function(n) {
2126
2126
  var o = this;
2127
2127
  if (typeof n != "function") throw new TypeError(n + " is not a function");
2128
- var s = Ft(this);
2128
+ var s = Pt(this);
2129
2129
  return new s(function(i) {
2130
2130
  return o.subscribe({
2131
2131
  next: function(c) {
@@ -2147,7 +2147,7 @@ var Ta = /* @__PURE__ */ (function() {
2147
2147
  }, t.reduce = function(n) {
2148
2148
  var o = this;
2149
2149
  if (typeof n != "function") throw new TypeError(n + " is not a function");
2150
- var s = Ft(this), i = arguments.length > 1, c = !1, l = arguments[1], h = l;
2150
+ var s = Pt(this), i = arguments.length > 1, c = !1, l = arguments[1], h = l;
2151
2151
  return new s(function(g) {
2152
2152
  return o.subscribe({
2153
2153
  next: function(x) {
@@ -2173,7 +2173,7 @@ var Ta = /* @__PURE__ */ (function() {
2173
2173
  }, t.concat = function() {
2174
2174
  for (var n = this, o = arguments.length, s = new Array(o), i = 0; i < o; i++)
2175
2175
  s[i] = arguments[i];
2176
- var c = Ft(this);
2176
+ var c = Pt(this);
2177
2177
  return new c(function(l) {
2178
2178
  var h, g = 0;
2179
2179
  function x(y) {
@@ -2196,7 +2196,7 @@ var Ta = /* @__PURE__ */ (function() {
2196
2196
  }, t.flatMap = function(n) {
2197
2197
  var o = this;
2198
2198
  if (typeof n != "function") throw new TypeError(n + " is not a function");
2199
- var s = Ft(this);
2199
+ var s = Pt(this);
2200
2200
  return new s(function(i) {
2201
2201
  var c = [], l = o.subscribe({
2202
2202
  next: function(g) {
@@ -2245,11 +2245,11 @@ var Ta = /* @__PURE__ */ (function() {
2245
2245
  if (s) {
2246
2246
  var i = s.call(n);
2247
2247
  if (Object(i) !== i) throw new TypeError(i + " is not an object");
2248
- return Fa(i) && i.constructor === o ? i : new o(function(c) {
2248
+ return Pa(i) && i.constructor === o ? i : new o(function(c) {
2249
2249
  return i.subscribe(c);
2250
2250
  });
2251
2251
  }
2252
- if (Tr("iterator") && (s = er(n, Pa), s))
2252
+ if (Tr("iterator") && (s = er(n, Fa), s))
2253
2253
  return new o(function(c) {
2254
2254
  Yt(function() {
2255
2255
  if (!c.closed) {
@@ -2285,7 +2285,7 @@ var Ta = /* @__PURE__ */ (function() {
2285
2285
  }
2286
2286
  });
2287
2287
  });
2288
- }, Fr(e, null, [{
2288
+ }, Pr(e, null, [{
2289
2289
  key: Qn,
2290
2290
  get: function() {
2291
2291
  return this;
@@ -2295,11 +2295,11 @@ var Ta = /* @__PURE__ */ (function() {
2295
2295
  Er() && Object.defineProperty(de, Symbol("extensions"), {
2296
2296
  value: {
2297
2297
  symbol: xr,
2298
- hostReportError: bt
2298
+ hostReportError: vt
2299
2299
  },
2300
2300
  configurable: !0
2301
2301
  });
2302
- function Oa(e) {
2302
+ function ja(e) {
2303
2303
  var t, r = e.Symbol;
2304
2304
  if (typeof r == "function")
2305
2305
  if (r.observable)
@@ -2315,14 +2315,14 @@ function Oa(e) {
2315
2315
  t = "@@observable";
2316
2316
  return t;
2317
2317
  }
2318
- var yt;
2319
- typeof self < "u" ? yt = self : typeof window < "u" ? yt = window : typeof global < "u" ? yt = global : typeof module < "u" ? yt = module : yt = Function("return this")();
2320
- Oa(yt);
2318
+ var xt;
2319
+ typeof self < "u" ? xt = self : typeof window < "u" ? xt = window : typeof global < "u" ? xt = global : typeof module < "u" ? xt = module : xt = Function("return this")();
2320
+ ja(xt);
2321
2321
  var hn = de.prototype, gn = "@@observable";
2322
2322
  hn[gn] || (hn[gn] = function() {
2323
2323
  return this;
2324
2324
  });
2325
- function ja(e) {
2325
+ function Oa(e) {
2326
2326
  for (var t = [
2327
2327
  "query",
2328
2328
  "operationName",
@@ -2337,10 +2337,10 @@ function ja(e) {
2337
2337
  return e;
2338
2338
  }
2339
2339
  function $a(e, t) {
2340
- var r = Xe({}, e), n = function(s) {
2341
- typeof s == "function" ? r = Xe(Xe({}, r), s(r)) : r = Xe(Xe({}, r), s);
2340
+ var r = Ge({}, e), n = function(s) {
2341
+ typeof s == "function" ? r = Ge(Ge({}, r), s(r)) : r = Ge(Ge({}, r), s);
2342
2342
  }, o = function() {
2343
- return Xe({}, r);
2343
+ return Ge({}, r);
2344
2344
  };
2345
2345
  return Object.defineProperty(t, "setContext", {
2346
2346
  enumerable: !1,
@@ -2359,7 +2359,7 @@ function La(e) {
2359
2359
  };
2360
2360
  return t.operationName || (t.operationName = typeof t.query != "string" ? ka(t.query) || void 0 : ""), t;
2361
2361
  }
2362
- var za = Symbol.for("apollo.deprecations"), Da = yr, Ma = new Pr();
2362
+ var za = Symbol.for("apollo.deprecations"), Da = yr, Ma = new Fr();
2363
2363
  function Ba(e) {
2364
2364
  return Da[za] || (Ma.getValue() || []).includes(e);
2365
2365
  }
@@ -2372,7 +2372,7 @@ function wn(e, t) {
2372
2372
  function Et(e) {
2373
2373
  return typeof e == "function" ? new Zn(e) : e;
2374
2374
  }
2375
- function Vt(e) {
2375
+ function Ht(e) {
2376
2376
  return e.request.length <= 1;
2377
2377
  }
2378
2378
  var Zn = (
@@ -2391,19 +2391,19 @@ var Zn = (
2391
2391
  });
2392
2392
  }, e.split = function(t, r, n) {
2393
2393
  var o = Et(r), s = Et(n || new e(wn)), i;
2394
- return Vt(o) && Vt(s) ? i = new e(function(c) {
2394
+ return Ht(o) && Ht(s) ? i = new e(function(c) {
2395
2395
  return t(c) ? o.request(c) || de.of() : s.request(c) || de.of();
2396
2396
  }) : i = new e(function(c, l) {
2397
2397
  return t(c) ? o.request(c, l) || de.of() : s.request(c, l) || de.of();
2398
2398
  }), Object.assign(i, { left: o, right: s });
2399
2399
  }, e.execute = function(t, r) {
2400
- return t.request($a(r.context, La(ja(r)))) || de.of();
2400
+ return t.request($a(r.context, La(Oa(r)))) || de.of();
2401
2401
  }, e.concat = function(t, r) {
2402
2402
  var n = Et(t);
2403
- if (Vt(n))
2403
+ if (Ht(n))
2404
2404
  return globalThis.__DEV__ !== !1 && lr.warn(47, n), n;
2405
2405
  var o = Et(r), s;
2406
- return Vt(o) ? s = new e(function(i) {
2406
+ return Ht(o) ? s = new e(function(i) {
2407
2407
  return n.request(i, function(c) {
2408
2408
  return o.request(c) || de.of();
2409
2409
  }) || de.of();
@@ -2466,8 +2466,8 @@ const Ra = async () => {
2466
2466
  } catch (o) {
2467
2467
  return ae.isAxiosError(o) ? console.error("Error fetching token:", o.response || o.message) : console.error("Unexpected error:", o), null;
2468
2468
  }
2469
- }, Ha = "https://api.australia-southeast1.gcp.commercetools.com/kt-demo/graphql", Va = qo({
2470
- uri: `${Ha}`
2469
+ }, Va = "https://api.australia-southeast1.gcp.commercetools.com/kt-demo/graphql", Ha = qo({
2470
+ uri: `${Va}`
2471
2471
  }), Ya = qa(async (e, { headers: t }) => {
2472
2472
  const r = await Ra();
2473
2473
  return {
@@ -2477,16 +2477,16 @@ const Ra = async () => {
2477
2477
  }
2478
2478
  };
2479
2479
  }), Ja = new Ro({
2480
- link: Ya.concat(Va),
2481
- cache: new Ho(),
2480
+ link: Ya.concat(Ha),
2481
+ cache: new Vo(),
2482
2482
  defaultOptions: {
2483
2483
  watchQuery: {
2484
2484
  fetchPolicy: "cache-and-network"
2485
2485
  }
2486
2486
  }
2487
- }), vi = (e) => {
2487
+ }), bi = (e) => {
2488
2488
  const { tanyaConfig: t } = e;
2489
- return /* @__PURE__ */ a(Vo, { client: Ja, children: /* @__PURE__ */ a(ra, { children: /* @__PURE__ */ a(ha, { tanyaConfig: t }) }) });
2489
+ return /* @__PURE__ */ a(Ho, { client: Ja, children: /* @__PURE__ */ a(ra, { children: /* @__PURE__ */ a(ha, { tanyaConfig: t }) }) });
2490
2490
  };
2491
2491
  function Ka(e, t) {
2492
2492
  const r = e.icons, n = e.aliases || /* @__PURE__ */ Object.create(null), o = /* @__PURE__ */ Object.create(null);
@@ -2510,11 +2510,11 @@ const eo = Object.freeze({
2510
2510
  rotate: 0,
2511
2511
  vFlip: !1,
2512
2512
  hFlip: !1
2513
- }), Or = Object.freeze({
2513
+ }), jr = Object.freeze({
2514
2514
  ...eo,
2515
2515
  ...tr
2516
2516
  }), vr = Object.freeze({
2517
- ...Or,
2517
+ ...jr,
2518
2518
  body: "",
2519
2519
  hidden: !1
2520
2520
  });
@@ -2550,7 +2550,7 @@ function to(e, t) {
2550
2550
  }
2551
2551
  return r;
2552
2552
  }
2553
- const Ga = {
2553
+ const Xa = {
2554
2554
  provider: "",
2555
2555
  aliases: {},
2556
2556
  not_found: {},
@@ -2563,7 +2563,7 @@ function ur(e, t) {
2563
2563
  function ro(e) {
2564
2564
  if (typeof e != "object" || e === null) return null;
2565
2565
  const t = e;
2566
- if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !ur(e, Ga)) return null;
2566
+ if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !ur(e, Xa)) return null;
2567
2567
  const r = t.icons;
2568
2568
  for (const o in r) {
2569
2569
  const s = r[o];
@@ -2577,7 +2577,7 @@ function ro(e) {
2577
2577
  return t;
2578
2578
  }
2579
2579
  const xn = /* @__PURE__ */ Object.create(null);
2580
- function Xa(e, t) {
2580
+ function Ga(e, t) {
2581
2581
  return {
2582
2582
  provider: e,
2583
2583
  prefix: t,
@@ -2585,9 +2585,9 @@ function Xa(e, t) {
2585
2585
  missing: /* @__PURE__ */ new Set()
2586
2586
  };
2587
2587
  }
2588
- function vt(e, t) {
2588
+ function kt(e, t) {
2589
2589
  const r = xn[e] || (xn[e] = /* @__PURE__ */ Object.create(null));
2590
- return r[t] || (r[t] = Xa(e, t));
2590
+ return r[t] || (r[t] = Ga(e, t));
2591
2591
  }
2592
2592
  function no(e, t) {
2593
2593
  return ro(t) ? to(t, (r, n) => {
@@ -2643,14 +2643,14 @@ function ao(e) {
2643
2643
  function bn(e) {
2644
2644
  const t = typeof e == "string" ? rr(e, !0, Lt) : e;
2645
2645
  if (t) {
2646
- const r = vt(t.provider, t.prefix), n = t.name;
2646
+ const r = kt(t.provider, t.prefix), n = t.name;
2647
2647
  return r.icons[n] || (r.missing.has(n) ? null : void 0);
2648
2648
  }
2649
2649
  }
2650
2650
  function es(e, t) {
2651
2651
  const r = rr(e, !0, Lt);
2652
2652
  if (!r) return !1;
2653
- const n = vt(r.provider, r.prefix);
2653
+ const n = kt(r.provider, r.prefix);
2654
2654
  return t ? Za(n, r.name, t) : (n.missing.add(r.name), !0);
2655
2655
  }
2656
2656
  function ts(e, t) {
@@ -2666,7 +2666,7 @@ function ts(e, t) {
2666
2666
  prefix: r,
2667
2667
  name: "a"
2668
2668
  })) return !1;
2669
- const n = vt(t, r);
2669
+ const n = kt(t, r);
2670
2670
  return !!no(n, e);
2671
2671
  }
2672
2672
  const so = Object.freeze({
@@ -2718,7 +2718,7 @@ function ss(e, t, r) {
2718
2718
  const is = (e) => e === "unset" || e === "undefined" || e === "none";
2719
2719
  function ls(e, t) {
2720
2720
  const r = {
2721
- ...Or,
2721
+ ...jr,
2722
2722
  ...e
2723
2723
  }, n = {
2724
2724
  ...io,
@@ -2731,28 +2731,28 @@ function ls(e, t) {
2731
2731
  };
2732
2732
  let s = r.body;
2733
2733
  [r, n].forEach((T) => {
2734
- const N = [], P = T.hFlip, G = T.vFlip;
2735
- let V = T.rotate;
2736
- P ? G ? V += 2 : (N.push("translate(" + (o.width + o.left).toString() + " " + (0 - o.top).toString() + ")"), N.push("scale(-1 1)"), o.top = o.left = 0) : G && (N.push("translate(" + (0 - o.left).toString() + " " + (o.height + o.top).toString() + ")"), N.push("scale(1 -1)"), o.top = o.left = 0);
2734
+ const S = [], F = T.hFlip, X = T.vFlip;
2735
+ let H = T.rotate;
2736
+ F ? X ? H += 2 : (S.push("translate(" + (o.width + o.left).toString() + " " + (0 - o.top).toString() + ")"), S.push("scale(-1 1)"), o.top = o.left = 0) : X && (S.push("translate(" + (0 - o.left).toString() + " " + (o.height + o.top).toString() + ")"), S.push("scale(1 -1)"), o.top = o.left = 0);
2737
2737
  let K;
2738
- switch (V < 0 && (V -= Math.floor(V / 4) * 4), V = V % 4, V) {
2738
+ switch (H < 0 && (H -= Math.floor(H / 4) * 4), H = H % 4, H) {
2739
2739
  case 1:
2740
- K = o.height / 2 + o.top, N.unshift("rotate(90 " + K.toString() + " " + K.toString() + ")");
2740
+ K = o.height / 2 + o.top, S.unshift("rotate(90 " + K.toString() + " " + K.toString() + ")");
2741
2741
  break;
2742
2742
  case 2:
2743
- N.unshift("rotate(180 " + (o.width / 2 + o.left).toString() + " " + (o.height / 2 + o.top).toString() + ")");
2743
+ S.unshift("rotate(180 " + (o.width / 2 + o.left).toString() + " " + (o.height / 2 + o.top).toString() + ")");
2744
2744
  break;
2745
2745
  case 3:
2746
- K = o.width / 2 + o.left, N.unshift("rotate(-90 " + K.toString() + " " + K.toString() + ")");
2746
+ K = o.width / 2 + o.left, S.unshift("rotate(-90 " + K.toString() + " " + K.toString() + ")");
2747
2747
  break;
2748
2748
  }
2749
- V % 2 === 1 && (o.left !== o.top && (K = o.left, o.left = o.top, o.top = K), o.width !== o.height && (K = o.width, o.width = o.height, o.height = K)), N.length && (s = ss(s, '<g transform="' + N.join(" ") + '">', "</g>"));
2749
+ H % 2 === 1 && (o.left !== o.top && (K = o.left, o.left = o.top, o.top = K), o.width !== o.height && (K = o.width, o.width = o.height, o.height = K)), S.length && (s = ss(s, '<g transform="' + S.join(" ") + '">', "</g>"));
2750
2750
  });
2751
2751
  const i = n.width, c = n.height, l = o.width, h = o.height;
2752
2752
  let g, x;
2753
2753
  i === null ? (x = c === null ? "1em" : c === "auto" ? h : c, g = vn(x, l / h)) : (g = i === "auto" ? l : i, x = c === null ? vn(g, h / l) : c === "auto" ? h : c);
2754
- const y = {}, I = (T, N) => {
2755
- is(N) || (y[T] = N.toString());
2754
+ const y = {}, I = (T, S) => {
2755
+ is(S) || (y[T] = S.toString());
2756
2756
  };
2757
2757
  I("width", g), I("height", x);
2758
2758
  const C = [
@@ -2787,7 +2787,7 @@ function ms(e, t) {
2787
2787
  function Sr(e) {
2788
2788
  return kr[e] || kr[""];
2789
2789
  }
2790
- function jr(e) {
2790
+ function Or(e) {
2791
2791
  let t;
2792
2792
  if (typeof e.resources == "string") t = [e.resources];
2793
2793
  else if (t = e.resources, !(t instanceof Array) || !t.length) return null;
@@ -2804,9 +2804,9 @@ function jr(e) {
2804
2804
  }
2805
2805
  const $r = /* @__PURE__ */ Object.create(null), Tt = ["https://api.simplesvg.com", "https://api.unisvg.com"], Kt = [];
2806
2806
  for (; Tt.length > 0; ) Tt.length === 1 || Math.random() > 0.5 ? Kt.push(Tt.shift()) : Kt.push(Tt.pop());
2807
- $r[""] = jr({ resources: ["https://api.iconify.design"].concat(Kt) });
2807
+ $r[""] = Or({ resources: ["https://api.iconify.design"].concat(Kt) });
2808
2808
  function ps(e, t) {
2809
- const r = jr(t);
2809
+ const r = Or(t);
2810
2810
  return r === null ? !1 : ($r[e] = r, !0);
2811
2811
  }
2812
2812
  function Lr(e) {
@@ -2974,7 +2974,7 @@ function Cs(e) {
2974
2974
  return e.forEach((o) => {
2975
2975
  if (n.name === o.name && n.prefix === o.prefix && n.provider === o.provider) return;
2976
2976
  n = o;
2977
- const s = o.provider, i = o.prefix, c = o.name, l = r[s] || (r[s] = /* @__PURE__ */ Object.create(null)), h = l[i] || (l[i] = vt(s, i));
2977
+ const s = o.provider, i = o.prefix, c = o.name, l = r[s] || (r[s] = /* @__PURE__ */ Object.create(null)), h = l[i] || (l[i] = kt(s, i));
2978
2978
  let g;
2979
2979
  c in h.icons ? g = t.loaded : i === "" || h.missing.has(c) ? g = t.missing : g = t.pending;
2980
2980
  const x = {
@@ -3000,16 +3000,16 @@ const Is = {
3000
3000
  random: !1,
3001
3001
  dataAfterTimeout: !1
3002
3002
  };
3003
- function Ps(e, t, r, n) {
3003
+ function Fs(e, t, r, n) {
3004
3004
  const o = e.resources.length, s = e.random ? Math.floor(Math.random() * o) : e.index;
3005
3005
  let i;
3006
3006
  if (e.random) {
3007
- let F = e.resources.slice(0);
3008
- for (i = []; F.length > 1; ) {
3009
- const D = Math.floor(Math.random() * F.length);
3010
- i.push(F[D]), F = F.slice(0, D).concat(F.slice(D + 1));
3007
+ let P = e.resources.slice(0);
3008
+ for (i = []; P.length > 1; ) {
3009
+ const D = Math.floor(Math.random() * P.length);
3010
+ i.push(P[D]), P = P.slice(0, D).concat(P.slice(D + 1));
3011
3011
  }
3012
- i = i.concat(F);
3012
+ i = i.concat(P);
3013
3013
  } else i = e.resources.slice(s).concat(e.resources.slice(0, s));
3014
3014
  const c = Date.now();
3015
3015
  let l = "pending", h = 0, g, x = null, y = [], I = [];
@@ -3018,37 +3018,37 @@ function Ps(e, t, r, n) {
3018
3018
  x && (clearTimeout(x), x = null);
3019
3019
  }
3020
3020
  function T() {
3021
- l === "pending" && (l = "aborted"), C(), y.forEach((F) => {
3022
- F.status === "pending" && (F.status = "aborted");
3021
+ l === "pending" && (l = "aborted"), C(), y.forEach((P) => {
3022
+ P.status === "pending" && (P.status = "aborted");
3023
3023
  }), y = [];
3024
3024
  }
3025
- function N(F, D) {
3026
- D && (I = []), typeof F == "function" && I.push(F);
3025
+ function S(P, D) {
3026
+ D && (I = []), typeof P == "function" && I.push(P);
3027
3027
  }
3028
- function P() {
3028
+ function F() {
3029
3029
  return {
3030
3030
  startTime: c,
3031
3031
  payload: t,
3032
3032
  status: l,
3033
3033
  queriesSent: h,
3034
3034
  queriesPending: y.length,
3035
- subscribe: N,
3035
+ subscribe: S,
3036
3036
  abort: T
3037
3037
  };
3038
3038
  }
3039
- function G() {
3040
- l = "failed", I.forEach((F) => {
3041
- F(void 0, g);
3039
+ function X() {
3040
+ l = "failed", I.forEach((P) => {
3041
+ P(void 0, g);
3042
3042
  });
3043
3043
  }
3044
- function V() {
3045
- y.forEach((F) => {
3046
- F.status === "pending" && (F.status = "aborted");
3044
+ function H() {
3045
+ y.forEach((P) => {
3046
+ P.status === "pending" && (P.status = "aborted");
3047
3047
  }), y = [];
3048
3048
  }
3049
- function K(F, D, ge) {
3049
+ function K(P, D, ge) {
3050
3050
  const te = D !== "success";
3051
- switch (y = y.filter((se) => se !== F), l) {
3051
+ switch (y = y.filter((se) => se !== P), l) {
3052
3052
  case "pending":
3053
3053
  break;
3054
3054
  case "failed":
@@ -3058,15 +3058,15 @@ function Ps(e, t, r, n) {
3058
3058
  return;
3059
3059
  }
3060
3060
  if (D === "abort") {
3061
- g = ge, G();
3061
+ g = ge, X();
3062
3062
  return;
3063
3063
  }
3064
3064
  if (te) {
3065
- g = ge, y.length || (i.length ? ve() : G());
3065
+ g = ge, y.length || (i.length ? ve() : X());
3066
3066
  return;
3067
3067
  }
3068
- if (C(), V(), !e.random) {
3069
- const se = e.resources.indexOf(F.resource);
3068
+ if (C(), H(), !e.random) {
3069
+ const se = e.resources.indexOf(P.resource);
3070
3070
  se !== -1 && se !== e.index && (e.index = se);
3071
3071
  }
3072
3072
  l = "completed", I.forEach((se) => {
@@ -3076,27 +3076,27 @@ function Ps(e, t, r, n) {
3076
3076
  function ve() {
3077
3077
  if (l !== "pending") return;
3078
3078
  C();
3079
- const F = i.shift();
3080
- if (F === void 0) {
3079
+ const P = i.shift();
3080
+ if (P === void 0) {
3081
3081
  if (y.length) {
3082
3082
  x = setTimeout(() => {
3083
- C(), l === "pending" && (V(), G());
3083
+ C(), l === "pending" && (H(), X());
3084
3084
  }, e.timeout);
3085
3085
  return;
3086
3086
  }
3087
- G();
3087
+ X();
3088
3088
  return;
3089
3089
  }
3090
3090
  const D = {
3091
3091
  status: "pending",
3092
- resource: F,
3092
+ resource: P,
3093
3093
  callback: (ge, te) => {
3094
3094
  K(D, ge, te);
3095
3095
  }
3096
3096
  };
3097
- y.push(D), h++, x = setTimeout(ve, e.rotate), r(F, t, D.callback);
3097
+ y.push(D), h++, x = setTimeout(ve, e.rotate), r(P, t, D.callback);
3098
3098
  }
3099
- return setTimeout(ve), P;
3099
+ return setTimeout(ve), F;
3100
3100
  }
3101
3101
  function co(e) {
3102
3102
  const t = {
@@ -3108,7 +3108,7 @@ function co(e) {
3108
3108
  r = r.filter((c) => c().status === "pending");
3109
3109
  }
3110
3110
  function o(c, l, h) {
3111
- const g = Ps(t, c, l, (x, y) => {
3111
+ const g = Fs(t, c, l, (x, y) => {
3112
3112
  n(), h && h(x, y);
3113
3113
  });
3114
3114
  return r.push(g), g;
@@ -3129,7 +3129,7 @@ function co(e) {
3129
3129
  function Sn() {
3130
3130
  }
3131
3131
  const fr = /* @__PURE__ */ Object.create(null);
3132
- function Fs(e) {
3132
+ function Ps(e) {
3133
3133
  if (!fr[e]) {
3134
3134
  const t = Lr(e);
3135
3135
  if (!t) return;
@@ -3148,10 +3148,10 @@ function Es(e, t, r) {
3148
3148
  if (!s)
3149
3149
  return r(void 0, 424), Sn;
3150
3150
  o = s.send;
3151
- const i = Fs(e);
3151
+ const i = Ps(e);
3152
3152
  i && (n = i.redundancy);
3153
3153
  } else {
3154
- const s = jr(e);
3154
+ const s = Or(e);
3155
3155
  if (s) {
3156
3156
  n = co(s);
3157
3157
  const i = e.resources ? e.resources[0] : "", c = Sr(i);
@@ -3200,7 +3200,7 @@ function Cn(e, t) {
3200
3200
  t(null);
3201
3201
  }) : t(e);
3202
3202
  }
3203
- function Os(e, t) {
3203
+ function js(e, t) {
3204
3204
  e.iconsToLoad ? e.iconsToLoad = e.iconsToLoad.concat(t).sort() : e.iconsToLoad = t, e.iconsQueueFlag || (e.iconsQueueFlag = !0, setTimeout(() => {
3205
3205
  e.iconsQueueFlag = !1;
3206
3206
  const { provider: r, prefix: n } = e, o = e.iconsToLoad;
@@ -3239,7 +3239,7 @@ function Os(e, t) {
3239
3239
  });
3240
3240
  }));
3241
3241
  }
3242
- const js = (e, t) => {
3242
+ const Os = (e, t) => {
3243
3243
  const r = _s(e, !0, ao()), n = Cs(r);
3244
3244
  if (!n.pending.length) {
3245
3245
  let l = !0;
@@ -3254,15 +3254,15 @@ const js = (e, t) => {
3254
3254
  return n.pending.forEach((l) => {
3255
3255
  const { provider: h, prefix: g } = l;
3256
3256
  if (g === c && h === i) return;
3257
- i = h, c = g, s.push(vt(h, g));
3257
+ i = h, c = g, s.push(kt(h, g));
3258
3258
  const x = o[h] || (o[h] = /* @__PURE__ */ Object.create(null));
3259
3259
  x[g] || (x[g] = []);
3260
3260
  }), n.pending.forEach((l) => {
3261
- const { provider: h, prefix: g, name: x } = l, y = vt(h, g), I = y.pendingIcons || (y.pendingIcons = /* @__PURE__ */ new Set());
3261
+ const { provider: h, prefix: g, name: x } = l, y = kt(h, g), I = y.pendingIcons || (y.pendingIcons = /* @__PURE__ */ new Set());
3262
3262
  I.has(x) || (I.add(x), o[h][g].push(x));
3263
3263
  }), s.forEach((l) => {
3264
3264
  const h = o[l.provider][l.prefix];
3265
- h.length && Os(l, h);
3265
+ h.length && js(l, h);
3266
3266
  }), t ? Ns(t, n, s) : Nn;
3267
3267
  };
3268
3268
  function $s(e, t) {
@@ -3325,21 +3325,21 @@ function Us(e) {
3325
3325
  function qs(e) {
3326
3326
  return 'url("' + Us(e) + '")';
3327
3327
  }
3328
- let Ot;
3328
+ let jt;
3329
3329
  function Rs() {
3330
3330
  try {
3331
- Ot = window.trustedTypes.createPolicy("iconify", { createHTML: (e) => e });
3331
+ jt = window.trustedTypes.createPolicy("iconify", { createHTML: (e) => e });
3332
3332
  } catch {
3333
- Ot = null;
3333
+ jt = null;
3334
3334
  }
3335
3335
  }
3336
- function Hs(e) {
3337
- return Ot === void 0 && Rs(), Ot ? Ot.createHTML(e) : e;
3336
+ function Vs(e) {
3337
+ return jt === void 0 && Rs(), jt ? jt.createHTML(e) : e;
3338
3338
  }
3339
3339
  const uo = {
3340
3340
  ...io,
3341
3341
  inline: !1
3342
- }, Vs = {
3342
+ }, Hs = {
3343
3343
  xmlns: "http://www.w3.org/2000/svg",
3344
3344
  xmlnsXlink: "http://www.w3.org/1999/xlink",
3345
3345
  "aria-hidden": !0,
@@ -3368,29 +3368,29 @@ const Js = {
3368
3368
  ...uo,
3369
3369
  inline: !0
3370
3370
  };
3371
- function Pn(e) {
3371
+ function Fn(e) {
3372
3372
  return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
3373
3373
  }
3374
3374
  const Ks = (e, t, r) => {
3375
3375
  const n = t.inline ? Js : uo, o = $s(n, t), s = t.mode || "svg", i = {}, c = t.style || {}, l = {
3376
- ...s === "svg" ? Vs : {}
3376
+ ...s === "svg" ? Hs : {}
3377
3377
  };
3378
3378
  if (r) {
3379
- const N = rr(r, !1, !0);
3380
- if (N) {
3381
- const P = ["iconify"], G = [
3379
+ const S = rr(r, !1, !0);
3380
+ if (S) {
3381
+ const F = ["iconify"], X = [
3382
3382
  "provider",
3383
3383
  "prefix"
3384
3384
  ];
3385
- for (const V of G)
3386
- N[V] && P.push("iconify--" + N[V]);
3387
- l.className = P.join(" ");
3385
+ for (const H of X)
3386
+ S[H] && F.push("iconify--" + S[H]);
3387
+ l.className = F.join(" ");
3388
3388
  }
3389
3389
  }
3390
- for (let N in t) {
3391
- const P = t[N];
3392
- if (P !== void 0)
3393
- switch (N) {
3390
+ for (let S in t) {
3391
+ const F = t[S];
3392
+ if (F !== void 0)
3393
+ switch (S) {
3394
3394
  // Properties to ignore
3395
3395
  case "icon":
3396
3396
  case "style":
@@ -3402,38 +3402,38 @@ const Ks = (e, t, r) => {
3402
3402
  break;
3403
3403
  // Forward ref
3404
3404
  case "_ref":
3405
- l.ref = P;
3405
+ l.ref = F;
3406
3406
  break;
3407
3407
  // Merge class names
3408
3408
  case "className":
3409
- l[N] = (l[N] ? l[N] + " " : "") + P;
3409
+ l[S] = (l[S] ? l[S] + " " : "") + F;
3410
3410
  break;
3411
3411
  // Boolean attributes
3412
3412
  case "inline":
3413
3413
  case "hFlip":
3414
3414
  case "vFlip":
3415
- o[N] = P === !0 || P === "true" || P === 1;
3415
+ o[S] = F === !0 || F === "true" || F === 1;
3416
3416
  break;
3417
3417
  // Flip as string: 'horizontal,vertical'
3418
3418
  case "flip":
3419
- typeof P == "string" && zs(o, P);
3419
+ typeof F == "string" && zs(o, F);
3420
3420
  break;
3421
3421
  // Color: copy to style
3422
3422
  case "color":
3423
- i.color = P;
3423
+ i.color = F;
3424
3424
  break;
3425
3425
  // Rotation as string
3426
3426
  case "rotate":
3427
- typeof P == "string" ? o[N] = Ds(P) : typeof P == "number" && (o[N] = P);
3427
+ typeof F == "string" ? o[S] = Ds(F) : typeof F == "number" && (o[S] = F);
3428
3428
  break;
3429
3429
  // Remove aria-hidden
3430
3430
  case "ariaHidden":
3431
3431
  case "aria-hidden":
3432
- P !== !0 && P !== "true" && delete l["aria-hidden"];
3432
+ F !== !0 && F !== "true" && delete l["aria-hidden"];
3433
3433
  break;
3434
3434
  // Copy missing property if it does not exist in customisations
3435
3435
  default:
3436
- n[N] === void 0 && (l[N] = P);
3436
+ n[S] === void 0 && (l[S] = F);
3437
3437
  }
3438
3438
  }
3439
3439
  const h = ls(e, o), g = h.attributes;
@@ -3442,9 +3442,9 @@ const Ks = (e, t, r) => {
3442
3442
  ...i,
3443
3443
  ...c
3444
3444
  }, Object.assign(l, g);
3445
- let N = 0, P = t.id;
3446
- return typeof P == "string" && (P = P.replace(/-/g, "_")), l.dangerouslySetInnerHTML = {
3447
- __html: Hs(fs(h.body, P ? () => P + "ID" + N++ : "iconifyReact"))
3445
+ let S = 0, F = t.id;
3446
+ return typeof F == "string" && (F = F.replace(/-/g, "_")), l.dangerouslySetInnerHTML = {
3447
+ __html: Vs(fs(h.body, F ? () => F + "ID" + S++ : "iconifyReact"))
3448
3448
  }, mr("svg", l);
3449
3449
  }
3450
3450
  const { body: x, width: y, height: I } = e, C = s === "mask" || (s === "bg" ? !1 : x.indexOf("currentColor") !== -1), T = Ms(x, {
@@ -3455,8 +3455,8 @@ const Ks = (e, t, r) => {
3455
3455
  return l.style = {
3456
3456
  ...i,
3457
3457
  "--svg": qs(T),
3458
- width: Pn(g.width),
3459
- height: Pn(g.height),
3458
+ width: Fn(g.width),
3459
+ height: Fn(g.height),
3460
3460
  ...Ys,
3461
3461
  ...C ? Nr : fo,
3462
3462
  ...c
@@ -3541,9 +3541,9 @@ function mo(e) {
3541
3541
  data: T
3542
3542
  }))
3543
3543
  if (T === void 0) {
3544
- const N = js([C], g);
3544
+ const S = Os([C], g);
3545
3545
  o({
3546
- callback: N
3546
+ callback: S
3547
3547
  });
3548
3548
  } else T && ((I = e.onLoad) === null || I === void 0 || I.call(e, C));
3549
3549
  }
@@ -3552,7 +3552,7 @@ function mo(e) {
3552
3552
  }, [e.icon, t]);
3553
3553
  const { name: x, data: y } = i;
3554
3554
  return y ? Ks({
3555
- ...Or,
3555
+ ...jr,
3556
3556
  ...y
3557
3557
  }, e, x) : e.children ? e.children : e.fallback ? e.fallback : mr("span", {});
3558
3558
  }
@@ -3565,7 +3565,7 @@ $n((e, t) => mo({
3565
3565
  ...e,
3566
3566
  _ref: t
3567
3567
  }));
3568
- const xt = "USD", Ws = (e, t = xt) => {
3568
+ const bt = "USD", Ws = (e, t = bt) => {
3569
3569
  const r = (e == null ? void 0 : e.prices) ?? [];
3570
3570
  if (!r.length) return null;
3571
3571
  const n = (i) => {
@@ -3596,14 +3596,14 @@ const xt = "USD", Ws = (e, t = xt) => {
3596
3596
  return ((o = n.name) == null ? void 0 : o.toLowerCase()) === t.toLowerCase();
3597
3597
  });
3598
3598
  return !r || !r.value ? "" : typeof r.value == "object" ? r.value.label || "" : r.value;
3599
- }, Gs = (e) => {
3599
+ }, Xs = (e) => {
3600
3600
  let t = "";
3601
3601
  if (Array.isArray(e)) {
3602
3602
  const r = e.find((n) => n.name === "size") || e.find((n) => n.name === "Size");
3603
3603
  r && r.value && (t = typeof r.value == "object" ? r.value.label || "" : r.value);
3604
3604
  }
3605
3605
  return { sizeLabel: t };
3606
- }, gt = (e) => Qs((e == null ? void 0 : e.attributesRaw) ?? [], "color"), wt = (e) => Gs((e == null ? void 0 : e.attributesRaw) ?? []).sizeLabel, Ge = (e) => e.charAt(0).toUpperCase() + e.slice(1), Fn = {
3606
+ }, wt = (e) => Qs((e == null ? void 0 : e.attributesRaw) ?? [], "color"), yt = (e) => Xs((e == null ? void 0 : e.attributesRaw) ?? []).sizeLabel, Xe = (e) => e.charAt(0).toUpperCase() + e.slice(1), Pn = {
3607
3607
  standard: {
3608
3608
  label: "Standard Delivery",
3609
3609
  fee: 0,
@@ -3622,10 +3622,6 @@ const xt = "USD", Ws = (e, t = xt) => {
3622
3622
  subtitle: "Available in select locations (+$10)",
3623
3623
  icon: "mdi:truck-fast-outline"
3624
3624
  }
3625
- }, Xs = {
3626
- standard: "GROUND",
3627
- express: "2-DAY SHIPPING",
3628
- sameday: "OVERNIGHT"
3629
3625
  }, it = (e, t) => {
3630
3626
  try {
3631
3627
  return e.toLocaleString("en-US", {
@@ -3638,38 +3634,38 @@ const xt = "USD", Ws = (e, t = xt) => {
3638
3634
  }, po = (e) => e == null ? void 0 : e.masterVariant, En = (e) => Array.isArray(e == null ? void 0 : e.variants) ? e.variants : [], Wt = (e) => {
3639
3635
  const t = po(e);
3640
3636
  return t ? [t, ...En(e)] : En(e);
3641
- }, Zs = (e, t = 0) => Wt(e)[t], ei = (e) => {
3637
+ }, Gs = (e, t = 0) => Wt(e)[t], Zs = (e) => {
3642
3638
  var t, r;
3643
3639
  return ((r = (t = e == null ? void 0 : e.images) == null ? void 0 : t[0]) == null ? void 0 : r.url) ?? "";
3644
3640
  }, Tn = (e, t) => {
3645
3641
  var r, n, o, s, i, c, l, h;
3646
- 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) || "";
3642
+ 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
3643
  }, An = (e) => (e == null ? void 0 : e.name) || (e == null ? void 0 : e.title) || (e == null ? void 0 : e.productName) || "any", Qt = (e) => {
3648
3644
  var s, i, c, l, h, g;
3649
- const t = e ? Ws(e, xt) : null;
3645
+ const t = e ? Ws(e, bt) : null;
3650
3646
  if (t != null && t.cent && (t != null && t.cur))
3651
3647
  return {
3652
3648
  amount: +(t.cent / 100),
3653
3649
  currency: t.cur,
3654
3650
  regularAmount: t.regularCent ? t.regularCent / 100 : void 0
3655
3651
  };
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;
3652
+ 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) ?? bt;
3657
3653
  return { amount: Number.isFinite(r) ? +(Number(r) / 100) : 0, currency: n };
3658
- }, On = (e, t) => {
3654
+ }, jn = (e, t) => {
3659
3655
  const { amount: r } = Qt(t);
3660
3656
  if (r) return r;
3661
3657
  const n = (e == null ? void 0 : e.price) ?? (e == null ? void 0 : e.sellingPrice) ?? (e == null ? void 0 : e.unitPrice) ?? (e == null ? void 0 : e.mrp) ?? 0, o = Number(n);
3662
3658
  return Number.isFinite(o) ? o : 0;
3663
- }, ti = (e) => {
3659
+ }, ei = (e) => {
3664
3660
  var t;
3665
3661
  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) || "";
3666
- }, ri = (e) => {
3662
+ }, ti = (e) => {
3667
3663
  var t;
3668
3664
  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) || "";
3669
- }, ni = (e) => {
3665
+ }, ri = (e) => {
3670
3666
  var t;
3671
3667
  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) || "";
3672
- }, jn = 20, ki = ({
3668
+ }, On = 20, vi = ({
3673
3669
  open: e,
3674
3670
  onClose: t,
3675
3671
  product: r,
@@ -3682,10 +3678,10 @@ const xt = "USD", Ws = (e, t = xt) => {
3682
3678
  const g = Wt(r), x = Math.min(
3683
3679
  Math.max(0, n || 0),
3684
3680
  Math.max(0, g.length - 1)
3685
- ), [y, I] = v([]), [C, T] = v(0), [N, P] = v([]);
3681
+ ), [y, I] = v([]), [C, T] = v(0), [S, F] = v([]);
3686
3682
  he(() => {
3687
3683
  if (r != null && r.variants) {
3688
- const u = G(
3684
+ const u = X(
3689
3685
  r.variants,
3690
3686
  r.imageGroups,
3691
3687
  i
@@ -3693,59 +3689,59 @@ const xt = "USD", Ws = (e, t = xt) => {
3693
3689
  I(u);
3694
3690
  }
3695
3691
  }, [r]);
3696
- const G = (u, m, f) => {
3697
- const { colorMap: w, sizeMap: S } = V(f), $ = {};
3698
- m == null || m.forEach((O) => {
3699
- var re, Pe, De;
3700
- const U = (re = O.variationAttributes) == null ? void 0 : re.find(
3692
+ const X = (u, m, f) => {
3693
+ const { colorMap: w, sizeMap: k } = H(f), $ = {};
3694
+ m == null || m.forEach((j) => {
3695
+ var re, Fe, De;
3696
+ const U = (re = j.variationAttributes) == null ? void 0 : re.find(
3701
3697
  (Me) => Me.id === "color"
3702
- ), E = (De = (Pe = U == null ? void 0 : U.values) == null ? void 0 : Pe[0]) == null ? void 0 : De.value;
3703
- E && ($[E] || ($[E] = {}), $[E][O.viewType] = O.images);
3698
+ ), E = (De = (Fe = U == null ? void 0 : U.values) == null ? void 0 : Fe[0]) == null ? void 0 : De.value;
3699
+ E && ($[E] || ($[E] = {}), $[E][j.viewType] = j.images);
3704
3700
  });
3705
- const R = u.reduce((O, U) => {
3701
+ const R = u.reduce((j, U) => {
3706
3702
  const E = U.variationValues.color, re = U.variationValues.size;
3707
- return O[E] || (O[E] = {
3703
+ return j[E] || (j[E] = {
3708
3704
  color: E,
3709
3705
  name: w[E] || E,
3710
3706
  // ✅ DISPLAY NAME
3711
3707
  images: $[E] || {},
3712
3708
  variants: []
3713
- }), O[E].variants.push({
3709
+ }), j[E].variants.push({
3714
3710
  size: re,
3715
- name: S[re] || re,
3711
+ name: k[re] || re,
3716
3712
  // ✅ DISPLAY NAME
3717
3713
  ...U
3718
- }), O;
3714
+ }), j;
3719
3715
  }, {});
3720
- return Object.values(R).sort((O, U) => {
3721
- const E = O.colorName || O.color || "", re = U.colorName || U.color || "";
3716
+ return Object.values(R).sort((j, U) => {
3717
+ const E = j.colorName || j.color || "", re = U.colorName || U.color || "";
3722
3718
  return E.localeCompare(re);
3723
- }).map((O) => ({
3724
- ...O,
3725
- variants: O.variants.sort(
3719
+ }).map((j) => ({
3720
+ ...j,
3721
+ variants: j.variants.sort(
3726
3722
  (U, E) => Number(U.size) - Number(E.size)
3727
3723
  )
3728
3724
  }));
3729
- }, V = (u) => {
3725
+ }, H = (u) => {
3730
3726
  const m = {}, f = {};
3731
3727
  return u == null || u.forEach((w) => {
3732
- w.id === "color" && w.values.forEach((S) => {
3733
- m[S.value] = S.name;
3734
- }), w.id === "size" && w.values.forEach((S) => {
3735
- f[S.value] = S.name;
3728
+ w.id === "color" && w.values.forEach((k) => {
3729
+ m[k.value] = k.name;
3730
+ }), w.id === "size" && w.values.forEach((k) => {
3731
+ f[k.value] = k.name;
3736
3732
  });
3737
3733
  }), { colorMap: m, sizeMap: f };
3738
- }, K = g.length, [ve, F] = v(x), [D, ge] = v(null), [te, se] = v(null), dt = Je(null), Re = Je(null), k = Zs(r, ve), [H, M] = v(""), [je, kt] = v(""), [ot, He] = v(!1), [ke, $e] = v(!1), [Te, L] = v(!1), [Ae, Le] = v(""), [we, Oe] = v(!1), [ie, p] = v(null), [B, A] = v([]), [X, W] = v([]), [j, ue] = v([]), [Y, q] = v(!1), [Z, ze] = v(), [We, Se] = v(!0), [ee, fe] = v(!1), [Ne, me] = v(!1), [b, _e] = v({
3734
+ }, K = g.length, [ve, P] = v(x), [D, ge] = v(null), [te, se] = v(null), dt = Je(null), Re = Je(null), N = Gs(r, ve), [V, M] = v(""), [Oe, St] = v(""), [ot, Ve] = v(!1), [ke, $e] = v(!1), [Te, L] = v(!1), [Ae, Le] = v(""), [we, je] = v(!1), [ie, p] = v(null), [B, A] = v([]), [G, W] = v([]), [O, ue] = v([]), [Y, q] = v(!1), [Z, ze] = v(), [We, Se] = v(!0), [ee, fe] = v(!1), [Ne, me] = v(!1), [b, _e] = v({
3739
3735
  id: "001"
3740
- }), [z, J] = v(!1), [Ie, ye] = v(!1), [Ve, zt] = v("card"), [le, Ce] = v(!1), [St, _] = v(!1), [xe, pe] = v(!1), [ut, ho] = v(null), [Dt, zr] = v(null), [nr, Dr] = v(""), [Mr, Br] = v(!1), [Nt, go] = v(r == null ? void 0 : r.id), Mt = Je(null);
3736
+ }), [z, J] = v(!1), [Ie, ye] = v(!1), [He, zt] = v("card"), [le, Ce] = v(!1), [Nt, _] = v(!1), [xe, pe] = v(!1), [ut, ho] = v(null), [Dt, zr] = v(null), [nr, Dr] = v(""), [Mr, Br] = v(!1), [ft, go] = v(r == null ? void 0 : r.id), Mt = Je(null);
3741
3737
  he(() => {
3742
3738
  const u = Wt(r), m = Math.min(
3743
3739
  Math.max(0, n || 0),
3744
3740
  Math.max(0, u.length - 1)
3745
3741
  );
3746
- F(m);
3747
- const f = po(r), w = gt(f), S = wt(f);
3748
- dt.current = w || null, Re.current = S || null, ge(w || null), se(S || null);
3742
+ P(m);
3743
+ const f = po(r), w = wt(f), k = yt(f);
3744
+ dt.current = w || null, Re.current = k || null, ge(w || null), se(k || null);
3749
3745
  }, [n, r]), he(() => {
3750
3746
  Mt.current && (Mt.current.scrollTop = Mt.current.scrollHeight);
3751
3747
  }, [
@@ -3756,7 +3752,7 @@ const xt = "USD", Ws = (e, t = xt) => {
3756
3752
  z,
3757
3753
  Ie,
3758
3754
  le,
3759
- St,
3755
+ Nt,
3760
3756
  xe,
3761
3757
  ot,
3762
3758
  ke
@@ -3848,10 +3844,10 @@ const xt = "USD", Ws = (e, t = xt) => {
3848
3844
  const u = JSON.parse(
3849
3845
  sessionStorage.getItem("customerData") || "{}"
3850
3846
  );
3851
- let m = (u == null ? void 0 : u.basketId) || localStorage.getItem(jt);
3847
+ let m = (u == null ? void 0 : u.basketId) || localStorage.getItem(Ot);
3852
3848
  if (!m) {
3853
- const f = await Ze(), w = "Bearer " + (f == null ? void 0 : f.access_token), S = await Cr(w);
3854
- m = (S == null ? void 0 : S.basket_id) || S.basketId;
3849
+ const f = await Ze(), w = "Bearer " + (f == null ? void 0 : f.access_token), k = await Cr(w);
3850
+ m = (k == null ? void 0 : k.basket_id) || k.basketId;
3855
3851
  }
3856
3852
  bo(m), M(m);
3857
3853
  } catch (u) {
@@ -3859,9 +3855,9 @@ const xt = "USD", Ws = (e, t = xt) => {
3859
3855
  }
3860
3856
  }, bo = async (u) => {
3861
3857
  const m = await fa(u);
3862
- console.log(m, "shipping methods"), P(m);
3858
+ console.log(m, "shipping methods"), F(m);
3863
3859
  };
3864
- console.log(H, "the basket id");
3860
+ console.log(V, "the basket id");
3865
3861
  const _t = (u, m) => {
3866
3862
  A((f) => [
3867
3863
  ...f,
@@ -3890,28 +3886,28 @@ const xt = "USD", Ws = (e, t = xt) => {
3890
3886
  )
3891
3887
  );
3892
3888
  }, Bt = () => {
3893
- _(!1), q(!1), me(!1), ye(!1), fe(!1), J(!1), Ce(!1), pe(!1), Oe(!1), p(null), vo(), He(!1), $e(!1);
3889
+ _(!1), q(!1), me(!1), ye(!1), fe(!1), J(!1), Ce(!1), pe(!1), je(!1), p(null), vo(), Ve(!1), $e(!1);
3894
3890
  }, ko = () => {
3895
3891
  q(!1), fe(!1), me(!1), _e("standard"), J(!1), ye(!1), zt("card"), Ce(!1), _(!1), pe(!1), Se(!0), p(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");
3896
3892
  }, Ut = Zr(() => Wt(r).map((m, f) => ({
3897
3893
  index: f,
3898
3894
  variant: m,
3899
3895
  images: ((m == null ? void 0 : m.images) || []).map((w) => (w == null ? void 0 : w.url) || "").filter(Boolean)
3900
- })), [r]), It = Zr(() => Ut.length ? !!((D || void 0) && (te || void 0)) : !1, [Ut, D, te, k]), So = Te || we || !It, Pt = (u) => {
3896
+ })), [r]), It = Zr(() => Ut.length ? !!((D || void 0) && (te || void 0)) : !1, [Ut, D, te, N]), So = Te || we || !It, Ft = (u) => {
3901
3897
  const m = Number((u == null ? void 0 : u.quantity) ?? 1);
3902
3898
  return Number.isFinite(m) && m > 0 ? m : 1;
3903
- }, Hr = (u) => {
3904
- const m = Pt(u), f = Number((u == null ? void 0 : u.max_price_minor) ?? 0);
3905
- return Number.isFinite(f) && f > 0 ? +(f / 100) : +(On(r, k) * m);
3906
3899
  }, Vr = (u) => {
3907
- const m = ie, f = Qt(k), w = u || (m == null ? void 0 : m.currency) || f.currency || xt, S = Hr(m), $ = +(S * 0.08).toFixed(2), R = (b == null ? void 0 : b.price) || 0;
3908
- return { product_total: S, tax: $, shipping_fee: R, currency: w };
3900
+ const m = Ft(u), f = Number((u == null ? void 0 : u.max_price_minor) ?? 0);
3901
+ return Number.isFinite(f) && f > 0 ? +(f / 100) : +(jn(r, N) * m);
3902
+ }, Hr = (u) => {
3903
+ const m = ie, f = Qt(N), w = u || (m == null ? void 0 : m.currency) || f.currency || bt, k = Vr(m), $ = +(k * 0.08).toFixed(2), R = (b == null ? void 0 : b.price) || 0;
3904
+ return { product_total: k, tax: $, shipping_fee: R, currency: w };
3909
3905
  }, ar = async (u, m, f) => {
3910
- Rr(), ko(), L(!0), Oe(!0), He(!1), $e(!1);
3911
- const w = X.slice(-jn);
3906
+ Rr(), ko(), L(!0), je(!0), Ve(!1), $e(!1);
3907
+ const w = G.slice(-On);
3912
3908
  try {
3913
- const S = await hr(null, null);
3914
- if (!S) throw new Error("Failed to fetch token");
3909
+ const k = await hr(null, null);
3910
+ if (!k) throw new Error("Failed to fetch token");
3915
3911
  const $ = localStorage.getItem("customerNumber"), R = localStorage.getItem("isLoggedIn"), U = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
3916
3912
  registered: String(R || !1),
3917
3913
  userId: String($ || (/* @__PURE__ */ new Date()).getTime())
@@ -3919,7 +3915,7 @@ const xt = "USD", Ws = (e, t = xt) => {
3919
3915
  method: "POST",
3920
3916
  headers: {
3921
3917
  "Content-Type": "application/json",
3922
- Authorization: `Bearer ${S}`
3918
+ Authorization: `Bearer ${k}`
3923
3919
  },
3924
3920
  body: JSON.stringify({
3925
3921
  flowId: "MTMI0P4LC6",
@@ -3936,18 +3932,18 @@ const xt = "USD", Ws = (e, t = xt) => {
3936
3932
  })
3937
3933
  });
3938
3934
  if (!E.body) throw new Error("Readable stream not supported");
3939
- const re = E.body.getReader(), Pe = new TextDecoder();
3935
+ const re = E.body.getReader(), Fe = new TextDecoder();
3940
3936
  let De = "", Me = "", at = "";
3941
3937
  for (; ; ) {
3942
3938
  const { done: Ee, value: Qe } = await re.read();
3943
3939
  if (Ee) break;
3944
- De += Pe.decode(Qe, { stream: !0 });
3945
- const ft = De.split(`
3940
+ De += Fe.decode(Qe, { stream: !0 });
3941
+ const mt = De.split(`
3946
3942
  `);
3947
- De = ft.pop() || "";
3948
- for (const mt of ft) {
3949
- if (!mt.startsWith("data:")) continue;
3950
- const st = mt.slice(5).trim();
3943
+ De = mt.pop() || "";
3944
+ for (const pt of mt) {
3945
+ if (!pt.startsWith("data:")) continue;
3946
+ const st = pt.slice(5).trim();
3951
3947
  try {
3952
3948
  const Ye = JSON.parse(st), Be = Ye.index, ce = Ye.data;
3953
3949
  Be === 0 ? Me = String(ce ?? "") : Be === 1 && (at = String(ce ?? ""));
@@ -3956,22 +3952,22 @@ const xt = "USD", Ws = (e, t = xt) => {
3956
3952
  }
3957
3953
  }
3958
3954
  }
3959
- let Fe = null;
3955
+ let Pe = null;
3960
3956
  if (Me) {
3961
3957
  const Ee = String(Me).replace(/\\n/g, "").trim();
3962
3958
  if (Ee.startsWith("{") && Ee.endsWith("}"))
3963
3959
  try {
3964
- Fe = JSON.parse(Ee), Fe.product_id = m, Fe.sku_id = m, localStorage.setItem("agentic_order", JSON.stringify(Fe));
3960
+ Pe = JSON.parse(Ee), Pe.product_id = m, Pe.sku_id = m, localStorage.setItem("agentic_order", JSON.stringify(Pe));
3965
3961
  } catch (Qe) {
3966
3962
  console.log(Qe);
3967
3963
  }
3968
3964
  }
3969
- p(Fe), Fe && A((Ee) => [
3965
+ p(Pe), Pe && A((Ee) => [
3970
3966
  ...Ee,
3971
3967
  {
3972
3968
  query: "",
3973
3969
  response: "__CARD__",
3974
- snapshotPayload: { extractedDetails: Fe }
3970
+ snapshotPayload: { extractedDetails: Pe }
3975
3971
  }
3976
3972
  ]), W((Ee) => [
3977
3973
  ...Ee,
@@ -3980,9 +3976,9 @@ const xt = "USD", Ws = (e, t = xt) => {
3980
3976
  mainResponse: Me || "",
3981
3977
  keywords: at || ""
3982
3978
  }
3983
- ].slice(-jn));
3984
- } catch (S) {
3985
- console.error("Error sending message to Tanya:", S), Oe(!1);
3979
+ ].slice(-On));
3980
+ } catch (k) {
3981
+ console.error("Error sending message to Tanya:", k), je(!1);
3986
3982
  } finally {
3987
3983
  L(!1);
3988
3984
  }
@@ -3990,36 +3986,36 @@ const xt = "USD", Ws = (e, t = xt) => {
3990
3986
  if (we || Te || !It) return;
3991
3987
  const m = Ae.trim();
3992
3988
  if (!m) return;
3993
- A((w) => [...w, { query: m, response: "" }]), Le(""), kt(m);
3994
- const f = Nt || "";
3989
+ A((w) => [...w, { query: m, response: "" }]), Le(""), St(m);
3990
+ const f = ft || "";
3995
3991
  if (K <= 1) {
3996
3992
  if (f) {
3997
3993
  ar(m, f, ve);
3998
3994
  return;
3999
3995
  }
4000
- $e(!0), Oe(!0);
3996
+ $e(!0), je(!0);
4001
3997
  return;
4002
3998
  }
4003
- f ? (He(!0), Oe(!0)) : ($e(!0), Oe(!0));
3999
+ f ? (Ve(!0), je(!0)) : ($e(!0), je(!0));
4004
4000
  }, No = () => {
4005
- const u = Nt;
4006
- u && ar(je, u, ve);
4001
+ const u = ft;
4002
+ u && ar(Oe, u, ve);
4007
4003
  }, Co = () => {
4008
- He(!1), $e(!0), Oe(!0);
4004
+ Ve(!1), $e(!0), je(!0);
4009
4005
  }, _o = () => {
4010
- if (!Nt) return;
4011
- ar(je, Nt, ve);
4006
+ if (!ft) return;
4007
+ ar(Oe, ft, ve);
4012
4008
  }, Io = async () => {
4013
4009
  q(!0), me(!1), ye(!1), _(!1), fe(!1), J(!1), Ce(!1), pe(!1), await xo(), console.log("calling"), Rr("initial", {
4014
4010
  extractedDetails: ie ?? void 0
4015
4011
  });
4016
- }, Po = () => {
4012
+ }, Fo = () => {
4017
4013
  if (!Z) return;
4018
- const u = j.find(
4014
+ const u = O.find(
4019
4015
  (m) => String(m.addressId ?? m.id) === Z
4020
4016
  ) || null;
4021
4017
  u && (localStorage.setItem("agentic_order_address", JSON.stringify(u)), fe(!0), me(!0), J(!1), ye(!1), Ce(!1), _(!1), pe(!1), _t("address", u));
4022
- }, Fo = () => {
4018
+ }, Po = () => {
4023
4019
  fe(!1), me(!1), J(!1), ye(!1), Ce(!1), _(!1), pe(!1), localStorage.removeItem("agentic_order_address");
4024
4020
  }, Eo = () => {
4025
4021
  b.id && (localStorage.setItem("agentic_order_delivery", b.id), J(!0), ye(!0), Ce(!1), _(!1), pe(!1), _t("delivery", {
@@ -4027,7 +4023,7 @@ const xt = "USD", Ws = (e, t = xt) => {
4027
4023
  ...b
4028
4024
  }));
4029
4025
  }, Jr = () => {
4030
- me(!1), J(!1), ye(!1), Ce(!1), _(!1), pe(!1), Oe(!1), Bt(), A((u) => [
4026
+ me(!1), J(!1), ye(!1), Ce(!1), _(!1), pe(!1), je(!1), Bt(), A((u) => [
4031
4027
  ...u,
4032
4028
  {
4033
4029
  query: "",
@@ -4040,9 +4036,9 @@ const xt = "USD", Ws = (e, t = xt) => {
4040
4036
  }, To = () => {
4041
4037
  J(!1), ye(!1), Ce(!1), _(!1), pe(!1), localStorage.removeItem("agentic_order_delivery");
4042
4038
  }, Ao = () => {
4043
- Ve && (localStorage.setItem("agentic_order_payment", Ve), Ce(!0), _(!0), pe(!1), _t("payment", { method: Ve }));
4044
- }, Oo = () => {
4045
- ye(!1), Ce(!1), _(!1), pe(!1), Oe(!1), Bt(), A((u) => [
4039
+ He && (localStorage.setItem("agentic_order_payment", He), Ce(!0), _(!0), pe(!1), _t("payment", { method: He }));
4040
+ }, jo = () => {
4041
+ ye(!1), Ce(!1), _(!1), pe(!1), je(!1), Bt(), A((u) => [
4046
4042
  ...u,
4047
4043
  {
4048
4044
  query: "",
@@ -4052,7 +4048,7 @@ const xt = "USD", Ws = (e, t = xt) => {
4052
4048
  }
4053
4049
  }
4054
4050
  ]);
4055
- }, jo = () => {
4051
+ }, Oo = () => {
4056
4052
  Ce(!1), _(!1), pe(!1), localStorage.removeItem("agentic_order_payment");
4057
4053
  }, $o = async () => {
4058
4054
  try {
@@ -4061,19 +4057,19 @@ const xt = "USD", Ws = (e, t = xt) => {
4061
4057
  localStorage.getItem("agentic_order_address") || "null"
4062
4058
  ), f = localStorage.getItem(
4063
4059
  "agentic_order_delivery"
4064
- ), w = localStorage.getItem("agentic_order_payment") || "card", { product_total: S, tax: $, shipping_fee: R, currency: O } = Vr(), U = c, E = (m == null ? void 0 : m.addressId) || (m == null ? void 0 : m.id) || void 0, re = f ? Xs[f] : "GROUND", Pe = "card-visa", De = k == null ? void 0 : k.sku, Me = (r == null ? void 0 : r.id) || "", at = Pt(u), Fe = typeof u.max_price_minor == "number" ? u.max_price_minor : Math.round(S * 100), ft = {
4060
+ ), w = localStorage.getItem("agentic_order_payment") || "card", { product_total: k, tax: $, shipping_fee: R, currency: j } = Hr(), U = c, E = (m == null ? void 0 : m.addressId) || (m == null ? void 0 : m.id) || void 0, re = f ?? "GROUND", Fe = "card-visa", De = ft, Me = (r == null ? void 0 : r.id) || "", at = Ft(u), Pe = typeof u.max_price_minor == "number" ? u.max_price_minor : Math.round(k * 100), mt = {
4065
4061
  shopper_id: U,
4066
4062
  shipping_address_id: E,
4067
4063
  shipping_method_id: re,
4068
- payment_method_id: Pe,
4064
+ payment_method_id: Fe,
4069
4065
  sku: De,
4070
4066
  platform: "SFCC",
4071
4067
  storeCode: "Sites-SiteGenesis-Site",
4072
4068
  product_id: Me,
4073
4069
  quantity: at,
4074
- max_price_minor: Fe,
4075
- currency: O,
4076
- instruction_text: je
4070
+ max_price_minor: Pe,
4071
+ currency: j,
4072
+ instruction_text: Oe
4077
4073
  };
4078
4074
  if (console.log(U, E, "the selected ids"), !U || !E) {
4079
4075
  console.error(
@@ -4096,7 +4092,7 @@ const xt = "USD", Ws = (e, t = xt) => {
4096
4092
  "Content-Type": "application/json",
4097
4093
  Authorization: `Bearer ${st}`
4098
4094
  },
4099
- body: JSON.stringify(ft)
4095
+ body: JSON.stringify(mt)
4100
4096
  });
4101
4097
  if (!Be.ok) {
4102
4098
  const Uo = await Be.text().catch(() => "");
@@ -4107,17 +4103,17 @@ const xt = "USD", Ws = (e, t = xt) => {
4107
4103
  }
4108
4104
  const ce = await Be.json().catch(() => null);
4109
4105
  console.log("intent-mandate success:", ce);
4110
- const pt = (ce == null ? void 0 : ce.intent_mandate_id) || (ce == null ? void 0 : ce.intent_mandateId) || (ce == null ? void 0 : ce.key) || null;
4111
- pt && ho(pt);
4112
- const Xr = {
4106
+ const ht = (ce == null ? void 0 : ce.intent_mandate_id) || (ce == null ? void 0 : ce.intent_mandateId) || (ce == null ? void 0 : ce.key) || null;
4107
+ ht && ho(ht);
4108
+ const Gr = {
4113
4109
  ...u,
4114
4110
  address: m,
4115
4111
  delivery: f,
4116
4112
  payment: w,
4117
- summary: { product_total: S, tax: $, shipping_fee: R, currency: O },
4118
- intent_mandate_id: pt
4113
+ summary: { product_total: k, tax: $, shipping_fee: R, currency: j },
4114
+ intent_mandate_id: ht
4119
4115
  };
4120
- localStorage.setItem("agentic_order_final", JSON.stringify(Xr)), pe(!0), Se(!1), _t("final", Xr), _t("success", { intentMandateId: pt }), Bt();
4116
+ localStorage.setItem("agentic_order_final", JSON.stringify(Gr)), pe(!0), Se(!1), _t("final", Gr), _t("success", { intentMandateId: ht }), Bt();
4121
4117
  } catch (u) {
4122
4118
  console.error("Error in handleConfirmWatch / intent-mandate:", u), alert(
4123
4119
  "Unable to complete your smart order right now. Please try again in a moment."
@@ -4138,7 +4134,7 @@ const xt = "USD", Ws = (e, t = xt) => {
4138
4134
  ]);
4139
4135
  }, Lo = ({ selectedIndex: u }) => {
4140
4136
  var E;
4141
- const m = ((E = y[u]) == null ? void 0 : E.images.large[0].link) || Tn(r, k), f = An(r), w = Nt || "", S = gt(k) || "", $ = wt(k) || "", { amount: R } = Qt(k), O = !!(r != null && r.id), U = O;
4137
+ const m = ((E = y[u]) == null ? void 0 : E.images.large[0].link) || Tn(r, N), f = An(r), w = ft || "", k = wt(N) || "", $ = yt(N) || "", { amount: R } = Qt(N), j = !!(r != null && r.id), U = j;
4142
4138
  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: [
4143
4139
  /* @__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(
4144
4140
  "img",
@@ -4159,31 +4155,31 @@ const xt = "USD", Ws = (e, t = xt) => {
4159
4155
  /* @__PURE__ */ a("div", { className: "text-2xl font-bold text-gray-900 mb-1", children: f }),
4160
4156
  /* @__PURE__ */ a("div", { className: "text-sm text-gray-700 mb-1", children: [
4161
4157
  w && `SKU: ${w}`,
4162
- S && `Color: ${S}`,
4158
+ k && `Color: ${k}`,
4163
4159
  $ && `Size: ${$}`
4164
4160
  ].filter(Boolean).join(" • ") || "—" }),
4165
- /* @__PURE__ */ a("div", { className: "mt-1 text-xl font-semibold text-gray-900", children: O ? (
4161
+ /* @__PURE__ */ a("div", { className: "mt-1 text-xl font-semibold text-gray-900", children: j ? (
4166
4162
  // ? formatCurrency(Number(unitPrice) || 0, CURRENCY_PREF)
4167
4163
  `$${r.price}`
4168
4164
  ) : "Currently unavailable" }),
4169
- O && !U && /* @__PURE__ */ a("div", { className: "mt-1 text-xs font-medium text-red-600", children: "Currently out of stock" })
4165
+ j && !U && /* @__PURE__ */ a("div", { className: "mt-1 text-xs font-medium text-red-600", children: "Currently out of stock" })
4170
4166
  ] })
4171
4167
  ] }) });
4172
4168
  }, Wr = ({
4173
4169
  showSubmit: u = !0
4174
4170
  }) => {
4175
4171
  const m = {};
4176
- Ut.map((w) => gt(w.variant)).filter((w) => !!w && !m[w] && (m[w] = !0));
4172
+ Ut.map((w) => wt(w.variant)).filter((w) => !!w && !m[w] && (m[w] = !0));
4177
4173
  const f = {};
4178
- return Ut.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: [
4174
+ return Ut.map((w) => yt(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: [
4179
4175
  /* @__PURE__ */ a("h3", { className: "font-semibold text-gray-800", children: "Choose a variant" }),
4180
4176
  /* @__PURE__ */ d("div", { className: "mt-4", children: [
4181
4177
  /* @__PURE__ */ d("div", { className: "flex items-baseline gap-2", children: [
4182
4178
  /* @__PURE__ */ a("div", { className: "text-sm font-bold", children: "Color :" }),
4183
4179
  D && /* @__PURE__ */ a("div", { className: "text-sm text-gray-600", children: D })
4184
4180
  ] }),
4185
- /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-4 mt-2", children: y.map((w, S) => {
4186
- const $ = w.name, R = D === $, O = w.images.large[0].disBaseLink || w.images.large[0].link;
4181
+ /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-4 mt-2", children: y.map((w, k) => {
4182
+ const $ = w.name, R = D === $, j = w.images.large[0].disBaseLink || w.images.large[0].link;
4187
4183
  return /* @__PURE__ */ a(
4188
4184
  "div",
4189
4185
  {
@@ -4193,14 +4189,14 @@ const xt = "USD", Ws = (e, t = xt) => {
4193
4189
  "button",
4194
4190
  {
4195
4191
  onClick: () => {
4196
- ge($), se(null), F(null), T(S);
4192
+ ge($), se(null), P(null), T(k);
4197
4193
  },
4198
4194
  className: "w-full h-20 flex items-center justify-center overflow-hidden",
4199
4195
  title: $,
4200
- children: O ? /* @__PURE__ */ a(
4196
+ children: j ? /* @__PURE__ */ a(
4201
4197
  "img",
4202
4198
  {
4203
- src: O,
4199
+ src: j,
4204
4200
  alt: $,
4205
4201
  className: "w/full h-full object-contain"
4206
4202
  }
@@ -4219,15 +4215,15 @@ const xt = "USD", Ws = (e, t = xt) => {
4219
4215
  ] }),
4220
4216
  /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2 mt-2", children: (() => {
4221
4217
  const w = y.find(
4222
- (S) => S.name === D
4218
+ (k) => k.name === D
4223
4219
  );
4224
- return w ? w.variants.map((S, $) => {
4225
- const R = S.name;
4220
+ return w ? w.variants.map((k, $) => {
4221
+ const R = k.name;
4226
4222
  return /* @__PURE__ */ a(
4227
4223
  "button",
4228
4224
  {
4229
4225
  onClick: () => {
4230
- se(R), F($), go(S.productId);
4226
+ se(R), P($), go(k.productId);
4231
4227
  },
4232
4228
  className: `px-4 py-2 rounded-md border text-sm ${te === R ? "border-2 border-[#804c9e] font-semibold" : "border-gray-300"}`,
4233
4229
  title: R,
@@ -4253,7 +4249,7 @@ const xt = "USD", Ws = (e, t = xt) => {
4253
4249
  !(u != null && u.extractedDetails) && u && (u = { extractedDetails: u });
4254
4250
  const f = (u == null ? void 0 : u.extractedDetails) || ie;
4255
4251
  if (!f) return null;
4256
- const w = Pt(f), { currency: S } = Qt(k), $ = On(r, k), R = Number((f == null ? void 0 : f.max_price_minor) ?? 0), U = Number.isFinite(R) && R > 0 ? +(R / 100) : +($ * w), E = (f == null ? void 0 : f.currency) || S || xt, re = k != null && k.sku ? k.sku : f.product_id;
4252
+ const w = Ft(f), { currency: k } = Qt(N), $ = jn(r, N), R = Number((f == null ? void 0 : f.max_price_minor) ?? 0), U = Number.isFinite(R) && R > 0 ? +(R / 100) : +($ * w), E = (f == null ? void 0 : f.currency) || k || bt, re = N != null && N.sku ? N.sku : f.product_id;
4257
4253
  return /* @__PURE__ */ d(
4258
4254
  "div",
4259
4255
  {
@@ -4273,24 +4269,24 @@ const xt = "USD", Ws = (e, t = xt) => {
4273
4269
  /* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "SKU:" }),
4274
4270
  /* @__PURE__ */ a("p", { className: "text-gray-800", children: re }),
4275
4271
  /* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "Quantity:" }),
4276
- /* @__PURE__ */ a("p", { className: "text-gray-800", children: Pt(f) }),
4272
+ /* @__PURE__ */ a("p", { className: "text-gray-800", children: Ft(f) }),
4277
4273
  /* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "Currency:" }),
4278
4274
  /* @__PURE__ */ a("p", { className: "text-gray-800", children: E }),
4279
4275
  /* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "Maximum Total Price:" }),
4280
4276
  /* @__PURE__ */ a("p", { className: "text-gray-800", children: it(U, E) })
4281
4277
  ] }),
4282
4278
  /* @__PURE__ */ d("div", { className: "mt-3 flex flex-wrap gap-2 text-xs", children: [
4283
- gt(k) && /* @__PURE__ */ d("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4279
+ wt(N) && /* @__PURE__ */ d("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4284
4280
  "Color: ",
4285
- gt(k)
4281
+ wt(N)
4286
4282
  ] }),
4287
- wt(k) && /* @__PURE__ */ d("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4283
+ yt(N) && /* @__PURE__ */ d("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4288
4284
  "Size: ",
4289
- wt(k)
4285
+ yt(N)
4290
4286
  ] }),
4291
- (k == null ? void 0 : k.sku) && /* @__PURE__ */ d("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4287
+ (N == null ? void 0 : N.sku) && /* @__PURE__ */ d("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4292
4288
  "SKU: ",
4293
- k.sku
4289
+ N.sku
4294
4290
  ] })
4295
4291
  ] })
4296
4292
  ] }),
@@ -4355,19 +4351,19 @@ const xt = "USD", Ws = (e, t = xt) => {
4355
4351
  ]
4356
4352
  }
4357
4353
  );
4358
- }, Gr = (u, m = !0) => {
4359
- var mt, st, Ye, Be, ce;
4360
- const f = u || {}, w = ((mt = f == null ? void 0 : f.summary) == null ? void 0 : mt.currency) || (ie == null ? void 0 : ie.currency) || xt, S = Tn(r, k), $ = An(r), R = k != null && k.sku ? k.sku : (r == null ? void 0 : r.id) ?? (ie == null ? void 0 : ie.product_id), O = (k == null ? void 0 : k.sku) ?? ti(r), U = gt(k) || ri(r), E = wt(k) || ni(r), re = Pt(f), Pe = ((st = f == null ? void 0 : f.summary) == null ? void 0 : st.product_total) != null ? +f.summary.product_total : Hr(f), De = re > 0 ? +(Pe / re).toFixed(2) : 0, Me = Pe, at = ((Ye = f == null ? void 0 : f.summary) == null ? void 0 : Ye.tax) ?? +(Pe * 0.08).toFixed(2), Fe = ((Be = f == null ? void 0 : f.summary) == null ? void 0 : Be.shipping_fee) ?? ((b == null ? void 0 : b.price) || 0), Ee = f != null && f.address ? [
4354
+ }, Xr = (u, m = !0) => {
4355
+ var pt, st, Ye, Be, ce;
4356
+ const f = u || {}, w = ((pt = f == null ? void 0 : f.summary) == null ? void 0 : pt.currency) || (ie == null ? void 0 : ie.currency) || bt, k = Tn(r, N), $ = An(r), R = N != null && N.sku ? N.sku : (r == null ? void 0 : r.id) ?? (ie == null ? void 0 : ie.product_id), j = (N == null ? void 0 : N.sku) ?? ei(r), U = wt(N) || ti(r), E = yt(N) || ri(r), re = Ft(f), Fe = ((st = f == null ? void 0 : f.summary) == null ? void 0 : st.product_total) != null ? +f.summary.product_total : Vr(f), De = re > 0 ? +(Fe / re).toFixed(2) : 0, Me = Fe, at = ((Ye = f == null ? void 0 : f.summary) == null ? void 0 : Ye.tax) ?? +(Fe * 0.08).toFixed(2), Pe = ((Be = f == null ? void 0 : f.summary) == null ? void 0 : Be.shipping_fee) ?? ((b == null ? void 0 : b.price) || 0), Ee = f != null && f.address ? [
4361
4357
  f.address.addressLine1,
4362
4358
  f.address.addressLine2,
4363
4359
  f.address.street,
4364
4360
  [f.address.city, f.address.state, f.address.postalCode].filter(Boolean).join(", "),
4365
4361
  f.address.country
4366
- ].filter(Boolean).map((pt) => Ge(String(pt))).join(", ") : "—", Qe = (f == null ? void 0 : f.payment) || "card", ft = Qe === "card" ? /* @__PURE__ */ d(be, { children: [
4362
+ ].filter(Boolean).map((ht) => Xe(String(ht))).join(", ") : "—", Qe = (f == null ? void 0 : f.payment) || "card", mt = Qe === "card" ? /* @__PURE__ */ d(be, { children: [
4367
4363
  "Credit Card — Mastercard",
4368
4364
  /* @__PURE__ */ a("br", {}),
4369
4365
  "•••• 7820 Exp: 12/26"
4370
- ] }) : /* @__PURE__ */ a(be, { children: Ge(Qe) });
4366
+ ] }) : /* @__PURE__ */ a(be, { children: Xe(Qe) });
4371
4367
  return /* @__PURE__ */ d("div", { className: "mx-auto mt-3 mb-3 rounded-2xl bg-white", children: [
4372
4368
  /* @__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: [
4373
4369
  /* @__PURE__ */ a(
@@ -4381,10 +4377,10 @@ const xt = "USD", Ws = (e, t = xt) => {
4381
4377
  "All set! Here’s what your smart order looks like 🧾"
4382
4378
  ] }) }),
4383
4379
  /* @__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: [
4384
- /* @__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: S ? /* @__PURE__ */ a(
4380
+ /* @__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: k ? /* @__PURE__ */ a(
4385
4381
  "img",
4386
4382
  {
4387
- src: S,
4383
+ src: k,
4388
4384
  alt: $,
4389
4385
  className: "w-full h-full object-contain"
4390
4386
  }
@@ -4404,11 +4400,11 @@ const xt = "USD", Ws = (e, t = xt) => {
4404
4400
  " ",
4405
4401
  R ?? "—"
4406
4402
  ] }),
4407
- (O || U || E) && /* @__PURE__ */ d("div", { className: "text-xs text-gray-600 mt-0.5 text-center", children: [
4408
- O && /* @__PURE__ */ d(be, { children: [
4403
+ (j || U || E) && /* @__PURE__ */ d("div", { className: "text-xs text-gray-600 mt-0.5 text-center", children: [
4404
+ j && /* @__PURE__ */ d(be, { children: [
4409
4405
  /* @__PURE__ */ a("span", { className: "font-medium", children: "SKU:" }),
4410
4406
  " ",
4411
- O,
4407
+ j,
4412
4408
  "  "
4413
4409
  ] }),
4414
4410
  U && /* @__PURE__ */ d(be, { children: [
@@ -4448,17 +4444,17 @@ const xt = "USD", Ws = (e, t = xt) => {
4448
4444
  ] }),
4449
4445
  /* @__PURE__ */ d("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
4450
4446
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "💳 Payment" }),
4451
- /* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: ft })
4447
+ /* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: mt })
4452
4448
  ] }),
4453
4449
  /* @__PURE__ */ d("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
4454
4450
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "🚚 Delivery" }),
4455
- /* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: f != null && f.delivery && ((ce = Fn[f.delivery]) == null ? void 0 : ce.name) || "—" })
4451
+ /* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: f != null && f.delivery && ((ce = Pn[f.delivery]) == null ? void 0 : ce.name) || "—" })
4456
4452
  ] })
4457
4453
  ] }),
4458
4454
  /* @__PURE__ */ d("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-3", children: [
4459
4455
  /* @__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: [
4460
4456
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "💰 any(s)" }),
4461
- /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: it(Pe, w) })
4457
+ /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: it(Fe, w) })
4462
4458
  ] }),
4463
4459
  /* @__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: [
4464
4460
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "🏛️ Taxes" }),
@@ -4466,7 +4462,7 @@ const xt = "USD", Ws = (e, t = xt) => {
4466
4462
  ] }),
4467
4463
  /* @__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: [
4468
4464
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "🚚 Shipping" }),
4469
- /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: it(Fe, w) })
4465
+ /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: it(Pe, w) })
4470
4466
  ] })
4471
4467
  ] }),
4472
4468
  /* @__PURE__ */ d(
@@ -4476,7 +4472,7 @@ const xt = "USD", Ws = (e, t = xt) => {
4476
4472
  style: { background: or },
4477
4473
  children: [
4478
4474
  /* @__PURE__ */ a("div", { className: "text-sm/5 opacity-95", children: "🔹 Total Payable" }),
4479
- /* @__PURE__ */ a("div", { className: "mt-1 text-3xl font-extrabold tracking-tight", children: it(Pe + at + Fe, w) })
4475
+ /* @__PURE__ */ a("div", { className: "mt-1 text-3xl font-extrabold tracking-tight", children: it(Fe + at + Pe, w) })
4480
4476
  ]
4481
4477
  }
4482
4478
  )
@@ -4514,73 +4510,52 @@ const xt = "USD", Ws = (e, t = xt) => {
4514
4510
  u.street,
4515
4511
  [u.city, u.state, u.postalCode].filter(Boolean).join(", "),
4516
4512
  u.country
4517
- ].filter((f) => !!f).map((f) => Ge(f)).join(", ");
4518
- return /* @__PURE__ */ a(
4519
- "div",
4520
- {
4521
- className: "px-6 py-4",
4522
- style: { backgroundColor: Q },
4523
- children: /* @__PURE__ */ d("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
4524
- /* @__PURE__ */ d("div", { className: "flex items-center gap-2 mb-2", children: [
4525
- /* @__PURE__ */ a(oe, { icon: "mdi:home-map-marker", width: "20", color: Ct }),
4526
- /* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: "Delivery Address" })
4527
- ] }),
4528
- /* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: m })
4529
- ] })
4530
- }
4531
- );
4513
+ ].filter((f) => !!f).map((f) => Xe(f)).join(", ");
4514
+ return /* @__PURE__ */ a("div", { className: "px-6 py-4", style: { backgroundColor: Q }, children: /* @__PURE__ */ d("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
4515
+ /* @__PURE__ */ d("div", { className: "flex items-center gap-2 mb-2", children: [
4516
+ /* @__PURE__ */ a(oe, { icon: "mdi:home-map-marker", width: "20", color: Ct }),
4517
+ /* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: "Delivery Address" })
4518
+ ] }),
4519
+ /* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: m })
4520
+ ] }) });
4532
4521
  }, Do = (u) => {
4533
- const m = u == null ? void 0 : u.method, f = m ? Fn[m] : void 0;
4534
- return /* @__PURE__ */ a(
4535
- "div",
4536
- {
4537
- className: "px-6 py-4",
4538
- style: { backgroundColor: Q },
4539
- children: /* @__PURE__ */ d("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
4540
- /* @__PURE__ */ d("div", { className: "flex items-center gap-2 mb-1", children: [
4541
- /* @__PURE__ */ a(oe, { icon: "mdi:truck-delivery", width: "20", color: Ct }),
4542
- /* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: "Delivery Method" })
4543
- ] }),
4544
- /* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: f ? /* @__PURE__ */ d(be, { children: [
4545
- /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
4546
- /* @__PURE__ */ a(oe, { icon: f.icon, width: "18" }),
4547
- /* @__PURE__ */ a("span", { className: "font-medium", children: f.label })
4548
- ] }),
4549
- /* @__PURE__ */ a("div", { className: "text-gray-600", children: f.subtitle })
4550
- ] }) : "—" })
4551
- ] })
4552
- }
4553
- );
4522
+ const m = u == null ? void 0 : u.method, f = m ? Pn[m] : void 0;
4523
+ return /* @__PURE__ */ a("div", { className: "px-6 py-4", style: { backgroundColor: Q }, children: /* @__PURE__ */ d("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
4524
+ /* @__PURE__ */ d("div", { className: "flex items-center gap-2 mb-1", children: [
4525
+ /* @__PURE__ */ a(oe, { icon: "mdi:truck-delivery", width: "20", color: Ct }),
4526
+ /* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: "Delivery Method" })
4527
+ ] }),
4528
+ /* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: f ? /* @__PURE__ */ d(be, { children: [
4529
+ /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
4530
+ /* @__PURE__ */ a(oe, { icon: f.icon, width: "18" }),
4531
+ /* @__PURE__ */ a("span", { className: "font-medium", children: f.label })
4532
+ ] }),
4533
+ /* @__PURE__ */ a("div", { className: "text-gray-600", children: f.subtitle })
4534
+ ] }) : "" })
4535
+ ] }) });
4554
4536
  }, Mo = (u) => {
4555
4537
  const m = (u == null ? void 0 : u.method) || "card";
4556
- return /* @__PURE__ */ a(
4557
- "div",
4558
- {
4559
- className: "px-6 py-4",
4560
- style: { backgroundColor: Q },
4561
- children: /* @__PURE__ */ d("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
4562
- /* @__PURE__ */ d("div", { className: "flex items-center gap-2 mb-1", children: [
4563
- /* @__PURE__ */ a(
4564
- oe,
4565
- {
4566
- icon: "mdi:credit-card-outline",
4567
- width: "20",
4568
- color: Ct
4569
- }
4570
- ),
4571
- /* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: "Payment Method" })
4572
- ] }),
4573
- /* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: m === "card" ? /* @__PURE__ */ d(be, { children: [
4574
- "Credit Card — Mastercard",
4575
- /* @__PURE__ */ a("br", {}),
4576
- "•••• 7820   Exp: 12/26"
4577
- ] }) : Ge(m) })
4578
- ] })
4579
- }
4580
- );
4538
+ return /* @__PURE__ */ a("div", { className: "px-6 py-4", style: { backgroundColor: Q }, children: /* @__PURE__ */ d("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
4539
+ /* @__PURE__ */ d("div", { className: "flex items-center gap-2 mb-1", children: [
4540
+ /* @__PURE__ */ a(
4541
+ oe,
4542
+ {
4543
+ icon: "mdi:credit-card-outline",
4544
+ width: "20",
4545
+ color: Ct
4546
+ }
4547
+ ),
4548
+ /* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: "Payment Method" })
4549
+ ] }),
4550
+ /* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: m === "card" ? /* @__PURE__ */ d(be, { children: [
4551
+ "Credit Card — Mastercard",
4552
+ /* @__PURE__ */ a("br", {}),
4553
+ "•••• 7820   Exp: 12/26"
4554
+ ] }) : Xe(m) })
4555
+ ] }) });
4581
4556
  }, Bo = (u, m) => {
4582
4557
  const f = u.snapshotStage;
4583
- if (!f || f === "address" && Y || f === "delivery" && Ne || f === "payment" && Ie || f === "final" && St)
4558
+ if (!f || f === "address" && Y || f === "delivery" && Ne || f === "payment" && Ie || f === "final" && Nt)
4584
4559
  return null;
4585
4560
  switch (f) {
4586
4561
  case "initial":
@@ -4592,7 +4567,7 @@ const xt = "USD", Ws = (e, t = xt) => {
4592
4567
  case "payment":
4593
4568
  return Mo(u.snapshotPayload);
4594
4569
  case "final":
4595
- return Gr(u.snapshotPayload, !m);
4570
+ return Xr(u.snapshotPayload, !m);
4596
4571
  case "success":
4597
4572
  return qr(u.snapshotPayload);
4598
4573
  default:
@@ -4712,7 +4687,7 @@ const xt = "USD", Ws = (e, t = xt) => {
4712
4687
  /* @__PURE__ */ a(Lo, { selectedIndex: C }),
4713
4688
  K > 1 && /* @__PURE__ */ a(Wr, { showSubmit: !1 }),
4714
4689
  B.map((u, m) => {
4715
- var S;
4690
+ var k;
4716
4691
  const f = m === B.length - 1, w = !!u.snapshotStage;
4717
4692
  return /* @__PURE__ */ d("div", { children: [
4718
4693
  u.query && /* @__PURE__ */ a("div", { className: "flex justify-end", children: /* @__PURE__ */ a(
@@ -4726,7 +4701,7 @@ const xt = "USD", Ws = (e, t = xt) => {
4726
4701
  children: u.query
4727
4702
  }
4728
4703
  ) }),
4729
- u.response === "__TEXT__" && ((S = u.snapshotPayload) == null ? void 0 : S.text) && /* @__PURE__ */ a("div", { className: "mt-2", children: /* @__PURE__ */ a(
4704
+ u.response === "__TEXT__" && ((k = u.snapshotPayload) == null ? void 0 : k.text) && /* @__PURE__ */ a("div", { className: "mt-2", children: /* @__PURE__ */ a(
4730
4705
  "div",
4731
4706
  {
4732
4707
  className: "text-sm text-tanya-contrast px-7 py-4 rounded-r-xl rounded-bl-2xl w-full",
@@ -4819,7 +4794,7 @@ const xt = "USD", Ws = (e, t = xt) => {
4819
4794
  !xe && /* @__PURE__ */ a(
4820
4795
  "button",
4821
4796
  {
4822
- onClick: Fo,
4797
+ onClick: Po,
4823
4798
  className: "ml-2 text-xs px-2 py-1 rounded-full border hover:bg-gray-50",
4824
4799
  style: {
4825
4800
  borderColor: "var(--tanya-light)",
@@ -4841,13 +4816,13 @@ const xt = "USD", Ws = (e, t = xt) => {
4841
4816
  }
4842
4817
  ),
4843
4818
  /* @__PURE__ */ a("p", { className: "ml-3 text-gray-600", children: "Fetching your addresses..." })
4844
- ] }) : (j == null ? void 0 : j.length) > 0 ? /* @__PURE__ */ d(
4819
+ ] }) : (O == null ? void 0 : O.length) > 0 ? /* @__PURE__ */ d(
4845
4820
  "div",
4846
4821
  {
4847
4822
  className: `space-y-3 ${ee ? "opacity-70" : ""}`,
4848
4823
  children: [
4849
- j.map((u) => {
4850
- const m = [u.addressLine1, u.addressLine2].filter(Boolean).map((O) => Ge(O || "")).join(" "), f = Ge(u.city || ""), w = `${Ge(u.state || "")}${u.state && u.postalCode ? ", " : ""}${u.postalCode || ""}`, S = Ge(u.country || ""), $ = String(u.addressId ?? u.id), R = Z === $;
4824
+ O.map((u) => {
4825
+ const m = [u.addressLine1, u.addressLine2].filter(Boolean).map((j) => Xe(j || "")).join(" "), f = Xe(u.city || ""), w = `${Xe(u.state || "")}${u.state && u.postalCode ? ", " : ""}${u.postalCode || ""}`, k = Xe(u.country || ""), $ = String(u.addressId ?? u.id), R = Z === $;
4851
4826
  return /* @__PURE__ */ d(
4852
4827
  "label",
4853
4828
  {
@@ -4873,7 +4848,7 @@ const xt = "USD", Ws = (e, t = xt) => {
4873
4848
  /* @__PURE__ */ a("br", {}),
4874
4849
  w,
4875
4850
  /* @__PURE__ */ a("br", {}),
4876
- S
4851
+ k
4877
4852
  ] })
4878
4853
  ] })
4879
4854
  ]
@@ -4897,7 +4872,7 @@ const xt = "USD", Ws = (e, t = xt) => {
4897
4872
  /* @__PURE__ */ a(
4898
4873
  "button",
4899
4874
  {
4900
- onClick: Po,
4875
+ onClick: Fo,
4901
4876
  disabled: ee,
4902
4877
  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"}`,
4903
4878
  style: { background: Q },
@@ -4944,7 +4919,7 @@ const xt = "USD", Ws = (e, t = xt) => {
4944
4919
  "div",
4945
4920
  {
4946
4921
  className: `space-y-3 ${z ? "opacity-70" : ""}`,
4947
- children: N.map((u) => {
4922
+ children: S.map((u) => {
4948
4923
  const m = b.id === u.id;
4949
4924
  return /* @__PURE__ */ d(
4950
4925
  "label",
@@ -5018,7 +4993,7 @@ const xt = "USD", Ws = (e, t = xt) => {
5018
4993
  !xe && /* @__PURE__ */ a(
5019
4994
  "button",
5020
4995
  {
5021
- onClick: jo,
4996
+ onClick: Oo,
5022
4997
  className: "ml-2 text-xs px-2 py-1 rounded-full border hover:bg-gray-50",
5023
4998
  style: {
5024
4999
  borderColor: "var(--tanya-light)",
@@ -5038,7 +5013,7 @@ const xt = "USD", Ws = (e, t = xt) => {
5038
5013
  children: /* @__PURE__ */ d(
5039
5014
  "label",
5040
5015
  {
5041
- className: `flex items-start gap-3 p-4 border rounded-lg cursor-pointer transition hover:shadow-sm ${Ve === "card" ? "border-tanya-light" : "border-gray-300"} ${le ? "pointer-events-none" : ""}`,
5016
+ className: `flex items-start gap-3 p-4 border rounded-lg cursor-pointer transition hover:shadow-sm ${He === "card" ? "border-tanya-light" : "border-gray-300"} ${le ? "pointer-events-none" : ""}`,
5042
5017
  title: le ? "Payment already submitted" : "",
5043
5018
  children: [
5044
5019
  /* @__PURE__ */ a(
@@ -5047,7 +5022,7 @@ const xt = "USD", Ws = (e, t = xt) => {
5047
5022
  type: "radio",
5048
5023
  name: "payment",
5049
5024
  className: "mt-1 accent-tanya-light",
5050
- checked: Ve === "card",
5025
+ checked: He === "card",
5051
5026
  disabled: le,
5052
5027
  onChange: () => zt("card")
5053
5028
  }
@@ -5058,7 +5033,7 @@ const xt = "USD", Ws = (e, t = xt) => {
5058
5033
  " ",
5059
5034
  "Credit Card"
5060
5035
  ] }),
5061
- Ve === "card" && /* @__PURE__ */ d("div", { className: "text-sm text-gray-700 mt-1", children: [
5036
+ He === "card" && /* @__PURE__ */ d("div", { className: "text-sm text-gray-700 mt-1", children: [
5062
5037
  "Mastercard    •••• 7820",
5063
5038
  /* @__PURE__ */ a("br", {}),
5064
5039
  "Expiry: 12/26"
@@ -5073,7 +5048,7 @@ const xt = "USD", Ws = (e, t = xt) => {
5073
5048
  /* @__PURE__ */ a(
5074
5049
  "button",
5075
5050
  {
5076
- onClick: Oo,
5051
+ onClick: jo,
5077
5052
  className: "px-6 py-2.5 rounded-full font-semibold border transition-all hover:-translate-y-0.5 hover:shadow-sm",
5078
5053
  style: {
5079
5054
  borderColor: Q,
@@ -5094,7 +5069,7 @@ const xt = "USD", Ws = (e, t = xt) => {
5094
5069
  )
5095
5070
  ] })
5096
5071
  ] }),
5097
- St && Gr(
5072
+ Nt && Xr(
5098
5073
  {
5099
5074
  ...ie,
5100
5075
  address: JSON.parse(
@@ -5102,7 +5077,7 @@ const xt = "USD", Ws = (e, t = xt) => {
5102
5077
  ),
5103
5078
  delivery: localStorage.getItem("agentic_order_delivery"),
5104
5079
  payment: localStorage.getItem("agentic_order_payment"),
5105
- summary: Vr(ie == null ? void 0 : ie.currency)
5080
+ summary: Hr(ie == null ? void 0 : ie.currency)
5106
5081
  },
5107
5082
  !1
5108
5083
  )
@@ -5158,8 +5133,8 @@ const xt = "USD", Ws = (e, t = xt) => {
5158
5133
  );
5159
5134
  };
5160
5135
  export {
5161
- ki as AgenticShoppingButton,
5162
- vi as TanyaChatbot,
5163
- gi as TanyaChatbotProvider
5136
+ vi as AgenticShoppingButton,
5137
+ bi as TanyaChatbot,
5138
+ hi as TanyaChatbotProvider
5164
5139
  };
5165
5140
  //# sourceMappingURL=tanya-chatbot.es.js.map