tanya-chatbot 0.5.1 → 0.5.2
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.cjs.js +10 -10
- package/dist/tanya-chatbot.cjs.js.map +1 -1
- package/dist/tanya-chatbot.es.js +266 -264
- package/dist/tanya-chatbot.es.js.map +1 -1
- package/package.json +1 -1
package/dist/tanya-chatbot.es.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { useEffect as M, useState as
|
|
1
|
+
import { useEffect as M, useState as z, useRef as Ft } from "react";
|
|
2
2
|
import { jsx as a, jsxs as u, Fragment as re } from "react/jsx-runtime";
|
|
3
|
-
import { createHttpLink as
|
|
4
|
-
import { Provider as
|
|
5
|
-
import { createSlice as
|
|
6
|
-
import * as
|
|
3
|
+
import { createHttpLink as lr, ApolloClient as cr, InMemoryCache as dr, ApolloProvider as ur } from "@apollo/client";
|
|
4
|
+
import { Provider as pr, useDispatch as De, useSelector as Vt } from "react-redux";
|
|
5
|
+
import { createSlice as Le, configureStore as fr } from "@reduxjs/toolkit";
|
|
6
|
+
import * as Be from "@radix-ui/react-popover";
|
|
7
7
|
import "clsx";
|
|
8
8
|
import "tailwind-merge";
|
|
9
9
|
import E from "axios";
|
|
10
10
|
import "crypto-js";
|
|
11
|
-
import { Icon as
|
|
11
|
+
import { Icon as be } from "@iconify/react";
|
|
12
12
|
import { toast as H } from "react-toastify";
|
|
13
|
-
const fr = '*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media(min-width:640px){.container{max-width:640px}}@media(min-width:768px){.container{max-width:768px}}@media(min-width:1024px){.container{max-width:1024px}}@media(min-width:1280px){.container{max-width:1280px}}@media(min-width:1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.top-full{top:100%}.z-40{z-index:40}.z-50{z-index:50}.m-1{margin:.25rem}.m-3{margin:.75rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-5{margin-top:1.25rem;margin-bottom:1.25rem}.mb-1{margin-bottom:.25rem}.mb-16{margin-bottom:4rem}.mb-2{margin-bottom:.5rem}.mb-20{margin-bottom:5rem}.mb-24{margin-bottom:6rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.h-12{height:3rem}.h-28{height:7rem}.h-3{height:.75rem}.h-6{height:1.5rem}.h-\\[120px\\]{height:120px}.h-\\[200px\\]{height:200px}.h-\\[60px\\]{height:60px}.h-\\[90vh\\]{height:90vh}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-screen{height:100vh}.w-28{width:7rem}.w-3{width:.75rem}.w-5\\/6{width:83.333333%}.w-6{width:1.5rem}.w-72{width:18rem}.w-\\[100vw\\]{width:100vw}.w-\\[120px\\]{width:120px}.w-\\[150px\\]{width:150px}.w-\\[60px\\]{width:60px}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.max-w-\\[200px\\]{max-width:200px}.max-w-\\[75\\%\\]{max-width:75%}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-full{--tw-translate-y: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-ellipsis{text-overflow:ellipsis}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-\\[10px\\]{border-radius:10px}.rounded-\\[20px\\]{border-radius:20px}.rounded-\\[5px\\]{border-radius:5px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-xl{border-radius:.75rem}.rounded-l-\\[20px\\]{border-top-left-radius:20px;border-bottom-left-radius:20px}.rounded-l-xl{border-top-left-radius:.75rem;border-bottom-left-radius:.75rem}.rounded-r-xl{border-top-right-radius:.75rem;border-bottom-right-radius:.75rem}.rounded-bl-2xl{border-bottom-left-radius:1rem}.rounded-br-xl{border-bottom-right-radius:.75rem}.rounded-tr-\\[20px\\]{border-top-right-radius:20px}.rounded-tr-\\[5px\\]{border-top-right-radius:5px}.border{border-width:1px}.border-0{border-width:0px}.border-b-2{border-bottom-width:2px}.border-l-2{border-left-width:2px}.border-t-2{border-top-width:2px}.border-none{border-style:none}.border-\\[\\#C9C2DE\\]{--tw-border-opacity: 1;border-color:rgb(201 194 222 / var(--tw-border-opacity, 1))}.border-\\[\\#E5E5E5\\]{--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.bg-\\[\\#553D94\\]{--tw-bg-opacity: 1;background-color:rgb(85 61 148 / var(--tw-bg-opacity, 1))}.bg-\\[\\#6851C6\\]{--tw-bg-opacity: 1;background-color:rgb(104 81 198 / var(--tw-bg-opacity, 1))}.bg-\\[\\#804C9E0D\\]{background-color:#804c9e0d}.bg-\\[\\#A21CAF\\]{--tw-bg-opacity: 1;background-color:rgb(162 28 175 / var(--tw-bg-opacity, 1))}.bg-\\[\\#AB192D\\]{--tw-bg-opacity: 1;background-color:rgb(171 25 45 / var(--tw-bg-opacity, 1))}.bg-\\[\\#E2DBFF\\]{--tw-bg-opacity: 1;background-color:rgb(226 219 255 / var(--tw-bg-opacity, 1))}.bg-\\[\\#E3DEEF\\]{--tw-bg-opacity: 1;background-color:rgb(227 222 239 / var(--tw-bg-opacity, 1))}.bg-\\[\\#F3F3F3\\]{--tw-bg-opacity: 1;background-color:rgb(243 243 243 / var(--tw-bg-opacity, 1))}.bg-\\[\\#FFFFFF\\],.bg-\\[\\#ffffff\\]{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-black\\/30{background-color:#0000004d}.bg-indigo-300{--tw-bg-opacity: 1;background-color:rgb(165 180 252 / var(--tw-bg-opacity, 1))}.bg-popover{background-color:hsl(var(--popover))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-\\[1px\\]{padding:1px}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-7{padding-left:1.75rem;padding-right:1.75rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-2{padding-bottom:.5rem}.pl-2{padding-left:.5rem}.pr-5{padding-right:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.font-nunitoSans{font-family:Nunito Sans}.text-\\[12px\\]{font-size:12px}.text-\\[14px\\]{font-size:14px}.text-\\[15px\\]{font-size:15px}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.italic{font-style:italic}.leading-snug{line-height:1.375}.text-\\[\\#000000\\]{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-\\[\\#14121F\\]{--tw-text-opacity: 1;color:rgb(20 18 31 / var(--tw-text-opacity, 1))}.text-\\[\\#18181B\\]{--tw-text-opacity: 1;color:rgb(24 24 27 / var(--tw-text-opacity, 1))}.text-\\[\\#232323\\]{--tw-text-opacity: 1;color:rgb(35 35 35 / var(--tw-text-opacity, 1))}.text-\\[\\#323135\\]{--tw-text-opacity: 1;color:rgb(50 49 53 / var(--tw-text-opacity, 1))}.text-\\[\\#494949\\]{--tw-text-opacity: 1;color:rgb(73 73 73 / var(--tw-text-opacity, 1))}.text-\\[\\#555555\\]{--tw-text-opacity: 1;color:rgb(85 85 85 / var(--tw-text-opacity, 1))}.text-\\[\\#5B5B5B\\]{--tw-text-opacity: 1;color:rgb(91 91 91 / var(--tw-text-opacity, 1))}.text-\\[\\#68656E\\]{--tw-text-opacity: 1;color:rgb(104 101 110 / var(--tw-text-opacity, 1))}.text-\\[\\#959595\\]{--tw-text-opacity: 1;color:rgb(149 149 149 / var(--tw-text-opacity, 1))}.text-\\[\\#EC5050\\]{--tw-text-opacity: 1;color:rgb(236 80 80 / var(--tw-text-opacity, 1))}.text-\\[\\#FBFBFC\\]{--tw-text-opacity: 1;color:rgb(251 251 252 / var(--tw-text-opacity, 1))}.text-\\[\\#FFFFFF\\]{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.line-through{text-decoration-line:line-through}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-80{opacity:.8}.shadow-\\[0px_2px_2px_0px_\\#9292BC40\\]{--tw-shadow: 0px 2px 2px 0px #9292BC40;--tw-shadow-colored: 0px 2px 2px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0px_4px_10px_0px_\\#5F499840\\]{--tw-shadow: 0px 4px 10px 0px #5F499840;--tw-shadow-colored: 0px 4px 10px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.duration-300{animation-duration:.3s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.running{animation-play-state:running}html,body,#root{margin:0;padding:0}:root{line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;padding:0}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}@media(prefers-color-scheme:light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}.hover\\:scale-125:hover{--tw-scale-x: 1.25;--tw-scale-y: 1.25;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:text-\\[\\#6952C7\\]:hover{--tw-text-opacity: 1;color:rgb(105 82 199 / var(--tw-text-opacity, 1))}.hover\\:opacity-90:hover{opacity:.9}.group:hover .group-hover\\:opacity-100{opacity:1}.data-\\[state\\=open\\]\\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\\[state\\=closed\\]\\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\\[state\\=closed\\]\\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\\[state\\=open\\]\\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\\[state\\=closed\\]\\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\\[state\\=open\\]\\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\\[side\\=bottom\\]\\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\\[side\\=left\\]\\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\\[side\\=right\\]\\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\\[side\\=top\\]\\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}@media(min-width:640px){.sm\\:w-\\[80vw\\]{width:80vw}}@media(min-width:768px){.md\\:h-\\[100vh\\]{height:100vh}.md\\:w-1\\/2{width:50%}.md\\:w-\\[770px\\]{width:770px}.md\\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\\:translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\\:translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\\:flex-row{flex-direction:row}}@media(min-width:1024px){.lg\\:h-\\[100vh\\]{height:100vh}.lg\\:w-1\\/2{width:50%}.lg\\:w-2\\/3{width:66.666667%}.lg\\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\\:translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\\:translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\\:transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\\:flex-row{flex-direction:row}.lg\\:rounded-l-xl{border-top-left-radius:.75rem;border-bottom-left-radius:.75rem}.lg\\:rounded-bl-xl{border-bottom-left-radius:.75rem}}';
|
|
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 ko() {
|
|
15
15
|
return M(() => {
|
|
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
|
}
|
|
22
22
|
}, []), null;
|
|
23
23
|
}
|
|
24
|
-
const
|
|
24
|
+
const mr = {
|
|
25
25
|
store: {
|
|
26
26
|
storeCode: "",
|
|
27
27
|
storeName: "",
|
|
@@ -55,30 +55,30 @@ const hr = {
|
|
|
55
55
|
mobile: []
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
},
|
|
58
|
+
}, Ue = Le({
|
|
59
59
|
name: "store",
|
|
60
|
-
initialState:
|
|
60
|
+
initialState: mr,
|
|
61
61
|
reducers: {
|
|
62
62
|
setStore: (t, e) => {
|
|
63
63
|
t.store = e.payload;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
}), { setStore: So } =
|
|
66
|
+
}), { setStore: So } = Ue.actions, wr = Ue.reducer, gr = {
|
|
67
67
|
product: null
|
|
68
|
-
},
|
|
68
|
+
}, qe = Le({
|
|
69
69
|
name: "product",
|
|
70
|
-
initialState:
|
|
70
|
+
initialState: gr,
|
|
71
71
|
reducers: {
|
|
72
72
|
setProduct: (t, e) => {
|
|
73
73
|
t.product = e.payload;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
}), { setProduct: oe } =
|
|
76
|
+
}), { setProduct: oe } = qe.actions, br = qe.reducer, xr = fr({
|
|
77
77
|
reducer: {
|
|
78
|
-
store:
|
|
79
|
-
product:
|
|
78
|
+
store: wr,
|
|
79
|
+
product: br
|
|
80
80
|
}
|
|
81
|
-
}),
|
|
81
|
+
}), yr = ({ children: t }) => /* @__PURE__ */ a(pr, { store: xr, children: t }), Rt = (t) => {
|
|
82
82
|
const e = new CustomEvent("reactCartUpdated", {
|
|
83
83
|
detail: {
|
|
84
84
|
cartUpdated: !0,
|
|
@@ -87,17 +87,17 @@ const hr = {
|
|
|
87
87
|
});
|
|
88
88
|
window.dispatchEvent(e);
|
|
89
89
|
};
|
|
90
|
-
function
|
|
90
|
+
function vr({
|
|
91
91
|
...t
|
|
92
92
|
}) {
|
|
93
|
-
return /* @__PURE__ */ a(
|
|
93
|
+
return /* @__PURE__ */ a(Be.Root, { "data-slot": "popover", ...t });
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function kr({
|
|
96
96
|
...t
|
|
97
97
|
}) {
|
|
98
|
-
return /* @__PURE__ */ a(
|
|
98
|
+
return /* @__PURE__ */ a(Be.Trigger, { "data-slot": "popover-trigger", ...t });
|
|
99
99
|
}
|
|
100
|
-
const St = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1.amazonaws.com/dev/api/bedrock/invoke/stream", xAPIKey: "BJBtjpPkqGatuoa3qJqdR8aHXSsHkgvGaootbubi", serverUrl: "https://tanya-sfcc-server.vercel.app/", basePath: "sc-api" }),
|
|
100
|
+
const St = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1.amazonaws.com/dev/api/bedrock/invoke/stream", xAPIKey: "BJBtjpPkqGatuoa3qJqdR8aHXSsHkgvGaootbubi", serverUrl: "https://tanya-sfcc-server.vercel.app/", basePath: "sc-api" }), Me = async () => {
|
|
101
101
|
const t = "https://tanya-sfcc-server.vercel.app/";
|
|
102
102
|
try {
|
|
103
103
|
const e = await E.post(
|
|
@@ -107,11 +107,11 @@ const St = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1
|
|
|
107
107
|
} catch (e) {
|
|
108
108
|
return E.isAxiosError(e) ? console.error("Error fetching token:", e.response || e.message) : console.error("Unexpected error:", e), null;
|
|
109
109
|
}
|
|
110
|
-
},
|
|
110
|
+
}, He = async (t) => {
|
|
111
111
|
const e = "https://tanya-sfcc-server.vercel.app/";
|
|
112
112
|
try {
|
|
113
113
|
const r = JSON.parse(sessionStorage.getItem("customerData") || "{}").dwsid, o = await E.post(
|
|
114
|
-
`${e}api/auth/token-existing-guest-customer?dwsid=${r}&baseUrl=${tt()}&siteId=${J()}&pubCfg=${
|
|
114
|
+
`${e}api/auth/token-existing-guest-customer?dwsid=${r}&baseUrl=${tt()}&siteId=${J()}&pubCfg=${it()}&envRef=${st()}&orgRef=${lt()}`,
|
|
115
115
|
{},
|
|
116
116
|
{
|
|
117
117
|
headers: {
|
|
@@ -125,23 +125,23 @@ const St = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1
|
|
|
125
125
|
return E.isAxiosError(r) ? console.error("Error creating basket:", r.response || r.message) : console.error("Unexpected error:", r), null;
|
|
126
126
|
}
|
|
127
127
|
};
|
|
128
|
-
async function
|
|
128
|
+
async function Ot() {
|
|
129
129
|
var c;
|
|
130
130
|
const t = J(), e = "access_token_" + t, r = "expires_in_" + t, o = localStorage.getItem(r), n = localStorage.getItem(e);
|
|
131
131
|
return console.log(n), (c = JSON.parse(sessionStorage.getItem("customerData") || "{}")) != null && c.isGuest, console.log("access token found in local storage"), { access_token: n, expires_in: o };
|
|
132
132
|
}
|
|
133
|
-
const tt = () => sessionStorage.getItem("Host"), J = () => sessionStorage.getItem("SiteId"),
|
|
133
|
+
const tt = () => sessionStorage.getItem("Host"), J = () => sessionStorage.getItem("SiteId"), it = () => sessionStorage.getItem("pubCfg"), st = () => sessionStorage.getItem("envRef"), lt = () => sessionStorage.getItem("orgRef"), xe = async (t) => {
|
|
134
134
|
console.log("fetching results");
|
|
135
135
|
const { serverUrl: e, basePath: r } = St();
|
|
136
136
|
let o = "";
|
|
137
137
|
{
|
|
138
|
-
const n = await
|
|
138
|
+
const n = await Ot();
|
|
139
139
|
console.log("the token from getSearchResults", n), o = n.access_token;
|
|
140
140
|
}
|
|
141
141
|
try {
|
|
142
142
|
const n = tt();
|
|
143
143
|
return (await E.get(
|
|
144
|
-
`${e}${r}/search-sfcc?baseUrl=${n}&query=${t}&siteId=${J()}&pubCfg=${
|
|
144
|
+
`${e}${r}/search-sfcc?baseUrl=${n}&query=${t}&siteId=${J()}&pubCfg=${it()}&envRef=${st()}&orgRef=${lt()}`,
|
|
145
145
|
{
|
|
146
146
|
headers: {
|
|
147
147
|
"Content-Type": "application/json",
|
|
@@ -152,13 +152,13 @@ const tt = () => sessionStorage.getItem("Host"), J = () => sessionStorage.getIte
|
|
|
152
152
|
} catch (n) {
|
|
153
153
|
throw console.error("Error fetching search results:", n), n;
|
|
154
154
|
}
|
|
155
|
-
},
|
|
155
|
+
}, Ve = async (t) => {
|
|
156
156
|
if (!t) throw new Error("Product ID is required");
|
|
157
157
|
const { serverUrl: e, basePath: r } = St(), o = tt();
|
|
158
158
|
console.log("calling access");
|
|
159
|
-
const { access_token: n } = await
|
|
159
|
+
const { access_token: n } = await Ot();
|
|
160
160
|
return console.log(n), (await E.get(
|
|
161
|
-
`${e}${r}/product-sfcc/${t}?baseUrl=${o}&siteId=${J()}&pubCfg=${
|
|
161
|
+
`${e}${r}/product-sfcc/${t}?baseUrl=${o}&siteId=${J()}&pubCfg=${it()}&envRef=${st()}&orgRef=${lt()}`,
|
|
162
162
|
{
|
|
163
163
|
headers: {
|
|
164
164
|
"Content-Type": "application/json",
|
|
@@ -166,13 +166,13 @@ const tt = () => sessionStorage.getItem("Host"), J = () => sessionStorage.getIte
|
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
)).data;
|
|
169
|
-
},
|
|
169
|
+
}, Sr = async (t) => {
|
|
170
170
|
if (!t) throw new Error("customerId is required");
|
|
171
|
-
const e = await
|
|
171
|
+
const e = await Me(), { customer_token: r } = await He(
|
|
172
172
|
e
|
|
173
|
-
), { serverUrl: o, basePath: n } = St(), l = (await
|
|
173
|
+
), { serverUrl: o, basePath: n } = St(), l = (await Ot()).access_token;
|
|
174
174
|
return (await E.get(
|
|
175
|
-
`${o}${n}/get-interest?baseUrl=${tt()}&customerId=${t}&siteId=${J()}&pubCfg=${
|
|
175
|
+
`${o}${n}/get-interest?baseUrl=${tt()}&customerId=${t}&siteId=${J()}&pubCfg=${it()}&envRef=${st()}&orgRef=${lt()}`,
|
|
176
176
|
{
|
|
177
177
|
headers: {
|
|
178
178
|
"Content-Type": "application/json",
|
|
@@ -180,10 +180,10 @@ const tt = () => sessionStorage.getItem("Host"), J = () => sessionStorage.getIte
|
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
)).data;
|
|
183
|
-
},
|
|
183
|
+
}, ye = (t) => String(typeof t == "string" ? t : t["en-US"] || t), ve = (t) => t != null && t.image ? [t.image] : "variants" in t ? t.variants[0].images : t.masterVariant.images.map((e) => e.url), _r = (t, e) => t.toLocaleString("en-US", {
|
|
184
184
|
style: "currency",
|
|
185
185
|
currency: e || "USD"
|
|
186
|
-
}),
|
|
186
|
+
}), ke = (t) => {
|
|
187
187
|
var e, r, o;
|
|
188
188
|
return "variants" in t ? {
|
|
189
189
|
centAmount: (e = t.variants[0]) == null ? void 0 : e.prices.EUR.max,
|
|
@@ -192,21 +192,21 @@ const tt = () => sessionStorage.getItem("Host"), J = () => sessionStorage.getIte
|
|
|
192
192
|
centAmount: (r = t.masterVariant) == null ? void 0 : r.prices[0].value.centAmount,
|
|
193
193
|
currencyCode: (o = t.masterVariant) == null ? void 0 : o.prices[0].value.currencyCode
|
|
194
194
|
};
|
|
195
|
-
},
|
|
195
|
+
}, Cr = (t) => t.charAt(0).toUpperCase() + t.slice(1), Se = (t, e) => t.length < e ? t : t.slice(0, e) + "...", Xt = (t) => t.split("\\n").map((e, r) => {
|
|
196
196
|
const o = e.match(/^(\d+)\.\s(.+)/);
|
|
197
197
|
return o ? `<p key=${r} class="mb-2"><strong>${o[1]}.</strong> ${o[2]}</p>` : e.trim() ? `<p key=${r} class="mb-2">${e}</p>` : "<br/>";
|
|
198
198
|
}).join("");
|
|
199
|
-
function
|
|
200
|
-
const t = () => window.innerWidth < 425 ? 1 : window.innerWidth < 768 ? 2 : 4, [e, r] =
|
|
199
|
+
function Ir() {
|
|
200
|
+
const t = () => window.innerWidth < 425 ? 1 : window.innerWidth < 768 ? 2 : 4, [e, r] = z(t);
|
|
201
201
|
return M(() => {
|
|
202
202
|
const o = () => r(t());
|
|
203
203
|
return window.addEventListener("resize", o), () => window.removeEventListener("resize", o);
|
|
204
204
|
}, []), e;
|
|
205
205
|
}
|
|
206
|
-
const
|
|
206
|
+
const Fr = ({
|
|
207
207
|
product: t
|
|
208
208
|
}) => {
|
|
209
|
-
const e =
|
|
209
|
+
const e = De(), r = Ir(), [o, n] = z(0), c = () => {
|
|
210
210
|
n(
|
|
211
211
|
(i) => i + r >= t.length ? 0 : i + r
|
|
212
212
|
);
|
|
@@ -215,7 +215,7 @@ const Ir = ({
|
|
|
215
215
|
(i) => i - r < 0 ? t.length - (t.length % r || r) : i - r
|
|
216
216
|
);
|
|
217
217
|
}, d = async (i) => {
|
|
218
|
-
const y = await
|
|
218
|
+
const y = await Ve(i);
|
|
219
219
|
e(oe(y));
|
|
220
220
|
};
|
|
221
221
|
return /* @__PURE__ */ a("div", { className: "mt-2 overflow-x-hidden", children: /* @__PURE__ */ u("div", { className: "flex items-center justify-center gap-4 relative", children: [
|
|
@@ -245,7 +245,7 @@ const Ir = ({
|
|
|
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 =
|
|
248
|
+
src: ((y = ve(i)[0]) == null ? void 0 : y.link) || ve(i)[0] || // fallback if it's a string
|
|
249
249
|
"https://via.placeholder.com/120",
|
|
250
250
|
alt: i != null && i.productName ? i.productName : "Product",
|
|
251
251
|
className: "w-28 h-28 rounded-[10px] transition-transform duration-300 hover:scale-125 object-cover"
|
|
@@ -257,8 +257,8 @@ const Ir = ({
|
|
|
257
257
|
className: "text-white w-full p-2 text-[12px] text-center h-[60px]",
|
|
258
258
|
children: [
|
|
259
259
|
/* @__PURE__ */ u("div", { className: "relative inline-block group", children: [
|
|
260
|
-
/* @__PURE__ */ a("div", { className: "w-full line-clamp-1 overflow-hidden text-ellipsis text-[#000000] font-medium font-nunitoSans", children: i != null && i.productName ? i.productName : i != null && i.product_name ? i.product_name :
|
|
261
|
-
|
|
260
|
+
/* @__PURE__ */ a("div", { className: "w-full line-clamp-1 overflow-hidden text-ellipsis text-[#000000] font-medium font-nunitoSans", children: i != null && i.productName ? i.productName : i != null && i.product_name ? i.product_name : Se(
|
|
261
|
+
ye((v = i == null ? void 0 : i.name) == null ? void 0 : v["en-US"]),
|
|
262
262
|
60
|
|
263
263
|
) || "Product" }),
|
|
264
264
|
/* @__PURE__ */ a(
|
|
@@ -272,17 +272,17 @@ const Ir = ({
|
|
|
272
272
|
marginBottom: "5px",
|
|
273
273
|
zIndex: 50
|
|
274
274
|
},
|
|
275
|
-
children: i != null && i.productName ? i.productName : i != null && i.product_name ? i.product_name :
|
|
276
|
-
|
|
275
|
+
children: i != null && i.productName ? i.productName : i != null && i.product_name ? i.product_name : Se(
|
|
276
|
+
ye((C = i == null ? void 0 : i.name) == null ? void 0 : C["en-US"]),
|
|
277
277
|
60
|
|
278
278
|
) || "Product"
|
|
279
279
|
}
|
|
280
280
|
)
|
|
281
281
|
] }),
|
|
282
282
|
/* @__PURE__ */ u("div", { className: " flex text-center items-center gap-2 text-[14px] text-[#14121F] font-bold font-nunitoSans text-base mb-1", children: [
|
|
283
|
-
/* @__PURE__ */ a("p", { children:
|
|
284
|
-
i != null && i.price ? Number(i == null ? void 0 : i.price) :
|
|
285
|
-
(S =
|
|
283
|
+
/* @__PURE__ */ a("p", { children: _r(
|
|
284
|
+
i != null && i.price ? Number(i == null ? void 0 : i.price) : ke(i).centAmount || 0,
|
|
285
|
+
(S = ke(i)) == null ? void 0 : S.currencyCode
|
|
286
286
|
) }),
|
|
287
287
|
/* @__PURE__ */ u("p", { className: "text-[#14121F] font-normal line-through text-sm font-nunitoSans truncate", children: [
|
|
288
288
|
"$",
|
|
@@ -311,7 +311,7 @@ const Ir = ({
|
|
|
311
311
|
}
|
|
312
312
|
)
|
|
313
313
|
] }) });
|
|
314
|
-
},
|
|
314
|
+
}, Nr = ({ chat: t, storeDetails: e }) => /* @__PURE__ */ a("div", { className: "bg-[#FFFFFF] px-7 py-4 rounded-r-xl rounded-bl-2xl w-full", children: t.map((r, o) => /* @__PURE__ */ u(
|
|
315
315
|
"div",
|
|
316
316
|
{
|
|
317
317
|
className: "mb-4 p-3 rounded-xl",
|
|
@@ -324,11 +324,11 @@ const Ir = ({
|
|
|
324
324
|
"div",
|
|
325
325
|
{
|
|
326
326
|
className: "font-nunitoSans font-bold text-sm text-[#494949] p-2 w-fit rounded-[20px]",
|
|
327
|
-
children:
|
|
327
|
+
children: Cr(r.keyword) || "No keyword"
|
|
328
328
|
}
|
|
329
329
|
),
|
|
330
330
|
/* @__PURE__ */ a(
|
|
331
|
-
|
|
331
|
+
Fr,
|
|
332
332
|
{
|
|
333
333
|
product: r.items,
|
|
334
334
|
storeDetails: e
|
|
@@ -337,14 +337,14 @@ const Ir = ({
|
|
|
337
337
|
]
|
|
338
338
|
},
|
|
339
339
|
o
|
|
340
|
-
)) }),
|
|
340
|
+
)) }), Re = async (t, e) => {
|
|
341
341
|
var c, l;
|
|
342
342
|
const { serverUrl: r, basePath: o } = St(), n = `${r}`;
|
|
343
343
|
console.log(`customer_token
|
|
344
344
|
`, t);
|
|
345
345
|
try {
|
|
346
346
|
const d = await E.post(
|
|
347
|
-
`${n}${o}/basket/create?baseUrl=${tt()}&siteId=${J()}&pubCfg=${
|
|
347
|
+
`${n}${o}/basket/create?baseUrl=${tt()}&siteId=${J()}&pubCfg=${it()}&envRef=${st()}&orgRef=${lt()}`,
|
|
348
348
|
e,
|
|
349
349
|
{
|
|
350
350
|
headers: {
|
|
@@ -363,11 +363,11 @@ const Ir = ({
|
|
|
363
363
|
} catch (d) {
|
|
364
364
|
return E.isAxiosError(d) ? console.error("Error creating basket:", d.response || d.message) : console.error("Unexpected error:", d), null;
|
|
365
365
|
}
|
|
366
|
-
},
|
|
366
|
+
}, ne = async (t, e, r) => {
|
|
367
367
|
const { serverUrl: o, basePath: n } = St(), c = `${o}`;
|
|
368
368
|
try {
|
|
369
369
|
const l = await E.post(
|
|
370
|
-
`${c}${n}/basket/add-product/${t}?baseUrl=${tt()}&siteId=${J()}&pubCfg=${
|
|
370
|
+
`${c}${n}/basket/add-product/${t}?baseUrl=${tt()}&siteId=${J()}&pubCfg=${it()}&envRef=${st()}&orgRef=${lt()}`,
|
|
371
371
|
e,
|
|
372
372
|
{
|
|
373
373
|
headers: {
|
|
@@ -383,7 +383,7 @@ const Ir = ({
|
|
|
383
383
|
l.response || l.message
|
|
384
384
|
) : console.error("Unexpected error:", l), null;
|
|
385
385
|
}
|
|
386
|
-
},
|
|
386
|
+
}, Ye = async ({
|
|
387
387
|
basketId: t,
|
|
388
388
|
customer_token: e
|
|
389
389
|
}) => {
|
|
@@ -391,7 +391,7 @@ const Ir = ({
|
|
|
391
391
|
const { serverUrl: r, basePath: o } = St(), n = `${r}`;
|
|
392
392
|
try {
|
|
393
393
|
const l = await E.get(
|
|
394
|
-
`${n}${o}/basket/${t}?baseUrl=${tt()}&siteId=${J()}&pubCfg=${
|
|
394
|
+
`${n}${o}/basket/${t}?baseUrl=${tt()}&siteId=${J()}&pubCfg=${it()}&envRef=${st()}&orgRef=${lt()}`,
|
|
395
395
|
{
|
|
396
396
|
headers: {
|
|
397
397
|
"Content-Type": "application/json",
|
|
@@ -403,8 +403,8 @@ const Ir = ({
|
|
|
403
403
|
} catch (l) {
|
|
404
404
|
return E.isAxiosError(l) ? { status: (c = l.response) == null ? void 0 : c.status, data: null } : { status: null, data: null };
|
|
405
405
|
}
|
|
406
|
-
}, Yt = "sfcc_basket_id",
|
|
407
|
-
const
|
|
406
|
+
}, Yt = "sfcc_basket_id", _e = "sfcc_customer_token", Pt = "sfcc_token_expiry", Er = 300 * 1e3, Nt = "1.0.0";
|
|
407
|
+
const at = (t) => {
|
|
408
408
|
try {
|
|
409
409
|
t ? localStorage.setItem(Yt, t) : localStorage.removeItem(Yt);
|
|
410
410
|
} catch (e) {
|
|
@@ -413,25 +413,25 @@ const nt = (t) => {
|
|
|
413
413
|
}, Kt = (t) => {
|
|
414
414
|
try {
|
|
415
415
|
if (t) {
|
|
416
|
-
localStorage.setItem(
|
|
416
|
+
localStorage.setItem(_e, t);
|
|
417
417
|
const e = Date.now() + Er;
|
|
418
|
-
localStorage.setItem(
|
|
418
|
+
localStorage.setItem(Pt, e.toString());
|
|
419
419
|
} else
|
|
420
|
-
localStorage.removeItem(
|
|
420
|
+
localStorage.removeItem(_e);
|
|
421
421
|
} catch (e) {
|
|
422
422
|
console.error("Error storing token:", e);
|
|
423
423
|
}
|
|
424
|
-
},
|
|
425
|
-
var i, y, v, C, S,
|
|
426
|
-
const e =
|
|
424
|
+
}, Ce = 300, Tr = ({ addToCartPwa: t }) => {
|
|
425
|
+
var i, y, v, C, S, j;
|
|
426
|
+
const e = De(), r = Vt((T) => T.product.product), o = Vt((T) => T.store.store), [n, c] = z(!!r);
|
|
427
427
|
if (M(() => {
|
|
428
428
|
c(!!r);
|
|
429
429
|
}, [r]), !r) return null;
|
|
430
430
|
const l = async () => {
|
|
431
|
-
var T, D, W,
|
|
431
|
+
var T, D, W, ct, V, dt, _t, $t, et, Ct, It, ut, zt, At, rt, P;
|
|
432
432
|
console.log(r, "the prod");
|
|
433
433
|
try {
|
|
434
|
-
if (!((D = (T = r == null ? void 0 : r.variants) == null ? void 0 : T[0]) != null && D.product_id) && !(r.type.item || r.type.bundle) && !((
|
|
434
|
+
if (!((D = (T = r == null ? void 0 : r.variants) == null ? void 0 : T[0]) != null && D.product_id) && !(r.type.item || r.type.bundle) && !((ct = (W = r == null ? void 0 : r.variants) == null ? void 0 : W[0]) != null && ct.productId)) {
|
|
435
435
|
H.error("Variants not available", {
|
|
436
436
|
position: "bottom-right",
|
|
437
437
|
autoClose: 1e3
|
|
@@ -440,34 +440,35 @@ const nt = (t) => {
|
|
|
440
440
|
}
|
|
441
441
|
const _ = [
|
|
442
442
|
{
|
|
443
|
-
product_id: ((V = r.variants) == null ? void 0 : V[0].product_id) || ((
|
|
443
|
+
product_id: ((V = r.variants) == null ? void 0 : V[0].product_id) || ((dt = r.variants) == null ? void 0 : dt[0].productId) || (r == null ? void 0 : r.id),
|
|
444
444
|
quantity: 1
|
|
445
445
|
}
|
|
446
446
|
];
|
|
447
447
|
console.log(_, "the product data");
|
|
448
448
|
const k = JSON.parse(
|
|
449
449
|
sessionStorage.getItem("customerData") || "{}"
|
|
450
|
-
),
|
|
450
|
+
), ot = (k == null ? void 0 : k.basketId) || localStorage.getItem(Yt), Wt = !1, jt = localStorage.getItem(Pt), Dt = Date.now();
|
|
451
451
|
if (!Wt || !jt || Dt >= parseInt(jt)) {
|
|
452
|
-
let
|
|
452
|
+
let $ = "";
|
|
453
453
|
{
|
|
454
|
-
const ft = await
|
|
455
|
-
console.log("token from auth data"),
|
|
454
|
+
const ft = await Ot();
|
|
455
|
+
console.log("token from auth data"), $ = "Bearer " + ft.access_token;
|
|
456
456
|
}
|
|
457
|
-
if (
|
|
457
|
+
if (!$) {
|
|
458
458
|
console.error("Failed to get customer_token");
|
|
459
459
|
return;
|
|
460
460
|
}
|
|
461
461
|
const pt = Dt + 300 * 1e3;
|
|
462
|
-
if (Kt(
|
|
463
|
-
const ft = await
|
|
464
|
-
basketId:
|
|
465
|
-
customer_token:
|
|
462
|
+
if (Kt($), localStorage.setItem(Pt, pt.toString()), ot) {
|
|
463
|
+
const ft = await Ye({
|
|
464
|
+
basketId: ot,
|
|
465
|
+
customer_token: $
|
|
466
466
|
});
|
|
467
|
-
if (console.log(
|
|
468
|
-
const L = await
|
|
469
|
-
|
|
470
|
-
|
|
467
|
+
if (console.log(ot, "basket id from customer"), ft.status === 200 && ft) {
|
|
468
|
+
const L = await ne(
|
|
469
|
+
ot,
|
|
470
|
+
_,
|
|
471
|
+
$
|
|
471
472
|
);
|
|
472
473
|
(((_t = L == null ? void 0 : L.product_items) == null ? void 0 : _t.length) > 0 || (($t = L == null ? void 0 : L.productItems) == null ? void 0 : $t.length) > 0) && (H.success("Added to cart", {
|
|
473
474
|
position: "bottom-right",
|
|
@@ -476,7 +477,7 @@ const nt = (t) => {
|
|
|
476
477
|
closeOnClick: !0,
|
|
477
478
|
pauseOnHover: !0,
|
|
478
479
|
draggable: !0
|
|
479
|
-
}), Rt(
|
|
480
|
+
}), Rt(ot));
|
|
480
481
|
return;
|
|
481
482
|
}
|
|
482
483
|
}
|
|
@@ -489,7 +490,7 @@ const nt = (t) => {
|
|
|
489
490
|
]
|
|
490
491
|
};
|
|
491
492
|
console.log("before create basket");
|
|
492
|
-
const h = await
|
|
493
|
+
const h = await Re($, Lt);
|
|
493
494
|
if (console.log(
|
|
494
495
|
h,
|
|
495
496
|
h == null ? void 0 : h.basket_id,
|
|
@@ -502,14 +503,15 @@ const nt = (t) => {
|
|
|
502
503
|
console.log(
|
|
503
504
|
"setting stored id",
|
|
504
505
|
(h == null ? void 0 : h.basket_id) || (h == null ? void 0 : h.basketId)
|
|
505
|
-
),
|
|
506
|
+
), at(
|
|
506
507
|
(h == null ? void 0 : h.basket_id) || (h == null ? void 0 : h.basketId)
|
|
507
508
|
), console.log("adding product to basket");
|
|
508
|
-
const G = await
|
|
509
|
+
const G = await ne(
|
|
510
|
+
(h == null ? void 0 : h.basket_id) || (h == null ? void 0 : h.basketId),
|
|
509
511
|
_,
|
|
510
|
-
|
|
512
|
+
$
|
|
511
513
|
);
|
|
512
|
-
console.log("object added to basket"), (((It = G == null ? void 0 : G.product_items) == null ? void 0 : It.length) > 0 || ((
|
|
514
|
+
console.log("object added to basket"), (((It = G == null ? void 0 : G.product_items) == null ? void 0 : It.length) > 0 || ((ut = G == null ? void 0 : G.productItems) == null ? void 0 : ut.length) > 0) && H.success("Added to cart", {
|
|
513
515
|
position: "bottom-right",
|
|
514
516
|
autoClose: 3e3,
|
|
515
517
|
hideProgressBar: !1,
|
|
@@ -523,7 +525,7 @@ const nt = (t) => {
|
|
|
523
525
|
position: "bottom-right",
|
|
524
526
|
autoClose: 3e3
|
|
525
527
|
}), ((zt = _ == null ? void 0 : _.response) == null ? void 0 : zt.status) === 404 || // Basket not found
|
|
526
|
-
((At = _ == null ? void 0 : _.response) == null ? void 0 : At.status) === 401 ? (((rt = _ == null ? void 0 : _.response) == null ? void 0 : rt.status) === 404 &&
|
|
528
|
+
((At = _ == null ? void 0 : _.response) == null ? void 0 : At.status) === 401 ? (((rt = _ == null ? void 0 : _.response) == null ? void 0 : rt.status) === 404 && at(null), ((P = _ == null ? void 0 : _.response) == null ? void 0 : P.status) === 401 && (at(null), Kt(null))) : (console.error("Failed to add product to basket:", _.message), H.error("Failed to add product to cart", {
|
|
527
529
|
position: "bottom-right",
|
|
528
530
|
autoClose: 3e3
|
|
529
531
|
}));
|
|
@@ -537,7 +539,7 @@ const nt = (t) => {
|
|
|
537
539
|
{
|
|
538
540
|
className: "fixed inset-0 z-40 bg-black/30",
|
|
539
541
|
onClick: () => {
|
|
540
|
-
c(!1), setTimeout(() => e(oe(null)),
|
|
542
|
+
c(!1), setTimeout(() => e(oe(null)), Ce);
|
|
541
543
|
}
|
|
542
544
|
}
|
|
543
545
|
),
|
|
@@ -555,14 +557,14 @@ const nt = (t) => {
|
|
|
555
557
|
/* @__PURE__ */ u("div", { className: "mt-3 flex flex-row justify-between w-full ", children: [
|
|
556
558
|
/* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("p", { className: "text-[#000000] font-bold font-nunitoSans", children: r.name }) }),
|
|
557
559
|
/* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
|
|
558
|
-
|
|
560
|
+
be,
|
|
559
561
|
{
|
|
560
562
|
icon: "mdi:close",
|
|
561
563
|
className: "text-[#555555] w-6 h-6 cursor-pointer",
|
|
562
564
|
onClick: () => {
|
|
563
565
|
c(!1), setTimeout(
|
|
564
566
|
() => e(oe(null)),
|
|
565
|
-
|
|
567
|
+
Ce
|
|
566
568
|
);
|
|
567
569
|
}
|
|
568
570
|
}
|
|
@@ -628,14 +630,14 @@ const nt = (t) => {
|
|
|
628
630
|
] }),
|
|
629
631
|
/* @__PURE__ */ a("div", { className: "text-[#323135] font-semibold text-sm", children: "Overall Rating" }),
|
|
630
632
|
/* @__PURE__ */ u("div", { className: "text-[#68656E] font-semibold text-sm", children: [
|
|
631
|
-
((
|
|
633
|
+
((j = r == null ? void 0 : r.rating) == null ? void 0 : j.count) || 0,
|
|
632
634
|
" ratings"
|
|
633
635
|
] })
|
|
634
636
|
] }) }),
|
|
635
637
|
/* @__PURE__ */ a("div", { className: "mt-2 flex flex-row items-center gap-2", children: Array.from({ length: 5 }).map((T, D) => {
|
|
636
638
|
var W;
|
|
637
639
|
return /* @__PURE__ */ a(
|
|
638
|
-
|
|
640
|
+
be,
|
|
639
641
|
{
|
|
640
642
|
icon: "mdi:star",
|
|
641
643
|
width: "20",
|
|
@@ -679,7 +681,7 @@ const nt = (t) => {
|
|
|
679
681
|
}
|
|
680
682
|
)
|
|
681
683
|
] });
|
|
682
|
-
},
|
|
684
|
+
}, Pr = ({
|
|
683
685
|
tanyaConfig: t,
|
|
684
686
|
basketId: e,
|
|
685
687
|
addToCart: r
|
|
@@ -698,12 +700,12 @@ const nt = (t) => {
|
|
|
698
700
|
"Niece/Nephew": "his/her niece/nephew",
|
|
699
701
|
"My Friends": "his/her friends",
|
|
700
702
|
Others: "others"
|
|
701
|
-
}, c = Ft(null), l = Ft(null), d = Ft(null), i = Ft(null), [y, v] =
|
|
703
|
+
}, c = Ft(null), l = Ft(null), d = Ft(null), i = Ft(null), [y, v] = z(null), [C, S] = z(!1), [j, T] = z(!1), [D, W] = z(!1), [ct, V] = z(!1), [dt, _t] = z(!1), [$t, et] = z(!1), [Ct, It] = z(""), [ut, zt] = z(""), At = (s) => ({
|
|
702
704
|
id: s.id,
|
|
703
705
|
title: s.name,
|
|
704
706
|
image: s.image ?? "",
|
|
705
707
|
price: s.price ?? 0
|
|
706
|
-
}), [rt,
|
|
708
|
+
}), [rt, P] = z([]), _ = Ft(null), k = Vt((s) => s.store.store), ot = Vt((s) => s.product.product);
|
|
707
709
|
M(() => {
|
|
708
710
|
const s = localStorage.getItem(
|
|
709
711
|
`access_token_${t.siteId}`
|
|
@@ -712,7 +714,7 @@ const nt = (t) => {
|
|
|
712
714
|
);
|
|
713
715
|
if (s && g === s) {
|
|
714
716
|
const m = localStorage.getItem("chatHistory");
|
|
715
|
-
m &&
|
|
717
|
+
m && P(JSON.parse(m));
|
|
716
718
|
} else
|
|
717
719
|
localStorage.setItem("chatHistory", JSON.stringify([])), localStorage.setItem(
|
|
718
720
|
`chat-token-${t.siteId}`,
|
|
@@ -739,10 +741,10 @@ const nt = (t) => {
|
|
|
739
741
|
M(() => {
|
|
740
742
|
_.current && (_.current.scrollTop += 150);
|
|
741
743
|
}, [rt]);
|
|
742
|
-
let
|
|
744
|
+
let $ = null, pt = null;
|
|
743
745
|
const Lt = async () => {
|
|
744
|
-
if (
|
|
745
|
-
return
|
|
746
|
+
if ($ && pt && Date.now() < pt)
|
|
747
|
+
return $;
|
|
746
748
|
try {
|
|
747
749
|
const s = "https://us-east-1lsr29ln3u.auth.us-east-1.amazoncognito.com/oauth2/token", g = new URLSearchParams({
|
|
748
750
|
grant_type: "client_credentials",
|
|
@@ -761,14 +763,14 @@ const nt = (t) => {
|
|
|
761
763
|
`Token request failed! status: ${m.status}`
|
|
762
764
|
);
|
|
763
765
|
const b = await m.json();
|
|
764
|
-
|
|
766
|
+
$ = b.access_token;
|
|
765
767
|
const p = b.expires_in || 3600;
|
|
766
|
-
return pt = Date.now() + (p - 60) * 1e3,
|
|
768
|
+
return pt = Date.now() + (p - 60) * 1e3, $;
|
|
767
769
|
} catch (s) {
|
|
768
|
-
return console.error("Error obtaining JWT token:", s),
|
|
770
|
+
return console.error("Error obtaining JWT token:", s), $ = null, pt = null, null;
|
|
769
771
|
}
|
|
770
772
|
}, h = async () => {
|
|
771
|
-
const s = await
|
|
773
|
+
const s = await Ot();
|
|
772
774
|
s != null && v(s);
|
|
773
775
|
};
|
|
774
776
|
M(() => {
|
|
@@ -778,7 +780,7 @@ const nt = (t) => {
|
|
|
778
780
|
}
|
|
779
781
|
h(), console.log("scapi environment v1");
|
|
780
782
|
}, []), M(() => {
|
|
781
|
-
e && (console.log("setting the basket id", e),
|
|
783
|
+
e && (console.log("setting the basket id", e), at(e));
|
|
782
784
|
}, [e]), M(() => {
|
|
783
785
|
const s = async () => {
|
|
784
786
|
S(!1);
|
|
@@ -789,13 +791,13 @@ const nt = (t) => {
|
|
|
789
791
|
const s = JSON.parse(
|
|
790
792
|
sessionStorage.getItem("customerData") || "{}"
|
|
791
793
|
).customerId;
|
|
792
|
-
return (await
|
|
794
|
+
return (await Sr(s || "")).c_interests;
|
|
793
795
|
}, ft = async (s, g) => {
|
|
794
796
|
console.log("in secondary flow", Nt);
|
|
795
797
|
const m = await G();
|
|
796
798
|
if (console.log(m, "interests of customer", Nt), !!m)
|
|
797
799
|
try {
|
|
798
|
-
|
|
800
|
+
P(
|
|
799
801
|
(q) => q.map(
|
|
800
802
|
(R, Y) => Y === q.length - 1 ? { ...R, secondaryLoading: !0 } : R
|
|
801
803
|
)
|
|
@@ -838,19 +840,19 @@ const nt = (t) => {
|
|
|
838
840
|
const f = X.slice(5).trim();
|
|
839
841
|
try {
|
|
840
842
|
const K = JSON.parse(f);
|
|
841
|
-
K.index === 0 &&
|
|
843
|
+
K.index === 0 && P(
|
|
842
844
|
(I) => I.map(
|
|
843
|
-
(
|
|
844
|
-
...
|
|
845
|
+
(O, Q) => Q === I.length - 1 ? {
|
|
846
|
+
...O,
|
|
845
847
|
secondaryResponse: K.data,
|
|
846
848
|
secondaryLoading: !1
|
|
847
|
-
} :
|
|
849
|
+
} : O
|
|
848
850
|
)
|
|
849
851
|
);
|
|
850
852
|
} catch (K) {
|
|
851
|
-
|
|
853
|
+
P(
|
|
852
854
|
(I) => I.map(
|
|
853
|
-
(
|
|
855
|
+
(O, Q) => Q === I.length - 1 ? { ...O, secondaryLoading: !1 } : O
|
|
854
856
|
)
|
|
855
857
|
), console.error("Secondary flow JSON parse error:", K);
|
|
856
858
|
}
|
|
@@ -862,7 +864,7 @@ const nt = (t) => {
|
|
|
862
864
|
}, L = async (s) => {
|
|
863
865
|
const g = s || Ct.trim();
|
|
864
866
|
if (g) {
|
|
865
|
-
_t(!0), It(""), c.current = null, l.current = null, d.current = null, i.current = null,
|
|
867
|
+
_t(!0), It(""), c.current = null, l.current = null, d.current = null, i.current = null, P((m) => [
|
|
866
868
|
...m,
|
|
867
869
|
{
|
|
868
870
|
query: g,
|
|
@@ -873,7 +875,7 @@ const nt = (t) => {
|
|
|
873
875
|
}
|
|
874
876
|
]);
|
|
875
877
|
try {
|
|
876
|
-
const m =
|
|
878
|
+
const m = ut, b = localStorage.getItem("customerNumber"), p = localStorage.getItem("isLoggedIn"), w = await Lt();
|
|
877
879
|
if (!w)
|
|
878
880
|
throw new Error("Failed to obtain access token");
|
|
879
881
|
const ht = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
|
|
@@ -913,9 +915,9 @@ const nt = (t) => {
|
|
|
913
915
|
const K = f.slice(5).trim();
|
|
914
916
|
try {
|
|
915
917
|
const I = JSON.parse(K);
|
|
916
|
-
I.index == 1 && (q = I.data),
|
|
917
|
-
(
|
|
918
|
-
(Q, Bt) => Bt ===
|
|
918
|
+
I.index == 1 && (q = I.data), P(
|
|
919
|
+
(O) => O.map(
|
|
920
|
+
(Q, Bt) => Bt === O.length - 1 ? {
|
|
919
921
|
...Q,
|
|
920
922
|
[I.index == 0 ? "response" : I.index == 1 ? "keywords" : I.index == 2 ? "potentialQuestions" : "end"]: I.data
|
|
921
923
|
} : Q
|
|
@@ -926,27 +928,27 @@ const nt = (t) => {
|
|
|
926
928
|
}
|
|
927
929
|
}
|
|
928
930
|
}
|
|
929
|
-
rr(
|
|
931
|
+
or(rr(q));
|
|
930
932
|
} catch (m) {
|
|
931
933
|
console.error("Error sending message to Tanya:", m);
|
|
932
934
|
} finally {
|
|
933
935
|
_t(!1);
|
|
934
936
|
}
|
|
935
937
|
}
|
|
936
|
-
},
|
|
938
|
+
}, rr = (s) => {
|
|
937
939
|
const g = s.match(
|
|
938
940
|
/top five relevant product or category names are: (.*)/i
|
|
939
|
-
), p = (g ? g[1] : s).split(", ").map((
|
|
941
|
+
), p = (g ? g[1] : s).split(", ").map((A) => A.replace(/\s*(Toys|Bags|Miniature|etc\.*)\s*/gi, "").trim());
|
|
940
942
|
return [...new Set(p)].filter(Boolean).join(",");
|
|
941
|
-
},
|
|
943
|
+
}, or = async (s) => {
|
|
942
944
|
if (typeof s == "string") {
|
|
943
945
|
console.log(s, "keywords");
|
|
944
946
|
const g = s.split(",");
|
|
945
947
|
for (const m of g) {
|
|
946
|
-
const b = await
|
|
947
|
-
if (et(!1), (b == null ? void 0 : b.length) > 0 && (
|
|
948
|
+
const b = await xe(m);
|
|
949
|
+
if (et(!1), (b == null ? void 0 : b.length) > 0 && (P(
|
|
948
950
|
(p) => p.map(
|
|
949
|
-
(w,
|
|
951
|
+
(w, A) => A === p.length - 1 ? {
|
|
950
952
|
...w,
|
|
951
953
|
products: [
|
|
952
954
|
...w.products || [],
|
|
@@ -963,8 +965,8 @@ const nt = (t) => {
|
|
|
963
965
|
}
|
|
964
966
|
} else
|
|
965
967
|
for (const g of s) {
|
|
966
|
-
const m = await
|
|
967
|
-
et(!1), (m == null ? void 0 : m.length) > 0 &&
|
|
968
|
+
const m = await xe(g);
|
|
969
|
+
et(!1), (m == null ? void 0 : m.length) > 0 && P(
|
|
968
970
|
(b) => b.map(
|
|
969
971
|
(p, w) => w === b.length - 1 ? {
|
|
970
972
|
...p,
|
|
@@ -977,7 +979,7 @@ const nt = (t) => {
|
|
|
977
979
|
);
|
|
978
980
|
}
|
|
979
981
|
if (c.current) {
|
|
980
|
-
|
|
982
|
+
P(
|
|
981
983
|
(m) => m.map(
|
|
982
984
|
(b, p) => p === m.length - 1 ? {
|
|
983
985
|
...b,
|
|
@@ -998,11 +1000,11 @@ const nt = (t) => {
|
|
|
998
1000
|
(g == null ? void 0 : g.isGuest) == !1 ? (console.log("running secondary flow", Nt), ft(c.current, 0)) : console.log("not running secondary flow", Nt);
|
|
999
1001
|
}
|
|
1000
1002
|
et(!1);
|
|
1001
|
-
},
|
|
1002
|
-
var m, b, p, w,
|
|
1003
|
+
}, nr = async (s, g) => {
|
|
1004
|
+
var m, b, p, w, A, ht, mt, B, wt, gt, U, q, R, Y, X;
|
|
1003
1005
|
V(!0);
|
|
1004
1006
|
try {
|
|
1005
|
-
const f = await
|
|
1007
|
+
const f = await Ve(s.id);
|
|
1006
1008
|
if (!((b = (m = f == null ? void 0 : f.variants) == null ? void 0 : m[0]) != null && b.product_id || (w = (p = f == null ? void 0 : f.variants) == null ? void 0 : p[0]) != null && w.productId) && !(f.type.item || f.type.bundle)) {
|
|
1007
1009
|
V(!1), H.error("Variants not found", {
|
|
1008
1010
|
position: "bottom-right",
|
|
@@ -1012,32 +1014,32 @@ const nt = (t) => {
|
|
|
1012
1014
|
}
|
|
1013
1015
|
const K = [
|
|
1014
1016
|
{
|
|
1015
|
-
product_id: ((
|
|
1017
|
+
product_id: ((A = f.variants) == null ? void 0 : A[0].product_id) || ((ht = f.variants) == null ? void 0 : ht[0].productId) || (f == null ? void 0 : f.id),
|
|
1016
1018
|
quantity: g
|
|
1017
1019
|
}
|
|
1018
1020
|
];
|
|
1019
1021
|
console.log(K, "product data", "app version", Nt);
|
|
1020
1022
|
const I = JSON.parse(
|
|
1021
1023
|
sessionStorage.getItem("customerData") || "{}"
|
|
1022
|
-
),
|
|
1023
|
-
if (!Q || !Bt ||
|
|
1024
|
-
const
|
|
1025
|
-
let { customer_token: bt } = await
|
|
1026
|
-
|
|
1024
|
+
), O = (I == null ? void 0 : I.basketId) || localStorage.getItem(Yt), Q = !1, Bt = localStorage.getItem(Pt), we = Date.now();
|
|
1025
|
+
if (!Q || !Bt || we >= parseInt(Bt)) {
|
|
1026
|
+
const ar = await Me();
|
|
1027
|
+
let { customer_token: bt } = await He(
|
|
1028
|
+
ar
|
|
1027
1029
|
);
|
|
1028
1030
|
if (bt = "Bearer " + y.access_token, !bt) {
|
|
1029
1031
|
console.error("Failed to get customer_token");
|
|
1030
1032
|
return;
|
|
1031
1033
|
}
|
|
1032
|
-
const
|
|
1033
|
-
if (Kt(bt), localStorage.setItem(
|
|
1034
|
-
const
|
|
1035
|
-
basketId:
|
|
1034
|
+
const ir = we + 300 * 1e3;
|
|
1035
|
+
if (Kt(bt), localStorage.setItem(Pt, ir.toString()), console.log(O, "basketIdFromCustomer"), O) {
|
|
1036
|
+
const ge = await Ye({
|
|
1037
|
+
basketId: O,
|
|
1036
1038
|
customer_token: bt
|
|
1037
1039
|
});
|
|
1038
|
-
if (
|
|
1039
|
-
const Gt = await
|
|
1040
|
-
|
|
1040
|
+
if (ge.status === 200 && ge) {
|
|
1041
|
+
const Gt = await ne(
|
|
1042
|
+
O,
|
|
1041
1043
|
K,
|
|
1042
1044
|
bt
|
|
1043
1045
|
);
|
|
@@ -1048,18 +1050,18 @@ const nt = (t) => {
|
|
|
1048
1050
|
closeOnClick: !0,
|
|
1049
1051
|
pauseOnHover: !0,
|
|
1050
1052
|
draggable: !0
|
|
1051
|
-
}), Rt(
|
|
1053
|
+
}), Rt(O), V(!1));
|
|
1052
1054
|
return;
|
|
1053
1055
|
}
|
|
1054
1056
|
}
|
|
1055
|
-
const
|
|
1057
|
+
const sr = {
|
|
1056
1058
|
productItems: [
|
|
1057
1059
|
{
|
|
1058
1060
|
productId: ((B = f.variants) == null ? void 0 : B[0].product_id) || ((wt = f.variants) == null ? void 0 : wt[0].productId) || (f == null ? void 0 : f.id),
|
|
1059
1061
|
quantity: 1
|
|
1060
1062
|
}
|
|
1061
1063
|
]
|
|
1062
|
-
}, x = await
|
|
1064
|
+
}, x = await Re(bt, sr);
|
|
1063
1065
|
if (console.log(
|
|
1064
1066
|
x,
|
|
1065
1067
|
x == null ? void 0 : x.basket_id,
|
|
@@ -1069,7 +1071,7 @@ const nt = (t) => {
|
|
|
1069
1071
|
V(!1), console.error("Failed to create basket");
|
|
1070
1072
|
return;
|
|
1071
1073
|
}
|
|
1072
|
-
|
|
1074
|
+
at(
|
|
1073
1075
|
(x == null ? void 0 : x.basket_id) || (x == null ? void 0 : x.basketId)
|
|
1074
1076
|
);
|
|
1075
1077
|
const xt = await r(
|
|
@@ -1093,16 +1095,16 @@ const nt = (t) => {
|
|
|
1093
1095
|
position: "bottom-right",
|
|
1094
1096
|
autoClose: 3e3
|
|
1095
1097
|
}), ((q = f == null ? void 0 : f.response) == null ? void 0 : q.status) === 404 || // Basket not found
|
|
1096
|
-
((R = f == null ? void 0 : f.response) == null ? void 0 : R.status) === 401 ? (((Y = f == null ? void 0 : f.response) == null ? void 0 : Y.status) === 404 &&
|
|
1098
|
+
((R = f == null ? void 0 : f.response) == null ? void 0 : R.status) === 401 ? (((Y = f == null ? void 0 : f.response) == null ? void 0 : Y.status) === 404 && at(null), ((X = f == null ? void 0 : f.response) == null ? void 0 : X.status) === 401 && (at(null), Kt(null))) : (console.error("Failed to add product to basket:", f.message), H.error("Failed to add product to cart", {
|
|
1097
1099
|
position: "bottom-right",
|
|
1098
1100
|
autoClose: 3e3
|
|
1099
1101
|
}));
|
|
1100
1102
|
}
|
|
1101
1103
|
V(!1);
|
|
1102
1104
|
};
|
|
1103
|
-
return /* @__PURE__ */ a("div", { className: "relative flex justify-center", children: /* @__PURE__ */ u(
|
|
1105
|
+
return /* @__PURE__ */ a("div", { className: "relative flex justify-center", children: /* @__PURE__ */ u(vr, { open: C, onOpenChange: S, children: [
|
|
1104
1106
|
/* @__PURE__ */ a(
|
|
1105
|
-
|
|
1107
|
+
kr,
|
|
1106
1108
|
{
|
|
1107
1109
|
onClick: () => S(!0),
|
|
1108
1110
|
style: {
|
|
@@ -1180,9 +1182,9 @@ const nt = (t) => {
|
|
|
1180
1182
|
top-0 right-0
|
|
1181
1183
|
transition-transform duration-300 ease-in-out
|
|
1182
1184
|
lg:transform
|
|
1183
|
-
${
|
|
1185
|
+
${j ? "lg:translate-x-0" : "lg:translate-x-full"}
|
|
1184
1186
|
// For mobile: animate from bottom
|
|
1185
|
-
${
|
|
1187
|
+
${j ? "translate-y-0" : "translate-y-full"}
|
|
1186
1188
|
lg:translate-y-0
|
|
1187
1189
|
`,
|
|
1188
1190
|
style: {
|
|
@@ -1312,7 +1314,7 @@ const nt = (t) => {
|
|
|
1312
1314
|
/* @__PURE__ */ u(
|
|
1313
1315
|
"div",
|
|
1314
1316
|
{
|
|
1315
|
-
className: `flex flex-col h-full ${
|
|
1317
|
+
className: `flex flex-col h-full ${ot ? "lg:w-2/3 w-full" : "w-full"}`,
|
|
1316
1318
|
children: [
|
|
1317
1319
|
/* @__PURE__ */ u(
|
|
1318
1320
|
"div",
|
|
@@ -1332,8 +1334,8 @@ const nt = (t) => {
|
|
|
1332
1334
|
onClick: () => Dt(s),
|
|
1333
1335
|
className: "px-2 py-2 font-semibold text-xs text-[#18181B] bg-[#F3F3F3] rounded-2xl",
|
|
1334
1336
|
style: {
|
|
1335
|
-
backgroundColor:
|
|
1336
|
-
borderColor:
|
|
1337
|
+
backgroundColor: ut === n[s] ? "#FFFFFF" : "#F3F3F3",
|
|
1338
|
+
borderColor: ut === n[s] ? "#BBB3DD" : ""
|
|
1337
1339
|
},
|
|
1338
1340
|
children: s
|
|
1339
1341
|
},
|
|
@@ -1365,7 +1367,7 @@ const nt = (t) => {
|
|
|
1365
1367
|
) }),
|
|
1366
1368
|
$t && !s.response.includes("Thinking") && ((m = s.products) == null ? void 0 : m.length) == 0 && /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("p", { className: "text-sm animate-pulse font-nunitoSans font-bold text-[#000000] bg-[#E2DBFF] border border-[#C9C2DE] rounded-l-xl p-2 m-3 mb-4 rounded-br-xl max-w-[75%]", children: "Finding best products for you" }) }),
|
|
1367
1369
|
(s == null ? void 0 : s.products) && ((b = s == null ? void 0 : s.products) == null ? void 0 : b.length) > 0 && /* @__PURE__ */ a(
|
|
1368
|
-
|
|
1370
|
+
Nr,
|
|
1369
1371
|
{
|
|
1370
1372
|
chat: s.products,
|
|
1371
1373
|
storeDetails: k
|
|
@@ -1494,9 +1496,9 @@ const nt = (t) => {
|
|
|
1494
1496
|
"button",
|
|
1495
1497
|
{
|
|
1496
1498
|
className: "px-3 py-1 text-sm",
|
|
1497
|
-
onClick: () =>
|
|
1499
|
+
onClick: () => P(
|
|
1498
1500
|
(p) => p.map(
|
|
1499
|
-
(w,
|
|
1501
|
+
(w, A) => A === g && w.productSnapshot ? {
|
|
1500
1502
|
...w,
|
|
1501
1503
|
productSnapshot: {
|
|
1502
1504
|
...w.productSnapshot,
|
|
@@ -1520,9 +1522,9 @@ const nt = (t) => {
|
|
|
1520
1522
|
"button",
|
|
1521
1523
|
{
|
|
1522
1524
|
className: "px-3 py-1 text-sm",
|
|
1523
|
-
onClick: () =>
|
|
1525
|
+
onClick: () => P(
|
|
1524
1526
|
(p) => p.map(
|
|
1525
|
-
(w,
|
|
1527
|
+
(w, A) => A === g && w.productSnapshot ? {
|
|
1526
1528
|
...w,
|
|
1527
1529
|
productSnapshot: {
|
|
1528
1530
|
...w.productSnapshot,
|
|
@@ -1543,21 +1545,21 @@ const nt = (t) => {
|
|
|
1543
1545
|
"button",
|
|
1544
1546
|
{
|
|
1545
1547
|
onClick: () => {
|
|
1546
|
-
|
|
1548
|
+
nr(
|
|
1547
1549
|
At(
|
|
1548
1550
|
s.productSnapshot
|
|
1549
1551
|
),
|
|
1550
1552
|
s.productSnapshot.quantity
|
|
1551
1553
|
);
|
|
1552
1554
|
},
|
|
1553
|
-
disabled:
|
|
1555
|
+
disabled: ct,
|
|
1554
1556
|
className: "px-4 py-2 rounded-full font-medium",
|
|
1555
1557
|
style: {
|
|
1556
1558
|
background: k.tanyaThemeColor,
|
|
1557
1559
|
color: (k == null ? void 0 : k.tanyaThemeContrastColor) || "#fff",
|
|
1558
|
-
opacity:
|
|
1560
|
+
opacity: ct ? 0.8 : 1
|
|
1559
1561
|
},
|
|
1560
|
-
children:
|
|
1562
|
+
children: ct ? "Adding..." : "Add to cart"
|
|
1561
1563
|
}
|
|
1562
1564
|
)
|
|
1563
1565
|
] })
|
|
@@ -1589,7 +1591,7 @@ const nt = (t) => {
|
|
|
1589
1591
|
autoFocus: !0,
|
|
1590
1592
|
onChange: (s) => It(s.target.value),
|
|
1591
1593
|
onKeyDown: (s) => {
|
|
1592
|
-
s.key === "Enter" && !
|
|
1594
|
+
s.key === "Enter" && !dt && L();
|
|
1593
1595
|
}
|
|
1594
1596
|
}
|
|
1595
1597
|
),
|
|
@@ -1597,10 +1599,10 @@ const nt = (t) => {
|
|
|
1597
1599
|
"button",
|
|
1598
1600
|
{
|
|
1599
1601
|
type: "submit",
|
|
1600
|
-
disabled:
|
|
1602
|
+
disabled: dt,
|
|
1601
1603
|
className: "p-3",
|
|
1602
1604
|
onClick: () => L(),
|
|
1603
|
-
children:
|
|
1605
|
+
children: dt ? /* @__PURE__ */ a(
|
|
1604
1606
|
"div",
|
|
1605
1607
|
{
|
|
1606
1608
|
className: "p-3 animate-spin rounded-full h-3 w-3 border-b-2",
|
|
@@ -1642,17 +1644,17 @@ const nt = (t) => {
|
|
|
1642
1644
|
] })
|
|
1643
1645
|
] }) });
|
|
1644
1646
|
};
|
|
1645
|
-
var
|
|
1646
|
-
return
|
|
1647
|
+
var ae = function(t, e) {
|
|
1648
|
+
return ae = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, o) {
|
|
1647
1649
|
r.__proto__ = o;
|
|
1648
1650
|
} || function(r, o) {
|
|
1649
1651
|
for (var n in o) Object.prototype.hasOwnProperty.call(o, n) && (r[n] = o[n]);
|
|
1650
|
-
},
|
|
1652
|
+
}, ae(t, e);
|
|
1651
1653
|
};
|
|
1652
|
-
function
|
|
1654
|
+
function Or(t, e) {
|
|
1653
1655
|
if (typeof e != "function" && e !== null)
|
|
1654
1656
|
throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
|
|
1655
|
-
|
|
1657
|
+
ae(t, e);
|
|
1656
1658
|
function r() {
|
|
1657
1659
|
this.constructor = t;
|
|
1658
1660
|
}
|
|
@@ -1675,12 +1677,12 @@ function $r(t, e) {
|
|
|
1675
1677
|
e.indexOf(o[n]) < 0 && Object.prototype.propertyIsEnumerable.call(t, o[n]) && (r[o[n]] = t[o[n]]);
|
|
1676
1678
|
return r;
|
|
1677
1679
|
}
|
|
1678
|
-
var Qt = "Invariant Violation",
|
|
1680
|
+
var Qt = "Invariant Violation", Ie = Object.setPrototypeOf, zr = Ie === void 0 ? function(t, e) {
|
|
1679
1681
|
return t.__proto__ = e, t;
|
|
1680
|
-
} :
|
|
1682
|
+
} : Ie, Ke = (
|
|
1681
1683
|
/** @class */
|
|
1682
1684
|
(function(t) {
|
|
1683
|
-
|
|
1685
|
+
Or(e, t);
|
|
1684
1686
|
function e(r) {
|
|
1685
1687
|
r === void 0 && (r = Qt);
|
|
1686
1688
|
var o = t.call(this, typeof r == "number" ? Qt + ": " + r + " (see https://github.com/apollographql/invariant-packages)" : r) || this;
|
|
@@ -1689,14 +1691,14 @@ var Qt = "Invariant Violation", Ce = Object.setPrototypeOf, zr = Ce === void 0 ?
|
|
|
1689
1691
|
return e;
|
|
1690
1692
|
})(Error)
|
|
1691
1693
|
);
|
|
1692
|
-
function
|
|
1694
|
+
function nt(t, e) {
|
|
1693
1695
|
if (!t)
|
|
1694
|
-
throw new
|
|
1696
|
+
throw new Ke(e);
|
|
1695
1697
|
}
|
|
1696
|
-
var
|
|
1698
|
+
var Je = ["debug", "log", "warn", "error", "silent"], Ar = Je.indexOf("log");
|
|
1697
1699
|
function Ut(t) {
|
|
1698
1700
|
return function() {
|
|
1699
|
-
if (
|
|
1701
|
+
if (Je.indexOf(t) >= Ar) {
|
|
1700
1702
|
var e = console[t] || console.log;
|
|
1701
1703
|
return e.apply(console, arguments);
|
|
1702
1704
|
}
|
|
@@ -1704,15 +1706,15 @@ function Ut(t) {
|
|
|
1704
1706
|
}
|
|
1705
1707
|
(function(t) {
|
|
1706
1708
|
t.debug = Ut("debug"), t.log = Ut("log"), t.warn = Ut("warn"), t.error = Ut("error");
|
|
1707
|
-
})(
|
|
1708
|
-
var
|
|
1709
|
+
})(nt || (nt = {}));
|
|
1710
|
+
var We = "3.14.0";
|
|
1709
1711
|
function yt(t) {
|
|
1710
1712
|
try {
|
|
1711
1713
|
return t();
|
|
1712
1714
|
} catch {
|
|
1713
1715
|
}
|
|
1714
1716
|
}
|
|
1715
|
-
const
|
|
1717
|
+
const ie = yt(function() {
|
|
1716
1718
|
return globalThis;
|
|
1717
1719
|
}) || yt(function() {
|
|
1718
1720
|
return window;
|
|
@@ -1729,10 +1731,10 @@ const ae = yt(function() {
|
|
|
1729
1731
|
yt(function() {
|
|
1730
1732
|
return yt.constructor("return this")();
|
|
1731
1733
|
});
|
|
1732
|
-
var
|
|
1734
|
+
var Fe = /* @__PURE__ */ new Map();
|
|
1733
1735
|
function jr(t) {
|
|
1734
|
-
var e =
|
|
1735
|
-
return
|
|
1736
|
+
var e = Fe.get(t) || 1;
|
|
1737
|
+
return Fe.set(t, e + 1), "".concat(t, ":").concat(e, ":").concat(Math.random().toString(36).slice(2));
|
|
1736
1738
|
}
|
|
1737
1739
|
function Dr(t, e) {
|
|
1738
1740
|
var r = jr("stringifyForDisplay");
|
|
@@ -1746,7 +1748,7 @@ function qt(t) {
|
|
|
1746
1748
|
r[o - 1] = arguments[o];
|
|
1747
1749
|
if (typeof e == "number") {
|
|
1748
1750
|
var n = e;
|
|
1749
|
-
e =
|
|
1751
|
+
e = ce(n), e || (e = de(n, r), r = []);
|
|
1750
1752
|
}
|
|
1751
1753
|
t.apply(void 0, [e].concat(r));
|
|
1752
1754
|
};
|
|
@@ -1754,20 +1756,20 @@ function qt(t) {
|
|
|
1754
1756
|
var Zt = Object.assign(function(e, r) {
|
|
1755
1757
|
for (var o = [], n = 2; n < arguments.length; n++)
|
|
1756
1758
|
o[n - 2] = arguments[n];
|
|
1757
|
-
e ||
|
|
1759
|
+
e || nt(e, ce(r, o) || de(r, o));
|
|
1758
1760
|
}, {
|
|
1759
|
-
debug: qt(
|
|
1760
|
-
log: qt(
|
|
1761
|
-
warn: qt(
|
|
1762
|
-
error: qt(
|
|
1761
|
+
debug: qt(nt.debug),
|
|
1762
|
+
log: qt(nt.log),
|
|
1763
|
+
warn: qt(nt.warn),
|
|
1764
|
+
error: qt(nt.error)
|
|
1763
1765
|
});
|
|
1764
|
-
function
|
|
1766
|
+
function Ge(t) {
|
|
1765
1767
|
for (var e = [], r = 1; r < arguments.length; r++)
|
|
1766
1768
|
e[r - 1] = arguments[r];
|
|
1767
|
-
return new
|
|
1769
|
+
return new Ke(ce(t, e) || de(t, e));
|
|
1768
1770
|
}
|
|
1769
|
-
var
|
|
1770
|
-
function
|
|
1771
|
+
var Ne = Symbol.for("ApolloErrorMessageHandler_" + We);
|
|
1772
|
+
function Xe(t) {
|
|
1771
1773
|
if (typeof t == "string")
|
|
1772
1774
|
return t;
|
|
1773
1775
|
try {
|
|
@@ -1776,16 +1778,16 @@ function Ge(t) {
|
|
|
1776
1778
|
return "<non-serializable>";
|
|
1777
1779
|
}
|
|
1778
1780
|
}
|
|
1779
|
-
function
|
|
1781
|
+
function ce(t, e) {
|
|
1780
1782
|
if (e === void 0 && (e = []), !!t)
|
|
1781
|
-
return
|
|
1783
|
+
return ie[Ne] && ie[Ne](t, e.map(Xe));
|
|
1782
1784
|
}
|
|
1783
|
-
function
|
|
1785
|
+
function de(t, e) {
|
|
1784
1786
|
if (e === void 0 && (e = []), !!t)
|
|
1785
1787
|
return "An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({
|
|
1786
|
-
version:
|
|
1788
|
+
version: We,
|
|
1787
1789
|
message: t,
|
|
1788
|
-
args: e.map(
|
|
1790
|
+
args: e.map(Xe)
|
|
1789
1791
|
})));
|
|
1790
1792
|
}
|
|
1791
1793
|
function Lr(t) {
|
|
@@ -1796,7 +1798,7 @@ function Lr(t) {
|
|
|
1796
1798
|
})[0] || null;
|
|
1797
1799
|
}
|
|
1798
1800
|
let F = null;
|
|
1799
|
-
const
|
|
1801
|
+
const Ee = {};
|
|
1800
1802
|
let Br = 1;
|
|
1801
1803
|
const Ur = () => class {
|
|
1802
1804
|
constructor() {
|
|
@@ -1811,11 +1813,11 @@ const Ur = () => class {
|
|
|
1811
1813
|
for (let e = F; e; e = e.parent)
|
|
1812
1814
|
if (this.id in e.slots) {
|
|
1813
1815
|
const r = e.slots[this.id];
|
|
1814
|
-
if (r ===
|
|
1816
|
+
if (r === Ee)
|
|
1815
1817
|
break;
|
|
1816
1818
|
return e !== F && (F.slots[this.id] = r), !0;
|
|
1817
1819
|
}
|
|
1818
|
-
return F && (F.slots[this.id] =
|
|
1820
|
+
return F && (F.slots[this.id] = Ee), !1;
|
|
1819
1821
|
}
|
|
1820
1822
|
getValue() {
|
|
1821
1823
|
if (this.hasValue())
|
|
@@ -1859,7 +1861,7 @@ const Ur = () => class {
|
|
|
1859
1861
|
return e.apply(o, r);
|
|
1860
1862
|
}
|
|
1861
1863
|
};
|
|
1862
|
-
function
|
|
1864
|
+
function Te(t) {
|
|
1863
1865
|
try {
|
|
1864
1866
|
return t();
|
|
1865
1867
|
} catch {
|
|
@@ -1868,18 +1870,18 @@ function Ee(t) {
|
|
|
1868
1870
|
const te = "@wry/context:Slot", qr = (
|
|
1869
1871
|
// Prefer globalThis when available.
|
|
1870
1872
|
// https://github.com/benjamn/wryware/issues/347
|
|
1871
|
-
|
|
1873
|
+
Te(() => globalThis) || // Fall back to global, which works in Node.js and may be converted by some
|
|
1872
1874
|
// bundlers to the appropriate identifier (window, self, ...) depending on the
|
|
1873
1875
|
// bundling target. https://github.com/endojs/endo/issues/576#issuecomment-1178515224
|
|
1874
|
-
|
|
1876
|
+
Te(() => global) || // Otherwise, use a dummy host that's local to this module. We used to fall
|
|
1875
1877
|
// back to using the Array constructor as a namespace, but that was flagged in
|
|
1876
1878
|
// https://github.com/benjamn/wryware/issues/347, and can be avoided.
|
|
1877
1879
|
/* @__PURE__ */ Object.create(null)
|
|
1878
|
-
),
|
|
1880
|
+
), Pe = qr, ue = Pe[te] || // Earlier versions of this package stored the globalKey property on the Array
|
|
1879
1881
|
// constructor, so we check there as well, to prevent Slot class duplication.
|
|
1880
1882
|
Array[te] || (function(t) {
|
|
1881
1883
|
try {
|
|
1882
|
-
Object.defineProperty(
|
|
1884
|
+
Object.defineProperty(Pe, te, {
|
|
1883
1885
|
value: t,
|
|
1884
1886
|
enumerable: !1,
|
|
1885
1887
|
writable: !1,
|
|
@@ -1894,8 +1896,8 @@ Array[te] || (function(t) {
|
|
|
1894
1896
|
} finally {
|
|
1895
1897
|
return t;
|
|
1896
1898
|
}
|
|
1897
|
-
})(Ur()), { bind: Co, noContext: Io } =
|
|
1898
|
-
new
|
|
1899
|
+
})(Ur()), { bind: Co, noContext: Io } = ue;
|
|
1900
|
+
new ue();
|
|
1899
1901
|
function Mr(t, e) {
|
|
1900
1902
|
var r = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
|
|
1901
1903
|
if (r) return (r = r.call(t)).next.bind(r);
|
|
@@ -1923,24 +1925,24 @@ function Oe(t, e) {
|
|
|
1923
1925
|
o[r] = t[r];
|
|
1924
1926
|
return o;
|
|
1925
1927
|
}
|
|
1926
|
-
function
|
|
1928
|
+
function $e(t, e) {
|
|
1927
1929
|
for (var r = 0; r < e.length; r++) {
|
|
1928
1930
|
var o = e[r];
|
|
1929
1931
|
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o);
|
|
1930
1932
|
}
|
|
1931
1933
|
}
|
|
1932
|
-
function
|
|
1933
|
-
return e &&
|
|
1934
|
+
function pe(t, e, r) {
|
|
1935
|
+
return e && $e(t.prototype, e), r && $e(t, r), Object.defineProperty(t, "prototype", { writable: !1 }), t;
|
|
1934
1936
|
}
|
|
1935
|
-
var
|
|
1937
|
+
var fe = function() {
|
|
1936
1938
|
return typeof Symbol == "function";
|
|
1937
|
-
}, fe = function(t) {
|
|
1938
|
-
return pe() && !!Symbol[t];
|
|
1939
1939
|
}, he = function(t) {
|
|
1940
|
-
return fe(
|
|
1940
|
+
return fe() && !!Symbol[t];
|
|
1941
|
+
}, me = function(t) {
|
|
1942
|
+
return he(t) ? Symbol[t] : "@@" + t;
|
|
1941
1943
|
};
|
|
1942
|
-
|
|
1943
|
-
var Vr =
|
|
1944
|
+
fe() && !he("observable") && (Symbol.observable = Symbol("observable"));
|
|
1945
|
+
var Vr = me("iterator"), se = me("observable"), Qe = me("species");
|
|
1944
1946
|
function Jt(t, e) {
|
|
1945
1947
|
var r = t[e];
|
|
1946
1948
|
if (r != null) {
|
|
@@ -1950,7 +1952,7 @@ function Jt(t, e) {
|
|
|
1950
1952
|
}
|
|
1951
1953
|
function Et(t) {
|
|
1952
1954
|
var e = t.constructor;
|
|
1953
|
-
return e !== void 0 && (e = e[
|
|
1955
|
+
return e !== void 0 && (e = e[Qe], e === null && (e = void 0)), e !== void 0 ? e : N;
|
|
1954
1956
|
}
|
|
1955
1957
|
function Rr(t) {
|
|
1956
1958
|
return t instanceof N;
|
|
@@ -1969,7 +1971,7 @@ function Ht(t) {
|
|
|
1969
1971
|
}
|
|
1970
1972
|
});
|
|
1971
1973
|
}
|
|
1972
|
-
function
|
|
1974
|
+
function Ze(t) {
|
|
1973
1975
|
var e = t._cleanup;
|
|
1974
1976
|
if (e !== void 0 && (t._cleanup = void 0, !!e))
|
|
1975
1977
|
try {
|
|
@@ -1983,18 +1985,18 @@ function Qe(t) {
|
|
|
1983
1985
|
kt(o);
|
|
1984
1986
|
}
|
|
1985
1987
|
}
|
|
1986
|
-
function
|
|
1988
|
+
function le(t) {
|
|
1987
1989
|
t._observer = void 0, t._queue = void 0, t._state = "closed";
|
|
1988
1990
|
}
|
|
1989
1991
|
function Yr(t) {
|
|
1990
1992
|
var e = t._queue;
|
|
1991
1993
|
if (e) {
|
|
1992
1994
|
t._queue = void 0, t._state = "ready";
|
|
1993
|
-
for (var r = 0; r < e.length && (
|
|
1995
|
+
for (var r = 0; r < e.length && (tr(t, e[r].type, e[r].value), t._state !== "closed"); ++r)
|
|
1994
1996
|
;
|
|
1995
1997
|
}
|
|
1996
1998
|
}
|
|
1997
|
-
function
|
|
1999
|
+
function tr(t, e, r) {
|
|
1998
2000
|
t._state = "running";
|
|
1999
2001
|
var o = t._observer;
|
|
2000
2002
|
try {
|
|
@@ -2004,17 +2006,17 @@ function Ze(t, e, r) {
|
|
|
2004
2006
|
n && n.call(o, r);
|
|
2005
2007
|
break;
|
|
2006
2008
|
case "error":
|
|
2007
|
-
if (
|
|
2009
|
+
if (le(t), n) n.call(o, r);
|
|
2008
2010
|
else throw r;
|
|
2009
2011
|
break;
|
|
2010
2012
|
case "complete":
|
|
2011
|
-
|
|
2013
|
+
le(t), n && n.call(o);
|
|
2012
2014
|
break;
|
|
2013
2015
|
}
|
|
2014
2016
|
} catch (c) {
|
|
2015
2017
|
kt(c);
|
|
2016
2018
|
}
|
|
2017
|
-
t._state === "closed" ?
|
|
2019
|
+
t._state === "closed" ? Ze(t) : t._state === "running" && (t._state = "ready");
|
|
2018
2020
|
}
|
|
2019
2021
|
function ee(t, e, r) {
|
|
2020
2022
|
if (t._state !== "closed") {
|
|
@@ -2034,7 +2036,7 @@ function ee(t, e, r) {
|
|
|
2034
2036
|
});
|
|
2035
2037
|
return;
|
|
2036
2038
|
}
|
|
2037
|
-
|
|
2039
|
+
tr(t, e, r);
|
|
2038
2040
|
}
|
|
2039
2041
|
}
|
|
2040
2042
|
var Kr = /* @__PURE__ */ (function() {
|
|
@@ -2050,8 +2052,8 @@ var Kr = /* @__PURE__ */ (function() {
|
|
|
2050
2052
|
}
|
|
2051
2053
|
var e = t.prototype;
|
|
2052
2054
|
return e.unsubscribe = function() {
|
|
2053
|
-
this._state !== "closed" && (
|
|
2054
|
-
},
|
|
2055
|
+
this._state !== "closed" && (le(this), Ze(this));
|
|
2056
|
+
}, pe(t, [{
|
|
2055
2057
|
key: "closed",
|
|
2056
2058
|
get: function() {
|
|
2057
2059
|
return this._state === "closed";
|
|
@@ -2068,7 +2070,7 @@ var Kr = /* @__PURE__ */ (function() {
|
|
|
2068
2070
|
ee(this._subscription, "error", o);
|
|
2069
2071
|
}, e.complete = function() {
|
|
2070
2072
|
ee(this._subscription, "complete");
|
|
2071
|
-
},
|
|
2073
|
+
}, pe(t, [{
|
|
2072
2074
|
key: "closed",
|
|
2073
2075
|
get: function() {
|
|
2074
2076
|
return this._subscription._state === "closed";
|
|
@@ -2164,8 +2166,8 @@ var Kr = /* @__PURE__ */ (function() {
|
|
|
2164
2166
|
if (d = !0, !S || l)
|
|
2165
2167
|
try {
|
|
2166
2168
|
y = o(y, C);
|
|
2167
|
-
} catch (
|
|
2168
|
-
return v.error(
|
|
2169
|
+
} catch (j) {
|
|
2170
|
+
return v.error(j);
|
|
2169
2171
|
}
|
|
2170
2172
|
else
|
|
2171
2173
|
y = C;
|
|
@@ -2187,11 +2189,11 @@ var Kr = /* @__PURE__ */ (function() {
|
|
|
2187
2189
|
var y, v = 0;
|
|
2188
2190
|
function C(S) {
|
|
2189
2191
|
y = S.subscribe({
|
|
2190
|
-
next: function(
|
|
2191
|
-
i.next(
|
|
2192
|
+
next: function(j) {
|
|
2193
|
+
i.next(j);
|
|
2192
2194
|
},
|
|
2193
|
-
error: function(
|
|
2194
|
-
i.error(
|
|
2195
|
+
error: function(j) {
|
|
2196
|
+
i.error(j);
|
|
2195
2197
|
},
|
|
2196
2198
|
complete: function() {
|
|
2197
2199
|
v === c.length ? (y = void 0, i.complete()) : C(d.from(c[v++]));
|
|
@@ -2245,12 +2247,12 @@ var Kr = /* @__PURE__ */ (function() {
|
|
|
2245
2247
|
}), i.unsubscribe();
|
|
2246
2248
|
};
|
|
2247
2249
|
});
|
|
2248
|
-
}, e[
|
|
2250
|
+
}, e[se] = function() {
|
|
2249
2251
|
return this;
|
|
2250
2252
|
}, t.from = function(o) {
|
|
2251
2253
|
var n = typeof this == "function" ? this : t;
|
|
2252
2254
|
if (o == null) throw new TypeError(o + " is not an object");
|
|
2253
|
-
var c = Jt(o,
|
|
2255
|
+
var c = Jt(o, se);
|
|
2254
2256
|
if (c) {
|
|
2255
2257
|
var l = c.call(o);
|
|
2256
2258
|
if (Object(l) !== l) throw new TypeError(l + " is not an object");
|
|
@@ -2258,7 +2260,7 @@ var Kr = /* @__PURE__ */ (function() {
|
|
|
2258
2260
|
return l.subscribe(d);
|
|
2259
2261
|
});
|
|
2260
2262
|
}
|
|
2261
|
-
if (
|
|
2263
|
+
if (he("iterator") && (c = Jt(o, Vr), c))
|
|
2262
2264
|
return new n(function(d) {
|
|
2263
2265
|
Ht(function() {
|
|
2264
2266
|
if (!d.closed) {
|
|
@@ -2294,16 +2296,16 @@ var Kr = /* @__PURE__ */ (function() {
|
|
|
2294
2296
|
}
|
|
2295
2297
|
});
|
|
2296
2298
|
});
|
|
2297
|
-
},
|
|
2298
|
-
key:
|
|
2299
|
+
}, pe(t, null, [{
|
|
2300
|
+
key: Qe,
|
|
2299
2301
|
get: function() {
|
|
2300
2302
|
return this;
|
|
2301
2303
|
}
|
|
2302
2304
|
}]), t;
|
|
2303
2305
|
})();
|
|
2304
|
-
|
|
2306
|
+
fe() && Object.defineProperty(N, Symbol("extensions"), {
|
|
2305
2307
|
value: {
|
|
2306
|
-
symbol:
|
|
2308
|
+
symbol: se,
|
|
2307
2309
|
hostReportError: kt
|
|
2308
2310
|
},
|
|
2309
2311
|
configurable: !0
|
|
@@ -2327,8 +2329,8 @@ function Wr(t) {
|
|
|
2327
2329
|
var vt;
|
|
2328
2330
|
typeof self < "u" ? vt = self : typeof window < "u" ? vt = window : typeof global < "u" ? vt = global : typeof module < "u" ? vt = module : vt = Function("return this")();
|
|
2329
2331
|
Wr(vt);
|
|
2330
|
-
var
|
|
2331
|
-
|
|
2332
|
+
var ze = N.prototype, Ae = "@@observable";
|
|
2333
|
+
ze[Ae] || (ze[Ae] = function() {
|
|
2332
2334
|
return this;
|
|
2333
2335
|
});
|
|
2334
2336
|
function Gr(t) {
|
|
@@ -2341,7 +2343,7 @@ function Gr(t) {
|
|
|
2341
2343
|
], r = 0, o = Object.keys(t); r < o.length; r++) {
|
|
2342
2344
|
var n = o[r];
|
|
2343
2345
|
if (e.indexOf(n) < 0)
|
|
2344
|
-
throw
|
|
2346
|
+
throw Ge(58, n);
|
|
2345
2347
|
}
|
|
2346
2348
|
return t;
|
|
2347
2349
|
}
|
|
@@ -2368,23 +2370,23 @@ function Qr(t) {
|
|
|
2368
2370
|
};
|
|
2369
2371
|
return e.operationName || (e.operationName = typeof e.query != "string" ? Lr(e.query) || void 0 : ""), e;
|
|
2370
2372
|
}
|
|
2371
|
-
var Zr = Symbol.for("apollo.deprecations"), to =
|
|
2373
|
+
var Zr = Symbol.for("apollo.deprecations"), to = ie, eo = new ue();
|
|
2372
2374
|
function ro(t) {
|
|
2373
2375
|
return to[Zr] || (eo.getValue() || []).includes(t);
|
|
2374
2376
|
}
|
|
2375
2377
|
function oo(t, e) {
|
|
2376
2378
|
ro(t) || e();
|
|
2377
2379
|
}
|
|
2378
|
-
function
|
|
2380
|
+
function je(t, e) {
|
|
2379
2381
|
return e ? e(t) : N.of();
|
|
2380
2382
|
}
|
|
2381
2383
|
function Tt(t) {
|
|
2382
|
-
return typeof t == "function" ? new
|
|
2384
|
+
return typeof t == "function" ? new er(t) : t;
|
|
2383
2385
|
}
|
|
2384
2386
|
function Mt(t) {
|
|
2385
2387
|
return t.request.length <= 1;
|
|
2386
2388
|
}
|
|
2387
|
-
var
|
|
2389
|
+
var er = (
|
|
2388
2390
|
/** @class */
|
|
2389
2391
|
(function() {
|
|
2390
2392
|
function t(e) {
|
|
@@ -2399,7 +2401,7 @@ var tr = (
|
|
|
2399
2401
|
return r.concat(o);
|
|
2400
2402
|
});
|
|
2401
2403
|
}, t.split = function(e, r, o) {
|
|
2402
|
-
var n = Tt(r), c = Tt(o || new t(
|
|
2404
|
+
var n = Tt(r), c = Tt(o || new t(je)), l;
|
|
2403
2405
|
return Mt(n) && Mt(c) ? l = new t(function(d) {
|
|
2404
2406
|
return e(d) ? n.request(d) || N.of() : c.request(d) || N.of();
|
|
2405
2407
|
}) : l = new t(function(d, i) {
|
|
@@ -2422,11 +2424,11 @@ var tr = (
|
|
|
2422
2424
|
}) || N.of();
|
|
2423
2425
|
}), Object.assign(c, { left: o, right: n });
|
|
2424
2426
|
}, t.prototype.split = function(e, r, o) {
|
|
2425
|
-
return this.concat(t.split(e, r, o || new t(
|
|
2427
|
+
return this.concat(t.split(e, r, o || new t(je)));
|
|
2426
2428
|
}, t.prototype.concat = function(e) {
|
|
2427
2429
|
return t.concat(this, e);
|
|
2428
2430
|
}, t.prototype.request = function(e, r) {
|
|
2429
|
-
throw
|
|
2431
|
+
throw Ge(48);
|
|
2430
2432
|
}, t.prototype.onError = function(e, r) {
|
|
2431
2433
|
if (globalThis.__DEV__ !== !1 && oo("onError", function() {
|
|
2432
2434
|
globalThis.__DEV__ !== !1 && Zt.warn(49);
|
|
@@ -2439,7 +2441,7 @@ var tr = (
|
|
|
2439
2441
|
})()
|
|
2440
2442
|
);
|
|
2441
2443
|
function no(t) {
|
|
2442
|
-
return new
|
|
2444
|
+
return new er(function(e, r) {
|
|
2443
2445
|
var o = $r(e, []);
|
|
2444
2446
|
return new N(function(n) {
|
|
2445
2447
|
var c, l = !1;
|
|
@@ -2475,7 +2477,7 @@ const ao = async () => {
|
|
|
2475
2477
|
} catch (n) {
|
|
2476
2478
|
return E.isAxiosError(n) ? console.error("Error fetching token:", n.response || n.message) : console.error("Unexpected error:", n), null;
|
|
2477
2479
|
}
|
|
2478
|
-
}, io = "https://api.australia-southeast1.gcp.commercetools.com/kt-demo/graphql", so =
|
|
2480
|
+
}, io = "https://api.australia-southeast1.gcp.commercetools.com/kt-demo/graphql", so = lr({
|
|
2479
2481
|
uri: `${io}`
|
|
2480
2482
|
}), lo = no(async (t, { headers: e }) => {
|
|
2481
2483
|
const r = await ao();
|
|
@@ -2485,9 +2487,9 @@ const ao = async () => {
|
|
|
2485
2487
|
authorization: `Bearer ${r}`
|
|
2486
2488
|
}
|
|
2487
2489
|
};
|
|
2488
|
-
}), co = new
|
|
2490
|
+
}), co = new cr({
|
|
2489
2491
|
link: lo.concat(so),
|
|
2490
|
-
cache: new
|
|
2492
|
+
cache: new dr(),
|
|
2491
2493
|
defaultOptions: {
|
|
2492
2494
|
watchQuery: {
|
|
2493
2495
|
fetchPolicy: "cache-and-network"
|
|
@@ -2495,7 +2497,7 @@ const ao = async () => {
|
|
|
2495
2497
|
}
|
|
2496
2498
|
}), Fo = (t) => {
|
|
2497
2499
|
const { tanyaConfig: e } = t;
|
|
2498
|
-
return /* @__PURE__ */ a(
|
|
2500
|
+
return /* @__PURE__ */ a(ur, { client: co, children: /* @__PURE__ */ a(yr, { children: /* @__PURE__ */ a(Pr, { tanyaConfig: e }) }) });
|
|
2499
2501
|
};
|
|
2500
2502
|
export {
|
|
2501
2503
|
Fo as TanyaChatbot,
|