tanya-chatbot 0.4.0 → 0.4.2

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,27 +1,27 @@
1
- import { useEffect as bt, useState as P, useRef as It } from "react";
1
+ import { useEffect as tt, useState as $, useRef as _t } from "react";
2
2
  import { jsx as a, jsxs as u, Fragment as re } from "react/jsx-runtime";
3
- import { createHttpLink as ir, ApolloClient as sr, InMemoryCache as lr, ApolloProvider as cr } from "@apollo/client";
4
- import { Provider as dr, useDispatch as Ae, useSelector as Mt } from "react-redux";
5
- import { createSlice as De, configureStore as ur } from "@reduxjs/toolkit";
6
- import * as Le from "@radix-ui/react-popover";
3
+ import { createHttpLink as ar, ApolloClient as ir, InMemoryCache as sr, ApolloProvider as lr } from "@apollo/client";
4
+ import { Provider as cr, useDispatch as je, useSelector as Mt } from "react-redux";
5
+ import { createSlice as De, configureStore as dr } from "@reduxjs/toolkit";
6
+ import * as Ae from "@radix-ui/react-popover";
7
7
  import "clsx";
8
8
  import "tailwind-merge";
9
- import E from "axios";
9
+ import T from "axios";
10
10
  import "crypto-js";
11
- import { Icon as ge } from "@iconify/react";
12
- import { toast as U } from "react-toastify";
13
- const pr = '*,: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}.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}.mx-3{margin-left:.75rem;margin-right:.75rem}.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-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.h-12{height:3rem}.h-28{height:7rem}.h-3{height:.75rem}.h-6{height:1.5rem}.h-\\[120px\\]{height:120px}.h-\\[200px\\]{height:200px}.h-\\[60px\\]{height:60px}.h-\\[90vh\\]{height:90vh}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-screen{height:100vh}.w-28{width:7rem}.w-3{width:.75rem}.w-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-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%}.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-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.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}.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-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-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-\\[\\#C9C2DE\\]{--tw-border-opacity: 1;border-color:rgb(201 194 222 / var(--tw-border-opacity, 1))}.border-\\[\\#E5E5E5\\]{--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.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-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))}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-\\[1px\\]{padding:1px}.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-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-4{padding-top:1rem;padding-bottom:1rem}.pb-2{padding-bottom:.5rem}.pl-2{padding-left:.5rem}.pr-5{padding-right:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.font-nunitoSans{font-family:Nunito Sans}.text-\\[12px\\]{font-size:12px}.text-\\[14px\\]{font-size:14px}.text-\\[15px\\]{font-size:15px}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.italic{font-style:italic}.leading-snug{line-height:1.375}.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-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-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.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))}.line-through{text-decoration-line:line-through}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-80{opacity:.8}.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-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}.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-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-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-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}}.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\\:text-\\[\\#6952C7\\]:hover{--tw-text-opacity: 1;color:rgb(105 82 199 / var(--tw-text-opacity, 1))}.hover\\:opacity-90:hover{opacity:.9}.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\\:w-\\[80vw\\]{width:80vw}}@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\\: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}}';
14
- function yo() {
15
- return bt(() => {
11
+ import { Icon as we } from "@iconify/react";
12
+ import { toast as M } from "react-toastify";
13
+ const ur = '*,: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}.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}.mx-3{margin-left:.75rem;margin-right:.75rem}.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-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.h-12{height:3rem}.h-28{height:7rem}.h-3{height:.75rem}.h-6{height:1.5rem}.h-\\[120px\\]{height:120px}.h-\\[200px\\]{height:200px}.h-\\[60px\\]{height:60px}.h-\\[90vh\\]{height:90vh}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-screen{height:100vh}.w-28{width:7rem}.w-3{width:.75rem}.w-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-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%}.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-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.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}.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-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-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-\\[\\#C9C2DE\\]{--tw-border-opacity: 1;border-color:rgb(201 194 222 / var(--tw-border-opacity, 1))}.border-\\[\\#E5E5E5\\]{--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.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-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))}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-\\[1px\\]{padding:1px}.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-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-4{padding-top:1rem;padding-bottom:1rem}.pb-2{padding-bottom:.5rem}.pl-2{padding-left:.5rem}.pr-5{padding-right:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.font-nunitoSans{font-family:Nunito Sans}.text-\\[12px\\]{font-size:12px}.text-\\[14px\\]{font-size:14px}.text-\\[15px\\]{font-size:15px}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.italic{font-style:italic}.leading-snug{line-height:1.375}.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-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-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.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))}.line-through{text-decoration-line:line-through}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-80{opacity:.8}.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-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}.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-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-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-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}}.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\\:text-\\[\\#6952C7\\]:hover{--tw-text-opacity: 1;color:rgb(105 82 199 / var(--tw-text-opacity, 1))}.hover\\:opacity-90:hover{opacity:.9}.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\\:w-\\[80vw\\]{width:80vw}}@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\\: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}}';
14
+ function bo() {
15
+ return tt(() => {
16
16
  if (typeof document < "u") {
17
17
  const t = document.createElement("style");
18
- return t.textContent = pr, document.head.appendChild(t), () => {
18
+ return t.textContent = ur, document.head.appendChild(t), () => {
19
19
  document.head.removeChild(t);
20
20
  };
21
21
  }
22
22
  }, []), null;
23
23
  }
24
- const fr = {
24
+ const pr = {
25
25
  store: {
26
26
  storeCode: "",
27
27
  storeName: "",
@@ -55,30 +55,30 @@ const fr = {
55
55
  mobile: []
56
56
  }
57
57
  }
58
- }, Be = De({
58
+ }, Le = De({
59
59
  name: "store",
60
- initialState: fr,
60
+ initialState: pr,
61
61
  reducers: {
62
62
  setStore: (t, e) => {
63
63
  t.store = e.payload;
64
64
  }
65
65
  }
66
- }), { setStore: vo } = Be.actions, mr = Be.reducer, hr = {
66
+ }), { setStore: yo } = Le.actions, fr = Le.reducer, mr = {
67
67
  product: null
68
- }, Ue = De({
68
+ }, Be = De({
69
69
  name: "product",
70
- initialState: hr,
70
+ initialState: mr,
71
71
  reducers: {
72
72
  setProduct: (t, e) => {
73
73
  t.product = e.payload;
74
74
  }
75
75
  }
76
- }), { setProduct: oe } = Ue.actions, wr = Ue.reducer, gr = ur({
76
+ }), { setProduct: oe } = Be.actions, hr = Be.reducer, wr = dr({
77
77
  reducer: {
78
- store: mr,
79
- product: wr
78
+ store: fr,
79
+ product: hr
80
80
  }
81
- }), br = ({ children: t }) => /* @__PURE__ */ a(dr, { store: gr, children: t }), Ht = (t) => {
81
+ }), gr = ({ children: t }) => /* @__PURE__ */ a(cr, { store: wr, children: t }), Ht = (t) => {
82
82
  const e = new CustomEvent("reactCartUpdated", {
83
83
  detail: {
84
84
  cartUpdated: !0,
@@ -90,28 +90,28 @@ const fr = {
90
90
  function xr({
91
91
  ...t
92
92
  }) {
93
- return /* @__PURE__ */ a(Le.Root, { "data-slot": "popover", ...t });
93
+ return /* @__PURE__ */ a(Ae.Root, { "data-slot": "popover", ...t });
94
94
  }
95
- function yr({
95
+ function br({
96
96
  ...t
97
97
  }) {
98
- return /* @__PURE__ */ a(Le.Trigger, { "data-slot": "popover-trigger", ...t });
98
+ return /* @__PURE__ */ a(Ae.Trigger, { "data-slot": "popover-trigger", ...t });
99
99
  }
100
- const st = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1.amazonaws.com/dev/api/bedrock/invoke/stream", xAPIKey: "BJBtjpPkqGatuoa3qJqdR8aHXSsHkgvGaootbubi", serverUrl: "https://tanya-sfcc-server.vercel.app/", basePath: "sc-api" }), qe = async () => {
100
+ const yt = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1.amazonaws.com/dev/api/bedrock/invoke/stream", xAPIKey: "BJBtjpPkqGatuoa3qJqdR8aHXSsHkgvGaootbubi", serverUrl: "https://tanya-sfcc-server.vercel.app/", basePath: "sc-api" }), Ue = async () => {
101
101
  const t = "https://tanya-sfcc-server.vercel.app/";
102
102
  try {
103
- const e = await E.post(
104
- `${t}api/auth/token-bm-grant?baseUrl=${Z()}&siteId=${q()}`
103
+ const e = await T.post(
104
+ `${t}api/auth/token-bm-grant?baseUrl=${rt()}&siteId=${R()}`
105
105
  );
106
106
  return e.status === 200 && e.data.access_token ? e.data.access_token : (console.error("Failed to fetch token:", e.data), null);
107
107
  } catch (e) {
108
- return E.isAxiosError(e) ? console.error("Error fetching token:", e.response || e.message) : console.error("Unexpected error:", e), null;
108
+ return T.isAxiosError(e) ? console.error("Error fetching token:", e.response || e.message) : console.error("Unexpected error:", e), null;
109
109
  }
110
- }, Me = async (t) => {
110
+ }, qe = async (t) => {
111
111
  const e = "https://tanya-sfcc-server.vercel.app/";
112
112
  try {
113
- const r = JSON.parse(sessionStorage.getItem("customerData") || "{}").dwsid, o = await E.post(
114
- `${e}api/auth/token-existing-guest-customer?dwsid=${r}&baseUrl=${Z()}&siteId=${q()}&pubCfg=${tt()}&envRef=${et()}&orgRef=${rt()}`,
113
+ const r = JSON.parse(sessionStorage.getItem("customerData") || "{}").dwsid, o = await T.post(
114
+ `${e}api/auth/token-existing-guest-customer?dwsid=${r}&baseUrl=${rt()}&siteId=${R()}&pubCfg=${ot()}&envRef=${nt()}&orgRef=${at()}`,
115
115
  {},
116
116
  {
117
117
  headers: {
@@ -122,24 +122,24 @@ const st = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1
122
122
  );
123
123
  return o.status === 200 && o.data ? o.data : null;
124
124
  } catch (r) {
125
- return E.isAxiosError(r) ? console.error("Error creating basket:", r.response || r.message) : console.error("Unexpected error:", r), null;
125
+ return T.isAxiosError(r) ? console.error("Error creating basket:", r.response || r.message) : console.error("Unexpected error:", r), null;
126
126
  }
127
127
  };
128
- async function Ot() {
129
- var g;
130
- const t = q(), e = "access_token_" + t, r = "expires_in_" + t, o = localStorage.getItem(r), n = localStorage.getItem(e);
128
+ async function Tt() {
129
+ var x;
130
+ const t = R(), e = "access_token_" + t, r = "expires_in_" + t, o = localStorage.getItem(r), n = localStorage.getItem(e);
131
131
  console.log(n);
132
- const s = ((g = JSON.parse(sessionStorage.getItem("customerData") || "{}")) == null ? void 0 : g.isGuest) || !0;
132
+ const l = ((x = JSON.parse(sessionStorage.getItem("customerData") || "{}")) == null ? void 0 : x.isGuest) || !0;
133
133
  if (o && n && (/* @__PURE__ */ new Date()).getTime() < parseInt(o))
134
134
  return console.log("access token found in local storage"), { access_token: n, expires_in: o };
135
- const { serverUrl: l } = st(), d = JSON.parse(
135
+ const { serverUrl: c } = yt(), d = JSON.parse(
136
136
  sessionStorage.getItem("customerData") || "{}"
137
137
  ).dwsid, i = JSON.parse(
138
138
  sessionStorage.getItem("customerData") || "{}"
139
139
  ).usrRef;
140
140
  try {
141
- const w = s ? "unregister-auth" : "register-auth", S = await E.get(
142
- `${l}sc-api/${w}?dwsid=${d}&email=${i}&pubCfg=${tt()}&envRef=${et()}&orgRef=${rt()}&siteId=${q()}&token=true`,
141
+ const h = l ? "unregister-auth" : "register-auth", S = await T.get(
142
+ `${c}sc-api/${h}?dwsid=${d}&email=${i}&pubCfg=${ot()}&envRef=${nt()}&orgRef=${at()}&siteId=${R()}&token=true`,
143
143
  {
144
144
  withCredentials: !0
145
145
  }
@@ -147,23 +147,23 @@ async function Ot() {
147
147
  return localStorage.setItem(e, S.data.access_token), localStorage.setItem(
148
148
  r,
149
149
  String((/* @__PURE__ */ new Date()).getTime() + S.data.expires_in * 1e3)
150
- ), localStorage.setItem("isGuest", s ? "true" : "false"), S.data;
151
- } catch (w) {
152
- console.log(w);
150
+ ), localStorage.setItem("isGuest", l ? "true" : "false"), S.data;
151
+ } catch (h) {
152
+ console.log(h);
153
153
  }
154
154
  }
155
- const Z = () => sessionStorage.getItem("Host"), q = () => sessionStorage.getItem("SiteId"), tt = () => sessionStorage.getItem("pubCfg"), et = () => sessionStorage.getItem("envRef"), rt = () => sessionStorage.getItem("orgRef"), be = async (t) => {
155
+ const rt = () => sessionStorage.getItem("Host"), R = () => sessionStorage.getItem("SiteId"), ot = () => sessionStorage.getItem("pubCfg"), nt = () => sessionStorage.getItem("envRef"), at = () => sessionStorage.getItem("orgRef"), ge = async (t) => {
156
156
  console.log("fetching results");
157
- const { serverUrl: e, basePath: r } = st();
157
+ const { serverUrl: e, basePath: r } = yt();
158
158
  let o = "";
159
159
  {
160
- const n = await Ot();
160
+ const n = await Tt();
161
161
  console.log("the token from getSearchResults", n), o = n.access_token;
162
162
  }
163
163
  try {
164
- const n = Z();
165
- return (await E.get(
166
- `${e}${r}/search-sfcc?baseUrl=${n}&query=${t}&siteId=${q()}&pubCfg=${tt()}&envRef=${et()}&orgRef=${rt()}`,
164
+ const n = rt();
165
+ return (await T.get(
166
+ `${e}${r}/search-sfcc?baseUrl=${n}&query=${t}&siteId=${R()}&pubCfg=${ot()}&envRef=${nt()}&orgRef=${at()}`,
167
167
  {
168
168
  headers: {
169
169
  "Content-Type": "application/json",
@@ -174,13 +174,13 @@ const Z = () => sessionStorage.getItem("Host"), q = () => sessionStorage.getItem
174
174
  } catch (n) {
175
175
  throw console.error("Error fetching search results:", n), n;
176
176
  }
177
- }, He = async (t) => {
177
+ }, Me = async (t) => {
178
178
  if (!t) throw new Error("Product ID is required");
179
- const { serverUrl: e, basePath: r } = st(), o = Z();
179
+ const { serverUrl: e, basePath: r } = yt(), o = rt();
180
180
  console.log("calling access");
181
- const { access_token: n } = await Ot();
182
- return console.log(n), (await E.get(
183
- `${e}${r}/product-sfcc/${t}?baseUrl=${o}&siteId=${q()}&pubCfg=${tt()}&envRef=${et()}&orgRef=${rt()}`,
181
+ const { access_token: n } = await Tt();
182
+ return console.log(n), (await T.get(
183
+ `${e}${r}/product-sfcc/${t}?baseUrl=${o}&siteId=${R()}&pubCfg=${ot()}&envRef=${nt()}&orgRef=${at()}`,
184
184
  {
185
185
  headers: {
186
186
  "Content-Type": "application/json",
@@ -188,24 +188,24 @@ const Z = () => sessionStorage.getItem("Host"), q = () => sessionStorage.getItem
188
188
  }
189
189
  }
190
190
  )).data;
191
- }, vr = async (t) => {
191
+ }, yr = async (t) => {
192
192
  if (!t) throw new Error("customerId is required");
193
- const e = await qe(), { customer_token: r } = await Me(
193
+ const e = await Ue(), { customer_token: r } = await qe(
194
194
  e
195
- ), { serverUrl: o, basePath: n } = st(), l = (await Ot()).access_token;
196
- return (await E.get(
197
- `${o}${n}/get-interest?baseUrl=${Z()}&customerId=${t}&siteId=${q()}&pubCfg=${tt()}&envRef=${et()}&orgRef=${rt()}`,
195
+ ), { serverUrl: o, basePath: n } = yt(), c = (await Tt()).access_token;
196
+ return (await T.get(
197
+ `${o}${n}/get-interest?baseUrl=${rt()}&customerId=${t}&siteId=${R()}&pubCfg=${ot()}&envRef=${nt()}&orgRef=${at()}`,
198
198
  {
199
199
  headers: {
200
200
  "Content-Type": "application/json",
201
- Authorization: `Bearer ${l}`
201
+ Authorization: `Bearer ${c}`
202
202
  }
203
203
  }
204
204
  )).data;
205
- }, xe = (t) => String(typeof t == "string" ? t : t["en-US"] || t), ye = (t) => t != null && t.image ? [t.image] : "variants" in t ? t.variants[0].images : t.masterVariant.images.map((e) => e.url), kr = (t, e) => t.toLocaleString("en-US", {
205
+ }, xe = (t) => String(typeof t == "string" ? t : t["en-US"] || t), be = (t) => t != null && t.image ? [t.image] : "variants" in t ? t.variants[0].images : t.masterVariant.images.map((e) => e.url), vr = (t, e) => t.toLocaleString("en-US", {
206
206
  style: "currency",
207
207
  currency: e || "USD"
208
- }), ve = (t) => {
208
+ }), ye = (t) => {
209
209
  var e, r, o;
210
210
  return "variants" in t ? {
211
211
  centAmount: (e = t.variants[0]) == null ? void 0 : e.prices.EUR.max,
@@ -214,37 +214,37 @@ const Z = () => sessionStorage.getItem("Host"), q = () => sessionStorage.getItem
214
214
  centAmount: (r = t.masterVariant) == null ? void 0 : r.prices[0].value.centAmount,
215
215
  currencyCode: (o = t.masterVariant) == null ? void 0 : o.prices[0].value.currencyCode
216
216
  };
217
- }, Sr = (t) => t.charAt(0).toUpperCase() + t.slice(1), ke = (t, e) => t.length < e ? t : t.slice(0, e) + "...", Xt = (t) => t.split("\\n").map((e, r) => {
217
+ }, kr = (t) => t.charAt(0).toUpperCase() + t.slice(1), ve = (t, e) => t.length < e ? t : t.slice(0, e) + "...", Xt = (t) => t.split("\\n").map((e, r) => {
218
218
  const o = e.match(/^(\d+)\.\s(.+)/);
219
219
  return o ? `<p key=${r} class="mb-2"><strong>${o[1]}.</strong> ${o[2]}</p>` : e.trim() ? `<p key=${r} class="mb-2">${e}</p>` : "<br/>";
220
220
  }).join("");
221
- function Cr() {
222
- const t = () => window.innerWidth < 425 ? 1 : window.innerWidth < 768 ? 2 : 4, [e, r] = P(t);
223
- return bt(() => {
221
+ function Sr() {
222
+ const t = () => window.innerWidth < 425 ? 1 : window.innerWidth < 768 ? 2 : 4, [e, r] = $(t);
223
+ return tt(() => {
224
224
  const o = () => r(t());
225
225
  return window.addEventListener("resize", o), () => window.removeEventListener("resize", o);
226
226
  }, []), e;
227
227
  }
228
- const _r = ({
228
+ const Cr = ({
229
229
  product: t
230
230
  }) => {
231
- const e = Ae(), r = Cr(), [o, n] = P(0), s = () => {
231
+ const e = je(), r = Sr(), [o, n] = $(0), l = () => {
232
232
  n(
233
233
  (i) => i + r >= t.length ? 0 : i + r
234
234
  );
235
- }, l = () => {
235
+ }, c = () => {
236
236
  n(
237
237
  (i) => i - r < 0 ? t.length - (t.length % r || r) : i - r
238
238
  );
239
239
  }, d = async (i) => {
240
- const g = await He(i);
241
- e(oe(g));
240
+ const x = await Me(i);
241
+ e(oe(x));
242
242
  };
243
243
  return /* @__PURE__ */ a("div", { className: "mt-2 overflow-x-hidden", children: /* @__PURE__ */ u("div", { className: "flex items-center justify-center gap-4 relative", children: [
244
244
  (t == null ? void 0 : t.length) > r && /* @__PURE__ */ a(
245
245
  "button",
246
246
  {
247
- onClick: l,
247
+ onClick: c,
248
248
  className: "absolute z-50 left-0 text-[#000000] bg-[#ffffff] rounded-full p-2 flex items-center h-fit",
249
249
  style: {
250
250
  height: "30px",
@@ -255,7 +255,7 @@ const _r = ({
255
255
  }
256
256
  ),
257
257
  /* @__PURE__ */ a("div", { className: "flex gap-5 justify-center flex-1 overflow-hidden", children: t.slice(o, o + r).map((i) => {
258
- var g, w, S, C;
258
+ var x, h, S, _;
259
259
  return /* @__PURE__ */ u(
260
260
  "div",
261
261
  {
@@ -267,7 +267,7 @@ const _r = ({
267
267
  /* @__PURE__ */ a("div", { className: "w-full p-2 flex items-center justify-center bg-white", children: /* @__PURE__ */ a(
268
268
  "img",
269
269
  {
270
- src: ((g = ye(i)[0]) == null ? void 0 : g.link) || ye(i)[0] || // fallback if it's a string
270
+ src: ((x = be(i)[0]) == null ? void 0 : x.link) || be(i)[0] || // fallback if it's a string
271
271
  "https://via.placeholder.com/120",
272
272
  alt: i != null && i.productName ? i.productName : "Product",
273
273
  className: "w-28 h-28 rounded-[10px] transition-transform duration-300 hover:scale-125 object-cover"
@@ -279,8 +279,8 @@ const _r = ({
279
279
  className: "text-white w-full p-2 text-[12px] text-center h-[60px]",
280
280
  children: [
281
281
  /* @__PURE__ */ u("div", { className: "relative inline-block group", children: [
282
- /* @__PURE__ */ a("div", { className: "w-full line-clamp-1 overflow-hidden text-ellipsis text-[#000000] font-medium font-nunitoSans", children: i != null && i.productName ? i.productName : i != null && i.product_name ? i.product_name : ke(
283
- xe((w = i == null ? void 0 : i.name) == null ? void 0 : w["en-US"]),
282
+ /* @__PURE__ */ a("div", { className: "w-full line-clamp-1 overflow-hidden text-ellipsis text-[#000000] font-medium font-nunitoSans", children: i != null && i.productName ? i.productName : i != null && i.product_name ? i.product_name : ve(
283
+ xe((h = i == null ? void 0 : i.name) == null ? void 0 : h["en-US"]),
284
284
  60
285
285
  ) || "Product" }),
286
286
  /* @__PURE__ */ a(
@@ -294,7 +294,7 @@ const _r = ({
294
294
  marginBottom: "5px",
295
295
  zIndex: 50
296
296
  },
297
- children: i != null && i.productName ? i.productName : i != null && i.product_name ? i.product_name : ke(
297
+ children: i != null && i.productName ? i.productName : i != null && i.product_name ? i.product_name : ve(
298
298
  xe((S = i == null ? void 0 : i.name) == null ? void 0 : S["en-US"]),
299
299
  60
300
300
  ) || "Product"
@@ -302,9 +302,9 @@ const _r = ({
302
302
  )
303
303
  ] }),
304
304
  /* @__PURE__ */ u("div", { className: " flex text-center items-center gap-2 text-[14px] text-[#14121F] font-bold font-nunitoSans text-base mb-1", children: [
305
- /* @__PURE__ */ a("p", { children: kr(
306
- i != null && i.price ? Number(i == null ? void 0 : i.price) : ve(i).centAmount || 0,
307
- (C = ve(i)) == null ? void 0 : C.currencyCode
305
+ /* @__PURE__ */ a("p", { children: vr(
306
+ i != null && i.price ? Number(i == null ? void 0 : i.price) : ye(i).centAmount || 0,
307
+ (_ = ye(i)) == null ? void 0 : _.currencyCode
308
308
  ) }),
309
309
  /* @__PURE__ */ u("p", { className: "text-[#14121F] font-normal line-through text-sm font-nunitoSans truncate", children: [
310
310
  "$",
@@ -322,7 +322,7 @@ const _r = ({
322
322
  (t == null ? void 0 : t.length) > r && /* @__PURE__ */ a(
323
323
  "button",
324
324
  {
325
- onClick: s,
325
+ onClick: l,
326
326
  className: "absolute z-50 right-0 text-[#000000] bg-[#ffffff] rounded-full p-2 flex items-center h-fit",
327
327
  style: {
328
328
  height: "30px",
@@ -333,7 +333,7 @@ const _r = ({
333
333
  }
334
334
  )
335
335
  ] }) });
336
- }, Ir = ({ chat: t, storeDetails: e }) => /* @__PURE__ */ a("div", { className: "bg-[#FFFFFF] px-7 py-4 rounded-r-xl rounded-bl-2xl w-full", children: t.map((r, o) => /* @__PURE__ */ u(
336
+ }, _r = ({ chat: t, storeDetails: e }) => /* @__PURE__ */ a("div", { className: "bg-[#FFFFFF] px-7 py-4 rounded-r-xl rounded-bl-2xl w-full", children: t.map((r, o) => /* @__PURE__ */ u(
337
337
  "div",
338
338
  {
339
339
  className: "mb-4 p-3 rounded-xl",
@@ -346,11 +346,11 @@ const _r = ({
346
346
  "div",
347
347
  {
348
348
  className: "font-nunitoSans font-bold text-sm text-[#494949] p-2 w-fit rounded-[20px]",
349
- children: Sr(r.keyword) || "No keyword"
349
+ children: kr(r.keyword) || "No keyword"
350
350
  }
351
351
  ),
352
352
  /* @__PURE__ */ a(
353
- _r,
353
+ Cr,
354
354
  {
355
355
  product: r.items,
356
356
  storeDetails: e
@@ -359,13 +359,13 @@ const _r = ({
359
359
  ]
360
360
  },
361
361
  o
362
- )) }), Ve = async (t, e) => {
363
- const { serverUrl: r, basePath: o } = st(), n = `${r}`;
362
+ )) }), He = async (t, e) => {
363
+ const { serverUrl: r, basePath: o } = yt(), n = `${r}`;
364
364
  console.log(`customer_token
365
365
  `, t);
366
366
  try {
367
- return (await E.post(
368
- `${n}${o}/basket/create?baseUrl=${Z()}&siteId=${q()}&pubCfg=${tt()}&envRef=${et()}&orgRef=${rt()}`,
367
+ return (await T.post(
368
+ `${n}${o}/basket/create?baseUrl=${rt()}&siteId=${R()}&pubCfg=${ot()}&envRef=${nt()}&orgRef=${at()}`,
369
369
  e,
370
370
  {
371
371
  headers: {
@@ -374,14 +374,14 @@ const _r = ({
374
374
  }
375
375
  }
376
376
  )).data;
377
- } catch (s) {
378
- return E.isAxiosError(s) ? console.error("Error creating basket:", s.response || s.message) : console.error("Unexpected error:", s), null;
377
+ } catch (l) {
378
+ return T.isAxiosError(l) ? console.error("Error creating basket:", l.response || l.message) : console.error("Unexpected error:", l), null;
379
379
  }
380
380
  }, Vt = async (t, e, r) => {
381
- const { serverUrl: o, basePath: n } = st(), s = `${o}`;
381
+ const { serverUrl: o, basePath: n } = yt(), l = `${o}`;
382
382
  try {
383
- const l = await E.post(
384
- `${s}${n}/basket/add-product/${t}?baseUrl=${Z()}&siteId=${q()}&pubCfg=${tt()}&envRef=${et()}&orgRef=${rt()}`,
383
+ const c = await T.post(
384
+ `${l}${n}/basket/add-product/${t}?baseUrl=${rt()}&siteId=${R()}&pubCfg=${ot()}&envRef=${nt()}&orgRef=${at()}`,
385
385
  e,
386
386
  {
387
387
  headers: {
@@ -390,161 +390,136 @@ const _r = ({
390
390
  }
391
391
  }
392
392
  );
393
- return l.status === 200 && l.data ? l.data : null;
394
- } catch (l) {
395
- return E.isAxiosError(l) ? console.error(
393
+ return c.status === 200 && c.data ? c.data : null;
394
+ } catch (c) {
395
+ return T.isAxiosError(c) ? console.error(
396
396
  "Error adding products to basket:",
397
- l.response || l.message
398
- ) : console.error("Unexpected error:", l), null;
397
+ c.response || c.message
398
+ ) : console.error("Unexpected error:", c), null;
399
399
  }
400
- }, Re = async ({
401
- basketId: t,
402
- customer_token: e
403
- }) => {
404
- var s;
405
- const { serverUrl: r, basePath: o } = st(), n = `${r}`;
400
+ }, Yt = "sfcc_basket_id", ke = "sfcc_customer_token", Et = "sfcc_token_expiry", Fr = 300 * 1e3, Ft = "1.0.0";
401
+ const et = (t) => {
406
402
  try {
407
- const l = await E.get(
408
- `${n}${o}/basket/${t}?baseUrl=${Z()}&siteId=${q()}&pubCfg=${tt()}&envRef=${et()}&orgRef=${rt()}`,
409
- {
410
- headers: {
411
- "Content-Type": "application/json",
412
- Authorization: e
413
- }
414
- }
415
- );
416
- return { status: l.status, data: l.data };
417
- } catch (l) {
418
- return E.isAxiosError(l) ? { status: (s = l.response) == null ? void 0 : s.status, data: null } : { status: null, data: null };
419
- }
420
- }, Rt = "sfcc_basket_id", Se = "sfcc_customer_token", Tt = "sfcc_token_expiry", Fr = 300 * 1e3, Ft = "1.0.0";
421
- const xt = (t) => {
422
- try {
423
- t ? localStorage.setItem(Rt, t) : localStorage.removeItem(Rt);
403
+ t ? localStorage.setItem(Yt, t) : localStorage.removeItem(Yt);
424
404
  } catch (e) {
425
405
  console.error("Error saving basket ID to storage:", e);
426
406
  }
427
- }, Yt = (t) => {
407
+ }, Rt = (t) => {
428
408
  try {
429
409
  if (t) {
430
- localStorage.setItem(Se, t);
410
+ localStorage.setItem(ke, t);
431
411
  const e = Date.now() + Fr;
432
- localStorage.setItem(Tt, e.toString());
412
+ localStorage.setItem(Et, e.toString());
433
413
  } else
434
- localStorage.removeItem(Se);
414
+ localStorage.removeItem(ke);
435
415
  } catch (e) {
436
416
  console.error("Error storing token:", e);
437
417
  }
438
- }, Ce = 300, Nr = () => {
439
- var d, i, g, w, S, C;
440
- const t = Ae(), e = Mt((_) => _.product.product), r = Mt((_) => _.store.store), [o, n] = P(!!e);
441
- if (bt(() => {
418
+ }, Se = 300, Ir = () => {
419
+ var d, i, x, h, S, _;
420
+ const t = je(), e = Mt((F) => F.product.product), r = Mt((F) => F.store.store), [o, n] = $(!!e);
421
+ if (tt(() => {
442
422
  n(!!e);
443
423
  }, [e]), !e) return null;
444
- const s = async () => {
445
- var _, j, M, H, lt, vt, Pt, ot, kt, St, ct, $t, zt, Ct, O, dt;
424
+ const l = async () => {
425
+ var F, D, K, it, H, st, vt, Ot, Q, kt, St, lt, Pt, $t, Ct, O;
446
426
  console.log(e, "the prod");
447
427
  try {
448
- if (!((j = (_ = e == null ? void 0 : e.variants) == null ? void 0 : _[0]) != null && j.product_id) && !(e.type.item || e.type.bundle) && !((H = (M = e == null ? void 0 : e.variants) == null ? void 0 : M[0]) != null && H.productId)) {
449
- U.error("Variants not available", {
428
+ if (!((D = (F = e == null ? void 0 : e.variants) == null ? void 0 : F[0]) != null && D.product_id) && !(e.type.item || e.type.bundle) && !((it = (K = e == null ? void 0 : e.variants) == null ? void 0 : K[0]) != null && it.productId)) {
429
+ M.error("Variants not available", {
450
430
  position: "bottom-right",
451
431
  autoClose: 1e3
452
432
  }), console.error("No product variant found");
453
433
  return;
454
434
  }
455
- const p = [
435
+ const C = [
456
436
  {
457
- product_id: ((lt = e.variants) == null ? void 0 : lt[0].product_id) || ((vt = e.variants) == null ? void 0 : vt[0].productId) || (e == null ? void 0 : e.id),
437
+ product_id: ((H = e.variants) == null ? void 0 : H[0].product_id) || ((st = e.variants) == null ? void 0 : st[0].productId) || (e == null ? void 0 : e.id),
458
438
  quantity: 1
459
439
  }
460
440
  ];
461
- console.log(p, "the product data");
462
- const _t = JSON.parse(
441
+ console.log(C, "the product data");
442
+ const k = JSON.parse(
463
443
  sessionStorage.getItem("customerData") || "{}"
464
- ), nt = (_t == null ? void 0 : _t.basketId) || localStorage.getItem(Rt), Jt = !1, jt = localStorage.getItem(Tt), Y = Date.now();
465
- if (!Jt || !jt || Y >= parseInt(jt)) {
466
- let $ = "";
444
+ ), ct = (k == null ? void 0 : k.basketId) || localStorage.getItem(Yt), Jt = !1, zt = localStorage.getItem(Et), jt = Date.now();
445
+ if (!Jt || !zt || jt >= parseInt(zt)) {
446
+ let z = "";
467
447
  {
468
- const J = await Ot();
469
- console.log("token from auth data"), $ = "Bearer " + J.access_token;
448
+ const A = await Tt();
449
+ console.log("token from auth data"), z = "Bearer " + A.access_token;
470
450
  }
471
- if (!$) {
451
+ if (!z) {
472
452
  console.error("Failed to get customer_token");
473
453
  return;
474
454
  }
475
- const At = Y + 300 * 1e3;
476
- if (Yt($), localStorage.setItem(Tt, At.toString()), nt) {
477
- const J = await Re({
478
- basketId: nt,
479
- customer_token: $
480
- });
481
- if (console.log(nt, "basket id from customer"), J.status === 200 && J) {
482
- const W = await Vt(
483
- nt,
484
- p,
485
- $
486
- );
487
- (((Pt = W == null ? void 0 : W.product_items) == null ? void 0 : Pt.length) > 0 || ((ot = W == null ? void 0 : W.productItems) == null ? void 0 : ot.length) > 0) && (U.success("Added to cart", {
488
- position: "bottom-right",
489
- autoClose: 3e3,
490
- hideProgressBar: !1,
491
- closeOnClick: !0,
492
- pauseOnHover: !0,
493
- draggable: !0
494
- }), Ht(nt));
495
- return;
496
- }
455
+ const dt = jt + 300 * 1e3;
456
+ if (Rt(z), localStorage.setItem(Et, dt.toString()), ct) {
457
+ console.log(ct, "basket id from customer");
458
+ const A = await Vt(
459
+ ct,
460
+ C,
461
+ z
462
+ );
463
+ (((vt = A == null ? void 0 : A.product_items) == null ? void 0 : vt.length) > 0 || ((Ot = A == null ? void 0 : A.productItems) == null ? void 0 : Ot.length) > 0) && (M.success("Added to cart", {
464
+ position: "bottom-right",
465
+ autoClose: 3e3,
466
+ hideProgressBar: !1,
467
+ closeOnClick: !0,
468
+ pauseOnHover: !0,
469
+ draggable: !0
470
+ }), Ht(ct));
471
+ return;
497
472
  }
498
- const Wt = {
473
+ const Dt = {
499
474
  productItems: [
500
475
  {
501
- productId: ((kt = e.variants) == null ? void 0 : kt[0].product_id) || ((St = e.variants) == null ? void 0 : St[0].productId) || (e == null ? void 0 : e.id),
476
+ productId: ((Q = e.variants) == null ? void 0 : Q[0].product_id) || ((kt = e.variants) == null ? void 0 : kt[0].productId) || (e == null ? void 0 : e.id),
502
477
  quantity: 1
503
478
  }
504
479
  ]
505
480
  };
506
481
  console.log("before create basket");
507
- const h = await Ve($, Wt);
482
+ const m = await He(z, Dt);
508
483
  if (console.log(
509
- h,
510
- h == null ? void 0 : h.basket_id,
511
- h == null ? void 0 : h.basketId,
484
+ m,
485
+ m == null ? void 0 : m.basket_id,
486
+ m == null ? void 0 : m.basketId,
512
487
  "the basket response"
513
- ), !(h != null && h.basket_id) && !(h != null && h.basketId)) {
488
+ ), !(m != null && m.basket_id) && !(m != null && m.basketId)) {
514
489
  console.error("Failed to create basket");
515
490
  return;
516
491
  }
517
492
  console.log(
518
493
  "setting stored id",
519
- (h == null ? void 0 : h.basket_id) || (h == null ? void 0 : h.basketId)
520
- ), xt(
521
- (h == null ? void 0 : h.basket_id) || (h == null ? void 0 : h.basketId)
494
+ (m == null ? void 0 : m.basket_id) || (m == null ? void 0 : m.basketId)
495
+ ), et(
496
+ (m == null ? void 0 : m.basket_id) || (m == null ? void 0 : m.basketId)
522
497
  ), console.log("adding product to basket");
523
- const K = await Vt(
524
- (h == null ? void 0 : h.basket_id) || (h == null ? void 0 : h.basketId),
525
- p,
526
- $
498
+ const J = await Vt(
499
+ (m == null ? void 0 : m.basket_id) || (m == null ? void 0 : m.basketId),
500
+ C,
501
+ z
527
502
  );
528
- console.log("object added to basket"), (((ct = K == null ? void 0 : K.product_items) == null ? void 0 : ct.length) > 0 || (($t = K == null ? void 0 : K.productItems) == null ? void 0 : $t.length) > 0) && U.success("Added to cart", {
503
+ console.log("object added to basket"), (((St = J == null ? void 0 : J.product_items) == null ? void 0 : St.length) > 0 || ((lt = J == null ? void 0 : J.productItems) == null ? void 0 : lt.length) > 0) && M.success("Added to cart", {
529
504
  position: "bottom-right",
530
505
  autoClose: 3e3,
531
506
  hideProgressBar: !1,
532
507
  closeOnClick: !0,
533
508
  pauseOnHover: !0,
534
509
  draggable: !0
535
- }), Ht(h.basket_id || (h == null ? void 0 : h.basketId));
510
+ }), Ht(m.basket_id || (m == null ? void 0 : m.basketId));
536
511
  }
537
- } catch (p) {
538
- console.error("Error adding to cart:", p), U.error("Failed to add product to cart", {
512
+ } catch (C) {
513
+ console.error("Error adding to cart:", C), M.error("Failed to add product to cart", {
539
514
  position: "bottom-right",
540
515
  autoClose: 3e3
541
- }), ((zt = p == null ? void 0 : p.response) == null ? void 0 : zt.status) === 404 || // Basket not found
542
- ((Ct = p == null ? void 0 : p.response) == null ? void 0 : Ct.status) === 401 ? (((O = p == null ? void 0 : p.response) == null ? void 0 : O.status) === 404 && xt(null), ((dt = p == null ? void 0 : p.response) == null ? void 0 : dt.status) === 401 && (xt(null), Yt(null))) : (console.error("Failed to add product to basket:", p.message), U.error("Failed to add product to cart", {
516
+ }), ((Pt = C == null ? void 0 : C.response) == null ? void 0 : Pt.status) === 404 || // Basket not found
517
+ (($t = C == null ? void 0 : C.response) == null ? void 0 : $t.status) === 401 ? (((Ct = C == null ? void 0 : C.response) == null ? void 0 : Ct.status) === 404 && et(null), ((O = C == null ? void 0 : C.response) == null ? void 0 : O.status) === 401 && (et(null), Rt(null))) : (console.error("Failed to add product to basket:", C.message), M.error("Failed to add product to cart", {
543
518
  position: "bottom-right",
544
519
  autoClose: 3e3
545
520
  }));
546
521
  }
547
- }, l = () => {
522
+ }, c = () => {
548
523
  e && (window.location.href = e.c_pdpUrl);
549
524
  };
550
525
  return console.log(e, "the prod"), /* @__PURE__ */ u(re, { children: [
@@ -553,7 +528,7 @@ const xt = (t) => {
553
528
  {
554
529
  className: "fixed inset-0 z-40 bg-black/30",
555
530
  onClick: () => {
556
- n(!1), setTimeout(() => t(oe(null)), Ce);
531
+ n(!1), setTimeout(() => t(oe(null)), Se);
557
532
  }
558
533
  }
559
534
  ),
@@ -566,19 +541,19 @@ const xt = (t) => {
566
541
  ${o ? "translate-y-0 md:translate-y-0 md:translate-x-0 opacity-100" : "translate-y-full md:translate-y-0 md:translate-x-full opacity-0 pointer-events-none"}
567
542
  `,
568
543
  style: { willChange: "transform, opacity" },
569
- onClick: (_) => _.stopPropagation(),
544
+ onClick: (F) => F.stopPropagation(),
570
545
  children: [
571
546
  /* @__PURE__ */ u("div", { className: "mt-3 flex flex-row justify-between w-full ", children: [
572
547
  /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("p", { className: "text-[#000000] font-bold font-nunitoSans", children: e.name }) }),
573
548
  /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
574
- ge,
549
+ we,
575
550
  {
576
551
  icon: "mdi:close",
577
552
  className: "text-[#555555] w-6 h-6 cursor-pointer",
578
553
  onClick: () => {
579
554
  n(!1), setTimeout(
580
555
  () => t(oe(null)),
581
- Ce
556
+ Se
582
557
  );
583
558
  }
584
559
  }
@@ -588,20 +563,20 @@ const xt = (t) => {
588
563
  /* @__PURE__ */ a("div", { className: "flex flex-row items-center justify-center w-[120px] h-[120px] my-5", children: /* @__PURE__ */ a(
589
564
  "img",
590
565
  {
591
- src: (w = (g = (i = (d = e.imageGroups) == null ? void 0 : d[0]) == null ? void 0 : i.images) == null ? void 0 : g[0]) == null ? void 0 : w.link,
566
+ src: (h = (x = (i = (d = e.imageGroups) == null ? void 0 : d[0]) == null ? void 0 : i.images) == null ? void 0 : x[0]) == null ? void 0 : h.link,
592
567
  alt: e.name,
593
568
  className: "rounded-[10px]"
594
569
  }
595
570
  ) }),
596
571
  /* @__PURE__ */ a("div", { className: "flex flex-col items-center gap-2", children: e.imageGroups.slice(1, 2).map(
597
- (_) => _.images.slice(1, 2).map((j) => /* @__PURE__ */ a(
572
+ (F) => F.images.slice(1, 2).map((D) => /* @__PURE__ */ a(
598
573
  "img",
599
574
  {
600
- src: j.link,
575
+ src: D.link,
601
576
  alt: e.name,
602
577
  className: "rounded-[10px] w-[60px] h-[60px]"
603
578
  },
604
- j.link
579
+ D.link
605
580
  ))
606
581
  ) })
607
582
  ] }),
@@ -644,23 +619,23 @@ const xt = (t) => {
644
619
  ] }),
645
620
  /* @__PURE__ */ a("div", { className: "text-[#323135] font-semibold text-sm", children: "Overall Rating" }),
646
621
  /* @__PURE__ */ u("div", { className: "text-[#68656E] font-semibold text-sm", children: [
647
- ((C = e == null ? void 0 : e.rating) == null ? void 0 : C.count) || 0,
622
+ ((_ = e == null ? void 0 : e.rating) == null ? void 0 : _.count) || 0,
648
623
  " ratings"
649
624
  ] })
650
625
  ] }) }),
651
- /* @__PURE__ */ a("div", { className: "mt-2 flex flex-row items-center gap-2", children: Array.from({ length: 5 }).map((_, j) => {
652
- var M;
626
+ /* @__PURE__ */ a("div", { className: "mt-2 flex flex-row items-center gap-2", children: Array.from({ length: 5 }).map((F, D) => {
627
+ var K;
653
628
  return /* @__PURE__ */ a(
654
- ge,
629
+ we,
655
630
  {
656
631
  icon: "mdi:star",
657
632
  width: "20",
658
633
  height: "20",
659
634
  className: `text-yellow-500
660
- ${((M = e == null ? void 0 : e.rating) == null ? void 0 : M.rate) > j ? "text-yellow-500" : "text-gray-300"}
635
+ ${((K = e == null ? void 0 : e.rating) == null ? void 0 : K.rate) > D ? "text-yellow-500" : "text-gray-300"}
661
636
  `
662
637
  },
663
- j
638
+ D
664
639
  );
665
640
  }) })
666
641
  ] }),
@@ -675,7 +650,7 @@ const xt = (t) => {
675
650
  {
676
651
  className: "rounded-[5px] shadow-sm text-[#FBFBFC] bg-[#6851C6] p-2 w-full text-center cursor-pointer",
677
652
  style: { backgroundColor: r.tanyaThemeColor },
678
- onClick: s,
653
+ onClick: l,
679
654
  children: "Add to Cart"
680
655
  }
681
656
  ),
@@ -684,7 +659,7 @@ const xt = (t) => {
684
659
  {
685
660
  className: "rounded-[5px] shadow-sm text-[#FBFBFC] bg-[#6851C6] p-2 w-full text-center cursor-pointer mb-16",
686
661
  style: { backgroundColor: r.tanyaThemeColor },
687
- onClick: l,
662
+ onClick: c,
688
663
  children: "View more"
689
664
  }
690
665
  )
@@ -695,162 +670,165 @@ const xt = (t) => {
695
670
  }
696
671
  )
697
672
  ] });
698
- }, Er = ({
699
- tanyaConfig: t
673
+ }, Nr = ({
674
+ tanyaConfig: t,
675
+ basketId: e
700
676
  }) => {
701
- const e = [
677
+ const r = [
702
678
  "Myself",
703
679
  "My Child",
704
680
  "My Grandchild",
705
681
  "Niece/Nephew",
706
682
  "My Friends",
707
683
  "Others"
708
- ], r = {
684
+ ], o = {
709
685
  Myself: "himself/herself",
710
686
  "My Child": "his/her child",
711
687
  "My Grandchild": "his/her grandchild",
712
688
  "Niece/Nephew": "his/her niece/nephew",
713
689
  "My Friends": "his/her friends",
714
690
  Others: "others"
715
- }, o = It(null), n = It(null), s = It(null), l = It(null), [d, i] = P(null), [g, w] = P(!1), [S, C] = P(!1), [_, j] = P(!1), [M, H] = P(!1), [lt, vt] = P(!1), [Pt, ot] = P(!1), [kt, St] = P(""), [ct, $t] = P(""), zt = (c) => ({
716
- id: c.id,
717
- title: c.name,
718
- image: c.image ?? "",
719
- price: c.price ?? 0
720
- }), [Ct, O] = P([]), dt = It(null), p = Mt((c) => c.store.store), _t = Mt((c) => c.product.product), nt = () => {
721
- j(!0), setTimeout(() => C(!0), 10);
722
- }, Jt = () => {
723
- C(!1), setTimeout(() => j(!1), 300);
691
+ }, n = _t(null), l = _t(null), c = _t(null), d = _t(null), [i, x] = $(null), [h, S] = $(!1), [_, F] = $(!1), [D, K] = $(!1), [it, H] = $(!1), [st, vt] = $(!1), [Ot, Q] = $(!1), [kt, St] = $(""), [lt, Pt] = $(""), $t = (s) => ({
692
+ id: s.id,
693
+ title: s.name,
694
+ image: s.image ?? "",
695
+ price: s.price ?? 0
696
+ }), [Ct, O] = $([]), C = _t(null), k = Mt((s) => s.store.store), ct = Mt((s) => s.product.product), Jt = () => {
697
+ K(!0), setTimeout(() => F(!0), 10);
698
+ }, zt = () => {
699
+ F(!1), setTimeout(() => K(!1), 300);
724
700
  };
725
- bt(() => {
726
- g ? nt() : Jt();
727
- }, [g]);
728
- const jt = (c) => {
729
- $t(r[c]);
701
+ tt(() => {
702
+ h ? Jt() : zt();
703
+ }, [h]);
704
+ const jt = (s) => {
705
+ Pt(o[s]);
730
706
  };
731
- bt(() => {
732
- dt.current && (dt.current.scrollTop += 150);
707
+ tt(() => {
708
+ C.current && (C.current.scrollTop += 150);
733
709
  }, [Ct]);
734
- let Y = null, $ = null;
735
- const At = async () => {
736
- if (Y && $ && Date.now() < $)
737
- return Y;
710
+ let z = null, dt = null;
711
+ const Dt = async () => {
712
+ if (z && dt && Date.now() < dt)
713
+ return z;
738
714
  try {
739
- const c = "https://us-east-1lsr29ln3u.auth.us-east-1.amazoncognito.com/oauth2/token", k = new URLSearchParams({
715
+ const s = "https://us-east-1lsr29ln3u.auth.us-east-1.amazoncognito.com/oauth2/token", v = new URLSearchParams({
740
716
  grant_type: "client_credentials",
741
717
  client_id: "4i8rd70sgt961tc4dhskgf08c",
742
718
  client_secret: "bnsfq1220loh2cn2cm2ttn8fdhdpt0u8m1fgj8vfk2rn61aurjg",
743
719
  scope: "default-m2m-resource-server-8xzfzo/read"
744
- }), b = await fetch(c, {
720
+ }), w = await fetch(s, {
745
721
  method: "POST",
746
722
  headers: {
747
723
  "Content-Type": "application/x-www-form-urlencoded"
748
724
  },
749
- body: k
725
+ body: v
750
726
  });
751
- if (!b.ok)
727
+ if (!w.ok)
752
728
  throw new Error(
753
- `Token request failed! status: ${b.status}`
729
+ `Token request failed! status: ${w.status}`
754
730
  );
755
- const y = await b.json();
756
- Y = y.access_token;
757
- const f = y.expires_in || 3600;
758
- return $ = Date.now() + (f - 60) * 1e3, Y;
759
- } catch (c) {
760
- return console.error("Error obtaining JWT token:", c), Y = null, $ = null, null;
731
+ const b = await w.json();
732
+ z = b.access_token;
733
+ const p = b.expires_in || 3600;
734
+ return dt = Date.now() + (p - 60) * 1e3, z;
735
+ } catch (s) {
736
+ return console.error("Error obtaining JWT token:", s), z = null, dt = null, null;
761
737
  }
762
- }, Wt = async () => {
763
- const c = await Ot();
764
- c != null && i(c);
738
+ }, m = async () => {
739
+ const s = await Tt();
740
+ s != null && x(s);
765
741
  };
766
- bt(() => {
742
+ tt(() => {
767
743
  if (t != null && t.siteId) {
768
- const { clientID: c, host: k, organizationID: b, shortCode: y, siteId: f } = t;
769
- sessionStorage.setItem("Host", k), sessionStorage.setItem("SiteId", f), sessionStorage.setItem("pubCfg", btoa(c)), sessionStorage.setItem("envRef", y), sessionStorage.setItem("orgRef", b);
744
+ const { clientID: s, host: v, organizationID: w, shortCode: b, siteId: p } = t;
745
+ sessionStorage.setItem("Host", v), sessionStorage.setItem("SiteId", p), sessionStorage.setItem("pubCfg", btoa(s)), sessionStorage.setItem("envRef", b), sessionStorage.setItem("orgRef", w);
770
746
  }
771
- Wt(), console.log("scapi environment v1");
772
- }, []);
773
- const h = async () => {
774
- const c = JSON.parse(
747
+ m(), console.log("scapi environment v1");
748
+ }, []), tt(() => {
749
+ e && (console.log("setting the basket id", e), et(e));
750
+ }, [e]);
751
+ const J = async () => {
752
+ const s = JSON.parse(
775
753
  sessionStorage.getItem("customerData") || "{}"
776
754
  ).customerId;
777
- return (await vr(c || "")).c_interests;
778
- }, K = async (c, k) => {
755
+ return (await yr(s || "")).c_interests;
756
+ }, A = async (s, v) => {
779
757
  console.log("in secondary flow", Ft);
780
- const b = await h();
781
- if (console.log(b, "interests of customer", Ft), !!b)
758
+ const w = await J();
759
+ if (console.log(w, "interests of customer", Ft), !!w)
782
760
  try {
783
761
  O(
784
- (L) => L.map(
785
- (V, R) => R === L.length - 1 ? { ...V, secondaryLoading: !0 } : V
762
+ (U) => U.map(
763
+ (V, Y) => Y === U.length - 1 ? { ...V, secondaryLoading: !0 } : V
786
764
  )
787
765
  );
788
- const y = await At();
789
- if (!y) throw new Error("Failed to fetch token");
790
- const f = localStorage.getItem("customerNumber"), x = localStorage.getItem("isLoggedIn"), ut = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
791
- registered: String(x || !1),
792
- userId: String(f || (/* @__PURE__ */ new Date()).getTime())
766
+ const b = await Dt();
767
+ if (!b) throw new Error("Failed to fetch token");
768
+ const p = localStorage.getItem("customerNumber"), g = localStorage.getItem("isLoggedIn"), ut = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
769
+ registered: String(g || !1),
770
+ userId: String(p || (/* @__PURE__ */ new Date()).getTime())
793
771
  }).toString()}`, pt = JSON.stringify({
794
772
  flowId: "Q166PR519W",
795
773
  flowAliasId: "HKFUVLWVH2",
796
774
  input: {
797
775
  loyaltyPoints: "",
798
- productName: c,
799
- productPoints: String(k || 0),
800
- interests: b
776
+ productName: s,
777
+ productPoints: String(v || 0),
778
+ interests: w
801
779
  }
802
- }), A = await fetch(ut, {
780
+ }), L = await fetch(ut, {
803
781
  signal: AbortSignal.timeout(3e4),
804
782
  method: "POST",
805
783
  headers: {
806
784
  "Content-Type": "application/json",
807
- Authorization: `Bearer ${y}`
785
+ Authorization: `Bearer ${b}`
808
786
  },
809
787
  body: pt
810
788
  });
811
- if (!A.body) throw new Error("Readable stream not supported");
812
- const ft = A.body.getReader(), mt = new TextDecoder();
813
- let D = "";
789
+ if (!L.body) throw new Error("Readable stream not supported");
790
+ const ft = L.body.getReader(), mt = new TextDecoder();
791
+ let B = "";
814
792
  for (; ; ) {
815
- const { done: L, value: V } = await ft.read();
816
- if (L) break;
817
- D += mt.decode(V, { stream: !0 });
818
- const R = D.split(`
793
+ const { done: U, value: V } = await ft.read();
794
+ if (U) break;
795
+ B += mt.decode(V, { stream: !0 });
796
+ const Y = B.split(`
819
797
  `);
820
- D = R.pop() || "";
821
- for (const G of R)
822
- if (G.startsWith("data:")) {
823
- const m = G.slice(5).trim();
798
+ B = Y.pop() || "";
799
+ for (const W of Y)
800
+ if (W.startsWith("data:")) {
801
+ const f = W.slice(5).trim();
824
802
  try {
825
- const B = JSON.parse(m);
826
- B.index === 0 && O(
803
+ const q = JSON.parse(f);
804
+ q.index === 0 && O(
827
805
  (I) => I.map(
828
- (T, X) => X === I.length - 1 ? {
829
- ...T,
830
- secondaryResponse: B.data,
806
+ (P, G) => G === I.length - 1 ? {
807
+ ...P,
808
+ secondaryResponse: q.data,
831
809
  secondaryLoading: !1
832
- } : T
810
+ } : P
833
811
  )
834
812
  );
835
- } catch (B) {
813
+ } catch (q) {
836
814
  O(
837
815
  (I) => I.map(
838
- (T, X) => X === I.length - 1 ? { ...T, secondaryLoading: !1 } : T
816
+ (P, G) => G === I.length - 1 ? { ...P, secondaryLoading: !1 } : P
839
817
  )
840
- ), console.error("Secondary flow JSON parse error:", B);
818
+ ), console.error("Secondary flow JSON parse error:", q);
841
819
  }
842
820
  }
843
821
  }
844
- } catch (y) {
845
- console.error("Secondary flow error:", y);
822
+ } catch (b) {
823
+ console.error("Secondary flow error:", b);
846
824
  }
847
- }, J = async (c) => {
848
- const k = c || kt.trim();
849
- if (k) {
850
- vt(!0), St(""), o.current = null, n.current = null, s.current = null, l.current = null, O((b) => [
851
- ...b,
825
+ }, Wt = async (s) => {
826
+ const v = s || kt.trim();
827
+ if (v) {
828
+ vt(!0), St(""), n.current = null, l.current = null, c.current = null, d.current = null, O((w) => [
829
+ ...w,
852
830
  {
853
- query: k,
831
+ query: v,
854
832
  response: "Thinking for what suits you best...",
855
833
  potentialQuestions: "",
856
834
  products: [],
@@ -858,52 +836,52 @@ const xt = (t) => {
858
836
  }
859
837
  ]);
860
838
  try {
861
- const b = ct, y = localStorage.getItem("customerNumber"), f = localStorage.getItem("isLoggedIn"), x = await At();
862
- if (!x)
839
+ const w = lt, b = localStorage.getItem("customerNumber"), p = localStorage.getItem("isLoggedIn"), g = await Dt();
840
+ if (!g)
863
841
  throw new Error("Failed to obtain access token");
864
842
  const ut = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
865
- registered: String(f || !1),
866
- userId: String(y || (/* @__PURE__ */ new Date()).getTime())
843
+ registered: String(p || !1),
844
+ userId: String(b || (/* @__PURE__ */ new Date()).getTime())
867
845
  }).toString()}`, pt = JSON.stringify({
868
846
  flowId: "MMHQKYI1NE",
869
847
  flowAliasId: "SZF9ZK1ATE",
870
848
  input: {
871
- userPrompt: k,
872
- whom: b
849
+ userPrompt: v,
850
+ whom: w
873
851
  }
874
- }), A = await fetch(ut, {
852
+ }), L = await fetch(ut, {
875
853
  signal: AbortSignal.timeout(3e4),
876
854
  method: "POST",
877
855
  headers: {
878
856
  "Content-Type": "application/json",
879
- Authorization: `Bearer ${x}`
857
+ Authorization: `Bearer ${g}`
880
858
  },
881
859
  body: pt
882
860
  });
883
- if (!A.ok)
884
- throw new Error(`HTTP error! status: ${A.status}`);
885
- if (!A.body) throw new Error("Readable stream not supported");
886
- const ft = A.body.getReader(), mt = new TextDecoder();
887
- let D = "", L = "";
861
+ if (!L.ok)
862
+ throw new Error(`HTTP error! status: ${L.status}`);
863
+ if (!L.body) throw new Error("Readable stream not supported");
864
+ const ft = L.body.getReader(), mt = new TextDecoder();
865
+ let B = "", U = "";
888
866
  for (; ; ) {
889
- ot(!0);
890
- const { done: V, value: R } = await ft.read();
867
+ Q(!0);
868
+ const { done: V, value: Y } = await ft.read();
891
869
  if (V) break;
892
- D += mt.decode(R, { stream: !0 });
893
- const G = D.split(`
870
+ B += mt.decode(Y, { stream: !0 });
871
+ const W = B.split(`
894
872
  `);
895
- D = G.pop() || "";
896
- for (const m of G)
897
- if (m.startsWith("data:")) {
898
- const B = m.slice(5).trim();
873
+ B = W.pop() || "";
874
+ for (const f of W)
875
+ if (f.startsWith("data:")) {
876
+ const q = f.slice(5).trim();
899
877
  try {
900
- const I = JSON.parse(B);
901
- I.index == 1 && (L = I.data), O(
902
- (T) => T.map(
903
- (X, Dt) => Dt === T.length - 1 ? {
904
- ...X,
878
+ const I = JSON.parse(q);
879
+ I.index == 1 && (U = I.data), O(
880
+ (P) => P.map(
881
+ (G, At) => At === P.length - 1 ? {
882
+ ...G,
905
883
  [I.index == 0 ? "response" : I.index == 1 ? "keywords" : I.index == 2 ? "potentialQuestions" : "end"]: I.data
906
- } : X
884
+ } : G
907
885
  )
908
886
  );
909
887
  } catch (I) {
@@ -911,183 +889,177 @@ const xt = (t) => {
911
889
  }
912
890
  }
913
891
  }
914
- er(W(L));
915
- } catch (b) {
916
- console.error("Error sending message to Tanya:", b);
892
+ tr(Ze(U));
893
+ } catch (w) {
894
+ console.error("Error sending message to Tanya:", w);
917
895
  } finally {
918
896
  vt(!1);
919
897
  }
920
898
  }
921
- }, W = (c) => {
922
- const k = c.match(
899
+ }, Ze = (s) => {
900
+ const v = s.match(
923
901
  /top five relevant product or category names are: (.*)/i
924
- ), f = (k ? k[1] : c).split(", ").map((z) => z.replace(/\s*(Toys|Bags|Miniature|etc\.*)\s*/gi, "").trim());
925
- return [...new Set(f)].filter(Boolean).join(",");
926
- }, er = async (c) => {
927
- if (typeof c == "string") {
928
- console.log(c, "keywords");
929
- const k = c.split(",");
930
- for (const b of k) {
931
- const y = await be(b);
932
- if (ot(!1), (y == null ? void 0 : y.length) > 0 && (O(
933
- (f) => f.map(
934
- (x, z) => z === f.length - 1 ? {
935
- ...x,
902
+ ), p = (v ? v[1] : s).split(", ").map((j) => j.replace(/\s*(Toys|Bags|Miniature|etc\.*)\s*/gi, "").trim());
903
+ return [...new Set(p)].filter(Boolean).join(",");
904
+ }, tr = async (s) => {
905
+ if (typeof s == "string") {
906
+ console.log(s, "keywords");
907
+ const v = s.split(",");
908
+ for (const w of v) {
909
+ const b = await ge(w);
910
+ if (Q(!1), (b == null ? void 0 : b.length) > 0 && (O(
911
+ (p) => p.map(
912
+ (g, j) => j === p.length - 1 ? {
913
+ ...g,
936
914
  products: [
937
- ...x.products || [],
938
- { keyword: b, items: y, loading: !1 }
915
+ ...g.products || [],
916
+ { keyword: w, items: b, loading: !1 }
939
917
  ]
940
- } : x
918
+ } : g
941
919
  )
942
- ), !o.current || n.current == null)) {
943
- const f = y[0];
944
- o.current = String((f == null ? void 0 : f.product_name) ?? ""), s.current = f.image.link, n.current = f.product_id;
945
- const x = typeof (f == null ? void 0 : f.price) == "number" ? f.price : void 0;
946
- l.current = typeof x == "number" && Number.isFinite(x) ? x : null;
920
+ ), !n.current || l.current == null)) {
921
+ const p = b[0];
922
+ n.current = String((p == null ? void 0 : p.product_name) ?? ""), c.current = p.image.link, l.current = p.product_id;
923
+ const g = typeof (p == null ? void 0 : p.price) == "number" ? p.price : void 0;
924
+ d.current = typeof g == "number" && Number.isFinite(g) ? g : null;
947
925
  }
948
926
  }
949
927
  } else
950
- for (const k of c) {
951
- const b = await be(k);
952
- ot(!1), (b == null ? void 0 : b.length) > 0 && O(
953
- (y) => y.map(
954
- (f, x) => x === y.length - 1 ? {
955
- ...f,
928
+ for (const v of s) {
929
+ const w = await ge(v);
930
+ Q(!1), (w == null ? void 0 : w.length) > 0 && O(
931
+ (b) => b.map(
932
+ (p, g) => g === b.length - 1 ? {
933
+ ...p,
956
934
  products: [
957
- ...f.products || [],
958
- { keyword: k, items: b, loading: !1 }
935
+ ...p.products || [],
936
+ { keyword: v, items: w, loading: !1 }
959
937
  ]
960
- } : f
938
+ } : p
961
939
  )
962
940
  );
963
941
  }
964
- if (o.current) {
942
+ if (n.current) {
965
943
  O(
966
- (b) => b.map(
967
- (y, f) => f === b.length - 1 ? {
968
- ...y,
944
+ (w) => w.map(
945
+ (b, p) => p === w.length - 1 ? {
946
+ ...b,
969
947
  productSnapshot: {
970
- id: n.current,
971
- name: o.current,
972
- image: s.current,
973
- price: l.current ?? null,
948
+ id: l.current,
949
+ name: n.current,
950
+ image: c.current,
951
+ price: d.current ?? null,
974
952
  points: 0,
975
953
  quantity: 1
976
954
  }
977
- } : y
955
+ } : b
978
956
  )
979
957
  );
980
- const k = JSON.parse(
958
+ const v = JSON.parse(
981
959
  sessionStorage.getItem("customerData") || "{}"
982
960
  );
983
- (k == null ? void 0 : k.isGuest) == !1 ? (console.log("running secondary flow", Ft), K(o.current, 0)) : console.log("not running secondary flow", Ft);
961
+ (v == null ? void 0 : v.isGuest) == !1 ? (console.log("running secondary flow", Ft), A(n.current, 0)) : console.log("not running secondary flow", Ft);
984
962
  }
985
- ot(!1);
986
- }, rr = async (c, k) => {
987
- var b, y, f, x, z, ut, pt, A, ft, mt, D, L, V, R, G;
963
+ Q(!1);
964
+ }, er = async (s, v) => {
965
+ var w, b, p, g, j, ut, pt, L, ft, mt, B, U, V, Y, W;
988
966
  H(!0);
989
967
  try {
990
- const m = await He(c.id);
991
- if (!((y = (b = m == null ? void 0 : m.variants) == null ? void 0 : b[0]) != null && y.product_id || (x = (f = m == null ? void 0 : m.variants) == null ? void 0 : f[0]) != null && x.productId) && !(m.type.item || m.type.bundle)) {
992
- H(!1), U.error("Variants not found", {
968
+ const f = await Me(s.id);
969
+ if (!((b = (w = f == null ? void 0 : f.variants) == null ? void 0 : w[0]) != null && b.product_id || (g = (p = f == null ? void 0 : f.variants) == null ? void 0 : p[0]) != null && g.productId) && !(f.type.item || f.type.bundle)) {
970
+ H(!1), M.error("Variants not found", {
993
971
  position: "bottom-right",
994
972
  autoClose: 1e3
995
973
  }), console.error("No product variant found");
996
974
  return;
997
975
  }
998
- const B = [
976
+ const q = [
999
977
  {
1000
- product_id: ((z = m.variants) == null ? void 0 : z[0].product_id) || ((ut = m.variants) == null ? void 0 : ut[0].productId) || (m == null ? void 0 : m.id),
1001
- quantity: k
978
+ product_id: ((j = f.variants) == null ? void 0 : j[0].product_id) || ((ut = f.variants) == null ? void 0 : ut[0].productId) || (f == null ? void 0 : f.id),
979
+ quantity: v
1002
980
  }
1003
981
  ];
1004
- console.log(B, "product data", "app version", Ft);
982
+ console.log(q, "product data", "app version", Ft);
1005
983
  const I = JSON.parse(
1006
984
  sessionStorage.getItem("customerData") || "{}"
1007
- ), T = (I == null ? void 0 : I.basketId) || localStorage.getItem(Rt), X = !1, Dt = localStorage.getItem(Tt), he = Date.now();
1008
- if (!X || !Dt || he >= parseInt(Dt)) {
1009
- const or = await qe();
1010
- let { customer_token: at } = await Me(
1011
- or
985
+ ), P = (I == null ? void 0 : I.basketId) || localStorage.getItem(Yt), G = !1, At = localStorage.getItem(Et), he = Date.now();
986
+ if (!G || !At || he >= parseInt(At)) {
987
+ const rr = await Ue();
988
+ let { customer_token: ht } = await qe(
989
+ rr
1012
990
  );
1013
- if (at = "Bearer " + d.access_token, !at) {
991
+ if (ht = "Bearer " + i.access_token, !ht) {
1014
992
  console.error("Failed to get customer_token");
1015
993
  return;
1016
994
  }
1017
- const nr = he + 300 * 1e3;
1018
- if (Yt(at), localStorage.setItem(Tt, nr.toString()), console.log(T, "basketIdFromCustomer"), T) {
1019
- const we = await Re({
1020
- basketId: T,
1021
- customer_token: at
1022
- });
1023
- if (we.status === 200 && we) {
1024
- const Gt = await Vt(
1025
- T,
1026
- B,
1027
- at
1028
- );
1029
- ((pt = Gt == null ? void 0 : Gt.product_items) == null ? void 0 : pt.length) > 0 && (U.success("Added to cart", {
1030
- position: "bottom-right",
1031
- autoClose: 3e3,
1032
- hideProgressBar: !1,
1033
- closeOnClick: !0,
1034
- pauseOnHover: !0,
1035
- draggable: !0
1036
- }), Ht(T), H(!1));
1037
- return;
1038
- }
995
+ const or = he + 300 * 1e3;
996
+ if (Rt(ht), localStorage.setItem(Et, or.toString()), console.log(P, "basketIdFromCustomer"), P) {
997
+ const Gt = await Vt(
998
+ P,
999
+ q,
1000
+ ht
1001
+ );
1002
+ ((pt = Gt == null ? void 0 : Gt.product_items) == null ? void 0 : pt.length) > 0 && (M.success("Added to cart", {
1003
+ position: "bottom-right",
1004
+ autoClose: 3e3,
1005
+ hideProgressBar: !1,
1006
+ closeOnClick: !0,
1007
+ pauseOnHover: !0,
1008
+ draggable: !0
1009
+ }), Ht(P), H(!1));
1010
+ return;
1039
1011
  }
1040
- const ar = {
1012
+ const nr = {
1041
1013
  productItems: [
1042
1014
  {
1043
- productId: ((A = m.variants) == null ? void 0 : A[0].product_id) || ((ft = m.variants) == null ? void 0 : ft[0].productId) || (m == null ? void 0 : m.id),
1015
+ productId: ((L = f.variants) == null ? void 0 : L[0].product_id) || ((ft = f.variants) == null ? void 0 : ft[0].productId) || (f == null ? void 0 : f.id),
1044
1016
  quantity: 1
1045
1017
  }
1046
1018
  ]
1047
- }, v = await Ve(at, ar);
1019
+ }, y = await He(ht, nr);
1048
1020
  if (console.log(
1049
- v,
1050
- v == null ? void 0 : v.basket_id,
1051
- v == null ? void 0 : v.basketId,
1021
+ y,
1022
+ y == null ? void 0 : y.basket_id,
1023
+ y == null ? void 0 : y.basketId,
1052
1024
  "the basket response"
1053
- ), !(v != null && v.basket_id || !(v != null && v.basketId))) {
1025
+ ), !(y != null && y.basket_id || !(y != null && y.basketId))) {
1054
1026
  H(!1), console.error("Failed to create basket");
1055
1027
  return;
1056
1028
  }
1057
- xt(
1058
- (v == null ? void 0 : v.basket_id) || (v == null ? void 0 : v.basketId)
1029
+ et(
1030
+ (y == null ? void 0 : y.basket_id) || (y == null ? void 0 : y.basketId)
1059
1031
  );
1060
- const ht = await Vt(
1061
- (v == null ? void 0 : v.basket_id) || (v == null ? void 0 : v.basketId),
1062
- B,
1063
- at
1032
+ const wt = await Vt(
1033
+ (y == null ? void 0 : y.basket_id) || (y == null ? void 0 : y.basketId),
1034
+ q,
1035
+ ht
1064
1036
  );
1065
- (((mt = ht == null ? void 0 : ht.product_items) == null ? void 0 : mt.length) > 0 || ((D = ht == null ? void 0 : ht.productItems) == null ? void 0 : D.length) > 0) && U.success("Added to cart", {
1037
+ (((mt = wt == null ? void 0 : wt.product_items) == null ? void 0 : mt.length) > 0 || ((B = wt == null ? void 0 : wt.productItems) == null ? void 0 : B.length) > 0) && M.success("Added to cart", {
1066
1038
  position: "bottom-right",
1067
1039
  autoClose: 3e3,
1068
1040
  hideProgressBar: !1,
1069
1041
  closeOnClick: !0,
1070
1042
  pauseOnHover: !0,
1071
1043
  draggable: !0
1072
- }), Ht(v.basket_id || (v == null ? void 0 : v.basketId));
1044
+ }), Ht(y.basket_id || (y == null ? void 0 : y.basketId));
1073
1045
  }
1074
- } catch (m) {
1075
- H(!1), console.error("Error adding to cart:", m), U.error("Failed to add product to cart", {
1046
+ } catch (f) {
1047
+ H(!1), console.error("Error adding to cart:", f), M.error("Failed to add product to cart", {
1076
1048
  position: "bottom-right",
1077
1049
  autoClose: 3e3
1078
- }), ((L = m == null ? void 0 : m.response) == null ? void 0 : L.status) === 404 || // Basket not found
1079
- ((V = m == null ? void 0 : m.response) == null ? void 0 : V.status) === 401 ? (((R = m == null ? void 0 : m.response) == null ? void 0 : R.status) === 404 && xt(null), ((G = m == null ? void 0 : m.response) == null ? void 0 : G.status) === 401 && (xt(null), Yt(null))) : (console.error("Failed to add product to basket:", m.message), U.error("Failed to add product to cart", {
1050
+ }), ((U = f == null ? void 0 : f.response) == null ? void 0 : U.status) === 404 || // Basket not found
1051
+ ((V = f == null ? void 0 : f.response) == null ? void 0 : V.status) === 401 ? (((Y = f == null ? void 0 : f.response) == null ? void 0 : Y.status) === 404 && et(null), ((W = f == null ? void 0 : f.response) == null ? void 0 : W.status) === 401 && (et(null), Rt(null))) : (console.error("Failed to add product to basket:", f.message), M.error("Failed to add product to cart", {
1080
1052
  position: "bottom-right",
1081
1053
  autoClose: 3e3
1082
1054
  }));
1083
1055
  }
1084
1056
  H(!1);
1085
1057
  };
1086
- return /* @__PURE__ */ a("div", { className: "relative flex justify-center", children: /* @__PURE__ */ u(xr, { open: g, onOpenChange: w, children: [
1058
+ return /* @__PURE__ */ a("div", { className: "relative flex justify-center", children: /* @__PURE__ */ u(xr, { open: h, onOpenChange: S, children: [
1087
1059
  /* @__PURE__ */ a(
1088
- yr,
1060
+ br,
1089
1061
  {
1090
- onClick: () => w(!0),
1062
+ onClick: () => S(!0),
1091
1063
  style: {
1092
1064
  // background: storeDetails.tanyaThemeColor,
1093
1065
  },
@@ -1147,12 +1119,12 @@ const xt = (t) => {
1147
1119
  ) })
1148
1120
  }
1149
1121
  ),
1150
- _ && /* @__PURE__ */ u(re, { children: [
1122
+ D && /* @__PURE__ */ u(re, { children: [
1151
1123
  /* @__PURE__ */ a(
1152
1124
  "div",
1153
1125
  {
1154
1126
  className: "fixed inset-0 z-40 bg-black/30",
1155
- onClick: () => w(!1)
1127
+ onClick: () => S(!1)
1156
1128
  }
1157
1129
  ),
1158
1130
  /* @__PURE__ */ u(
@@ -1163,9 +1135,9 @@ const xt = (t) => {
1163
1135
  top-0 right-0
1164
1136
  transition-transform duration-300 ease-in-out
1165
1137
  lg:transform
1166
- ${S ? "lg:translate-x-0" : "lg:translate-x-full"}
1138
+ ${_ ? "lg:translate-x-0" : "lg:translate-x-full"}
1167
1139
  // For mobile: animate from bottom
1168
- ${S ? "translate-y-0" : "translate-y-full"}
1140
+ ${_ ? "translate-y-0" : "translate-y-full"}
1169
1141
  lg:translate-y-0
1170
1142
  `,
1171
1143
  style: {
@@ -1182,7 +1154,7 @@ const xt = (t) => {
1182
1154
  {
1183
1155
  style: {
1184
1156
  display: "flex",
1185
- color: p.tanyaThemeContrastColor,
1157
+ color: k.tanyaThemeContrastColor,
1186
1158
  alignItems: "center",
1187
1159
  gap: "0.5rem"
1188
1160
  },
@@ -1243,7 +1215,7 @@ const xt = (t) => {
1243
1215
  gap: "1.25rem",
1244
1216
  margin: "0.75rem"
1245
1217
  },
1246
- children: /* @__PURE__ */ a("button", { onClick: () => w(!1), children: /* @__PURE__ */ u(
1218
+ children: /* @__PURE__ */ a("button", { onClick: () => S(!1), children: /* @__PURE__ */ u(
1247
1219
  "svg",
1248
1220
  {
1249
1221
  width: "24",
@@ -1295,46 +1267,46 @@ const xt = (t) => {
1295
1267
  /* @__PURE__ */ u(
1296
1268
  "div",
1297
1269
  {
1298
- className: `flex flex-col h-full ${_t ? "lg:w-2/3 w-full" : "w-full"}`,
1270
+ className: `flex flex-col h-full ${ct ? "lg:w-2/3 w-full" : "w-full"}`,
1299
1271
  children: [
1300
1272
  /* @__PURE__ */ u(
1301
1273
  "div",
1302
1274
  {
1303
- ref: dt,
1275
+ ref: C,
1304
1276
  className: "overflow-y-auto pr-5 pb-2 space-y-4 hide-scrollbar flex-grow mb-24",
1305
1277
  children: [
1306
- (p == null ? void 0 : p.whomRequired) && /* @__PURE__ */ u(
1278
+ (k == null ? void 0 : k.whomRequired) && /* @__PURE__ */ u(
1307
1279
  "div",
1308
1280
  {
1309
1281
  className: "mx-3 p-3 rounded-2xl bg-[#FFFFFF]",
1310
1282
  children: [
1311
1283
  /* @__PURE__ */ a("div", { className: "flex gap-2 bg-[#FFFFFF]", children: /* @__PURE__ */ a("p", { className: "font-bold font-nunitoSans text-[#494949]", children: "Is this for you or someone else?" }) }),
1312
- /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2 mt-2", children: e.map((c) => /* @__PURE__ */ a(
1284
+ /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2 mt-2", children: r.map((s) => /* @__PURE__ */ a(
1313
1285
  "button",
1314
1286
  {
1315
- onClick: () => jt(c),
1287
+ onClick: () => jt(s),
1316
1288
  className: "px-2 py-2 font-semibold text-xs text-[#18181B] bg-[#F3F3F3] rounded-2xl",
1317
1289
  style: {
1318
- backgroundColor: ct === r[c] ? "#FFFFFF" : "#F3F3F3",
1319
- borderColor: ct === r[c] ? "#BBB3DD" : ""
1290
+ backgroundColor: lt === o[s] ? "#FFFFFF" : "#F3F3F3",
1291
+ borderColor: lt === o[s] ? "#BBB3DD" : ""
1320
1292
  },
1321
- children: c
1293
+ children: s
1322
1294
  },
1323
- c
1295
+ s
1324
1296
  )) })
1325
1297
  ]
1326
1298
  }
1327
1299
  ),
1328
- Ct.map((c, k) => {
1329
- var b, y;
1300
+ Ct.map((s, v) => {
1301
+ var w, b;
1330
1302
  return /* @__PURE__ */ u("div", { children: [
1331
- /* @__PURE__ */ a("div", { className: "flex justify-end", children: /* @__PURE__ */ a("p", { className: "text-sm font-nunitoSans font-bold text-[#000000] bg-[#E2DBFF] border border-[#C9C2DE] rounded-l-xl p-2 m-3 mb-4 rounded-br-xl max-w-[75%]", children: c.query }) }),
1332
- c.response && c.response.includes("Thinking") ? /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
1303
+ /* @__PURE__ */ a("div", { className: "flex justify-end", children: /* @__PURE__ */ a("p", { className: "text-sm font-nunitoSans font-bold text-[#000000] bg-[#E2DBFF] border border-[#C9C2DE] rounded-l-xl p-2 m-3 mb-4 rounded-br-xl max-w-[75%]", children: s.query }) }),
1304
+ s.response && s.response.includes("Thinking") ? /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
1333
1305
  "div",
1334
1306
  {
1335
1307
  className: "font-nunitoSans animate-pulse font-bold text-sm text-[#494949] bg-[#FFFFFF] px-7 py-1 rounded-r-xl rounded-bl-2xl w-full",
1336
1308
  dangerouslySetInnerHTML: {
1337
- __html: Xt(c.response)
1309
+ __html: Xt(s.response)
1338
1310
  }
1339
1311
  }
1340
1312
  ) }) : /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
@@ -1342,41 +1314,41 @@ const xt = (t) => {
1342
1314
  {
1343
1315
  className: "font-nunitoSans font-bold text-sm text-[#494949] bg-[#FFFFFF] px-7 py-1 rounded-r-xl rounded-bl-2xl w-full",
1344
1316
  dangerouslySetInnerHTML: {
1345
- __html: Xt(c.response)
1317
+ __html: Xt(s.response)
1346
1318
  }
1347
1319
  }
1348
1320
  ) }),
1349
- Pt && !c.response.includes("Thinking") && ((b = c.products) == null ? void 0 : b.length) == 0 && /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("p", { className: "text-sm animate-pulse font-nunitoSans font-bold text-[#000000] bg-[#E2DBFF] border border-[#C9C2DE] rounded-l-xl p-2 m-3 mb-4 rounded-br-xl max-w-[75%]", children: "Finding best products for you" }) }),
1350
- (c == null ? void 0 : c.products) && ((y = c == null ? void 0 : c.products) == null ? void 0 : y.length) > 0 && /* @__PURE__ */ a(
1351
- Ir,
1321
+ Ot && !s.response.includes("Thinking") && ((w = s.products) == null ? void 0 : w.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" }) }),
1322
+ (s == null ? void 0 : s.products) && ((b = s == null ? void 0 : s.products) == null ? void 0 : b.length) > 0 && /* @__PURE__ */ a(
1323
+ _r,
1352
1324
  {
1353
- chat: c.products,
1354
- storeDetails: p
1325
+ chat: s.products,
1326
+ storeDetails: k
1355
1327
  }
1356
1328
  ),
1357
- c.potentialQuestions.length > 0 && /* @__PURE__ */ u("div", { className: "my-2 px-4 text-sm text-gray-700", children: [
1329
+ s.potentialQuestions.length > 0 && /* @__PURE__ */ u("div", { className: "my-2 px-4 text-sm text-gray-700", children: [
1358
1330
  /* @__PURE__ */ a(
1359
1331
  "p",
1360
1332
  {
1361
1333
  className: "font-nunitoSans font-bold text-sm text-[#494949]",
1362
- style: { color: p.themeDarkColor },
1334
+ style: { color: k.themeDarkColor },
1363
1335
  children: "Why not explore these inquiries..."
1364
1336
  }
1365
1337
  ),
1366
- c.potentialQuestions.split(",").map((f, x) => /* @__PURE__ */ a(
1338
+ s.potentialQuestions.split(",").map((p, g) => /* @__PURE__ */ a(
1367
1339
  "button",
1368
1340
  {
1369
- className: `cursor-pointer font-nunitoSans font-semibold text-[#232323] border bg-[#804C9E0D] border-${p.themeDarkColor} m-1 rounded-xl px-2 py-1`,
1370
- onClick: () => J(f),
1341
+ className: `cursor-pointer font-nunitoSans font-semibold text-[#232323] border bg-[#804C9E0D] border-${k.themeDarkColor} m-1 rounded-xl px-2 py-1`,
1342
+ onClick: () => Wt(p),
1371
1343
  style: {
1372
- backgroundColor: p.tanyaThemeColorLight
1344
+ backgroundColor: k.tanyaThemeColorLight
1373
1345
  },
1374
- children: f
1346
+ children: p
1375
1347
  },
1376
- x
1348
+ g
1377
1349
  ))
1378
1350
  ] }),
1379
- c.secondaryLoading && /* @__PURE__ */ a("div", { className: "mt-3 mb-4 px-4", children: /* @__PURE__ */ u(
1351
+ s.secondaryLoading && /* @__PURE__ */ a("div", { className: "mt-3 mb-4 px-4", children: /* @__PURE__ */ u(
1380
1352
  "div",
1381
1353
  {
1382
1354
  className: "tanya-surprise-wrapper bg-indigo-300 text-sm px-7 py-4 rounded-r-xl rounded-bl-2xl w-full relative overflow-hidden",
@@ -1394,7 +1366,7 @@ const xt = (t) => {
1394
1366
  "p",
1395
1367
  {
1396
1368
  className: "font-semibold tanya-pulse",
1397
- style: { color: p.themeDarkColor },
1369
+ style: { color: k.themeDarkColor },
1398
1370
  children: "I’ve found a special surprise crafted just for you… hang on a sec!"
1399
1371
  }
1400
1372
  ),
@@ -1402,35 +1374,35 @@ const xt = (t) => {
1402
1374
  "p",
1403
1375
  {
1404
1376
  className: "tanya-dots mt-1",
1405
- style: { color: p.themeDarkColor },
1377
+ style: { color: k.themeDarkColor },
1406
1378
  children: "• • •"
1407
1379
  }
1408
1380
  )
1409
1381
  ]
1410
1382
  }
1411
1383
  ) }),
1412
- c.secondaryResponse && /* @__PURE__ */ a(re, { children: /* @__PURE__ */ u("div", { className: "mt-3 mb-8 px-4 bg-indigo-300 rounded-tr-[5px]", children: [
1384
+ s.secondaryResponse && /* @__PURE__ */ a(re, { children: /* @__PURE__ */ u("div", { className: "mt-3 mb-8 px-4 bg-indigo-300 rounded-tr-[5px]", children: [
1413
1385
  /* @__PURE__ */ a(
1414
1386
  "div",
1415
1387
  {
1416
1388
  className: "text-sm text-[#232323] bg-[#FFFFFF] px-7 py-4 rounded-br-xl rounded-bl-2xl w-full",
1417
1389
  style: {
1418
- backgroundColor: p.tanyaThemeColorLight
1390
+ backgroundColor: k.tanyaThemeColorLight
1419
1391
  },
1420
1392
  dangerouslySetInnerHTML: {
1421
1393
  __html: Xt(
1422
- c.secondaryResponse
1394
+ s.secondaryResponse
1423
1395
  )
1424
1396
  }
1425
1397
  }
1426
1398
  ),
1427
- c.productSnapshot && // chat.productSnapshot.points > 0 &&
1399
+ s.productSnapshot && // chat.productSnapshot.points > 0 &&
1428
1400
  /* @__PURE__ */ a("div", { className: "mt-4 w-full", children: /* @__PURE__ */ u(
1429
1401
  "div",
1430
1402
  {
1431
1403
  className: "flex gap-4 items-stretch rounded-2xl p-4",
1432
1404
  style: {
1433
- backgroundColor: p.tanyaThemeColorLight
1405
+ backgroundColor: k.tanyaThemeColorLight
1434
1406
  },
1435
1407
  children: [
1436
1408
  /* @__PURE__ */ a(
@@ -1442,11 +1414,11 @@ const xt = (t) => {
1442
1414
  height: 112,
1443
1415
  borderColor: "#eee"
1444
1416
  },
1445
- children: c.productSnapshot.image ? /* @__PURE__ */ a(
1417
+ children: s.productSnapshot.image ? /* @__PURE__ */ a(
1446
1418
  "img",
1447
1419
  {
1448
- src: c.productSnapshot.image,
1449
- alt: c.productSnapshot.name,
1420
+ src: s.productSnapshot.image,
1421
+ alt: s.productSnapshot.name,
1450
1422
  className: "w-full h-full object-cover"
1451
1423
  }
1452
1424
  ) : /* @__PURE__ */ a("div", { className: "w-full h-full flex items-center justify-center text-xs text-gray-500", children: "No Image" })
@@ -1454,18 +1426,18 @@ const xt = (t) => {
1454
1426
  ),
1455
1427
  /* @__PURE__ */ u("div", { className: "flex flex-col flex-1 justify-between", children: [
1456
1428
  /* @__PURE__ */ u("div", { children: [
1457
- /* @__PURE__ */ a("p", { className: "font-semibold text-[15px] leading-snug", children: c.productSnapshot.name }),
1458
- /* @__PURE__ */ a("p", { className: "mt-1 text-[14px] font-medium", children: c.productSnapshot.price != null ? new Intl.NumberFormat(void 0, {
1429
+ /* @__PURE__ */ a("p", { className: "font-semibold text-[15px] leading-snug", children: s.productSnapshot.name }),
1430
+ /* @__PURE__ */ a("p", { className: "mt-1 text-[14px] font-medium", children: s.productSnapshot.price != null ? new Intl.NumberFormat(void 0, {
1459
1431
  style: "currency",
1460
- currency: (p == null ? void 0 : p.currency) || "USD"
1432
+ currency: (k == null ? void 0 : k.currency) || "USD"
1461
1433
  }).format(
1462
- c.productSnapshot.price
1434
+ s.productSnapshot.price
1463
1435
  ) : "" }),
1464
- c.productSnapshot.points > 0 && /* @__PURE__ */ u("p", { className: "mt-1 text-xs opacity-80", children: [
1436
+ s.productSnapshot.points > 0 && /* @__PURE__ */ u("p", { className: "mt-1 text-xs opacity-80", children: [
1465
1437
  "You will earn",
1466
1438
  " ",
1467
1439
  /* @__PURE__ */ u("strong", { children: [
1468
- c.productSnapshot.points,
1440
+ s.productSnapshot.points,
1469
1441
  " ",
1470
1442
  "points"
1471
1443
  ] })
@@ -1478,45 +1450,45 @@ const xt = (t) => {
1478
1450
  {
1479
1451
  className: "px-3 py-1 text-sm",
1480
1452
  onClick: () => O(
1481
- (f) => f.map(
1482
- (x, z) => z === k && x.productSnapshot ? {
1483
- ...x,
1453
+ (p) => p.map(
1454
+ (g, j) => j === v && g.productSnapshot ? {
1455
+ ...g,
1484
1456
  productSnapshot: {
1485
- ...x.productSnapshot,
1457
+ ...g.productSnapshot,
1486
1458
  quantity: Math.max(
1487
1459
  1,
1488
- x.productSnapshot.quantity - 1
1460
+ g.productSnapshot.quantity - 1
1489
1461
  )
1490
1462
  }
1491
- } : x
1463
+ } : g
1492
1464
  )
1493
1465
  ),
1494
1466
  style: {
1495
1467
  background: "transparent",
1496
- color: p.themeDarkColor
1468
+ color: k.themeDarkColor
1497
1469
  },
1498
1470
  children: "−"
1499
1471
  }
1500
1472
  ),
1501
- /* @__PURE__ */ a("div", { className: "px-3 py-1 text-sm select-none", children: c.productSnapshot.quantity }),
1473
+ /* @__PURE__ */ a("div", { className: "px-3 py-1 text-sm select-none", children: s.productSnapshot.quantity }),
1502
1474
  /* @__PURE__ */ a(
1503
1475
  "button",
1504
1476
  {
1505
1477
  className: "px-3 py-1 text-sm",
1506
1478
  onClick: () => O(
1507
- (f) => f.map(
1508
- (x, z) => z === k && x.productSnapshot ? {
1509
- ...x,
1479
+ (p) => p.map(
1480
+ (g, j) => j === v && g.productSnapshot ? {
1481
+ ...g,
1510
1482
  productSnapshot: {
1511
- ...x.productSnapshot,
1512
- quantity: x.productSnapshot.quantity + 1
1483
+ ...g.productSnapshot,
1484
+ quantity: g.productSnapshot.quantity + 1
1513
1485
  }
1514
- } : x
1486
+ } : g
1515
1487
  )
1516
1488
  ),
1517
1489
  style: {
1518
1490
  background: "transparent",
1519
- color: p.themeDarkColor
1491
+ color: k.themeDarkColor
1520
1492
  },
1521
1493
  children: "+"
1522
1494
  }
@@ -1526,21 +1498,21 @@ const xt = (t) => {
1526
1498
  "button",
1527
1499
  {
1528
1500
  onClick: () => {
1529
- rr(
1530
- zt(
1531
- c.productSnapshot
1501
+ er(
1502
+ $t(
1503
+ s.productSnapshot
1532
1504
  ),
1533
- c.productSnapshot.quantity
1505
+ s.productSnapshot.quantity
1534
1506
  );
1535
1507
  },
1536
- disabled: M,
1508
+ disabled: it,
1537
1509
  className: "px-4 py-2 rounded-full font-medium",
1538
1510
  style: {
1539
- background: p.tanyaThemeColor,
1540
- color: (p == null ? void 0 : p.tanyaThemeContrastColor) || "#fff",
1541
- opacity: M ? 0.8 : 1
1511
+ background: k.tanyaThemeColor,
1512
+ color: (k == null ? void 0 : k.tanyaThemeContrastColor) || "#fff",
1513
+ opacity: it ? 0.8 : 1
1542
1514
  },
1543
- children: M ? "Adding..." : "Add to cart"
1515
+ children: it ? "Adding..." : "Add to cart"
1544
1516
  }
1545
1517
  )
1546
1518
  ] })
@@ -1550,7 +1522,7 @@ const xt = (t) => {
1550
1522
  ) })
1551
1523
  ] }) }),
1552
1524
  /* @__PURE__ */ a("div", { className: "mb-20" })
1553
- ] }, k);
1525
+ ] }, v);
1554
1526
  })
1555
1527
  ]
1556
1528
  }
@@ -1570,9 +1542,9 @@ const xt = (t) => {
1570
1542
  placeholder: "How can I help you...",
1571
1543
  value: kt,
1572
1544
  autoFocus: !0,
1573
- onChange: (c) => St(c.target.value),
1574
- onKeyDown: (c) => {
1575
- c.key === "Enter" && !lt && J();
1545
+ onChange: (s) => St(s.target.value),
1546
+ onKeyDown: (s) => {
1547
+ s.key === "Enter" && !st && Wt();
1576
1548
  }
1577
1549
  }
1578
1550
  ),
@@ -1580,16 +1552,16 @@ const xt = (t) => {
1580
1552
  "button",
1581
1553
  {
1582
1554
  type: "submit",
1583
- disabled: lt,
1555
+ disabled: st,
1584
1556
  className: "p-3",
1585
- onClick: () => J(),
1586
- children: lt ? /* @__PURE__ */ a(
1557
+ onClick: () => Wt(),
1558
+ children: st ? /* @__PURE__ */ a(
1587
1559
  "div",
1588
1560
  {
1589
1561
  className: "p-3 animate-spin rounded-full h-3 w-3 border-b-2",
1590
1562
  style: {
1591
1563
  borderBottom: "2px solid",
1592
- color: p.tanyaThemeColor
1564
+ color: k.tanyaThemeColor
1593
1565
  }
1594
1566
  }
1595
1567
  ) : /* @__PURE__ */ a(
@@ -1617,7 +1589,7 @@ const xt = (t) => {
1617
1589
  ]
1618
1590
  }
1619
1591
  ),
1620
- /* @__PURE__ */ a(Nr, {})
1592
+ /* @__PURE__ */ a(Ir, {})
1621
1593
  ] })
1622
1594
  ]
1623
1595
  }
@@ -1632,7 +1604,7 @@ var ne = function(t, e) {
1632
1604
  for (var n in o) Object.prototype.hasOwnProperty.call(o, n) && (r[n] = o[n]);
1633
1605
  }, ne(t, e);
1634
1606
  };
1635
- function Tr(t, e) {
1607
+ function Er(t, e) {
1636
1608
  if (typeof e != "function" && e !== null)
1637
1609
  throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
1638
1610
  ne(t, e);
@@ -1641,16 +1613,16 @@ function Tr(t, e) {
1641
1613
  }
1642
1614
  t.prototype = e === null ? Object.create(e) : (r.prototype = e.prototype, new r());
1643
1615
  }
1644
- var Q = function() {
1645
- return Q = Object.assign || function(e) {
1616
+ var X = function() {
1617
+ return X = Object.assign || function(e) {
1646
1618
  for (var r, o = 1, n = arguments.length; o < n; o++) {
1647
1619
  r = arguments[o];
1648
- for (var s in r) Object.prototype.hasOwnProperty.call(r, s) && (e[s] = r[s]);
1620
+ for (var l in r) Object.prototype.hasOwnProperty.call(r, l) && (e[l] = r[l]);
1649
1621
  }
1650
1622
  return e;
1651
- }, Q.apply(this, arguments);
1623
+ }, X.apply(this, arguments);
1652
1624
  };
1653
- function Or(t, e) {
1625
+ function Tr(t, e) {
1654
1626
  var r = {};
1655
1627
  for (var o in t) Object.prototype.hasOwnProperty.call(t, o) && e.indexOf(o) < 0 && (r[o] = t[o]);
1656
1628
  if (t != null && typeof Object.getOwnPropertySymbols == "function")
@@ -1658,28 +1630,28 @@ function Or(t, e) {
1658
1630
  e.indexOf(o[n]) < 0 && Object.prototype.propertyIsEnumerable.call(t, o[n]) && (r[o[n]] = t[o[n]]);
1659
1631
  return r;
1660
1632
  }
1661
- var Qt = "Invariant Violation", _e = Object.setPrototypeOf, Pr = _e === void 0 ? function(t, e) {
1633
+ var Qt = "Invariant Violation", Ce = Object.setPrototypeOf, Or = Ce === void 0 ? function(t, e) {
1662
1634
  return t.__proto__ = e, t;
1663
- } : _e, Ye = (
1635
+ } : Ce, Ve = (
1664
1636
  /** @class */
1665
1637
  (function(t) {
1666
- Tr(e, t);
1638
+ Er(e, t);
1667
1639
  function e(r) {
1668
1640
  r === void 0 && (r = Qt);
1669
1641
  var o = t.call(this, typeof r == "number" ? Qt + ": " + r + " (see https://github.com/apollographql/invariant-packages)" : r) || this;
1670
- return o.framesToPop = 1, o.name = Qt, Pr(o, e.prototype), o;
1642
+ return o.framesToPop = 1, o.name = Qt, Or(o, e.prototype), o;
1671
1643
  }
1672
1644
  return e;
1673
1645
  })(Error)
1674
1646
  );
1675
- function it(t, e) {
1647
+ function Z(t, e) {
1676
1648
  if (!t)
1677
- throw new Ye(e);
1649
+ throw new Ve(e);
1678
1650
  }
1679
- var Ke = ["debug", "log", "warn", "error", "silent"], $r = Ke.indexOf("log");
1651
+ var Ye = ["debug", "log", "warn", "error", "silent"], Pr = Ye.indexOf("log");
1680
1652
  function Lt(t) {
1681
1653
  return function() {
1682
- if (Ke.indexOf(t) >= $r) {
1654
+ if (Ye.indexOf(t) >= Pr) {
1683
1655
  var e = console[t] || console.log;
1684
1656
  return e.apply(console, arguments);
1685
1657
  }
@@ -1687,21 +1659,21 @@ function Lt(t) {
1687
1659
  }
1688
1660
  (function(t) {
1689
1661
  t.debug = Lt("debug"), t.log = Lt("log"), t.warn = Lt("warn"), t.error = Lt("error");
1690
- })(it || (it = {}));
1691
- var Je = "3.14.0";
1692
- function wt(t) {
1662
+ })(Z || (Z = {}));
1663
+ var Re = "3.14.0";
1664
+ function gt(t) {
1693
1665
  try {
1694
1666
  return t();
1695
1667
  } catch {
1696
1668
  }
1697
1669
  }
1698
- const ae = wt(function() {
1670
+ const ae = gt(function() {
1699
1671
  return globalThis;
1700
- }) || wt(function() {
1672
+ }) || gt(function() {
1701
1673
  return window;
1702
- }) || wt(function() {
1674
+ }) || gt(function() {
1703
1675
  return self;
1704
- }) || wt(function() {
1676
+ }) || gt(function() {
1705
1677
  return global;
1706
1678
  }) || // We don't expect the Function constructor ever to be invoked at runtime, as
1707
1679
  // long as at least one of globalThis, window, self, or global is defined, so
@@ -1709,16 +1681,16 @@ const ae = wt(function() {
1709
1681
  // detect syntactic usage of the Function constructor. If you think you can
1710
1682
  // improve your static analysis to detect this obfuscation, think again. This
1711
1683
  // is an arms race you cannot win, at least not in JavaScript.
1712
- wt(function() {
1713
- return wt.constructor("return this")();
1684
+ gt(function() {
1685
+ return gt.constructor("return this")();
1714
1686
  });
1715
- var Ie = /* @__PURE__ */ new Map();
1716
- function zr(t) {
1717
- var e = Ie.get(t) || 1;
1718
- return Ie.set(t, e + 1), "".concat(t, ":").concat(e, ":").concat(Math.random().toString(36).slice(2));
1687
+ var _e = /* @__PURE__ */ new Map();
1688
+ function $r(t) {
1689
+ var e = _e.get(t) || 1;
1690
+ return _e.set(t, e + 1), "".concat(t, ":").concat(e, ":").concat(Math.random().toString(36).slice(2));
1719
1691
  }
1720
- function jr(t, e) {
1721
- var r = zr("stringifyForDisplay");
1692
+ function zr(t, e) {
1693
+ var r = $r("stringifyForDisplay");
1722
1694
  return JSON.stringify(t, function(o, n) {
1723
1695
  return n === void 0 ? r : n;
1724
1696
  }, e).split(JSON.stringify(r)).join("<undefined>");
@@ -1737,51 +1709,51 @@ function Bt(t) {
1737
1709
  var Zt = Object.assign(function(e, r) {
1738
1710
  for (var o = [], n = 2; n < arguments.length; n++)
1739
1711
  o[n - 2] = arguments[n];
1740
- e || it(e, le(r, o) || ce(r, o));
1712
+ e || Z(e, le(r, o) || ce(r, o));
1741
1713
  }, {
1742
- debug: Bt(it.debug),
1743
- log: Bt(it.log),
1744
- warn: Bt(it.warn),
1745
- error: Bt(it.error)
1714
+ debug: Bt(Z.debug),
1715
+ log: Bt(Z.log),
1716
+ warn: Bt(Z.warn),
1717
+ error: Bt(Z.error)
1746
1718
  });
1747
- function We(t) {
1719
+ function Ke(t) {
1748
1720
  for (var e = [], r = 1; r < arguments.length; r++)
1749
1721
  e[r - 1] = arguments[r];
1750
- return new Ye(le(t, e) || ce(t, e));
1722
+ return new Ve(le(t, e) || ce(t, e));
1751
1723
  }
1752
- var Fe = Symbol.for("ApolloErrorMessageHandler_" + Je);
1753
- function Ge(t) {
1724
+ var Fe = Symbol.for("ApolloErrorMessageHandler_" + Re);
1725
+ function Je(t) {
1754
1726
  if (typeof t == "string")
1755
1727
  return t;
1756
1728
  try {
1757
- return jr(t, 2).slice(0, 1e3);
1729
+ return zr(t, 2).slice(0, 1e3);
1758
1730
  } catch {
1759
1731
  return "<non-serializable>";
1760
1732
  }
1761
1733
  }
1762
1734
  function le(t, e) {
1763
1735
  if (e === void 0 && (e = []), !!t)
1764
- return ae[Fe] && ae[Fe](t, e.map(Ge));
1736
+ return ae[Fe] && ae[Fe](t, e.map(Je));
1765
1737
  }
1766
1738
  function ce(t, e) {
1767
1739
  if (e === void 0 && (e = []), !!t)
1768
1740
  return "An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({
1769
- version: Je,
1741
+ version: Re,
1770
1742
  message: t,
1771
- args: e.map(Ge)
1743
+ args: e.map(Je)
1772
1744
  })));
1773
1745
  }
1774
- function Ar(t) {
1746
+ function jr(t) {
1775
1747
  return t.definitions.filter(function(e) {
1776
1748
  return e.kind === "OperationDefinition" && !!e.name;
1777
1749
  }).map(function(e) {
1778
1750
  return e.name.value;
1779
1751
  })[0] || null;
1780
1752
  }
1781
- let F = null;
1782
- const Ne = {};
1753
+ let N = null;
1754
+ const Ie = {};
1783
1755
  let Dr = 1;
1784
- const Lr = () => class {
1756
+ const Ar = () => class {
1785
1757
  constructor() {
1786
1758
  this.id = [
1787
1759
  "slot",
@@ -1791,78 +1763,78 @@ const Lr = () => class {
1791
1763
  ].join(":");
1792
1764
  }
1793
1765
  hasValue() {
1794
- for (let e = F; e; e = e.parent)
1766
+ for (let e = N; e; e = e.parent)
1795
1767
  if (this.id in e.slots) {
1796
1768
  const r = e.slots[this.id];
1797
- if (r === Ne)
1769
+ if (r === Ie)
1798
1770
  break;
1799
- return e !== F && (F.slots[this.id] = r), !0;
1771
+ return e !== N && (N.slots[this.id] = r), !0;
1800
1772
  }
1801
- return F && (F.slots[this.id] = Ne), !1;
1773
+ return N && (N.slots[this.id] = Ie), !1;
1802
1774
  }
1803
1775
  getValue() {
1804
1776
  if (this.hasValue())
1805
- return F.slots[this.id];
1777
+ return N.slots[this.id];
1806
1778
  }
1807
1779
  withValue(e, r, o, n) {
1808
- const s = {
1780
+ const l = {
1809
1781
  __proto__: null,
1810
1782
  [this.id]: e
1811
- }, l = F;
1812
- F = { parent: l, slots: s };
1783
+ }, c = N;
1784
+ N = { parent: c, slots: l };
1813
1785
  try {
1814
1786
  return r.apply(n, o);
1815
1787
  } finally {
1816
- F = l;
1788
+ N = c;
1817
1789
  }
1818
1790
  }
1819
1791
  // Capture the current context and wrap a callback function so that it
1820
1792
  // reestablishes the captured context when called.
1821
1793
  static bind(e) {
1822
- const r = F;
1794
+ const r = N;
1823
1795
  return function() {
1824
- const o = F;
1796
+ const o = N;
1825
1797
  try {
1826
- return F = r, e.apply(this, arguments);
1798
+ return N = r, e.apply(this, arguments);
1827
1799
  } finally {
1828
- F = o;
1800
+ N = o;
1829
1801
  }
1830
1802
  };
1831
1803
  }
1832
1804
  // Immediately run a callback function without any captured context.
1833
1805
  static noContext(e, r, o) {
1834
- if (F) {
1835
- const n = F;
1806
+ if (N) {
1807
+ const n = N;
1836
1808
  try {
1837
- return F = null, e.apply(o, r);
1809
+ return N = null, e.apply(o, r);
1838
1810
  } finally {
1839
- F = n;
1811
+ N = n;
1840
1812
  }
1841
1813
  } else
1842
1814
  return e.apply(o, r);
1843
1815
  }
1844
1816
  };
1845
- function Ee(t) {
1817
+ function Ne(t) {
1846
1818
  try {
1847
1819
  return t();
1848
1820
  } catch {
1849
1821
  }
1850
1822
  }
1851
- const te = "@wry/context:Slot", Br = (
1823
+ const te = "@wry/context:Slot", Lr = (
1852
1824
  // Prefer globalThis when available.
1853
1825
  // https://github.com/benjamn/wryware/issues/347
1854
- Ee(() => globalThis) || // Fall back to global, which works in Node.js and may be converted by some
1826
+ Ne(() => globalThis) || // Fall back to global, which works in Node.js and may be converted by some
1855
1827
  // bundlers to the appropriate identifier (window, self, ...) depending on the
1856
1828
  // bundling target. https://github.com/endojs/endo/issues/576#issuecomment-1178515224
1857
- Ee(() => global) || // Otherwise, use a dummy host that's local to this module. We used to fall
1829
+ Ne(() => global) || // Otherwise, use a dummy host that's local to this module. We used to fall
1858
1830
  // back to using the Array constructor as a namespace, but that was flagged in
1859
1831
  // https://github.com/benjamn/wryware/issues/347, and can be avoided.
1860
1832
  /* @__PURE__ */ Object.create(null)
1861
- ), Te = Br, de = Te[te] || // Earlier versions of this package stored the globalKey property on the Array
1833
+ ), Ee = Lr, de = Ee[te] || // Earlier versions of this package stored the globalKey property on the Array
1862
1834
  // constructor, so we check there as well, to prevent Slot class duplication.
1863
1835
  Array[te] || (function(t) {
1864
1836
  try {
1865
- Object.defineProperty(Te, te, {
1837
+ Object.defineProperty(Ee, te, {
1866
1838
  value: t,
1867
1839
  enumerable: !1,
1868
1840
  writable: !1,
@@ -1877,12 +1849,12 @@ Array[te] || (function(t) {
1877
1849
  } finally {
1878
1850
  return t;
1879
1851
  }
1880
- })(Lr()), { bind: So, noContext: Co } = de;
1852
+ })(Ar()), { bind: ko, noContext: So } = de;
1881
1853
  new de();
1882
- function Ur(t, e) {
1854
+ function Br(t, e) {
1883
1855
  var r = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
1884
1856
  if (r) return (r = r.call(t)).next.bind(r);
1885
- if (Array.isArray(t) || (r = qr(t)) || e) {
1857
+ if (Array.isArray(t) || (r = Ur(t)) || e) {
1886
1858
  r && (t = r);
1887
1859
  var o = 0;
1888
1860
  return function() {
@@ -1892,28 +1864,28 @@ function Ur(t, e) {
1892
1864
  throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1893
1865
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1894
1866
  }
1895
- function qr(t, e) {
1867
+ function Ur(t, e) {
1896
1868
  if (t) {
1897
- if (typeof t == "string") return Oe(t, e);
1869
+ if (typeof t == "string") return Te(t, e);
1898
1870
  var r = Object.prototype.toString.call(t).slice(8, -1);
1899
1871
  if (r === "Object" && t.constructor && (r = t.constructor.name), r === "Map" || r === "Set") return Array.from(t);
1900
- if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return Oe(t, e);
1872
+ if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return Te(t, e);
1901
1873
  }
1902
1874
  }
1903
- function Oe(t, e) {
1875
+ function Te(t, e) {
1904
1876
  (e == null || e > t.length) && (e = t.length);
1905
1877
  for (var r = 0, o = new Array(e); r < e; r++)
1906
1878
  o[r] = t[r];
1907
1879
  return o;
1908
1880
  }
1909
- function Pe(t, e) {
1881
+ function Oe(t, e) {
1910
1882
  for (var r = 0; r < e.length; r++) {
1911
1883
  var o = e[r];
1912
1884
  o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o);
1913
1885
  }
1914
1886
  }
1915
1887
  function ue(t, e, r) {
1916
- return e && Pe(t.prototype, e), r && Pe(t, r), Object.defineProperty(t, "prototype", { writable: !1 }), t;
1888
+ return e && Oe(t.prototype, e), r && Oe(t, r), Object.defineProperty(t, "prototype", { writable: !1 }), t;
1917
1889
  }
1918
1890
  var pe = function() {
1919
1891
  return typeof Symbol == "function";
@@ -1923,7 +1895,7 @@ var pe = function() {
1923
1895
  return fe(t) ? Symbol[t] : "@@" + t;
1924
1896
  };
1925
1897
  pe() && !fe("observable") && (Symbol.observable = Symbol("observable"));
1926
- var Mr = me("iterator"), ie = me("observable"), Xe = me("species");
1898
+ var qr = me("iterator"), ie = me("observable"), We = me("species");
1927
1899
  function Kt(t, e) {
1928
1900
  var r = t[e];
1929
1901
  if (r != null) {
@@ -1931,15 +1903,15 @@ function Kt(t, e) {
1931
1903
  return r;
1932
1904
  }
1933
1905
  }
1934
- function Nt(t) {
1906
+ function It(t) {
1935
1907
  var e = t.constructor;
1936
- return e !== void 0 && (e = e[Xe], e === null && (e = void 0)), e !== void 0 ? e : N;
1908
+ return e !== void 0 && (e = e[We], e === null && (e = void 0)), e !== void 0 ? e : E;
1937
1909
  }
1938
- function Hr(t) {
1939
- return t instanceof N;
1910
+ function Mr(t) {
1911
+ return t instanceof E;
1940
1912
  }
1941
- function yt(t) {
1942
- yt.log ? yt.log(t) : setTimeout(function() {
1913
+ function bt(t) {
1914
+ bt.log ? bt.log(t) : setTimeout(function() {
1943
1915
  throw t;
1944
1916
  });
1945
1917
  }
@@ -1948,11 +1920,11 @@ function qt(t) {
1948
1920
  try {
1949
1921
  t();
1950
1922
  } catch (e) {
1951
- yt(e);
1923
+ bt(e);
1952
1924
  }
1953
1925
  });
1954
1926
  }
1955
- function Qe(t) {
1927
+ function Ge(t) {
1956
1928
  var e = t._cleanup;
1957
1929
  if (e !== void 0 && (t._cleanup = void 0, !!e))
1958
1930
  try {
@@ -1963,21 +1935,21 @@ function Qe(t) {
1963
1935
  r && r.call(e);
1964
1936
  }
1965
1937
  } catch (o) {
1966
- yt(o);
1938
+ bt(o);
1967
1939
  }
1968
1940
  }
1969
1941
  function se(t) {
1970
1942
  t._observer = void 0, t._queue = void 0, t._state = "closed";
1971
1943
  }
1972
- function Vr(t) {
1944
+ function Hr(t) {
1973
1945
  var e = t._queue;
1974
1946
  if (e) {
1975
1947
  t._queue = void 0, t._state = "ready";
1976
- for (var r = 0; r < e.length && (Ze(t, e[r].type, e[r].value), t._state !== "closed"); ++r)
1948
+ for (var r = 0; r < e.length && (Xe(t, e[r].type, e[r].value), t._state !== "closed"); ++r)
1977
1949
  ;
1978
1950
  }
1979
1951
  }
1980
- function Ze(t, e, r) {
1952
+ function Xe(t, e, r) {
1981
1953
  t._state = "running";
1982
1954
  var o = t._observer;
1983
1955
  try {
@@ -1994,10 +1966,10 @@ function Ze(t, e, r) {
1994
1966
  se(t), n && n.call(o);
1995
1967
  break;
1996
1968
  }
1997
- } catch (s) {
1998
- yt(s);
1969
+ } catch (l) {
1970
+ bt(l);
1999
1971
  }
2000
- t._state === "closed" ? Qe(t) : t._state === "running" && (t._state = "ready");
1972
+ t._state === "closed" ? Ge(t) : t._state === "running" && (t._state = "ready");
2001
1973
  }
2002
1974
  function ee(t, e, r) {
2003
1975
  if (t._state !== "closed") {
@@ -2013,27 +1985,27 @@ function ee(t, e, r) {
2013
1985
  type: e,
2014
1986
  value: r
2015
1987
  }], qt(function() {
2016
- return Vr(t);
1988
+ return Hr(t);
2017
1989
  });
2018
1990
  return;
2019
1991
  }
2020
- Ze(t, e, r);
1992
+ Xe(t, e, r);
2021
1993
  }
2022
1994
  }
2023
- var Rr = /* @__PURE__ */ (function() {
1995
+ var Vr = /* @__PURE__ */ (function() {
2024
1996
  function t(r, o) {
2025
1997
  this._cleanup = void 0, this._observer = r, this._queue = void 0, this._state = "initializing";
2026
1998
  var n = new Yr(this);
2027
1999
  try {
2028
2000
  this._cleanup = o.call(void 0, n);
2029
- } catch (s) {
2030
- n.error(s);
2001
+ } catch (l) {
2002
+ n.error(l);
2031
2003
  }
2032
2004
  this._state === "initializing" && (this._state = "ready");
2033
2005
  }
2034
2006
  var e = t.prototype;
2035
2007
  return e.unsubscribe = function() {
2036
- this._state !== "closed" && (se(this), Qe(this));
2008
+ this._state !== "closed" && (se(this), Ge(this));
2037
2009
  }, ue(t, [{
2038
2010
  key: "closed",
2039
2011
  get: function() {
@@ -2057,7 +2029,7 @@ var Rr = /* @__PURE__ */ (function() {
2057
2029
  return this._subscription._state === "closed";
2058
2030
  }
2059
2031
  }]), t;
2060
- })(), N = /* @__PURE__ */ (function() {
2032
+ })(), E = /* @__PURE__ */ (function() {
2061
2033
  function t(r) {
2062
2034
  if (!(this instanceof t)) throw new TypeError("Observable cannot be called as a function");
2063
2035
  if (typeof r != "function") throw new TypeError("Observable initializer must be a function");
@@ -2069,162 +2041,162 @@ var Rr = /* @__PURE__ */ (function() {
2069
2041
  next: o,
2070
2042
  error: arguments[1],
2071
2043
  complete: arguments[2]
2072
- }), new Rr(o, this._subscriber);
2044
+ }), new Vr(o, this._subscriber);
2073
2045
  }, e.forEach = function(o) {
2074
2046
  var n = this;
2075
- return new Promise(function(s, l) {
2047
+ return new Promise(function(l, c) {
2076
2048
  if (typeof o != "function") {
2077
- l(new TypeError(o + " is not a function"));
2049
+ c(new TypeError(o + " is not a function"));
2078
2050
  return;
2079
2051
  }
2080
2052
  function d() {
2081
- i.unsubscribe(), s();
2053
+ i.unsubscribe(), l();
2082
2054
  }
2083
2055
  var i = n.subscribe({
2084
- next: function(g) {
2056
+ next: function(x) {
2085
2057
  try {
2086
- o(g, d);
2087
- } catch (w) {
2088
- l(w), i.unsubscribe();
2058
+ o(x, d);
2059
+ } catch (h) {
2060
+ c(h), i.unsubscribe();
2089
2061
  }
2090
2062
  },
2091
- error: l,
2092
- complete: s
2063
+ error: c,
2064
+ complete: l
2093
2065
  });
2094
2066
  });
2095
2067
  }, e.map = function(o) {
2096
2068
  var n = this;
2097
2069
  if (typeof o != "function") throw new TypeError(o + " is not a function");
2098
- var s = Nt(this);
2099
- return new s(function(l) {
2070
+ var l = It(this);
2071
+ return new l(function(c) {
2100
2072
  return n.subscribe({
2101
2073
  next: function(d) {
2102
2074
  try {
2103
2075
  d = o(d);
2104
2076
  } catch (i) {
2105
- return l.error(i);
2077
+ return c.error(i);
2106
2078
  }
2107
- l.next(d);
2079
+ c.next(d);
2108
2080
  },
2109
2081
  error: function(d) {
2110
- l.error(d);
2082
+ c.error(d);
2111
2083
  },
2112
2084
  complete: function() {
2113
- l.complete();
2085
+ c.complete();
2114
2086
  }
2115
2087
  });
2116
2088
  });
2117
2089
  }, e.filter = function(o) {
2118
2090
  var n = this;
2119
2091
  if (typeof o != "function") throw new TypeError(o + " is not a function");
2120
- var s = Nt(this);
2121
- return new s(function(l) {
2092
+ var l = It(this);
2093
+ return new l(function(c) {
2122
2094
  return n.subscribe({
2123
2095
  next: function(d) {
2124
2096
  try {
2125
2097
  if (!o(d)) return;
2126
2098
  } catch (i) {
2127
- return l.error(i);
2099
+ return c.error(i);
2128
2100
  }
2129
- l.next(d);
2101
+ c.next(d);
2130
2102
  },
2131
2103
  error: function(d) {
2132
- l.error(d);
2104
+ c.error(d);
2133
2105
  },
2134
2106
  complete: function() {
2135
- l.complete();
2107
+ c.complete();
2136
2108
  }
2137
2109
  });
2138
2110
  });
2139
2111
  }, e.reduce = function(o) {
2140
2112
  var n = this;
2141
2113
  if (typeof o != "function") throw new TypeError(o + " is not a function");
2142
- var s = Nt(this), l = arguments.length > 1, d = !1, i = arguments[1], g = i;
2143
- return new s(function(w) {
2114
+ var l = It(this), c = arguments.length > 1, d = !1, i = arguments[1], x = i;
2115
+ return new l(function(h) {
2144
2116
  return n.subscribe({
2145
2117
  next: function(S) {
2146
- var C = !d;
2147
- if (d = !0, !C || l)
2118
+ var _ = !d;
2119
+ if (d = !0, !_ || c)
2148
2120
  try {
2149
- g = o(g, S);
2150
- } catch (_) {
2151
- return w.error(_);
2121
+ x = o(x, S);
2122
+ } catch (F) {
2123
+ return h.error(F);
2152
2124
  }
2153
2125
  else
2154
- g = S;
2126
+ x = S;
2155
2127
  },
2156
2128
  error: function(S) {
2157
- w.error(S);
2129
+ h.error(S);
2158
2130
  },
2159
2131
  complete: function() {
2160
- if (!d && !l) return w.error(new TypeError("Cannot reduce an empty sequence"));
2161
- w.next(g), w.complete();
2132
+ if (!d && !c) return h.error(new TypeError("Cannot reduce an empty sequence"));
2133
+ h.next(x), h.complete();
2162
2134
  }
2163
2135
  });
2164
2136
  });
2165
2137
  }, e.concat = function() {
2166
- for (var o = this, n = arguments.length, s = new Array(n), l = 0; l < n; l++)
2167
- s[l] = arguments[l];
2168
- var d = Nt(this);
2138
+ for (var o = this, n = arguments.length, l = new Array(n), c = 0; c < n; c++)
2139
+ l[c] = arguments[c];
2140
+ var d = It(this);
2169
2141
  return new d(function(i) {
2170
- var g, w = 0;
2171
- function S(C) {
2172
- g = C.subscribe({
2173
- next: function(_) {
2174
- i.next(_);
2142
+ var x, h = 0;
2143
+ function S(_) {
2144
+ x = _.subscribe({
2145
+ next: function(F) {
2146
+ i.next(F);
2175
2147
  },
2176
- error: function(_) {
2177
- i.error(_);
2148
+ error: function(F) {
2149
+ i.error(F);
2178
2150
  },
2179
2151
  complete: function() {
2180
- w === s.length ? (g = void 0, i.complete()) : S(d.from(s[w++]));
2152
+ h === l.length ? (x = void 0, i.complete()) : S(d.from(l[h++]));
2181
2153
  }
2182
2154
  });
2183
2155
  }
2184
2156
  return S(o), function() {
2185
- g && (g.unsubscribe(), g = void 0);
2157
+ x && (x.unsubscribe(), x = void 0);
2186
2158
  };
2187
2159
  });
2188
2160
  }, e.flatMap = function(o) {
2189
2161
  var n = this;
2190
2162
  if (typeof o != "function") throw new TypeError(o + " is not a function");
2191
- var s = Nt(this);
2192
- return new s(function(l) {
2163
+ var l = It(this);
2164
+ return new l(function(c) {
2193
2165
  var d = [], i = n.subscribe({
2194
- next: function(w) {
2166
+ next: function(h) {
2195
2167
  if (o)
2196
2168
  try {
2197
- w = o(w);
2198
- } catch (C) {
2199
- return l.error(C);
2169
+ h = o(h);
2170
+ } catch (_) {
2171
+ return c.error(_);
2200
2172
  }
2201
- var S = s.from(w).subscribe({
2202
- next: function(C) {
2203
- l.next(C);
2173
+ var S = l.from(h).subscribe({
2174
+ next: function(_) {
2175
+ c.next(_);
2204
2176
  },
2205
- error: function(C) {
2206
- l.error(C);
2177
+ error: function(_) {
2178
+ c.error(_);
2207
2179
  },
2208
2180
  complete: function() {
2209
- var C = d.indexOf(S);
2210
- C >= 0 && d.splice(C, 1), g();
2181
+ var _ = d.indexOf(S);
2182
+ _ >= 0 && d.splice(_, 1), x();
2211
2183
  }
2212
2184
  });
2213
2185
  d.push(S);
2214
2186
  },
2215
- error: function(w) {
2216
- l.error(w);
2187
+ error: function(h) {
2188
+ c.error(h);
2217
2189
  },
2218
2190
  complete: function() {
2219
- g();
2191
+ x();
2220
2192
  }
2221
2193
  });
2222
- function g() {
2223
- i.closed && d.length === 0 && l.complete();
2194
+ function x() {
2195
+ i.closed && d.length === 0 && c.complete();
2224
2196
  }
2225
2197
  return function() {
2226
- d.forEach(function(w) {
2227
- return w.unsubscribe();
2198
+ d.forEach(function(h) {
2199
+ return h.unsubscribe();
2228
2200
  }), i.unsubscribe();
2229
2201
  };
2230
2202
  });
@@ -2233,21 +2205,21 @@ var Rr = /* @__PURE__ */ (function() {
2233
2205
  }, t.from = function(o) {
2234
2206
  var n = typeof this == "function" ? this : t;
2235
2207
  if (o == null) throw new TypeError(o + " is not an object");
2236
- var s = Kt(o, ie);
2237
- if (s) {
2238
- var l = s.call(o);
2239
- if (Object(l) !== l) throw new TypeError(l + " is not an object");
2240
- return Hr(l) && l.constructor === n ? l : new n(function(d) {
2241
- return l.subscribe(d);
2208
+ var l = Kt(o, ie);
2209
+ if (l) {
2210
+ var c = l.call(o);
2211
+ if (Object(c) !== c) throw new TypeError(c + " is not an object");
2212
+ return Mr(c) && c.constructor === n ? c : new n(function(d) {
2213
+ return c.subscribe(d);
2242
2214
  });
2243
2215
  }
2244
- if (fe("iterator") && (s = Kt(o, Mr), s))
2216
+ if (fe("iterator") && (l = Kt(o, qr), l))
2245
2217
  return new n(function(d) {
2246
2218
  qt(function() {
2247
2219
  if (!d.closed) {
2248
- for (var i = Ur(s.call(o)), g; !(g = i()).done; ) {
2249
- var w = g.value;
2250
- if (d.next(w), d.closed) return;
2220
+ for (var i = Br(l.call(o)), x; !(x = i()).done; ) {
2221
+ var h = x.value;
2222
+ if (d.next(h), d.closed) return;
2251
2223
  }
2252
2224
  d.complete();
2253
2225
  }
@@ -2265,10 +2237,10 @@ var Rr = /* @__PURE__ */ (function() {
2265
2237
  });
2266
2238
  throw new TypeError(o + " is not observable");
2267
2239
  }, t.of = function() {
2268
- for (var o = arguments.length, n = new Array(o), s = 0; s < o; s++)
2269
- n[s] = arguments[s];
2270
- var l = typeof this == "function" ? this : t;
2271
- return new l(function(d) {
2240
+ for (var o = arguments.length, n = new Array(o), l = 0; l < o; l++)
2241
+ n[l] = arguments[l];
2242
+ var c = typeof this == "function" ? this : t;
2243
+ return new c(function(d) {
2272
2244
  qt(function() {
2273
2245
  if (!d.closed) {
2274
2246
  for (var i = 0; i < n.length; ++i)
@@ -2278,20 +2250,20 @@ var Rr = /* @__PURE__ */ (function() {
2278
2250
  });
2279
2251
  });
2280
2252
  }, ue(t, null, [{
2281
- key: Xe,
2253
+ key: We,
2282
2254
  get: function() {
2283
2255
  return this;
2284
2256
  }
2285
2257
  }]), t;
2286
2258
  })();
2287
- pe() && Object.defineProperty(N, Symbol("extensions"), {
2259
+ pe() && Object.defineProperty(E, Symbol("extensions"), {
2288
2260
  value: {
2289
2261
  symbol: ie,
2290
- hostReportError: yt
2262
+ hostReportError: bt
2291
2263
  },
2292
2264
  configurable: !0
2293
2265
  });
2294
- function Kr(t) {
2266
+ function Rr(t) {
2295
2267
  var e, r = t.Symbol;
2296
2268
  if (typeof r == "function")
2297
2269
  if (r.observable)
@@ -2307,14 +2279,14 @@ function Kr(t) {
2307
2279
  e = "@@observable";
2308
2280
  return e;
2309
2281
  }
2310
- var gt;
2311
- typeof self < "u" ? gt = self : typeof window < "u" ? gt = window : typeof global < "u" ? gt = global : typeof module < "u" ? gt = module : gt = Function("return this")();
2312
- Kr(gt);
2313
- var $e = N.prototype, ze = "@@observable";
2314
- $e[ze] || ($e[ze] = function() {
2282
+ var xt;
2283
+ typeof self < "u" ? xt = self : typeof window < "u" ? xt = window : typeof global < "u" ? xt = global : typeof module < "u" ? xt = module : xt = Function("return this")();
2284
+ Rr(xt);
2285
+ var Pe = E.prototype, $e = "@@observable";
2286
+ Pe[$e] || (Pe[$e] = function() {
2315
2287
  return this;
2316
2288
  });
2317
- function Jr(t) {
2289
+ function Kr(t) {
2318
2290
  for (var e = [
2319
2291
  "query",
2320
2292
  "operationName",
@@ -2324,15 +2296,15 @@ function Jr(t) {
2324
2296
  ], r = 0, o = Object.keys(t); r < o.length; r++) {
2325
2297
  var n = o[r];
2326
2298
  if (e.indexOf(n) < 0)
2327
- throw We(58, n);
2299
+ throw Ke(58, n);
2328
2300
  }
2329
2301
  return t;
2330
2302
  }
2331
- function Wr(t, e) {
2332
- var r = Q({}, t), o = function(s) {
2333
- typeof s == "function" ? r = Q(Q({}, r), s(r)) : r = Q(Q({}, r), s);
2303
+ function Jr(t, e) {
2304
+ var r = X({}, t), o = function(l) {
2305
+ typeof l == "function" ? r = X(X({}, r), l(r)) : r = X(X({}, r), l);
2334
2306
  }, n = function() {
2335
- return Q({}, r);
2307
+ return X({}, r);
2336
2308
  };
2337
2309
  return Object.defineProperty(e, "setContext", {
2338
2310
  enumerable: !1,
@@ -2342,32 +2314,32 @@ function Wr(t, e) {
2342
2314
  value: n
2343
2315
  }), e;
2344
2316
  }
2345
- function Gr(t) {
2317
+ function Wr(t) {
2346
2318
  var e = {
2347
2319
  variables: t.variables || {},
2348
2320
  extensions: t.extensions || {},
2349
2321
  operationName: t.operationName,
2350
2322
  query: t.query
2351
2323
  };
2352
- return e.operationName || (e.operationName = typeof e.query != "string" ? Ar(e.query) || void 0 : ""), e;
2324
+ return e.operationName || (e.operationName = typeof e.query != "string" ? jr(e.query) || void 0 : ""), e;
2353
2325
  }
2354
- var Xr = Symbol.for("apollo.deprecations"), Qr = ae, Zr = new de();
2355
- function to(t) {
2356
- return Qr[Xr] || (Zr.getValue() || []).includes(t);
2326
+ var Gr = Symbol.for("apollo.deprecations"), Xr = ae, Qr = new de();
2327
+ function Zr(t) {
2328
+ return Xr[Gr] || (Qr.getValue() || []).includes(t);
2357
2329
  }
2358
- function eo(t, e) {
2359
- to(t) || e();
2330
+ function to(t, e) {
2331
+ Zr(t) || e();
2360
2332
  }
2361
- function je(t, e) {
2362
- return e ? e(t) : N.of();
2333
+ function ze(t, e) {
2334
+ return e ? e(t) : E.of();
2363
2335
  }
2364
- function Et(t) {
2365
- return typeof t == "function" ? new tr(t) : t;
2336
+ function Nt(t) {
2337
+ return typeof t == "function" ? new Qe(t) : t;
2366
2338
  }
2367
2339
  function Ut(t) {
2368
2340
  return t.request.length <= 1;
2369
2341
  }
2370
- var tr = (
2342
+ var Qe = (
2371
2343
  /** @class */
2372
2344
  (function() {
2373
2345
  function t(e) {
@@ -2375,43 +2347,43 @@ var tr = (
2375
2347
  }
2376
2348
  return t.empty = function() {
2377
2349
  return new t(function() {
2378
- return N.of();
2350
+ return E.of();
2379
2351
  });
2380
2352
  }, t.from = function(e) {
2381
- return e.length === 0 ? t.empty() : e.map(Et).reduce(function(r, o) {
2353
+ return e.length === 0 ? t.empty() : e.map(Nt).reduce(function(r, o) {
2382
2354
  return r.concat(o);
2383
2355
  });
2384
2356
  }, t.split = function(e, r, o) {
2385
- var n = Et(r), s = Et(o || new t(je)), l;
2386
- return Ut(n) && Ut(s) ? l = new t(function(d) {
2387
- return e(d) ? n.request(d) || N.of() : s.request(d) || N.of();
2388
- }) : l = new t(function(d, i) {
2389
- return e(d) ? n.request(d, i) || N.of() : s.request(d, i) || N.of();
2390
- }), Object.assign(l, { left: n, right: s });
2357
+ var n = Nt(r), l = Nt(o || new t(ze)), c;
2358
+ return Ut(n) && Ut(l) ? c = new t(function(d) {
2359
+ return e(d) ? n.request(d) || E.of() : l.request(d) || E.of();
2360
+ }) : c = new t(function(d, i) {
2361
+ return e(d) ? n.request(d, i) || E.of() : l.request(d, i) || E.of();
2362
+ }), Object.assign(c, { left: n, right: l });
2391
2363
  }, t.execute = function(e, r) {
2392
- return e.request(Wr(r.context, Gr(Jr(r)))) || N.of();
2364
+ return e.request(Jr(r.context, Wr(Kr(r)))) || E.of();
2393
2365
  }, t.concat = function(e, r) {
2394
- var o = Et(e);
2366
+ var o = Nt(e);
2395
2367
  if (Ut(o))
2396
2368
  return globalThis.__DEV__ !== !1 && Zt.warn(47, o), o;
2397
- var n = Et(r), s;
2398
- return Ut(n) ? s = new t(function(l) {
2399
- return o.request(l, function(d) {
2400
- return n.request(d) || N.of();
2401
- }) || N.of();
2402
- }) : s = new t(function(l, d) {
2403
- return o.request(l, function(i) {
2404
- return n.request(i, d) || N.of();
2405
- }) || N.of();
2406
- }), Object.assign(s, { left: o, right: n });
2369
+ var n = Nt(r), l;
2370
+ return Ut(n) ? l = new t(function(c) {
2371
+ return o.request(c, function(d) {
2372
+ return n.request(d) || E.of();
2373
+ }) || E.of();
2374
+ }) : l = new t(function(c, d) {
2375
+ return o.request(c, function(i) {
2376
+ return n.request(i, d) || E.of();
2377
+ }) || E.of();
2378
+ }), Object.assign(l, { left: o, right: n });
2407
2379
  }, t.prototype.split = function(e, r, o) {
2408
- return this.concat(t.split(e, r, o || new t(je)));
2380
+ return this.concat(t.split(e, r, o || new t(ze)));
2409
2381
  }, t.prototype.concat = function(e) {
2410
2382
  return t.concat(this, e);
2411
2383
  }, t.prototype.request = function(e, r) {
2412
- throw We(48);
2384
+ throw Ke(48);
2413
2385
  }, t.prototype.onError = function(e, r) {
2414
- if (globalThis.__DEV__ !== !1 && eo("onError", function() {
2386
+ if (globalThis.__DEV__ !== !1 && to("onError", function() {
2415
2387
  globalThis.__DEV__ !== !1 && Zt.warn(49);
2416
2388
  }), r && r.error)
2417
2389
  return r.error(e), !1;
@@ -2421,29 +2393,29 @@ var tr = (
2421
2393
  }, t;
2422
2394
  })()
2423
2395
  );
2424
- function ro(t) {
2425
- return new tr(function(e, r) {
2426
- var o = Or(e, []);
2427
- return new N(function(n) {
2428
- var s, l = !1;
2396
+ function eo(t) {
2397
+ return new Qe(function(e, r) {
2398
+ var o = Tr(e, []);
2399
+ return new E(function(n) {
2400
+ var l, c = !1;
2429
2401
  return Promise.resolve(o).then(function(d) {
2430
2402
  return t(d, e.getContext());
2431
2403
  }).then(e.setContext).then(function() {
2432
- l || (s = r(e).subscribe({
2404
+ c || (l = r(e).subscribe({
2433
2405
  next: n.next.bind(n),
2434
2406
  error: n.error.bind(n),
2435
2407
  complete: n.complete.bind(n)
2436
2408
  }));
2437
2409
  }).catch(n.error.bind(n)), function() {
2438
- l = !0, s && s.unsubscribe();
2410
+ c = !0, l && l.unsubscribe();
2439
2411
  };
2440
2412
  });
2441
2413
  });
2442
2414
  }
2443
- const oo = async () => {
2415
+ const ro = async () => {
2444
2416
  const t = "https://auth.australia-southeast1.gcp.commercetools.com/oauth/token", o = "Basic " + btoa(encodeURIComponent("tfegsSBVOYnR7e_yE-AjxVVN") + ":" + encodeURIComponent("pyKWgHuTxuMwDygh9JH1ehLEaLvAhBo4"));
2445
2417
  try {
2446
- const n = await E.post(
2418
+ const n = await T.post(
2447
2419
  t,
2448
2420
  new URLSearchParams({ grant_type: "client_credentials" }),
2449
2421
  // Only grant_type in body
@@ -2456,32 +2428,32 @@ const oo = async () => {
2456
2428
  );
2457
2429
  return n.status === 200 && n.data.access_token ? n.data.access_token : (console.error("Failed to fetch token:", n.data), null);
2458
2430
  } catch (n) {
2459
- return E.isAxiosError(n) ? console.error("Error fetching token:", n.response || n.message) : console.error("Unexpected error:", n), null;
2431
+ return T.isAxiosError(n) ? console.error("Error fetching token:", n.response || n.message) : console.error("Unexpected error:", n), null;
2460
2432
  }
2461
- }, no = "https://api.australia-southeast1.gcp.commercetools.com/kt-demo/graphql", ao = ir({
2462
- uri: `${no}`
2463
- }), io = ro(async (t, { headers: e }) => {
2464
- const r = await oo();
2433
+ }, oo = "https://api.australia-southeast1.gcp.commercetools.com/kt-demo/graphql", no = ar({
2434
+ uri: `${oo}`
2435
+ }), ao = eo(async (t, { headers: e }) => {
2436
+ const r = await ro();
2465
2437
  return {
2466
2438
  headers: {
2467
2439
  ...e,
2468
2440
  authorization: `Bearer ${r}`
2469
2441
  }
2470
2442
  };
2471
- }), so = new sr({
2472
- link: io.concat(ao),
2473
- cache: new lr(),
2443
+ }), io = new ir({
2444
+ link: ao.concat(no),
2445
+ cache: new sr(),
2474
2446
  defaultOptions: {
2475
2447
  watchQuery: {
2476
2448
  fetchPolicy: "cache-and-network"
2477
2449
  }
2478
2450
  }
2479
- }), _o = (t) => {
2451
+ }), Co = (t) => {
2480
2452
  const { tanyaConfig: e } = t;
2481
- return /* @__PURE__ */ a(cr, { client: so, children: /* @__PURE__ */ a(br, { children: /* @__PURE__ */ a(Er, { tanyaConfig: e }) }) });
2453
+ return /* @__PURE__ */ a(lr, { client: io, children: /* @__PURE__ */ a(gr, { children: /* @__PURE__ */ a(Nr, { tanyaConfig: e }) }) });
2482
2454
  };
2483
2455
  export {
2484
- _o as TanyaChatbot,
2485
- yo as TanyaChatbotProvider
2456
+ Co as TanyaChatbot,
2457
+ bo as TanyaChatbotProvider
2486
2458
  };
2487
2459
  //# sourceMappingURL=tanya-chatbot.es.js.map