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