tanya-chatbot 0.5.2 → 0.5.4

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