tanya-chatbot 0.5.7 → 0.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/tanya-chatbot.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useEffect as
|
|
1
|
+
import { useEffect as j, useState as z, useRef as xt } from "react";
|
|
2
2
|
import { jsx as a, jsxs as u, Fragment as oe } from "react/jsx-runtime";
|
|
3
3
|
import { createHttpLink as cr, ApolloClient as dr, InMemoryCache as ur, ApolloProvider as pr } from "@apollo/client";
|
|
4
4
|
import { Provider as fr, useDispatch as Le, useSelector as Rt } from "react-redux";
|
|
@@ -12,7 +12,7 @@ import { Icon as xe } from "@iconify/react";
|
|
|
12
12
|
import { toast as U } from "react-toastify";
|
|
13
13
|
const hr = '*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media(min-width:640px){.container{max-width:640px}}@media(min-width:768px){.container{max-width:768px}}@media(min-width:1024px){.container{max-width:1024px}}@media(min-width:1280px){.container{max-width:1280px}}@media(min-width:1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.top-full{top:100%}.z-40{z-index:40}.z-50{z-index:50}.m-1{margin:.25rem}.m-3{margin:.75rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-5{margin-top:1.25rem;margin-bottom:1.25rem}.mb-1{margin-bottom:.25rem}.mb-16{margin-bottom:4rem}.mb-2{margin-bottom:.5rem}.mb-20{margin-bottom:5rem}.mb-24{margin-bottom:6rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.h-12{height:3rem}.h-28{height:7rem}.h-3{height:.75rem}.h-6{height:1.5rem}.h-\\[120px\\]{height:120px}.h-\\[200px\\]{height:200px}.h-\\[60px\\]{height:60px}.h-\\[90vh\\]{height:90vh}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-screen{height:100vh}.w-28{width:7rem}.w-3{width:.75rem}.w-5\\/6{width:83.333333%}.w-6{width:1.5rem}.w-72{width:18rem}.w-\\[100vw\\]{width:100vw}.w-\\[120px\\]{width:120px}.w-\\[150px\\]{width:150px}.w-\\[60px\\]{width:60px}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.max-w-\\[200px\\]{max-width:200px}.max-w-\\[75\\%\\]{max-width:75%}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-full{--tw-translate-y: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-ellipsis{text-overflow:ellipsis}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-\\[10px\\]{border-radius:10px}.rounded-\\[20px\\]{border-radius:20px}.rounded-\\[5px\\]{border-radius:5px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-xl{border-radius:.75rem}.rounded-l-\\[20px\\]{border-top-left-radius:20px;border-bottom-left-radius:20px}.rounded-l-xl{border-top-left-radius:.75rem;border-bottom-left-radius:.75rem}.rounded-r-xl{border-top-right-radius:.75rem;border-bottom-right-radius:.75rem}.rounded-bl-2xl{border-bottom-left-radius:1rem}.rounded-br-xl{border-bottom-right-radius:.75rem}.rounded-tr-\\[20px\\]{border-top-right-radius:20px}.rounded-tr-\\[5px\\]{border-top-right-radius:5px}.border{border-width:1px}.border-0{border-width:0px}.border-b-2{border-bottom-width:2px}.border-l-2{border-left-width:2px}.border-t-2{border-top-width:2px}.border-none{border-style:none}.border-\\[\\#C9C2DE\\]{--tw-border-opacity: 1;border-color:rgb(201 194 222 / var(--tw-border-opacity, 1))}.border-\\[\\#E5E5E5\\]{--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.bg-\\[\\#553D94\\]{--tw-bg-opacity: 1;background-color:rgb(85 61 148 / var(--tw-bg-opacity, 1))}.bg-\\[\\#6851C6\\]{--tw-bg-opacity: 1;background-color:rgb(104 81 198 / var(--tw-bg-opacity, 1))}.bg-\\[\\#804C9E0D\\]{background-color:#804c9e0d}.bg-\\[\\#A21CAF\\]{--tw-bg-opacity: 1;background-color:rgb(162 28 175 / var(--tw-bg-opacity, 1))}.bg-\\[\\#AB192D\\]{--tw-bg-opacity: 1;background-color:rgb(171 25 45 / var(--tw-bg-opacity, 1))}.bg-\\[\\#E2DBFF\\]{--tw-bg-opacity: 1;background-color:rgb(226 219 255 / var(--tw-bg-opacity, 1))}.bg-\\[\\#E3DEEF\\]{--tw-bg-opacity: 1;background-color:rgb(227 222 239 / var(--tw-bg-opacity, 1))}.bg-\\[\\#F3F3F3\\]{--tw-bg-opacity: 1;background-color:rgb(243 243 243 / var(--tw-bg-opacity, 1))}.bg-\\[\\#FFFFFF\\],.bg-\\[\\#ffffff\\]{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-black\\/30{background-color:#0000004d}.bg-indigo-300{--tw-bg-opacity: 1;background-color:rgb(165 180 252 / var(--tw-bg-opacity, 1))}.bg-popover{background-color:hsl(var(--popover))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-\\[1px\\]{padding:1px}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-7{padding-left:1.75rem;padding-right:1.75rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-2{padding-bottom:.5rem}.pl-2{padding-left:.5rem}.pr-5{padding-right:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.font-nunitoSans{font-family:Nunito Sans}.text-\\[12px\\]{font-size:12px}.text-\\[14px\\]{font-size:14px}.text-\\[15px\\]{font-size:15px}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.italic{font-style:italic}.leading-snug{line-height:1.375}.text-\\[\\#000000\\]{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-\\[\\#14121F\\]{--tw-text-opacity: 1;color:rgb(20 18 31 / var(--tw-text-opacity, 1))}.text-\\[\\#18181B\\]{--tw-text-opacity: 1;color:rgb(24 24 27 / var(--tw-text-opacity, 1))}.text-\\[\\#232323\\]{--tw-text-opacity: 1;color:rgb(35 35 35 / var(--tw-text-opacity, 1))}.text-\\[\\#323135\\]{--tw-text-opacity: 1;color:rgb(50 49 53 / var(--tw-text-opacity, 1))}.text-\\[\\#494949\\]{--tw-text-opacity: 1;color:rgb(73 73 73 / var(--tw-text-opacity, 1))}.text-\\[\\#555555\\]{--tw-text-opacity: 1;color:rgb(85 85 85 / var(--tw-text-opacity, 1))}.text-\\[\\#5B5B5B\\]{--tw-text-opacity: 1;color:rgb(91 91 91 / var(--tw-text-opacity, 1))}.text-\\[\\#68656E\\]{--tw-text-opacity: 1;color:rgb(104 101 110 / var(--tw-text-opacity, 1))}.text-\\[\\#959595\\]{--tw-text-opacity: 1;color:rgb(149 149 149 / var(--tw-text-opacity, 1))}.text-\\[\\#EC5050\\]{--tw-text-opacity: 1;color:rgb(236 80 80 / var(--tw-text-opacity, 1))}.text-\\[\\#FBFBFC\\]{--tw-text-opacity: 1;color:rgb(251 251 252 / var(--tw-text-opacity, 1))}.text-\\[\\#FFFFFF\\]{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.line-through{text-decoration-line:line-through}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-80{opacity:.8}.shadow-\\[0px_2px_2px_0px_\\#9292BC40\\]{--tw-shadow: 0px 2px 2px 0px #9292BC40;--tw-shadow-colored: 0px 2px 2px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0px_4px_10px_0px_\\#5F499840\\]{--tw-shadow: 0px 4px 10px 0px #5F499840;--tw-shadow-colored: 0px 4px 10px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.duration-300{animation-duration:.3s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.running{animation-play-state:running}html,body,#root{margin:0;padding:0}:root{line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;padding:0}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}@media(prefers-color-scheme:light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}.hover\\:scale-125:hover{--tw-scale-x: 1.25;--tw-scale-y: 1.25;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:text-\\[\\#6952C7\\]:hover{--tw-text-opacity: 1;color:rgb(105 82 199 / var(--tw-text-opacity, 1))}.hover\\:opacity-90:hover{opacity:.9}.group:hover .group-hover\\:opacity-100{opacity:1}.data-\\[state\\=open\\]\\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\\[state\\=closed\\]\\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\\[state\\=closed\\]\\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\\[state\\=open\\]\\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\\[state\\=closed\\]\\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\\[state\\=open\\]\\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\\[side\\=bottom\\]\\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\\[side\\=left\\]\\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\\[side\\=right\\]\\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\\[side\\=top\\]\\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}@media(min-width:640px){.sm\\:w-\\[80vw\\]{width:80vw}}@media(min-width:768px){.md\\:h-\\[100vh\\]{height:100vh}.md\\:w-1\\/2{width:50%}.md\\:w-\\[770px\\]{width:770px}.md\\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\\:translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\\:translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\\:flex-row{flex-direction:row}}@media(min-width:1024px){.lg\\:h-\\[100vh\\]{height:100vh}.lg\\:w-1\\/2{width:50%}.lg\\:w-2\\/3{width:66.666667%}.lg\\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\\:translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\\:translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\\:transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\\:flex-row{flex-direction:row}.lg\\:rounded-l-xl{border-top-left-radius:.75rem;border-bottom-left-radius:.75rem}.lg\\:rounded-bl-xl{border-bottom-left-radius:.75rem}}';
|
|
14
14
|
function So() {
|
|
15
|
-
return
|
|
15
|
+
return j(() => {
|
|
16
16
|
if (typeof document < "u") {
|
|
17
17
|
const t = document.createElement("style");
|
|
18
18
|
return t.textContent = hr, document.head.appendChild(t), () => {
|
|
@@ -101,7 +101,7 @@ const St = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1
|
|
|
101
101
|
const t = "https://tanya-sfcc-server.vercel.app/";
|
|
102
102
|
try {
|
|
103
103
|
const e = await E.post(
|
|
104
|
-
`${t}api/auth/token-bm-grant?baseUrl=${
|
|
104
|
+
`${t}api/auth/token-bm-grant?baseUrl=${tt()}&siteId=${K()}`
|
|
105
105
|
);
|
|
106
106
|
return e.status === 200 && e.data.access_token ? e.data.access_token : (console.error("Failed to fetch token:", e.data), null);
|
|
107
107
|
} catch (e) {
|
|
@@ -111,7 +111,7 @@ const St = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1
|
|
|
111
111
|
const e = "https://tanya-sfcc-server.vercel.app/";
|
|
112
112
|
try {
|
|
113
113
|
const r = JSON.parse(sessionStorage.getItem("customerData") || "{}").dwsid, o = await E.post(
|
|
114
|
-
`${e}api/auth/token-existing-guest-customer?dwsid=${r}&baseUrl=${
|
|
114
|
+
`${e}api/auth/token-existing-guest-customer?dwsid=${r}&baseUrl=${tt()}&siteId=${K()}&pubCfg=${it()}&envRef=${st()}&orgRef=${lt()}`,
|
|
115
115
|
{},
|
|
116
116
|
{
|
|
117
117
|
headers: {
|
|
@@ -127,10 +127,10 @@ const St = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1
|
|
|
127
127
|
};
|
|
128
128
|
async function $t() {
|
|
129
129
|
var c;
|
|
130
|
-
const t =
|
|
130
|
+
const t = K(), e = "access_token_" + t, r = "expires_in_" + t, o = localStorage.getItem(r), n = localStorage.getItem(e);
|
|
131
131
|
return console.log(n), (c = JSON.parse(sessionStorage.getItem("customerData") || "{}")) != null && c.isGuest, console.log("access token found in local storage"), { access_token: n, expires_in: o };
|
|
132
132
|
}
|
|
133
|
-
const
|
|
133
|
+
const tt = () => sessionStorage.getItem("Host"), K = () => sessionStorage.getItem("SiteId"), it = () => sessionStorage.getItem("pubCfg"), st = () => sessionStorage.getItem("envRef"), lt = () => sessionStorage.getItem("orgRef"), ye = async (t) => {
|
|
134
134
|
console.log("fetching results");
|
|
135
135
|
const { serverUrl: e, basePath: r } = St();
|
|
136
136
|
let o = "";
|
|
@@ -139,9 +139,9 @@ const Z = () => sessionStorage.getItem("Host"), Y = () => sessionStorage.getItem
|
|
|
139
139
|
console.log("the token from getSearchResults", n), o = n.access_token;
|
|
140
140
|
}
|
|
141
141
|
try {
|
|
142
|
-
const n =
|
|
142
|
+
const n = tt();
|
|
143
143
|
return (await E.get(
|
|
144
|
-
`${e}${r}/search-sfcc?baseUrl=${n}&query=${t}&siteId=${
|
|
144
|
+
`${e}${r}/search-sfcc?baseUrl=${n}&query=${t}&siteId=${K()}&pubCfg=${it()}&envRef=${st()}&orgRef=${lt()}`,
|
|
145
145
|
{
|
|
146
146
|
headers: {
|
|
147
147
|
"Content-Type": "application/json",
|
|
@@ -154,11 +154,11 @@ const Z = () => sessionStorage.getItem("Host"), Y = () => sessionStorage.getItem
|
|
|
154
154
|
}
|
|
155
155
|
}, Ve = async (t) => {
|
|
156
156
|
if (!t) throw new Error("Product ID is required");
|
|
157
|
-
const { serverUrl: e, basePath: r } = St(), o =
|
|
157
|
+
const { serverUrl: e, basePath: r } = St(), o = tt();
|
|
158
158
|
console.log("calling access");
|
|
159
159
|
const { access_token: n } = await $t();
|
|
160
160
|
return (await E.get(
|
|
161
|
-
`${e}${r}/product-sfcc/${t}?baseUrl=${o}&siteId=${
|
|
161
|
+
`${e}${r}/product-sfcc/${t}?baseUrl=${o}&siteId=${K()}&pubCfg=${it()}&envRef=${st()}&orgRef=${lt()}`,
|
|
162
162
|
{
|
|
163
163
|
headers: {
|
|
164
164
|
"Content-Type": "application/json",
|
|
@@ -172,7 +172,7 @@ const Z = () => sessionStorage.getItem("Host"), Y = () => sessionStorage.getItem
|
|
|
172
172
|
e
|
|
173
173
|
), { serverUrl: o, basePath: n } = St(), l = (await $t()).access_token;
|
|
174
174
|
return (await E.get(
|
|
175
|
-
`${o}${n}/get-interest?baseUrl=${
|
|
175
|
+
`${o}${n}/get-interest?baseUrl=${tt()}&customerId=${t}&siteId=${K()}&pubCfg=${it()}&envRef=${st()}&orgRef=${lt()}`,
|
|
176
176
|
{
|
|
177
177
|
headers: {
|
|
178
178
|
"Content-Type": "application/json",
|
|
@@ -197,8 +197,8 @@ const Z = () => sessionStorage.getItem("Host"), Y = () => sessionStorage.getItem
|
|
|
197
197
|
return o ? `<p key=${r} class="mb-2"><strong>${o[1]}.</strong> ${o[2]}</p>` : e.trim() ? `<p key=${r} class="mb-2">${e}</p>` : "<br/>";
|
|
198
198
|
}).join("");
|
|
199
199
|
function Fr() {
|
|
200
|
-
const t = () => window.innerWidth < 425 ? 1 : window.innerWidth < 768 ? 2 : 4, [e, r] =
|
|
201
|
-
return
|
|
200
|
+
const t = () => window.innerWidth < 425 ? 1 : window.innerWidth < 768 ? 2 : 4, [e, r] = z(t);
|
|
201
|
+
return j(() => {
|
|
202
202
|
const o = () => r(t());
|
|
203
203
|
return window.addEventListener("resize", o), () => window.removeEventListener("resize", o);
|
|
204
204
|
}, []), e;
|
|
@@ -206,7 +206,7 @@ function Fr() {
|
|
|
206
206
|
const Nr = ({
|
|
207
207
|
product: t
|
|
208
208
|
}) => {
|
|
209
|
-
const e = Le(), r = Fr(), [o, n] =
|
|
209
|
+
const e = Le(), r = Fr(), [o, n] = z(0), c = () => {
|
|
210
210
|
n(
|
|
211
211
|
(s) => s + r >= t.length ? 0 : s + r
|
|
212
212
|
);
|
|
@@ -342,7 +342,7 @@ const Nr = ({
|
|
|
342
342
|
const { serverUrl: r, basePath: o } = St(), n = `${r}`;
|
|
343
343
|
try {
|
|
344
344
|
const d = await E.post(
|
|
345
|
-
`${n}${o}/basket/create?baseUrl=${
|
|
345
|
+
`${n}${o}/basket/create?baseUrl=${tt()}&siteId=${K()}&pubCfg=${it()}&envRef=${st()}&orgRef=${lt()}`,
|
|
346
346
|
e,
|
|
347
347
|
{
|
|
348
348
|
headers: {
|
|
@@ -365,7 +365,7 @@ const Nr = ({
|
|
|
365
365
|
const { serverUrl: o, basePath: n } = St(), c = `${o}`;
|
|
366
366
|
try {
|
|
367
367
|
const l = await E.post(
|
|
368
|
-
`${c}${n}/basket/add-product/${t}?baseUrl=${
|
|
368
|
+
`${c}${n}/basket/add-product/${t}?baseUrl=${tt()}&siteId=${K()}&pubCfg=${it()}&envRef=${st()}&orgRef=${lt()}`,
|
|
369
369
|
e,
|
|
370
370
|
{
|
|
371
371
|
headers: {
|
|
@@ -389,7 +389,7 @@ const Nr = ({
|
|
|
389
389
|
const { serverUrl: r, basePath: o } = St(), n = `${r}`;
|
|
390
390
|
try {
|
|
391
391
|
const l = await E.get(
|
|
392
|
-
`${n}${o}/basket/${t}?baseUrl=${
|
|
392
|
+
`${n}${o}/basket/${t}?baseUrl=${tt()}&siteId=${K()}&pubCfg=${it()}&envRef=${st()}&orgRef=${lt()}`,
|
|
393
393
|
{
|
|
394
394
|
headers: {
|
|
395
395
|
"Content-Type": "application/json",
|
|
@@ -420,15 +420,15 @@ const at = (t) => {
|
|
|
420
420
|
console.error("Error storing token:", e);
|
|
421
421
|
}
|
|
422
422
|
}, Ie = 300, Pr = ({ addToCartPwa: t }) => {
|
|
423
|
-
var s, y, v, C, _,
|
|
424
|
-
const e = Le(), r = Rt((
|
|
425
|
-
if (
|
|
423
|
+
var s, y, v, C, _, P;
|
|
424
|
+
const e = Le(), r = Rt((O) => O.product.product), o = Rt((O) => O.store.store), [n, c] = z(!!r);
|
|
425
|
+
if (j(() => {
|
|
426
426
|
c(!!r);
|
|
427
427
|
}, [r]), !r) return null;
|
|
428
428
|
const l = async () => {
|
|
429
|
-
var
|
|
429
|
+
var O, $, q, _t, ct, M, dt, Ct, zt, et, It, Ft, ut, At, jt, J;
|
|
430
430
|
try {
|
|
431
|
-
if (!((
|
|
431
|
+
if (!(($ = (O = r == null ? void 0 : r.variants) == null ? void 0 : O[0]) != null && $.product_id) && !(r.type.item || r.type.bundle) && !((_t = (q = r == null ? void 0 : r.variants) == null ? void 0 : q[0]) != null && _t.productId)) {
|
|
432
432
|
U.error("Variants not available", {
|
|
433
433
|
position: "bottom-right",
|
|
434
434
|
autoClose: 1e3
|
|
@@ -437,31 +437,31 @@ const at = (t) => {
|
|
|
437
437
|
}
|
|
438
438
|
const b = [
|
|
439
439
|
{
|
|
440
|
-
product_id: ((ct = r.variants) == null ? void 0 : ct[0].product_id) || ((
|
|
440
|
+
product_id: ((ct = r.variants) == null ? void 0 : ct[0].product_id) || ((M = r.variants) == null ? void 0 : M[0].productId) || (r == null ? void 0 : r.id),
|
|
441
441
|
quantity: 1
|
|
442
442
|
}
|
|
443
443
|
], rt = JSON.parse(
|
|
444
444
|
sessionStorage.getItem("customerData") || "{}"
|
|
445
445
|
), k = (rt == null ? void 0 : rt.basketId) || localStorage.getItem(Yt), Wt = !1, Dt = localStorage.getItem(Ot), Lt = Date.now();
|
|
446
446
|
if (!Wt || !Dt || Lt >= parseInt(Dt)) {
|
|
447
|
-
let
|
|
448
|
-
if (
|
|
447
|
+
let H = "";
|
|
448
|
+
if (H = "Bearer " + (await $t()).access_token, !H) {
|
|
449
449
|
console.error("Failed to get customer_token");
|
|
450
450
|
return;
|
|
451
451
|
}
|
|
452
452
|
const ot = Lt + 300 * 1e3;
|
|
453
|
-
if (Kt(
|
|
453
|
+
if (Kt(H), localStorage.setItem(Ot, ot.toString()), k) {
|
|
454
454
|
const Nt = await Ke({
|
|
455
455
|
basketId: k,
|
|
456
|
-
customer_token:
|
|
456
|
+
customer_token: H
|
|
457
457
|
});
|
|
458
458
|
if (Nt.status === 200 && Nt) {
|
|
459
|
-
const
|
|
459
|
+
const G = await ae(
|
|
460
460
|
k,
|
|
461
461
|
b,
|
|
462
|
-
|
|
462
|
+
H
|
|
463
463
|
);
|
|
464
|
-
(((dt =
|
|
464
|
+
(((dt = G == null ? void 0 : G.product_items) == null ? void 0 : dt.length) > 0 || ((Ct = G == null ? void 0 : G.productItems) == null ? void 0 : Ct.length) > 0) && (U.success("Added to cart", {
|
|
465
465
|
position: "bottom-right",
|
|
466
466
|
autoClose: 3e3,
|
|
467
467
|
hideProgressBar: !1,
|
|
@@ -479,7 +479,7 @@ const at = (t) => {
|
|
|
479
479
|
quantity: 1
|
|
480
480
|
}
|
|
481
481
|
]
|
|
482
|
-
}, S = await Ye(
|
|
482
|
+
}, S = await Ye(H, pt);
|
|
483
483
|
if (!(S != null && S.basket_id) && !(S != null && S.basketId)) {
|
|
484
484
|
console.error("Failed to create basket");
|
|
485
485
|
return;
|
|
@@ -487,12 +487,12 @@ const at = (t) => {
|
|
|
487
487
|
at(
|
|
488
488
|
(S == null ? void 0 : S.basket_id) || (S == null ? void 0 : S.basketId)
|
|
489
489
|
), console.log("adding product to basket");
|
|
490
|
-
const
|
|
490
|
+
const W = await ae(
|
|
491
491
|
(S == null ? void 0 : S.basket_id) || (S == null ? void 0 : S.basketId),
|
|
492
492
|
b,
|
|
493
|
-
|
|
493
|
+
H
|
|
494
494
|
);
|
|
495
|
-
console.log("object added to basket"), (((It =
|
|
495
|
+
console.log("object added to basket"), (((It = W == null ? void 0 : W.product_items) == null ? void 0 : It.length) > 0 || ((Ft = W == null ? void 0 : W.productItems) == null ? void 0 : Ft.length) > 0) && U.success("Added to cart", {
|
|
496
496
|
position: "bottom-right",
|
|
497
497
|
autoClose: 3e3,
|
|
498
498
|
hideProgressBar: !1,
|
|
@@ -506,7 +506,7 @@ const at = (t) => {
|
|
|
506
506
|
position: "bottom-right",
|
|
507
507
|
autoClose: 3e3
|
|
508
508
|
}), ((ut = b == null ? void 0 : b.response) == null ? void 0 : ut.status) === 404 || // Basket not found
|
|
509
|
-
((At = b == null ? void 0 : b.response) == null ? void 0 : At.status) === 401 ? (((jt = b == null ? void 0 : b.response) == null ? void 0 : jt.status) === 404 && at(null), ((
|
|
509
|
+
((At = b == null ? void 0 : b.response) == null ? void 0 : At.status) === 401 ? (((jt = b == null ? void 0 : b.response) == null ? void 0 : jt.status) === 404 && at(null), ((J = b == null ? void 0 : b.response) == null ? void 0 : J.status) === 401 && (at(null), Kt(null))) : (console.error("Failed to add product to basket:", b.message), U.error("Failed to add product to cart", {
|
|
510
510
|
position: "bottom-right",
|
|
511
511
|
autoClose: 3e3
|
|
512
512
|
}));
|
|
@@ -533,7 +533,7 @@ const at = (t) => {
|
|
|
533
533
|
${n ? "translate-y-0 md:translate-y-0 md:translate-x-0 opacity-100" : "translate-y-full md:translate-y-0 md:translate-x-full opacity-0 pointer-events-none"}
|
|
534
534
|
`,
|
|
535
535
|
style: { willChange: "transform, opacity" },
|
|
536
|
-
onClick: (
|
|
536
|
+
onClick: (O) => O.stopPropagation(),
|
|
537
537
|
children: [
|
|
538
538
|
/* @__PURE__ */ u("div", { className: "mt-3 flex flex-row justify-between w-full ", children: [
|
|
539
539
|
/* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("p", { className: "text-[#000000] font-bold font-nunitoSans", children: r.name }) }),
|
|
@@ -561,14 +561,14 @@ const at = (t) => {
|
|
|
561
561
|
}
|
|
562
562
|
) }),
|
|
563
563
|
/* @__PURE__ */ a("div", { className: "flex flex-col items-center gap-2", children: r.imageGroups.slice(1, 2).map(
|
|
564
|
-
(
|
|
564
|
+
(O) => O.images.slice(1, 2).map(($) => /* @__PURE__ */ a(
|
|
565
565
|
"img",
|
|
566
566
|
{
|
|
567
|
-
src:
|
|
567
|
+
src: $.link,
|
|
568
568
|
alt: r.name,
|
|
569
569
|
className: "rounded-[10px] w-[60px] h-[60px]"
|
|
570
570
|
},
|
|
571
|
-
|
|
571
|
+
$.link
|
|
572
572
|
))
|
|
573
573
|
) })
|
|
574
574
|
] }),
|
|
@@ -611,12 +611,12 @@ const at = (t) => {
|
|
|
611
611
|
] }),
|
|
612
612
|
/* @__PURE__ */ a("div", { className: "text-[#323135] font-semibold text-sm", children: "Overall Rating" }),
|
|
613
613
|
/* @__PURE__ */ u("div", { className: "text-[#68656E] font-semibold text-sm", children: [
|
|
614
|
-
((
|
|
614
|
+
((P = r == null ? void 0 : r.rating) == null ? void 0 : P.count) || 0,
|
|
615
615
|
" ratings"
|
|
616
616
|
] })
|
|
617
617
|
] }) }),
|
|
618
|
-
/* @__PURE__ */ a("div", { className: "mt-2 flex flex-row items-center gap-2", children: Array.from({ length: 5 }).map((
|
|
619
|
-
var
|
|
618
|
+
/* @__PURE__ */ a("div", { className: "mt-2 flex flex-row items-center gap-2", children: Array.from({ length: 5 }).map((O, $) => {
|
|
619
|
+
var q;
|
|
620
620
|
return /* @__PURE__ */ a(
|
|
621
621
|
xe,
|
|
622
622
|
{
|
|
@@ -624,10 +624,10 @@ const at = (t) => {
|
|
|
624
624
|
width: "20",
|
|
625
625
|
height: "20",
|
|
626
626
|
className: `text-yellow-500
|
|
627
|
-
${((
|
|
627
|
+
${((q = r == null ? void 0 : r.rating) == null ? void 0 : q.rate) > $ ? "text-yellow-500" : "text-gray-300"}
|
|
628
628
|
`
|
|
629
629
|
},
|
|
630
|
-
|
|
630
|
+
$
|
|
631
631
|
);
|
|
632
632
|
}) })
|
|
633
633
|
] }),
|
|
@@ -681,13 +681,13 @@ 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), s = xt(null), [y, v] =
|
|
684
|
+
}, c = xt(null), l = xt(null), d = xt(null), s = xt(null), [y, v] = z(null), C = xt(null), [_, P] = z(!1), [O, $] = z(!1), [q, _t] = z(!1), [ct, M] = z(!1), [dt, Ct] = z(!1), [zt, et] = z(!1), [It, Ft] = z(""), [ut, At] = z(""), jt = (i) => ({
|
|
685
685
|
id: i.id,
|
|
686
686
|
title: i.name,
|
|
687
687
|
image: i.image ?? "",
|
|
688
688
|
price: i.price ?? 0
|
|
689
|
-
}), [
|
|
690
|
-
|
|
689
|
+
}), [J, b] = z([]), rt = xt(null), k = Rt((i) => i.store.store), Wt = Rt((i) => i.product.product);
|
|
690
|
+
j(() => {
|
|
691
691
|
const i = localStorage.getItem(
|
|
692
692
|
`access_token_${t.siteId}`
|
|
693
693
|
), h = localStorage.getItem(
|
|
@@ -701,27 +701,27 @@ const at = (t) => {
|
|
|
701
701
|
`chat-token-${t.siteId}`,
|
|
702
702
|
i || ""
|
|
703
703
|
);
|
|
704
|
-
}, []),
|
|
705
|
-
localStorage.setItem("chatHistory", JSON.stringify(
|
|
704
|
+
}, []), j(() => {
|
|
705
|
+
localStorage.setItem("chatHistory", JSON.stringify(J));
|
|
706
706
|
const i = localStorage.getItem(
|
|
707
707
|
`access_token_${t.siteId}`
|
|
708
708
|
);
|
|
709
709
|
i && localStorage.setItem(`chat-token-${t.siteId}`, i);
|
|
710
|
-
}, [
|
|
710
|
+
}, [J]);
|
|
711
711
|
const Dt = () => {
|
|
712
|
-
_t(!0), setTimeout(() =>
|
|
712
|
+
_t(!0), setTimeout(() => $(!0), 10);
|
|
713
713
|
}, Lt = () => {
|
|
714
|
-
|
|
714
|
+
$(!1), setTimeout(() => _t(!1), 300);
|
|
715
715
|
};
|
|
716
|
-
|
|
716
|
+
j(() => {
|
|
717
717
|
_ ? Dt() : Lt();
|
|
718
718
|
}, [_]);
|
|
719
|
-
const
|
|
719
|
+
const H = (i) => {
|
|
720
720
|
At(n[i]);
|
|
721
721
|
};
|
|
722
|
-
|
|
722
|
+
j(() => {
|
|
723
723
|
rt.current && (rt.current.scrollTop += 150);
|
|
724
|
-
}, [
|
|
724
|
+
}, [J]);
|
|
725
725
|
let ot = null, pt = null;
|
|
726
726
|
const S = async () => {
|
|
727
727
|
if (ot && pt && Date.now() < pt)
|
|
@@ -750,17 +750,17 @@ const at = (t) => {
|
|
|
750
750
|
} catch (i) {
|
|
751
751
|
return console.error("Error obtaining JWT token:", i), ot = null, pt = null, null;
|
|
752
752
|
}
|
|
753
|
-
},
|
|
753
|
+
}, W = async () => {
|
|
754
754
|
const i = await $t();
|
|
755
755
|
i != null && v(i);
|
|
756
756
|
};
|
|
757
|
-
|
|
757
|
+
j(() => {
|
|
758
758
|
if (t != null && t.siteId) {
|
|
759
759
|
const { clientID: i, host: h, organizationID: m, shortCode: g, siteId: p } = t;
|
|
760
760
|
sessionStorage.setItem("Host", h), sessionStorage.setItem("SiteId", p), sessionStorage.setItem("pubCfg", btoa(i)), sessionStorage.setItem("envRef", g), sessionStorage.setItem("orgRef", m);
|
|
761
761
|
}
|
|
762
|
-
|
|
763
|
-
}, []),
|
|
762
|
+
W(), console.log("scapi environment v1");
|
|
763
|
+
}, []), j(() => {
|
|
764
764
|
e && (console.log("setting the basket id", e), at(e));
|
|
765
765
|
}, [e]);
|
|
766
766
|
const Nt = async () => {
|
|
@@ -768,14 +768,14 @@ const at = (t) => {
|
|
|
768
768
|
sessionStorage.getItem("customerData") || "{}"
|
|
769
769
|
).customerId;
|
|
770
770
|
return (await _r(i || "")).c_interests;
|
|
771
|
-
},
|
|
771
|
+
}, G = async (i, h) => {
|
|
772
772
|
console.log("in secondary flow", Et);
|
|
773
773
|
const m = await Nt();
|
|
774
774
|
if (console.log(m, "interests of customer", Et), !!m)
|
|
775
775
|
try {
|
|
776
776
|
b(
|
|
777
|
-
(
|
|
778
|
-
(
|
|
777
|
+
(B) => B.map(
|
|
778
|
+
(R, V) => V === B.length - 1 ? { ...R, secondaryLoading: !0 } : R
|
|
779
779
|
)
|
|
780
780
|
);
|
|
781
781
|
const g = await S();
|
|
@@ -792,7 +792,7 @@ const at = (t) => {
|
|
|
792
792
|
productPoints: String(h || 0),
|
|
793
793
|
interests: m
|
|
794
794
|
}
|
|
795
|
-
}),
|
|
795
|
+
}), D = await fetch(ft, {
|
|
796
796
|
signal: AbortSignal.timeout(3e4),
|
|
797
797
|
method: "POST",
|
|
798
798
|
headers: {
|
|
@@ -801,36 +801,36 @@ const at = (t) => {
|
|
|
801
801
|
},
|
|
802
802
|
body: mt
|
|
803
803
|
});
|
|
804
|
-
if (!
|
|
805
|
-
const ht =
|
|
806
|
-
let
|
|
804
|
+
if (!D.body) throw new Error("Readable stream not supported");
|
|
805
|
+
const ht = D.body.getReader(), wt = new TextDecoder();
|
|
806
|
+
let L = "";
|
|
807
807
|
for (; ; ) {
|
|
808
|
-
const { done:
|
|
809
|
-
if (
|
|
810
|
-
|
|
811
|
-
const
|
|
808
|
+
const { done: B, value: R } = await ht.read();
|
|
809
|
+
if (B) break;
|
|
810
|
+
L += wt.decode(R, { stream: !0 });
|
|
811
|
+
const V = L.split(`
|
|
812
812
|
`);
|
|
813
|
-
|
|
814
|
-
for (const
|
|
815
|
-
if (
|
|
816
|
-
const f =
|
|
813
|
+
L = V.pop() || "";
|
|
814
|
+
for (const X of V)
|
|
815
|
+
if (X.startsWith("data:")) {
|
|
816
|
+
const f = X.slice(5).trim();
|
|
817
817
|
try {
|
|
818
|
-
const
|
|
819
|
-
|
|
818
|
+
const Y = JSON.parse(f);
|
|
819
|
+
Y.index === 0 && b(
|
|
820
820
|
(I) => I.map(
|
|
821
|
-
(
|
|
822
|
-
...
|
|
823
|
-
secondaryResponse:
|
|
821
|
+
(T, Q) => Q === I.length - 1 ? {
|
|
822
|
+
...T,
|
|
823
|
+
secondaryResponse: Y.data,
|
|
824
824
|
secondaryLoading: !1
|
|
825
|
-
} :
|
|
825
|
+
} : T
|
|
826
826
|
)
|
|
827
827
|
);
|
|
828
|
-
} catch (
|
|
828
|
+
} catch (Y) {
|
|
829
829
|
b(
|
|
830
830
|
(I) => I.map(
|
|
831
|
-
(
|
|
831
|
+
(T, Q) => Q === I.length - 1 ? { ...T, secondaryLoading: !1 } : T
|
|
832
832
|
)
|
|
833
|
-
), console.error("Secondary flow JSON parse error:",
|
|
833
|
+
), console.error("Secondary flow JSON parse error:", Y);
|
|
834
834
|
}
|
|
835
835
|
}
|
|
836
836
|
}
|
|
@@ -864,7 +864,7 @@ const at = (t) => {
|
|
|
864
864
|
userPrompt: h,
|
|
865
865
|
whom: m
|
|
866
866
|
}
|
|
867
|
-
}),
|
|
867
|
+
}), D = await fetch(ft, {
|
|
868
868
|
signal: AbortSignal.timeout(3e4),
|
|
869
869
|
method: "POST",
|
|
870
870
|
headers: {
|
|
@@ -873,30 +873,30 @@ const at = (t) => {
|
|
|
873
873
|
},
|
|
874
874
|
body: mt
|
|
875
875
|
});
|
|
876
|
-
if (!
|
|
877
|
-
throw new Error(`HTTP error! status: ${
|
|
878
|
-
if (!
|
|
879
|
-
const ht =
|
|
880
|
-
let
|
|
876
|
+
if (!D.ok)
|
|
877
|
+
throw new Error(`HTTP error! status: ${D.status}`);
|
|
878
|
+
if (!D.body) throw new Error("Readable stream not supported");
|
|
879
|
+
const ht = D.body.getReader(), wt = new TextDecoder();
|
|
880
|
+
let L = "", B = "";
|
|
881
881
|
for (; ; ) {
|
|
882
882
|
et(!0);
|
|
883
|
-
const { done:
|
|
884
|
-
if (
|
|
885
|
-
|
|
886
|
-
const
|
|
883
|
+
const { done: R, value: V } = await ht.read();
|
|
884
|
+
if (R) break;
|
|
885
|
+
L += wt.decode(V, { stream: !0 });
|
|
886
|
+
const X = L.split(`
|
|
887
887
|
`);
|
|
888
|
-
|
|
889
|
-
for (const f of
|
|
888
|
+
L = X.pop() || "";
|
|
889
|
+
for (const f of X)
|
|
890
890
|
if (f.startsWith("data:")) {
|
|
891
|
-
const
|
|
891
|
+
const Y = f.slice(5).trim();
|
|
892
892
|
try {
|
|
893
|
-
const I = JSON.parse(
|
|
894
|
-
I.index == 1 && (
|
|
895
|
-
(
|
|
896
|
-
(
|
|
897
|
-
...
|
|
893
|
+
const I = JSON.parse(Y);
|
|
894
|
+
I.index == 1 && (B = I.data), b(
|
|
895
|
+
(T) => T.map(
|
|
896
|
+
(Q, Bt) => Bt === T.length - 1 ? {
|
|
897
|
+
...Q,
|
|
898
898
|
[I.index == 0 ? "response" : I.index == 1 ? "keywords" : I.index == 2 ? "potentialQuestions" : "end"]: I.data
|
|
899
|
-
} :
|
|
899
|
+
} : Q
|
|
900
900
|
)
|
|
901
901
|
);
|
|
902
902
|
} catch (I) {
|
|
@@ -904,7 +904,7 @@ const at = (t) => {
|
|
|
904
904
|
}
|
|
905
905
|
}
|
|
906
906
|
}
|
|
907
|
-
nr(or(
|
|
907
|
+
nr(or(B));
|
|
908
908
|
} catch (m) {
|
|
909
909
|
console.error("Error sending message to Tanya:", m);
|
|
910
910
|
} finally {
|
|
@@ -914,7 +914,7 @@ const at = (t) => {
|
|
|
914
914
|
}, or = (i) => {
|
|
915
915
|
const h = i.match(
|
|
916
916
|
/top five relevant product or category names are: (.*)/i
|
|
917
|
-
), p = (h ? h[1] : i).split(", ").map((
|
|
917
|
+
), p = (h ? h[1] : i).split(", ").map((A) => A.replace(/\s*(Toys|Bags|Miniature|etc\.*)\s*/gi, "").trim());
|
|
918
918
|
return [...new Set(p)].filter(Boolean).join(",");
|
|
919
919
|
}, nr = async (i) => {
|
|
920
920
|
if (typeof i == "string") {
|
|
@@ -924,7 +924,7 @@ const at = (t) => {
|
|
|
924
924
|
const g = await ye(m);
|
|
925
925
|
if (et(!1), (g == null ? void 0 : g.length) > 0 && (b(
|
|
926
926
|
(p) => p.map(
|
|
927
|
-
(w,
|
|
927
|
+
(w, A) => A === p.length - 1 ? {
|
|
928
928
|
...w,
|
|
929
929
|
products: [
|
|
930
930
|
...w.products || [],
|
|
@@ -973,32 +973,32 @@ const at = (t) => {
|
|
|
973
973
|
const h = JSON.parse(
|
|
974
974
|
sessionStorage.getItem("customerData") || "{}"
|
|
975
975
|
);
|
|
976
|
-
(h == null ? void 0 : h.isGuest) == !1 ? (console.log("running secondary flow", Et),
|
|
976
|
+
(h == null ? void 0 : h.isGuest) == !1 ? (console.log("running secondary flow", Et), G(c.current, 0)) : console.log("not running secondary flow", Et);
|
|
977
977
|
}
|
|
978
978
|
et(!1);
|
|
979
979
|
}, ar = async (i, h) => {
|
|
980
|
-
var m, g, p, w,
|
|
981
|
-
|
|
980
|
+
var m, g, p, w, A, ft, mt, D, ht, wt, L, B, R, V, X;
|
|
981
|
+
M(!0);
|
|
982
982
|
try {
|
|
983
983
|
const f = await Ve(i.id);
|
|
984
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
|
+
M(!1), U.error("Variants not found", {
|
|
986
986
|
position: "bottom-right",
|
|
987
987
|
autoClose: 1e3
|
|
988
988
|
}), console.error("No product variant found");
|
|
989
989
|
return;
|
|
990
990
|
}
|
|
991
|
-
const
|
|
991
|
+
const Y = [
|
|
992
992
|
{
|
|
993
|
-
product_id: ((
|
|
993
|
+
product_id: ((A = f.variants) == null ? void 0 : A[0].product_id) || ((ft = f.variants) == null ? void 0 : ft[0].productId) || (f == null ? void 0 : f.id),
|
|
994
994
|
quantity: h
|
|
995
995
|
}
|
|
996
996
|
];
|
|
997
|
-
console.log(
|
|
997
|
+
console.log(Y, "product data", "app version", Et);
|
|
998
998
|
const I = JSON.parse(
|
|
999
999
|
sessionStorage.getItem("customerData") || "{}"
|
|
1000
|
-
),
|
|
1001
|
-
if (!
|
|
1000
|
+
), T = (I == null ? void 0 : I.basketId) || localStorage.getItem(Yt), Q = !1, Bt = localStorage.getItem(Ot), ge = Date.now();
|
|
1001
|
+
if (!Q || !Bt || ge >= parseInt(Bt)) {
|
|
1002
1002
|
const ir = await He();
|
|
1003
1003
|
let { customer_token: gt } = await Re(
|
|
1004
1004
|
ir
|
|
@@ -1008,15 +1008,15 @@ const at = (t) => {
|
|
|
1008
1008
|
return;
|
|
1009
1009
|
}
|
|
1010
1010
|
const sr = ge + 300 * 1e3;
|
|
1011
|
-
if (Kt(gt), localStorage.setItem(Ot, sr.toString()), console.log(
|
|
1011
|
+
if (Kt(gt), localStorage.setItem(Ot, sr.toString()), console.log(T, "basketIdFromCustomer"), T) {
|
|
1012
1012
|
const be = await Ke({
|
|
1013
|
-
basketId:
|
|
1013
|
+
basketId: T,
|
|
1014
1014
|
customer_token: gt
|
|
1015
1015
|
});
|
|
1016
1016
|
if (be.status === 200 && be) {
|
|
1017
1017
|
const Xt = await ae(
|
|
1018
|
-
|
|
1019
|
-
|
|
1018
|
+
T,
|
|
1019
|
+
Y,
|
|
1020
1020
|
gt
|
|
1021
1021
|
);
|
|
1022
1022
|
((mt = Xt == null ? void 0 : Xt.product_items) == null ? void 0 : mt.length) > 0 && (U.success("Added to cart", {
|
|
@@ -1026,14 +1026,14 @@ const at = (t) => {
|
|
|
1026
1026
|
closeOnClick: !0,
|
|
1027
1027
|
pauseOnHover: !0,
|
|
1028
1028
|
draggable: !0
|
|
1029
|
-
}), Vt(
|
|
1029
|
+
}), Vt(T), M(!1));
|
|
1030
1030
|
return;
|
|
1031
1031
|
}
|
|
1032
1032
|
}
|
|
1033
1033
|
const lr = {
|
|
1034
1034
|
productItems: [
|
|
1035
1035
|
{
|
|
1036
|
-
productId: ((
|
|
1036
|
+
productId: ((D = f.variants) == null ? void 0 : D[0].product_id) || ((ht = f.variants) == null ? void 0 : ht[0].productId) || (f == null ? void 0 : f.id),
|
|
1037
1037
|
quantity: 1
|
|
1038
1038
|
}
|
|
1039
1039
|
]
|
|
@@ -1044,7 +1044,7 @@ const at = (t) => {
|
|
|
1044
1044
|
x == null ? void 0 : x.basketId,
|
|
1045
1045
|
"the basket response"
|
|
1046
1046
|
), !(x != null && x.basket_id || !(x != null && x.basketId))) {
|
|
1047
|
-
|
|
1047
|
+
M(!1), console.error("Failed to create basket");
|
|
1048
1048
|
return;
|
|
1049
1049
|
}
|
|
1050
1050
|
at(
|
|
@@ -1057,7 +1057,7 @@ const at = (t) => {
|
|
|
1057
1057
|
},
|
|
1058
1058
|
(x == null ? void 0 : x.basket_id) || (x == null ? void 0 : x.basketId)
|
|
1059
1059
|
);
|
|
1060
|
-
(((wt = bt == null ? void 0 : bt.product_items) == null ? void 0 : wt.length) > 0 || ((
|
|
1060
|
+
(((wt = bt == null ? void 0 : bt.product_items) == null ? void 0 : wt.length) > 0 || ((L = bt == null ? void 0 : bt.productItems) == null ? void 0 : L.length) > 0) && U.success("Added to cart", {
|
|
1061
1061
|
position: "bottom-right",
|
|
1062
1062
|
autoClose: 3e3,
|
|
1063
1063
|
hideProgressBar: !1,
|
|
@@ -1067,24 +1067,26 @@ const at = (t) => {
|
|
|
1067
1067
|
}), Vt(x.basket_id || (x == null ? void 0 : x.basketId));
|
|
1068
1068
|
}
|
|
1069
1069
|
} catch (f) {
|
|
1070
|
-
|
|
1070
|
+
M(!1), console.error("Error adding to cart:", f), U.error("Failed to add product to cart", {
|
|
1071
1071
|
position: "bottom-right",
|
|
1072
1072
|
autoClose: 3e3
|
|
1073
|
-
}), ((
|
|
1074
|
-
((
|
|
1073
|
+
}), ((B = f == null ? void 0 : f.response) == null ? void 0 : B.status) === 404 || // Basket not found
|
|
1074
|
+
((R = f == null ? void 0 : f.response) == null ? void 0 : R.status) === 401 ? (((V = f == null ? void 0 : f.response) == null ? void 0 : V.status) === 404 && at(null), ((X = f == null ? void 0 : f.response) == null ? void 0 : X.status) === 401 && (at(null), Kt(null))) : (console.error("Failed to add product to basket:", f.message), U.error("Failed to add product to cart", {
|
|
1075
1075
|
position: "bottom-right",
|
|
1076
1076
|
autoClose: 3e3
|
|
1077
1077
|
}));
|
|
1078
1078
|
}
|
|
1079
|
-
|
|
1079
|
+
M(!1);
|
|
1080
1080
|
};
|
|
1081
|
-
return
|
|
1081
|
+
return j(() => {
|
|
1082
1082
|
C.current && C.current.scrollIntoView({ behavior: "smooth" });
|
|
1083
|
-
}, [C.current]),
|
|
1083
|
+
}, [C.current]), j(() => {
|
|
1084
|
+
q ? setTimeout(() => $(!0), 10) : $(!1);
|
|
1085
|
+
}, [q]), /* @__PURE__ */ a("div", { className: "relative flex justify-center", children: /* @__PURE__ */ u(kr, { open: _, onOpenChange: P, children: [
|
|
1084
1086
|
/* @__PURE__ */ a(
|
|
1085
1087
|
Sr,
|
|
1086
1088
|
{
|
|
1087
|
-
onClick: () =>
|
|
1089
|
+
onClick: () => P(!0),
|
|
1088
1090
|
style: {
|
|
1089
1091
|
// background: storeDetails.tanyaThemeColor,
|
|
1090
1092
|
},
|
|
@@ -1144,12 +1146,12 @@ const at = (t) => {
|
|
|
1144
1146
|
) })
|
|
1145
1147
|
}
|
|
1146
1148
|
),
|
|
1147
|
-
|
|
1149
|
+
q && /* @__PURE__ */ u(oe, { children: [
|
|
1148
1150
|
/* @__PURE__ */ a(
|
|
1149
1151
|
"div",
|
|
1150
1152
|
{
|
|
1151
1153
|
className: "fixed inset-0 z-40 bg-black/30",
|
|
1152
|
-
onClick: () =>
|
|
1154
|
+
onClick: () => P(!1)
|
|
1153
1155
|
}
|
|
1154
1156
|
),
|
|
1155
1157
|
/* @__PURE__ */ u(
|
|
@@ -1160,15 +1162,14 @@ const at = (t) => {
|
|
|
1160
1162
|
top-0 right-0
|
|
1161
1163
|
transition-transform duration-300 ease-in-out
|
|
1162
1164
|
lg:transform
|
|
1163
|
-
${
|
|
1164
|
-
// For mobile: animate from bottom
|
|
1165
|
-
${T ? "translate-y-0" : "translate-y-full"}
|
|
1165
|
+
${O ? "lg:translate-x-0 translate-y-0" : "lg:translate-x-full translate-y-full"}
|
|
1166
1166
|
lg:translate-y-0
|
|
1167
1167
|
`,
|
|
1168
1168
|
style: {
|
|
1169
1169
|
background: "linear-gradient(170.1deg, #FFFFFF 60.03%, #E3DEEF 99.59%)"
|
|
1170
1170
|
},
|
|
1171
1171
|
children: [
|
|
1172
|
+
"header",
|
|
1172
1173
|
/* @__PURE__ */ u(
|
|
1173
1174
|
"div",
|
|
1174
1175
|
{
|
|
@@ -1239,7 +1240,7 @@ const at = (t) => {
|
|
|
1239
1240
|
gap: "1.25rem",
|
|
1240
1241
|
margin: "0.75rem"
|
|
1241
1242
|
},
|
|
1242
|
-
children: /* @__PURE__ */ a("button", { onClick: () =>
|
|
1243
|
+
children: /* @__PURE__ */ a("button", { onClick: () => P(!1), children: /* @__PURE__ */ u(
|
|
1243
1244
|
"svg",
|
|
1244
1245
|
{
|
|
1245
1246
|
width: "24",
|
|
@@ -1308,7 +1309,7 @@ const at = (t) => {
|
|
|
1308
1309
|
/* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2 mt-2", children: o.map((i) => /* @__PURE__ */ a(
|
|
1309
1310
|
"button",
|
|
1310
1311
|
{
|
|
1311
|
-
onClick: () =>
|
|
1312
|
+
onClick: () => H(i),
|
|
1312
1313
|
className: "px-2 py-2 font-semibold text-xs text-[#18181B] bg-[#F3F3F3] rounded-2xl",
|
|
1313
1314
|
style: {
|
|
1314
1315
|
backgroundColor: ut === n[i] ? "#FFFFFF" : "#F3F3F3",
|
|
@@ -1321,14 +1322,14 @@ const at = (t) => {
|
|
|
1321
1322
|
]
|
|
1322
1323
|
}
|
|
1323
1324
|
),
|
|
1324
|
-
|
|
1325
|
+
J.map((i, h) => {
|
|
1325
1326
|
var m, g;
|
|
1326
1327
|
return /* @__PURE__ */ u("div", { children: [
|
|
1327
1328
|
/* @__PURE__ */ a(
|
|
1328
1329
|
"div",
|
|
1329
1330
|
{
|
|
1330
1331
|
className: "flex justify-end",
|
|
1331
|
-
ref: h ==
|
|
1332
|
+
ref: h == J.length - 1 ? C : null,
|
|
1332
1333
|
children: /* @__PURE__ */ a("p", { className: "text-sm font-nunitoSans font-bold text-[#000000] bg-[#E2DBFF] border border-[#C9C2DE] rounded-l-xl p-2 m-3 mb-4 rounded-br-xl max-w-[75%]", children: i.query })
|
|
1333
1334
|
}
|
|
1334
1335
|
),
|
|
@@ -1482,7 +1483,7 @@ const at = (t) => {
|
|
|
1482
1483
|
className: "px-3 py-1 text-sm",
|
|
1483
1484
|
onClick: () => b(
|
|
1484
1485
|
(p) => p.map(
|
|
1485
|
-
(w,
|
|
1486
|
+
(w, A) => A === h && w.productSnapshot ? {
|
|
1486
1487
|
...w,
|
|
1487
1488
|
productSnapshot: {
|
|
1488
1489
|
...w.productSnapshot,
|
|
@@ -1508,7 +1509,7 @@ const at = (t) => {
|
|
|
1508
1509
|
className: "px-3 py-1 text-sm",
|
|
1509
1510
|
onClick: () => b(
|
|
1510
1511
|
(p) => p.map(
|
|
1511
|
-
(w,
|
|
1512
|
+
(w, A) => A === h && w.productSnapshot ? {
|
|
1512
1513
|
...w,
|
|
1513
1514
|
productSnapshot: {
|
|
1514
1515
|
...w.productSnapshot,
|
|
@@ -1644,14 +1645,14 @@ function $r(t, e) {
|
|
|
1644
1645
|
}
|
|
1645
1646
|
t.prototype = e === null ? Object.create(e) : (r.prototype = e.prototype, new r());
|
|
1646
1647
|
}
|
|
1647
|
-
var
|
|
1648
|
-
return
|
|
1648
|
+
var Z = function() {
|
|
1649
|
+
return Z = Object.assign || function(e) {
|
|
1649
1650
|
for (var r, o = 1, n = arguments.length; o < n; o++) {
|
|
1650
1651
|
r = arguments[o];
|
|
1651
1652
|
for (var c in r) Object.prototype.hasOwnProperty.call(r, c) && (e[c] = r[c]);
|
|
1652
1653
|
}
|
|
1653
1654
|
return e;
|
|
1654
|
-
},
|
|
1655
|
+
}, Z.apply(this, arguments);
|
|
1655
1656
|
};
|
|
1656
1657
|
function zr(t, e) {
|
|
1657
1658
|
var r = {};
|
|
@@ -2150,8 +2151,8 @@ var Jr = /* @__PURE__ */ (function() {
|
|
|
2150
2151
|
if (d = !0, !_ || l)
|
|
2151
2152
|
try {
|
|
2152
2153
|
y = o(y, C);
|
|
2153
|
-
} catch (
|
|
2154
|
-
return v.error(
|
|
2154
|
+
} catch (P) {
|
|
2155
|
+
return v.error(P);
|
|
2155
2156
|
}
|
|
2156
2157
|
else
|
|
2157
2158
|
y = C;
|
|
@@ -2173,11 +2174,11 @@ var Jr = /* @__PURE__ */ (function() {
|
|
|
2173
2174
|
var y, v = 0;
|
|
2174
2175
|
function C(_) {
|
|
2175
2176
|
y = _.subscribe({
|
|
2176
|
-
next: function(
|
|
2177
|
-
s.next(
|
|
2177
|
+
next: function(P) {
|
|
2178
|
+
s.next(P);
|
|
2178
2179
|
},
|
|
2179
|
-
error: function(
|
|
2180
|
-
s.error(
|
|
2180
|
+
error: function(P) {
|
|
2181
|
+
s.error(P);
|
|
2181
2182
|
},
|
|
2182
2183
|
complete: function() {
|
|
2183
2184
|
v === c.length ? (y = void 0, s.complete()) : C(d.from(c[v++]));
|
|
@@ -2332,10 +2333,10 @@ function Xr(t) {
|
|
|
2332
2333
|
return t;
|
|
2333
2334
|
}
|
|
2334
2335
|
function Qr(t, e) {
|
|
2335
|
-
var r =
|
|
2336
|
-
typeof c == "function" ? r =
|
|
2336
|
+
var r = Z({}, t), o = function(c) {
|
|
2337
|
+
typeof c == "function" ? r = Z(Z({}, r), c(r)) : r = Z(Z({}, r), c);
|
|
2337
2338
|
}, n = function() {
|
|
2338
|
-
return
|
|
2339
|
+
return Z({}, r);
|
|
2339
2340
|
};
|
|
2340
2341
|
return Object.defineProperty(e, "setContext", {
|
|
2341
2342
|
enumerable: !1,
|