tanya-chatbot 0.5.0 → 0.5.1

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