tanya-chatbot 0.4.8 → 0.4.9

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