tanya-chatbot 0.5.6 → 0.5.8
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.
package/dist/tanya-chatbot.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { useEffect as
|
|
1
|
+
import { useEffect as j, useState as z, useRef as xt } from "react";
|
|
2
2
|
import { jsx as a, jsxs as u, Fragment as oe } from "react/jsx-runtime";
|
|
3
3
|
import { createHttpLink as cr, ApolloClient as dr, InMemoryCache as ur, ApolloProvider as pr } from "@apollo/client";
|
|
4
4
|
import { Provider as fr, useDispatch as Le, useSelector as Rt } from "react-redux";
|
|
5
|
-
import { createSlice as Be, configureStore as
|
|
5
|
+
import { createSlice as Be, configureStore as mr } from "@reduxjs/toolkit";
|
|
6
6
|
import * as Ue from "@radix-ui/react-popover";
|
|
7
7
|
import "clsx";
|
|
8
8
|
import "tailwind-merge";
|
|
@@ -10,12 +10,12 @@ import E from "axios";
|
|
|
10
10
|
import "crypto-js";
|
|
11
11
|
import { Icon as xe } from "@iconify/react";
|
|
12
12
|
import { toast as U } from "react-toastify";
|
|
13
|
-
const mr = '*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media(min-width:640px){.container{max-width:640px}}@media(min-width:768px){.container{max-width:768px}}@media(min-width:1024px){.container{max-width:1024px}}@media(min-width:1280px){.container{max-width:1280px}}@media(min-width:1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.top-full{top:100%}.z-40{z-index:40}.z-50{z-index:50}.m-1{margin:.25rem}.m-3{margin:.75rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-5{margin-top:1.25rem;margin-bottom:1.25rem}.mb-1{margin-bottom:.25rem}.mb-16{margin-bottom:4rem}.mb-2{margin-bottom:.5rem}.mb-20{margin-bottom:5rem}.mb-24{margin-bottom:6rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.h-12{height:3rem}.h-28{height:7rem}.h-3{height:.75rem}.h-6{height:1.5rem}.h-\\[120px\\]{height:120px}.h-\\[200px\\]{height:200px}.h-\\[60px\\]{height:60px}.h-\\[90vh\\]{height:90vh}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-screen{height:100vh}.w-28{width:7rem}.w-3{width:.75rem}.w-5\\/6{width:83.333333%}.w-6{width:1.5rem}.w-72{width:18rem}.w-\\[100vw\\]{width:100vw}.w-\\[120px\\]{width:120px}.w-\\[150px\\]{width:150px}.w-\\[60px\\]{width:60px}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.max-w-\\[200px\\]{max-width:200px}.max-w-\\[75\\%\\]{max-width:75%}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-full{--tw-translate-y: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-ellipsis{text-overflow:ellipsis}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-\\[10px\\]{border-radius:10px}.rounded-\\[20px\\]{border-radius:20px}.rounded-\\[5px\\]{border-radius:5px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-xl{border-radius:.75rem}.rounded-l-\\[20px\\]{border-top-left-radius:20px;border-bottom-left-radius:20px}.rounded-l-xl{border-top-left-radius:.75rem;border-bottom-left-radius:.75rem}.rounded-r-xl{border-top-right-radius:.75rem;border-bottom-right-radius:.75rem}.rounded-bl-2xl{border-bottom-left-radius:1rem}.rounded-br-xl{border-bottom-right-radius:.75rem}.rounded-tr-\\[20px\\]{border-top-right-radius:20px}.rounded-tr-\\[5px\\]{border-top-right-radius:5px}.border{border-width:1px}.border-0{border-width:0px}.border-b-2{border-bottom-width:2px}.border-l-2{border-left-width:2px}.border-t-2{border-top-width:2px}.border-none{border-style:none}.border-\\[\\#C9C2DE\\]{--tw-border-opacity: 1;border-color:rgb(201 194 222 / var(--tw-border-opacity, 1))}.border-\\[\\#E5E5E5\\]{--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.bg-\\[\\#553D94\\]{--tw-bg-opacity: 1;background-color:rgb(85 61 148 / var(--tw-bg-opacity, 1))}.bg-\\[\\#6851C6\\]{--tw-bg-opacity: 1;background-color:rgb(104 81 198 / var(--tw-bg-opacity, 1))}.bg-\\[\\#804C9E0D\\]{background-color:#804c9e0d}.bg-\\[\\#A21CAF\\]{--tw-bg-opacity: 1;background-color:rgb(162 28 175 / var(--tw-bg-opacity, 1))}.bg-\\[\\#AB192D\\]{--tw-bg-opacity: 1;background-color:rgb(171 25 45 / var(--tw-bg-opacity, 1))}.bg-\\[\\#E2DBFF\\]{--tw-bg-opacity: 1;background-color:rgb(226 219 255 / var(--tw-bg-opacity, 1))}.bg-\\[\\#E3DEEF\\]{--tw-bg-opacity: 1;background-color:rgb(227 222 239 / var(--tw-bg-opacity, 1))}.bg-\\[\\#F3F3F3\\]{--tw-bg-opacity: 1;background-color:rgb(243 243 243 / var(--tw-bg-opacity, 1))}.bg-\\[\\#FFFFFF\\],.bg-\\[\\#ffffff\\]{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-black\\/30{background-color:#0000004d}.bg-indigo-300{--tw-bg-opacity: 1;background-color:rgb(165 180 252 / var(--tw-bg-opacity, 1))}.bg-popover{background-color:hsl(var(--popover))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-\\[1px\\]{padding:1px}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-7{padding-left:1.75rem;padding-right:1.75rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-2{padding-bottom:.5rem}.pl-2{padding-left:.5rem}.pr-5{padding-right:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.font-nunitoSans{font-family:Nunito Sans}.text-\\[12px\\]{font-size:12px}.text-\\[14px\\]{font-size:14px}.text-\\[15px\\]{font-size:15px}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.italic{font-style:italic}.leading-snug{line-height:1.375}.text-\\[\\#000000\\]{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-\\[\\#14121F\\]{--tw-text-opacity: 1;color:rgb(20 18 31 / var(--tw-text-opacity, 1))}.text-\\[\\#18181B\\]{--tw-text-opacity: 1;color:rgb(24 24 27 / var(--tw-text-opacity, 1))}.text-\\[\\#232323\\]{--tw-text-opacity: 1;color:rgb(35 35 35 / var(--tw-text-opacity, 1))}.text-\\[\\#323135\\]{--tw-text-opacity: 1;color:rgb(50 49 53 / var(--tw-text-opacity, 1))}.text-\\[\\#494949\\]{--tw-text-opacity: 1;color:rgb(73 73 73 / var(--tw-text-opacity, 1))}.text-\\[\\#555555\\]{--tw-text-opacity: 1;color:rgb(85 85 85 / var(--tw-text-opacity, 1))}.text-\\[\\#5B5B5B\\]{--tw-text-opacity: 1;color:rgb(91 91 91 / var(--tw-text-opacity, 1))}.text-\\[\\#68656E\\]{--tw-text-opacity: 1;color:rgb(104 101 110 / var(--tw-text-opacity, 1))}.text-\\[\\#959595\\]{--tw-text-opacity: 1;color:rgb(149 149 149 / var(--tw-text-opacity, 1))}.text-\\[\\#EC5050\\]{--tw-text-opacity: 1;color:rgb(236 80 80 / var(--tw-text-opacity, 1))}.text-\\[\\#FBFBFC\\]{--tw-text-opacity: 1;color:rgb(251 251 252 / var(--tw-text-opacity, 1))}.text-\\[\\#FFFFFF\\]{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.line-through{text-decoration-line:line-through}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-80{opacity:.8}.shadow-\\[0px_2px_2px_0px_\\#9292BC40\\]{--tw-shadow: 0px 2px 2px 0px #9292BC40;--tw-shadow-colored: 0px 2px 2px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0px_4px_10px_0px_\\#5F499840\\]{--tw-shadow: 0px 4px 10px 0px #5F499840;--tw-shadow-colored: 0px 4px 10px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.duration-300{animation-duration:.3s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.running{animation-play-state:running}html,body,#root{margin:0;padding:0}:root{line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;padding:0}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}@media(prefers-color-scheme:light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}.hover\\:scale-125:hover{--tw-scale-x: 1.25;--tw-scale-y: 1.25;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:text-\\[\\#6952C7\\]:hover{--tw-text-opacity: 1;color:rgb(105 82 199 / var(--tw-text-opacity, 1))}.hover\\:opacity-90:hover{opacity:.9}.group:hover .group-hover\\:opacity-100{opacity:1}.data-\\[state\\=open\\]\\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\\[state\\=closed\\]\\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\\[state\\=closed\\]\\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\\[state\\=open\\]\\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\\[state\\=closed\\]\\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\\[state\\=open\\]\\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\\[side\\=bottom\\]\\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\\[side\\=left\\]\\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\\[side\\=right\\]\\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\\[side\\=top\\]\\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}@media(min-width:640px){.sm\\:w-\\[80vw\\]{width:80vw}}@media(min-width:768px){.md\\:h-\\[100vh\\]{height:100vh}.md\\:w-1\\/2{width:50%}.md\\:w-\\[770px\\]{width:770px}.md\\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\\:translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\\:translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\\:flex-row{flex-direction:row}}@media(min-width:1024px){.lg\\:h-\\[100vh\\]{height:100vh}.lg\\:w-1\\/2{width:50%}.lg\\:w-2\\/3{width:66.666667%}.lg\\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\\:translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\\:translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\\:transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\\:flex-row{flex-direction:row}.lg\\:rounded-l-xl{border-top-left-radius:.75rem;border-bottom-left-radius:.75rem}.lg\\:rounded-bl-xl{border-bottom-left-radius:.75rem}}';
|
|
13
|
+
const hr = '*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media(min-width:640px){.container{max-width:640px}}@media(min-width:768px){.container{max-width:768px}}@media(min-width:1024px){.container{max-width:1024px}}@media(min-width:1280px){.container{max-width:1280px}}@media(min-width:1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.top-full{top:100%}.z-40{z-index:40}.z-50{z-index:50}.m-1{margin:.25rem}.m-3{margin:.75rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-5{margin-top:1.25rem;margin-bottom:1.25rem}.mb-1{margin-bottom:.25rem}.mb-16{margin-bottom:4rem}.mb-2{margin-bottom:.5rem}.mb-20{margin-bottom:5rem}.mb-24{margin-bottom:6rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.h-12{height:3rem}.h-28{height:7rem}.h-3{height:.75rem}.h-6{height:1.5rem}.h-\\[120px\\]{height:120px}.h-\\[200px\\]{height:200px}.h-\\[60px\\]{height:60px}.h-\\[90vh\\]{height:90vh}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-screen{height:100vh}.w-28{width:7rem}.w-3{width:.75rem}.w-5\\/6{width:83.333333%}.w-6{width:1.5rem}.w-72{width:18rem}.w-\\[100vw\\]{width:100vw}.w-\\[120px\\]{width:120px}.w-\\[150px\\]{width:150px}.w-\\[60px\\]{width:60px}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.max-w-\\[200px\\]{max-width:200px}.max-w-\\[75\\%\\]{max-width:75%}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-full{--tw-translate-y: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-ellipsis{text-overflow:ellipsis}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-\\[10px\\]{border-radius:10px}.rounded-\\[20px\\]{border-radius:20px}.rounded-\\[5px\\]{border-radius:5px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-xl{border-radius:.75rem}.rounded-l-\\[20px\\]{border-top-left-radius:20px;border-bottom-left-radius:20px}.rounded-l-xl{border-top-left-radius:.75rem;border-bottom-left-radius:.75rem}.rounded-r-xl{border-top-right-radius:.75rem;border-bottom-right-radius:.75rem}.rounded-bl-2xl{border-bottom-left-radius:1rem}.rounded-br-xl{border-bottom-right-radius:.75rem}.rounded-tr-\\[20px\\]{border-top-right-radius:20px}.rounded-tr-\\[5px\\]{border-top-right-radius:5px}.border{border-width:1px}.border-0{border-width:0px}.border-b-2{border-bottom-width:2px}.border-l-2{border-left-width:2px}.border-t-2{border-top-width:2px}.border-none{border-style:none}.border-\\[\\#C9C2DE\\]{--tw-border-opacity: 1;border-color:rgb(201 194 222 / var(--tw-border-opacity, 1))}.border-\\[\\#E5E5E5\\]{--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.bg-\\[\\#553D94\\]{--tw-bg-opacity: 1;background-color:rgb(85 61 148 / var(--tw-bg-opacity, 1))}.bg-\\[\\#6851C6\\]{--tw-bg-opacity: 1;background-color:rgb(104 81 198 / var(--tw-bg-opacity, 1))}.bg-\\[\\#804C9E0D\\]{background-color:#804c9e0d}.bg-\\[\\#A21CAF\\]{--tw-bg-opacity: 1;background-color:rgb(162 28 175 / var(--tw-bg-opacity, 1))}.bg-\\[\\#AB192D\\]{--tw-bg-opacity: 1;background-color:rgb(171 25 45 / var(--tw-bg-opacity, 1))}.bg-\\[\\#E2DBFF\\]{--tw-bg-opacity: 1;background-color:rgb(226 219 255 / var(--tw-bg-opacity, 1))}.bg-\\[\\#E3DEEF\\]{--tw-bg-opacity: 1;background-color:rgb(227 222 239 / var(--tw-bg-opacity, 1))}.bg-\\[\\#F3F3F3\\]{--tw-bg-opacity: 1;background-color:rgb(243 243 243 / var(--tw-bg-opacity, 1))}.bg-\\[\\#FFFFFF\\],.bg-\\[\\#ffffff\\]{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-black\\/30{background-color:#0000004d}.bg-indigo-300{--tw-bg-opacity: 1;background-color:rgb(165 180 252 / var(--tw-bg-opacity, 1))}.bg-popover{background-color:hsl(var(--popover))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-\\[1px\\]{padding:1px}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-7{padding-left:1.75rem;padding-right:1.75rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-2{padding-bottom:.5rem}.pl-2{padding-left:.5rem}.pr-5{padding-right:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.font-nunitoSans{font-family:Nunito Sans}.text-\\[12px\\]{font-size:12px}.text-\\[14px\\]{font-size:14px}.text-\\[15px\\]{font-size:15px}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.italic{font-style:italic}.leading-snug{line-height:1.375}.text-\\[\\#000000\\]{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-\\[\\#14121F\\]{--tw-text-opacity: 1;color:rgb(20 18 31 / var(--tw-text-opacity, 1))}.text-\\[\\#18181B\\]{--tw-text-opacity: 1;color:rgb(24 24 27 / var(--tw-text-opacity, 1))}.text-\\[\\#232323\\]{--tw-text-opacity: 1;color:rgb(35 35 35 / var(--tw-text-opacity, 1))}.text-\\[\\#323135\\]{--tw-text-opacity: 1;color:rgb(50 49 53 / var(--tw-text-opacity, 1))}.text-\\[\\#494949\\]{--tw-text-opacity: 1;color:rgb(73 73 73 / var(--tw-text-opacity, 1))}.text-\\[\\#555555\\]{--tw-text-opacity: 1;color:rgb(85 85 85 / var(--tw-text-opacity, 1))}.text-\\[\\#5B5B5B\\]{--tw-text-opacity: 1;color:rgb(91 91 91 / var(--tw-text-opacity, 1))}.text-\\[\\#68656E\\]{--tw-text-opacity: 1;color:rgb(104 101 110 / var(--tw-text-opacity, 1))}.text-\\[\\#959595\\]{--tw-text-opacity: 1;color:rgb(149 149 149 / var(--tw-text-opacity, 1))}.text-\\[\\#EC5050\\]{--tw-text-opacity: 1;color:rgb(236 80 80 / var(--tw-text-opacity, 1))}.text-\\[\\#FBFBFC\\]{--tw-text-opacity: 1;color:rgb(251 251 252 / var(--tw-text-opacity, 1))}.text-\\[\\#FFFFFF\\]{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.line-through{text-decoration-line:line-through}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-80{opacity:.8}.shadow-\\[0px_2px_2px_0px_\\#9292BC40\\]{--tw-shadow: 0px 2px 2px 0px #9292BC40;--tw-shadow-colored: 0px 2px 2px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0px_4px_10px_0px_\\#5F499840\\]{--tw-shadow: 0px 4px 10px 0px #5F499840;--tw-shadow-colored: 0px 4px 10px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.duration-300{animation-duration:.3s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.running{animation-play-state:running}html,body,#root{margin:0;padding:0}:root{line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;padding:0}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}@media(prefers-color-scheme:light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}.hover\\:scale-125:hover{--tw-scale-x: 1.25;--tw-scale-y: 1.25;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:text-\\[\\#6952C7\\]:hover{--tw-text-opacity: 1;color:rgb(105 82 199 / var(--tw-text-opacity, 1))}.hover\\:opacity-90:hover{opacity:.9}.group:hover .group-hover\\:opacity-100{opacity:1}.data-\\[state\\=open\\]\\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\\[state\\=closed\\]\\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\\[state\\=closed\\]\\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\\[state\\=open\\]\\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\\[state\\=closed\\]\\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\\[state\\=open\\]\\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\\[side\\=bottom\\]\\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\\[side\\=left\\]\\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\\[side\\=right\\]\\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\\[side\\=top\\]\\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}@media(min-width:640px){.sm\\:w-\\[80vw\\]{width:80vw}}@media(min-width:768px){.md\\:h-\\[100vh\\]{height:100vh}.md\\:w-1\\/2{width:50%}.md\\:w-\\[770px\\]{width:770px}.md\\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\\:translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\\:translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\\:flex-row{flex-direction:row}}@media(min-width:1024px){.lg\\:h-\\[100vh\\]{height:100vh}.lg\\:w-1\\/2{width:50%}.lg\\:w-2\\/3{width:66.666667%}.lg\\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\\:translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\\:translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\\:transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\\:flex-row{flex-direction:row}.lg\\:rounded-l-xl{border-top-left-radius:.75rem;border-bottom-left-radius:.75rem}.lg\\:rounded-bl-xl{border-bottom-left-radius:.75rem}}';
|
|
14
14
|
function So() {
|
|
15
|
-
return
|
|
15
|
+
return j(() => {
|
|
16
16
|
if (typeof document < "u") {
|
|
17
17
|
const t = document.createElement("style");
|
|
18
|
-
return t.textContent =
|
|
18
|
+
return t.textContent = hr, document.head.appendChild(t), () => {
|
|
19
19
|
document.head.removeChild(t);
|
|
20
20
|
};
|
|
21
21
|
}
|
|
@@ -73,7 +73,7 @@ const wr = {
|
|
|
73
73
|
t.product = e.payload;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
}), { setProduct: ne } = Me.actions, xr = Me.reducer, yr =
|
|
76
|
+
}), { setProduct: ne } = Me.actions, xr = Me.reducer, yr = mr({
|
|
77
77
|
reducer: {
|
|
78
78
|
store: gr,
|
|
79
79
|
product: xr
|
|
@@ -101,7 +101,7 @@ const St = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1
|
|
|
101
101
|
const t = "https://tanya-sfcc-server.vercel.app/";
|
|
102
102
|
try {
|
|
103
103
|
const e = await E.post(
|
|
104
|
-
`${t}api/auth/token-bm-grant?baseUrl=${
|
|
104
|
+
`${t}api/auth/token-bm-grant?baseUrl=${tt()}&siteId=${K()}`
|
|
105
105
|
);
|
|
106
106
|
return e.status === 200 && e.data.access_token ? e.data.access_token : (console.error("Failed to fetch token:", e.data), null);
|
|
107
107
|
} catch (e) {
|
|
@@ -111,7 +111,7 @@ const St = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1
|
|
|
111
111
|
const e = "https://tanya-sfcc-server.vercel.app/";
|
|
112
112
|
try {
|
|
113
113
|
const r = JSON.parse(sessionStorage.getItem("customerData") || "{}").dwsid, o = await E.post(
|
|
114
|
-
`${e}api/auth/token-existing-guest-customer?dwsid=${r}&baseUrl=${
|
|
114
|
+
`${e}api/auth/token-existing-guest-customer?dwsid=${r}&baseUrl=${tt()}&siteId=${K()}&pubCfg=${it()}&envRef=${st()}&orgRef=${lt()}`,
|
|
115
115
|
{},
|
|
116
116
|
{
|
|
117
117
|
headers: {
|
|
@@ -127,10 +127,10 @@ const St = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1
|
|
|
127
127
|
};
|
|
128
128
|
async function $t() {
|
|
129
129
|
var c;
|
|
130
|
-
const t =
|
|
130
|
+
const t = K(), e = "access_token_" + t, r = "expires_in_" + t, o = localStorage.getItem(r), n = localStorage.getItem(e);
|
|
131
131
|
return console.log(n), (c = JSON.parse(sessionStorage.getItem("customerData") || "{}")) != null && c.isGuest, console.log("access token found in local storage"), { access_token: n, expires_in: o };
|
|
132
132
|
}
|
|
133
|
-
const
|
|
133
|
+
const tt = () => sessionStorage.getItem("Host"), K = () => sessionStorage.getItem("SiteId"), it = () => sessionStorage.getItem("pubCfg"), st = () => sessionStorage.getItem("envRef"), lt = () => sessionStorage.getItem("orgRef"), ye = async (t) => {
|
|
134
134
|
console.log("fetching results");
|
|
135
135
|
const { serverUrl: e, basePath: r } = St();
|
|
136
136
|
let o = "";
|
|
@@ -139,9 +139,9 @@ const Q = () => sessionStorage.getItem("Host"), Y = () => sessionStorage.getItem
|
|
|
139
139
|
console.log("the token from getSearchResults", n), o = n.access_token;
|
|
140
140
|
}
|
|
141
141
|
try {
|
|
142
|
-
const n =
|
|
142
|
+
const n = tt();
|
|
143
143
|
return (await E.get(
|
|
144
|
-
`${e}${r}/search-sfcc?baseUrl=${n}&query=${t}&siteId=${
|
|
144
|
+
`${e}${r}/search-sfcc?baseUrl=${n}&query=${t}&siteId=${K()}&pubCfg=${it()}&envRef=${st()}&orgRef=${lt()}`,
|
|
145
145
|
{
|
|
146
146
|
headers: {
|
|
147
147
|
"Content-Type": "application/json",
|
|
@@ -154,11 +154,11 @@ const Q = () => sessionStorage.getItem("Host"), Y = () => sessionStorage.getItem
|
|
|
154
154
|
}
|
|
155
155
|
}, Ve = async (t) => {
|
|
156
156
|
if (!t) throw new Error("Product ID is required");
|
|
157
|
-
const { serverUrl: e, basePath: r } = St(), o =
|
|
157
|
+
const { serverUrl: e, basePath: r } = St(), o = tt();
|
|
158
158
|
console.log("calling access");
|
|
159
159
|
const { access_token: n } = await $t();
|
|
160
160
|
return (await E.get(
|
|
161
|
-
`${e}${r}/product-sfcc/${t}?baseUrl=${o}&siteId=${
|
|
161
|
+
`${e}${r}/product-sfcc/${t}?baseUrl=${o}&siteId=${K()}&pubCfg=${it()}&envRef=${st()}&orgRef=${lt()}`,
|
|
162
162
|
{
|
|
163
163
|
headers: {
|
|
164
164
|
"Content-Type": "application/json",
|
|
@@ -172,7 +172,7 @@ const Q = () => sessionStorage.getItem("Host"), Y = () => sessionStorage.getItem
|
|
|
172
172
|
e
|
|
173
173
|
), { serverUrl: o, basePath: n } = St(), l = (await $t()).access_token;
|
|
174
174
|
return (await E.get(
|
|
175
|
-
`${o}${n}/get-interest?baseUrl=${
|
|
175
|
+
`${o}${n}/get-interest?baseUrl=${tt()}&customerId=${t}&siteId=${K()}&pubCfg=${it()}&envRef=${st()}&orgRef=${lt()}`,
|
|
176
176
|
{
|
|
177
177
|
headers: {
|
|
178
178
|
"Content-Type": "application/json",
|
|
@@ -197,8 +197,8 @@ const Q = () => sessionStorage.getItem("Host"), Y = () => sessionStorage.getItem
|
|
|
197
197
|
return o ? `<p key=${r} class="mb-2"><strong>${o[1]}.</strong> ${o[2]}</p>` : e.trim() ? `<p key=${r} class="mb-2">${e}</p>` : "<br/>";
|
|
198
198
|
}).join("");
|
|
199
199
|
function Fr() {
|
|
200
|
-
const t = () => window.innerWidth < 425 ? 1 : window.innerWidth < 768 ? 2 : 4, [e, r] =
|
|
201
|
-
return
|
|
200
|
+
const t = () => window.innerWidth < 425 ? 1 : window.innerWidth < 768 ? 2 : 4, [e, r] = z(t);
|
|
201
|
+
return j(() => {
|
|
202
202
|
const o = () => r(t());
|
|
203
203
|
return window.addEventListener("resize", o), () => window.removeEventListener("resize", o);
|
|
204
204
|
}, []), e;
|
|
@@ -206,16 +206,16 @@ function Fr() {
|
|
|
206
206
|
const Nr = ({
|
|
207
207
|
product: t
|
|
208
208
|
}) => {
|
|
209
|
-
const e = Le(), r = Fr(), [o, n] =
|
|
209
|
+
const e = Le(), r = Fr(), [o, n] = z(0), c = () => {
|
|
210
210
|
n(
|
|
211
|
-
(
|
|
211
|
+
(s) => s + r >= t.length ? 0 : s + r
|
|
212
212
|
);
|
|
213
213
|
}, l = () => {
|
|
214
214
|
n(
|
|
215
|
-
(
|
|
215
|
+
(s) => s - r < 0 ? t.length - (t.length % r || r) : s - r
|
|
216
216
|
);
|
|
217
|
-
}, d = async (
|
|
218
|
-
const y = await Ve(
|
|
217
|
+
}, d = async (s) => {
|
|
218
|
+
const y = await Ve(s);
|
|
219
219
|
e(ne(y));
|
|
220
220
|
};
|
|
221
221
|
return /* @__PURE__ */ a("div", { className: "mt-2 overflow-x-hidden", children: /* @__PURE__ */ u("div", { className: "flex items-center justify-center gap-4 relative", children: [
|
|
@@ -232,22 +232,22 @@ const Nr = ({
|
|
|
232
232
|
children: "<"
|
|
233
233
|
}
|
|
234
234
|
),
|
|
235
|
-
/* @__PURE__ */ a("div", { className: "flex gap-5 justify-center flex-1 overflow-hidden", children: t.slice(o, o + r).map((
|
|
235
|
+
/* @__PURE__ */ a("div", { className: "flex gap-5 justify-center flex-1 overflow-hidden", children: t.slice(o, o + r).map((s) => {
|
|
236
236
|
var y, v, C, _;
|
|
237
237
|
return /* @__PURE__ */ u(
|
|
238
238
|
"div",
|
|
239
239
|
{
|
|
240
240
|
className: "flex-shrink-0 flex flex-col w-[150px] h-[200px] p-2 items-center justify-between cursor-pointer bg-[#FFFFFF] rounded-[10px] shadow-[0px_2px_2px_0px_#9292BC40]",
|
|
241
241
|
onClick: () => {
|
|
242
|
-
d(
|
|
242
|
+
d(s.product_id ?? s.productId);
|
|
243
243
|
},
|
|
244
244
|
children: [
|
|
245
245
|
/* @__PURE__ */ a("div", { className: "w-full p-2 flex items-center justify-center bg-white", children: /* @__PURE__ */ a(
|
|
246
246
|
"img",
|
|
247
247
|
{
|
|
248
|
-
src: ((y = ke(
|
|
248
|
+
src: ((y = ke(s)[0]) == null ? void 0 : y.link) || ke(s)[0] || // fallback if it's a string
|
|
249
249
|
"https://via.placeholder.com/120",
|
|
250
|
-
alt:
|
|
250
|
+
alt: s != null && s.productName ? s.productName : "Product",
|
|
251
251
|
className: "w-28 h-28 rounded-[10px] transition-transform duration-300 hover:scale-125 object-cover"
|
|
252
252
|
}
|
|
253
253
|
) }),
|
|
@@ -257,8 +257,8 @@ const Nr = ({
|
|
|
257
257
|
className: "text-white w-full p-2 text-[12px] text-center h-[60px]",
|
|
258
258
|
children: [
|
|
259
259
|
/* @__PURE__ */ u("div", { className: "relative inline-block group", children: [
|
|
260
|
-
/* @__PURE__ */ a("div", { className: "w-full line-clamp-1 overflow-hidden text-ellipsis text-[#000000] font-medium font-nunitoSans", children:
|
|
261
|
-
ve((v =
|
|
260
|
+
/* @__PURE__ */ a("div", { className: "w-full line-clamp-1 overflow-hidden text-ellipsis text-[#000000] font-medium font-nunitoSans", children: s != null && s.productName ? s.productName : s != null && s.product_name ? s.product_name : _e(
|
|
261
|
+
ve((v = s == null ? void 0 : s.name) == null ? void 0 : v["en-US"]),
|
|
262
262
|
60
|
|
263
263
|
) || "Product" }),
|
|
264
264
|
/* @__PURE__ */ a(
|
|
@@ -272,8 +272,8 @@ const Nr = ({
|
|
|
272
272
|
marginBottom: "5px",
|
|
273
273
|
zIndex: 50
|
|
274
274
|
},
|
|
275
|
-
children:
|
|
276
|
-
ve((C =
|
|
275
|
+
children: s != null && s.productName ? s.productName : s != null && s.product_name ? s.product_name : _e(
|
|
276
|
+
ve((C = s == null ? void 0 : s.name) == null ? void 0 : C["en-US"]),
|
|
277
277
|
60
|
|
278
278
|
) || "Product"
|
|
279
279
|
}
|
|
@@ -281,12 +281,12 @@ const Nr = ({
|
|
|
281
281
|
] }),
|
|
282
282
|
/* @__PURE__ */ u("div", { className: " flex text-center items-center gap-2 text-[14px] text-[#14121F] font-bold font-nunitoSans text-base mb-1", children: [
|
|
283
283
|
/* @__PURE__ */ a("p", { children: Cr(
|
|
284
|
-
|
|
285
|
-
(_ = Se(
|
|
284
|
+
s != null && s.price ? Number(s == null ? void 0 : s.price) : Se(s).centAmount || 0,
|
|
285
|
+
(_ = Se(s)) == null ? void 0 : _.currencyCode
|
|
286
286
|
) }),
|
|
287
287
|
/* @__PURE__ */ u("p", { className: "text-[#14121F] font-normal line-through text-sm font-nunitoSans truncate", children: [
|
|
288
288
|
"$",
|
|
289
|
-
Number(
|
|
289
|
+
Number(s == null ? void 0 : s.price).toFixed(2) ?? 5
|
|
290
290
|
] })
|
|
291
291
|
] })
|
|
292
292
|
]
|
|
@@ -294,7 +294,7 @@ const Nr = ({
|
|
|
294
294
|
)
|
|
295
295
|
]
|
|
296
296
|
},
|
|
297
|
-
|
|
297
|
+
s.productId
|
|
298
298
|
);
|
|
299
299
|
}) }),
|
|
300
300
|
(t == null ? void 0 : t.length) > r && /* @__PURE__ */ a(
|
|
@@ -342,7 +342,7 @@ const Nr = ({
|
|
|
342
342
|
const { serverUrl: r, basePath: o } = St(), n = `${r}`;
|
|
343
343
|
try {
|
|
344
344
|
const d = await E.post(
|
|
345
|
-
`${n}${o}/basket/create?baseUrl=${
|
|
345
|
+
`${n}${o}/basket/create?baseUrl=${tt()}&siteId=${K()}&pubCfg=${it()}&envRef=${st()}&orgRef=${lt()}`,
|
|
346
346
|
e,
|
|
347
347
|
{
|
|
348
348
|
headers: {
|
|
@@ -365,7 +365,7 @@ const Nr = ({
|
|
|
365
365
|
const { serverUrl: o, basePath: n } = St(), c = `${o}`;
|
|
366
366
|
try {
|
|
367
367
|
const l = await E.post(
|
|
368
|
-
`${c}${n}/basket/add-product/${t}?baseUrl=${
|
|
368
|
+
`${c}${n}/basket/add-product/${t}?baseUrl=${tt()}&siteId=${K()}&pubCfg=${it()}&envRef=${st()}&orgRef=${lt()}`,
|
|
369
369
|
e,
|
|
370
370
|
{
|
|
371
371
|
headers: {
|
|
@@ -389,7 +389,7 @@ const Nr = ({
|
|
|
389
389
|
const { serverUrl: r, basePath: o } = St(), n = `${r}`;
|
|
390
390
|
try {
|
|
391
391
|
const l = await E.get(
|
|
392
|
-
`${n}${o}/basket/${t}?baseUrl=${
|
|
392
|
+
`${n}${o}/basket/${t}?baseUrl=${tt()}&siteId=${K()}&pubCfg=${it()}&envRef=${st()}&orgRef=${lt()}`,
|
|
393
393
|
{
|
|
394
394
|
headers: {
|
|
395
395
|
"Content-Type": "application/json",
|
|
@@ -420,15 +420,15 @@ const at = (t) => {
|
|
|
420
420
|
console.error("Error storing token:", e);
|
|
421
421
|
}
|
|
422
422
|
}, Ie = 300, Pr = ({ addToCartPwa: t }) => {
|
|
423
|
-
var
|
|
424
|
-
const e = Le(), r = Rt((
|
|
425
|
-
if (
|
|
423
|
+
var s, y, v, C, _, P;
|
|
424
|
+
const e = Le(), r = Rt((O) => O.product.product), o = Rt((O) => O.store.store), [n, c] = z(!!r);
|
|
425
|
+
if (j(() => {
|
|
426
426
|
c(!!r);
|
|
427
427
|
}, [r]), !r) return null;
|
|
428
428
|
const l = async () => {
|
|
429
|
-
var
|
|
429
|
+
var O, $, q, _t, ct, M, dt, Ct, zt, et, It, Ft, ut, At, jt, J;
|
|
430
430
|
try {
|
|
431
|
-
if (!((
|
|
431
|
+
if (!(($ = (O = r == null ? void 0 : r.variants) == null ? void 0 : O[0]) != null && $.product_id) && !(r.type.item || r.type.bundle) && !((_t = (q = r == null ? void 0 : r.variants) == null ? void 0 : q[0]) != null && _t.productId)) {
|
|
432
432
|
U.error("Variants not available", {
|
|
433
433
|
position: "bottom-right",
|
|
434
434
|
autoClose: 1e3
|
|
@@ -437,31 +437,31 @@ const at = (t) => {
|
|
|
437
437
|
}
|
|
438
438
|
const b = [
|
|
439
439
|
{
|
|
440
|
-
product_id: ((ct = r.variants) == null ? void 0 : ct[0].product_id) || ((
|
|
440
|
+
product_id: ((ct = r.variants) == null ? void 0 : ct[0].product_id) || ((M = r.variants) == null ? void 0 : M[0].productId) || (r == null ? void 0 : r.id),
|
|
441
441
|
quantity: 1
|
|
442
442
|
}
|
|
443
443
|
], rt = JSON.parse(
|
|
444
444
|
sessionStorage.getItem("customerData") || "{}"
|
|
445
445
|
), k = (rt == null ? void 0 : rt.basketId) || localStorage.getItem(Yt), Wt = !1, Dt = localStorage.getItem(Ot), Lt = Date.now();
|
|
446
446
|
if (!Wt || !Dt || Lt >= parseInt(Dt)) {
|
|
447
|
-
let
|
|
448
|
-
if (
|
|
447
|
+
let H = "";
|
|
448
|
+
if (H = "Bearer " + (await $t()).access_token, !H) {
|
|
449
449
|
console.error("Failed to get customer_token");
|
|
450
450
|
return;
|
|
451
451
|
}
|
|
452
452
|
const ot = Lt + 300 * 1e3;
|
|
453
|
-
if (Kt(
|
|
453
|
+
if (Kt(H), localStorage.setItem(Ot, ot.toString()), k) {
|
|
454
454
|
const Nt = await Ke({
|
|
455
455
|
basketId: k,
|
|
456
|
-
customer_token:
|
|
456
|
+
customer_token: H
|
|
457
457
|
});
|
|
458
458
|
if (Nt.status === 200 && Nt) {
|
|
459
|
-
const
|
|
459
|
+
const G = await ae(
|
|
460
460
|
k,
|
|
461
461
|
b,
|
|
462
|
-
|
|
462
|
+
H
|
|
463
463
|
);
|
|
464
|
-
(((dt =
|
|
464
|
+
(((dt = G == null ? void 0 : G.product_items) == null ? void 0 : dt.length) > 0 || ((Ct = G == null ? void 0 : G.productItems) == null ? void 0 : Ct.length) > 0) && (U.success("Added to cart", {
|
|
465
465
|
position: "bottom-right",
|
|
466
466
|
autoClose: 3e3,
|
|
467
467
|
hideProgressBar: !1,
|
|
@@ -475,11 +475,11 @@ const at = (t) => {
|
|
|
475
475
|
const pt = {
|
|
476
476
|
productItems: [
|
|
477
477
|
{
|
|
478
|
-
productId: ((zt = r.variants) == null ? void 0 : zt[0].product_id) || ((
|
|
478
|
+
productId: ((zt = r.variants) == null ? void 0 : zt[0].product_id) || ((et = r.variants) == null ? void 0 : et[0].productId) || (r == null ? void 0 : r.id),
|
|
479
479
|
quantity: 1
|
|
480
480
|
}
|
|
481
481
|
]
|
|
482
|
-
}, S = await Ye(
|
|
482
|
+
}, S = await Ye(H, pt);
|
|
483
483
|
if (!(S != null && S.basket_id) && !(S != null && S.basketId)) {
|
|
484
484
|
console.error("Failed to create basket");
|
|
485
485
|
return;
|
|
@@ -487,12 +487,12 @@ const at = (t) => {
|
|
|
487
487
|
at(
|
|
488
488
|
(S == null ? void 0 : S.basket_id) || (S == null ? void 0 : S.basketId)
|
|
489
489
|
), console.log("adding product to basket");
|
|
490
|
-
const
|
|
490
|
+
const W = await ae(
|
|
491
491
|
(S == null ? void 0 : S.basket_id) || (S == null ? void 0 : S.basketId),
|
|
492
492
|
b,
|
|
493
|
-
|
|
493
|
+
H
|
|
494
494
|
);
|
|
495
|
-
console.log("object added to basket"), (((It =
|
|
495
|
+
console.log("object added to basket"), (((It = W == null ? void 0 : W.product_items) == null ? void 0 : It.length) > 0 || ((Ft = W == null ? void 0 : W.productItems) == null ? void 0 : Ft.length) > 0) && U.success("Added to cart", {
|
|
496
496
|
position: "bottom-right",
|
|
497
497
|
autoClose: 3e3,
|
|
498
498
|
hideProgressBar: !1,
|
|
@@ -506,7 +506,7 @@ const at = (t) => {
|
|
|
506
506
|
position: "bottom-right",
|
|
507
507
|
autoClose: 3e3
|
|
508
508
|
}), ((ut = b == null ? void 0 : b.response) == null ? void 0 : ut.status) === 404 || // Basket not found
|
|
509
|
-
((At = b == null ? void 0 : b.response) == null ? void 0 : At.status) === 401 ? (((jt = b == null ? void 0 : b.response) == null ? void 0 : jt.status) === 404 && at(null), ((
|
|
509
|
+
((At = b == null ? void 0 : b.response) == null ? void 0 : At.status) === 401 ? (((jt = b == null ? void 0 : b.response) == null ? void 0 : jt.status) === 404 && at(null), ((J = b == null ? void 0 : b.response) == null ? void 0 : J.status) === 401 && (at(null), Kt(null))) : (console.error("Failed to add product to basket:", b.message), U.error("Failed to add product to cart", {
|
|
510
510
|
position: "bottom-right",
|
|
511
511
|
autoClose: 3e3
|
|
512
512
|
}));
|
|
@@ -533,7 +533,7 @@ const at = (t) => {
|
|
|
533
533
|
${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"}
|
|
534
534
|
`,
|
|
535
535
|
style: { willChange: "transform, opacity" },
|
|
536
|
-
onClick: (
|
|
536
|
+
onClick: (O) => O.stopPropagation(),
|
|
537
537
|
children: [
|
|
538
538
|
/* @__PURE__ */ u("div", { className: "mt-3 flex flex-row justify-between w-full ", children: [
|
|
539
539
|
/* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("p", { className: "text-[#000000] font-bold font-nunitoSans", children: r.name }) }),
|
|
@@ -555,20 +555,20 @@ const at = (t) => {
|
|
|
555
555
|
/* @__PURE__ */ a("div", { className: "flex flex-row items-center justify-center w-[120px] h-[120px] my-5", children: /* @__PURE__ */ a(
|
|
556
556
|
"img",
|
|
557
557
|
{
|
|
558
|
-
src: (C = (v = (y = (
|
|
558
|
+
src: (C = (v = (y = (s = r.imageGroups) == null ? void 0 : s[0]) == null ? void 0 : y.images) == null ? void 0 : v[0]) == null ? void 0 : C.link,
|
|
559
559
|
alt: r.name,
|
|
560
560
|
className: "rounded-[10px]"
|
|
561
561
|
}
|
|
562
562
|
) }),
|
|
563
563
|
/* @__PURE__ */ a("div", { className: "flex flex-col items-center gap-2", children: r.imageGroups.slice(1, 2).map(
|
|
564
|
-
(
|
|
564
|
+
(O) => O.images.slice(1, 2).map(($) => /* @__PURE__ */ a(
|
|
565
565
|
"img",
|
|
566
566
|
{
|
|
567
|
-
src:
|
|
567
|
+
src: $.link,
|
|
568
568
|
alt: r.name,
|
|
569
569
|
className: "rounded-[10px] w-[60px] h-[60px]"
|
|
570
570
|
},
|
|
571
|
-
|
|
571
|
+
$.link
|
|
572
572
|
))
|
|
573
573
|
) })
|
|
574
574
|
] }),
|
|
@@ -611,12 +611,12 @@ const at = (t) => {
|
|
|
611
611
|
] }),
|
|
612
612
|
/* @__PURE__ */ a("div", { className: "text-[#323135] font-semibold text-sm", children: "Overall Rating" }),
|
|
613
613
|
/* @__PURE__ */ u("div", { className: "text-[#68656E] font-semibold text-sm", children: [
|
|
614
|
-
((
|
|
614
|
+
((P = r == null ? void 0 : r.rating) == null ? void 0 : P.count) || 0,
|
|
615
615
|
" ratings"
|
|
616
616
|
] })
|
|
617
617
|
] }) }),
|
|
618
|
-
/* @__PURE__ */ a("div", { className: "mt-2 flex flex-row items-center gap-2", children: Array.from({ length: 5 }).map((
|
|
619
|
-
var
|
|
618
|
+
/* @__PURE__ */ a("div", { className: "mt-2 flex flex-row items-center gap-2", children: Array.from({ length: 5 }).map((O, $) => {
|
|
619
|
+
var q;
|
|
620
620
|
return /* @__PURE__ */ a(
|
|
621
621
|
xe,
|
|
622
622
|
{
|
|
@@ -624,10 +624,10 @@ const at = (t) => {
|
|
|
624
624
|
width: "20",
|
|
625
625
|
height: "20",
|
|
626
626
|
className: `text-yellow-500
|
|
627
|
-
${((
|
|
627
|
+
${((q = r == null ? void 0 : r.rating) == null ? void 0 : q.rate) > $ ? "text-yellow-500" : "text-gray-300"}
|
|
628
628
|
`
|
|
629
629
|
},
|
|
630
|
-
|
|
630
|
+
$
|
|
631
631
|
);
|
|
632
632
|
}) })
|
|
633
633
|
] }),
|
|
@@ -681,169 +681,169 @@ const at = (t) => {
|
|
|
681
681
|
"Niece/Nephew": "his/her niece/nephew",
|
|
682
682
|
"My Friends": "his/her friends",
|
|
683
683
|
Others: "others"
|
|
684
|
-
}, c = xt(null), l = xt(null), d = xt(null),
|
|
685
|
-
id:
|
|
686
|
-
title:
|
|
687
|
-
image:
|
|
688
|
-
price:
|
|
689
|
-
}), [
|
|
690
|
-
|
|
691
|
-
const
|
|
684
|
+
}, c = xt(null), l = xt(null), d = xt(null), s = xt(null), [y, v] = z(null), C = xt(null), [_, P] = z(!1), [O, $] = z(!1), [q, _t] = z(!1), [ct, M] = z(!1), [dt, Ct] = z(!1), [zt, et] = z(!1), [It, Ft] = z(""), [ut, At] = z(""), jt = (i) => ({
|
|
685
|
+
id: i.id,
|
|
686
|
+
title: i.name,
|
|
687
|
+
image: i.image ?? "",
|
|
688
|
+
price: i.price ?? 0
|
|
689
|
+
}), [J, b] = z([]), rt = xt(null), k = Rt((i) => i.store.store), Wt = Rt((i) => i.product.product);
|
|
690
|
+
j(() => {
|
|
691
|
+
const i = localStorage.getItem(
|
|
692
692
|
`access_token_${t.siteId}`
|
|
693
|
-
),
|
|
693
|
+
), h = localStorage.getItem(
|
|
694
694
|
`chat-token-${t.siteId}`
|
|
695
695
|
);
|
|
696
|
-
if (
|
|
697
|
-
const
|
|
698
|
-
|
|
696
|
+
if (i && h === i) {
|
|
697
|
+
const m = localStorage.getItem("chatHistory");
|
|
698
|
+
m && b(JSON.parse(m));
|
|
699
699
|
} else
|
|
700
700
|
localStorage.setItem("chatHistory", JSON.stringify([])), localStorage.setItem(
|
|
701
701
|
`chat-token-${t.siteId}`,
|
|
702
|
-
|
|
702
|
+
i || ""
|
|
703
703
|
);
|
|
704
|
-
}, []),
|
|
705
|
-
localStorage.setItem("chatHistory", JSON.stringify(
|
|
706
|
-
const
|
|
704
|
+
}, []), j(() => {
|
|
705
|
+
localStorage.setItem("chatHistory", JSON.stringify(J));
|
|
706
|
+
const i = localStorage.getItem(
|
|
707
707
|
`access_token_${t.siteId}`
|
|
708
708
|
);
|
|
709
|
-
|
|
710
|
-
}, [
|
|
709
|
+
i && localStorage.setItem(`chat-token-${t.siteId}`, i);
|
|
710
|
+
}, [J]);
|
|
711
711
|
const Dt = () => {
|
|
712
|
-
_t(!0), setTimeout(() =>
|
|
712
|
+
_t(!0), setTimeout(() => $(!0), 10);
|
|
713
713
|
}, Lt = () => {
|
|
714
|
-
|
|
714
|
+
$(!1), setTimeout(() => _t(!1), 300);
|
|
715
715
|
};
|
|
716
|
-
|
|
716
|
+
j(() => {
|
|
717
717
|
_ ? Dt() : Lt();
|
|
718
718
|
}, [_]);
|
|
719
|
-
const
|
|
720
|
-
At(n[
|
|
719
|
+
const H = (i) => {
|
|
720
|
+
At(n[i]);
|
|
721
721
|
};
|
|
722
|
-
|
|
722
|
+
j(() => {
|
|
723
723
|
rt.current && (rt.current.scrollTop += 150);
|
|
724
|
-
}, [
|
|
724
|
+
}, [J]);
|
|
725
725
|
let ot = null, pt = null;
|
|
726
726
|
const S = async () => {
|
|
727
727
|
if (ot && pt && Date.now() < pt)
|
|
728
728
|
return ot;
|
|
729
729
|
try {
|
|
730
|
-
const
|
|
730
|
+
const i = "https://us-east-1lsr29ln3u.auth.us-east-1.amazoncognito.com/oauth2/token", h = new URLSearchParams({
|
|
731
731
|
grant_type: "client_credentials",
|
|
732
732
|
client_id: "4i8rd70sgt961tc4dhskgf08c",
|
|
733
733
|
client_secret: "bnsfq1220loh2cn2cm2ttn8fdhdpt0u8m1fgj8vfk2rn61aurjg",
|
|
734
734
|
scope: "default-m2m-resource-server-8xzfzo/read"
|
|
735
|
-
}),
|
|
735
|
+
}), m = await fetch(i, {
|
|
736
736
|
method: "POST",
|
|
737
737
|
headers: {
|
|
738
738
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
739
739
|
},
|
|
740
|
-
body:
|
|
740
|
+
body: h
|
|
741
741
|
});
|
|
742
|
-
if (!
|
|
742
|
+
if (!m.ok)
|
|
743
743
|
throw new Error(
|
|
744
|
-
`Token request failed! status: ${
|
|
744
|
+
`Token request failed! status: ${m.status}`
|
|
745
745
|
);
|
|
746
|
-
const g = await
|
|
746
|
+
const g = await m.json();
|
|
747
747
|
ot = g.access_token;
|
|
748
748
|
const p = g.expires_in || 3600;
|
|
749
749
|
return pt = Date.now() + (p - 60) * 1e3, ot;
|
|
750
|
-
} catch (
|
|
751
|
-
return console.error("Error obtaining JWT token:",
|
|
750
|
+
} catch (i) {
|
|
751
|
+
return console.error("Error obtaining JWT token:", i), ot = null, pt = null, null;
|
|
752
752
|
}
|
|
753
|
-
},
|
|
754
|
-
const
|
|
755
|
-
|
|
753
|
+
}, W = async () => {
|
|
754
|
+
const i = await $t();
|
|
755
|
+
i != null && v(i);
|
|
756
756
|
};
|
|
757
|
-
|
|
757
|
+
j(() => {
|
|
758
758
|
if (t != null && t.siteId) {
|
|
759
|
-
const { clientID:
|
|
760
|
-
sessionStorage.setItem("Host",
|
|
759
|
+
const { clientID: i, host: h, organizationID: m, shortCode: g, siteId: p } = t;
|
|
760
|
+
sessionStorage.setItem("Host", h), sessionStorage.setItem("SiteId", p), sessionStorage.setItem("pubCfg", btoa(i)), sessionStorage.setItem("envRef", g), sessionStorage.setItem("orgRef", m);
|
|
761
761
|
}
|
|
762
|
-
|
|
763
|
-
}, []),
|
|
762
|
+
W(), console.log("scapi environment v1");
|
|
763
|
+
}, []), j(() => {
|
|
764
764
|
e && (console.log("setting the basket id", e), at(e));
|
|
765
765
|
}, [e]);
|
|
766
766
|
const Nt = async () => {
|
|
767
|
-
const
|
|
767
|
+
const i = JSON.parse(
|
|
768
768
|
sessionStorage.getItem("customerData") || "{}"
|
|
769
769
|
).customerId;
|
|
770
|
-
return (await _r(
|
|
771
|
-
},
|
|
770
|
+
return (await _r(i || "")).c_interests;
|
|
771
|
+
}, G = async (i, h) => {
|
|
772
772
|
console.log("in secondary flow", Et);
|
|
773
|
-
const
|
|
774
|
-
if (console.log(
|
|
773
|
+
const m = await Nt();
|
|
774
|
+
if (console.log(m, "interests of customer", Et), !!m)
|
|
775
775
|
try {
|
|
776
776
|
b(
|
|
777
|
-
(
|
|
778
|
-
(
|
|
777
|
+
(B) => B.map(
|
|
778
|
+
(R, V) => V === B.length - 1 ? { ...R, secondaryLoading: !0 } : R
|
|
779
779
|
)
|
|
780
780
|
);
|
|
781
781
|
const g = await S();
|
|
782
782
|
if (!g) throw new Error("Failed to fetch token");
|
|
783
|
-
const p = localStorage.getItem("customerNumber"),
|
|
784
|
-
registered: String(
|
|
783
|
+
const p = localStorage.getItem("customerNumber"), w = localStorage.getItem("isLoggedIn"), ft = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
|
|
784
|
+
registered: String(w || !1),
|
|
785
785
|
userId: String(p || (/* @__PURE__ */ new Date()).getTime())
|
|
786
|
-
}).toString()}`,
|
|
786
|
+
}).toString()}`, mt = JSON.stringify({
|
|
787
787
|
flowId: "Q166PR519W",
|
|
788
788
|
flowAliasId: "HKFUVLWVH2",
|
|
789
789
|
input: {
|
|
790
790
|
loyaltyPoints: "",
|
|
791
|
-
productName:
|
|
792
|
-
productPoints: String(
|
|
793
|
-
interests:
|
|
791
|
+
productName: i,
|
|
792
|
+
productPoints: String(h || 0),
|
|
793
|
+
interests: m
|
|
794
794
|
}
|
|
795
|
-
}),
|
|
795
|
+
}), D = await fetch(ft, {
|
|
796
796
|
signal: AbortSignal.timeout(3e4),
|
|
797
797
|
method: "POST",
|
|
798
798
|
headers: {
|
|
799
799
|
"Content-Type": "application/json",
|
|
800
800
|
Authorization: `Bearer ${g}`
|
|
801
801
|
},
|
|
802
|
-
body:
|
|
802
|
+
body: mt
|
|
803
803
|
});
|
|
804
|
-
if (!
|
|
805
|
-
const
|
|
806
|
-
let
|
|
804
|
+
if (!D.body) throw new Error("Readable stream not supported");
|
|
805
|
+
const ht = D.body.getReader(), wt = new TextDecoder();
|
|
806
|
+
let L = "";
|
|
807
807
|
for (; ; ) {
|
|
808
|
-
const { done:
|
|
809
|
-
if (
|
|
810
|
-
|
|
811
|
-
const
|
|
808
|
+
const { done: B, value: R } = await ht.read();
|
|
809
|
+
if (B) break;
|
|
810
|
+
L += wt.decode(R, { stream: !0 });
|
|
811
|
+
const V = L.split(`
|
|
812
812
|
`);
|
|
813
|
-
|
|
814
|
-
for (const
|
|
815
|
-
if (
|
|
816
|
-
const f =
|
|
813
|
+
L = V.pop() || "";
|
|
814
|
+
for (const X of V)
|
|
815
|
+
if (X.startsWith("data:")) {
|
|
816
|
+
const f = X.slice(5).trim();
|
|
817
817
|
try {
|
|
818
|
-
const
|
|
819
|
-
|
|
818
|
+
const Y = JSON.parse(f);
|
|
819
|
+
Y.index === 0 && b(
|
|
820
820
|
(I) => I.map(
|
|
821
|
-
(
|
|
822
|
-
...
|
|
823
|
-
secondaryResponse:
|
|
821
|
+
(T, Q) => Q === I.length - 1 ? {
|
|
822
|
+
...T,
|
|
823
|
+
secondaryResponse: Y.data,
|
|
824
824
|
secondaryLoading: !1
|
|
825
|
-
} :
|
|
825
|
+
} : T
|
|
826
826
|
)
|
|
827
827
|
);
|
|
828
|
-
} catch (
|
|
828
|
+
} catch (Y) {
|
|
829
829
|
b(
|
|
830
830
|
(I) => I.map(
|
|
831
|
-
(
|
|
831
|
+
(T, Q) => Q === I.length - 1 ? { ...T, secondaryLoading: !1 } : T
|
|
832
832
|
)
|
|
833
|
-
), console.error("Secondary flow JSON parse error:",
|
|
833
|
+
), console.error("Secondary flow JSON parse error:", Y);
|
|
834
834
|
}
|
|
835
835
|
}
|
|
836
836
|
}
|
|
837
837
|
} catch (g) {
|
|
838
838
|
console.error("Secondary flow error:", g);
|
|
839
839
|
}
|
|
840
|
-
}, Gt = async (
|
|
841
|
-
const
|
|
842
|
-
if (
|
|
843
|
-
Ct(!0), Ft(""), c.current = null, l.current = null, d.current = null,
|
|
844
|
-
...
|
|
840
|
+
}, Gt = async (i) => {
|
|
841
|
+
const h = i || It.trim();
|
|
842
|
+
if (h) {
|
|
843
|
+
Ct(!0), Ft(""), c.current = null, l.current = null, d.current = null, s.current = null, b((m) => [
|
|
844
|
+
...m,
|
|
845
845
|
{
|
|
846
|
-
query:
|
|
846
|
+
query: h,
|
|
847
847
|
response: "Thinking for what suits you best...",
|
|
848
848
|
potentialQuestions: "",
|
|
849
849
|
products: [],
|
|
@@ -851,52 +851,52 @@ const at = (t) => {
|
|
|
851
851
|
}
|
|
852
852
|
]);
|
|
853
853
|
try {
|
|
854
|
-
const
|
|
855
|
-
if (!
|
|
854
|
+
const m = ut, g = localStorage.getItem("customerNumber"), p = localStorage.getItem("isLoggedIn"), w = await S();
|
|
855
|
+
if (!w)
|
|
856
856
|
throw new Error("Failed to obtain access token");
|
|
857
857
|
const ft = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
|
|
858
858
|
registered: String(p || !1),
|
|
859
859
|
userId: String(g || (/* @__PURE__ */ new Date()).getTime())
|
|
860
|
-
}).toString()}`,
|
|
860
|
+
}).toString()}`, mt = JSON.stringify({
|
|
861
861
|
flowId: "MMHQKYI1NE",
|
|
862
862
|
flowAliasId: "SZF9ZK1ATE",
|
|
863
863
|
input: {
|
|
864
|
-
userPrompt:
|
|
865
|
-
whom:
|
|
864
|
+
userPrompt: h,
|
|
865
|
+
whom: m
|
|
866
866
|
}
|
|
867
|
-
}),
|
|
867
|
+
}), D = await fetch(ft, {
|
|
868
868
|
signal: AbortSignal.timeout(3e4),
|
|
869
869
|
method: "POST",
|
|
870
870
|
headers: {
|
|
871
871
|
"Content-Type": "application/json",
|
|
872
|
-
Authorization: `Bearer ${
|
|
872
|
+
Authorization: `Bearer ${w}`
|
|
873
873
|
},
|
|
874
|
-
body:
|
|
874
|
+
body: mt
|
|
875
875
|
});
|
|
876
|
-
if (!
|
|
877
|
-
throw new Error(`HTTP error! status: ${
|
|
878
|
-
if (!
|
|
879
|
-
const
|
|
880
|
-
let
|
|
876
|
+
if (!D.ok)
|
|
877
|
+
throw new Error(`HTTP error! status: ${D.status}`);
|
|
878
|
+
if (!D.body) throw new Error("Readable stream not supported");
|
|
879
|
+
const ht = D.body.getReader(), wt = new TextDecoder();
|
|
880
|
+
let L = "", B = "";
|
|
881
881
|
for (; ; ) {
|
|
882
|
-
|
|
883
|
-
const { done:
|
|
884
|
-
if (
|
|
885
|
-
|
|
886
|
-
const
|
|
882
|
+
et(!0);
|
|
883
|
+
const { done: R, value: V } = await ht.read();
|
|
884
|
+
if (R) break;
|
|
885
|
+
L += wt.decode(V, { stream: !0 });
|
|
886
|
+
const X = L.split(`
|
|
887
887
|
`);
|
|
888
|
-
|
|
889
|
-
for (const f of
|
|
888
|
+
L = X.pop() || "";
|
|
889
|
+
for (const f of X)
|
|
890
890
|
if (f.startsWith("data:")) {
|
|
891
|
-
const
|
|
891
|
+
const Y = f.slice(5).trim();
|
|
892
892
|
try {
|
|
893
|
-
const I = JSON.parse(
|
|
894
|
-
I.index == 1 && (
|
|
895
|
-
(
|
|
896
|
-
(
|
|
897
|
-
...
|
|
893
|
+
const I = JSON.parse(Y);
|
|
894
|
+
I.index == 1 && (B = I.data), b(
|
|
895
|
+
(T) => T.map(
|
|
896
|
+
(Q, Bt) => Bt === T.length - 1 ? {
|
|
897
|
+
...Q,
|
|
898
898
|
[I.index == 0 ? "response" : I.index == 1 ? "keywords" : I.index == 2 ? "potentialQuestions" : "end"]: I.data
|
|
899
|
-
} :
|
|
899
|
+
} : Q
|
|
900
900
|
)
|
|
901
901
|
);
|
|
902
902
|
} catch (I) {
|
|
@@ -904,51 +904,51 @@ const at = (t) => {
|
|
|
904
904
|
}
|
|
905
905
|
}
|
|
906
906
|
}
|
|
907
|
-
nr(or(
|
|
908
|
-
} catch (
|
|
909
|
-
console.error("Error sending message to Tanya:",
|
|
907
|
+
nr(or(B));
|
|
908
|
+
} catch (m) {
|
|
909
|
+
console.error("Error sending message to Tanya:", m);
|
|
910
910
|
} finally {
|
|
911
911
|
Ct(!1);
|
|
912
912
|
}
|
|
913
913
|
}
|
|
914
|
-
}, or = (
|
|
915
|
-
const
|
|
914
|
+
}, or = (i) => {
|
|
915
|
+
const h = i.match(
|
|
916
916
|
/top five relevant product or category names are: (.*)/i
|
|
917
|
-
), p = (
|
|
917
|
+
), p = (h ? h[1] : i).split(", ").map((A) => A.replace(/\s*(Toys|Bags|Miniature|etc\.*)\s*/gi, "").trim());
|
|
918
918
|
return [...new Set(p)].filter(Boolean).join(",");
|
|
919
|
-
}, nr = async (
|
|
920
|
-
if (typeof
|
|
921
|
-
console.log(
|
|
922
|
-
const
|
|
923
|
-
for (const
|
|
924
|
-
const g = await ye(
|
|
925
|
-
if (
|
|
919
|
+
}, nr = async (i) => {
|
|
920
|
+
if (typeof i == "string") {
|
|
921
|
+
console.log(i, "keywords");
|
|
922
|
+
const h = i.split(",");
|
|
923
|
+
for (const m of h) {
|
|
924
|
+
const g = await ye(m);
|
|
925
|
+
if (et(!1), (g == null ? void 0 : g.length) > 0 && (b(
|
|
926
926
|
(p) => p.map(
|
|
927
|
-
(
|
|
928
|
-
...
|
|
927
|
+
(w, A) => A === p.length - 1 ? {
|
|
928
|
+
...w,
|
|
929
929
|
products: [
|
|
930
|
-
...
|
|
931
|
-
{ keyword:
|
|
930
|
+
...w.products || [],
|
|
931
|
+
{ keyword: m, items: g, loading: !1 }
|
|
932
932
|
]
|
|
933
|
-
} :
|
|
933
|
+
} : w
|
|
934
934
|
)
|
|
935
935
|
), !c.current || l.current == null)) {
|
|
936
936
|
const p = g[0];
|
|
937
937
|
c.current = String((p == null ? void 0 : p.product_name) ?? ""), d.current = p.image.link, l.current = p.product_id;
|
|
938
|
-
const
|
|
939
|
-
|
|
938
|
+
const w = typeof (p == null ? void 0 : p.price) == "number" ? p.price : void 0;
|
|
939
|
+
s.current = typeof w == "number" && Number.isFinite(w) ? w : null;
|
|
940
940
|
}
|
|
941
941
|
}
|
|
942
942
|
} else
|
|
943
|
-
for (const
|
|
944
|
-
const
|
|
945
|
-
|
|
943
|
+
for (const h of i) {
|
|
944
|
+
const m = await ye(h);
|
|
945
|
+
et(!1), (m == null ? void 0 : m.length) > 0 && b(
|
|
946
946
|
(g) => g.map(
|
|
947
|
-
(p,
|
|
947
|
+
(p, w) => w === g.length - 1 ? {
|
|
948
948
|
...p,
|
|
949
949
|
products: [
|
|
950
950
|
...p.products || [],
|
|
951
|
-
{ keyword:
|
|
951
|
+
{ keyword: h, items: m, loading: !1 }
|
|
952
952
|
]
|
|
953
953
|
} : p
|
|
954
954
|
)
|
|
@@ -956,49 +956,49 @@ const at = (t) => {
|
|
|
956
956
|
}
|
|
957
957
|
if (c.current) {
|
|
958
958
|
b(
|
|
959
|
-
(
|
|
960
|
-
(g, p) => p ===
|
|
959
|
+
(m) => m.map(
|
|
960
|
+
(g, p) => p === m.length - 1 ? {
|
|
961
961
|
...g,
|
|
962
962
|
productSnapshot: {
|
|
963
963
|
id: l.current,
|
|
964
964
|
name: c.current,
|
|
965
965
|
image: d.current,
|
|
966
|
-
price:
|
|
966
|
+
price: s.current ?? null,
|
|
967
967
|
points: 0,
|
|
968
968
|
quantity: 1
|
|
969
969
|
}
|
|
970
970
|
} : g
|
|
971
971
|
)
|
|
972
972
|
);
|
|
973
|
-
const
|
|
973
|
+
const h = JSON.parse(
|
|
974
974
|
sessionStorage.getItem("customerData") || "{}"
|
|
975
975
|
);
|
|
976
|
-
(
|
|
976
|
+
(h == null ? void 0 : h.isGuest) == !1 ? (console.log("running secondary flow", Et), G(c.current, 0)) : console.log("not running secondary flow", Et);
|
|
977
977
|
}
|
|
978
|
-
|
|
979
|
-
}, ar = async (
|
|
980
|
-
var
|
|
981
|
-
|
|
978
|
+
et(!1);
|
|
979
|
+
}, ar = async (i, h) => {
|
|
980
|
+
var m, g, p, w, A, ft, mt, D, ht, wt, L, B, R, V, X;
|
|
981
|
+
M(!0);
|
|
982
982
|
try {
|
|
983
|
-
const f = await Ve(
|
|
984
|
-
if (!((g = (
|
|
985
|
-
|
|
983
|
+
const f = await Ve(i.id);
|
|
984
|
+
if (!((g = (m = f == null ? void 0 : f.variants) == null ? void 0 : m[0]) != null && g.product_id || (w = (p = f == null ? void 0 : f.variants) == null ? void 0 : p[0]) != null && w.productId) && !(f.type.item || f.type.bundle)) {
|
|
985
|
+
M(!1), U.error("Variants not found", {
|
|
986
986
|
position: "bottom-right",
|
|
987
987
|
autoClose: 1e3
|
|
988
988
|
}), console.error("No product variant found");
|
|
989
989
|
return;
|
|
990
990
|
}
|
|
991
|
-
const
|
|
991
|
+
const Y = [
|
|
992
992
|
{
|
|
993
|
-
product_id: ((
|
|
994
|
-
quantity:
|
|
993
|
+
product_id: ((A = f.variants) == null ? void 0 : A[0].product_id) || ((ft = f.variants) == null ? void 0 : ft[0].productId) || (f == null ? void 0 : f.id),
|
|
994
|
+
quantity: h
|
|
995
995
|
}
|
|
996
996
|
];
|
|
997
|
-
console.log(
|
|
997
|
+
console.log(Y, "product data", "app version", Et);
|
|
998
998
|
const I = JSON.parse(
|
|
999
999
|
sessionStorage.getItem("customerData") || "{}"
|
|
1000
|
-
),
|
|
1001
|
-
if (!
|
|
1000
|
+
), T = (I == null ? void 0 : I.basketId) || localStorage.getItem(Yt), Q = !1, Bt = localStorage.getItem(Ot), ge = Date.now();
|
|
1001
|
+
if (!Q || !Bt || ge >= parseInt(Bt)) {
|
|
1002
1002
|
const ir = await He();
|
|
1003
1003
|
let { customer_token: gt } = await Re(
|
|
1004
1004
|
ir
|
|
@@ -1008,32 +1008,32 @@ const at = (t) => {
|
|
|
1008
1008
|
return;
|
|
1009
1009
|
}
|
|
1010
1010
|
const sr = ge + 300 * 1e3;
|
|
1011
|
-
if (Kt(gt), localStorage.setItem(Ot, sr.toString()), console.log(
|
|
1011
|
+
if (Kt(gt), localStorage.setItem(Ot, sr.toString()), console.log(T, "basketIdFromCustomer"), T) {
|
|
1012
1012
|
const be = await Ke({
|
|
1013
|
-
basketId:
|
|
1013
|
+
basketId: T,
|
|
1014
1014
|
customer_token: gt
|
|
1015
1015
|
});
|
|
1016
1016
|
if (be.status === 200 && be) {
|
|
1017
1017
|
const Xt = await ae(
|
|
1018
|
-
|
|
1019
|
-
|
|
1018
|
+
T,
|
|
1019
|
+
Y,
|
|
1020
1020
|
gt
|
|
1021
1021
|
);
|
|
1022
|
-
((
|
|
1022
|
+
((mt = Xt == null ? void 0 : Xt.product_items) == null ? void 0 : mt.length) > 0 && (U.success("Added to cart", {
|
|
1023
1023
|
position: "bottom-right",
|
|
1024
1024
|
autoClose: 3e3,
|
|
1025
1025
|
hideProgressBar: !1,
|
|
1026
1026
|
closeOnClick: !0,
|
|
1027
1027
|
pauseOnHover: !0,
|
|
1028
1028
|
draggable: !0
|
|
1029
|
-
}), Vt(
|
|
1029
|
+
}), Vt(T), M(!1));
|
|
1030
1030
|
return;
|
|
1031
1031
|
}
|
|
1032
1032
|
}
|
|
1033
1033
|
const lr = {
|
|
1034
1034
|
productItems: [
|
|
1035
1035
|
{
|
|
1036
|
-
productId: ((
|
|
1036
|
+
productId: ((D = f.variants) == null ? void 0 : D[0].product_id) || ((ht = f.variants) == null ? void 0 : ht[0].productId) || (f == null ? void 0 : f.id),
|
|
1037
1037
|
quantity: 1
|
|
1038
1038
|
}
|
|
1039
1039
|
]
|
|
@@ -1044,7 +1044,7 @@ const at = (t) => {
|
|
|
1044
1044
|
x == null ? void 0 : x.basketId,
|
|
1045
1045
|
"the basket response"
|
|
1046
1046
|
), !(x != null && x.basket_id || !(x != null && x.basketId))) {
|
|
1047
|
-
|
|
1047
|
+
M(!1), console.error("Failed to create basket");
|
|
1048
1048
|
return;
|
|
1049
1049
|
}
|
|
1050
1050
|
at(
|
|
@@ -1053,11 +1053,11 @@ const at = (t) => {
|
|
|
1053
1053
|
const bt = await r(
|
|
1054
1054
|
{
|
|
1055
1055
|
productId: l,
|
|
1056
|
-
quantity:
|
|
1056
|
+
quantity: h
|
|
1057
1057
|
},
|
|
1058
1058
|
(x == null ? void 0 : x.basket_id) || (x == null ? void 0 : x.basketId)
|
|
1059
1059
|
);
|
|
1060
|
-
(((wt = bt == null ? void 0 : bt.product_items) == null ? void 0 : wt.length) > 0 || ((
|
|
1060
|
+
(((wt = bt == null ? void 0 : bt.product_items) == null ? void 0 : wt.length) > 0 || ((L = bt == null ? void 0 : bt.productItems) == null ? void 0 : L.length) > 0) && U.success("Added to cart", {
|
|
1061
1061
|
position: "bottom-right",
|
|
1062
1062
|
autoClose: 3e3,
|
|
1063
1063
|
hideProgressBar: !1,
|
|
@@ -1067,24 +1067,26 @@ const at = (t) => {
|
|
|
1067
1067
|
}), Vt(x.basket_id || (x == null ? void 0 : x.basketId));
|
|
1068
1068
|
}
|
|
1069
1069
|
} catch (f) {
|
|
1070
|
-
|
|
1070
|
+
M(!1), console.error("Error adding to cart:", f), U.error("Failed to add product to cart", {
|
|
1071
1071
|
position: "bottom-right",
|
|
1072
1072
|
autoClose: 3e3
|
|
1073
|
-
}), ((
|
|
1074
|
-
((
|
|
1073
|
+
}), ((B = f == null ? void 0 : f.response) == null ? void 0 : B.status) === 404 || // Basket not found
|
|
1074
|
+
((R = f == null ? void 0 : f.response) == null ? void 0 : R.status) === 401 ? (((V = f == null ? void 0 : f.response) == null ? void 0 : V.status) === 404 && at(null), ((X = f == null ? void 0 : f.response) == null ? void 0 : X.status) === 401 && (at(null), Kt(null))) : (console.error("Failed to add product to basket:", f.message), U.error("Failed to add product to cart", {
|
|
1075
1075
|
position: "bottom-right",
|
|
1076
1076
|
autoClose: 3e3
|
|
1077
1077
|
}));
|
|
1078
1078
|
}
|
|
1079
|
-
|
|
1079
|
+
M(!1);
|
|
1080
1080
|
};
|
|
1081
|
-
return
|
|
1081
|
+
return j(() => {
|
|
1082
1082
|
C.current && C.current.scrollIntoView({ behavior: "smooth" });
|
|
1083
|
-
}, [C.current]),
|
|
1083
|
+
}, [C.current]), j(() => {
|
|
1084
|
+
q ? setTimeout(() => $(!0), 10) : $(!1);
|
|
1085
|
+
}, [q]), /* @__PURE__ */ a("div", { className: "relative flex justify-center", children: /* @__PURE__ */ u(kr, { open: _, onOpenChange: P, children: [
|
|
1084
1086
|
/* @__PURE__ */ a(
|
|
1085
1087
|
Sr,
|
|
1086
1088
|
{
|
|
1087
|
-
onClick: () =>
|
|
1089
|
+
onClick: () => P(!0),
|
|
1088
1090
|
style: {
|
|
1089
1091
|
// background: storeDetails.tanyaThemeColor,
|
|
1090
1092
|
},
|
|
@@ -1144,12 +1146,12 @@ const at = (t) => {
|
|
|
1144
1146
|
) })
|
|
1145
1147
|
}
|
|
1146
1148
|
),
|
|
1147
|
-
|
|
1149
|
+
q && /* @__PURE__ */ u(oe, { children: [
|
|
1148
1150
|
/* @__PURE__ */ a(
|
|
1149
1151
|
"div",
|
|
1150
1152
|
{
|
|
1151
1153
|
className: "fixed inset-0 z-40 bg-black/30",
|
|
1152
|
-
onClick: () =>
|
|
1154
|
+
onClick: () => P(!1)
|
|
1153
1155
|
}
|
|
1154
1156
|
),
|
|
1155
1157
|
/* @__PURE__ */ u(
|
|
@@ -1160,15 +1162,14 @@ const at = (t) => {
|
|
|
1160
1162
|
top-0 right-0
|
|
1161
1163
|
transition-transform duration-300 ease-in-out
|
|
1162
1164
|
lg:transform
|
|
1163
|
-
${
|
|
1164
|
-
// For mobile: animate from bottom
|
|
1165
|
-
${T ? "translate-y-0" : "translate-y-full"}
|
|
1165
|
+
${O ? "lg:translate-x-0 translate-y-0" : "lg:translate-x-full translate-y-full"}
|
|
1166
1166
|
lg:translate-y-0
|
|
1167
1167
|
`,
|
|
1168
1168
|
style: {
|
|
1169
1169
|
background: "linear-gradient(170.1deg, #FFFFFF 60.03%, #E3DEEF 99.59%)"
|
|
1170
1170
|
},
|
|
1171
1171
|
children: [
|
|
1172
|
+
"header",
|
|
1172
1173
|
/* @__PURE__ */ u(
|
|
1173
1174
|
"div",
|
|
1174
1175
|
{
|
|
@@ -1179,7 +1180,6 @@ const at = (t) => {
|
|
|
1179
1180
|
{
|
|
1180
1181
|
style: {
|
|
1181
1182
|
display: "flex",
|
|
1182
|
-
color: k.tanyaThemeContrastColor,
|
|
1183
1183
|
alignItems: "center",
|
|
1184
1184
|
gap: "0.5rem"
|
|
1185
1185
|
},
|
|
@@ -1240,7 +1240,7 @@ const at = (t) => {
|
|
|
1240
1240
|
gap: "1.25rem",
|
|
1241
1241
|
margin: "0.75rem"
|
|
1242
1242
|
},
|
|
1243
|
-
children: /* @__PURE__ */ a("button", { onClick: () =>
|
|
1243
|
+
children: /* @__PURE__ */ a("button", { onClick: () => P(!1), children: /* @__PURE__ */ u(
|
|
1244
1244
|
"svg",
|
|
1245
1245
|
{
|
|
1246
1246
|
width: "24",
|
|
@@ -1306,38 +1306,39 @@ const at = (t) => {
|
|
|
1306
1306
|
className: "mx-3 p-3 rounded-2xl bg-[#FFFFFF]",
|
|
1307
1307
|
children: [
|
|
1308
1308
|
/* @__PURE__ */ a("div", { className: "flex gap-2 bg-[#FFFFFF]", children: /* @__PURE__ */ a("p", { className: "font-bold font-nunitoSans text-[#494949]", children: "Is this for you or someone else?" }) }),
|
|
1309
|
-
/* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2 mt-2", children: o.map((
|
|
1309
|
+
/* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2 mt-2", children: o.map((i) => /* @__PURE__ */ a(
|
|
1310
1310
|
"button",
|
|
1311
1311
|
{
|
|
1312
|
-
onClick: () =>
|
|
1312
|
+
onClick: () => H(i),
|
|
1313
1313
|
className: "px-2 py-2 font-semibold text-xs text-[#18181B] bg-[#F3F3F3] rounded-2xl",
|
|
1314
1314
|
style: {
|
|
1315
|
-
backgroundColor: ut === n[
|
|
1316
|
-
borderColor: ut === n[
|
|
1315
|
+
backgroundColor: ut === n[i] ? "#FFFFFF" : "#F3F3F3",
|
|
1316
|
+
borderColor: ut === n[i] ? "#BBB3DD" : ""
|
|
1317
1317
|
},
|
|
1318
|
-
children:
|
|
1318
|
+
children: i
|
|
1319
1319
|
},
|
|
1320
|
-
|
|
1320
|
+
i
|
|
1321
1321
|
)) })
|
|
1322
1322
|
]
|
|
1323
1323
|
}
|
|
1324
1324
|
),
|
|
1325
|
-
|
|
1326
|
-
var
|
|
1325
|
+
J.map((i, h) => {
|
|
1326
|
+
var m, g;
|
|
1327
1327
|
return /* @__PURE__ */ u("div", { children: [
|
|
1328
1328
|
/* @__PURE__ */ a(
|
|
1329
1329
|
"div",
|
|
1330
1330
|
{
|
|
1331
1331
|
className: "flex justify-end",
|
|
1332
|
-
|
|
1332
|
+
ref: h == J.length - 1 ? C : null,
|
|
1333
|
+
children: /* @__PURE__ */ a("p", { className: "text-sm font-nunitoSans font-bold text-[#000000] bg-[#E2DBFF] border border-[#C9C2DE] rounded-l-xl p-2 m-3 mb-4 rounded-br-xl max-w-[75%]", children: i.query })
|
|
1333
1334
|
}
|
|
1334
1335
|
),
|
|
1335
|
-
|
|
1336
|
+
i.response && i.response.includes("Thinking") ? /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
|
|
1336
1337
|
"div",
|
|
1337
1338
|
{
|
|
1338
1339
|
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",
|
|
1339
1340
|
dangerouslySetInnerHTML: {
|
|
1340
|
-
__html: Qt(
|
|
1341
|
+
__html: Qt(i.response)
|
|
1341
1342
|
}
|
|
1342
1343
|
}
|
|
1343
1344
|
) }) : /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
|
|
@@ -1345,19 +1346,19 @@ const at = (t) => {
|
|
|
1345
1346
|
{
|
|
1346
1347
|
className: "font-nunitoSans font-bold text-sm text-[#494949] bg-[#FFFFFF] px-7 py-1 rounded-r-xl rounded-bl-2xl w-full",
|
|
1347
1348
|
dangerouslySetInnerHTML: {
|
|
1348
|
-
__html: Qt(
|
|
1349
|
+
__html: Qt(i.response)
|
|
1349
1350
|
}
|
|
1350
1351
|
}
|
|
1351
1352
|
) }),
|
|
1352
|
-
zt && !
|
|
1353
|
-
(
|
|
1353
|
+
zt && !i.response.includes("Thinking") && ((m = i.products) == null ? void 0 : m.length) == 0 && /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("p", { className: "text-sm animate-pulse font-nunitoSans font-bold text-[#000000] bg-[#E2DBFF] border border-[#C9C2DE] rounded-l-xl p-2 m-3 mb-4 rounded-br-xl max-w-[75%]", children: "Finding best products for you" }) }),
|
|
1354
|
+
(i == null ? void 0 : i.products) && ((g = i == null ? void 0 : i.products) == null ? void 0 : g.length) > 0 && /* @__PURE__ */ a(
|
|
1354
1355
|
Er,
|
|
1355
1356
|
{
|
|
1356
|
-
chat:
|
|
1357
|
+
chat: i.products,
|
|
1357
1358
|
storeDetails: k
|
|
1358
1359
|
}
|
|
1359
1360
|
),
|
|
1360
|
-
|
|
1361
|
+
(i == null ? void 0 : i.potentialQuestions.length) > 0 && /* @__PURE__ */ u("div", { className: "my-2 px-4 text-sm text-gray-700", children: [
|
|
1361
1362
|
/* @__PURE__ */ a(
|
|
1362
1363
|
"p",
|
|
1363
1364
|
{
|
|
@@ -1366,7 +1367,7 @@ const at = (t) => {
|
|
|
1366
1367
|
children: "Why not explore these inquiries..."
|
|
1367
1368
|
}
|
|
1368
1369
|
),
|
|
1369
|
-
|
|
1370
|
+
i.potentialQuestions.split(",").map((p, w) => /* @__PURE__ */ a(
|
|
1370
1371
|
"button",
|
|
1371
1372
|
{
|
|
1372
1373
|
className: `cursor-pointer font-nunitoSans font-semibold text-[#232323] border bg-[#804C9E0D] border-${k.themeDarkColor} m-1 rounded-xl px-2 py-1`,
|
|
@@ -1376,10 +1377,10 @@ const at = (t) => {
|
|
|
1376
1377
|
},
|
|
1377
1378
|
children: p
|
|
1378
1379
|
},
|
|
1379
|
-
|
|
1380
|
+
w
|
|
1380
1381
|
))
|
|
1381
1382
|
] }),
|
|
1382
|
-
|
|
1383
|
+
(i == null ? void 0 : i.secondaryLoading) && /* @__PURE__ */ a("div", { className: "mt-3 mb-4 px-4", children: /* @__PURE__ */ u(
|
|
1383
1384
|
"div",
|
|
1384
1385
|
{
|
|
1385
1386
|
className: "tanya-surprise-wrapper bg-indigo-300 text-sm px-7 py-4 rounded-r-xl rounded-bl-2xl w-full relative overflow-hidden",
|
|
@@ -1412,7 +1413,7 @@ const at = (t) => {
|
|
|
1412
1413
|
]
|
|
1413
1414
|
}
|
|
1414
1415
|
) }),
|
|
1415
|
-
|
|
1416
|
+
(i == null ? void 0 : i.secondaryResponse) && /* @__PURE__ */ a(oe, { children: /* @__PURE__ */ u("div", { className: "mt-3 mb-8 px-4 bg-indigo-300 rounded-tr-[5px]", children: [
|
|
1416
1417
|
/* @__PURE__ */ a(
|
|
1417
1418
|
"div",
|
|
1418
1419
|
{
|
|
@@ -1422,12 +1423,12 @@ const at = (t) => {
|
|
|
1422
1423
|
},
|
|
1423
1424
|
dangerouslySetInnerHTML: {
|
|
1424
1425
|
__html: Qt(
|
|
1425
|
-
|
|
1426
|
+
i.secondaryResponse
|
|
1426
1427
|
)
|
|
1427
1428
|
}
|
|
1428
1429
|
}
|
|
1429
1430
|
),
|
|
1430
|
-
|
|
1431
|
+
i.productSnapshot && // chat.productSnapshot.points > 0 &&
|
|
1431
1432
|
/* @__PURE__ */ a("div", { className: "mt-4 w-full", children: /* @__PURE__ */ u(
|
|
1432
1433
|
"div",
|
|
1433
1434
|
{
|
|
@@ -1445,11 +1446,11 @@ const at = (t) => {
|
|
|
1445
1446
|
height: 112,
|
|
1446
1447
|
borderColor: "#eee"
|
|
1447
1448
|
},
|
|
1448
|
-
children:
|
|
1449
|
+
children: i.productSnapshot.image ? /* @__PURE__ */ a(
|
|
1449
1450
|
"img",
|
|
1450
1451
|
{
|
|
1451
|
-
src:
|
|
1452
|
-
alt:
|
|
1452
|
+
src: i.productSnapshot.image,
|
|
1453
|
+
alt: i.productSnapshot.name,
|
|
1453
1454
|
className: "w-full h-full object-cover"
|
|
1454
1455
|
}
|
|
1455
1456
|
) : /* @__PURE__ */ a("div", { className: "w-full h-full flex items-center justify-center text-xs text-gray-500", children: "No Image" })
|
|
@@ -1457,18 +1458,18 @@ const at = (t) => {
|
|
|
1457
1458
|
),
|
|
1458
1459
|
/* @__PURE__ */ u("div", { className: "flex flex-col flex-1 justify-between", children: [
|
|
1459
1460
|
/* @__PURE__ */ u("div", { children: [
|
|
1460
|
-
/* @__PURE__ */ a("p", { className: "font-semibold text-[15px] leading-snug", children:
|
|
1461
|
-
/* @__PURE__ */ a("p", { className: "mt-1 text-[14px] font-medium", children:
|
|
1461
|
+
/* @__PURE__ */ a("p", { className: "font-semibold text-[15px] leading-snug", children: i.productSnapshot.name }),
|
|
1462
|
+
/* @__PURE__ */ a("p", { className: "mt-1 text-[14px] font-medium", children: i.productSnapshot.price != null ? new Intl.NumberFormat(void 0, {
|
|
1462
1463
|
style: "currency",
|
|
1463
1464
|
currency: (k == null ? void 0 : k.currency) || "USD"
|
|
1464
1465
|
}).format(
|
|
1465
|
-
|
|
1466
|
+
i.productSnapshot.price
|
|
1466
1467
|
) : "" }),
|
|
1467
|
-
|
|
1468
|
+
i.productSnapshot.points > 0 && /* @__PURE__ */ u("p", { className: "mt-1 text-xs opacity-80", children: [
|
|
1468
1469
|
"You will earn",
|
|
1469
1470
|
" ",
|
|
1470
1471
|
/* @__PURE__ */ u("strong", { children: [
|
|
1471
|
-
|
|
1472
|
+
i.productSnapshot.points,
|
|
1472
1473
|
" ",
|
|
1473
1474
|
"points"
|
|
1474
1475
|
] })
|
|
@@ -1482,16 +1483,16 @@ const at = (t) => {
|
|
|
1482
1483
|
className: "px-3 py-1 text-sm",
|
|
1483
1484
|
onClick: () => b(
|
|
1484
1485
|
(p) => p.map(
|
|
1485
|
-
(
|
|
1486
|
-
...
|
|
1486
|
+
(w, A) => A === h && w.productSnapshot ? {
|
|
1487
|
+
...w,
|
|
1487
1488
|
productSnapshot: {
|
|
1488
|
-
...
|
|
1489
|
+
...w.productSnapshot,
|
|
1489
1490
|
quantity: Math.max(
|
|
1490
1491
|
1,
|
|
1491
|
-
|
|
1492
|
+
w.productSnapshot.quantity - 1
|
|
1492
1493
|
)
|
|
1493
1494
|
}
|
|
1494
|
-
} :
|
|
1495
|
+
} : w
|
|
1495
1496
|
)
|
|
1496
1497
|
),
|
|
1497
1498
|
style: {
|
|
@@ -1501,20 +1502,20 @@ const at = (t) => {
|
|
|
1501
1502
|
children: "−"
|
|
1502
1503
|
}
|
|
1503
1504
|
),
|
|
1504
|
-
/* @__PURE__ */ a("div", { className: "px-3 py-1 text-sm select-none", children:
|
|
1505
|
+
/* @__PURE__ */ a("div", { className: "px-3 py-1 text-sm select-none", children: i.productSnapshot.quantity }),
|
|
1505
1506
|
/* @__PURE__ */ a(
|
|
1506
1507
|
"button",
|
|
1507
1508
|
{
|
|
1508
1509
|
className: "px-3 py-1 text-sm",
|
|
1509
1510
|
onClick: () => b(
|
|
1510
1511
|
(p) => p.map(
|
|
1511
|
-
(
|
|
1512
|
-
...
|
|
1512
|
+
(w, A) => A === h && w.productSnapshot ? {
|
|
1513
|
+
...w,
|
|
1513
1514
|
productSnapshot: {
|
|
1514
|
-
...
|
|
1515
|
-
quantity:
|
|
1515
|
+
...w.productSnapshot,
|
|
1516
|
+
quantity: w.productSnapshot.quantity + 1
|
|
1516
1517
|
}
|
|
1517
|
-
} :
|
|
1518
|
+
} : w
|
|
1518
1519
|
)
|
|
1519
1520
|
),
|
|
1520
1521
|
style: {
|
|
@@ -1531,9 +1532,9 @@ const at = (t) => {
|
|
|
1531
1532
|
onClick: () => {
|
|
1532
1533
|
ar(
|
|
1533
1534
|
jt(
|
|
1534
|
-
|
|
1535
|
+
i.productSnapshot
|
|
1535
1536
|
),
|
|
1536
|
-
|
|
1537
|
+
i.productSnapshot.quantity
|
|
1537
1538
|
);
|
|
1538
1539
|
},
|
|
1539
1540
|
disabled: ct,
|
|
@@ -1553,7 +1554,7 @@ const at = (t) => {
|
|
|
1553
1554
|
) })
|
|
1554
1555
|
] }) }),
|
|
1555
1556
|
/* @__PURE__ */ a("div", { className: "mb-20" })
|
|
1556
|
-
] },
|
|
1557
|
+
] }, h);
|
|
1557
1558
|
})
|
|
1558
1559
|
]
|
|
1559
1560
|
}
|
|
@@ -1573,9 +1574,9 @@ const at = (t) => {
|
|
|
1573
1574
|
placeholder: "How can I help you...",
|
|
1574
1575
|
value: It,
|
|
1575
1576
|
autoFocus: !0,
|
|
1576
|
-
onChange: (
|
|
1577
|
-
onKeyDown: (
|
|
1578
|
-
|
|
1577
|
+
onChange: (i) => Ft(i.target.value),
|
|
1578
|
+
onKeyDown: (i) => {
|
|
1579
|
+
i.key === "Enter" && !dt && Gt();
|
|
1579
1580
|
}
|
|
1580
1581
|
}
|
|
1581
1582
|
),
|
|
@@ -1644,14 +1645,14 @@ function $r(t, e) {
|
|
|
1644
1645
|
}
|
|
1645
1646
|
t.prototype = e === null ? Object.create(e) : (r.prototype = e.prototype, new r());
|
|
1646
1647
|
}
|
|
1647
|
-
var
|
|
1648
|
-
return
|
|
1648
|
+
var Z = function() {
|
|
1649
|
+
return Z = Object.assign || function(e) {
|
|
1649
1650
|
for (var r, o = 1, n = arguments.length; o < n; o++) {
|
|
1650
1651
|
r = arguments[o];
|
|
1651
1652
|
for (var c in r) Object.prototype.hasOwnProperty.call(r, c) && (e[c] = r[c]);
|
|
1652
1653
|
}
|
|
1653
1654
|
return e;
|
|
1654
|
-
},
|
|
1655
|
+
}, Z.apply(this, arguments);
|
|
1655
1656
|
};
|
|
1656
1657
|
function zr(t, e) {
|
|
1657
1658
|
var r = {};
|
|
@@ -1918,14 +1919,14 @@ function ze(t, e) {
|
|
|
1918
1919
|
function fe(t, e, r) {
|
|
1919
1920
|
return e && ze(t.prototype, e), r && ze(t, r), Object.defineProperty(t, "prototype", { writable: !1 }), t;
|
|
1920
1921
|
}
|
|
1921
|
-
var
|
|
1922
|
+
var me = function() {
|
|
1922
1923
|
return typeof Symbol == "function";
|
|
1923
|
-
},
|
|
1924
|
-
return
|
|
1924
|
+
}, he = function(t) {
|
|
1925
|
+
return me() && !!Symbol[t];
|
|
1925
1926
|
}, we = function(t) {
|
|
1926
|
-
return
|
|
1927
|
+
return he(t) ? Symbol[t] : "@@" + t;
|
|
1927
1928
|
};
|
|
1928
|
-
|
|
1929
|
+
me() && !he("observable") && (Symbol.observable = Symbol("observable"));
|
|
1929
1930
|
var Vr = we("iterator"), le = we("observable"), Ze = we("species");
|
|
1930
1931
|
function Jt(t, e) {
|
|
1931
1932
|
var r = t[e];
|
|
@@ -2081,14 +2082,14 @@ var Jr = /* @__PURE__ */ (function() {
|
|
|
2081
2082
|
return;
|
|
2082
2083
|
}
|
|
2083
2084
|
function d() {
|
|
2084
|
-
|
|
2085
|
+
s.unsubscribe(), c();
|
|
2085
2086
|
}
|
|
2086
|
-
var
|
|
2087
|
+
var s = n.subscribe({
|
|
2087
2088
|
next: function(y) {
|
|
2088
2089
|
try {
|
|
2089
2090
|
o(y, d);
|
|
2090
2091
|
} catch (v) {
|
|
2091
|
-
l(v),
|
|
2092
|
+
l(v), s.unsubscribe();
|
|
2092
2093
|
}
|
|
2093
2094
|
},
|
|
2094
2095
|
error: l,
|
|
@@ -2104,8 +2105,8 @@ var Jr = /* @__PURE__ */ (function() {
|
|
|
2104
2105
|
next: function(d) {
|
|
2105
2106
|
try {
|
|
2106
2107
|
d = o(d);
|
|
2107
|
-
} catch (
|
|
2108
|
-
return l.error(
|
|
2108
|
+
} catch (s) {
|
|
2109
|
+
return l.error(s);
|
|
2109
2110
|
}
|
|
2110
2111
|
l.next(d);
|
|
2111
2112
|
},
|
|
@@ -2126,8 +2127,8 @@ var Jr = /* @__PURE__ */ (function() {
|
|
|
2126
2127
|
next: function(d) {
|
|
2127
2128
|
try {
|
|
2128
2129
|
if (!o(d)) return;
|
|
2129
|
-
} catch (
|
|
2130
|
-
return l.error(
|
|
2130
|
+
} catch (s) {
|
|
2131
|
+
return l.error(s);
|
|
2131
2132
|
}
|
|
2132
2133
|
l.next(d);
|
|
2133
2134
|
},
|
|
@@ -2142,7 +2143,7 @@ var Jr = /* @__PURE__ */ (function() {
|
|
|
2142
2143
|
}, e.reduce = function(o) {
|
|
2143
2144
|
var n = this;
|
|
2144
2145
|
if (typeof o != "function") throw new TypeError(o + " is not a function");
|
|
2145
|
-
var c = Tt(this), l = arguments.length > 1, d = !1,
|
|
2146
|
+
var c = Tt(this), l = arguments.length > 1, d = !1, s = arguments[1], y = s;
|
|
2146
2147
|
return new c(function(v) {
|
|
2147
2148
|
return n.subscribe({
|
|
2148
2149
|
next: function(C) {
|
|
@@ -2150,8 +2151,8 @@ var Jr = /* @__PURE__ */ (function() {
|
|
|
2150
2151
|
if (d = !0, !_ || l)
|
|
2151
2152
|
try {
|
|
2152
2153
|
y = o(y, C);
|
|
2153
|
-
} catch (
|
|
2154
|
-
return v.error(
|
|
2154
|
+
} catch (P) {
|
|
2155
|
+
return v.error(P);
|
|
2155
2156
|
}
|
|
2156
2157
|
else
|
|
2157
2158
|
y = C;
|
|
@@ -2169,18 +2170,18 @@ var Jr = /* @__PURE__ */ (function() {
|
|
|
2169
2170
|
for (var o = this, n = arguments.length, c = new Array(n), l = 0; l < n; l++)
|
|
2170
2171
|
c[l] = arguments[l];
|
|
2171
2172
|
var d = Tt(this);
|
|
2172
|
-
return new d(function(
|
|
2173
|
+
return new d(function(s) {
|
|
2173
2174
|
var y, v = 0;
|
|
2174
2175
|
function C(_) {
|
|
2175
2176
|
y = _.subscribe({
|
|
2176
|
-
next: function(
|
|
2177
|
-
|
|
2177
|
+
next: function(P) {
|
|
2178
|
+
s.next(P);
|
|
2178
2179
|
},
|
|
2179
|
-
error: function(
|
|
2180
|
-
|
|
2180
|
+
error: function(P) {
|
|
2181
|
+
s.error(P);
|
|
2181
2182
|
},
|
|
2182
2183
|
complete: function() {
|
|
2183
|
-
v === c.length ? (y = void 0,
|
|
2184
|
+
v === c.length ? (y = void 0, s.complete()) : C(d.from(c[v++]));
|
|
2184
2185
|
}
|
|
2185
2186
|
});
|
|
2186
2187
|
}
|
|
@@ -2193,7 +2194,7 @@ var Jr = /* @__PURE__ */ (function() {
|
|
|
2193
2194
|
if (typeof o != "function") throw new TypeError(o + " is not a function");
|
|
2194
2195
|
var c = Tt(this);
|
|
2195
2196
|
return new c(function(l) {
|
|
2196
|
-
var d = [],
|
|
2197
|
+
var d = [], s = n.subscribe({
|
|
2197
2198
|
next: function(v) {
|
|
2198
2199
|
if (o)
|
|
2199
2200
|
try {
|
|
@@ -2223,12 +2224,12 @@ var Jr = /* @__PURE__ */ (function() {
|
|
|
2223
2224
|
}
|
|
2224
2225
|
});
|
|
2225
2226
|
function y() {
|
|
2226
|
-
|
|
2227
|
+
s.closed && d.length === 0 && l.complete();
|
|
2227
2228
|
}
|
|
2228
2229
|
return function() {
|
|
2229
2230
|
d.forEach(function(v) {
|
|
2230
2231
|
return v.unsubscribe();
|
|
2231
|
-
}),
|
|
2232
|
+
}), s.unsubscribe();
|
|
2232
2233
|
};
|
|
2233
2234
|
});
|
|
2234
2235
|
}, e[le] = function() {
|
|
@@ -2244,11 +2245,11 @@ var Jr = /* @__PURE__ */ (function() {
|
|
|
2244
2245
|
return l.subscribe(d);
|
|
2245
2246
|
});
|
|
2246
2247
|
}
|
|
2247
|
-
if (
|
|
2248
|
+
if (he("iterator") && (c = Jt(o, Vr), c))
|
|
2248
2249
|
return new n(function(d) {
|
|
2249
2250
|
Ht(function() {
|
|
2250
2251
|
if (!d.closed) {
|
|
2251
|
-
for (var
|
|
2252
|
+
for (var s = Hr(c.call(o)), y; !(y = s()).done; ) {
|
|
2252
2253
|
var v = y.value;
|
|
2253
2254
|
if (d.next(v), d.closed) return;
|
|
2254
2255
|
}
|
|
@@ -2260,8 +2261,8 @@ var Jr = /* @__PURE__ */ (function() {
|
|
|
2260
2261
|
return new n(function(d) {
|
|
2261
2262
|
Ht(function() {
|
|
2262
2263
|
if (!d.closed) {
|
|
2263
|
-
for (var
|
|
2264
|
-
if (d.next(o[
|
|
2264
|
+
for (var s = 0; s < o.length; ++s)
|
|
2265
|
+
if (d.next(o[s]), d.closed) return;
|
|
2265
2266
|
d.complete();
|
|
2266
2267
|
}
|
|
2267
2268
|
});
|
|
@@ -2274,8 +2275,8 @@ var Jr = /* @__PURE__ */ (function() {
|
|
|
2274
2275
|
return new l(function(d) {
|
|
2275
2276
|
Ht(function() {
|
|
2276
2277
|
if (!d.closed) {
|
|
2277
|
-
for (var
|
|
2278
|
-
if (d.next(n[
|
|
2278
|
+
for (var s = 0; s < n.length; ++s)
|
|
2279
|
+
if (d.next(n[s]), d.closed) return;
|
|
2279
2280
|
d.complete();
|
|
2280
2281
|
}
|
|
2281
2282
|
});
|
|
@@ -2287,7 +2288,7 @@ var Jr = /* @__PURE__ */ (function() {
|
|
|
2287
2288
|
}
|
|
2288
2289
|
}]), t;
|
|
2289
2290
|
})();
|
|
2290
|
-
|
|
2291
|
+
me() && Object.defineProperty(N, Symbol("extensions"), {
|
|
2291
2292
|
value: {
|
|
2292
2293
|
symbol: le,
|
|
2293
2294
|
hostReportError: kt
|
|
@@ -2332,10 +2333,10 @@ function Xr(t) {
|
|
|
2332
2333
|
return t;
|
|
2333
2334
|
}
|
|
2334
2335
|
function Qr(t, e) {
|
|
2335
|
-
var r =
|
|
2336
|
-
typeof c == "function" ? r =
|
|
2336
|
+
var r = Z({}, t), o = function(c) {
|
|
2337
|
+
typeof c == "function" ? r = Z(Z({}, r), c(r)) : r = Z(Z({}, r), c);
|
|
2337
2338
|
}, n = function() {
|
|
2338
|
-
return
|
|
2339
|
+
return Z({}, r);
|
|
2339
2340
|
};
|
|
2340
2341
|
return Object.defineProperty(e, "setContext", {
|
|
2341
2342
|
enumerable: !1,
|
|
@@ -2388,8 +2389,8 @@ var rr = (
|
|
|
2388
2389
|
var n = Pt(r), c = Pt(o || new t(De)), l;
|
|
2389
2390
|
return Mt(n) && Mt(c) ? l = new t(function(d) {
|
|
2390
2391
|
return e(d) ? n.request(d) || N.of() : c.request(d) || N.of();
|
|
2391
|
-
}) : l = new t(function(d,
|
|
2392
|
-
return e(d) ? n.request(d,
|
|
2392
|
+
}) : l = new t(function(d, s) {
|
|
2393
|
+
return e(d) ? n.request(d, s) || N.of() : c.request(d, s) || N.of();
|
|
2393
2394
|
}), Object.assign(l, { left: n, right: c });
|
|
2394
2395
|
}, t.execute = function(e, r) {
|
|
2395
2396
|
return e.request(Qr(r.context, Zr(Xr(r)))) || N.of();
|
|
@@ -2403,8 +2404,8 @@ var rr = (
|
|
|
2403
2404
|
return n.request(d) || N.of();
|
|
2404
2405
|
}) || N.of();
|
|
2405
2406
|
}) : c = new t(function(l, d) {
|
|
2406
|
-
return o.request(l, function(
|
|
2407
|
-
return n.request(
|
|
2407
|
+
return o.request(l, function(s) {
|
|
2408
|
+
return n.request(s, d) || N.of();
|
|
2408
2409
|
}) || N.of();
|
|
2409
2410
|
}), Object.assign(c, { left: o, right: n });
|
|
2410
2411
|
}, t.prototype.split = function(e, r, o) {
|