tanya-chatbot 0.0.12 → 0.0.13

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,16 +1,16 @@
1
- import { jsx as l, jsxs as p, Fragment as dt } from "react/jsx-runtime";
2
- import { createHttpLink as Zn, ApolloClient as Xn, InMemoryCache as er, ApolloProvider as tr } from "@apollo/client";
3
- import { Provider as nr, useDispatch as mn, useSelector as Ge } from "react-redux";
4
- import { createSlice as gn, configureStore as rr } from "@reduxjs/toolkit";
5
- import { forwardRef as yn, useState as M, useEffect as ge, createElement as pt, useRef as Oe } from "react";
6
- import * as bn from "@radix-ui/react-popover";
1
+ import { jsx as l, jsxs as p, Fragment as fe } from "react/jsx-runtime";
2
+ import { createHttpLink as Xr, ApolloClient as Zr, InMemoryCache as tn, ApolloProvider as en } from "@apollo/client";
3
+ import { Provider as rn, useDispatch as hr, useSelector as Kt } from "react-redux";
4
+ import { createSlice as mr, configureStore as nn } from "@reduxjs/toolkit";
5
+ import { forwardRef as gr, useState as D, useEffect as gt, createElement as pe, useRef as Ot } from "react";
6
+ import * as wr from "@radix-ui/react-popover";
7
7
  import "clsx";
8
8
  import "tailwind-merge";
9
- import q from "axios";
9
+ import U from "axios";
10
10
  import "crypto-js";
11
- import { Icon as Lt } from "@iconify/react";
12
- import { toast as Z } from "react-toastify";
13
- const or = {
11
+ import { Icon as Le } from "@iconify/react";
12
+ import { toast as X } from "react-toastify";
13
+ const on = '*,: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-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-\\[1px\\]{padding:1px}.p-\\[5px\\]{padding:5px}.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;background-color:#1a1a1a;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}}', an = {
14
14
  store: {
15
15
  storeCode: "",
16
16
  storeName: "",
@@ -44,123 +44,123 @@ const or = {
44
44
  mobile: []
45
45
  }
46
46
  }
47
- }, wn = gn({
47
+ }, yr = mr({
48
48
  name: "store",
49
- initialState: or,
49
+ initialState: an,
50
50
  reducers: {
51
- setStore: (e, t) => {
52
- e.store = t.payload;
51
+ setStore: (t, e) => {
52
+ t.store = e.payload;
53
53
  }
54
54
  }
55
- }), { setStore: ds } = wn.actions, sr = wn.reducer, ir = {
55
+ }), { setStore: ha } = yr.actions, sn = yr.reducer, cn = {
56
56
  product: null
57
- }, xn = gn({
57
+ }, br = mr({
58
58
  name: "product",
59
- initialState: ir,
59
+ initialState: cn,
60
60
  reducers: {
61
- setProduct: (e, t) => {
62
- e.product = t.payload;
61
+ setProduct: (t, e) => {
62
+ t.product = e.payload;
63
63
  }
64
64
  }
65
- }), { setProduct: ht } = xn.actions, ar = xn.reducer, cr = rr({
65
+ }), { setProduct: he } = br.actions, ln = br.reducer, un = nn({
66
66
  reducer: {
67
- store: sr,
68
- product: ar
67
+ store: sn,
68
+ product: ln
69
69
  }
70
- }), lr = ({ children: e }) => /* @__PURE__ */ l(nr, { store: cr, children: e }), Ne = (e) => {
71
- const t = new CustomEvent("reactCartUpdated", {
70
+ }), dn = ({ children: t }) => /* @__PURE__ */ l(rn, { store: un, children: t }), Ft = (t) => {
71
+ const e = new CustomEvent("reactCartUpdated", {
72
72
  detail: {
73
73
  cartUpdated: !0,
74
- basketId: e
74
+ basketId: t
75
75
  // any other data SFCC needs
76
76
  }
77
77
  });
78
- window.dispatchEvent(t);
78
+ window.dispatchEvent(e);
79
79
  };
80
- function ur({
81
- ...e
80
+ function fn({
81
+ ...t
82
82
  }) {
83
- return /* @__PURE__ */ l(bn.Root, { "data-slot": "popover", ...e });
83
+ return /* @__PURE__ */ l(wr.Root, { "data-slot": "popover", ...t });
84
84
  }
85
- function fr({
86
- ...e
85
+ function pn({
86
+ ...t
87
87
  }) {
88
- return /* @__PURE__ */ l(bn.Trigger, { "data-slot": "popover-trigger", ...e });
88
+ return /* @__PURE__ */ l(wr.Trigger, { "data-slot": "popover-trigger", ...t });
89
89
  }
90
- const ye = () => ({ 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" }), vn = async () => {
91
- const e = "https://tanya-sfcc-server.vercel.app/";
90
+ const wt = () => ({ 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" }), xr = async () => {
91
+ const t = "https://tanya-sfcc-server.vercel.app/";
92
92
  try {
93
- const t = await q.post(
94
- `${e}api/auth/token-bm-grant?baseUrl=${ce()}&siteId=${ne()}`
93
+ const e = await U.post(
94
+ `${t}api/auth/token-bm-grant?baseUrl=${ct()}&siteId=${rt()}`
95
95
  );
96
- return t.status === 200 && t.data.access_token ? t.data.access_token : (console.error("Failed to fetch token:", t.data), null);
97
- } catch (t) {
98
- return q.isAxiosError(t) ? console.error("Error fetching token:", t.response || t.message) : console.error("Unexpected error:", t), null;
96
+ return e.status === 200 && e.data.access_token ? e.data.access_token : (console.error("Failed to fetch token:", e.data), null);
97
+ } catch (e) {
98
+ return U.isAxiosError(e) ? console.error("Error fetching token:", e.response || e.message) : console.error("Unexpected error:", e), null;
99
99
  }
100
- }, Sn = async (e) => {
101
- const t = "https://tanya-sfcc-server.vercel.app/";
100
+ }, vr = async (t) => {
101
+ const e = "https://tanya-sfcc-server.vercel.app/";
102
102
  try {
103
- const n = JSON.parse(sessionStorage.getItem("customerData") || "{}").dwsid, r = await q.post(
104
- `${t}api/auth/token-existing-guest-customer?dwsid=${n}&baseUrl=${ce()}&siteId=${ne()}&pubCfg=${le()}&envRef=${ue()}&orgRef=${fe()}`,
103
+ const r = JSON.parse(sessionStorage.getItem("customerData") || "{}").dwsid, n = await U.post(
104
+ `${e}api/auth/token-existing-guest-customer?dwsid=${r}&baseUrl=${ct()}&siteId=${rt()}&pubCfg=${lt()}&envRef=${ut()}&orgRef=${dt()}`,
105
105
  {},
106
106
  {
107
107
  headers: {
108
108
  "Content-Type": "application/json",
109
- Authorization: `Bearer ${e}`
109
+ Authorization: `Bearer ${t}`
110
110
  }
111
111
  }
112
112
  );
113
- return r.status === 200 && r.data ? r.data : null;
114
- } catch (n) {
115
- return q.isAxiosError(n) ? console.error("Error creating basket:", n.response || n.message) : console.error("Unexpected error:", n), null;
113
+ return n.status === 200 && n.data ? n.data : null;
114
+ } catch (r) {
115
+ return U.isAxiosError(r) ? console.error("Error creating basket:", r.response || r.message) : console.error("Unexpected error:", r), null;
116
116
  }
117
117
  };
118
- async function Xe() {
119
- const e = localStorage.getItem("expires_in"), t = localStorage.getItem("access_token"), n = JSON.parse(
118
+ async function Zt() {
119
+ const t = localStorage.getItem("expires_in"), e = localStorage.getItem("access_token"), r = JSON.parse(
120
120
  sessionStorage.getItem("customerData") || "{}"
121
121
  ).isGuest;
122
- if (e && t && (/* @__PURE__ */ new Date()).getTime() < parseInt(e) && n === JSON.parse(localStorage.getItem("isGuest") || "false"))
123
- return console.log("access token found in local storage"), { access_token: t, expires_in: e };
124
- const { serverUrl: r } = ye(), o = JSON.parse(
122
+ if (t && e && (/* @__PURE__ */ new Date()).getTime() < parseInt(t) && r === JSON.parse(localStorage.getItem("isGuest") || "false"))
123
+ return console.log("access token found in local storage"), { access_token: e, expires_in: t };
124
+ const { serverUrl: n } = wt(), o = JSON.parse(
125
125
  sessionStorage.getItem("customerData") || "{}"
126
- ).dwsid, s = JSON.parse(
126
+ ).dwsid, a = JSON.parse(
127
127
  sessionStorage.getItem("customerData") || "{}"
128
128
  ).usrRef;
129
129
  try {
130
- const i = n ? "unregister-auth" : "register-auth", c = await q.get(
131
- `${r}sc-api/${i}?dwsid=${o}&email=${s}&pubCfg=${le()}&envRef=${ue()}&orgRef=${fe()}&siteId=${ne()}`
130
+ const i = r ? "unregister-auth" : "register-auth", c = await U.get(
131
+ `${n}sc-api/${i}?dwsid=${o}&email=${a}&pubCfg=${lt()}&envRef=${ut()}&orgRef=${dt()}&siteId=${rt()}`
132
132
  );
133
133
  return localStorage.setItem("access_token", c.data.access_token), localStorage.setItem(
134
134
  "expires_in",
135
135
  String((/* @__PURE__ */ new Date()).getTime() + c.data.expires_in * 1e3)
136
- ), localStorage.setItem("isGuest", n.toString()), console.log(c.data), c.data;
136
+ ), localStorage.setItem("isGuest", r.toString()), console.log(c.data), c.data;
137
137
  } catch (i) {
138
138
  console.log(i);
139
139
  }
140
140
  }
141
- const ce = () => sessionStorage.getItem("Host"), ne = () => sessionStorage.getItem("SiteId"), le = () => sessionStorage.getItem("pubCfg"), ue = () => sessionStorage.getItem("envRef"), fe = () => sessionStorage.getItem("orgRef"), Dt = async (e, t) => {
142
- const { serverUrl: n, basePath: r } = ye();
141
+ const ct = () => sessionStorage.getItem("Host"), rt = () => sessionStorage.getItem("SiteId"), lt = () => sessionStorage.getItem("pubCfg"), ut = () => sessionStorage.getItem("envRef"), dt = () => sessionStorage.getItem("orgRef"), ze = async (t, e) => {
142
+ const { serverUrl: r, basePath: n } = wt();
143
143
  try {
144
- const o = ce();
145
- return (await q.get(
146
- `${n}${r}/search-sfcc?baseUrl=${o}&query=${e}&siteId=${ne()}&pubCfg=${le()}&envRef=${ue()}&orgRef=${fe()}`,
144
+ const o = ct();
145
+ return (await U.get(
146
+ `${r}${n}/search-sfcc?baseUrl=${o}&query=${t}&siteId=${rt()}&pubCfg=${lt()}&envRef=${ut()}&orgRef=${dt()}`,
147
147
  {
148
148
  headers: {
149
149
  "Content-Type": "application/json",
150
- Authorization: `Bearer ${t}`
150
+ Authorization: `Bearer ${e}`
151
151
  }
152
152
  }
153
153
  )).data.hits;
154
154
  } catch (o) {
155
155
  throw console.error("Error fetching search results:", o), o;
156
156
  }
157
- }, kn = async (e) => {
158
- if (!e) throw new Error("Product ID is required");
159
- const { serverUrl: t, basePath: n } = ye(), r = ce();
157
+ }, kr = async (t) => {
158
+ if (!t) throw new Error("Product ID is required");
159
+ const { serverUrl: e, basePath: r } = wt(), n = ct();
160
160
  console.log("calling access");
161
- const { access_token: o } = await Xe();
162
- return console.log(o), (await q.get(
163
- `${t}${n}/product-sfcc/${e}?baseUrl=${r}&siteId=${ne()}&pubCfg=${le()}&envRef=${ue()}&orgRef=${fe()}`,
161
+ const { access_token: o } = await Zt();
162
+ return console.log(o), (await U.get(
163
+ `${e}${r}/product-sfcc/${t}?baseUrl=${n}&siteId=${rt()}&pubCfg=${lt()}&envRef=${ut()}&orgRef=${dt()}`,
164
164
  {
165
165
  headers: {
166
166
  "Content-Type": "application/json",
@@ -168,13 +168,13 @@ const ce = () => sessionStorage.getItem("Host"), ne = () => sessionStorage.getIt
168
168
  }
169
169
  }
170
170
  )).data;
171
- }, dr = async (e) => {
172
- if (!e) throw new Error("customerId is required");
173
- const t = await vn(), { customer_token: n } = await Sn(
174
- t
175
- ), { serverUrl: r, basePath: o } = ye(), i = (await Xe()).access_token;
176
- return (await q.get(
177
- `${r}${o}/get-interest?baseUrl=${ce()}&customerId=${e}&siteId=${ne()}&pubCfg=${le()}&envRef=${ue()}&orgRef=${fe()}`,
171
+ }, hn = async (t) => {
172
+ if (!t) throw new Error("customerId is required");
173
+ const e = await xr(), { customer_token: r } = await vr(
174
+ e
175
+ ), { serverUrl: n, basePath: o } = wt(), i = (await Zt()).access_token;
176
+ return (await U.get(
177
+ `${n}${o}/get-interest?baseUrl=${ct()}&customerId=${t}&siteId=${rt()}&pubCfg=${lt()}&envRef=${ut()}&orgRef=${dt()}`,
178
178
  {
179
179
  headers: {
180
180
  "Content-Type": "application/json",
@@ -182,527 +182,527 @@ const ce = () => sessionStorage.getItem("Host"), ne = () => sessionStorage.getIt
182
182
  }
183
183
  }
184
184
  )).data;
185
- }, Mt = (e) => String(typeof e == "string" ? e : e["en-US"] || e), Ut = (e) => e != null && e.image ? [e.image] : "variants" in e ? e.variants[0].images : e.masterVariant.images.map((t) => t.url), pr = (e, t) => e.toLocaleString("en-US", {
185
+ }, De = (t) => String(typeof t == "string" ? t : t["en-US"] || t), Me = (t) => t != null && t.image ? [t.image] : "variants" in t ? t.variants[0].images : t.masterVariant.images.map((e) => e.url), mn = (t, e) => t.toLocaleString("en-US", {
186
186
  style: "currency",
187
- currency: t || "USD"
188
- }), qt = (e) => {
189
- var t, n, r;
190
- return "variants" in e ? {
191
- centAmount: (t = e.variants[0]) == null ? void 0 : t.prices.EUR.max,
187
+ currency: e || "USD"
188
+ }), Ue = (t) => {
189
+ var e, r, n;
190
+ return "variants" in t ? {
191
+ centAmount: (e = t.variants[0]) == null ? void 0 : e.prices.EUR.max,
192
192
  currencyCode: "DOL"
193
193
  } : {
194
- centAmount: (n = e.masterVariant) == null ? void 0 : n.prices[0].value.centAmount,
195
- currencyCode: (r = e.masterVariant) == null ? void 0 : r.prices[0].value.currencyCode
194
+ centAmount: (r = t.masterVariant) == null ? void 0 : r.prices[0].value.centAmount,
195
+ currencyCode: (n = t.masterVariant) == null ? void 0 : n.prices[0].value.currencyCode
196
196
  };
197
- }, hr = (e) => e.charAt(0).toUpperCase() + e.slice(1), Bt = (e, t) => e.length < t ? e : e.slice(0, t) + "...", st = (e) => e.split("\\n").map((t, n) => {
198
- const r = t.match(/^(\d+)\.\s(.+)/);
199
- return r ? `<p key=${n} class="mb-2"><strong>${r[1]}.</strong> ${r[2]}</p>` : t.trim() ? `<p key=${n} class="mb-2">${t}</p>` : "<br/>";
197
+ }, gn = (t) => t.charAt(0).toUpperCase() + t.slice(1), Be = (t, e) => t.length < e ? t : t.slice(0, e) + "...", ae = (t) => t.split("\\n").map((e, r) => {
198
+ const n = e.match(/^(\d+)\.\s(.+)/);
199
+ return n ? `<p key=${r} class="mb-2"><strong>${n[1]}.</strong> ${n[2]}</p>` : e.trim() ? `<p key=${r} class="mb-2">${e}</p>` : "<br/>";
200
200
  }).join("");
201
- function mr(e, t) {
202
- const n = e.icons, r = e.aliases || /* @__PURE__ */ Object.create(null), o = /* @__PURE__ */ Object.create(null);
203
- function s(i) {
204
- if (n[i]) return o[i] = [];
201
+ function wn(t, e) {
202
+ const r = t.icons, n = t.aliases || /* @__PURE__ */ Object.create(null), o = /* @__PURE__ */ Object.create(null);
203
+ function a(i) {
204
+ if (r[i]) return o[i] = [];
205
205
  if (!(i in o)) {
206
206
  o[i] = null;
207
- const c = r[i] && r[i].parent, a = c && s(c);
208
- a && (o[i] = [c].concat(a));
207
+ const c = n[i] && n[i].parent, s = c && a(c);
208
+ s && (o[i] = [c].concat(s));
209
209
  }
210
210
  return o[i];
211
211
  }
212
- return Object.keys(n).concat(Object.keys(r)).forEach(s), o;
212
+ return Object.keys(r).concat(Object.keys(n)).forEach(a), o;
213
213
  }
214
- const In = Object.freeze({
214
+ const Sr = Object.freeze({
215
215
  left: 0,
216
216
  top: 0,
217
217
  width: 16,
218
218
  height: 16
219
- }), We = Object.freeze({
219
+ }), Gt = Object.freeze({
220
220
  rotate: 0,
221
221
  vFlip: !1,
222
222
  hFlip: !1
223
- }), kt = Object.freeze({
224
- ...In,
225
- ...We
226
- }), mt = Object.freeze({
227
- ...kt,
223
+ }), Se = Object.freeze({
224
+ ...Sr,
225
+ ...Gt
226
+ }), me = Object.freeze({
227
+ ...Se,
228
228
  body: "",
229
229
  hidden: !1
230
230
  });
231
- function gr(e, t) {
232
- const n = {};
233
- !e.hFlip != !t.hFlip && (n.hFlip = !0), !e.vFlip != !t.vFlip && (n.vFlip = !0);
234
- const r = ((e.rotate || 0) + (t.rotate || 0)) % 4;
235
- return r && (n.rotate = r), n;
236
- }
237
- function Ht(e, t) {
238
- const n = gr(e, t);
239
- for (const r in mt) r in We ? r in e && !(r in n) && (n[r] = We[r]) : r in t ? n[r] = t[r] : r in e && (n[r] = e[r]);
240
- return n;
231
+ function yn(t, e) {
232
+ const r = {};
233
+ !t.hFlip != !e.hFlip && (r.hFlip = !0), !t.vFlip != !e.vFlip && (r.vFlip = !0);
234
+ const n = ((t.rotate || 0) + (e.rotate || 0)) % 4;
235
+ return n && (r.rotate = n), r;
236
+ }
237
+ function qe(t, e) {
238
+ const r = yn(t, e);
239
+ for (const n in me) n in Gt ? n in t && !(n in r) && (r[n] = Gt[n]) : n in e ? r[n] = e[n] : n in t && (r[n] = t[n]);
240
+ return r;
241
241
  }
242
- function yr(e, t, n) {
243
- const r = e.icons, o = e.aliases || /* @__PURE__ */ Object.create(null);
244
- let s = {};
242
+ function bn(t, e, r) {
243
+ const n = t.icons, o = t.aliases || /* @__PURE__ */ Object.create(null);
244
+ let a = {};
245
245
  function i(c) {
246
- s = Ht(r[c] || o[c], s);
246
+ a = qe(n[c] || o[c], a);
247
247
  }
248
- return i(t), n.forEach(i), Ht(e, s);
248
+ return i(e), r.forEach(i), qe(t, a);
249
249
  }
250
- function Cn(e, t) {
251
- const n = [];
252
- if (typeof e != "object" || typeof e.icons != "object") return n;
253
- e.not_found instanceof Array && e.not_found.forEach((o) => {
254
- t(o, null), n.push(o);
250
+ function Cr(t, e) {
251
+ const r = [];
252
+ if (typeof t != "object" || typeof t.icons != "object") return r;
253
+ t.not_found instanceof Array && t.not_found.forEach((o) => {
254
+ e(o, null), r.push(o);
255
255
  });
256
- const r = mr(e);
257
- for (const o in r) {
258
- const s = r[o];
259
- s && (t(o, yr(e, o, s)), n.push(o));
256
+ const n = wn(t);
257
+ for (const o in n) {
258
+ const a = n[o];
259
+ a && (e(o, bn(t, o, a)), r.push(o));
260
260
  }
261
- return n;
261
+ return r;
262
262
  }
263
- const br = {
263
+ const xn = {
264
264
  provider: "",
265
265
  aliases: {},
266
266
  not_found: {},
267
- ...In
267
+ ...Sr
268
268
  };
269
- function it(e, t) {
270
- for (const n in t) if (n in e && typeof e[n] != typeof t[n]) return !1;
269
+ function ie(t, e) {
270
+ for (const r in e) if (r in t && typeof t[r] != typeof e[r]) return !1;
271
271
  return !0;
272
272
  }
273
- function _n(e) {
274
- if (typeof e != "object" || e === null) return null;
275
- const t = e;
276
- if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !it(e, br)) return null;
277
- const n = t.icons;
278
- for (const o in n) {
279
- const s = n[o];
280
- if (!o || typeof s.body != "string" || !it(s, mt)) return null;
281
- }
282
- const r = t.aliases || /* @__PURE__ */ Object.create(null);
273
+ function Ir(t) {
274
+ if (typeof t != "object" || t === null) return null;
275
+ const e = t;
276
+ if (typeof e.prefix != "string" || !t.icons || typeof t.icons != "object" || !ie(t, xn)) return null;
277
+ const r = e.icons;
283
278
  for (const o in r) {
284
- const s = r[o], i = s.parent;
285
- if (!o || typeof i != "string" || !n[i] && !r[i] || !it(s, mt)) return null;
279
+ const a = r[o];
280
+ if (!o || typeof a.body != "string" || !ie(a, me)) return null;
286
281
  }
287
- return t;
282
+ const n = e.aliases || /* @__PURE__ */ Object.create(null);
283
+ for (const o in n) {
284
+ const a = n[o], i = a.parent;
285
+ if (!o || typeof i != "string" || !r[i] && !n[i] || !ie(a, me)) return null;
286
+ }
287
+ return e;
288
288
  }
289
- const Rt = /* @__PURE__ */ Object.create(null);
290
- function wr(e, t) {
289
+ const Re = /* @__PURE__ */ Object.create(null);
290
+ function vn(t, e) {
291
291
  return {
292
- provider: e,
293
- prefix: t,
292
+ provider: t,
293
+ prefix: e,
294
294
  icons: /* @__PURE__ */ Object.create(null),
295
295
  missing: /* @__PURE__ */ new Set()
296
296
  };
297
297
  }
298
- function Te(e, t) {
299
- const n = Rt[e] || (Rt[e] = /* @__PURE__ */ Object.create(null));
300
- return n[t] || (n[t] = wr(e, t));
298
+ function Et(t, e) {
299
+ const r = Re[t] || (Re[t] = /* @__PURE__ */ Object.create(null));
300
+ return r[e] || (r[e] = vn(t, e));
301
301
  }
302
- function Nn(e, t) {
303
- return _n(t) ? Cn(t, (n, r) => {
304
- r ? e.icons[n] = r : e.missing.add(n);
302
+ function _r(t, e) {
303
+ return Ir(e) ? Cr(e, (r, n) => {
304
+ n ? t.icons[r] = n : t.missing.add(r);
305
305
  }) : [];
306
306
  }
307
- function xr(e, t, n) {
307
+ function kn(t, e, r) {
308
308
  try {
309
- if (typeof n.body == "string")
310
- return e.icons[t] = { ...n }, !0;
309
+ if (typeof r.body == "string")
310
+ return t.icons[e] = { ...r }, !0;
311
311
  } catch {
312
312
  }
313
313
  return !1;
314
314
  }
315
- const Fn = /^[a-z0-9]+(-[a-z0-9]+)*$/, et = (e, t, n, r = "") => {
316
- const o = e.split(":");
317
- if (e.slice(0, 1) === "@") {
315
+ const Fr = /^[a-z0-9]+(-[a-z0-9]+)*$/, te = (t, e, r, n = "") => {
316
+ const o = t.split(":");
317
+ if (t.slice(0, 1) === "@") {
318
318
  if (o.length < 2 || o.length > 3) return null;
319
- r = o.shift().slice(1);
319
+ n = o.shift().slice(1);
320
320
  }
321
321
  if (o.length > 3 || !o.length) return null;
322
322
  if (o.length > 1) {
323
- const c = o.pop(), a = o.pop(), u = {
324
- provider: o.length > 0 ? o[0] : r,
325
- prefix: a,
323
+ const c = o.pop(), s = o.pop(), u = {
324
+ provider: o.length > 0 ? o[0] : n,
325
+ prefix: s,
326
326
  name: c
327
327
  };
328
- return t && !Ve(u) ? null : u;
328
+ return e && !Vt(u) ? null : u;
329
329
  }
330
- const s = o[0], i = s.split("-");
330
+ const a = o[0], i = a.split("-");
331
331
  if (i.length > 1) {
332
332
  const c = {
333
- provider: r,
333
+ provider: n,
334
334
  prefix: i.shift(),
335
335
  name: i.join("-")
336
336
  };
337
- return t && !Ve(c) ? null : c;
337
+ return e && !Vt(c) ? null : c;
338
338
  }
339
- if (n && r === "") {
339
+ if (r && n === "") {
340
340
  const c = {
341
- provider: r,
341
+ provider: n,
342
342
  prefix: "",
343
- name: s
343
+ name: a
344
344
  };
345
- return t && !Ve(c, n) ? null : c;
345
+ return e && !Vt(c, r) ? null : c;
346
346
  }
347
347
  return null;
348
- }, Ve = (e, t) => e ? !!((t && e.prefix === "" || e.prefix) && e.name) : !1;
349
- let Ue = !1;
350
- function Tn(e) {
351
- return typeof e == "boolean" && (Ue = e), Ue;
348
+ }, Vt = (t, e) => t ? !!((e && t.prefix === "" || t.prefix) && t.name) : !1;
349
+ let Mt = !1;
350
+ function Nr(t) {
351
+ return typeof t == "boolean" && (Mt = t), Mt;
352
352
  }
353
- function zt(e) {
354
- const t = typeof e == "string" ? et(e, !0, Ue) : e;
355
- if (t) {
356
- const n = Te(t.provider, t.prefix), r = t.name;
357
- return n.icons[r] || (n.missing.has(r) ? null : void 0);
353
+ function He(t) {
354
+ const e = typeof t == "string" ? te(t, !0, Mt) : t;
355
+ if (e) {
356
+ const r = Et(e.provider, e.prefix), n = e.name;
357
+ return r.icons[n] || (r.missing.has(n) ? null : void 0);
358
358
  }
359
359
  }
360
- function vr(e, t) {
361
- const n = et(e, !0, Ue);
362
- if (!n) return !1;
363
- const r = Te(n.provider, n.prefix);
364
- return t ? xr(r, n.name, t) : (r.missing.add(n.name), !0);
360
+ function Sn(t, e) {
361
+ const r = te(t, !0, Mt);
362
+ if (!r) return !1;
363
+ const n = Et(r.provider, r.prefix);
364
+ return e ? kn(n, r.name, e) : (n.missing.add(r.name), !0);
365
365
  }
366
- function Sr(e, t) {
367
- if (typeof e != "object") return !1;
368
- if (typeof t != "string" && (t = e.provider || ""), Ue && !t && !e.prefix) {
366
+ function Cn(t, e) {
367
+ if (typeof t != "object") return !1;
368
+ if (typeof e != "string" && (e = t.provider || ""), Mt && !e && !t.prefix) {
369
369
  let o = !1;
370
- return _n(e) && (e.prefix = "", Cn(e, (s, i) => {
371
- vr(s, i) && (o = !0);
370
+ return Ir(t) && (t.prefix = "", Cr(t, (a, i) => {
371
+ Sn(a, i) && (o = !0);
372
372
  })), o;
373
373
  }
374
- const n = e.prefix;
375
- if (!Ve({
376
- prefix: n,
374
+ const r = t.prefix;
375
+ if (!Vt({
376
+ prefix: r,
377
377
  name: "a"
378
378
  })) return !1;
379
- const r = Te(t, n);
380
- return !!Nn(r, e);
379
+ const n = Et(e, r);
380
+ return !!_r(n, t);
381
381
  }
382
- const En = Object.freeze({
382
+ const Er = Object.freeze({
383
383
  width: null,
384
384
  height: null
385
- }), Pn = Object.freeze({
386
- ...En,
387
- ...We
388
- }), kr = /(-?[0-9.]*[0-9]+[0-9.]*)/g, Ir = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
389
- function Vt(e, t, n) {
390
- if (t === 1) return e;
391
- if (n = n || 100, typeof e == "number") return Math.ceil(e * t * n) / n;
392
- if (typeof e != "string") return e;
393
- const r = e.split(kr);
394
- if (r === null || !r.length) return e;
385
+ }), Tr = Object.freeze({
386
+ ...Er,
387
+ ...Gt
388
+ }), In = /(-?[0-9.]*[0-9]+[0-9.]*)/g, _n = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
389
+ function Ve(t, e, r) {
390
+ if (e === 1) return t;
391
+ if (r = r || 100, typeof t == "number") return Math.ceil(t * e * r) / r;
392
+ if (typeof t != "string") return t;
393
+ const n = t.split(In);
394
+ if (n === null || !n.length) return t;
395
395
  const o = [];
396
- let s = r.shift(), i = Ir.test(s);
396
+ let a = n.shift(), i = _n.test(a);
397
397
  for (; ; ) {
398
398
  if (i) {
399
- const c = parseFloat(s);
400
- isNaN(c) ? o.push(s) : o.push(Math.ceil(c * t * n) / n);
401
- } else o.push(s);
402
- if (s = r.shift(), s === void 0) return o.join("");
399
+ const c = parseFloat(a);
400
+ isNaN(c) ? o.push(a) : o.push(Math.ceil(c * e * r) / r);
401
+ } else o.push(a);
402
+ if (a = n.shift(), a === void 0) return o.join("");
403
403
  i = !i;
404
404
  }
405
405
  }
406
- function Cr(e, t = "defs") {
407
- let n = "";
408
- const r = e.indexOf("<" + t);
409
- for (; r >= 0; ) {
410
- const o = e.indexOf(">", r), s = e.indexOf("</" + t);
411
- if (o === -1 || s === -1) break;
412
- const i = e.indexOf(">", s);
406
+ function Fn(t, e = "defs") {
407
+ let r = "";
408
+ const n = t.indexOf("<" + e);
409
+ for (; n >= 0; ) {
410
+ const o = t.indexOf(">", n), a = t.indexOf("</" + e);
411
+ if (o === -1 || a === -1) break;
412
+ const i = t.indexOf(">", a);
413
413
  if (i === -1) break;
414
- n += e.slice(o + 1, s).trim(), e = e.slice(0, r).trim() + e.slice(i + 1);
414
+ r += t.slice(o + 1, a).trim(), t = t.slice(0, n).trim() + t.slice(i + 1);
415
415
  }
416
416
  return {
417
- defs: n,
418
- content: e
417
+ defs: r,
418
+ content: t
419
419
  };
420
420
  }
421
- function _r(e, t) {
422
- return e ? "<defs>" + e + "</defs>" + t : t;
421
+ function Nn(t, e) {
422
+ return t ? "<defs>" + t + "</defs>" + e : e;
423
423
  }
424
- function Nr(e, t, n) {
425
- const r = Cr(e);
426
- return _r(r.defs, t + r.content + n);
424
+ function En(t, e, r) {
425
+ const n = Fn(t);
426
+ return Nn(n.defs, e + n.content + r);
427
427
  }
428
- const Fr = (e) => e === "unset" || e === "undefined" || e === "none";
429
- function Tr(e, t) {
430
- const n = {
431
- ...kt,
432
- ...e
433
- }, r = {
434
- ...Pn,
428
+ const Tn = (t) => t === "unset" || t === "undefined" || t === "none";
429
+ function Pn(t, e) {
430
+ const r = {
431
+ ...Se,
435
432
  ...t
433
+ }, n = {
434
+ ...Tr,
435
+ ...e
436
436
  }, o = {
437
- left: n.left,
438
- top: n.top,
439
- width: n.width,
440
- height: n.height
437
+ left: r.left,
438
+ top: r.top,
439
+ width: r.width,
440
+ height: r.height
441
441
  };
442
- let s = n.body;
443
- [n, r].forEach((_) => {
444
- const y = [], v = _.hFlip, B = _.vFlip;
442
+ let a = r.body;
443
+ [r, n].forEach((_) => {
444
+ const w = [], v = _.hFlip, B = _.vFlip;
445
445
  let P = _.rotate;
446
- v ? B ? P += 2 : (y.push("translate(" + (o.width + o.left).toString() + " " + (0 - o.top).toString() + ")"), y.push("scale(-1 1)"), o.top = o.left = 0) : B && (y.push("translate(" + (0 - o.left).toString() + " " + (o.height + o.top).toString() + ")"), y.push("scale(1 -1)"), o.top = o.left = 0);
447
- let j;
446
+ v ? B ? P += 2 : (w.push("translate(" + (o.width + o.left).toString() + " " + (0 - o.top).toString() + ")"), w.push("scale(-1 1)"), o.top = o.left = 0) : B && (w.push("translate(" + (0 - o.left).toString() + " " + (o.height + o.top).toString() + ")"), w.push("scale(1 -1)"), o.top = o.left = 0);
447
+ let $;
448
448
  switch (P < 0 && (P -= Math.floor(P / 4) * 4), P = P % 4, P) {
449
449
  case 1:
450
- j = o.height / 2 + o.top, y.unshift("rotate(90 " + j.toString() + " " + j.toString() + ")");
450
+ $ = o.height / 2 + o.top, w.unshift("rotate(90 " + $.toString() + " " + $.toString() + ")");
451
451
  break;
452
452
  case 2:
453
- y.unshift("rotate(180 " + (o.width / 2 + o.left).toString() + " " + (o.height / 2 + o.top).toString() + ")");
453
+ w.unshift("rotate(180 " + (o.width / 2 + o.left).toString() + " " + (o.height / 2 + o.top).toString() + ")");
454
454
  break;
455
455
  case 3:
456
- j = o.width / 2 + o.left, y.unshift("rotate(-90 " + j.toString() + " " + j.toString() + ")");
456
+ $ = o.width / 2 + o.left, w.unshift("rotate(-90 " + $.toString() + " " + $.toString() + ")");
457
457
  break;
458
458
  }
459
- P % 2 === 1 && (o.left !== o.top && (j = o.left, o.left = o.top, o.top = j), o.width !== o.height && (j = o.width, o.width = o.height, o.height = j)), y.length && (s = Nr(s, '<g transform="' + y.join(" ") + '">', "</g>"));
459
+ P % 2 === 1 && (o.left !== o.top && ($ = o.left, o.left = o.top, o.top = $), o.width !== o.height && ($ = o.width, o.width = o.height, o.height = $)), w.length && (a = En(a, '<g transform="' + w.join(" ") + '">', "</g>"));
460
460
  });
461
- const i = r.width, c = r.height, a = o.width, u = o.height;
462
- let d, h;
463
- i === null ? (h = c === null ? "1em" : c === "auto" ? u : c, d = Vt(h, a / u)) : (d = i === "auto" ? a : i, h = c === null ? Vt(d, u / a) : c === "auto" ? u : c);
464
- const m = {}, g = (_, y) => {
465
- Fr(y) || (m[_] = y.toString());
461
+ const i = n.width, c = n.height, s = o.width, u = o.height;
462
+ let f, h;
463
+ i === null ? (h = c === null ? "1em" : c === "auto" ? u : c, f = Ve(h, s / u)) : (f = i === "auto" ? s : i, h = c === null ? Ve(f, u / s) : c === "auto" ? u : c);
464
+ const m = {}, g = (_, w) => {
465
+ Tn(w) || (m[_] = w.toString());
466
466
  };
467
- g("width", d), g("height", h);
468
- const S = [
467
+ g("width", f), g("height", h);
468
+ const k = [
469
469
  o.left,
470
470
  o.top,
471
- a,
471
+ s,
472
472
  u
473
473
  ];
474
- return m.viewBox = S.join(" "), {
474
+ return m.viewBox = k.join(" "), {
475
475
  attributes: m,
476
- viewBox: S,
477
- body: s
476
+ viewBox: k,
477
+ body: a
478
478
  };
479
479
  }
480
- const Er = /\sid="(\S+)"/g, Pr = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
481
- let Or = 0;
482
- function $r(e, t = Pr) {
483
- const n = [];
484
- let r;
485
- for (; r = Er.exec(e); ) n.push(r[1]);
486
- if (!n.length) return e;
480
+ const On = /\sid="(\S+)"/g, jn = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
481
+ let $n = 0;
482
+ function An(t, e = jn) {
483
+ const r = [];
484
+ let n;
485
+ for (; n = On.exec(t); ) r.push(n[1]);
486
+ if (!r.length) return t;
487
487
  const o = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
488
- return n.forEach((s) => {
489
- const i = typeof t == "function" ? t(s) : t + (Or++).toString(), c = s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
490
- e = e.replace(new RegExp('([#;"])(' + c + ')([")]|\\.[a-z])', "g"), "$1" + i + o + "$3");
491
- }), e = e.replace(new RegExp(o, "g"), ""), e;
488
+ return r.forEach((a) => {
489
+ const i = typeof e == "function" ? e(a) : e + ($n++).toString(), c = a.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
490
+ t = t.replace(new RegExp('([#;"])(' + c + ')([")]|\\.[a-z])', "g"), "$1" + i + o + "$3");
491
+ }), t = t.replace(new RegExp(o, "g"), ""), t;
492
492
  }
493
- const gt = /* @__PURE__ */ Object.create(null);
494
- function jr(e, t) {
495
- gt[e] = t;
493
+ const ge = /* @__PURE__ */ Object.create(null);
494
+ function Ln(t, e) {
495
+ ge[t] = e;
496
496
  }
497
- function yt(e) {
498
- return gt[e] || gt[""];
497
+ function we(t) {
498
+ return ge[t] || ge[""];
499
499
  }
500
- function It(e) {
501
- let t;
502
- if (typeof e.resources == "string") t = [e.resources];
503
- else if (t = e.resources, !(t instanceof Array) || !t.length) return null;
500
+ function Ce(t) {
501
+ let e;
502
+ if (typeof t.resources == "string") e = [t.resources];
503
+ else if (e = t.resources, !(e instanceof Array) || !e.length) return null;
504
504
  return {
505
- resources: t,
506
- path: e.path || "/",
507
- maxURL: e.maxURL || 500,
508
- rotate: e.rotate || 750,
509
- timeout: e.timeout || 5e3,
510
- random: e.random === !0,
511
- index: e.index || 0,
512
- dataAfterTimeout: e.dataAfterTimeout !== !1
505
+ resources: e,
506
+ path: t.path || "/",
507
+ maxURL: t.maxURL || 500,
508
+ rotate: t.rotate || 750,
509
+ timeout: t.timeout || 5e3,
510
+ random: t.random === !0,
511
+ index: t.index || 0,
512
+ dataAfterTimeout: t.dataAfterTimeout !== !1
513
513
  };
514
514
  }
515
- const Ct = /* @__PURE__ */ Object.create(null), $e = ["https://api.simplesvg.com", "https://api.unisvg.com"], Je = [];
516
- for (; $e.length > 0; ) $e.length === 1 || Math.random() > 0.5 ? Je.push($e.shift()) : Je.push($e.pop());
517
- Ct[""] = It({ resources: ["https://api.iconify.design"].concat(Je) });
518
- function Ar(e, t) {
519
- const n = It(t);
520
- return n === null ? !1 : (Ct[e] = n, !0);
515
+ const Ie = /* @__PURE__ */ Object.create(null), jt = ["https://api.simplesvg.com", "https://api.unisvg.com"], Yt = [];
516
+ for (; jt.length > 0; ) jt.length === 1 || Math.random() > 0.5 ? Yt.push(jt.shift()) : Yt.push(jt.pop());
517
+ Ie[""] = Ce({ resources: ["https://api.iconify.design"].concat(Yt) });
518
+ function zn(t, e) {
519
+ const r = Ce(e);
520
+ return r === null ? !1 : (Ie[t] = r, !0);
521
521
  }
522
- function _t(e) {
523
- return Ct[e];
522
+ function _e(t) {
523
+ return Ie[t];
524
524
  }
525
- const Lr = () => {
526
- let e;
525
+ const Dn = () => {
526
+ let t;
527
527
  try {
528
- if (e = fetch, typeof e == "function") return e;
528
+ if (t = fetch, typeof t == "function") return t;
529
529
  } catch {
530
530
  }
531
531
  };
532
- let Jt = Lr();
533
- function Dr(e, t) {
534
- const n = _t(e);
535
- if (!n) return 0;
536
- let r;
537
- if (!n.maxURL) r = 0;
532
+ let Ye = Dn();
533
+ function Mn(t, e) {
534
+ const r = _e(t);
535
+ if (!r) return 0;
536
+ let n;
537
+ if (!r.maxURL) n = 0;
538
538
  else {
539
539
  let o = 0;
540
- n.resources.forEach((i) => {
540
+ r.resources.forEach((i) => {
541
541
  o = Math.max(o, i.length);
542
542
  });
543
- const s = t + ".json?icons=";
544
- r = n.maxURL - o - n.path.length - s.length;
543
+ const a = e + ".json?icons=";
544
+ n = r.maxURL - o - r.path.length - a.length;
545
545
  }
546
- return r;
546
+ return n;
547
547
  }
548
- function Mr(e) {
549
- return e === 404;
548
+ function Un(t) {
549
+ return t === 404;
550
550
  }
551
- const Ur = (e, t, n) => {
552
- const r = [], o = Dr(e, t), s = "icons";
551
+ const Bn = (t, e, r) => {
552
+ const n = [], o = Mn(t, e), a = "icons";
553
553
  let i = {
554
- type: s,
555
- provider: e,
556
- prefix: t,
554
+ type: a,
555
+ provider: t,
556
+ prefix: e,
557
557
  icons: []
558
558
  }, c = 0;
559
- return n.forEach((a, u) => {
560
- c += a.length + 1, c >= o && u > 0 && (r.push(i), i = {
561
- type: s,
562
- provider: e,
563
- prefix: t,
559
+ return r.forEach((s, u) => {
560
+ c += s.length + 1, c >= o && u > 0 && (n.push(i), i = {
561
+ type: a,
562
+ provider: t,
563
+ prefix: e,
564
564
  icons: []
565
- }, c = a.length), i.icons.push(a);
566
- }), r.push(i), r;
565
+ }, c = s.length), i.icons.push(s);
566
+ }), n.push(i), n;
567
567
  };
568
- function qr(e) {
569
- if (typeof e == "string") {
570
- const t = _t(e);
571
- if (t) return t.path;
568
+ function qn(t) {
569
+ if (typeof t == "string") {
570
+ const e = _e(t);
571
+ if (e) return e.path;
572
572
  }
573
573
  return "/";
574
574
  }
575
- const Br = (e, t, n) => {
576
- if (!Jt) {
577
- n("abort", 424);
575
+ const Rn = (t, e, r) => {
576
+ if (!Ye) {
577
+ r("abort", 424);
578
578
  return;
579
579
  }
580
- let r = qr(t.provider);
581
- switch (t.type) {
580
+ let n = qn(e.provider);
581
+ switch (e.type) {
582
582
  case "icons": {
583
- const s = t.prefix, c = t.icons.join(","), a = new URLSearchParams({ icons: c });
584
- r += s + ".json?" + a.toString();
583
+ const a = e.prefix, c = e.icons.join(","), s = new URLSearchParams({ icons: c });
584
+ n += a + ".json?" + s.toString();
585
585
  break;
586
586
  }
587
587
  case "custom": {
588
- const s = t.uri;
589
- r += s.slice(0, 1) === "/" ? s.slice(1) : s;
588
+ const a = e.uri;
589
+ n += a.slice(0, 1) === "/" ? a.slice(1) : a;
590
590
  break;
591
591
  }
592
592
  default:
593
- n("abort", 400);
593
+ r("abort", 400);
594
594
  return;
595
595
  }
596
596
  let o = 503;
597
- Jt(e + r).then((s) => {
598
- const i = s.status;
597
+ Ye(t + n).then((a) => {
598
+ const i = a.status;
599
599
  if (i !== 200) {
600
600
  setTimeout(() => {
601
- n(Mr(i) ? "abort" : "next", i);
601
+ r(Un(i) ? "abort" : "next", i);
602
602
  });
603
603
  return;
604
604
  }
605
- return o = 501, s.json();
606
- }).then((s) => {
607
- if (typeof s != "object" || s === null) {
605
+ return o = 501, a.json();
606
+ }).then((a) => {
607
+ if (typeof a != "object" || a === null) {
608
608
  setTimeout(() => {
609
- s === 404 ? n("abort", s) : n("next", o);
609
+ a === 404 ? r("abort", a) : r("next", o);
610
610
  });
611
611
  return;
612
612
  }
613
613
  setTimeout(() => {
614
- n("success", s);
614
+ r("success", a);
615
615
  });
616
616
  }).catch(() => {
617
- n("next", o);
617
+ r("next", o);
618
618
  });
619
- }, Hr = {
620
- prepare: Ur,
621
- send: Br
619
+ }, Hn = {
620
+ prepare: Bn,
621
+ send: Rn
622
622
  };
623
- function On(e, t) {
624
- e.forEach((n) => {
625
- const r = n.loaderCallbacks;
626
- r && (n.loaderCallbacks = r.filter((o) => o.id !== t));
623
+ function Pr(t, e) {
624
+ t.forEach((r) => {
625
+ const n = r.loaderCallbacks;
626
+ n && (r.loaderCallbacks = n.filter((o) => o.id !== e));
627
627
  });
628
628
  }
629
- function Rr(e) {
630
- e.pendingCallbacksFlag || (e.pendingCallbacksFlag = !0, setTimeout(() => {
631
- e.pendingCallbacksFlag = !1;
632
- const t = e.loaderCallbacks ? e.loaderCallbacks.slice(0) : [];
633
- if (!t.length) return;
634
- let n = !1;
635
- const r = e.provider, o = e.prefix;
636
- t.forEach((s) => {
637
- const i = s.icons, c = i.pending.length;
638
- i.pending = i.pending.filter((a) => {
639
- if (a.prefix !== o) return !0;
640
- const u = a.name;
641
- if (e.icons[u]) i.loaded.push({
642
- provider: r,
629
+ function Vn(t) {
630
+ t.pendingCallbacksFlag || (t.pendingCallbacksFlag = !0, setTimeout(() => {
631
+ t.pendingCallbacksFlag = !1;
632
+ const e = t.loaderCallbacks ? t.loaderCallbacks.slice(0) : [];
633
+ if (!e.length) return;
634
+ let r = !1;
635
+ const n = t.provider, o = t.prefix;
636
+ e.forEach((a) => {
637
+ const i = a.icons, c = i.pending.length;
638
+ i.pending = i.pending.filter((s) => {
639
+ if (s.prefix !== o) return !0;
640
+ const u = s.name;
641
+ if (t.icons[u]) i.loaded.push({
642
+ provider: n,
643
643
  prefix: o,
644
644
  name: u
645
645
  });
646
- else if (e.missing.has(u)) i.missing.push({
647
- provider: r,
646
+ else if (t.missing.has(u)) i.missing.push({
647
+ provider: n,
648
648
  prefix: o,
649
649
  name: u
650
650
  });
651
651
  else
652
- return n = !0, !0;
652
+ return r = !0, !0;
653
653
  return !1;
654
- }), i.pending.length !== c && (n || On([e], s.id), s.callback(i.loaded.slice(0), i.missing.slice(0), i.pending.slice(0), s.abort));
654
+ }), i.pending.length !== c && (r || Pr([t], a.id), a.callback(i.loaded.slice(0), i.missing.slice(0), i.pending.slice(0), a.abort));
655
655
  });
656
656
  }));
657
657
  }
658
- let zr = 0;
659
- function Vr(e, t, n) {
660
- const r = zr++, o = On.bind(null, n, r);
661
- if (!t.pending.length) return o;
662
- const s = {
663
- id: r,
664
- icons: t,
665
- callback: e,
658
+ let Yn = 0;
659
+ function Jn(t, e, r) {
660
+ const n = Yn++, o = Pr.bind(null, r, n);
661
+ if (!e.pending.length) return o;
662
+ const a = {
663
+ id: n,
664
+ icons: e,
665
+ callback: t,
666
666
  abort: o
667
667
  };
668
- return n.forEach((i) => {
669
- (i.loaderCallbacks || (i.loaderCallbacks = [])).push(s);
668
+ return r.forEach((i) => {
669
+ (i.loaderCallbacks || (i.loaderCallbacks = [])).push(a);
670
670
  }), o;
671
671
  }
672
- function Jr(e) {
673
- const t = {
672
+ function Kn(t) {
673
+ const e = {
674
674
  loaded: [],
675
675
  missing: [],
676
676
  pending: []
677
- }, n = /* @__PURE__ */ Object.create(null);
678
- e.sort((o, s) => o.provider !== s.provider ? o.provider.localeCompare(s.provider) : o.prefix !== s.prefix ? o.prefix.localeCompare(s.prefix) : o.name.localeCompare(s.name));
679
- let r = {
677
+ }, r = /* @__PURE__ */ Object.create(null);
678
+ t.sort((o, a) => o.provider !== a.provider ? o.provider.localeCompare(a.provider) : o.prefix !== a.prefix ? o.prefix.localeCompare(a.prefix) : o.name.localeCompare(a.name));
679
+ let n = {
680
680
  provider: "",
681
681
  prefix: "",
682
682
  name: ""
683
683
  };
684
- return e.forEach((o) => {
685
- if (r.name === o.name && r.prefix === o.prefix && r.provider === o.provider) return;
686
- r = o;
687
- const s = o.provider, i = o.prefix, c = o.name, a = n[s] || (n[s] = /* @__PURE__ */ Object.create(null)), u = a[i] || (a[i] = Te(s, i));
688
- let d;
689
- c in u.icons ? d = t.loaded : i === "" || u.missing.has(c) ? d = t.missing : d = t.pending;
684
+ return t.forEach((o) => {
685
+ if (n.name === o.name && n.prefix === o.prefix && n.provider === o.provider) return;
686
+ n = o;
687
+ const a = o.provider, i = o.prefix, c = o.name, s = r[a] || (r[a] = /* @__PURE__ */ Object.create(null)), u = s[i] || (s[i] = Et(a, i));
688
+ let f;
689
+ c in u.icons ? f = e.loaded : i === "" || u.missing.has(c) ? f = e.missing : f = e.pending;
690
690
  const h = {
691
- provider: s,
691
+ provider: a,
692
692
  prefix: i,
693
693
  name: c
694
694
  };
695
- d.push(h);
696
- }), t;
695
+ f.push(h);
696
+ }), e;
697
697
  }
698
- function Kr(e, t = !0, n = !1) {
699
- const r = [];
700
- return e.forEach((o) => {
701
- const s = typeof o == "string" ? et(o, t, n) : o;
702
- s && r.push(s);
703
- }), r;
698
+ function Gn(t, e = !0, r = !1) {
699
+ const n = [];
700
+ return t.forEach((o) => {
701
+ const a = typeof o == "string" ? te(o, e, r) : o;
702
+ a && n.push(a);
703
+ }), n;
704
704
  }
705
- const Gr = {
705
+ const Wn = {
706
706
  resources: [],
707
707
  index: 0,
708
708
  timeout: 2e3,
@@ -710,88 +710,88 @@ const Gr = {
710
710
  random: !1,
711
711
  dataAfterTimeout: !1
712
712
  };
713
- function Wr(e, t, n, r) {
714
- const o = e.resources.length, s = e.random ? Math.floor(Math.random() * o) : e.index;
713
+ function Qn(t, e, r, n) {
714
+ const o = t.resources.length, a = t.random ? Math.floor(Math.random() * o) : t.index;
715
715
  let i;
716
- if (e.random) {
717
- let k = e.resources.slice(0);
718
- for (i = []; k.length > 1; ) {
719
- const L = Math.floor(Math.random() * k.length);
720
- i.push(k[L]), k = k.slice(0, L).concat(k.slice(L + 1));
716
+ if (t.random) {
717
+ let S = t.resources.slice(0);
718
+ for (i = []; S.length > 1; ) {
719
+ const L = Math.floor(Math.random() * S.length);
720
+ i.push(S[L]), S = S.slice(0, L).concat(S.slice(L + 1));
721
721
  }
722
- i = i.concat(k);
723
- } else i = e.resources.slice(s).concat(e.resources.slice(0, s));
722
+ i = i.concat(S);
723
+ } else i = t.resources.slice(a).concat(t.resources.slice(0, a));
724
724
  const c = Date.now();
725
- let a = "pending", u = 0, d, h = null, m = [], g = [];
726
- typeof r == "function" && g.push(r);
727
- function S() {
725
+ let s = "pending", u = 0, f, h = null, m = [], g = [];
726
+ typeof n == "function" && g.push(n);
727
+ function k() {
728
728
  h && (clearTimeout(h), h = null);
729
729
  }
730
730
  function _() {
731
- a === "pending" && (a = "aborted"), S(), m.forEach((k) => {
732
- k.status === "pending" && (k.status = "aborted");
731
+ s === "pending" && (s = "aborted"), k(), m.forEach((S) => {
732
+ S.status === "pending" && (S.status = "aborted");
733
733
  }), m = [];
734
734
  }
735
- function y(k, L) {
736
- L && (g = []), typeof k == "function" && g.push(k);
735
+ function w(S, L) {
736
+ L && (g = []), typeof S == "function" && g.push(S);
737
737
  }
738
738
  function v() {
739
739
  return {
740
740
  startTime: c,
741
- payload: t,
742
- status: a,
741
+ payload: e,
742
+ status: s,
743
743
  queriesSent: u,
744
744
  queriesPending: m.length,
745
- subscribe: y,
745
+ subscribe: w,
746
746
  abort: _
747
747
  };
748
748
  }
749
749
  function B() {
750
- a = "failed", g.forEach((k) => {
751
- k(void 0, d);
750
+ s = "failed", g.forEach((S) => {
751
+ S(void 0, f);
752
752
  });
753
753
  }
754
754
  function P() {
755
- m.forEach((k) => {
756
- k.status === "pending" && (k.status = "aborted");
755
+ m.forEach((S) => {
756
+ S.status === "pending" && (S.status = "aborted");
757
757
  }), m = [];
758
758
  }
759
- function j(k, L, z) {
759
+ function $(S, L, H) {
760
760
  const V = L !== "success";
761
- switch (m = m.filter((O) => O !== k), a) {
761
+ switch (m = m.filter((O) => O !== S), s) {
762
762
  case "pending":
763
763
  break;
764
764
  case "failed":
765
- if (V || !e.dataAfterTimeout) return;
765
+ if (V || !t.dataAfterTimeout) return;
766
766
  break;
767
767
  default:
768
768
  return;
769
769
  }
770
770
  if (L === "abort") {
771
- d = z, B();
771
+ f = H, B();
772
772
  return;
773
773
  }
774
774
  if (V) {
775
- d = z, m.length || (i.length ? X() : B());
775
+ f = H, m.length || (i.length ? Z() : B());
776
776
  return;
777
777
  }
778
- if (S(), P(), !e.random) {
779
- const O = e.resources.indexOf(k.resource);
780
- O !== -1 && O !== e.index && (e.index = O);
778
+ if (k(), P(), !t.random) {
779
+ const O = t.resources.indexOf(S.resource);
780
+ O !== -1 && O !== t.index && (t.index = O);
781
781
  }
782
- a = "completed", g.forEach((O) => {
783
- O(z);
782
+ s = "completed", g.forEach((O) => {
783
+ O(H);
784
784
  });
785
785
  }
786
- function X() {
787
- if (a !== "pending") return;
788
- S();
789
- const k = i.shift();
790
- if (k === void 0) {
786
+ function Z() {
787
+ if (s !== "pending") return;
788
+ k();
789
+ const S = i.shift();
790
+ if (S === void 0) {
791
791
  if (m.length) {
792
792
  h = setTimeout(() => {
793
- S(), a === "pending" && (P(), B());
794
- }, e.timeout);
793
+ k(), s === "pending" && (P(), B());
794
+ }, t.timeout);
795
795
  return;
796
796
  }
797
797
  B();
@@ -799,215 +799,215 @@ function Wr(e, t, n, r) {
799
799
  }
800
800
  const L = {
801
801
  status: "pending",
802
- resource: k,
803
- callback: (z, V) => {
804
- j(L, z, V);
802
+ resource: S,
803
+ callback: (H, V) => {
804
+ $(L, H, V);
805
805
  }
806
806
  };
807
- m.push(L), u++, h = setTimeout(X, e.rotate), n(k, t, L.callback);
807
+ m.push(L), u++, h = setTimeout(Z, t.rotate), r(S, e, L.callback);
808
808
  }
809
- return setTimeout(X), v;
809
+ return setTimeout(Z), v;
810
810
  }
811
- function $n(e) {
812
- const t = {
813
- ...Gr,
814
- ...e
811
+ function Or(t) {
812
+ const e = {
813
+ ...Wn,
814
+ ...t
815
815
  };
816
- let n = [];
817
- function r() {
818
- n = n.filter((c) => c().status === "pending");
816
+ let r = [];
817
+ function n() {
818
+ r = r.filter((c) => c().status === "pending");
819
819
  }
820
- function o(c, a, u) {
821
- const d = Wr(t, c, a, (h, m) => {
822
- r(), u && u(h, m);
820
+ function o(c, s, u) {
821
+ const f = Qn(e, c, s, (h, m) => {
822
+ n(), u && u(h, m);
823
823
  });
824
- return n.push(d), d;
824
+ return r.push(f), f;
825
825
  }
826
- function s(c) {
827
- return n.find((a) => c(a)) || null;
826
+ function a(c) {
827
+ return r.find((s) => c(s)) || null;
828
828
  }
829
829
  return {
830
830
  query: o,
831
- find: s,
831
+ find: a,
832
832
  setIndex: (c) => {
833
- t.index = c;
833
+ e.index = c;
834
834
  },
835
- getIndex: () => t.index,
836
- cleanup: r
835
+ getIndex: () => e.index,
836
+ cleanup: n
837
837
  };
838
838
  }
839
- function Kt() {
839
+ function Je() {
840
840
  }
841
- const at = /* @__PURE__ */ Object.create(null);
842
- function Qr(e) {
843
- if (!at[e]) {
844
- const t = _t(e);
845
- if (!t) return;
846
- const n = $n(t), r = {
847
- config: t,
848
- redundancy: n
841
+ const se = /* @__PURE__ */ Object.create(null);
842
+ function Xn(t) {
843
+ if (!se[t]) {
844
+ const e = _e(t);
845
+ if (!e) return;
846
+ const r = Or(e), n = {
847
+ config: e,
848
+ redundancy: r
849
849
  };
850
- at[e] = r;
851
- }
852
- return at[e];
853
- }
854
- function Yr(e, t, n) {
855
- let r, o;
856
- if (typeof e == "string") {
857
- const s = yt(e);
858
- if (!s)
859
- return n(void 0, 424), Kt;
860
- o = s.send;
861
- const i = Qr(e);
862
- i && (r = i.redundancy);
850
+ se[t] = n;
851
+ }
852
+ return se[t];
853
+ }
854
+ function Zn(t, e, r) {
855
+ let n, o;
856
+ if (typeof t == "string") {
857
+ const a = we(t);
858
+ if (!a)
859
+ return r(void 0, 424), Je;
860
+ o = a.send;
861
+ const i = Xn(t);
862
+ i && (n = i.redundancy);
863
863
  } else {
864
- const s = It(e);
865
- if (s) {
866
- r = $n(s);
867
- const i = e.resources ? e.resources[0] : "", c = yt(i);
864
+ const a = Ce(t);
865
+ if (a) {
866
+ n = Or(a);
867
+ const i = t.resources ? t.resources[0] : "", c = we(i);
868
868
  c && (o = c.send);
869
869
  }
870
870
  }
871
- return !r || !o ? (n(void 0, 424), Kt) : r.query(t, o, n)().abort;
871
+ return !n || !o ? (r(void 0, 424), Je) : n.query(e, o, r)().abort;
872
872
  }
873
- function Gt() {
873
+ function Ke() {
874
874
  }
875
- function Zr(e) {
876
- e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
877
- e.iconsLoaderFlag = !1, Rr(e);
875
+ function to(t) {
876
+ t.iconsLoaderFlag || (t.iconsLoaderFlag = !0, setTimeout(() => {
877
+ t.iconsLoaderFlag = !1, Vn(t);
878
878
  }));
879
879
  }
880
- function Xr(e) {
881
- const t = [], n = [];
882
- return e.forEach((r) => {
883
- (r.match(Fn) ? t : n).push(r);
880
+ function eo(t) {
881
+ const e = [], r = [];
882
+ return t.forEach((n) => {
883
+ (n.match(Fr) ? e : r).push(n);
884
884
  }), {
885
- valid: t,
886
- invalid: n
885
+ valid: e,
886
+ invalid: r
887
887
  };
888
888
  }
889
- function je(e, t, n) {
890
- function r() {
891
- const o = e.pendingIcons;
892
- t.forEach((s) => {
893
- o && o.delete(s), e.icons[s] || e.missing.add(s);
889
+ function $t(t, e, r) {
890
+ function n() {
891
+ const o = t.pendingIcons;
892
+ e.forEach((a) => {
893
+ o && o.delete(a), t.icons[a] || t.missing.add(a);
894
894
  });
895
895
  }
896
- if (n && typeof n == "object") try {
897
- if (!Nn(e, n).length) {
898
- r();
896
+ if (r && typeof r == "object") try {
897
+ if (!_r(t, r).length) {
898
+ n();
899
899
  return;
900
900
  }
901
901
  } catch (o) {
902
902
  console.error(o);
903
903
  }
904
- r(), Zr(e);
904
+ n(), to(t);
905
905
  }
906
- function Wt(e, t) {
907
- e instanceof Promise ? e.then((n) => {
908
- t(n);
906
+ function Ge(t, e) {
907
+ t instanceof Promise ? t.then((r) => {
908
+ e(r);
909
909
  }).catch(() => {
910
- t(null);
911
- }) : t(e);
912
- }
913
- function eo(e, t) {
914
- e.iconsToLoad ? e.iconsToLoad = e.iconsToLoad.concat(t).sort() : e.iconsToLoad = t, e.iconsQueueFlag || (e.iconsQueueFlag = !0, setTimeout(() => {
915
- e.iconsQueueFlag = !1;
916
- const { provider: n, prefix: r } = e, o = e.iconsToLoad;
917
- if (delete e.iconsToLoad, !o || !o.length) return;
918
- const s = e.loadIcon;
919
- if (e.loadIcons && (o.length > 1 || !s)) {
920
- Wt(e.loadIcons(o, r, n), (d) => {
921
- je(e, o, d);
910
+ e(null);
911
+ }) : e(t);
912
+ }
913
+ function ro(t, e) {
914
+ t.iconsToLoad ? t.iconsToLoad = t.iconsToLoad.concat(e).sort() : t.iconsToLoad = e, t.iconsQueueFlag || (t.iconsQueueFlag = !0, setTimeout(() => {
915
+ t.iconsQueueFlag = !1;
916
+ const { provider: r, prefix: n } = t, o = t.iconsToLoad;
917
+ if (delete t.iconsToLoad, !o || !o.length) return;
918
+ const a = t.loadIcon;
919
+ if (t.loadIcons && (o.length > 1 || !a)) {
920
+ Ge(t.loadIcons(o, n, r), (f) => {
921
+ $t(t, o, f);
922
922
  });
923
923
  return;
924
924
  }
925
- if (s) {
926
- o.forEach((d) => {
927
- const h = s(d, r, n);
928
- Wt(h, (m) => {
925
+ if (a) {
926
+ o.forEach((f) => {
927
+ const h = a(f, n, r);
928
+ Ge(h, (m) => {
929
929
  const g = m ? {
930
- prefix: r,
931
- icons: { [d]: m }
930
+ prefix: n,
931
+ icons: { [f]: m }
932
932
  } : null;
933
- je(e, [d], g);
933
+ $t(t, [f], g);
934
934
  });
935
935
  });
936
936
  return;
937
937
  }
938
- const { valid: i, invalid: c } = Xr(o);
939
- if (c.length && je(e, c, null), !i.length) return;
940
- const a = r.match(Fn) ? yt(n) : null;
941
- if (!a) {
942
- je(e, i, null);
938
+ const { valid: i, invalid: c } = eo(o);
939
+ if (c.length && $t(t, c, null), !i.length) return;
940
+ const s = n.match(Fr) ? we(r) : null;
941
+ if (!s) {
942
+ $t(t, i, null);
943
943
  return;
944
944
  }
945
- a.prepare(n, r, i).forEach((d) => {
946
- Yr(n, d, (h) => {
947
- je(e, d.icons, h);
945
+ s.prepare(r, n, i).forEach((f) => {
946
+ Zn(r, f, (h) => {
947
+ $t(t, f.icons, h);
948
948
  });
949
949
  });
950
950
  }));
951
951
  }
952
- const to = (e, t) => {
953
- const n = Kr(e, !0, Tn()), r = Jr(n);
954
- if (!r.pending.length) {
955
- let a = !0;
956
- return t && setTimeout(() => {
957
- a && t(r.loaded, r.missing, r.pending, Gt);
952
+ const no = (t, e) => {
953
+ const r = Gn(t, !0, Nr()), n = Kn(r);
954
+ if (!n.pending.length) {
955
+ let s = !0;
956
+ return e && setTimeout(() => {
957
+ s && e(n.loaded, n.missing, n.pending, Ke);
958
958
  }), () => {
959
- a = !1;
959
+ s = !1;
960
960
  };
961
961
  }
962
- const o = /* @__PURE__ */ Object.create(null), s = [];
962
+ const o = /* @__PURE__ */ Object.create(null), a = [];
963
963
  let i, c;
964
- return r.pending.forEach((a) => {
965
- const { provider: u, prefix: d } = a;
966
- if (d === c && u === i) return;
967
- i = u, c = d, s.push(Te(u, d));
964
+ return n.pending.forEach((s) => {
965
+ const { provider: u, prefix: f } = s;
966
+ if (f === c && u === i) return;
967
+ i = u, c = f, a.push(Et(u, f));
968
968
  const h = o[u] || (o[u] = /* @__PURE__ */ Object.create(null));
969
- h[d] || (h[d] = []);
970
- }), r.pending.forEach((a) => {
971
- const { provider: u, prefix: d, name: h } = a, m = Te(u, d), g = m.pendingIcons || (m.pendingIcons = /* @__PURE__ */ new Set());
972
- g.has(h) || (g.add(h), o[u][d].push(h));
973
- }), s.forEach((a) => {
974
- const u = o[a.provider][a.prefix];
975
- u.length && eo(a, u);
976
- }), t ? Vr(t, r, s) : Gt;
969
+ h[f] || (h[f] = []);
970
+ }), n.pending.forEach((s) => {
971
+ const { provider: u, prefix: f, name: h } = s, m = Et(u, f), g = m.pendingIcons || (m.pendingIcons = /* @__PURE__ */ new Set());
972
+ g.has(h) || (g.add(h), o[u][f].push(h));
973
+ }), a.forEach((s) => {
974
+ const u = o[s.provider][s.prefix];
975
+ u.length && ro(s, u);
976
+ }), e ? Jn(e, n, a) : Ke;
977
977
  };
978
- function no(e, t) {
979
- const n = { ...e };
980
- for (const r in t) {
981
- const o = t[r], s = typeof o;
982
- r in En ? (o === null || o && (s === "string" || s === "number")) && (n[r] = o) : s === typeof n[r] && (n[r] = r === "rotate" ? o % 4 : o);
978
+ function oo(t, e) {
979
+ const r = { ...t };
980
+ for (const n in e) {
981
+ const o = e[n], a = typeof o;
982
+ n in Er ? (o === null || o && (a === "string" || a === "number")) && (r[n] = o) : a === typeof r[n] && (r[n] = n === "rotate" ? o % 4 : o);
983
983
  }
984
- return n;
984
+ return r;
985
985
  }
986
- const ro = /[\s,]+/;
987
- function oo(e, t) {
988
- t.split(ro).forEach((n) => {
989
- switch (n.trim()) {
986
+ const ao = /[\s,]+/;
987
+ function io(t, e) {
988
+ e.split(ao).forEach((r) => {
989
+ switch (r.trim()) {
990
990
  case "horizontal":
991
- e.hFlip = !0;
991
+ t.hFlip = !0;
992
992
  break;
993
993
  case "vertical":
994
- e.vFlip = !0;
994
+ t.vFlip = !0;
995
995
  break;
996
996
  }
997
997
  });
998
998
  }
999
- function so(e, t = 0) {
1000
- const n = e.replace(/^-?[0-9.]*/, "");
1001
- function r(o) {
999
+ function so(t, e = 0) {
1000
+ const r = t.replace(/^-?[0-9.]*/, "");
1001
+ function n(o) {
1002
1002
  for (; o < 0; ) o += 4;
1003
1003
  return o % 4;
1004
1004
  }
1005
- if (n === "") {
1006
- const o = parseInt(e);
1007
- return isNaN(o) ? 0 : r(o);
1008
- } else if (n !== e) {
1005
+ if (r === "") {
1006
+ const o = parseInt(t);
1007
+ return isNaN(o) ? 0 : n(o);
1008
+ } else if (r !== t) {
1009
1009
  let o = 0;
1010
- switch (n) {
1010
+ switch (r) {
1011
1011
  case "%":
1012
1012
  o = 25;
1013
1013
  break;
@@ -1015,92 +1015,92 @@ function so(e, t = 0) {
1015
1015
  o = 90;
1016
1016
  }
1017
1017
  if (o) {
1018
- let s = parseFloat(e.slice(0, e.length - n.length));
1019
- return isNaN(s) ? 0 : (s = s / o, s % 1 === 0 ? r(s) : 0);
1018
+ let a = parseFloat(t.slice(0, t.length - r.length));
1019
+ return isNaN(a) ? 0 : (a = a / o, a % 1 === 0 ? n(a) : 0);
1020
1020
  }
1021
1021
  }
1022
- return t;
1022
+ return e;
1023
1023
  }
1024
- function io(e, t) {
1025
- let n = e.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
1026
- for (const r in t) n += " " + r + '="' + t[r] + '"';
1027
- return '<svg xmlns="http://www.w3.org/2000/svg"' + n + ">" + e + "</svg>";
1024
+ function co(t, e) {
1025
+ let r = t.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
1026
+ for (const n in e) r += " " + n + '="' + e[n] + '"';
1027
+ return '<svg xmlns="http://www.w3.org/2000/svg"' + r + ">" + t + "</svg>";
1028
1028
  }
1029
- function ao(e) {
1030
- return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
1029
+ function lo(t) {
1030
+ return t.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
1031
1031
  }
1032
- function co(e) {
1033
- return "data:image/svg+xml," + ao(e);
1032
+ function uo(t) {
1033
+ return "data:image/svg+xml," + lo(t);
1034
1034
  }
1035
- function lo(e) {
1036
- return 'url("' + co(e) + '")';
1035
+ function fo(t) {
1036
+ return 'url("' + uo(t) + '")';
1037
1037
  }
1038
- let Me;
1039
- function uo() {
1038
+ let Dt;
1039
+ function po() {
1040
1040
  try {
1041
- Me = window.trustedTypes.createPolicy("iconify", { createHTML: (e) => e });
1041
+ Dt = window.trustedTypes.createPolicy("iconify", { createHTML: (t) => t });
1042
1042
  } catch {
1043
- Me = null;
1043
+ Dt = null;
1044
1044
  }
1045
1045
  }
1046
- function fo(e) {
1047
- return Me === void 0 && uo(), Me ? Me.createHTML(e) : e;
1046
+ function ho(t) {
1047
+ return Dt === void 0 && po(), Dt ? Dt.createHTML(t) : t;
1048
1048
  }
1049
- const jn = {
1050
- ...Pn,
1049
+ const jr = {
1050
+ ...Tr,
1051
1051
  inline: !1
1052
- }, po = {
1052
+ }, mo = {
1053
1053
  xmlns: "http://www.w3.org/2000/svg",
1054
1054
  xmlnsXlink: "http://www.w3.org/1999/xlink",
1055
1055
  "aria-hidden": !0,
1056
1056
  role: "img"
1057
- }, ho = {
1057
+ }, go = {
1058
1058
  display: "inline-block"
1059
- }, bt = {
1059
+ }, ye = {
1060
1060
  backgroundColor: "currentColor"
1061
- }, An = {
1061
+ }, $r = {
1062
1062
  backgroundColor: "transparent"
1063
- }, Qt = {
1063
+ }, We = {
1064
1064
  Image: "var(--svg)",
1065
1065
  Repeat: "no-repeat",
1066
1066
  Size: "100% 100%"
1067
- }, Yt = {
1068
- WebkitMask: bt,
1069
- mask: bt,
1070
- background: An
1067
+ }, Qe = {
1068
+ WebkitMask: ye,
1069
+ mask: ye,
1070
+ background: $r
1071
1071
  };
1072
- for (const e in Yt) {
1073
- const t = Yt[e];
1074
- for (const n in Qt)
1075
- t[e + n] = Qt[n];
1072
+ for (const t in Qe) {
1073
+ const e = Qe[t];
1074
+ for (const r in We)
1075
+ e[t + r] = We[r];
1076
1076
  }
1077
- const mo = {
1078
- ...jn,
1077
+ const wo = {
1078
+ ...jr,
1079
1079
  inline: !0
1080
1080
  };
1081
- function Zt(e) {
1082
- return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
1081
+ function Xe(t) {
1082
+ return t + (t.match(/^[-0-9.]+$/) ? "px" : "");
1083
1083
  }
1084
- const go = (e, t, n) => {
1085
- const r = t.inline ? mo : jn, o = no(r, t), s = t.mode || "svg", i = {}, c = t.style || {}, a = {
1086
- ...s === "svg" ? po : {}
1084
+ const yo = (t, e, r) => {
1085
+ const n = e.inline ? wo : jr, o = oo(n, e), a = e.mode || "svg", i = {}, c = e.style || {}, s = {
1086
+ ...a === "svg" ? mo : {}
1087
1087
  };
1088
- if (n) {
1089
- const y = et(n, !1, !0);
1090
- if (y) {
1088
+ if (r) {
1089
+ const w = te(r, !1, !0);
1090
+ if (w) {
1091
1091
  const v = ["iconify"], B = [
1092
1092
  "provider",
1093
1093
  "prefix"
1094
1094
  ];
1095
1095
  for (const P of B)
1096
- y[P] && v.push("iconify--" + y[P]);
1097
- a.className = v.join(" ");
1096
+ w[P] && v.push("iconify--" + w[P]);
1097
+ s.className = v.join(" ");
1098
1098
  }
1099
1099
  }
1100
- for (let y in t) {
1101
- const v = t[y];
1100
+ for (let w in e) {
1101
+ const v = e[w];
1102
1102
  if (v !== void 0)
1103
- switch (y) {
1103
+ switch (w) {
1104
1104
  // Properties to ignore
1105
1105
  case "icon":
1106
1106
  case "style":
@@ -1112,21 +1112,21 @@ const go = (e, t, n) => {
1112
1112
  break;
1113
1113
  // Forward ref
1114
1114
  case "_ref":
1115
- a.ref = v;
1115
+ s.ref = v;
1116
1116
  break;
1117
1117
  // Merge class names
1118
1118
  case "className":
1119
- a[y] = (a[y] ? a[y] + " " : "") + v;
1119
+ s[w] = (s[w] ? s[w] + " " : "") + v;
1120
1120
  break;
1121
1121
  // Boolean attributes
1122
1122
  case "inline":
1123
1123
  case "hFlip":
1124
1124
  case "vFlip":
1125
- o[y] = v === !0 || v === "true" || v === 1;
1125
+ o[w] = v === !0 || v === "true" || v === 1;
1126
1126
  break;
1127
1127
  // Flip as string: 'horizontal,vertical'
1128
1128
  case "flip":
1129
- typeof v == "string" && oo(o, v);
1129
+ typeof v == "string" && io(o, v);
1130
1130
  break;
1131
1131
  // Color: copy to style
1132
1132
  case "color":
@@ -1134,91 +1134,91 @@ const go = (e, t, n) => {
1134
1134
  break;
1135
1135
  // Rotation as string
1136
1136
  case "rotate":
1137
- typeof v == "string" ? o[y] = so(v) : typeof v == "number" && (o[y] = v);
1137
+ typeof v == "string" ? o[w] = so(v) : typeof v == "number" && (o[w] = v);
1138
1138
  break;
1139
1139
  // Remove aria-hidden
1140
1140
  case "ariaHidden":
1141
1141
  case "aria-hidden":
1142
- v !== !0 && v !== "true" && delete a["aria-hidden"];
1142
+ v !== !0 && v !== "true" && delete s["aria-hidden"];
1143
1143
  break;
1144
1144
  // Copy missing property if it does not exist in customisations
1145
1145
  default:
1146
- r[y] === void 0 && (a[y] = v);
1146
+ n[w] === void 0 && (s[w] = v);
1147
1147
  }
1148
1148
  }
1149
- const u = Tr(e, o), d = u.attributes;
1150
- if (o.inline && (i.verticalAlign = "-0.125em"), s === "svg") {
1151
- a.style = {
1149
+ const u = Pn(t, o), f = u.attributes;
1150
+ if (o.inline && (i.verticalAlign = "-0.125em"), a === "svg") {
1151
+ s.style = {
1152
1152
  ...i,
1153
1153
  ...c
1154
- }, Object.assign(a, d);
1155
- let y = 0, v = t.id;
1156
- return typeof v == "string" && (v = v.replace(/-/g, "_")), a.dangerouslySetInnerHTML = {
1157
- __html: fo($r(u.body, v ? () => v + "ID" + y++ : "iconifyReact"))
1158
- }, pt("svg", a);
1159
- }
1160
- const { body: h, width: m, height: g } = e, S = s === "mask" || (s === "bg" ? !1 : h.indexOf("currentColor") !== -1), _ = io(h, {
1161
- ...d,
1154
+ }, Object.assign(s, f);
1155
+ let w = 0, v = e.id;
1156
+ return typeof v == "string" && (v = v.replace(/-/g, "_")), s.dangerouslySetInnerHTML = {
1157
+ __html: ho(An(u.body, v ? () => v + "ID" + w++ : "iconifyReact"))
1158
+ }, pe("svg", s);
1159
+ }
1160
+ const { body: h, width: m, height: g } = t, k = a === "mask" || (a === "bg" ? !1 : h.indexOf("currentColor") !== -1), _ = co(h, {
1161
+ ...f,
1162
1162
  width: m + "",
1163
1163
  height: g + ""
1164
1164
  });
1165
- return a.style = {
1165
+ return s.style = {
1166
1166
  ...i,
1167
- "--svg": lo(_),
1168
- width: Zt(d.width),
1169
- height: Zt(d.height),
1170
- ...ho,
1171
- ...S ? bt : An,
1167
+ "--svg": fo(_),
1168
+ width: Xe(f.width),
1169
+ height: Xe(f.height),
1170
+ ...go,
1171
+ ...k ? ye : $r,
1172
1172
  ...c
1173
- }, pt("span", a);
1173
+ }, pe("span", s);
1174
1174
  };
1175
- Tn(!0);
1176
- jr("", Hr);
1175
+ Nr(!0);
1176
+ Ln("", Hn);
1177
1177
  if (typeof document < "u" && typeof window < "u") {
1178
- const e = window;
1179
- if (e.IconifyPreload !== void 0) {
1180
- const t = e.IconifyPreload, n = "Invalid IconifyPreload syntax.";
1181
- typeof t == "object" && t !== null && (t instanceof Array ? t : [t]).forEach((r) => {
1178
+ const t = window;
1179
+ if (t.IconifyPreload !== void 0) {
1180
+ const e = t.IconifyPreload, r = "Invalid IconifyPreload syntax.";
1181
+ typeof e == "object" && e !== null && (e instanceof Array ? e : [e]).forEach((n) => {
1182
1182
  try {
1183
1183
  // Check if item is an object and not null/array
1184
- (typeof r != "object" || r === null || r instanceof Array || // Check for 'icons' and 'prefix'
1185
- typeof r.icons != "object" || typeof r.prefix != "string" || // Add icon set
1186
- !Sr(r)) && console.error(n);
1184
+ (typeof n != "object" || n === null || n instanceof Array || // Check for 'icons' and 'prefix'
1185
+ typeof n.icons != "object" || typeof n.prefix != "string" || // Add icon set
1186
+ !Cn(n)) && console.error(r);
1187
1187
  } catch {
1188
- console.error(n);
1188
+ console.error(r);
1189
1189
  }
1190
1190
  });
1191
1191
  }
1192
- if (e.IconifyProviders !== void 0) {
1193
- const t = e.IconifyProviders;
1194
- if (typeof t == "object" && t !== null)
1195
- for (let n in t) {
1196
- const r = "IconifyProviders[" + n + "] is invalid.";
1192
+ if (t.IconifyProviders !== void 0) {
1193
+ const e = t.IconifyProviders;
1194
+ if (typeof e == "object" && e !== null)
1195
+ for (let r in e) {
1196
+ const n = "IconifyProviders[" + r + "] is invalid.";
1197
1197
  try {
1198
- const o = t[n];
1198
+ const o = e[r];
1199
1199
  if (typeof o != "object" || !o || o.resources === void 0)
1200
1200
  continue;
1201
- Ar(n, o) || console.error(r);
1201
+ zn(r, o) || console.error(n);
1202
1202
  } catch {
1203
- console.error(r);
1203
+ console.error(n);
1204
1204
  }
1205
1205
  }
1206
1206
  }
1207
1207
  }
1208
- function Ln(e) {
1209
- const [t, n] = M(!!e.ssr), [r, o] = M({});
1210
- function s(g) {
1208
+ function Ar(t) {
1209
+ const [e, r] = D(!!t.ssr), [n, o] = D({});
1210
+ function a(g) {
1211
1211
  if (g) {
1212
- const S = e.icon;
1213
- if (typeof S == "object")
1212
+ const k = t.icon;
1213
+ if (typeof k == "object")
1214
1214
  return {
1215
1215
  name: "",
1216
- data: S
1216
+ data: k
1217
1217
  };
1218
- const _ = zt(S);
1218
+ const _ = He(k);
1219
1219
  if (_)
1220
1220
  return {
1221
- name: S,
1221
+ name: k,
1222
1222
  data: _
1223
1223
  };
1224
1224
  }
@@ -1226,102 +1226,102 @@ function Ln(e) {
1226
1226
  name: ""
1227
1227
  };
1228
1228
  }
1229
- const [i, c] = M(s(!!e.ssr));
1230
- function a() {
1231
- const g = r.callback;
1229
+ const [i, c] = D(a(!!t.ssr));
1230
+ function s() {
1231
+ const g = n.callback;
1232
1232
  g && (g(), o({}));
1233
1233
  }
1234
1234
  function u(g) {
1235
1235
  if (JSON.stringify(i) !== JSON.stringify(g))
1236
- return a(), c(g), !0;
1236
+ return s(), c(g), !0;
1237
1237
  }
1238
- function d() {
1238
+ function f() {
1239
1239
  var g;
1240
- const S = e.icon;
1241
- if (typeof S == "object") {
1240
+ const k = t.icon;
1241
+ if (typeof k == "object") {
1242
1242
  u({
1243
1243
  name: "",
1244
- data: S
1244
+ data: k
1245
1245
  });
1246
1246
  return;
1247
1247
  }
1248
- const _ = zt(S);
1248
+ const _ = He(k);
1249
1249
  if (u({
1250
- name: S,
1250
+ name: k,
1251
1251
  data: _
1252
1252
  }))
1253
1253
  if (_ === void 0) {
1254
- const y = to([S], d);
1254
+ const w = no([k], f);
1255
1255
  o({
1256
- callback: y
1256
+ callback: w
1257
1257
  });
1258
- } else _ && ((g = e.onLoad) === null || g === void 0 || g.call(e, S));
1258
+ } else _ && ((g = t.onLoad) === null || g === void 0 || g.call(t, k));
1259
1259
  }
1260
- ge(() => (n(!0), a), []), ge(() => {
1261
- t && d();
1262
- }, [e.icon, t]);
1260
+ gt(() => (r(!0), s), []), gt(() => {
1261
+ e && f();
1262
+ }, [t.icon, e]);
1263
1263
  const { name: h, data: m } = i;
1264
- return m ? go({
1265
- ...kt,
1264
+ return m ? yo({
1265
+ ...Se,
1266
1266
  ...m
1267
- }, e, h) : e.children ? e.children : e.fallback ? e.fallback : pt("span", {});
1267
+ }, t, h) : t.children ? t.children : t.fallback ? t.fallback : pe("span", {});
1268
1268
  }
1269
- const Xt = yn((e, t) => Ln({
1270
- ...e,
1271
- _ref: t
1269
+ const Ze = gr((t, e) => Ar({
1270
+ ...t,
1271
+ _ref: e
1272
1272
  }));
1273
- yn((e, t) => Ln({
1273
+ gr((t, e) => Ar({
1274
1274
  inline: !0,
1275
- ...e,
1276
- _ref: t
1275
+ ...t,
1276
+ _ref: e
1277
1277
  }));
1278
- function yo() {
1279
- const e = () => window.innerWidth < 425 ? 1 : window.innerWidth < 768 ? 2 : 4, [t, n] = M(e);
1280
- return ge(() => {
1281
- const r = () => n(e());
1282
- return window.addEventListener("resize", r), () => window.removeEventListener("resize", r);
1283
- }, []), t;
1284
- }
1285
- const bo = ({
1286
- product: e
1278
+ function bo() {
1279
+ const t = () => window.innerWidth < 425 ? 1 : window.innerWidth < 768 ? 2 : 4, [e, r] = D(t);
1280
+ return gt(() => {
1281
+ const n = () => r(t());
1282
+ return window.addEventListener("resize", n), () => window.removeEventListener("resize", n);
1283
+ }, []), e;
1284
+ }
1285
+ const xo = ({
1286
+ product: t
1287
1287
  }) => {
1288
- const t = mn(), n = yo(), [r, o] = M(0), s = () => {
1288
+ const e = hr(), r = bo(), [n, o] = D(0), a = () => {
1289
1289
  o(
1290
- (a) => a + n >= e.length ? 0 : a + n
1290
+ (s) => s + r >= t.length ? 0 : s + r
1291
1291
  );
1292
1292
  }, i = () => {
1293
1293
  o(
1294
- (a) => a - n < 0 ? e.length - (e.length % n || n) : a - n
1294
+ (s) => s - r < 0 ? t.length - (t.length % r || r) : s - r
1295
1295
  );
1296
- }, c = async (a) => {
1297
- const u = await kn(a);
1298
- t(ht(u));
1296
+ }, c = async (s) => {
1297
+ const u = await kr(s);
1298
+ e(he(u));
1299
1299
  };
1300
1300
  return /* @__PURE__ */ l("div", { className: "mt-2 overflow-x-hidden", children: /* @__PURE__ */ p("div", { className: "flex items-center justify-center gap-4 relative", children: [
1301
- (e == null ? void 0 : e.length) > n && /* @__PURE__ */ l(
1301
+ (t == null ? void 0 : t.length) > r && /* @__PURE__ */ l(
1302
1302
  "button",
1303
1303
  {
1304
1304
  onClick: i,
1305
1305
  className: "absolute z-50 left-0 text-[#000000] bg-[#ffffff] rounded-full p-2 flex items-center h-fit",
1306
- children: /* @__PURE__ */ l(Xt, { icon: "mdi:chevron-left", width: "25" })
1306
+ children: /* @__PURE__ */ l(Ze, { icon: "mdi:chevron-left", width: "25" })
1307
1307
  }
1308
1308
  ),
1309
- /* @__PURE__ */ l("div", { className: "flex gap-5 justify-center flex-1 overflow-hidden", children: e.slice(r, r + n).map((a) => {
1310
- var u, d, h, m;
1309
+ /* @__PURE__ */ l("div", { className: "flex gap-5 justify-center flex-1 overflow-hidden", children: t.slice(n, n + r).map((s) => {
1310
+ var u, f, h, m;
1311
1311
  return /* @__PURE__ */ p(
1312
1312
  "div",
1313
1313
  {
1314
1314
  className: "flex-shrink-0 flex flex-col w-[150px] h-[200px] p-2 items-center justify-between cursor-pointer bg-[#FFFFFF] rounded-[10px] shadow-[0px_2px_2px_0px_#9292BC40]",
1315
1315
  onClick: () => {
1316
- c(a.product_id ?? a.productId);
1316
+ c(s.product_id ?? s.productId);
1317
1317
  },
1318
1318
  children: [
1319
1319
  /* @__PURE__ */ l("div", { className: "w-full p-2 flex items-center justify-center bg-white", children: /* @__PURE__ */ l(
1320
1320
  "img",
1321
1321
  {
1322
- src: ((u = Ut(a)[0]) == null ? void 0 : u.link) || Ut(a)[0] || // fallback if it's a string
1322
+ src: ((u = Me(s)[0]) == null ? void 0 : u.link) || Me(s)[0] || // fallback if it's a string
1323
1323
  "https://via.placeholder.com/120",
1324
- alt: a != null && a.productName ? a.productName : "Product",
1324
+ alt: s != null && s.productName ? s.productName : "Product",
1325
1325
  className: "w-28 h-28 rounded-[10px] transition-transform duration-300 hover:scale-125 object-cover"
1326
1326
  }
1327
1327
  ) }),
@@ -1331,8 +1331,8 @@ const bo = ({
1331
1331
  className: "text-white w-full p-2 text-[12px] text-center h-[60px]",
1332
1332
  children: [
1333
1333
  /* @__PURE__ */ p("div", { className: "relative inline-block group", children: [
1334
- /* @__PURE__ */ l("div", { className: "w-full line-clamp-1 overflow-hidden text-ellipsis text-[#000000] font-medium font-nunitoSans", children: a != null && a.productName ? a.productName : a != null && a.product_name ? a.product_name : Bt(
1335
- Mt((d = a == null ? void 0 : a.name) == null ? void 0 : d["en-US"]),
1334
+ /* @__PURE__ */ l("div", { className: "w-full line-clamp-1 overflow-hidden text-ellipsis text-[#000000] font-medium font-nunitoSans", children: s != null && s.productName ? s.productName : s != null && s.product_name ? s.product_name : Be(
1335
+ De((f = s == null ? void 0 : s.name) == null ? void 0 : f["en-US"]),
1336
1336
  60
1337
1337
  ) || "Product" }),
1338
1338
  /* @__PURE__ */ l(
@@ -1346,21 +1346,21 @@ const bo = ({
1346
1346
  marginBottom: "5px",
1347
1347
  zIndex: 50
1348
1348
  },
1349
- children: a != null && a.productName ? a.productName : a != null && a.product_name ? a.product_name : Bt(
1350
- Mt((h = a == null ? void 0 : a.name) == null ? void 0 : h["en-US"]),
1349
+ children: s != null && s.productName ? s.productName : s != null && s.product_name ? s.product_name : Be(
1350
+ De((h = s == null ? void 0 : s.name) == null ? void 0 : h["en-US"]),
1351
1351
  60
1352
1352
  ) || "Product"
1353
1353
  }
1354
1354
  )
1355
1355
  ] }),
1356
1356
  /* @__PURE__ */ p("div", { className: " flex text-center items-center gap-2 text-[14px] text-[#14121F] font-bold font-nunitoSans text-base mb-1", children: [
1357
- /* @__PURE__ */ l("p", { children: pr(
1358
- a != null && a.price ? Number(a == null ? void 0 : a.price) : qt(a).centAmount || 0,
1359
- (m = qt(a)) == null ? void 0 : m.currencyCode
1357
+ /* @__PURE__ */ l("p", { children: mn(
1358
+ s != null && s.price ? Number(s == null ? void 0 : s.price) : Ue(s).centAmount || 0,
1359
+ (m = Ue(s)) == null ? void 0 : m.currencyCode
1360
1360
  ) }),
1361
1361
  /* @__PURE__ */ p("p", { className: "text-[#14121F] font-normal line-through text-sm font-nunitoSans truncate", children: [
1362
1362
  "$",
1363
- Number(a == null ? void 0 : a.price).toFixed(2) ?? 5
1363
+ Number(s == null ? void 0 : s.price).toFixed(2) ?? 5
1364
1364
  ] })
1365
1365
  ] })
1366
1366
  ]
@@ -1368,19 +1368,19 @@ const bo = ({
1368
1368
  )
1369
1369
  ]
1370
1370
  },
1371
- a.productId
1371
+ s.productId
1372
1372
  );
1373
1373
  }) }),
1374
- (e == null ? void 0 : e.length) > n && /* @__PURE__ */ l(
1374
+ (t == null ? void 0 : t.length) > r && /* @__PURE__ */ l(
1375
1375
  "button",
1376
1376
  {
1377
- onClick: s,
1377
+ onClick: a,
1378
1378
  className: "absolute z-50 right-0 text-[#000000] bg-[#ffffff] rounded-full p-2 flex items-center h-fit",
1379
- children: /* @__PURE__ */ l(Xt, { icon: "mdi:chevron-right", width: "25" })
1379
+ children: /* @__PURE__ */ l(Ze, { icon: "mdi:chevron-right", width: "25" })
1380
1380
  }
1381
1381
  )
1382
1382
  ] }) });
1383
- }, wo = ({ chat: e, storeDetails: t }) => /* @__PURE__ */ l("div", { className: "bg-[#FFFFFF] px-7 py-4 rounded-r-xl rounded-bl-2xl w-full", children: e.map((n, r) => /* @__PURE__ */ p(
1383
+ }, vo = ({ chat: t, storeDetails: e }) => /* @__PURE__ */ l("div", { className: "bg-[#FFFFFF] px-7 py-4 rounded-r-xl rounded-bl-2xl w-full", children: t.map((r, n) => /* @__PURE__ */ p(
1384
1384
  "div",
1385
1385
  {
1386
1386
  className: "mb-4 p-3 rounded-xl",
@@ -1393,216 +1393,216 @@ const bo = ({
1393
1393
  "div",
1394
1394
  {
1395
1395
  className: "font-nunitoSans font-bold text-sm text-[#494949] p-2 w-fit rounded-[20px]",
1396
- children: hr(n.keyword) || "No keyword"
1396
+ children: gn(r.keyword) || "No keyword"
1397
1397
  }
1398
1398
  ),
1399
1399
  /* @__PURE__ */ l(
1400
- bo,
1400
+ xo,
1401
1401
  {
1402
- product: n.items,
1403
- storeDetails: t
1402
+ product: r.items,
1403
+ storeDetails: e
1404
1404
  }
1405
1405
  )
1406
1406
  ]
1407
1407
  },
1408
- r
1409
- )) }), Dn = async (e, t) => {
1410
- const { serverUrl: n, basePath: r } = ye(), o = `${n}`;
1408
+ n
1409
+ )) }), Lr = async (t, e) => {
1410
+ const { serverUrl: r, basePath: n } = wt(), o = `${r}`;
1411
1411
  console.log(`customer_token
1412
- `, e);
1412
+ `, t);
1413
1413
  try {
1414
- return (await q.post(
1415
- `${o}${r}/basket/create?baseUrl=${ce()}&siteId=${ne()}&pubCfg=${le()}&envRef=${ue()}&orgRef=${fe()}`,
1416
- t,
1414
+ return (await U.post(
1415
+ `${o}${n}/basket/create?baseUrl=${ct()}&siteId=${rt()}&pubCfg=${lt()}&envRef=${ut()}&orgRef=${dt()}`,
1416
+ e,
1417
1417
  {
1418
1418
  headers: {
1419
1419
  "Content-Type": "application/json",
1420
- Authorization: e
1420
+ Authorization: t
1421
1421
  }
1422
1422
  }
1423
1423
  )).data;
1424
- } catch (s) {
1425
- return q.isAxiosError(s) ? console.error("Error creating basket:", s.response || s.message) : console.error("Unexpected error:", s), null;
1424
+ } catch (a) {
1425
+ return U.isAxiosError(a) ? console.error("Error creating basket:", a.response || a.message) : console.error("Unexpected error:", a), null;
1426
1426
  }
1427
- }, Qe = async (e, t, n) => {
1428
- const { serverUrl: r, basePath: o } = ye(), s = `${r}`;
1427
+ }, Wt = async (t, e, r) => {
1428
+ const { serverUrl: n, basePath: o } = wt(), a = `${n}`;
1429
1429
  try {
1430
- const i = await q.post(
1431
- `${s}${o}/basket/add-product/${e}?baseUrl=${ce()}&siteId=${ne()}&pubCfg=${le()}&envRef=${ue()}&orgRef=${fe()}`,
1432
- t,
1430
+ const i = await U.post(
1431
+ `${a}${o}/basket/add-product/${t}?baseUrl=${ct()}&siteId=${rt()}&pubCfg=${lt()}&envRef=${ut()}&orgRef=${dt()}`,
1432
+ e,
1433
1433
  {
1434
1434
  headers: {
1435
1435
  "Content-Type": "application/json",
1436
- Authorization: n
1436
+ Authorization: r
1437
1437
  }
1438
1438
  }
1439
1439
  );
1440
1440
  return i.status === 200 && i.data ? i.data : null;
1441
1441
  } catch (i) {
1442
- return q.isAxiosError(i) ? console.error(
1442
+ return U.isAxiosError(i) ? console.error(
1443
1443
  "Error adding products to basket:",
1444
1444
  i.response || i.message
1445
1445
  ) : console.error("Unexpected error:", i), null;
1446
1446
  }
1447
- }, Mn = async ({
1448
- basketId: e,
1449
- customer_token: t
1447
+ }, zr = async ({
1448
+ basketId: t,
1449
+ customer_token: e
1450
1450
  }) => {
1451
- var s;
1452
- const { serverUrl: n, basePath: r } = ye(), o = `${n}`;
1451
+ var a;
1452
+ const { serverUrl: r, basePath: n } = wt(), o = `${r}`;
1453
1453
  try {
1454
- const i = await q.get(
1455
- `${o}${r}/basket/${e}?baseUrl=${ce()}&siteId=${ne()}&pubCfg=${le()}&envRef=${ue()}&orgRef=${fe()}`,
1454
+ const i = await U.get(
1455
+ `${o}${n}/basket/${t}?baseUrl=${ct()}&siteId=${rt()}&pubCfg=${lt()}&envRef=${ut()}&orgRef=${dt()}`,
1456
1456
  {
1457
1457
  headers: {
1458
1458
  "Content-Type": "application/json",
1459
- Authorization: t
1459
+ Authorization: e
1460
1460
  }
1461
1461
  }
1462
1462
  );
1463
1463
  return { status: i.status, data: i.data };
1464
1464
  } catch (i) {
1465
- return q.isAxiosError(i) ? { status: (s = i.response) == null ? void 0 : s.status, data: null } : { status: null, data: null };
1465
+ return U.isAxiosError(i) ? { status: (a = i.response) == null ? void 0 : a.status, data: null } : { status: null, data: null };
1466
1466
  }
1467
- }, en = "sfcc_basket_id", tn = "sfcc_customer_token", qe = "sfcc_token_expiry", xo = 300 * 1e3, Ae = "1.0.0";
1468
- const Fe = (e) => {
1467
+ }, tr = "sfcc_basket_id", er = "sfcc_customer_token", Ut = "sfcc_token_expiry", ko = 300 * 1e3, At = "1.0.0";
1468
+ const Nt = (t) => {
1469
1469
  try {
1470
- e ? localStorage.setItem(en, e) : localStorage.removeItem(en);
1471
- } catch (t) {
1472
- console.error("Error saving basket ID to storage:", t);
1470
+ t ? localStorage.setItem(tr, t) : localStorage.removeItem(tr);
1471
+ } catch (e) {
1472
+ console.error("Error saving basket ID to storage:", e);
1473
1473
  }
1474
- }, Ye = (e) => {
1474
+ }, Qt = (t) => {
1475
1475
  try {
1476
- if (e) {
1477
- localStorage.setItem(tn, e);
1478
- const t = Date.now() + xo;
1479
- localStorage.setItem(qe, t.toString());
1476
+ if (t) {
1477
+ localStorage.setItem(er, t);
1478
+ const e = Date.now() + ko;
1479
+ localStorage.setItem(Ut, e.toString());
1480
1480
  } else
1481
- localStorage.removeItem(tn);
1482
- } catch (t) {
1483
- console.error("Error storing token:", t);
1484
- }
1485
- }, nn = 300, vo = () => {
1486
- var c, a, u, d, h, m;
1487
- const e = mn(), t = Ge((g) => g.product.product), n = Ge((g) => g.store.store), [r, o] = M(!!t);
1488
- if (ge(() => {
1489
- o(!!t);
1490
- }, [t]), !t) return null;
1491
- const s = async () => {
1492
- var g, S, _, y, v, B, P, j, X, k, L, z, V, O, be, E;
1493
- console.log(t, "the prod");
1481
+ localStorage.removeItem(er);
1482
+ } catch (e) {
1483
+ console.error("Error storing token:", e);
1484
+ }
1485
+ }, rr = 300, So = () => {
1486
+ var c, s, u, f, h, m;
1487
+ const t = hr(), e = Kt((g) => g.product.product), r = Kt((g) => g.store.store), [n, o] = D(!!e);
1488
+ if (gt(() => {
1489
+ o(!!e);
1490
+ }, [e]), !e) return null;
1491
+ const a = async () => {
1492
+ var g, k, _, w, v, B, P, $, Z, S, L, H, V, O, yt, T;
1493
+ console.log(e, "the prod");
1494
1494
  try {
1495
- if (!((S = (g = t == null ? void 0 : t.variants) == null ? void 0 : g[0]) != null && S.product_id) && !(t.type.item || t.type.bundle) && !((y = (_ = t == null ? void 0 : t.variants) == null ? void 0 : _[0]) != null && y.productId)) {
1496
- Z.error("Variants not available", {
1495
+ if (!((k = (g = e == null ? void 0 : e.variants) == null ? void 0 : g[0]) != null && k.product_id) && !(e.type.item || e.type.bundle) && !((w = (_ = e == null ? void 0 : e.variants) == null ? void 0 : _[0]) != null && w.productId)) {
1496
+ X.error("Variants not available", {
1497
1497
  position: "bottom-right",
1498
1498
  autoClose: 1e3
1499
1499
  }), console.error("No product variant found");
1500
1500
  return;
1501
1501
  }
1502
- const $ = [
1502
+ const j = [
1503
1503
  {
1504
- product_id: ((v = t.variants) == null ? void 0 : v[0].product_id) || ((B = t.variants) == null ? void 0 : B[0].productId) || (t == null ? void 0 : t.id),
1504
+ product_id: ((v = e.variants) == null ? void 0 : v[0].product_id) || ((B = e.variants) == null ? void 0 : B[0].productId) || (e == null ? void 0 : e.id),
1505
1505
  quantity: 1
1506
1506
  }
1507
1507
  ];
1508
- console.log($, "the product data");
1509
- const Pe = JSON.parse(
1508
+ console.log(j, "the product data");
1509
+ const Pt = JSON.parse(
1510
1510
  sessionStorage.getItem("customerData") || "{}"
1511
- ), de = Pe == null ? void 0 : Pe.basketId, tt = !1, re = localStorage.getItem(qe), pe = Date.now();
1512
- if (!tt || !re || pe >= parseInt(re)) {
1513
- let J = "";
1511
+ ), ft = Pt == null ? void 0 : Pt.basketId, ee = !1, nt = localStorage.getItem(Ut), pt = Date.now();
1512
+ if (!ee || !nt || pt >= parseInt(nt)) {
1513
+ let Y = "";
1514
1514
  {
1515
- const we = await Xe();
1516
- console.log("token from auth data"), J = "Bearer " + we.access_token;
1515
+ const bt = await Zt();
1516
+ console.log("token from auth data"), Y = "Bearer " + bt.access_token;
1517
1517
  }
1518
- if (!J) {
1518
+ if (!Y) {
1519
1519
  console.error("Failed to get customer_token");
1520
1520
  return;
1521
1521
  }
1522
- const nt = pe + 300 * 1e3;
1523
- if (Ye(J), localStorage.setItem(qe, nt.toString()), de) {
1524
- const we = await Mn({
1525
- basketId: de,
1526
- customer_token: J
1522
+ const re = pt + 300 * 1e3;
1523
+ if (Qt(Y), localStorage.setItem(Ut, re.toString()), ft) {
1524
+ const bt = await zr({
1525
+ basketId: ft,
1526
+ customer_token: Y
1527
1527
  });
1528
- if (console.log(de, "basket id from customer"), we.status === 200 && we) {
1529
- const oe = await Qe(
1530
- de,
1531
- $,
1532
- J
1528
+ if (console.log(ft, "basket id from customer"), bt.status === 200 && bt) {
1529
+ const ot = await Wt(
1530
+ ft,
1531
+ j,
1532
+ Y
1533
1533
  );
1534
- (((P = oe == null ? void 0 : oe.product_items) == null ? void 0 : P.length) > 0 || ((j = oe == null ? void 0 : oe.productItems) == null ? void 0 : j.length) > 0) && (Z.success("Added to cart", {
1534
+ (((P = ot == null ? void 0 : ot.product_items) == null ? void 0 : P.length) > 0 || (($ = ot == null ? void 0 : ot.productItems) == null ? void 0 : $.length) > 0) && (X.success("Added to cart", {
1535
1535
  position: "bottom-right",
1536
1536
  autoClose: 3e3,
1537
1537
  hideProgressBar: !1,
1538
1538
  closeOnClick: !0,
1539
1539
  pauseOnHover: !0,
1540
1540
  draggable: !0
1541
- }), Ne(de));
1541
+ }), Ft(ft));
1542
1542
  return;
1543
1543
  }
1544
1544
  }
1545
- const rt = {
1545
+ const ne = {
1546
1546
  productItems: [
1547
1547
  {
1548
- productId: ((X = t.variants) == null ? void 0 : X[0].product_id) || ((k = t.variants) == null ? void 0 : k[0].productId) || (t == null ? void 0 : t.id),
1548
+ productId: ((Z = e.variants) == null ? void 0 : Z[0].product_id) || ((S = e.variants) == null ? void 0 : S[0].productId) || (e == null ? void 0 : e.id),
1549
1549
  quantity: 1
1550
1550
  }
1551
1551
  ]
1552
1552
  };
1553
1553
  console.log("before create basket");
1554
- const w = await Dn(J, rt);
1554
+ const b = await Lr(Y, ne);
1555
1555
  if (console.log(
1556
- w,
1557
- w == null ? void 0 : w.basket_id,
1558
- w == null ? void 0 : w.basketId,
1556
+ b,
1557
+ b == null ? void 0 : b.basket_id,
1558
+ b == null ? void 0 : b.basketId,
1559
1559
  "the basket response"
1560
- ), !(w != null && w.basket_id) && !(w != null && w.basketId)) {
1560
+ ), !(b != null && b.basket_id) && !(b != null && b.basketId)) {
1561
1561
  console.error("Failed to create basket");
1562
1562
  return;
1563
1563
  }
1564
1564
  console.log(
1565
1565
  "setting stored id",
1566
- (w == null ? void 0 : w.basket_id) || (w == null ? void 0 : w.basketId)
1567
- ), Fe(
1568
- (w == null ? void 0 : w.basket_id) || (w == null ? void 0 : w.basketId)
1566
+ (b == null ? void 0 : b.basket_id) || (b == null ? void 0 : b.basketId)
1567
+ ), Nt(
1568
+ (b == null ? void 0 : b.basket_id) || (b == null ? void 0 : b.basketId)
1569
1569
  ), console.log("adding product to basket");
1570
- const K = await Qe(
1571
- (w == null ? void 0 : w.basket_id) || (w == null ? void 0 : w.basketId),
1572
- $,
1573
- J
1570
+ const J = await Wt(
1571
+ (b == null ? void 0 : b.basket_id) || (b == null ? void 0 : b.basketId),
1572
+ j,
1573
+ Y
1574
1574
  );
1575
- console.log("object added to basket"), (((L = K == null ? void 0 : K.product_items) == null ? void 0 : L.length) > 0 || ((z = K == null ? void 0 : K.productItems) == null ? void 0 : z.length) > 0) && Z.success("Added to cart", {
1575
+ console.log("object added to basket"), (((L = J == null ? void 0 : J.product_items) == null ? void 0 : L.length) > 0 || ((H = J == null ? void 0 : J.productItems) == null ? void 0 : H.length) > 0) && X.success("Added to cart", {
1576
1576
  position: "bottom-right",
1577
1577
  autoClose: 3e3,
1578
1578
  hideProgressBar: !1,
1579
1579
  closeOnClick: !0,
1580
1580
  pauseOnHover: !0,
1581
1581
  draggable: !0
1582
- }), Ne(w.basket_id || (w == null ? void 0 : w.basketId));
1582
+ }), Ft(b.basket_id || (b == null ? void 0 : b.basketId));
1583
1583
  }
1584
- } catch ($) {
1585
- console.error("Error adding to cart:", $), Z.error("Failed to add product to cart", {
1584
+ } catch (j) {
1585
+ console.error("Error adding to cart:", j), X.error("Failed to add product to cart", {
1586
1586
  position: "bottom-right",
1587
1587
  autoClose: 3e3
1588
- }), ((V = $ == null ? void 0 : $.response) == null ? void 0 : V.status) === 404 || // Basket not found
1589
- ((O = $ == null ? void 0 : $.response) == null ? void 0 : O.status) === 401 ? (((be = $ == null ? void 0 : $.response) == null ? void 0 : be.status) === 404 && Fe(null), ((E = $ == null ? void 0 : $.response) == null ? void 0 : E.status) === 401 && (Fe(null), Ye(null))) : (console.error("Failed to add product to basket:", $.message), Z.error("Failed to add product to cart", {
1588
+ }), ((V = j == null ? void 0 : j.response) == null ? void 0 : V.status) === 404 || // Basket not found
1589
+ ((O = j == null ? void 0 : j.response) == null ? void 0 : O.status) === 401 ? (((yt = j == null ? void 0 : j.response) == null ? void 0 : yt.status) === 404 && Nt(null), ((T = j == null ? void 0 : j.response) == null ? void 0 : T.status) === 401 && (Nt(null), Qt(null))) : (console.error("Failed to add product to basket:", j.message), X.error("Failed to add product to cart", {
1590
1590
  position: "bottom-right",
1591
1591
  autoClose: 3e3
1592
1592
  }));
1593
1593
  } finally {
1594
- Ne();
1594
+ Ft();
1595
1595
  }
1596
1596
  }, i = () => {
1597
- t && (window.location.href = t.c_pdpUrl);
1597
+ e && (window.location.href = e.c_pdpUrl);
1598
1598
  };
1599
- return console.log(t, "the prod"), /* @__PURE__ */ p(dt, { children: [
1599
+ return console.log(e, "the prod"), /* @__PURE__ */ p(fe, { children: [
1600
1600
  /* @__PURE__ */ l(
1601
1601
  "div",
1602
1602
  {
1603
1603
  className: "fixed inset-0 z-40 bg-black/30",
1604
1604
  onClick: () => {
1605
- o(!1), setTimeout(() => e(ht(null)), nn);
1605
+ o(!1), setTimeout(() => t(he(null)), rr);
1606
1606
  }
1607
1607
  }
1608
1608
  ),
@@ -1612,22 +1612,22 @@ const Fe = (e) => {
1612
1612
  className: `
1613
1613
  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
1614
1614
  transition-all duration-300
1615
- ${r ? "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"}
1615
+ ${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"}
1616
1616
  `,
1617
1617
  style: { willChange: "transform, opacity" },
1618
1618
  onClick: (g) => g.stopPropagation(),
1619
1619
  children: [
1620
1620
  /* @__PURE__ */ p("div", { className: "mt-3 flex flex-row justify-between w-full ", children: [
1621
- /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l("p", { className: "text-[#000000] font-bold font-nunitoSans", children: t.name }) }),
1621
+ /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l("p", { className: "text-[#000000] font-bold font-nunitoSans", children: e.name }) }),
1622
1622
  /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l(
1623
- Lt,
1623
+ Le,
1624
1624
  {
1625
1625
  icon: "mdi:close",
1626
1626
  className: "text-[#555555] w-6 h-6 cursor-pointer",
1627
1627
  onClick: () => {
1628
1628
  o(!1), setTimeout(
1629
- () => e(ht(null)),
1630
- nn
1629
+ () => t(he(null)),
1630
+ rr
1631
1631
  );
1632
1632
  }
1633
1633
  }
@@ -1637,20 +1637,20 @@ const Fe = (e) => {
1637
1637
  /* @__PURE__ */ l("div", { className: "flex flex-row items-center justify-center w-[120px] h-[120px] my-5", children: /* @__PURE__ */ l(
1638
1638
  "img",
1639
1639
  {
1640
- src: (d = (u = (a = (c = t.imageGroups) == null ? void 0 : c[0]) == null ? void 0 : a.images) == null ? void 0 : u[0]) == null ? void 0 : d.link,
1641
- alt: t.name,
1640
+ src: (f = (u = (s = (c = e.imageGroups) == null ? void 0 : c[0]) == null ? void 0 : s.images) == null ? void 0 : u[0]) == null ? void 0 : f.link,
1641
+ alt: e.name,
1642
1642
  className: "rounded-[10px]"
1643
1643
  }
1644
1644
  ) }),
1645
- /* @__PURE__ */ l("div", { className: "flex flex-col items-center gap-2", children: t.imageGroups.slice(1, 2).map(
1646
- (g) => g.images.slice(1, 2).map((S) => /* @__PURE__ */ l(
1645
+ /* @__PURE__ */ l("div", { className: "flex flex-col items-center gap-2", children: e.imageGroups.slice(1, 2).map(
1646
+ (g) => g.images.slice(1, 2).map((k) => /* @__PURE__ */ l(
1647
1647
  "img",
1648
1648
  {
1649
- src: S.link,
1650
- alt: t.name,
1649
+ src: k.link,
1650
+ alt: e.name,
1651
1651
  className: "rounded-[10px] w-[60px] h-[60px]"
1652
1652
  },
1653
- S.link
1653
+ k.link
1654
1654
  ))
1655
1655
  ) })
1656
1656
  ] }),
@@ -1659,16 +1659,16 @@ const Fe = (e) => {
1659
1659
  /* @__PURE__ */ p("p", { className: "text-[#14121F] font-bold font-nunitoSans", children: [
1660
1660
  " ",
1661
1661
  "$",
1662
- t.price.toFixed(2)
1662
+ e.price.toFixed(2)
1663
1663
  ] }),
1664
1664
  " ",
1665
1665
  /* @__PURE__ */ p("p", { className: "text-[#14121F] font-normal line-through text-sm font-nunitoSans", children: [
1666
1666
  " ",
1667
1667
  "$",
1668
- (t.price + 5).toFixed(2)
1668
+ (e.price + 5).toFixed(2)
1669
1669
  ] })
1670
1670
  ] }),
1671
- /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l("p", { className: "text-[#EC5050] font-bold font-nunitoSans", children: t.discount }) })
1671
+ /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l("p", { className: "text-[#EC5050] font-bold font-nunitoSans", children: e.discount }) })
1672
1672
  ] }),
1673
1673
  /* @__PURE__ */ l("div", { className: "mt-2 w-full border-t-2 border-gray-200" }),
1674
1674
  /* @__PURE__ */ p("div", { className: "w-full text-left", children: [
@@ -1677,37 +1677,37 @@ const Fe = (e) => {
1677
1677
  "div",
1678
1678
  {
1679
1679
  className: "text-[#68656E] font-normal font-nunitoSans text-xs pl-2 mt-3",
1680
- dangerouslySetInnerHTML: { __html: t.short_description || t.longDescription }
1680
+ dangerouslySetInnerHTML: { __html: e.short_description || e.longDescription }
1681
1681
  }
1682
1682
  )
1683
1683
  ] }),
1684
1684
  /* @__PURE__ */ p("div", { className: "mt-4 flex flex-col gap-2 w-full p-2", children: [
1685
1685
  /* @__PURE__ */ l("div", { className: "flex flex-row items-center gap-2", children: /* @__PURE__ */ p("div", { className: "flex items-center gap-2 text-left font-nunitoSans", children: [
1686
1686
  /* @__PURE__ */ p("div", { className: "text-[#323135] font-bold", children: [
1687
- ((h = t == null ? void 0 : t.rating) == null ? void 0 : h.rate) || 0,
1687
+ ((h = e == null ? void 0 : e.rating) == null ? void 0 : h.rate) || 0,
1688
1688
  " /",
1689
1689
  " ",
1690
1690
  /* @__PURE__ */ l("span", { className: "text-[#68656E]", children: "5" })
1691
1691
  ] }),
1692
1692
  /* @__PURE__ */ l("div", { className: "text-[#323135] font-semibold text-sm", children: "Overall Rating" }),
1693
1693
  /* @__PURE__ */ p("div", { className: "text-[#68656E] font-semibold text-sm", children: [
1694
- ((m = t == null ? void 0 : t.rating) == null ? void 0 : m.count) || 0,
1694
+ ((m = e == null ? void 0 : e.rating) == null ? void 0 : m.count) || 0,
1695
1695
  " ratings"
1696
1696
  ] })
1697
1697
  ] }) }),
1698
- /* @__PURE__ */ l("div", { className: "mt-2 flex flex-row items-center gap-2", children: Array.from({ length: 5 }).map((g, S) => {
1698
+ /* @__PURE__ */ l("div", { className: "mt-2 flex flex-row items-center gap-2", children: Array.from({ length: 5 }).map((g, k) => {
1699
1699
  var _;
1700
1700
  return /* @__PURE__ */ l(
1701
- Lt,
1701
+ Le,
1702
1702
  {
1703
1703
  icon: "mdi:star",
1704
1704
  width: "20",
1705
1705
  height: "20",
1706
1706
  className: `text-yellow-500
1707
- ${((_ = t == null ? void 0 : t.rating) == null ? void 0 : _.rate) > S ? "text-yellow-500" : "text-gray-300"}
1707
+ ${((_ = e == null ? void 0 : e.rating) == null ? void 0 : _.rate) > k ? "text-yellow-500" : "text-gray-300"}
1708
1708
  `
1709
1709
  },
1710
- S
1710
+ k
1711
1711
  );
1712
1712
  }) })
1713
1713
  ] }),
@@ -1721,8 +1721,8 @@ const Fe = (e) => {
1721
1721
  "button",
1722
1722
  {
1723
1723
  className: "rounded-[5px] shadow-sm text-[#FBFBFC] bg-[#6851C6] p-2 w-full text-center cursor-pointer",
1724
- style: { backgroundColor: n.tanyaThemeColor },
1725
- onClick: s,
1724
+ style: { backgroundColor: r.tanyaThemeColor },
1725
+ onClick: a,
1726
1726
  children: "Add to Cart"
1727
1727
  }
1728
1728
  ),
@@ -1730,7 +1730,7 @@ const Fe = (e) => {
1730
1730
  "button",
1731
1731
  {
1732
1732
  className: "rounded-[5px] shadow-sm text-[#FBFBFC] bg-[#6851C6] p-2 w-full text-center cursor-pointer mb-16",
1733
- style: { backgroundColor: n.tanyaThemeColor },
1733
+ style: { backgroundColor: r.tanyaThemeColor },
1734
1734
  onClick: i,
1735
1735
  children: "View more"
1736
1736
  }
@@ -1742,158 +1742,158 @@ const Fe = (e) => {
1742
1742
  }
1743
1743
  )
1744
1744
  ] });
1745
- }, So = () => {
1746
- const e = [
1745
+ }, Co = () => {
1746
+ const t = [
1747
1747
  "Myself",
1748
1748
  "My Child",
1749
1749
  "My Grandchild",
1750
1750
  "Niece/Nephew",
1751
1751
  "My Friends",
1752
1752
  "Others"
1753
- ], t = {
1753
+ ], e = {
1754
1754
  Myself: "himself/herself",
1755
1755
  "My Child": "his/her child",
1756
1756
  "My Grandchild": "his/her grandchild",
1757
1757
  "Niece/Nephew": "his/her niece/nephew",
1758
1758
  "My Friends": "his/her friends",
1759
1759
  Others: "others"
1760
- }, n = Oe(null), r = Oe(null), o = Oe(null), s = Oe(null), [i, c] = M(null), [a, u] = M(
1760
+ }, r = Ot(null), n = Ot(null), o = Ot(null), a = Ot(null), [i, c] = D(null), [s, u] = D(
1761
1761
  !1
1762
- ), [d, h] = M(!1), [m, g] = M(!1), [S, _] = M(!1), [y, v] = M(!1), [B, P] = M(!1), [j, X] = M(""), [k, L] = M(""), z = (f) => ({
1763
- id: f.id,
1764
- title: f.name,
1765
- image: f.image ?? "",
1766
- price: f.price ?? 0
1767
- }), [V, O] = M([]), be = Oe(null), E = Ge((f) => f.store.store), $ = Ge((f) => f.product.product), Pe = () => {
1762
+ ), [f, h] = D(!1), [m, g] = D(!1), [k, _] = D(!1), [w, v] = D(!1), [B, P] = D(!1), [$, Z] = D(""), [S, L] = D(""), H = (d) => ({
1763
+ id: d.id,
1764
+ title: d.name,
1765
+ image: d.image ?? "",
1766
+ price: d.price ?? 0
1767
+ }), [V, O] = D([]), yt = Ot(null), T = Kt((d) => d.store.store), j = Kt((d) => d.product.product), Pt = () => {
1768
1768
  g(!0), setTimeout(() => h(!0), 10);
1769
- }, de = () => {
1769
+ }, ft = () => {
1770
1770
  h(!1), setTimeout(() => g(!1), 300);
1771
1771
  };
1772
- ge(() => {
1773
- a ? Pe() : de();
1774
- }, [a]);
1775
- const tt = (f) => {
1776
- L(t[f]);
1772
+ gt(() => {
1773
+ s ? Pt() : ft();
1774
+ }, [s]);
1775
+ const ee = (d) => {
1776
+ L(e[d]);
1777
1777
  };
1778
- ge(() => {
1779
- be.current && (be.current.scrollTop += 150);
1778
+ gt(() => {
1779
+ yt.current && (yt.current.scrollTop += 150);
1780
1780
  }, [V]);
1781
- let re = null, pe = null;
1782
- const J = async () => {
1783
- if (re && pe && Date.now() < pe)
1784
- return re;
1781
+ let nt = null, pt = null;
1782
+ const Y = async () => {
1783
+ if (nt && pt && Date.now() < pt)
1784
+ return nt;
1785
1785
  try {
1786
- const f = "https://us-east-1lsr29ln3u.auth.us-east-1.amazoncognito.com/oauth2/token", T = new URLSearchParams({
1786
+ const d = "https://us-east-1lsr29ln3u.auth.us-east-1.amazoncognito.com/oauth2/token", E = new URLSearchParams({
1787
1787
  grant_type: "client_credentials",
1788
1788
  client_id: "4i8rd70sgt961tc4dhskgf08c",
1789
1789
  client_secret: "bnsfq1220loh2cn2cm2ttn8fdhdpt0u8m1fgj8vfk2rn61aurjg",
1790
1790
  scope: "default-m2m-resource-server-8xzfzo/read"
1791
- }), C = await fetch(f, {
1791
+ }), I = await fetch(d, {
1792
1792
  method: "POST",
1793
1793
  headers: {
1794
1794
  "Content-Type": "application/x-www-form-urlencoded"
1795
1795
  },
1796
- body: T
1796
+ body: E
1797
1797
  });
1798
- if (!C.ok)
1798
+ if (!I.ok)
1799
1799
  throw new Error(
1800
- `Token request failed! status: ${C.status}`
1800
+ `Token request failed! status: ${I.status}`
1801
1801
  );
1802
- const F = await C.json();
1803
- re = F.access_token;
1804
- const x = F.expires_in || 3600;
1805
- return pe = Date.now() + (x - 60) * 1e3, re;
1806
- } catch (f) {
1807
- return console.error("Error obtaining JWT token:", f), re = null, pe = null, null;
1802
+ const N = await I.json();
1803
+ nt = N.access_token;
1804
+ const x = N.expires_in || 3600;
1805
+ return pt = Date.now() + (x - 60) * 1e3, nt;
1806
+ } catch (d) {
1807
+ return console.error("Error obtaining JWT token:", d), nt = null, pt = null, null;
1808
1808
  }
1809
- }, nt = async () => {
1810
- const f = await Xe();
1811
- f != null && c(f);
1809
+ }, re = async () => {
1810
+ const d = await Zt();
1811
+ d != null && c(d);
1812
1812
  };
1813
- ge(() => {
1814
- nt(), console.log("scapi environment v1");
1813
+ gt(() => {
1814
+ re(), console.log("scapi environment v1");
1815
1815
  }, []);
1816
- const rt = async () => {
1817
- const f = JSON.parse(
1816
+ const ne = async () => {
1817
+ const d = JSON.parse(
1818
1818
  sessionStorage.getItem("customerData") || "{}"
1819
1819
  ).customerId;
1820
- return (await dr(f || "")).c_interests;
1821
- }, w = async (f, T) => {
1822
- console.log("in secondary flow", Ae);
1823
- const C = await rt();
1824
- if (console.log(C, "interests of customer", Ae), !!C)
1820
+ return (await hn(d || "")).c_interests;
1821
+ }, b = async (d, E) => {
1822
+ console.log("in secondary flow", At);
1823
+ const I = await ne();
1824
+ if (console.log(I, "interests of customer", At), !!I)
1825
1825
  try {
1826
1826
  O(
1827
- (Q) => Q.map(
1828
- (ee, te) => te === Q.length - 1 ? { ...ee, secondaryLoading: !0 } : ee
1827
+ (W) => W.map(
1828
+ (tt, et) => et === W.length - 1 ? { ...tt, secondaryLoading: !0 } : tt
1829
1829
  )
1830
1830
  );
1831
- const F = await J();
1832
- if (!F) throw new Error("Failed to fetch token");
1833
- const x = localStorage.getItem("customerNumber"), I = localStorage.getItem("isLoggedIn"), xe = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
1834
- registered: String(I || !1),
1831
+ const N = await Y();
1832
+ if (!N) throw new Error("Failed to fetch token");
1833
+ const x = localStorage.getItem("customerNumber"), C = localStorage.getItem("isLoggedIn"), xt = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
1834
+ registered: String(C || !1),
1835
1835
  userId: String(x || (/* @__PURE__ */ new Date()).getTime())
1836
- }).toString()}`, ve = JSON.stringify({
1836
+ }).toString()}`, vt = JSON.stringify({
1837
1837
  flowId: "Q166PR519W",
1838
1838
  flowAliasId: "HKFUVLWVH2",
1839
1839
  input: {
1840
1840
  loyaltyPoints: "",
1841
- productName: f,
1842
- productPoints: String(T || 0),
1843
- interests: C
1841
+ productName: d,
1842
+ productPoints: String(E || 0),
1843
+ interests: I
1844
1844
  }
1845
- }), G = await fetch(xe, {
1845
+ }), K = await fetch(xt, {
1846
1846
  signal: AbortSignal.timeout(3e4),
1847
1847
  method: "POST",
1848
1848
  headers: {
1849
1849
  "Content-Type": "application/json",
1850
- Authorization: `Bearer ${F}`
1850
+ Authorization: `Bearer ${N}`
1851
1851
  },
1852
- body: ve
1852
+ body: vt
1853
1853
  });
1854
- if (!G.body) throw new Error("Readable stream not supported");
1855
- const Se = G.body.getReader(), ke = new TextDecoder();
1856
- let W = "";
1854
+ if (!K.body) throw new Error("Readable stream not supported");
1855
+ const kt = K.body.getReader(), St = new TextDecoder();
1856
+ let G = "";
1857
1857
  for (; ; ) {
1858
- const { done: Q, value: ee } = await Se.read();
1859
- if (Q) break;
1860
- W += ke.decode(ee, { stream: !0 });
1861
- const te = W.split(`
1858
+ const { done: W, value: tt } = await kt.read();
1859
+ if (W) break;
1860
+ G += St.decode(tt, { stream: !0 });
1861
+ const et = G.split(`
1862
1862
  `);
1863
- W = te.pop() || "";
1864
- for (const se of te)
1865
- if (se.startsWith("data:")) {
1866
- const b = se.slice(5).trim();
1863
+ G = et.pop() || "";
1864
+ for (const at of et)
1865
+ if (at.startsWith("data:")) {
1866
+ const y = at.slice(5).trim();
1867
1867
  try {
1868
- const Y = JSON.parse(b);
1869
- Y.index === 0 && O(
1868
+ const Q = JSON.parse(y);
1869
+ Q.index === 0 && O(
1870
1870
  (A) => A.map(
1871
- (H, ie) => ie === A.length - 1 ? {
1872
- ...H,
1873
- secondaryResponse: Y.data,
1871
+ (q, it) => it === A.length - 1 ? {
1872
+ ...q,
1873
+ secondaryResponse: Q.data,
1874
1874
  secondaryLoading: !1
1875
- } : H
1875
+ } : q
1876
1876
  )
1877
1877
  );
1878
- } catch (Y) {
1878
+ } catch (Q) {
1879
1879
  O(
1880
1880
  (A) => A.map(
1881
- (H, ie) => ie === A.length - 1 ? { ...H, secondaryLoading: !1 } : H
1881
+ (q, it) => it === A.length - 1 ? { ...q, secondaryLoading: !1 } : q
1882
1882
  )
1883
- ), console.error("Secondary flow JSON parse error:", Y);
1883
+ ), console.error("Secondary flow JSON parse error:", Q);
1884
1884
  }
1885
1885
  }
1886
1886
  }
1887
- } catch (F) {
1888
- console.error("Secondary flow error:", F);
1887
+ } catch (N) {
1888
+ console.error("Secondary flow error:", N);
1889
1889
  }
1890
- }, K = async (f) => {
1891
- const T = f || j.trim();
1892
- if (T) {
1893
- v(!0), X(""), n.current = null, r.current = null, o.current = null, s.current = null, O((C) => [
1894
- ...C,
1890
+ }, J = async (d) => {
1891
+ const E = d || $.trim();
1892
+ if (E) {
1893
+ v(!0), Z(""), r.current = null, n.current = null, o.current = null, a.current = null, O((I) => [
1894
+ ...I,
1895
1895
  {
1896
- query: T,
1896
+ query: E,
1897
1897
  response: "Thinking for what suits you best...",
1898
1898
  potentialQuestions: "",
1899
1899
  products: [],
@@ -1901,52 +1901,52 @@ const Fe = (e) => {
1901
1901
  }
1902
1902
  ]);
1903
1903
  try {
1904
- const C = k, F = localStorage.getItem("customerNumber"), x = localStorage.getItem("isLoggedIn"), I = await J();
1905
- if (!I)
1904
+ const I = S, N = localStorage.getItem("customerNumber"), x = localStorage.getItem("isLoggedIn"), C = await Y();
1905
+ if (!C)
1906
1906
  throw new Error("Failed to obtain access token");
1907
- const xe = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
1907
+ const xt = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
1908
1908
  registered: String(x || !1),
1909
- userId: String(F || (/* @__PURE__ */ new Date()).getTime())
1910
- }).toString()}`, ve = JSON.stringify({
1909
+ userId: String(N || (/* @__PURE__ */ new Date()).getTime())
1910
+ }).toString()}`, vt = JSON.stringify({
1911
1911
  flowId: "MMHQKYI1NE",
1912
1912
  flowAliasId: "SZF9ZK1ATE",
1913
1913
  input: {
1914
- userPrompt: T,
1915
- whom: C
1914
+ userPrompt: E,
1915
+ whom: I
1916
1916
  }
1917
- }), G = await fetch(xe, {
1917
+ }), K = await fetch(xt, {
1918
1918
  signal: AbortSignal.timeout(3e4),
1919
1919
  method: "POST",
1920
1920
  headers: {
1921
1921
  "Content-Type": "application/json",
1922
- Authorization: `Bearer ${I}`
1922
+ Authorization: `Bearer ${C}`
1923
1923
  },
1924
- body: ve
1924
+ body: vt
1925
1925
  });
1926
- if (!G.ok)
1927
- throw new Error(`HTTP error! status: ${G.status}`);
1928
- if (!G.body) throw new Error("Readable stream not supported");
1929
- const Se = G.body.getReader(), ke = new TextDecoder();
1930
- let W = "", Q = "";
1926
+ if (!K.ok)
1927
+ throw new Error(`HTTP error! status: ${K.status}`);
1928
+ if (!K.body) throw new Error("Readable stream not supported");
1929
+ const kt = K.body.getReader(), St = new TextDecoder();
1930
+ let G = "", W = "";
1931
1931
  for (; ; ) {
1932
1932
  P(!0);
1933
- const { done: ee, value: te } = await Se.read();
1934
- if (ee) break;
1935
- W += ke.decode(te, { stream: !0 });
1936
- const se = W.split(`
1933
+ const { done: tt, value: et } = await kt.read();
1934
+ if (tt) break;
1935
+ G += St.decode(et, { stream: !0 });
1936
+ const at = G.split(`
1937
1937
  `);
1938
- W = se.pop() || "";
1939
- for (const b of se)
1940
- if (b.startsWith("data:")) {
1941
- const Y = b.slice(5).trim();
1938
+ G = at.pop() || "";
1939
+ for (const y of at)
1940
+ if (y.startsWith("data:")) {
1941
+ const Q = y.slice(5).trim();
1942
1942
  try {
1943
- const A = JSON.parse(Y);
1944
- A.index == 1 && (Q = A.data), O(
1945
- (H) => H.map(
1946
- (ie, Be) => Be === H.length - 1 ? {
1947
- ...ie,
1943
+ const A = JSON.parse(Q);
1944
+ A.index == 1 && (W = A.data), O(
1945
+ (q) => q.map(
1946
+ (it, Bt) => Bt === q.length - 1 ? {
1947
+ ...it,
1948
1948
  [A.index == 0 ? "response" : A.index == 1 ? "keywords" : A.index == 2 ? "potentialQuestions" : "end"]: A.data
1949
- } : ie
1949
+ } : it
1950
1950
  )
1951
1951
  );
1952
1952
  } catch (A) {
@@ -1954,189 +1954,189 @@ const Fe = (e) => {
1954
1954
  }
1955
1955
  }
1956
1956
  }
1957
- oe(we(Q));
1958
- } catch (C) {
1959
- console.error("Error sending message to Tanya:", C);
1957
+ ot(bt(W));
1958
+ } catch (I) {
1959
+ console.error("Error sending message to Tanya:", I);
1960
1960
  } finally {
1961
1961
  v(!1);
1962
1962
  }
1963
1963
  }
1964
- }, we = (f) => {
1965
- const T = f.match(
1964
+ }, bt = (d) => {
1965
+ const E = d.match(
1966
1966
  /top five relevant product or category names are: (.*)/i
1967
- ), x = (T ? T[1] : f).split(", ").map((R) => R.replace(/\s*(Toys|Bags|Miniature|etc\.*)\s*/gi, "").trim());
1967
+ ), x = (E ? E[1] : d).split(", ").map((R) => R.replace(/\s*(Toys|Bags|Miniature|etc\.*)\s*/gi, "").trim());
1968
1968
  return [...new Set(x)].filter(Boolean).join(",");
1969
- }, oe = async (f) => {
1970
- if (console.log(i == null ? void 0 : i.access_token, "access_token"), typeof f == "string") {
1971
- console.log(f, "keywords");
1972
- const T = f.split(",");
1973
- for (const C of T) {
1974
- const F = await Dt(
1975
- C,
1969
+ }, ot = async (d) => {
1970
+ if (console.log(i == null ? void 0 : i.access_token, "access_token"), typeof d == "string") {
1971
+ console.log(d, "keywords");
1972
+ const E = d.split(",");
1973
+ for (const I of E) {
1974
+ const N = await ze(
1975
+ I,
1976
1976
  i == null ? void 0 : i.access_token
1977
1977
  );
1978
- if (P(!1), (F == null ? void 0 : F.length) > 0 && (O(
1978
+ if (P(!1), (N == null ? void 0 : N.length) > 0 && (O(
1979
1979
  (x) => x.map(
1980
- (I, R) => R === x.length - 1 ? {
1981
- ...I,
1980
+ (C, R) => R === x.length - 1 ? {
1981
+ ...C,
1982
1982
  products: [
1983
- ...I.products || [],
1984
- { keyword: C, items: F, loading: !1 }
1983
+ ...C.products || [],
1984
+ { keyword: I, items: N, loading: !1 }
1985
1985
  ]
1986
- } : I
1986
+ } : C
1987
1987
  )
1988
- ), !n.current || r.current == null)) {
1989
- const x = F[0];
1990
- n.current = String((x == null ? void 0 : x.product_name) ?? ""), o.current = x.image.link, r.current = x.product_id;
1991
- const I = typeof (x == null ? void 0 : x.price) == "number" ? x.price : void 0;
1992
- s.current = typeof I == "number" && Number.isFinite(I) ? I : null;
1988
+ ), !r.current || n.current == null)) {
1989
+ const x = N[0];
1990
+ r.current = String((x == null ? void 0 : x.product_name) ?? ""), o.current = x.image.link, n.current = x.product_id;
1991
+ const C = typeof (x == null ? void 0 : x.price) == "number" ? x.price : void 0;
1992
+ a.current = typeof C == "number" && Number.isFinite(C) ? C : null;
1993
1993
  }
1994
1994
  }
1995
1995
  } else
1996
- for (const T of f) {
1997
- const C = await Dt(
1998
- T,
1996
+ for (const E of d) {
1997
+ const I = await ze(
1998
+ E,
1999
1999
  i == null ? void 0 : i.access_token
2000
2000
  );
2001
- P(!1), (C == null ? void 0 : C.length) > 0 && O(
2002
- (F) => F.map(
2003
- (x, I) => I === F.length - 1 ? {
2001
+ P(!1), (I == null ? void 0 : I.length) > 0 && O(
2002
+ (N) => N.map(
2003
+ (x, C) => C === N.length - 1 ? {
2004
2004
  ...x,
2005
2005
  products: [
2006
2006
  ...x.products || [],
2007
- { keyword: T, items: C, loading: !1 }
2007
+ { keyword: E, items: I, loading: !1 }
2008
2008
  ]
2009
2009
  } : x
2010
2010
  )
2011
2011
  );
2012
2012
  }
2013
- if (n.current) {
2013
+ if (r.current) {
2014
2014
  O(
2015
- (C) => C.map(
2016
- (F, x) => x === C.length - 1 ? {
2017
- ...F,
2015
+ (I) => I.map(
2016
+ (N, x) => x === I.length - 1 ? {
2017
+ ...N,
2018
2018
  productSnapshot: {
2019
- id: r.current,
2020
- name: n.current,
2019
+ id: n.current,
2020
+ name: r.current,
2021
2021
  image: o.current,
2022
- price: s.current ?? null,
2022
+ price: a.current ?? null,
2023
2023
  points: 0,
2024
2024
  quantity: 1
2025
2025
  }
2026
- } : F
2026
+ } : N
2027
2027
  )
2028
2028
  );
2029
- const T = JSON.parse(
2029
+ const E = JSON.parse(
2030
2030
  sessionStorage.getItem("customerData") || "{}"
2031
2031
  );
2032
- (T == null ? void 0 : T.isGuest) == !1 ? (console.log("running secondary flow", Ae), w(n.current, 0)) : console.log("not running secondary flow", Ae);
2032
+ (E == null ? void 0 : E.isGuest) == !1 ? (console.log("running secondary flow", At), b(r.current, 0)) : console.log("not running secondary flow", At);
2033
2033
  }
2034
2034
  P(!1);
2035
- }, Gn = async (f, T) => {
2036
- var C, F, x, I, R, xe, ve, G, Se, ke, W, Q, ee, te, se;
2035
+ }, Kr = async (d, E) => {
2036
+ var I, N, x, C, R, xt, vt, K, kt, St, G, W, tt, et, at;
2037
2037
  _(!0);
2038
2038
  try {
2039
- const b = await kn(f.id);
2040
- if (!((F = (C = b == null ? void 0 : b.variants) == null ? void 0 : C[0]) != null && F.product_id || (I = (x = b == null ? void 0 : b.variants) == null ? void 0 : x[0]) != null && I.productId) && !(b.type.item || b.type.bundle)) {
2041
- _(!1), Z.error("Variants not found", {
2039
+ const y = await kr(d.id);
2040
+ if (!((N = (I = y == null ? void 0 : y.variants) == null ? void 0 : I[0]) != null && N.product_id || (C = (x = y == null ? void 0 : y.variants) == null ? void 0 : x[0]) != null && C.productId) && !(y.type.item || y.type.bundle)) {
2041
+ _(!1), X.error("Variants not found", {
2042
2042
  position: "bottom-right",
2043
2043
  autoClose: 1e3
2044
2044
  }), console.error("No product variant found");
2045
2045
  return;
2046
2046
  }
2047
- const Y = [
2047
+ const Q = [
2048
2048
  {
2049
- product_id: ((R = b.variants) == null ? void 0 : R[0].product_id) || ((xe = b.variants) == null ? void 0 : xe[0].productId) || (b == null ? void 0 : b.id),
2050
- quantity: T
2049
+ product_id: ((R = y.variants) == null ? void 0 : R[0].product_id) || ((xt = y.variants) == null ? void 0 : xt[0].productId) || (y == null ? void 0 : y.id),
2050
+ quantity: E
2051
2051
  }
2052
2052
  ];
2053
- console.log(Y, "product data", "app version", Ae);
2053
+ console.log(Q, "product data", "app version", At);
2054
2054
  const A = JSON.parse(
2055
2055
  sessionStorage.getItem("customerData") || "{}"
2056
- ), H = A == null ? void 0 : A.basketId, ie = !1, Be = localStorage.getItem(qe), jt = Date.now();
2057
- if (!ie || !Be || jt >= parseInt(Be)) {
2058
- const Wn = await vn();
2059
- let { customer_token: he } = await Sn(
2060
- Wn
2056
+ ), q = A == null ? void 0 : A.basketId, it = !1, Bt = localStorage.getItem(Ut), $e = Date.now();
2057
+ if (!it || !Bt || $e >= parseInt(Bt)) {
2058
+ const Gr = await xr();
2059
+ let { customer_token: ht } = await vr(
2060
+ Gr
2061
2061
  );
2062
- if (he = "Bearer " + i.access_token, !he) {
2062
+ if (ht = "Bearer " + i.access_token, !ht) {
2063
2063
  console.error("Failed to get customer_token");
2064
2064
  return;
2065
2065
  }
2066
- const Qn = jt + 300 * 1e3;
2067
- if (Ye(he), localStorage.setItem(qe, Qn.toString()), H) {
2068
- const At = await Mn({
2069
- basketId: H,
2070
- customer_token: he
2066
+ const Wr = $e + 300 * 1e3;
2067
+ if (Qt(ht), localStorage.setItem(Ut, Wr.toString()), q) {
2068
+ const Ae = await zr({
2069
+ basketId: q,
2070
+ customer_token: ht
2071
2071
  });
2072
- if (At.status === 200 && At) {
2073
- const ot = await Qe(
2074
- H,
2075
- Y,
2076
- he
2072
+ if (Ae.status === 200 && Ae) {
2073
+ const oe = await Wt(
2074
+ q,
2075
+ Q,
2076
+ ht
2077
2077
  );
2078
- ((ve = ot == null ? void 0 : ot.product_items) == null ? void 0 : ve.length) > 0 && (Z.success("Added to cart", {
2078
+ ((vt = oe == null ? void 0 : oe.product_items) == null ? void 0 : vt.length) > 0 && (X.success("Added to cart", {
2079
2079
  position: "bottom-right",
2080
2080
  autoClose: 3e3,
2081
2081
  hideProgressBar: !1,
2082
2082
  closeOnClick: !0,
2083
2083
  pauseOnHover: !0,
2084
2084
  draggable: !0
2085
- }), Ne(H), _(!1));
2085
+ }), Ft(q), _(!1));
2086
2086
  return;
2087
2087
  }
2088
2088
  }
2089
- const Yn = {
2089
+ const Qr = {
2090
2090
  productItems: [
2091
2091
  {
2092
- productId: ((G = b.variants) == null ? void 0 : G[0].product_id) || ((Se = b.variants) == null ? void 0 : Se[0].productId) || (b == null ? void 0 : b.id),
2092
+ productId: ((K = y.variants) == null ? void 0 : K[0].product_id) || ((kt = y.variants) == null ? void 0 : kt[0].productId) || (y == null ? void 0 : y.id),
2093
2093
  quantity: 1
2094
2094
  }
2095
2095
  ]
2096
- }, N = await Dn(he, Yn);
2096
+ }, F = await Lr(ht, Qr);
2097
2097
  if (console.log(
2098
- N,
2099
- N == null ? void 0 : N.basket_id,
2100
- N == null ? void 0 : N.basketId,
2098
+ F,
2099
+ F == null ? void 0 : F.basket_id,
2100
+ F == null ? void 0 : F.basketId,
2101
2101
  "the basket response"
2102
- ), !(N != null && N.basket_id || !(N != null && N.basketId))) {
2102
+ ), !(F != null && F.basket_id || !(F != null && F.basketId))) {
2103
2103
  _(!1), console.error("Failed to create basket");
2104
2104
  return;
2105
2105
  }
2106
- Fe(
2107
- (N == null ? void 0 : N.basket_id) || (N == null ? void 0 : N.basketId)
2106
+ Nt(
2107
+ (F == null ? void 0 : F.basket_id) || (F == null ? void 0 : F.basketId)
2108
2108
  );
2109
- const Ie = await Qe(
2110
- (N == null ? void 0 : N.basket_id) || (N == null ? void 0 : N.basketId),
2111
- Y,
2112
- he
2109
+ const Ct = await Wt(
2110
+ (F == null ? void 0 : F.basket_id) || (F == null ? void 0 : F.basketId),
2111
+ Q,
2112
+ ht
2113
2113
  );
2114
- (((ke = Ie == null ? void 0 : Ie.product_items) == null ? void 0 : ke.length) > 0 || ((W = Ie == null ? void 0 : Ie.productItems) == null ? void 0 : W.length) > 0) && Z.success("Added to cart", {
2114
+ (((St = Ct == null ? void 0 : Ct.product_items) == null ? void 0 : St.length) > 0 || ((G = Ct == null ? void 0 : Ct.productItems) == null ? void 0 : G.length) > 0) && X.success("Added to cart", {
2115
2115
  position: "bottom-right",
2116
2116
  autoClose: 3e3,
2117
2117
  hideProgressBar: !1,
2118
2118
  closeOnClick: !0,
2119
2119
  pauseOnHover: !0,
2120
2120
  draggable: !0
2121
- }), Ne(N.basket_id || (N == null ? void 0 : N.basketId));
2121
+ }), Ft(F.basket_id || (F == null ? void 0 : F.basketId));
2122
2122
  }
2123
- } catch (b) {
2124
- _(!1), console.error("Error adding to cart:", b), Z.error("Failed to add product to cart", {
2123
+ } catch (y) {
2124
+ _(!1), console.error("Error adding to cart:", y), X.error("Failed to add product to cart", {
2125
2125
  position: "bottom-right",
2126
2126
  autoClose: 3e3
2127
- }), ((Q = b == null ? void 0 : b.response) == null ? void 0 : Q.status) === 404 || // Basket not found
2128
- ((ee = b == null ? void 0 : b.response) == null ? void 0 : ee.status) === 401 ? (((te = b == null ? void 0 : b.response) == null ? void 0 : te.status) === 404 && Fe(null), ((se = b == null ? void 0 : b.response) == null ? void 0 : se.status) === 401 && (Fe(null), Ye(null))) : (console.error("Failed to add product to basket:", b.message), Z.error("Failed to add product to cart", {
2127
+ }), ((W = y == null ? void 0 : y.response) == null ? void 0 : W.status) === 404 || // Basket not found
2128
+ ((tt = y == null ? void 0 : y.response) == null ? void 0 : tt.status) === 401 ? (((et = y == null ? void 0 : y.response) == null ? void 0 : et.status) === 404 && Nt(null), ((at = y == null ? void 0 : y.response) == null ? void 0 : at.status) === 401 && (Nt(null), Qt(null))) : (console.error("Failed to add product to basket:", y.message), X.error("Failed to add product to cart", {
2129
2129
  position: "bottom-right",
2130
2130
  autoClose: 3e3
2131
2131
  }));
2132
2132
  } finally {
2133
- Ne();
2133
+ Ft();
2134
2134
  }
2135
2135
  _(!1);
2136
2136
  };
2137
- return /* @__PURE__ */ l("div", { className: "relative flex justify-center", children: /* @__PURE__ */ p(ur, { open: a, onOpenChange: u, children: [
2137
+ return /* @__PURE__ */ l("div", { className: "relative flex justify-center", children: /* @__PURE__ */ p(fn, { open: s, onOpenChange: u, children: [
2138
2138
  /* @__PURE__ */ l(
2139
- fr,
2139
+ pn,
2140
2140
  {
2141
2141
  onClick: () => u(!0),
2142
2142
  style: {
@@ -2198,7 +2198,7 @@ const Fe = (e) => {
2198
2198
  ) })
2199
2199
  }
2200
2200
  ),
2201
- m && /* @__PURE__ */ p(dt, { children: [
2201
+ m && /* @__PURE__ */ p(fe, { children: [
2202
2202
  /* @__PURE__ */ l(
2203
2203
  "div",
2204
2204
  {
@@ -2214,9 +2214,9 @@ const Fe = (e) => {
2214
2214
  top-0 right-0
2215
2215
  transition-transform duration-300 ease-in-out
2216
2216
  lg:transform
2217
- ${d ? "lg:translate-x-0" : "lg:translate-x-full"}
2217
+ ${f ? "lg:translate-x-0" : "lg:translate-x-full"}
2218
2218
  // For mobile: animate from bottom
2219
- ${d ? "translate-y-0" : "translate-y-full"}
2219
+ ${f ? "translate-y-0" : "translate-y-full"}
2220
2220
  lg:translate-y-0
2221
2221
  `,
2222
2222
  style: {
@@ -2233,7 +2233,7 @@ const Fe = (e) => {
2233
2233
  {
2234
2234
  style: {
2235
2235
  display: "flex",
2236
- color: E.tanyaThemeContrastColor,
2236
+ color: T.tanyaThemeContrastColor,
2237
2237
  alignItems: "center",
2238
2238
  gap: "0.5rem"
2239
2239
  },
@@ -2346,46 +2346,46 @@ const Fe = (e) => {
2346
2346
  /* @__PURE__ */ p(
2347
2347
  "div",
2348
2348
  {
2349
- className: `flex flex-col h-full ${$ ? "lg:w-2/3 w-full" : "w-full"}`,
2349
+ className: `flex flex-col h-full ${j ? "lg:w-2/3 w-full" : "w-full"}`,
2350
2350
  children: [
2351
2351
  /* @__PURE__ */ p(
2352
2352
  "div",
2353
2353
  {
2354
- ref: be,
2354
+ ref: yt,
2355
2355
  className: "overflow-y-auto pr-5 pb-2 space-y-4 hide-scrollbar flex-grow mb-24",
2356
2356
  children: [
2357
- (E == null ? void 0 : E.whomRequired) && /* @__PURE__ */ p(
2357
+ (T == null ? void 0 : T.whomRequired) && /* @__PURE__ */ p(
2358
2358
  "div",
2359
2359
  {
2360
2360
  className: "mx-3 p-3 rounded-2xl bg-[#FFFFFF]",
2361
2361
  children: [
2362
2362
  /* @__PURE__ */ l("div", { className: "flex gap-2 bg-[#FFFFFF]", children: /* @__PURE__ */ l("p", { className: "font-bold font-nunitoSans text-[#494949]", children: "Is this for you or someone else?" }) }),
2363
- /* @__PURE__ */ l("div", { className: "flex flex-wrap gap-2 mt-2", children: e.map((f) => /* @__PURE__ */ l(
2363
+ /* @__PURE__ */ l("div", { className: "flex flex-wrap gap-2 mt-2", children: t.map((d) => /* @__PURE__ */ l(
2364
2364
  "button",
2365
2365
  {
2366
- onClick: () => tt(f),
2366
+ onClick: () => ee(d),
2367
2367
  className: "px-2 py-2 font-semibold text-xs text-[#18181B] bg-[#F3F3F3] rounded-2xl",
2368
2368
  style: {
2369
- backgroundColor: k === t[f] ? "#FFFFFF" : "#F3F3F3",
2370
- borderColor: k === t[f] ? "#BBB3DD" : ""
2369
+ backgroundColor: S === e[d] ? "#FFFFFF" : "#F3F3F3",
2370
+ borderColor: S === e[d] ? "#BBB3DD" : ""
2371
2371
  },
2372
- children: f
2372
+ children: d
2373
2373
  },
2374
- f
2374
+ d
2375
2375
  )) })
2376
2376
  ]
2377
2377
  }
2378
2378
  ),
2379
- V.map((f, T) => {
2380
- var C, F;
2379
+ V.map((d, E) => {
2380
+ var I, N;
2381
2381
  return /* @__PURE__ */ p("div", { children: [
2382
- /* @__PURE__ */ l("div", { className: "flex justify-end", children: /* @__PURE__ */ l("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: f.query }) }),
2383
- f.response && f.response.includes("Thinking") ? /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l(
2382
+ /* @__PURE__ */ l("div", { className: "flex justify-end", children: /* @__PURE__ */ l("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: d.query }) }),
2383
+ d.response && d.response.includes("Thinking") ? /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l(
2384
2384
  "div",
2385
2385
  {
2386
2386
  className: "font-nunitoSans animate-pulse font-bold text-sm text-[#494949] bg-[#FFFFFF] px-7 py-1 rounded-r-xl rounded-bl-2xl w-full",
2387
2387
  dangerouslySetInnerHTML: {
2388
- __html: st(f.response)
2388
+ __html: ae(d.response)
2389
2389
  }
2390
2390
  }
2391
2391
  ) }) : /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l(
@@ -2393,41 +2393,41 @@ const Fe = (e) => {
2393
2393
  {
2394
2394
  className: "font-nunitoSans font-bold text-sm text-[#494949] bg-[#FFFFFF] px-7 py-1 rounded-r-xl rounded-bl-2xl w-full",
2395
2395
  dangerouslySetInnerHTML: {
2396
- __html: st(f.response)
2396
+ __html: ae(d.response)
2397
2397
  }
2398
2398
  }
2399
2399
  ) }),
2400
- B && !f.response.includes("Thinking") && ((C = f.products) == null ? void 0 : C.length) == 0 && /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l("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" }) }),
2401
- (f == null ? void 0 : f.products) && ((F = f == null ? void 0 : f.products) == null ? void 0 : F.length) > 0 && /* @__PURE__ */ l(
2402
- wo,
2400
+ B && !d.response.includes("Thinking") && ((I = d.products) == null ? void 0 : I.length) == 0 && /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l("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" }) }),
2401
+ (d == null ? void 0 : d.products) && ((N = d == null ? void 0 : d.products) == null ? void 0 : N.length) > 0 && /* @__PURE__ */ l(
2402
+ vo,
2403
2403
  {
2404
- chat: f.products,
2405
- storeDetails: E
2404
+ chat: d.products,
2405
+ storeDetails: T
2406
2406
  }
2407
2407
  ),
2408
- f.potentialQuestions.length > 0 && /* @__PURE__ */ p("div", { className: "my-2 px-4 text-sm text-gray-700", children: [
2408
+ d.potentialQuestions.length > 0 && /* @__PURE__ */ p("div", { className: "my-2 px-4 text-sm text-gray-700", children: [
2409
2409
  /* @__PURE__ */ l(
2410
2410
  "p",
2411
2411
  {
2412
2412
  className: "font-nunitoSans font-bold text-sm text-[#494949]",
2413
- style: { color: E.themeDarkColor },
2413
+ style: { color: T.themeDarkColor },
2414
2414
  children: "Why not explore these inquiries..."
2415
2415
  }
2416
2416
  ),
2417
- f.potentialQuestions.split(",").map((x, I) => /* @__PURE__ */ l(
2417
+ d.potentialQuestions.split(",").map((x, C) => /* @__PURE__ */ l(
2418
2418
  "button",
2419
2419
  {
2420
- className: `cursor-pointer font-nunitoSans font-semibold text-[#232323] border bg-[#804C9E0D] border-${E.themeDarkColor} m-1 rounded-xl px-2 py-1`,
2421
- onClick: () => K(x),
2420
+ className: `cursor-pointer font-nunitoSans font-semibold text-[#232323] border bg-[#804C9E0D] border-${T.themeDarkColor} m-1 rounded-xl px-2 py-1`,
2421
+ onClick: () => J(x),
2422
2422
  style: {
2423
- backgroundColor: E.tanyaThemeColorLight
2423
+ backgroundColor: T.tanyaThemeColorLight
2424
2424
  },
2425
2425
  children: x
2426
2426
  },
2427
- I
2427
+ C
2428
2428
  ))
2429
2429
  ] }),
2430
- f.secondaryLoading && /* @__PURE__ */ l("div", { className: "mt-3 mb-4 px-4", children: /* @__PURE__ */ p(
2430
+ d.secondaryLoading && /* @__PURE__ */ l("div", { className: "mt-3 mb-4 px-4", children: /* @__PURE__ */ p(
2431
2431
  "div",
2432
2432
  {
2433
2433
  className: "tanya-surprise-wrapper bg-indigo-300 text-sm px-7 py-4 rounded-r-xl rounded-bl-2xl w-full relative overflow-hidden",
@@ -2445,7 +2445,7 @@ const Fe = (e) => {
2445
2445
  "p",
2446
2446
  {
2447
2447
  className: "font-semibold tanya-pulse",
2448
- style: { color: E.themeDarkColor },
2448
+ style: { color: T.themeDarkColor },
2449
2449
  children: "I’ve found a special surprise crafted just for you… hang on a sec!"
2450
2450
  }
2451
2451
  ),
@@ -2453,35 +2453,35 @@ const Fe = (e) => {
2453
2453
  "p",
2454
2454
  {
2455
2455
  className: "tanya-dots mt-1",
2456
- style: { color: E.themeDarkColor },
2456
+ style: { color: T.themeDarkColor },
2457
2457
  children: "• • •"
2458
2458
  }
2459
2459
  )
2460
2460
  ]
2461
2461
  }
2462
2462
  ) }),
2463
- f.secondaryResponse && /* @__PURE__ */ l(dt, { children: /* @__PURE__ */ p("div", { className: "mt-3 mb-8 px-4 bg-indigo-300 rounded-tr-[5px]", children: [
2463
+ d.secondaryResponse && /* @__PURE__ */ l(fe, { children: /* @__PURE__ */ p("div", { className: "mt-3 mb-8 px-4 bg-indigo-300 rounded-tr-[5px]", children: [
2464
2464
  /* @__PURE__ */ l(
2465
2465
  "div",
2466
2466
  {
2467
2467
  className: "text-sm text-[#232323] bg-[#FFFFFF] px-7 py-4 rounded-br-xl rounded-bl-2xl w-full",
2468
2468
  style: {
2469
- backgroundColor: E.tanyaThemeColorLight
2469
+ backgroundColor: T.tanyaThemeColorLight
2470
2470
  },
2471
2471
  dangerouslySetInnerHTML: {
2472
- __html: st(
2473
- f.secondaryResponse
2472
+ __html: ae(
2473
+ d.secondaryResponse
2474
2474
  )
2475
2475
  }
2476
2476
  }
2477
2477
  ),
2478
- f.productSnapshot && // chat.productSnapshot.points > 0 &&
2478
+ d.productSnapshot && // chat.productSnapshot.points > 0 &&
2479
2479
  /* @__PURE__ */ l("div", { className: "mt-4 w-full", children: /* @__PURE__ */ p(
2480
2480
  "div",
2481
2481
  {
2482
2482
  className: "flex gap-4 items-stretch rounded-2xl p-4",
2483
2483
  style: {
2484
- backgroundColor: E.tanyaThemeColorLight
2484
+ backgroundColor: T.tanyaThemeColorLight
2485
2485
  },
2486
2486
  children: [
2487
2487
  /* @__PURE__ */ l(
@@ -2493,11 +2493,11 @@ const Fe = (e) => {
2493
2493
  height: 112,
2494
2494
  borderColor: "#eee"
2495
2495
  },
2496
- children: f.productSnapshot.image ? /* @__PURE__ */ l(
2496
+ children: d.productSnapshot.image ? /* @__PURE__ */ l(
2497
2497
  "img",
2498
2498
  {
2499
- src: f.productSnapshot.image,
2500
- alt: f.productSnapshot.name,
2499
+ src: d.productSnapshot.image,
2500
+ alt: d.productSnapshot.name,
2501
2501
  className: "w-full h-full object-cover"
2502
2502
  }
2503
2503
  ) : /* @__PURE__ */ l("div", { className: "w-full h-full flex items-center justify-center text-xs text-gray-500", children: "No Image" })
@@ -2505,18 +2505,18 @@ const Fe = (e) => {
2505
2505
  ),
2506
2506
  /* @__PURE__ */ p("div", { className: "flex flex-col flex-1 justify-between", children: [
2507
2507
  /* @__PURE__ */ p("div", { children: [
2508
- /* @__PURE__ */ l("p", { className: "font-semibold text-[15px] leading-snug", children: f.productSnapshot.name }),
2509
- /* @__PURE__ */ l("p", { className: "mt-1 text-[14px] font-medium", children: f.productSnapshot.price != null ? new Intl.NumberFormat(void 0, {
2508
+ /* @__PURE__ */ l("p", { className: "font-semibold text-[15px] leading-snug", children: d.productSnapshot.name }),
2509
+ /* @__PURE__ */ l("p", { className: "mt-1 text-[14px] font-medium", children: d.productSnapshot.price != null ? new Intl.NumberFormat(void 0, {
2510
2510
  style: "currency",
2511
- currency: (E == null ? void 0 : E.currency) || "USD"
2511
+ currency: (T == null ? void 0 : T.currency) || "USD"
2512
2512
  }).format(
2513
- f.productSnapshot.price
2513
+ d.productSnapshot.price
2514
2514
  ) : "" }),
2515
- f.productSnapshot.points > 0 && /* @__PURE__ */ p("p", { className: "mt-1 text-xs opacity-80", children: [
2515
+ d.productSnapshot.points > 0 && /* @__PURE__ */ p("p", { className: "mt-1 text-xs opacity-80", children: [
2516
2516
  "You will earn",
2517
2517
  " ",
2518
2518
  /* @__PURE__ */ p("strong", { children: [
2519
- f.productSnapshot.points,
2519
+ d.productSnapshot.points,
2520
2520
  " ",
2521
2521
  "points"
2522
2522
  ] })
@@ -2530,44 +2530,44 @@ const Fe = (e) => {
2530
2530
  className: "px-3 py-1 text-sm",
2531
2531
  onClick: () => O(
2532
2532
  (x) => x.map(
2533
- (I, R) => R === T && I.productSnapshot ? {
2534
- ...I,
2533
+ (C, R) => R === E && C.productSnapshot ? {
2534
+ ...C,
2535
2535
  productSnapshot: {
2536
- ...I.productSnapshot,
2536
+ ...C.productSnapshot,
2537
2537
  quantity: Math.max(
2538
2538
  1,
2539
- I.productSnapshot.quantity - 1
2539
+ C.productSnapshot.quantity - 1
2540
2540
  )
2541
2541
  }
2542
- } : I
2542
+ } : C
2543
2543
  )
2544
2544
  ),
2545
2545
  style: {
2546
2546
  background: "transparent",
2547
- color: E.themeDarkColor
2547
+ color: T.themeDarkColor
2548
2548
  },
2549
2549
  children: "−"
2550
2550
  }
2551
2551
  ),
2552
- /* @__PURE__ */ l("div", { className: "px-3 py-1 text-sm select-none", children: f.productSnapshot.quantity }),
2552
+ /* @__PURE__ */ l("div", { className: "px-3 py-1 text-sm select-none", children: d.productSnapshot.quantity }),
2553
2553
  /* @__PURE__ */ l(
2554
2554
  "button",
2555
2555
  {
2556
2556
  className: "px-3 py-1 text-sm",
2557
2557
  onClick: () => O(
2558
2558
  (x) => x.map(
2559
- (I, R) => R === T && I.productSnapshot ? {
2560
- ...I,
2559
+ (C, R) => R === E && C.productSnapshot ? {
2560
+ ...C,
2561
2561
  productSnapshot: {
2562
- ...I.productSnapshot,
2563
- quantity: I.productSnapshot.quantity + 1
2562
+ ...C.productSnapshot,
2563
+ quantity: C.productSnapshot.quantity + 1
2564
2564
  }
2565
- } : I
2565
+ } : C
2566
2566
  )
2567
2567
  ),
2568
2568
  style: {
2569
2569
  background: "transparent",
2570
- color: E.themeDarkColor
2570
+ color: T.themeDarkColor
2571
2571
  },
2572
2572
  children: "+"
2573
2573
  }
@@ -2577,21 +2577,21 @@ const Fe = (e) => {
2577
2577
  "button",
2578
2578
  {
2579
2579
  onClick: () => {
2580
- Gn(
2581
- z(
2582
- f.productSnapshot
2580
+ Kr(
2581
+ H(
2582
+ d.productSnapshot
2583
2583
  ),
2584
- f.productSnapshot.quantity
2584
+ d.productSnapshot.quantity
2585
2585
  );
2586
2586
  },
2587
- disabled: S,
2587
+ disabled: k,
2588
2588
  className: "px-4 py-2 rounded-full font-medium",
2589
2589
  style: {
2590
- background: E.tanyaThemeColor,
2591
- color: (E == null ? void 0 : E.tanyaThemeContrastColor) || "#fff",
2592
- opacity: S ? 0.8 : 1
2590
+ background: T.tanyaThemeColor,
2591
+ color: (T == null ? void 0 : T.tanyaThemeContrastColor) || "#fff",
2592
+ opacity: k ? 0.8 : 1
2593
2593
  },
2594
- children: S ? "Adding..." : "Add to cart"
2594
+ children: k ? "Adding..." : "Add to cart"
2595
2595
  }
2596
2596
  )
2597
2597
  ] })
@@ -2601,7 +2601,7 @@ const Fe = (e) => {
2601
2601
  ) })
2602
2602
  ] }) }),
2603
2603
  /* @__PURE__ */ l("div", { className: "mb-20" })
2604
- ] }, T);
2604
+ ] }, E);
2605
2605
  })
2606
2606
  ]
2607
2607
  }
@@ -2619,11 +2619,11 @@ const Fe = (e) => {
2619
2619
  {
2620
2620
  className: "flex-1 bg-[#FFFFFF] text-[#232323] outline-none border-none px-2 py-2 text-sm",
2621
2621
  placeholder: "How can I help you...",
2622
- value: j,
2622
+ value: $,
2623
2623
  autoFocus: !0,
2624
- onChange: (f) => X(f.target.value),
2625
- onKeyDown: (f) => {
2626
- f.key === "Enter" && !y && K();
2624
+ onChange: (d) => Z(d.target.value),
2625
+ onKeyDown: (d) => {
2626
+ d.key === "Enter" && !w && J();
2627
2627
  }
2628
2628
  }
2629
2629
  ),
@@ -2631,16 +2631,16 @@ const Fe = (e) => {
2631
2631
  "button",
2632
2632
  {
2633
2633
  type: "submit",
2634
- disabled: y,
2634
+ disabled: w,
2635
2635
  className: "p-3",
2636
- onClick: () => K(),
2637
- children: y ? /* @__PURE__ */ l(
2636
+ onClick: () => J(),
2637
+ children: w ? /* @__PURE__ */ l(
2638
2638
  "div",
2639
2639
  {
2640
2640
  className: "p-3 animate-spin rounded-full h-3 w-3 border-b-2",
2641
2641
  style: {
2642
2642
  borderBottom: "2px solid",
2643
- color: E.tanyaThemeColor
2643
+ color: T.tanyaThemeColor
2644
2644
  }
2645
2645
  }
2646
2646
  ) : /* @__PURE__ */ l(
@@ -2668,7 +2668,7 @@ const Fe = (e) => {
2668
2668
  ]
2669
2669
  }
2670
2670
  ),
2671
- /* @__PURE__ */ l(vo, {})
2671
+ /* @__PURE__ */ l(So, {})
2672
2672
  ] })
2673
2673
  ]
2674
2674
  }
@@ -2676,83 +2676,83 @@ const Fe = (e) => {
2676
2676
  ] })
2677
2677
  ] }) });
2678
2678
  };
2679
- var wt = function(e, t) {
2680
- return wt = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
2681
- n.__proto__ = r;
2682
- } || function(n, r) {
2683
- for (var o in r) Object.prototype.hasOwnProperty.call(r, o) && (n[o] = r[o]);
2684
- }, wt(e, t);
2679
+ var be = function(t, e) {
2680
+ return be = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, n) {
2681
+ r.__proto__ = n;
2682
+ } || function(r, n) {
2683
+ for (var o in n) Object.prototype.hasOwnProperty.call(n, o) && (r[o] = n[o]);
2684
+ }, be(t, e);
2685
2685
  };
2686
- function ko(e, t) {
2687
- if (typeof t != "function" && t !== null)
2688
- throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
2689
- wt(e, t);
2690
- function n() {
2691
- this.constructor = e;
2686
+ function Io(t, e) {
2687
+ if (typeof e != "function" && e !== null)
2688
+ throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
2689
+ be(t, e);
2690
+ function r() {
2691
+ this.constructor = t;
2692
2692
  }
2693
- e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
2693
+ t.prototype = e === null ? Object.create(e) : (r.prototype = e.prototype, new r());
2694
2694
  }
2695
- var ae = function() {
2696
- return ae = Object.assign || function(t) {
2697
- for (var n, r = 1, o = arguments.length; r < o; r++) {
2698
- n = arguments[r];
2699
- for (var s in n) Object.prototype.hasOwnProperty.call(n, s) && (t[s] = n[s]);
2695
+ var st = function() {
2696
+ return st = Object.assign || function(e) {
2697
+ for (var r, n = 1, o = arguments.length; n < o; n++) {
2698
+ r = arguments[n];
2699
+ for (var a in r) Object.prototype.hasOwnProperty.call(r, a) && (e[a] = r[a]);
2700
2700
  }
2701
- return t;
2702
- }, ae.apply(this, arguments);
2701
+ return e;
2702
+ }, st.apply(this, arguments);
2703
2703
  };
2704
- function Io(e, t) {
2705
- var n = {};
2706
- for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
2707
- if (e != null && typeof Object.getOwnPropertySymbols == "function")
2708
- for (var o = 0, r = Object.getOwnPropertySymbols(e); o < r.length; o++)
2709
- t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
2710
- return n;
2704
+ function _o(t, e) {
2705
+ var r = {};
2706
+ for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && e.indexOf(n) < 0 && (r[n] = t[n]);
2707
+ if (t != null && typeof Object.getOwnPropertySymbols == "function")
2708
+ for (var o = 0, n = Object.getOwnPropertySymbols(t); o < n.length; o++)
2709
+ e.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(t, n[o]) && (r[n[o]] = t[n[o]]);
2710
+ return r;
2711
2711
  }
2712
- var ct = "Invariant Violation", rn = Object.setPrototypeOf, Co = rn === void 0 ? function(e, t) {
2713
- return e.__proto__ = t, e;
2714
- } : rn, Un = (
2712
+ var ce = "Invariant Violation", nr = Object.setPrototypeOf, Fo = nr === void 0 ? function(t, e) {
2713
+ return t.__proto__ = e, t;
2714
+ } : nr, Dr = (
2715
2715
  /** @class */
2716
- (function(e) {
2717
- ko(t, e);
2718
- function t(n) {
2719
- n === void 0 && (n = ct);
2720
- var r = e.call(this, typeof n == "number" ? ct + ": " + n + " (see https://github.com/apollographql/invariant-packages)" : n) || this;
2721
- return r.framesToPop = 1, r.name = ct, Co(r, t.prototype), r;
2716
+ (function(t) {
2717
+ Io(e, t);
2718
+ function e(r) {
2719
+ r === void 0 && (r = ce);
2720
+ var n = t.call(this, typeof r == "number" ? ce + ": " + r + " (see https://github.com/apollographql/invariant-packages)" : r) || this;
2721
+ return n.framesToPop = 1, n.name = ce, Fo(n, e.prototype), n;
2722
2722
  }
2723
- return t;
2723
+ return e;
2724
2724
  })(Error)
2725
2725
  );
2726
- function me(e, t) {
2727
- if (!e)
2728
- throw new Un(t);
2726
+ function mt(t, e) {
2727
+ if (!t)
2728
+ throw new Dr(e);
2729
2729
  }
2730
- var qn = ["debug", "log", "warn", "error", "silent"], _o = qn.indexOf("log");
2731
- function He(e) {
2730
+ var Mr = ["debug", "log", "warn", "error", "silent"], No = Mr.indexOf("log");
2731
+ function qt(t) {
2732
2732
  return function() {
2733
- if (qn.indexOf(e) >= _o) {
2734
- var t = console[e] || console.log;
2735
- return t.apply(console, arguments);
2733
+ if (Mr.indexOf(t) >= No) {
2734
+ var e = console[t] || console.log;
2735
+ return e.apply(console, arguments);
2736
2736
  }
2737
2737
  };
2738
2738
  }
2739
- (function(e) {
2740
- e.debug = He("debug"), e.log = He("log"), e.warn = He("warn"), e.error = He("error");
2741
- })(me || (me = {}));
2742
- var Bn = "3.14.0";
2743
- function Ce(e) {
2739
+ (function(t) {
2740
+ t.debug = qt("debug"), t.log = qt("log"), t.warn = qt("warn"), t.error = qt("error");
2741
+ })(mt || (mt = {}));
2742
+ var Ur = "3.14.0";
2743
+ function It(t) {
2744
2744
  try {
2745
- return e();
2745
+ return t();
2746
2746
  } catch {
2747
2747
  }
2748
2748
  }
2749
- const xt = Ce(function() {
2749
+ const xe = It(function() {
2750
2750
  return globalThis;
2751
- }) || Ce(function() {
2751
+ }) || It(function() {
2752
2752
  return window;
2753
- }) || Ce(function() {
2753
+ }) || It(function() {
2754
2754
  return self;
2755
- }) || Ce(function() {
2755
+ }) || It(function() {
2756
2756
  return global;
2757
2757
  }) || // We don't expect the Function constructor ever to be invoked at runtime, as
2758
2758
  // long as at least one of globalThis, window, self, or global is defined, so
@@ -2760,161 +2760,161 @@ const xt = Ce(function() {
2760
2760
  // detect syntactic usage of the Function constructor. If you think you can
2761
2761
  // improve your static analysis to detect this obfuscation, think again. This
2762
2762
  // is an arms race you cannot win, at least not in JavaScript.
2763
- Ce(function() {
2764
- return Ce.constructor("return this")();
2763
+ It(function() {
2764
+ return It.constructor("return this")();
2765
2765
  });
2766
- var on = /* @__PURE__ */ new Map();
2767
- function No(e) {
2768
- var t = on.get(e) || 1;
2769
- return on.set(e, t + 1), "".concat(e, ":").concat(t, ":").concat(Math.random().toString(36).slice(2));
2770
- }
2771
- function Fo(e, t) {
2772
- var n = No("stringifyForDisplay");
2773
- return JSON.stringify(e, function(r, o) {
2774
- return o === void 0 ? n : o;
2775
- }, t).split(JSON.stringify(n)).join("<undefined>");
2776
- }
2777
- function Re(e) {
2778
- return function(t) {
2779
- for (var n = [], r = 1; r < arguments.length; r++)
2780
- n[r - 1] = arguments[r];
2781
- if (typeof t == "number") {
2782
- var o = t;
2783
- t = Nt(o), t || (t = Ft(o, n), n = []);
2766
+ var or = /* @__PURE__ */ new Map();
2767
+ function Eo(t) {
2768
+ var e = or.get(t) || 1;
2769
+ return or.set(t, e + 1), "".concat(t, ":").concat(e, ":").concat(Math.random().toString(36).slice(2));
2770
+ }
2771
+ function To(t, e) {
2772
+ var r = Eo("stringifyForDisplay");
2773
+ return JSON.stringify(t, function(n, o) {
2774
+ return o === void 0 ? r : o;
2775
+ }, e).split(JSON.stringify(r)).join("<undefined>");
2776
+ }
2777
+ function Rt(t) {
2778
+ return function(e) {
2779
+ for (var r = [], n = 1; n < arguments.length; n++)
2780
+ r[n - 1] = arguments[n];
2781
+ if (typeof e == "number") {
2782
+ var o = e;
2783
+ e = Fe(o), e || (e = Ne(o, r), r = []);
2784
2784
  }
2785
- e.apply(void 0, [t].concat(n));
2785
+ t.apply(void 0, [e].concat(r));
2786
2786
  };
2787
2787
  }
2788
- var lt = Object.assign(function(t, n) {
2789
- for (var r = [], o = 2; o < arguments.length; o++)
2790
- r[o - 2] = arguments[o];
2791
- t || me(t, Nt(n, r) || Ft(n, r));
2788
+ var le = Object.assign(function(e, r) {
2789
+ for (var n = [], o = 2; o < arguments.length; o++)
2790
+ n[o - 2] = arguments[o];
2791
+ e || mt(e, Fe(r, n) || Ne(r, n));
2792
2792
  }, {
2793
- debug: Re(me.debug),
2794
- log: Re(me.log),
2795
- warn: Re(me.warn),
2796
- error: Re(me.error)
2793
+ debug: Rt(mt.debug),
2794
+ log: Rt(mt.log),
2795
+ warn: Rt(mt.warn),
2796
+ error: Rt(mt.error)
2797
2797
  });
2798
- function Hn(e) {
2799
- for (var t = [], n = 1; n < arguments.length; n++)
2800
- t[n - 1] = arguments[n];
2801
- return new Un(Nt(e, t) || Ft(e, t));
2802
- }
2803
- var sn = Symbol.for("ApolloErrorMessageHandler_" + Bn);
2804
- function Rn(e) {
2805
- if (typeof e == "string")
2806
- return e;
2798
+ function Br(t) {
2799
+ for (var e = [], r = 1; r < arguments.length; r++)
2800
+ e[r - 1] = arguments[r];
2801
+ return new Dr(Fe(t, e) || Ne(t, e));
2802
+ }
2803
+ var ar = Symbol.for("ApolloErrorMessageHandler_" + Ur);
2804
+ function qr(t) {
2805
+ if (typeof t == "string")
2806
+ return t;
2807
2807
  try {
2808
- return Fo(e, 2).slice(0, 1e3);
2808
+ return To(t, 2).slice(0, 1e3);
2809
2809
  } catch {
2810
2810
  return "<non-serializable>";
2811
2811
  }
2812
2812
  }
2813
- function Nt(e, t) {
2814
- if (t === void 0 && (t = []), !!e)
2815
- return xt[sn] && xt[sn](e, t.map(Rn));
2813
+ function Fe(t, e) {
2814
+ if (e === void 0 && (e = []), !!t)
2815
+ return xe[ar] && xe[ar](t, e.map(qr));
2816
2816
  }
2817
- function Ft(e, t) {
2818
- if (t === void 0 && (t = []), !!e)
2817
+ function Ne(t, e) {
2818
+ if (e === void 0 && (e = []), !!t)
2819
2819
  return "An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({
2820
- version: Bn,
2821
- message: e,
2822
- args: t.map(Rn)
2820
+ version: Ur,
2821
+ message: t,
2822
+ args: e.map(qr)
2823
2823
  })));
2824
2824
  }
2825
- function To(e) {
2826
- return e.definitions.filter(function(t) {
2827
- return t.kind === "OperationDefinition" && !!t.name;
2828
- }).map(function(t) {
2829
- return t.name.value;
2825
+ function Po(t) {
2826
+ return t.definitions.filter(function(e) {
2827
+ return e.kind === "OperationDefinition" && !!e.name;
2828
+ }).map(function(e) {
2829
+ return e.name.value;
2830
2830
  })[0] || null;
2831
2831
  }
2832
- let D = null;
2833
- const an = {};
2834
- let Eo = 1;
2835
- const Po = () => class {
2832
+ let z = null;
2833
+ const ir = {};
2834
+ let Oo = 1;
2835
+ const jo = () => class {
2836
2836
  constructor() {
2837
2837
  this.id = [
2838
2838
  "slot",
2839
- Eo++,
2839
+ Oo++,
2840
2840
  Date.now(),
2841
2841
  Math.random().toString(36).slice(2)
2842
2842
  ].join(":");
2843
2843
  }
2844
2844
  hasValue() {
2845
- for (let t = D; t; t = t.parent)
2846
- if (this.id in t.slots) {
2847
- const n = t.slots[this.id];
2848
- if (n === an)
2845
+ for (let e = z; e; e = e.parent)
2846
+ if (this.id in e.slots) {
2847
+ const r = e.slots[this.id];
2848
+ if (r === ir)
2849
2849
  break;
2850
- return t !== D && (D.slots[this.id] = n), !0;
2850
+ return e !== z && (z.slots[this.id] = r), !0;
2851
2851
  }
2852
- return D && (D.slots[this.id] = an), !1;
2852
+ return z && (z.slots[this.id] = ir), !1;
2853
2853
  }
2854
2854
  getValue() {
2855
2855
  if (this.hasValue())
2856
- return D.slots[this.id];
2856
+ return z.slots[this.id];
2857
2857
  }
2858
- withValue(t, n, r, o) {
2859
- const s = {
2858
+ withValue(e, r, n, o) {
2859
+ const a = {
2860
2860
  __proto__: null,
2861
- [this.id]: t
2862
- }, i = D;
2863
- D = { parent: i, slots: s };
2861
+ [this.id]: e
2862
+ }, i = z;
2863
+ z = { parent: i, slots: a };
2864
2864
  try {
2865
- return n.apply(o, r);
2865
+ return r.apply(o, n);
2866
2866
  } finally {
2867
- D = i;
2867
+ z = i;
2868
2868
  }
2869
2869
  }
2870
2870
  // Capture the current context and wrap a callback function so that it
2871
2871
  // reestablishes the captured context when called.
2872
- static bind(t) {
2873
- const n = D;
2872
+ static bind(e) {
2873
+ const r = z;
2874
2874
  return function() {
2875
- const r = D;
2875
+ const n = z;
2876
2876
  try {
2877
- return D = n, t.apply(this, arguments);
2877
+ return z = r, e.apply(this, arguments);
2878
2878
  } finally {
2879
- D = r;
2879
+ z = n;
2880
2880
  }
2881
2881
  };
2882
2882
  }
2883
2883
  // Immediately run a callback function without any captured context.
2884
- static noContext(t, n, r) {
2885
- if (D) {
2886
- const o = D;
2884
+ static noContext(e, r, n) {
2885
+ if (z) {
2886
+ const o = z;
2887
2887
  try {
2888
- return D = null, t.apply(r, n);
2888
+ return z = null, e.apply(n, r);
2889
2889
  } finally {
2890
- D = o;
2890
+ z = o;
2891
2891
  }
2892
2892
  } else
2893
- return t.apply(r, n);
2893
+ return e.apply(n, r);
2894
2894
  }
2895
2895
  };
2896
- function cn(e) {
2896
+ function sr(t) {
2897
2897
  try {
2898
- return e();
2898
+ return t();
2899
2899
  } catch {
2900
2900
  }
2901
2901
  }
2902
- const ut = "@wry/context:Slot", Oo = (
2902
+ const ue = "@wry/context:Slot", $o = (
2903
2903
  // Prefer globalThis when available.
2904
2904
  // https://github.com/benjamn/wryware/issues/347
2905
- cn(() => globalThis) || // Fall back to global, which works in Node.js and may be converted by some
2905
+ sr(() => globalThis) || // Fall back to global, which works in Node.js and may be converted by some
2906
2906
  // bundlers to the appropriate identifier (window, self, ...) depending on the
2907
2907
  // bundling target. https://github.com/endojs/endo/issues/576#issuecomment-1178515224
2908
- cn(() => global) || // Otherwise, use a dummy host that's local to this module. We used to fall
2908
+ sr(() => global) || // Otherwise, use a dummy host that's local to this module. We used to fall
2909
2909
  // back to using the Array constructor as a namespace, but that was flagged in
2910
2910
  // https://github.com/benjamn/wryware/issues/347, and can be avoided.
2911
2911
  /* @__PURE__ */ Object.create(null)
2912
- ), ln = Oo, Tt = ln[ut] || // Earlier versions of this package stored the globalKey property on the Array
2912
+ ), cr = $o, Ee = cr[ue] || // Earlier versions of this package stored the globalKey property on the Array
2913
2913
  // constructor, so we check there as well, to prevent Slot class duplication.
2914
- Array[ut] || (function(e) {
2914
+ Array[ue] || (function(t) {
2915
2915
  try {
2916
- Object.defineProperty(ln, ut, {
2917
- value: e,
2916
+ Object.defineProperty(cr, ue, {
2917
+ value: t,
2918
2918
  enumerable: !1,
2919
2919
  writable: !1,
2920
2920
  // When it was possible for globalHost to be the Array constructor (a
@@ -2926,234 +2926,234 @@ Array[ut] || (function(e) {
2926
2926
  configurable: !0
2927
2927
  });
2928
2928
  } finally {
2929
- return e;
2929
+ return t;
2930
2930
  }
2931
- })(Po()), { bind: hs, noContext: ms } = Tt;
2932
- new Tt();
2933
- function $o(e, t) {
2934
- var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
2935
- if (n) return (n = n.call(e)).next.bind(n);
2936
- if (Array.isArray(e) || (n = jo(e)) || t) {
2937
- n && (e = n);
2938
- var r = 0;
2931
+ })(jo()), { bind: ga, noContext: wa } = Ee;
2932
+ new Ee();
2933
+ function Ao(t, e) {
2934
+ var r = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
2935
+ if (r) return (r = r.call(t)).next.bind(r);
2936
+ if (Array.isArray(t) || (r = Lo(t)) || e) {
2937
+ r && (t = r);
2938
+ var n = 0;
2939
2939
  return function() {
2940
- return r >= e.length ? { done: !0 } : { done: !1, value: e[r++] };
2940
+ return n >= t.length ? { done: !0 } : { done: !1, value: t[n++] };
2941
2941
  };
2942
2942
  }
2943
2943
  throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2944
2944
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
2945
2945
  }
2946
- function jo(e, t) {
2947
- if (e) {
2948
- if (typeof e == "string") return un(e, t);
2949
- var n = Object.prototype.toString.call(e).slice(8, -1);
2950
- if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set") return Array.from(e);
2951
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return un(e, t);
2946
+ function Lo(t, e) {
2947
+ if (t) {
2948
+ if (typeof t == "string") return lr(t, e);
2949
+ var r = Object.prototype.toString.call(t).slice(8, -1);
2950
+ if (r === "Object" && t.constructor && (r = t.constructor.name), r === "Map" || r === "Set") return Array.from(t);
2951
+ if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return lr(t, e);
2952
2952
  }
2953
2953
  }
2954
- function un(e, t) {
2955
- (t == null || t > e.length) && (t = e.length);
2956
- for (var n = 0, r = new Array(t); n < t; n++)
2957
- r[n] = e[n];
2958
- return r;
2954
+ function lr(t, e) {
2955
+ (e == null || e > t.length) && (e = t.length);
2956
+ for (var r = 0, n = new Array(e); r < e; r++)
2957
+ n[r] = t[r];
2958
+ return n;
2959
2959
  }
2960
- function fn(e, t) {
2961
- for (var n = 0; n < t.length; n++) {
2962
- var r = t[n];
2963
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
2960
+ function ur(t, e) {
2961
+ for (var r = 0; r < e.length; r++) {
2962
+ var n = e[r];
2963
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n);
2964
2964
  }
2965
2965
  }
2966
- function Et(e, t, n) {
2967
- return t && fn(e.prototype, t), n && fn(e, n), Object.defineProperty(e, "prototype", { writable: !1 }), e;
2966
+ function Te(t, e, r) {
2967
+ return e && ur(t.prototype, e), r && ur(t, r), Object.defineProperty(t, "prototype", { writable: !1 }), t;
2968
2968
  }
2969
- var Pt = function() {
2969
+ var Pe = function() {
2970
2970
  return typeof Symbol == "function";
2971
- }, Ot = function(e) {
2972
- return Pt() && !!Symbol[e];
2973
- }, $t = function(e) {
2974
- return Ot(e) ? Symbol[e] : "@@" + e;
2971
+ }, Oe = function(t) {
2972
+ return Pe() && !!Symbol[t];
2973
+ }, je = function(t) {
2974
+ return Oe(t) ? Symbol[t] : "@@" + t;
2975
2975
  };
2976
- Pt() && !Ot("observable") && (Symbol.observable = Symbol("observable"));
2977
- var Ao = $t("iterator"), vt = $t("observable"), zn = $t("species");
2978
- function Ze(e, t) {
2979
- var n = e[t];
2980
- if (n != null) {
2981
- if (typeof n != "function") throw new TypeError(n + " is not a function");
2982
- return n;
2976
+ Pe() && !Oe("observable") && (Symbol.observable = Symbol("observable"));
2977
+ var zo = je("iterator"), ve = je("observable"), Rr = je("species");
2978
+ function Xt(t, e) {
2979
+ var r = t[e];
2980
+ if (r != null) {
2981
+ if (typeof r != "function") throw new TypeError(r + " is not a function");
2982
+ return r;
2983
2983
  }
2984
2984
  }
2985
- function Le(e) {
2986
- var t = e.constructor;
2987
- return t !== void 0 && (t = t[zn], t === null && (t = void 0)), t !== void 0 ? t : U;
2985
+ function Lt(t) {
2986
+ var e = t.constructor;
2987
+ return e !== void 0 && (e = e[Rr], e === null && (e = void 0)), e !== void 0 ? e : M;
2988
2988
  }
2989
- function Lo(e) {
2990
- return e instanceof U;
2989
+ function Do(t) {
2990
+ return t instanceof M;
2991
2991
  }
2992
- function Ee(e) {
2993
- Ee.log ? Ee.log(e) : setTimeout(function() {
2994
- throw e;
2992
+ function Tt(t) {
2993
+ Tt.log ? Tt.log(t) : setTimeout(function() {
2994
+ throw t;
2995
2995
  });
2996
2996
  }
2997
- function Ke(e) {
2997
+ function Jt(t) {
2998
2998
  Promise.resolve().then(function() {
2999
2999
  try {
3000
- e();
3001
- } catch (t) {
3002
- Ee(t);
3000
+ t();
3001
+ } catch (e) {
3002
+ Tt(e);
3003
3003
  }
3004
3004
  });
3005
3005
  }
3006
- function Vn(e) {
3007
- var t = e._cleanup;
3008
- if (t !== void 0 && (e._cleanup = void 0, !!t))
3006
+ function Hr(t) {
3007
+ var e = t._cleanup;
3008
+ if (e !== void 0 && (t._cleanup = void 0, !!e))
3009
3009
  try {
3010
- if (typeof t == "function")
3011
- t();
3010
+ if (typeof e == "function")
3011
+ e();
3012
3012
  else {
3013
- var n = Ze(t, "unsubscribe");
3014
- n && n.call(t);
3013
+ var r = Xt(e, "unsubscribe");
3014
+ r && r.call(e);
3015
3015
  }
3016
- } catch (r) {
3017
- Ee(r);
3016
+ } catch (n) {
3017
+ Tt(n);
3018
3018
  }
3019
3019
  }
3020
- function St(e) {
3021
- e._observer = void 0, e._queue = void 0, e._state = "closed";
3020
+ function ke(t) {
3021
+ t._observer = void 0, t._queue = void 0, t._state = "closed";
3022
3022
  }
3023
- function Do(e) {
3024
- var t = e._queue;
3025
- if (t) {
3026
- e._queue = void 0, e._state = "ready";
3027
- for (var n = 0; n < t.length && (Jn(e, t[n].type, t[n].value), e._state !== "closed"); ++n)
3023
+ function Mo(t) {
3024
+ var e = t._queue;
3025
+ if (e) {
3026
+ t._queue = void 0, t._state = "ready";
3027
+ for (var r = 0; r < e.length && (Vr(t, e[r].type, e[r].value), t._state !== "closed"); ++r)
3028
3028
  ;
3029
3029
  }
3030
3030
  }
3031
- function Jn(e, t, n) {
3032
- e._state = "running";
3033
- var r = e._observer;
3031
+ function Vr(t, e, r) {
3032
+ t._state = "running";
3033
+ var n = t._observer;
3034
3034
  try {
3035
- var o = Ze(r, t);
3036
- switch (t) {
3035
+ var o = Xt(n, e);
3036
+ switch (e) {
3037
3037
  case "next":
3038
- o && o.call(r, n);
3038
+ o && o.call(n, r);
3039
3039
  break;
3040
3040
  case "error":
3041
- if (St(e), o) o.call(r, n);
3042
- else throw n;
3041
+ if (ke(t), o) o.call(n, r);
3042
+ else throw r;
3043
3043
  break;
3044
3044
  case "complete":
3045
- St(e), o && o.call(r);
3045
+ ke(t), o && o.call(n);
3046
3046
  break;
3047
3047
  }
3048
- } catch (s) {
3049
- Ee(s);
3048
+ } catch (a) {
3049
+ Tt(a);
3050
3050
  }
3051
- e._state === "closed" ? Vn(e) : e._state === "running" && (e._state = "ready");
3051
+ t._state === "closed" ? Hr(t) : t._state === "running" && (t._state = "ready");
3052
3052
  }
3053
- function ft(e, t, n) {
3054
- if (e._state !== "closed") {
3055
- if (e._state === "buffering") {
3056
- e._queue.push({
3057
- type: t,
3058
- value: n
3053
+ function de(t, e, r) {
3054
+ if (t._state !== "closed") {
3055
+ if (t._state === "buffering") {
3056
+ t._queue.push({
3057
+ type: e,
3058
+ value: r
3059
3059
  });
3060
3060
  return;
3061
3061
  }
3062
- if (e._state !== "ready") {
3063
- e._state = "buffering", e._queue = [{
3064
- type: t,
3065
- value: n
3066
- }], Ke(function() {
3067
- return Do(e);
3062
+ if (t._state !== "ready") {
3063
+ t._state = "buffering", t._queue = [{
3064
+ type: e,
3065
+ value: r
3066
+ }], Jt(function() {
3067
+ return Mo(t);
3068
3068
  });
3069
3069
  return;
3070
3070
  }
3071
- Jn(e, t, n);
3071
+ Vr(t, e, r);
3072
3072
  }
3073
3073
  }
3074
- var Mo = /* @__PURE__ */ (function() {
3075
- function e(n, r) {
3076
- this._cleanup = void 0, this._observer = n, this._queue = void 0, this._state = "initializing";
3077
- var o = new Uo(this);
3074
+ var Uo = /* @__PURE__ */ (function() {
3075
+ function t(r, n) {
3076
+ this._cleanup = void 0, this._observer = r, this._queue = void 0, this._state = "initializing";
3077
+ var o = new Bo(this);
3078
3078
  try {
3079
- this._cleanup = r.call(void 0, o);
3080
- } catch (s) {
3081
- o.error(s);
3079
+ this._cleanup = n.call(void 0, o);
3080
+ } catch (a) {
3081
+ o.error(a);
3082
3082
  }
3083
3083
  this._state === "initializing" && (this._state = "ready");
3084
3084
  }
3085
- var t = e.prototype;
3086
- return t.unsubscribe = function() {
3087
- this._state !== "closed" && (St(this), Vn(this));
3088
- }, Et(e, [{
3085
+ var e = t.prototype;
3086
+ return e.unsubscribe = function() {
3087
+ this._state !== "closed" && (ke(this), Hr(this));
3088
+ }, Te(t, [{
3089
3089
  key: "closed",
3090
3090
  get: function() {
3091
3091
  return this._state === "closed";
3092
3092
  }
3093
- }]), e;
3094
- })(), Uo = /* @__PURE__ */ (function() {
3095
- function e(n) {
3096
- this._subscription = n;
3097
- }
3098
- var t = e.prototype;
3099
- return t.next = function(r) {
3100
- ft(this._subscription, "next", r);
3101
- }, t.error = function(r) {
3102
- ft(this._subscription, "error", r);
3103
- }, t.complete = function() {
3104
- ft(this._subscription, "complete");
3105
- }, Et(e, [{
3093
+ }]), t;
3094
+ })(), Bo = /* @__PURE__ */ (function() {
3095
+ function t(r) {
3096
+ this._subscription = r;
3097
+ }
3098
+ var e = t.prototype;
3099
+ return e.next = function(n) {
3100
+ de(this._subscription, "next", n);
3101
+ }, e.error = function(n) {
3102
+ de(this._subscription, "error", n);
3103
+ }, e.complete = function() {
3104
+ de(this._subscription, "complete");
3105
+ }, Te(t, [{
3106
3106
  key: "closed",
3107
3107
  get: function() {
3108
3108
  return this._subscription._state === "closed";
3109
3109
  }
3110
- }]), e;
3111
- })(), U = /* @__PURE__ */ (function() {
3112
- function e(n) {
3113
- if (!(this instanceof e)) throw new TypeError("Observable cannot be called as a function");
3114
- if (typeof n != "function") throw new TypeError("Observable initializer must be a function");
3115
- this._subscriber = n;
3116
- }
3117
- var t = e.prototype;
3118
- return t.subscribe = function(r) {
3119
- return (typeof r != "object" || r === null) && (r = {
3120
- next: r,
3110
+ }]), t;
3111
+ })(), M = /* @__PURE__ */ (function() {
3112
+ function t(r) {
3113
+ if (!(this instanceof t)) throw new TypeError("Observable cannot be called as a function");
3114
+ if (typeof r != "function") throw new TypeError("Observable initializer must be a function");
3115
+ this._subscriber = r;
3116
+ }
3117
+ var e = t.prototype;
3118
+ return e.subscribe = function(n) {
3119
+ return (typeof n != "object" || n === null) && (n = {
3120
+ next: n,
3121
3121
  error: arguments[1],
3122
3122
  complete: arguments[2]
3123
- }), new Mo(r, this._subscriber);
3124
- }, t.forEach = function(r) {
3123
+ }), new Uo(n, this._subscriber);
3124
+ }, e.forEach = function(n) {
3125
3125
  var o = this;
3126
- return new Promise(function(s, i) {
3127
- if (typeof r != "function") {
3128
- i(new TypeError(r + " is not a function"));
3126
+ return new Promise(function(a, i) {
3127
+ if (typeof n != "function") {
3128
+ i(new TypeError(n + " is not a function"));
3129
3129
  return;
3130
3130
  }
3131
3131
  function c() {
3132
- a.unsubscribe(), s();
3132
+ s.unsubscribe(), a();
3133
3133
  }
3134
- var a = o.subscribe({
3134
+ var s = o.subscribe({
3135
3135
  next: function(u) {
3136
3136
  try {
3137
- r(u, c);
3138
- } catch (d) {
3139
- i(d), a.unsubscribe();
3137
+ n(u, c);
3138
+ } catch (f) {
3139
+ i(f), s.unsubscribe();
3140
3140
  }
3141
3141
  },
3142
3142
  error: i,
3143
- complete: s
3143
+ complete: a
3144
3144
  });
3145
3145
  });
3146
- }, t.map = function(r) {
3146
+ }, e.map = function(n) {
3147
3147
  var o = this;
3148
- if (typeof r != "function") throw new TypeError(r + " is not a function");
3149
- var s = Le(this);
3150
- return new s(function(i) {
3148
+ if (typeof n != "function") throw new TypeError(n + " is not a function");
3149
+ var a = Lt(this);
3150
+ return new a(function(i) {
3151
3151
  return o.subscribe({
3152
3152
  next: function(c) {
3153
3153
  try {
3154
- c = r(c);
3155
- } catch (a) {
3156
- return i.error(a);
3154
+ c = n(c);
3155
+ } catch (s) {
3156
+ return i.error(s);
3157
3157
  }
3158
3158
  i.next(c);
3159
3159
  },
@@ -3165,17 +3165,17 @@ var Mo = /* @__PURE__ */ (function() {
3165
3165
  }
3166
3166
  });
3167
3167
  });
3168
- }, t.filter = function(r) {
3168
+ }, e.filter = function(n) {
3169
3169
  var o = this;
3170
- if (typeof r != "function") throw new TypeError(r + " is not a function");
3171
- var s = Le(this);
3172
- return new s(function(i) {
3170
+ if (typeof n != "function") throw new TypeError(n + " is not a function");
3171
+ var a = Lt(this);
3172
+ return new a(function(i) {
3173
3173
  return o.subscribe({
3174
3174
  next: function(c) {
3175
3175
  try {
3176
- if (!r(c)) return;
3177
- } catch (a) {
3178
- return i.error(a);
3176
+ if (!n(c)) return;
3177
+ } catch (s) {
3178
+ return i.error(s);
3179
3179
  }
3180
3180
  i.next(c);
3181
3181
  },
@@ -3187,69 +3187,69 @@ var Mo = /* @__PURE__ */ (function() {
3187
3187
  }
3188
3188
  });
3189
3189
  });
3190
- }, t.reduce = function(r) {
3190
+ }, e.reduce = function(n) {
3191
3191
  var o = this;
3192
- if (typeof r != "function") throw new TypeError(r + " is not a function");
3193
- var s = Le(this), i = arguments.length > 1, c = !1, a = arguments[1], u = a;
3194
- return new s(function(d) {
3192
+ if (typeof n != "function") throw new TypeError(n + " is not a function");
3193
+ var a = Lt(this), i = arguments.length > 1, c = !1, s = arguments[1], u = s;
3194
+ return new a(function(f) {
3195
3195
  return o.subscribe({
3196
3196
  next: function(h) {
3197
3197
  var m = !c;
3198
3198
  if (c = !0, !m || i)
3199
3199
  try {
3200
- u = r(u, h);
3200
+ u = n(u, h);
3201
3201
  } catch (g) {
3202
- return d.error(g);
3202
+ return f.error(g);
3203
3203
  }
3204
3204
  else
3205
3205
  u = h;
3206
3206
  },
3207
3207
  error: function(h) {
3208
- d.error(h);
3208
+ f.error(h);
3209
3209
  },
3210
3210
  complete: function() {
3211
- if (!c && !i) return d.error(new TypeError("Cannot reduce an empty sequence"));
3212
- d.next(u), d.complete();
3211
+ if (!c && !i) return f.error(new TypeError("Cannot reduce an empty sequence"));
3212
+ f.next(u), f.complete();
3213
3213
  }
3214
3214
  });
3215
3215
  });
3216
- }, t.concat = function() {
3217
- for (var r = this, o = arguments.length, s = new Array(o), i = 0; i < o; i++)
3218
- s[i] = arguments[i];
3219
- var c = Le(this);
3220
- return new c(function(a) {
3221
- var u, d = 0;
3216
+ }, e.concat = function() {
3217
+ for (var n = this, o = arguments.length, a = new Array(o), i = 0; i < o; i++)
3218
+ a[i] = arguments[i];
3219
+ var c = Lt(this);
3220
+ return new c(function(s) {
3221
+ var u, f = 0;
3222
3222
  function h(m) {
3223
3223
  u = m.subscribe({
3224
3224
  next: function(g) {
3225
- a.next(g);
3225
+ s.next(g);
3226
3226
  },
3227
3227
  error: function(g) {
3228
- a.error(g);
3228
+ s.error(g);
3229
3229
  },
3230
3230
  complete: function() {
3231
- d === s.length ? (u = void 0, a.complete()) : h(c.from(s[d++]));
3231
+ f === a.length ? (u = void 0, s.complete()) : h(c.from(a[f++]));
3232
3232
  }
3233
3233
  });
3234
3234
  }
3235
- return h(r), function() {
3235
+ return h(n), function() {
3236
3236
  u && (u.unsubscribe(), u = void 0);
3237
3237
  };
3238
3238
  });
3239
- }, t.flatMap = function(r) {
3239
+ }, e.flatMap = function(n) {
3240
3240
  var o = this;
3241
- if (typeof r != "function") throw new TypeError(r + " is not a function");
3242
- var s = Le(this);
3243
- return new s(function(i) {
3244
- var c = [], a = o.subscribe({
3245
- next: function(d) {
3246
- if (r)
3241
+ if (typeof n != "function") throw new TypeError(n + " is not a function");
3242
+ var a = Lt(this);
3243
+ return new a(function(i) {
3244
+ var c = [], s = o.subscribe({
3245
+ next: function(f) {
3246
+ if (n)
3247
3247
  try {
3248
- d = r(d);
3248
+ f = n(f);
3249
3249
  } catch (m) {
3250
3250
  return i.error(m);
3251
3251
  }
3252
- var h = s.from(d).subscribe({
3252
+ var h = a.from(f).subscribe({
3253
3253
  next: function(m) {
3254
3254
  i.next(m);
3255
3255
  },
@@ -3263,272 +3263,274 @@ var Mo = /* @__PURE__ */ (function() {
3263
3263
  });
3264
3264
  c.push(h);
3265
3265
  },
3266
- error: function(d) {
3267
- i.error(d);
3266
+ error: function(f) {
3267
+ i.error(f);
3268
3268
  },
3269
3269
  complete: function() {
3270
3270
  u();
3271
3271
  }
3272
3272
  });
3273
3273
  function u() {
3274
- a.closed && c.length === 0 && i.complete();
3274
+ s.closed && c.length === 0 && i.complete();
3275
3275
  }
3276
3276
  return function() {
3277
- c.forEach(function(d) {
3278
- return d.unsubscribe();
3279
- }), a.unsubscribe();
3277
+ c.forEach(function(f) {
3278
+ return f.unsubscribe();
3279
+ }), s.unsubscribe();
3280
3280
  };
3281
3281
  });
3282
- }, t[vt] = function() {
3282
+ }, e[ve] = function() {
3283
3283
  return this;
3284
- }, e.from = function(r) {
3285
- var o = typeof this == "function" ? this : e;
3286
- if (r == null) throw new TypeError(r + " is not an object");
3287
- var s = Ze(r, vt);
3288
- if (s) {
3289
- var i = s.call(r);
3284
+ }, t.from = function(n) {
3285
+ var o = typeof this == "function" ? this : t;
3286
+ if (n == null) throw new TypeError(n + " is not an object");
3287
+ var a = Xt(n, ve);
3288
+ if (a) {
3289
+ var i = a.call(n);
3290
3290
  if (Object(i) !== i) throw new TypeError(i + " is not an object");
3291
- return Lo(i) && i.constructor === o ? i : new o(function(c) {
3291
+ return Do(i) && i.constructor === o ? i : new o(function(c) {
3292
3292
  return i.subscribe(c);
3293
3293
  });
3294
3294
  }
3295
- if (Ot("iterator") && (s = Ze(r, Ao), s))
3295
+ if (Oe("iterator") && (a = Xt(n, zo), a))
3296
3296
  return new o(function(c) {
3297
- Ke(function() {
3297
+ Jt(function() {
3298
3298
  if (!c.closed) {
3299
- for (var a = $o(s.call(r)), u; !(u = a()).done; ) {
3300
- var d = u.value;
3301
- if (c.next(d), c.closed) return;
3299
+ for (var s = Ao(a.call(n)), u; !(u = s()).done; ) {
3300
+ var f = u.value;
3301
+ if (c.next(f), c.closed) return;
3302
3302
  }
3303
3303
  c.complete();
3304
3304
  }
3305
3305
  });
3306
3306
  });
3307
- if (Array.isArray(r))
3307
+ if (Array.isArray(n))
3308
3308
  return new o(function(c) {
3309
- Ke(function() {
3309
+ Jt(function() {
3310
3310
  if (!c.closed) {
3311
- for (var a = 0; a < r.length; ++a)
3312
- if (c.next(r[a]), c.closed) return;
3311
+ for (var s = 0; s < n.length; ++s)
3312
+ if (c.next(n[s]), c.closed) return;
3313
3313
  c.complete();
3314
3314
  }
3315
3315
  });
3316
3316
  });
3317
- throw new TypeError(r + " is not observable");
3318
- }, e.of = function() {
3319
- for (var r = arguments.length, o = new Array(r), s = 0; s < r; s++)
3320
- o[s] = arguments[s];
3321
- var i = typeof this == "function" ? this : e;
3317
+ throw new TypeError(n + " is not observable");
3318
+ }, t.of = function() {
3319
+ for (var n = arguments.length, o = new Array(n), a = 0; a < n; a++)
3320
+ o[a] = arguments[a];
3321
+ var i = typeof this == "function" ? this : t;
3322
3322
  return new i(function(c) {
3323
- Ke(function() {
3323
+ Jt(function() {
3324
3324
  if (!c.closed) {
3325
- for (var a = 0; a < o.length; ++a)
3326
- if (c.next(o[a]), c.closed) return;
3325
+ for (var s = 0; s < o.length; ++s)
3326
+ if (c.next(o[s]), c.closed) return;
3327
3327
  c.complete();
3328
3328
  }
3329
3329
  });
3330
3330
  });
3331
- }, Et(e, null, [{
3332
- key: zn,
3331
+ }, Te(t, null, [{
3332
+ key: Rr,
3333
3333
  get: function() {
3334
3334
  return this;
3335
3335
  }
3336
- }]), e;
3336
+ }]), t;
3337
3337
  })();
3338
- Pt() && Object.defineProperty(U, Symbol("extensions"), {
3338
+ Pe() && Object.defineProperty(M, Symbol("extensions"), {
3339
3339
  value: {
3340
- symbol: vt,
3341
- hostReportError: Ee
3340
+ symbol: ve,
3341
+ hostReportError: Tt
3342
3342
  },
3343
3343
  configurable: !0
3344
3344
  });
3345
- function qo(e) {
3346
- var t, n = e.Symbol;
3347
- if (typeof n == "function")
3348
- if (n.observable)
3349
- t = n.observable;
3345
+ function qo(t) {
3346
+ var e, r = t.Symbol;
3347
+ if (typeof r == "function")
3348
+ if (r.observable)
3349
+ e = r.observable;
3350
3350
  else {
3351
- typeof n.for == "function" ? t = n.for("https://github.com/benlesh/symbol-observable") : t = n("https://github.com/benlesh/symbol-observable");
3351
+ typeof r.for == "function" ? e = r.for("https://github.com/benlesh/symbol-observable") : e = r("https://github.com/benlesh/symbol-observable");
3352
3352
  try {
3353
- n.observable = t;
3353
+ r.observable = e;
3354
3354
  } catch {
3355
3355
  }
3356
3356
  }
3357
3357
  else
3358
- t = "@@observable";
3359
- return t;
3358
+ e = "@@observable";
3359
+ return e;
3360
3360
  }
3361
- var _e;
3362
- typeof self < "u" ? _e = self : typeof window < "u" ? _e = window : typeof global < "u" ? _e = global : typeof module < "u" ? _e = module : _e = Function("return this")();
3363
- qo(_e);
3364
- var dn = U.prototype, pn = "@@observable";
3365
- dn[pn] || (dn[pn] = function() {
3361
+ var _t;
3362
+ typeof self < "u" ? _t = self : typeof window < "u" ? _t = window : typeof global < "u" ? _t = global : typeof module < "u" ? _t = module : _t = Function("return this")();
3363
+ qo(_t);
3364
+ var dr = M.prototype, fr = "@@observable";
3365
+ dr[fr] || (dr[fr] = function() {
3366
3366
  return this;
3367
3367
  });
3368
- function Bo(e) {
3369
- for (var t = [
3368
+ function Ro(t) {
3369
+ for (var e = [
3370
3370
  "query",
3371
3371
  "operationName",
3372
3372
  "variables",
3373
3373
  "extensions",
3374
3374
  "context"
3375
- ], n = 0, r = Object.keys(e); n < r.length; n++) {
3376
- var o = r[n];
3377
- if (t.indexOf(o) < 0)
3378
- throw Hn(58, o);
3375
+ ], r = 0, n = Object.keys(t); r < n.length; r++) {
3376
+ var o = n[r];
3377
+ if (e.indexOf(o) < 0)
3378
+ throw Br(58, o);
3379
3379
  }
3380
- return e;
3380
+ return t;
3381
3381
  }
3382
- function Ho(e, t) {
3383
- var n = ae({}, e), r = function(s) {
3384
- typeof s == "function" ? n = ae(ae({}, n), s(n)) : n = ae(ae({}, n), s);
3382
+ function Ho(t, e) {
3383
+ var r = st({}, t), n = function(a) {
3384
+ typeof a == "function" ? r = st(st({}, r), a(r)) : r = st(st({}, r), a);
3385
3385
  }, o = function() {
3386
- return ae({}, n);
3386
+ return st({}, r);
3387
3387
  };
3388
- return Object.defineProperty(t, "setContext", {
3388
+ return Object.defineProperty(e, "setContext", {
3389
3389
  enumerable: !1,
3390
- value: r
3391
- }), Object.defineProperty(t, "getContext", {
3390
+ value: n
3391
+ }), Object.defineProperty(e, "getContext", {
3392
3392
  enumerable: !1,
3393
3393
  value: o
3394
- }), t;
3395
- }
3396
- function Ro(e) {
3397
- var t = {
3398
- variables: e.variables || {},
3399
- extensions: e.extensions || {},
3400
- operationName: e.operationName,
3401
- query: e.query
3394
+ }), e;
3395
+ }
3396
+ function Vo(t) {
3397
+ var e = {
3398
+ variables: t.variables || {},
3399
+ extensions: t.extensions || {},
3400
+ operationName: t.operationName,
3401
+ query: t.query
3402
3402
  };
3403
- return t.operationName || (t.operationName = typeof t.query != "string" ? To(t.query) || void 0 : ""), t;
3403
+ return e.operationName || (e.operationName = typeof e.query != "string" ? Po(e.query) || void 0 : ""), e;
3404
3404
  }
3405
- var zo = Symbol.for("apollo.deprecations"), Vo = xt, Jo = new Tt();
3406
- function Ko(e) {
3407
- return Vo[zo] || (Jo.getValue() || []).includes(e);
3405
+ var Yo = Symbol.for("apollo.deprecations"), Jo = xe, Ko = new Ee();
3406
+ function Go(t) {
3407
+ return Jo[Yo] || (Ko.getValue() || []).includes(t);
3408
3408
  }
3409
- function Go(e, t) {
3410
- Ko(e) || t();
3409
+ function Wo(t, e) {
3410
+ Go(t) || e();
3411
3411
  }
3412
- function hn(e, t) {
3413
- return t ? t(e) : U.of();
3412
+ function pr(t, e) {
3413
+ return e ? e(t) : M.of();
3414
3414
  }
3415
- function De(e) {
3416
- return typeof e == "function" ? new Kn(e) : e;
3415
+ function zt(t) {
3416
+ return typeof t == "function" ? new Yr(t) : t;
3417
3417
  }
3418
- function ze(e) {
3419
- return e.request.length <= 1;
3418
+ function Ht(t) {
3419
+ return t.request.length <= 1;
3420
3420
  }
3421
- var Kn = (
3421
+ var Yr = (
3422
3422
  /** @class */
3423
3423
  (function() {
3424
- function e(t) {
3425
- t && (this.request = t);
3424
+ function t(e) {
3425
+ e && (this.request = e);
3426
3426
  }
3427
- return e.empty = function() {
3428
- return new e(function() {
3429
- return U.of();
3427
+ return t.empty = function() {
3428
+ return new t(function() {
3429
+ return M.of();
3430
3430
  });
3431
- }, e.from = function(t) {
3432
- return t.length === 0 ? e.empty() : t.map(De).reduce(function(n, r) {
3433
- return n.concat(r);
3431
+ }, t.from = function(e) {
3432
+ return e.length === 0 ? t.empty() : e.map(zt).reduce(function(r, n) {
3433
+ return r.concat(n);
3434
3434
  });
3435
- }, e.split = function(t, n, r) {
3436
- var o = De(n), s = De(r || new e(hn)), i;
3437
- return ze(o) && ze(s) ? i = new e(function(c) {
3438
- return t(c) ? o.request(c) || U.of() : s.request(c) || U.of();
3439
- }) : i = new e(function(c, a) {
3440
- return t(c) ? o.request(c, a) || U.of() : s.request(c, a) || U.of();
3441
- }), Object.assign(i, { left: o, right: s });
3442
- }, e.execute = function(t, n) {
3443
- return t.request(Ho(n.context, Ro(Bo(n)))) || U.of();
3444
- }, e.concat = function(t, n) {
3445
- var r = De(t);
3446
- if (ze(r))
3447
- return globalThis.__DEV__ !== !1 && lt.warn(47, r), r;
3448
- var o = De(n), s;
3449
- return ze(o) ? s = new e(function(i) {
3450
- return r.request(i, function(c) {
3451
- return o.request(c) || U.of();
3452
- }) || U.of();
3453
- }) : s = new e(function(i, c) {
3454
- return r.request(i, function(a) {
3455
- return o.request(a, c) || U.of();
3456
- }) || U.of();
3457
- }), Object.assign(s, { left: r, right: o });
3458
- }, e.prototype.split = function(t, n, r) {
3459
- return this.concat(e.split(t, n, r || new e(hn)));
3460
- }, e.prototype.concat = function(t) {
3461
- return e.concat(this, t);
3462
- }, e.prototype.request = function(t, n) {
3463
- throw Hn(48);
3464
- }, e.prototype.onError = function(t, n) {
3465
- if (globalThis.__DEV__ !== !1 && Go("onError", function() {
3466
- globalThis.__DEV__ !== !1 && lt.warn(49);
3467
- }), n && n.error)
3468
- return n.error(t), !1;
3469
- throw t;
3470
- }, e.prototype.setOnError = function(t) {
3471
- return globalThis.__DEV__ !== !1 && globalThis.__DEV__ !== !1 && lt.warn(50), this.onError = t, this;
3472
- }, e;
3435
+ }, t.split = function(e, r, n) {
3436
+ var o = zt(r), a = zt(n || new t(pr)), i;
3437
+ return Ht(o) && Ht(a) ? i = new t(function(c) {
3438
+ return e(c) ? o.request(c) || M.of() : a.request(c) || M.of();
3439
+ }) : i = new t(function(c, s) {
3440
+ return e(c) ? o.request(c, s) || M.of() : a.request(c, s) || M.of();
3441
+ }), Object.assign(i, { left: o, right: a });
3442
+ }, t.execute = function(e, r) {
3443
+ return e.request(Ho(r.context, Vo(Ro(r)))) || M.of();
3444
+ }, t.concat = function(e, r) {
3445
+ var n = zt(e);
3446
+ if (Ht(n))
3447
+ return globalThis.__DEV__ !== !1 && le.warn(47, n), n;
3448
+ var o = zt(r), a;
3449
+ return Ht(o) ? a = new t(function(i) {
3450
+ return n.request(i, function(c) {
3451
+ return o.request(c) || M.of();
3452
+ }) || M.of();
3453
+ }) : a = new t(function(i, c) {
3454
+ return n.request(i, function(s) {
3455
+ return o.request(s, c) || M.of();
3456
+ }) || M.of();
3457
+ }), Object.assign(a, { left: n, right: o });
3458
+ }, t.prototype.split = function(e, r, n) {
3459
+ return this.concat(t.split(e, r, n || new t(pr)));
3460
+ }, t.prototype.concat = function(e) {
3461
+ return t.concat(this, e);
3462
+ }, t.prototype.request = function(e, r) {
3463
+ throw Br(48);
3464
+ }, t.prototype.onError = function(e, r) {
3465
+ if (globalThis.__DEV__ !== !1 && Wo("onError", function() {
3466
+ globalThis.__DEV__ !== !1 && le.warn(49);
3467
+ }), r && r.error)
3468
+ return r.error(e), !1;
3469
+ throw e;
3470
+ }, t.prototype.setOnError = function(e) {
3471
+ return globalThis.__DEV__ !== !1 && globalThis.__DEV__ !== !1 && le.warn(50), this.onError = e, this;
3472
+ }, t;
3473
3473
  })()
3474
3474
  );
3475
- function Wo(e) {
3476
- return new Kn(function(t, n) {
3477
- var r = Io(t, []);
3478
- return new U(function(o) {
3479
- var s, i = !1;
3480
- return Promise.resolve(r).then(function(c) {
3481
- return e(c, t.getContext());
3482
- }).then(t.setContext).then(function() {
3483
- i || (s = n(t).subscribe({
3475
+ function Qo(t) {
3476
+ return new Yr(function(e, r) {
3477
+ var n = _o(e, []);
3478
+ return new M(function(o) {
3479
+ var a, i = !1;
3480
+ return Promise.resolve(n).then(function(c) {
3481
+ return t(c, e.getContext());
3482
+ }).then(e.setContext).then(function() {
3483
+ i || (a = r(e).subscribe({
3484
3484
  next: o.next.bind(o),
3485
3485
  error: o.error.bind(o),
3486
3486
  complete: o.complete.bind(o)
3487
3487
  }));
3488
3488
  }).catch(o.error.bind(o)), function() {
3489
- i = !0, s && s.unsubscribe();
3489
+ i = !0, a && a.unsubscribe();
3490
3490
  };
3491
3491
  });
3492
3492
  });
3493
3493
  }
3494
- const Qo = async () => {
3495
- const e = "https://auth.australia-southeast1.gcp.commercetools.com/oauth/token", r = "Basic " + btoa(encodeURIComponent("tfegsSBVOYnR7e_yE-AjxVVN") + ":" + encodeURIComponent("pyKWgHuTxuMwDygh9JH1ehLEaLvAhBo4"));
3494
+ const Xo = async () => {
3495
+ const t = "https://auth.australia-southeast1.gcp.commercetools.com/oauth/token", n = "Basic " + btoa(encodeURIComponent("tfegsSBVOYnR7e_yE-AjxVVN") + ":" + encodeURIComponent("pyKWgHuTxuMwDygh9JH1ehLEaLvAhBo4"));
3496
3496
  try {
3497
- const o = await q.post(
3498
- e,
3497
+ const o = await U.post(
3498
+ t,
3499
3499
  new URLSearchParams({ grant_type: "client_credentials" }),
3500
3500
  // Only grant_type in body
3501
3501
  {
3502
3502
  headers: {
3503
3503
  "Content-Type": "application/x-www-form-urlencoded",
3504
- Authorization: r
3504
+ Authorization: n
3505
3505
  }
3506
3506
  }
3507
3507
  );
3508
3508
  return o.status === 200 && o.data.access_token ? o.data.access_token : (console.error("Failed to fetch token:", o.data), null);
3509
3509
  } catch (o) {
3510
- return q.isAxiosError(o) ? console.error("Error fetching token:", o.response || o.message) : console.error("Unexpected error:", o), null;
3510
+ return U.isAxiosError(o) ? console.error("Error fetching token:", o.response || o.message) : console.error("Unexpected error:", o), null;
3511
3511
  }
3512
- }, Yo = "https://api.australia-southeast1.gcp.commercetools.com/kt-demo/graphql", Zo = Zn({
3513
- uri: `${Yo}`
3514
- }), Xo = Wo(async (e, { headers: t }) => {
3515
- const n = await Qo();
3512
+ }, Zo = "https://api.australia-southeast1.gcp.commercetools.com/kt-demo/graphql", ta = Xr({
3513
+ uri: `${Zo}`
3514
+ }), ea = Qo(async (t, { headers: e }) => {
3515
+ const r = await Xo();
3516
3516
  return {
3517
3517
  headers: {
3518
- ...t,
3519
- authorization: `Bearer ${n}`
3518
+ ...e,
3519
+ authorization: `Bearer ${r}`
3520
3520
  }
3521
3521
  };
3522
- }), es = new Xn({
3523
- link: Xo.concat(Zo),
3524
- cache: new er(),
3522
+ }), ra = new Zr({
3523
+ link: ea.concat(ta),
3524
+ cache: new tn(),
3525
3525
  defaultOptions: {
3526
3526
  watchQuery: {
3527
3527
  fetchPolicy: "cache-and-network"
3528
3528
  }
3529
3529
  }
3530
- }), gs = () => /* @__PURE__ */ l(tr, { client: es, children: /* @__PURE__ */ l(lr, { children: /* @__PURE__ */ l(So, {}) }) });
3530
+ }), ya = () => /* @__PURE__ */ l(en, { client: ra, children: /* @__PURE__ */ l(dn, { children: /* @__PURE__ */ l(Co, {}) }) }), Jr = document.createElement("style");
3531
+ Jr.textContent = on;
3532
+ document.head.appendChild(Jr);
3531
3533
  export {
3532
- gs as TanyaChatbot
3534
+ ya as TanyaChatbot
3533
3535
  };
3534
3536
  //# sourceMappingURL=tanya-chatbot.es.js.map