tanya-chatbot 0.7.8 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tanya-chatbot.cjs.js +18 -11
- package/dist/tanya-chatbot.cjs.js.map +1 -1
- package/dist/tanya-chatbot.es.js +1171 -1048
- package/dist/tanya-chatbot.es.js.map +1 -1
- package/package.json +1 -1
package/dist/tanya-chatbot.es.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { useEffect as
|
|
2
|
-
import { jsx as a, jsxs as d, Fragment as
|
|
3
|
-
import { createHttpLink as
|
|
4
|
-
import { Provider as
|
|
5
|
-
import { createSlice as
|
|
6
|
-
import * as
|
|
1
|
+
import Rr, { useEffect as ke, useState as C, useRef as Be, forwardRef as In, createElement as cr, useMemo as Hr } from "react";
|
|
2
|
+
import { jsx as a, jsxs as d, Fragment as ve } from "react/jsx-runtime";
|
|
3
|
+
import { createHttpLink as Oo, ApolloClient as Ao, InMemoryCache as jo, ApolloProvider as $o } from "@apollo/client";
|
|
4
|
+
import { Provider as Lo, useDispatch as Fn, useSelector as Vt } from "react-redux";
|
|
5
|
+
import { createSlice as Pn, configureStore as Do } from "@reduxjs/toolkit";
|
|
6
|
+
import * as Tn from "@radix-ui/react-popover";
|
|
7
7
|
import "clsx";
|
|
8
8
|
import "tailwind-merge";
|
|
9
|
-
import
|
|
9
|
+
import xe from "axios";
|
|
10
10
|
import "crypto-js";
|
|
11
|
-
import { Icon as
|
|
12
|
-
import { toast as
|
|
13
|
-
import { createPortal as
|
|
14
|
-
const Mo = '*,: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}.visible{visibility:visible}.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}.m-\\[15px\\]{margin:15px}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.mx-auto{margin-left:auto;margin-right:auto}.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-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.mr-2{margin-right:.5rem}.mr-6{margin-right:1.5rem}.mt-0\\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.h-12{height:3rem}.h-20{height:5rem}.h-28{height:7rem}.h-3{height:.75rem}.h-6{height:1.5rem}.h-\\[120px\\]{height:120px}.h-\\[150px\\]{height:150px}.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-3\\/4{width:75%}.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-\\[64\\.7vw\\]{width:64.7vw}.w-\\[96\\%\\]{width:96%}.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%}.max-w-\\[90\\%\\]{max-width:90%}.max-w-md{max-width:28rem}.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-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.items-baseline{align-items:baseline}.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}.gap-y-2{row-gap:.5rem}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.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-bl-xl{border-bottom-left-radius:.75rem}.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-2{border-width:2px}.border-b-2{border-bottom-width:2px}.border-l-2{border-left-width:2px}.border-t{border-top-width:1px}.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))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / 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-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.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))}.bg-white\\/70{background-color:#ffffffb3}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-0\\.5{padding:.125rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\\[1px\\]{padding:1px}.px-1{padding-left:.25rem;padding-right:.25rem}.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-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.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-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pb-6{padding-bottom:1.5rem}.pl-2{padding-left:.5rem}.pr-5{padding-right:1.25rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.font-nunitoSans{font-family:Nunito Sans}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[14px\\]{font-size:14px}.text-\\[15px\\]{font-size:15px}.text-\\[16px\\]{font-size:16px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm,.text-sm\\/5{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.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-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / 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-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-green-900{--tw-text-opacity: 1;color:rgb(20 83 45 / var(--tw-text-opacity, 1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.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))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-95{opacity:.95}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px 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_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-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 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-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}.drop-shadow-xl{--tw-drop-shadow: drop-shadow(0 20px 13px rgb(0 0 0 / .03)) drop-shadow(0 8px 5px rgb(0 0 0 / .08));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)}.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{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.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-150{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-150{animation-duration:.15s}.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}}.placeholder\\:text-red-400::-moz-placeholder{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.placeholder\\:text-red-400::placeholder{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.hover\\:-translate-y-0\\.5:hover{--tw-translate-y: -.125rem;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\\: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\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\\:text-\\[\\#6952C7\\]:hover{--tw-text-opacity: 1;color:rgb(105 82 199 / var(--tw-text-opacity, 1))}.hover\\:opacity-90:hover{opacity:.9}.hover\\:shadow-lg:hover{--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)}.hover\\:shadow-sm:hover{--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)}.focus\\:border-transparent:focus{border-color:transparent}.focus\\:ring-0:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-gray-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity, 1))}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-gray-100:disabled{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.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\\:col-span-10{grid-column:span 10 / span 10}.sm\\:col-span-2{grid-column:span 2 / span 2}.sm\\:mx-0{margin-left:0;margin-right:0}.sm\\:w-\\[80vw\\]{width:80vw}.sm\\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.sm\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:flex-row{flex-direction:row}.sm\\:items-center{align-items:center}.sm\\:justify-start{justify-content:flex-start}}@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\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.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}}';
|
|
15
|
-
function
|
|
16
|
-
return
|
|
11
|
+
import { Icon as zo } from "@iconify/react";
|
|
12
|
+
import { toast as Ue } from "react-toastify";
|
|
13
|
+
import { createPortal as Mo } from "react-dom";
|
|
14
|
+
const Bo = '*,: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}.visible{visibility:visible}.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}.m-\\[15px\\]{margin:15px}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.mx-auto{margin-left:auto;margin-right:auto}.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-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.mr-2{margin-right:.5rem}.mr-6{margin-right:1.5rem}.mt-0\\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.h-10{height:2.5rem}.h-12{height:3rem}.h-20{height:5rem}.h-28{height:7rem}.h-3{height:.75rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-\\[120px\\]{height:120px}.h-\\[150px\\]{height:150px}.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-3\\/4{width:75%}.w-5\\/6{width:83.333333%}.w-6{width:1.5rem}.w-72{width:18rem}.w-8{width:2rem}.w-\\[100vw\\]{width:100vw}.w-\\[120px\\]{width:120px}.w-\\[150px\\]{width:150px}.w-\\[60px\\]{width:60px}.w-\\[64\\.7vw\\]{width:64.7vw}.w-\\[96\\%\\]{width:96%}.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%}.max-w-\\[90\\%\\]{max-width:90%}.max-w-md{max-width:28rem}.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-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.items-baseline{align-items:baseline}.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}.gap-y-2{row-gap:.5rem}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.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-bl-xl{border-bottom-left-radius:.75rem}.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-2{border-width:2px}.border-b-2{border-bottom-width:2px}.border-l-2{border-left-width:2px}.border-t{border-top-width:1px}.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-black{--tw-border-opacity: 1;border-color:rgb(0 0 0 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / 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-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.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))}.bg-white\\/70{background-color:#ffffffb3}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-0\\.5{padding:.125rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\\[1px\\]{padding:1px}.px-1{padding-left:.25rem;padding-right:.25rem}.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-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.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-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pb-6{padding-bottom:1.5rem}.pl-2{padding-left:.5rem}.pr-5{padding-right:1.25rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.font-nunitoSans{font-family:Nunito Sans}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[14px\\]{font-size:14px}.text-\\[15px\\]{font-size:15px}.text-\\[16px\\]{font-size:16px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm,.text-sm\\/5{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.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-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / 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-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-green-900{--tw-text-opacity: 1;color:rgb(20 83 45 / var(--tw-text-opacity, 1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.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))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-95{opacity:.95}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px 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_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-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 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-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}.drop-shadow-xl{--tw-drop-shadow: drop-shadow(0 20px 13px rgb(0 0 0 / .03)) drop-shadow(0 8px 5px rgb(0 0 0 / .08));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)}.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{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.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-150{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-150{animation-duration:.15s}.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}}.placeholder\\:text-red-400::-moz-placeholder{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.placeholder\\:text-red-400::placeholder{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.hover\\:-translate-y-0\\.5:hover{--tw-translate-y: -.125rem;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\\: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\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\\:text-\\[\\#6952C7\\]:hover{--tw-text-opacity: 1;color:rgb(105 82 199 / var(--tw-text-opacity, 1))}.hover\\:opacity-90:hover{opacity:.9}.hover\\:shadow-lg:hover{--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)}.hover\\:shadow-sm:hover{--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)}.focus\\:border-transparent:focus{border-color:transparent}.focus\\:ring-0:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-gray-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity, 1))}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-gray-100:disabled{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.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\\:col-span-10{grid-column:span 10 / span 10}.sm\\:col-span-2{grid-column:span 2 / span 2}.sm\\:mx-0{margin-left:0;margin-right:0}.sm\\:w-\\[80vw\\]{width:80vw}.sm\\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.sm\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:flex-row{flex-direction:row}.sm\\:items-center{align-items:center}.sm\\:justify-start{justify-content:flex-start}}@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\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.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}}';
|
|
15
|
+
function ai() {
|
|
16
|
+
return ke(() => {
|
|
17
17
|
if (typeof document < "u") {
|
|
18
18
|
const e = document.createElement("style");
|
|
19
|
-
return e.textContent =
|
|
19
|
+
return e.textContent = Bo, document.head.appendChild(e), () => {
|
|
20
20
|
document.head.removeChild(e);
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
}, []), null;
|
|
24
24
|
}
|
|
25
|
-
const
|
|
25
|
+
const Uo = {
|
|
26
26
|
store: {
|
|
27
27
|
storeCode: "",
|
|
28
28
|
storeName: "",
|
|
@@ -56,30 +56,30 @@ const Bo = {
|
|
|
56
56
|
mobile: []
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
},
|
|
59
|
+
}, En = Pn({
|
|
60
60
|
name: "store",
|
|
61
|
-
initialState:
|
|
61
|
+
initialState: Uo,
|
|
62
62
|
reducers: {
|
|
63
63
|
setStore: (e, t) => {
|
|
64
64
|
e.store = t.payload;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
}), { setStore:
|
|
67
|
+
}), { setStore: si } = En.actions, qo = En.reducer, Ro = {
|
|
68
68
|
product: null
|
|
69
|
-
},
|
|
69
|
+
}, On = Pn({
|
|
70
70
|
name: "product",
|
|
71
|
-
initialState:
|
|
71
|
+
initialState: Ro,
|
|
72
72
|
reducers: {
|
|
73
73
|
setProduct: (e, t) => {
|
|
74
74
|
e.product = t.payload;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
}), { setProduct: dr } =
|
|
77
|
+
}), { setProduct: dr } = On.actions, Ho = On.reducer, Yo = Do({
|
|
78
78
|
reducer: {
|
|
79
|
-
store:
|
|
80
|
-
product:
|
|
79
|
+
store: qo,
|
|
80
|
+
product: Ho
|
|
81
81
|
}
|
|
82
|
-
}), Vo = ({ children: e }) => /* @__PURE__ */ a(
|
|
82
|
+
}), Vo = ({ children: e }) => /* @__PURE__ */ a(Lo, { store: Yo, children: e }), Jt = (e) => {
|
|
83
83
|
const t = new CustomEvent("reactCartUpdated", {
|
|
84
84
|
detail: {
|
|
85
85
|
cartUpdated: !0,
|
|
@@ -88,31 +88,31 @@ const Bo = {
|
|
|
88
88
|
});
|
|
89
89
|
window.dispatchEvent(t);
|
|
90
90
|
};
|
|
91
|
-
function
|
|
91
|
+
function Jo({
|
|
92
92
|
...e
|
|
93
93
|
}) {
|
|
94
|
-
return /* @__PURE__ */ a(
|
|
94
|
+
return /* @__PURE__ */ a(Tn.Root, { "data-slot": "popover", ...e });
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function Ko({
|
|
97
97
|
...e
|
|
98
98
|
}) {
|
|
99
|
-
return /* @__PURE__ */ a(
|
|
99
|
+
return /* @__PURE__ */ a(Tn.Trigger, { "data-slot": "popover-trigger", ...e });
|
|
100
100
|
}
|
|
101
|
-
const
|
|
101
|
+
const dt = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1.amazonaws.com/dev/api/bedrock/invoke/stream", xAPIKey: "BJBtjpPkqGatuoa3qJqdR8aHXSsHkgvGaootbubi", serverUrl: "https://tanya-sfcc-server.vercel.app/", basePath: "sc-api" }), An = async () => {
|
|
102
102
|
const e = "https://tanya-sfcc-server.vercel.app/";
|
|
103
103
|
try {
|
|
104
|
-
const t = await
|
|
105
|
-
`${e}api/auth/token-bm-grant?baseUrl=${
|
|
104
|
+
const t = await xe.post(
|
|
105
|
+
`${e}api/auth/token-bm-grant?baseUrl=${Ze()}&siteId=${Je()}`
|
|
106
106
|
);
|
|
107
107
|
return t.status === 200 && t.data.access_token ? t.data.access_token : (console.error("Failed to fetch token:", t.data), null);
|
|
108
108
|
} catch (t) {
|
|
109
|
-
return
|
|
109
|
+
return xe.isAxiosError(t) ? console.error("Error fetching token:", t.response || t.message) : console.error("Unexpected error:", t), null;
|
|
110
110
|
}
|
|
111
|
-
},
|
|
111
|
+
}, jn = async (e) => {
|
|
112
112
|
const t = "https://tanya-sfcc-server.vercel.app/";
|
|
113
113
|
try {
|
|
114
|
-
const r = JSON.parse(sessionStorage.getItem("customerData") || "{}").dwsid, n = await
|
|
115
|
-
`${t}api/auth/token-existing-guest-customer?dwsid=${r}&baseUrl=${
|
|
114
|
+
const r = JSON.parse(sessionStorage.getItem("customerData") || "{}").dwsid, n = await xe.post(
|
|
115
|
+
`${t}api/auth/token-existing-guest-customer?dwsid=${r}&baseUrl=${Ze()}&siteId=${Je()}&pubCfg=${ut()}&envRef=${ft()}&orgRef=${mt()}`,
|
|
116
116
|
{},
|
|
117
117
|
{
|
|
118
118
|
headers: {
|
|
@@ -123,12 +123,12 @@ const lt = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1
|
|
|
123
123
|
);
|
|
124
124
|
return n.status === 200 && n.data ? n.data : null;
|
|
125
125
|
} catch (r) {
|
|
126
|
-
return
|
|
126
|
+
return xe.isAxiosError(r) ? console.error("Error creating basket:", r.response || r.message) : console.error("Unexpected error:", r), null;
|
|
127
127
|
}
|
|
128
128
|
};
|
|
129
129
|
async function vt() {
|
|
130
130
|
var s;
|
|
131
|
-
const e =
|
|
131
|
+
const e = Je(), t = "access_token_" + e, r = "expires_in_" + e, n = localStorage.getItem(r), o = localStorage.getItem(t);
|
|
132
132
|
return console.log(o), (s = JSON.parse(sessionStorage.getItem("customerData") || "{}")) != null && s.isGuest, console.log("access token found in local storage"), { access_token: o, expires_in: n };
|
|
133
133
|
}
|
|
134
134
|
const ur = async (e, t) => {
|
|
@@ -156,18 +156,18 @@ const ur = async (e, t) => {
|
|
|
156
156
|
} catch (r) {
|
|
157
157
|
return console.error("Error obtaining JWT token:", r), e = null, t = null, null;
|
|
158
158
|
}
|
|
159
|
-
},
|
|
159
|
+
}, Ze = () => sessionStorage.getItem("Host"), Je = () => sessionStorage.getItem("SiteId"), ut = () => sessionStorage.getItem("pubCfg"), ft = () => sessionStorage.getItem("envRef"), mt = () => sessionStorage.getItem("orgRef"), Wo = async (e) => {
|
|
160
160
|
console.log("fetching results");
|
|
161
|
-
const { serverUrl: t, basePath: r } =
|
|
161
|
+
const { serverUrl: t, basePath: r } = dt();
|
|
162
162
|
let n = "";
|
|
163
163
|
{
|
|
164
164
|
const o = await vt();
|
|
165
165
|
console.log("the token from getSearchResults", o), n = o.access_token;
|
|
166
166
|
}
|
|
167
167
|
try {
|
|
168
|
-
const o =
|
|
169
|
-
return (await
|
|
170
|
-
`${t}${r}/search-sfcc?baseUrl=${o}&query=${e}&siteId=${
|
|
168
|
+
const o = Ze();
|
|
169
|
+
return (await xe.get(
|
|
170
|
+
`${t}${r}/search-sfcc?baseUrl=${o}&query=${e}&siteId=${Je()}&pubCfg=${ut()}&envRef=${ft()}&orgRef=${mt()}`,
|
|
171
171
|
{
|
|
172
172
|
headers: {
|
|
173
173
|
"Content-Type": "application/json",
|
|
@@ -178,13 +178,13 @@ const ur = async (e, t) => {
|
|
|
178
178
|
} catch (o) {
|
|
179
179
|
throw console.error("Error fetching search results:", o), o;
|
|
180
180
|
}
|
|
181
|
-
},
|
|
181
|
+
}, $n = async (e) => {
|
|
182
182
|
if (!e) throw new Error("Product ID is required");
|
|
183
|
-
const { serverUrl: t, basePath: r } =
|
|
183
|
+
const { serverUrl: t, basePath: r } = dt(), n = Ze();
|
|
184
184
|
console.log("calling access");
|
|
185
185
|
const { access_token: o } = await vt();
|
|
186
|
-
return (await
|
|
187
|
-
`${t}${r}/product-sfcc/${e}?baseUrl=${n}&siteId=${
|
|
186
|
+
return (await xe.get(
|
|
187
|
+
`${t}${r}/product-sfcc/${e}?baseUrl=${n}&siteId=${Je()}&pubCfg=${ut()}&envRef=${ft()}&orgRef=${mt()}`,
|
|
188
188
|
{
|
|
189
189
|
headers: {
|
|
190
190
|
"Content-Type": "application/json",
|
|
@@ -192,13 +192,13 @@ const ur = async (e, t) => {
|
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
)).data;
|
|
195
|
-
},
|
|
195
|
+
}, Go = async (e) => {
|
|
196
196
|
if (!e) throw new Error("customerId is required");
|
|
197
|
-
const t = await
|
|
197
|
+
const t = await An(), { customer_token: r } = await jn(
|
|
198
198
|
t
|
|
199
|
-
), { serverUrl: n, basePath: o } =
|
|
200
|
-
return (await
|
|
201
|
-
`${n}${o}/get-interest?baseUrl=${
|
|
199
|
+
), { serverUrl: n, basePath: o } = dt(), i = (await vt()).access_token;
|
|
200
|
+
return (await xe.get(
|
|
201
|
+
`${n}${o}/get-interest?baseUrl=${Ze()}&customerId=${e}&siteId=${Je()}&pubCfg=${ut()}&envRef=${ft()}&orgRef=${mt()}`,
|
|
202
202
|
{
|
|
203
203
|
headers: {
|
|
204
204
|
"Content-Type": "application/json",
|
|
@@ -206,10 +206,10 @@ const ur = async (e, t) => {
|
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
)).data;
|
|
209
|
-
},
|
|
209
|
+
}, Yr = (e) => String(typeof e == "string" ? e : e["en-US"] || e), Vr = (e) => e != null && e.image ? [e.image] : "variants" in e ? e.variants[0].images : e.masterVariant.images.map((t) => t.url), Qo = (e, t) => e.toLocaleString("en-US", {
|
|
210
210
|
style: "currency",
|
|
211
211
|
currency: t || "USD"
|
|
212
|
-
}),
|
|
212
|
+
}), Jr = (e) => {
|
|
213
213
|
var t, r, n;
|
|
214
214
|
return "variants" in e ? {
|
|
215
215
|
centAmount: (t = e.variants[0]) == null ? void 0 : t.prices.EUR.max,
|
|
@@ -218,21 +218,21 @@ const ur = async (e, t) => {
|
|
|
218
218
|
centAmount: (r = e.masterVariant) == null ? void 0 : r.prices[0].value.centAmount,
|
|
219
219
|
currencyCode: (n = e.masterVariant) == null ? void 0 : n.prices[0].value.currencyCode
|
|
220
220
|
};
|
|
221
|
-
},
|
|
221
|
+
}, Xo = (e) => e.charAt(0).toUpperCase() + e.slice(1), Kr = (e, t) => e.length < t ? e : e.slice(0, t) + "...", rr = (e) => e.split("\\n").map((t, r) => {
|
|
222
222
|
const n = t.match(/^(\d+)\.\s(.+)/);
|
|
223
223
|
return n ? `<p key=${r} class="mb-2"><strong>${n[1]}.</strong> ${n[2]}</p>` : t.trim() ? `<p key=${r} class="mb-2">${t}</p>` : "<br/>";
|
|
224
224
|
}).join("");
|
|
225
|
-
function
|
|
225
|
+
function Zo() {
|
|
226
226
|
const e = () => window.innerWidth < 425 ? 1 : window.innerWidth < 768 ? 2 : 4, [t, r] = C(e);
|
|
227
|
-
return
|
|
227
|
+
return ke(() => {
|
|
228
228
|
const n = () => r(e());
|
|
229
229
|
return window.addEventListener("resize", n), () => window.removeEventListener("resize", n);
|
|
230
230
|
}, []), t;
|
|
231
231
|
}
|
|
232
|
-
const
|
|
232
|
+
const ea = ({
|
|
233
233
|
product: e
|
|
234
234
|
}) => {
|
|
235
|
-
const t =
|
|
235
|
+
const t = Fn(), r = Zo(), [n, o] = C(0), s = () => {
|
|
236
236
|
o(
|
|
237
237
|
(l) => l + r >= e.length ? 0 : l + r
|
|
238
238
|
);
|
|
@@ -241,7 +241,7 @@ const Zo = ({
|
|
|
241
241
|
(l) => l - r < 0 ? e.length - (e.length % r || r) : l - r
|
|
242
242
|
);
|
|
243
243
|
}, c = async (l) => {
|
|
244
|
-
const p = await
|
|
244
|
+
const p = await $n(l);
|
|
245
245
|
t(dr(p));
|
|
246
246
|
};
|
|
247
247
|
return /* @__PURE__ */ a("div", { className: "mt-2 overflow-x-hidden", children: /* @__PURE__ */ d("div", { className: "flex items-center justify-center gap-4 relative", children: [
|
|
@@ -283,8 +283,8 @@ const Zo = ({
|
|
|
283
283
|
className: "text-white w-full p-2 text-[12px] text-center h-[60px]",
|
|
284
284
|
children: [
|
|
285
285
|
/* @__PURE__ */ d("div", { className: "relative inline-block group", children: [
|
|
286
|
-
/* @__PURE__ */ a("div", { className: "w-full line-clamp-1 overflow-hidden text-ellipsis text-[#000000] font-medium font-nunitoSans", children: l != null && l.productName ? l.productName : l != null && l.product_name ? l.product_name :
|
|
287
|
-
|
|
286
|
+
/* @__PURE__ */ a("div", { className: "w-full line-clamp-1 overflow-hidden text-ellipsis text-[#000000] font-medium font-nunitoSans", children: l != null && l.productName ? l.productName : l != null && l.product_name ? l.product_name : Kr(
|
|
287
|
+
Yr((g = l == null ? void 0 : l.name) == null ? void 0 : g["en-US"]),
|
|
288
288
|
60
|
|
289
289
|
) || "Product" }),
|
|
290
290
|
/* @__PURE__ */ a(
|
|
@@ -298,17 +298,17 @@ const Zo = ({
|
|
|
298
298
|
marginBottom: "5px",
|
|
299
299
|
zIndex: 50
|
|
300
300
|
},
|
|
301
|
-
children: l != null && l.productName ? l.productName : l != null && l.product_name ? l.product_name :
|
|
302
|
-
|
|
301
|
+
children: l != null && l.productName ? l.productName : l != null && l.product_name ? l.product_name : Kr(
|
|
302
|
+
Yr((y = l == null ? void 0 : l.name) == null ? void 0 : y["en-US"]),
|
|
303
303
|
60
|
|
304
304
|
) || "Product"
|
|
305
305
|
}
|
|
306
306
|
)
|
|
307
307
|
] }),
|
|
308
308
|
/* @__PURE__ */ d("div", { className: " flex text-center items-center gap-2 text-[14px] text-[#14121F] font-bold font-nunitoSans text-base mb-1", children: [
|
|
309
|
-
/* @__PURE__ */ a("p", { children:
|
|
310
|
-
l != null && l.price ? Number(l == null ? void 0 : l.price) :
|
|
311
|
-
(x =
|
|
309
|
+
/* @__PURE__ */ a("p", { children: Qo(
|
|
310
|
+
l != null && l.price ? Number(l == null ? void 0 : l.price) : Jr(l).centAmount || 0,
|
|
311
|
+
(x = Jr(l)) == null ? void 0 : x.currencyCode
|
|
312
312
|
) }),
|
|
313
313
|
/* @__PURE__ */ d("p", { className: "text-[#14121F] font-normal line-through text-sm font-nunitoSans truncate", children: [
|
|
314
314
|
"$",
|
|
@@ -337,7 +337,7 @@ const Zo = ({
|
|
|
337
337
|
}
|
|
338
338
|
)
|
|
339
339
|
] }) });
|
|
340
|
-
},
|
|
340
|
+
}, ta = ({ chat: e, storeDetails: t }) => /* @__PURE__ */ a("div", { className: "bg-[#FFFFFF] px-7 py-4 rounded-r-xl rounded-bl-2xl w-full", children: e.map((r, n) => /* @__PURE__ */ d(
|
|
341
341
|
"div",
|
|
342
342
|
{
|
|
343
343
|
className: "mb-4 p-3 rounded-xl",
|
|
@@ -350,11 +350,11 @@ const Zo = ({
|
|
|
350
350
|
"div",
|
|
351
351
|
{
|
|
352
352
|
className: "font-nunitoSans font-bold text-sm text-[#494949] p-2 w-fit rounded-[20px]",
|
|
353
|
-
children:
|
|
353
|
+
children: Xo(r.keyword) || "No keyword"
|
|
354
354
|
}
|
|
355
355
|
),
|
|
356
356
|
/* @__PURE__ */ a(
|
|
357
|
-
|
|
357
|
+
ea,
|
|
358
358
|
{
|
|
359
359
|
product: r.items,
|
|
360
360
|
storeDetails: t
|
|
@@ -363,12 +363,12 @@ const Zo = ({
|
|
|
363
363
|
]
|
|
364
364
|
},
|
|
365
365
|
n
|
|
366
|
-
)) }),
|
|
366
|
+
)) }), Ln = async (e, t) => {
|
|
367
367
|
var s, i;
|
|
368
|
-
const { serverUrl: r, basePath: n } =
|
|
368
|
+
const { serverUrl: r, basePath: n } = dt(), o = `${r}`;
|
|
369
369
|
try {
|
|
370
|
-
const c = await
|
|
371
|
-
`${o}${n}/basket/create?baseUrl=${
|
|
370
|
+
const c = await xe.post(
|
|
371
|
+
`${o}${n}/basket/create?baseUrl=${Ze()}&siteId=${Je()}&pubCfg=${ut()}&envRef=${ft()}&orgRef=${mt()}`,
|
|
372
372
|
t,
|
|
373
373
|
{
|
|
374
374
|
headers: {
|
|
@@ -385,13 +385,13 @@ const Zo = ({
|
|
|
385
385
|
"*"
|
|
386
386
|
), c.data;
|
|
387
387
|
} catch (c) {
|
|
388
|
-
return
|
|
388
|
+
return xe.isAxiosError(c) ? console.error("Error creating basket:", c.response || c.message) : console.error("Unexpected error:", c), null;
|
|
389
389
|
}
|
|
390
390
|
}, fr = async (e, t, r) => {
|
|
391
|
-
const { serverUrl: n, basePath: o } =
|
|
391
|
+
const { serverUrl: n, basePath: o } = dt(), s = `${n}`;
|
|
392
392
|
try {
|
|
393
|
-
const i = await
|
|
394
|
-
`${s}${o}/basket/add-product/${e}?baseUrl=${
|
|
393
|
+
const i = await xe.post(
|
|
394
|
+
`${s}${o}/basket/add-product/${e}?baseUrl=${Ze()}&siteId=${Je()}&pubCfg=${ut()}&envRef=${ft()}&orgRef=${mt()}`,
|
|
395
395
|
t,
|
|
396
396
|
{
|
|
397
397
|
headers: {
|
|
@@ -402,20 +402,20 @@ const Zo = ({
|
|
|
402
402
|
);
|
|
403
403
|
return i.status === 200 && i.data ? i.data : null;
|
|
404
404
|
} catch (i) {
|
|
405
|
-
return
|
|
405
|
+
return xe.isAxiosError(i) ? console.error(
|
|
406
406
|
"Error adding products to basket:",
|
|
407
407
|
i.response || i.message
|
|
408
408
|
) : console.error("Unexpected error:", i), null;
|
|
409
409
|
}
|
|
410
|
-
},
|
|
410
|
+
}, Dn = async ({
|
|
411
411
|
basketId: e,
|
|
412
412
|
customer_token: t
|
|
413
413
|
}) => {
|
|
414
414
|
var s;
|
|
415
|
-
const { serverUrl: r, basePath: n } =
|
|
415
|
+
const { serverUrl: r, basePath: n } = dt(), o = `${r}`;
|
|
416
416
|
try {
|
|
417
|
-
const i = await
|
|
418
|
-
`${o}${n}/basket/${e}?baseUrl=${
|
|
417
|
+
const i = await xe.get(
|
|
418
|
+
`${o}${n}/basket/${e}?baseUrl=${Ze()}&siteId=${Je()}&pubCfg=${ut()}&envRef=${ft()}&orgRef=${mt()}`,
|
|
419
419
|
{
|
|
420
420
|
headers: {
|
|
421
421
|
"Content-Type": "application/json",
|
|
@@ -425,10 +425,10 @@ const Zo = ({
|
|
|
425
425
|
);
|
|
426
426
|
return { status: i.status, data: i.data };
|
|
427
427
|
} catch (i) {
|
|
428
|
-
return
|
|
428
|
+
return xe.isAxiosError(i) ? { status: (s = i.response) == null ? void 0 : s.status, data: null } : { status: null, data: null };
|
|
429
429
|
}
|
|
430
|
-
}, Kt = "sfcc_basket_id",
|
|
431
|
-
const
|
|
430
|
+
}, Kt = "sfcc_basket_id", Wr = "sfcc_customer_token", Et = "sfcc_token_expiry", ra = 300 * 1e3, Dt = "1.0.0";
|
|
431
|
+
const ct = (e) => {
|
|
432
432
|
try {
|
|
433
433
|
e ? localStorage.setItem(Kt, e) : localStorage.removeItem(Kt);
|
|
434
434
|
} catch (t) {
|
|
@@ -437,102 +437,102 @@ const it = (e) => {
|
|
|
437
437
|
}, Wt = (e) => {
|
|
438
438
|
try {
|
|
439
439
|
if (e) {
|
|
440
|
-
localStorage.setItem(
|
|
441
|
-
const t = Date.now() +
|
|
440
|
+
localStorage.setItem(Wr, e);
|
|
441
|
+
const t = Date.now() + ra;
|
|
442
442
|
localStorage.setItem(Et, t.toString());
|
|
443
443
|
} else
|
|
444
|
-
localStorage.removeItem(
|
|
444
|
+
localStorage.removeItem(Wr);
|
|
445
445
|
} catch (t) {
|
|
446
446
|
console.error("Error storing token:", t);
|
|
447
447
|
}
|
|
448
|
-
},
|
|
448
|
+
}, Gr = 300, na = ({ addToCartPwa: e }) => {
|
|
449
449
|
var l, p, g, y, x, S;
|
|
450
|
-
const t =
|
|
451
|
-
if (
|
|
450
|
+
const t = Fn(), r = Vt((_) => _.product.product), n = Vt((_) => _.store.store), [o, s] = C(!!r);
|
|
451
|
+
if (ke(() => {
|
|
452
452
|
s(!!r);
|
|
453
453
|
}, [r]), !r) return null;
|
|
454
454
|
const i = async () => {
|
|
455
|
-
var _, F, N, P,
|
|
455
|
+
var _, F, N, P, Y, w, J, $e, E, V, be, le, Z, Oe, Le, we;
|
|
456
456
|
try {
|
|
457
457
|
if (!((F = (_ = r == null ? void 0 : r.variants) == null ? void 0 : _[0]) != null && F.product_id) && !(r.type.item || r.type.bundle) && !((P = (N = r == null ? void 0 : r.variants) == null ? void 0 : N[0]) != null && P.productId)) {
|
|
458
|
-
|
|
458
|
+
Ue.error("Variants not available", {
|
|
459
459
|
position: "bottom-right",
|
|
460
460
|
autoClose: 1e3
|
|
461
461
|
}), console.error("No product variant found");
|
|
462
462
|
return;
|
|
463
463
|
}
|
|
464
|
-
const
|
|
464
|
+
const z = [
|
|
465
465
|
{
|
|
466
|
-
product_id: ((
|
|
466
|
+
product_id: ((Y = r.variants) == null ? void 0 : Y[0].product_id) || ((w = r.variants) == null ? void 0 : w[0].productId) || (r == null ? void 0 : r.id),
|
|
467
467
|
quantity: 1
|
|
468
468
|
}
|
|
469
469
|
], O = JSON.parse(
|
|
470
470
|
sessionStorage.getItem("customerData") || "{}"
|
|
471
|
-
),
|
|
472
|
-
if (!
|
|
473
|
-
let
|
|
474
|
-
if (
|
|
471
|
+
), R = (O == null ? void 0 : O.basketId) || localStorage.getItem(Kt), et = !1, Ke = localStorage.getItem(Et), Se = Date.now();
|
|
472
|
+
if (!et || !Ke || Se >= parseInt(Ke)) {
|
|
473
|
+
let Fe = "";
|
|
474
|
+
if (Fe = "Bearer " + (await vt()).access_token, !Fe) {
|
|
475
475
|
console.error("Failed to get customer_token");
|
|
476
476
|
return;
|
|
477
477
|
}
|
|
478
|
-
const
|
|
479
|
-
if (Wt(
|
|
480
|
-
const
|
|
481
|
-
basketId:
|
|
482
|
-
customer_token:
|
|
478
|
+
const ht = Se + 300 * 1e3;
|
|
479
|
+
if (Wt(Fe), localStorage.setItem(Et, ht.toString()), R) {
|
|
480
|
+
const Ae = await Dn({
|
|
481
|
+
basketId: R,
|
|
482
|
+
customer_token: Fe
|
|
483
483
|
});
|
|
484
|
-
if (
|
|
485
|
-
const
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
484
|
+
if (Ae.status === 200 && Ae) {
|
|
485
|
+
const Pe = await fr(
|
|
486
|
+
R,
|
|
487
|
+
z,
|
|
488
|
+
Fe
|
|
489
489
|
);
|
|
490
|
-
(((
|
|
490
|
+
(((J = Pe == null ? void 0 : Pe.product_items) == null ? void 0 : J.length) > 0 || (($e = Pe == null ? void 0 : Pe.productItems) == null ? void 0 : $e.length) > 0) && (Ue.success("Added to cart", {
|
|
491
491
|
position: "bottom-right",
|
|
492
492
|
autoClose: 3e3,
|
|
493
493
|
hideProgressBar: !1,
|
|
494
494
|
closeOnClick: !0,
|
|
495
495
|
pauseOnHover: !0,
|
|
496
496
|
draggable: !0
|
|
497
|
-
}), Jt(
|
|
497
|
+
}), Jt(R));
|
|
498
498
|
return;
|
|
499
499
|
}
|
|
500
500
|
}
|
|
501
|
-
const
|
|
501
|
+
const tt = {
|
|
502
502
|
productItems: [
|
|
503
503
|
{
|
|
504
|
-
productId: ((E = r.variants) == null ? void 0 : E[0].product_id) || ((
|
|
504
|
+
productId: ((E = r.variants) == null ? void 0 : E[0].product_id) || ((V = r.variants) == null ? void 0 : V[0].productId) || (r == null ? void 0 : r.id),
|
|
505
505
|
quantity: 1
|
|
506
506
|
}
|
|
507
507
|
]
|
|
508
|
-
},
|
|
509
|
-
if (!(
|
|
508
|
+
}, U = await Ln(Fe, tt);
|
|
509
|
+
if (!(U != null && U.basket_id) && !(U != null && U.basketId)) {
|
|
510
510
|
console.error("Failed to create basket");
|
|
511
511
|
return;
|
|
512
512
|
}
|
|
513
|
-
|
|
514
|
-
(
|
|
513
|
+
ct(
|
|
514
|
+
(U == null ? void 0 : U.basket_id) || (U == null ? void 0 : U.basketId)
|
|
515
515
|
), console.log("adding product to basket");
|
|
516
|
-
const
|
|
517
|
-
(
|
|
518
|
-
|
|
519
|
-
|
|
516
|
+
const ue = await fr(
|
|
517
|
+
(U == null ? void 0 : U.basket_id) || (U == null ? void 0 : U.basketId),
|
|
518
|
+
z,
|
|
519
|
+
Fe
|
|
520
520
|
);
|
|
521
|
-
console.log("object added to basket"), (((
|
|
521
|
+
console.log("object added to basket"), (((be = ue == null ? void 0 : ue.product_items) == null ? void 0 : be.length) > 0 || ((le = ue == null ? void 0 : ue.productItems) == null ? void 0 : le.length) > 0) && Ue.success("Added to cart", {
|
|
522
522
|
position: "bottom-right",
|
|
523
523
|
autoClose: 3e3,
|
|
524
524
|
hideProgressBar: !1,
|
|
525
525
|
closeOnClick: !0,
|
|
526
526
|
pauseOnHover: !0,
|
|
527
527
|
draggable: !0
|
|
528
|
-
}), Jt(
|
|
528
|
+
}), Jt(U.basket_id || (U == null ? void 0 : U.basketId));
|
|
529
529
|
}
|
|
530
|
-
} catch (
|
|
531
|
-
console.error("Error adding to cart:",
|
|
530
|
+
} catch (z) {
|
|
531
|
+
console.error("Error adding to cart:", z), Ue.error("Failed to add product to cart", {
|
|
532
532
|
position: "bottom-right",
|
|
533
533
|
autoClose: 3e3
|
|
534
|
-
}), ((
|
|
535
|
-
((
|
|
534
|
+
}), ((Z = z == null ? void 0 : z.response) == null ? void 0 : Z.status) === 404 || // Basket not found
|
|
535
|
+
((Oe = z == null ? void 0 : z.response) == null ? void 0 : Oe.status) === 401 ? (((Le = z == null ? void 0 : z.response) == null ? void 0 : Le.status) === 404 && ct(null), ((we = z == null ? void 0 : z.response) == null ? void 0 : we.status) === 401 && (ct(null), Wt(null))) : (console.error("Failed to add product to basket:", z.message), Ue.error("Failed to add product to cart", {
|
|
536
536
|
position: "bottom-right",
|
|
537
537
|
autoClose: 3e3
|
|
538
538
|
}));
|
|
@@ -542,13 +542,13 @@ const it = (e) => {
|
|
|
542
542
|
const _ = window.location.origin + "/product/" + r.id;
|
|
543
543
|
console.log("path", _), window.location.href = _;
|
|
544
544
|
};
|
|
545
|
-
return console.log(r, "the prod"), /* @__PURE__ */ d(
|
|
545
|
+
return console.log(r, "the prod"), /* @__PURE__ */ d(ve, { children: [
|
|
546
546
|
/* @__PURE__ */ a(
|
|
547
547
|
"div",
|
|
548
548
|
{
|
|
549
549
|
className: "fixed inset-0 z-40 bg-black/30",
|
|
550
550
|
onClick: () => {
|
|
551
|
-
s(!1), setTimeout(() => t(dr(null)),
|
|
551
|
+
s(!1), setTimeout(() => t(dr(null)), Gr);
|
|
552
552
|
}
|
|
553
553
|
}
|
|
554
554
|
),
|
|
@@ -572,7 +572,7 @@ const it = (e) => {
|
|
|
572
572
|
onClick: () => {
|
|
573
573
|
s(!1), setTimeout(
|
|
574
574
|
() => t(dr(null)),
|
|
575
|
-
|
|
575
|
+
Gr
|
|
576
576
|
);
|
|
577
577
|
},
|
|
578
578
|
children: "✕"
|
|
@@ -646,7 +646,7 @@ const it = (e) => {
|
|
|
646
646
|
/* @__PURE__ */ a("div", { className: "mt-2 flex flex-row items-center gap-2", children: Array.from({ length: 5 }).map((_, F) => {
|
|
647
647
|
var N;
|
|
648
648
|
return /* @__PURE__ */ a(
|
|
649
|
-
|
|
649
|
+
zo,
|
|
650
650
|
{
|
|
651
651
|
icon: "mdi:star",
|
|
652
652
|
width: "20",
|
|
@@ -690,7 +690,7 @@ const it = (e) => {
|
|
|
690
690
|
}
|
|
691
691
|
)
|
|
692
692
|
] });
|
|
693
|
-
},
|
|
693
|
+
}, oa = ({
|
|
694
694
|
tanyaConfig: e,
|
|
695
695
|
basketId: t,
|
|
696
696
|
addToCart: r
|
|
@@ -709,146 +709,146 @@ const it = (e) => {
|
|
|
709
709
|
"Niece/Nephew": "his/her niece/nephew",
|
|
710
710
|
"My Friends": "his/her friends",
|
|
711
711
|
Others: "others"
|
|
712
|
-
}, s =
|
|
713
|
-
|
|
714
|
-
const [y, x] = C(!1), [S, _] = C(!1), [F, N] = C(!1), [P,
|
|
712
|
+
}, s = Be(null), i = Be(null), c = Be(null), l = Be(null), [p, g] = C(null);
|
|
713
|
+
Be(null);
|
|
714
|
+
const [y, x] = C(!1), [S, _] = C(!1), [F, N] = C(!1), [P, Y] = C(!1), [w, J] = C(!1), [$e, E] = C(!1), [V, be] = C(""), [le, Z] = C(""), Oe = (m) => ({
|
|
715
715
|
id: m.id,
|
|
716
716
|
title: m.name,
|
|
717
717
|
image: m.image ?? "",
|
|
718
718
|
price: m.price ?? 0
|
|
719
|
-
}), [
|
|
720
|
-
|
|
719
|
+
}), [Le, we] = C([]), z = Be(null), O = Vt((m) => m.store.store), R = Vt((m) => m.product.product);
|
|
720
|
+
ke(() => {
|
|
721
721
|
const m = localStorage.getItem(
|
|
722
722
|
`access_token_${e.siteId}`
|
|
723
|
-
),
|
|
723
|
+
), $ = localStorage.getItem(
|
|
724
724
|
`chat-token-${e.siteId}`
|
|
725
725
|
);
|
|
726
|
-
if (m &&
|
|
727
|
-
const
|
|
728
|
-
|
|
726
|
+
if (m && $ === m) {
|
|
727
|
+
const L = localStorage.getItem("chatHistory");
|
|
728
|
+
L && we(JSON.parse(L));
|
|
729
729
|
} else
|
|
730
730
|
localStorage.setItem("chatHistory", JSON.stringify([])), localStorage.setItem(
|
|
731
731
|
`chat-token-${e.siteId}`,
|
|
732
732
|
m || ""
|
|
733
733
|
);
|
|
734
|
-
}, []),
|
|
735
|
-
localStorage.setItem("chatHistory", JSON.stringify(
|
|
734
|
+
}, []), ke(() => {
|
|
735
|
+
localStorage.setItem("chatHistory", JSON.stringify(Le));
|
|
736
736
|
const m = localStorage.getItem(
|
|
737
737
|
`access_token_${e.siteId}`
|
|
738
738
|
);
|
|
739
739
|
m && localStorage.setItem(`chat-token-${e.siteId}`, m);
|
|
740
|
-
}, [
|
|
741
|
-
const
|
|
740
|
+
}, [Le]);
|
|
741
|
+
const et = () => {
|
|
742
742
|
N(!0), setTimeout(() => _(!0), 10);
|
|
743
|
-
},
|
|
743
|
+
}, Ke = () => {
|
|
744
744
|
_(!1), setTimeout(() => N(!1), 300);
|
|
745
745
|
};
|
|
746
|
-
|
|
747
|
-
y ?
|
|
746
|
+
ke(() => {
|
|
747
|
+
y ? et() : Ke();
|
|
748
748
|
}, [y]);
|
|
749
|
-
const
|
|
750
|
-
|
|
749
|
+
const Se = (m) => {
|
|
750
|
+
Z(o[m]);
|
|
751
751
|
};
|
|
752
|
-
|
|
753
|
-
F &&
|
|
754
|
-
top:
|
|
752
|
+
ke(() => {
|
|
753
|
+
F && z.current && z.current.scrollTo({
|
|
754
|
+
top: z.current.scrollHeight,
|
|
755
755
|
behavior: "smooth"
|
|
756
756
|
});
|
|
757
|
-
}, [
|
|
758
|
-
const
|
|
757
|
+
}, [Le, F]);
|
|
758
|
+
const Fe = null, ht = null, tt = async () => {
|
|
759
759
|
const m = await vt();
|
|
760
760
|
m != null && g(m);
|
|
761
761
|
};
|
|
762
|
-
|
|
762
|
+
ke(() => {
|
|
763
763
|
if (e != null && e.siteId) {
|
|
764
|
-
const { clientID: m, host:
|
|
765
|
-
sessionStorage.setItem("Host",
|
|
764
|
+
const { clientID: m, host: $, organizationID: L, shortCode: K, siteId: M } = e;
|
|
765
|
+
sessionStorage.setItem("Host", $), sessionStorage.setItem("SiteId", M), sessionStorage.setItem("pubCfg", btoa(m)), sessionStorage.setItem("envRef", K), sessionStorage.setItem("orgRef", L);
|
|
766
766
|
}
|
|
767
|
-
|
|
768
|
-
}, []),
|
|
769
|
-
t && (console.log("setting the basket id", t),
|
|
767
|
+
tt(), console.log("scapi environment v1");
|
|
768
|
+
}, []), ke(() => {
|
|
769
|
+
t && (console.log("setting the basket id", t), ct(t));
|
|
770
770
|
}, [t]);
|
|
771
|
-
const
|
|
771
|
+
const U = async () => {
|
|
772
772
|
const m = JSON.parse(
|
|
773
773
|
sessionStorage.getItem("customerData") || "{}"
|
|
774
774
|
).customerId;
|
|
775
|
-
return (await
|
|
776
|
-
},
|
|
775
|
+
return (await Go(m || "")).c_interests;
|
|
776
|
+
}, ue = async (m, $) => {
|
|
777
777
|
console.log("in secondary flow", Dt);
|
|
778
|
-
const
|
|
779
|
-
if (console.log(
|
|
778
|
+
const L = await U();
|
|
779
|
+
if (console.log(L, "interests of customer", Dt), !!L)
|
|
780
780
|
try {
|
|
781
|
-
|
|
782
|
-
(
|
|
783
|
-
(
|
|
781
|
+
we(
|
|
782
|
+
(te) => te.map(
|
|
783
|
+
(Q, _e) => _e === te.length - 1 ? { ...Q, secondaryLoading: !0 } : Q
|
|
784
784
|
)
|
|
785
785
|
);
|
|
786
|
-
const
|
|
787
|
-
if (!
|
|
788
|
-
const
|
|
789
|
-
registered: String(
|
|
790
|
-
userId: String(
|
|
791
|
-
}).toString()}`,
|
|
786
|
+
const K = await ur(Fe, ht);
|
|
787
|
+
if (!K) throw new Error("Failed to fetch token");
|
|
788
|
+
const M = localStorage.getItem("customerNumber"), j = localStorage.getItem("isLoggedIn"), q = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
|
|
789
|
+
registered: String(j || !1),
|
|
790
|
+
userId: String(M || (/* @__PURE__ */ new Date()).getTime())
|
|
791
|
+
}).toString()}`, D = JSON.stringify({
|
|
792
792
|
flowId: "Q166PR519W",
|
|
793
793
|
flowAliasId: "HKFUVLWVH2",
|
|
794
794
|
input: {
|
|
795
795
|
loyaltyPoints: "",
|
|
796
796
|
productName: m,
|
|
797
|
-
productPoints: String(
|
|
798
|
-
interests:
|
|
797
|
+
productPoints: String($ || 0),
|
|
798
|
+
interests: L
|
|
799
799
|
}
|
|
800
|
-
}),
|
|
800
|
+
}), ee = await fetch(q, {
|
|
801
801
|
signal: AbortSignal.timeout(3e4),
|
|
802
802
|
method: "POST",
|
|
803
803
|
headers: {
|
|
804
804
|
"Content-Type": "application/json",
|
|
805
|
-
Authorization: `Bearer ${
|
|
805
|
+
Authorization: `Bearer ${K}`
|
|
806
806
|
},
|
|
807
|
-
body:
|
|
807
|
+
body: D
|
|
808
808
|
});
|
|
809
|
-
if (!
|
|
810
|
-
const
|
|
811
|
-
let
|
|
809
|
+
if (!ee.body) throw new Error("Readable stream not supported");
|
|
810
|
+
const ae = ee.body.getReader(), Ne = new TextDecoder();
|
|
811
|
+
let Ce = "";
|
|
812
812
|
for (; ; ) {
|
|
813
|
-
const { done:
|
|
814
|
-
if (
|
|
815
|
-
|
|
816
|
-
const
|
|
813
|
+
const { done: te, value: Q } = await ae.read();
|
|
814
|
+
if (te) break;
|
|
815
|
+
Ce += Ne.decode(Q, { stream: !0 });
|
|
816
|
+
const _e = Ce.split(`
|
|
817
817
|
`);
|
|
818
|
-
|
|
819
|
-
for (const
|
|
820
|
-
if (
|
|
821
|
-
const k =
|
|
818
|
+
Ce = _e.pop() || "";
|
|
819
|
+
for (const re of _e)
|
|
820
|
+
if (re.startsWith("data:")) {
|
|
821
|
+
const k = re.slice(5).trim();
|
|
822
822
|
try {
|
|
823
|
-
const
|
|
824
|
-
|
|
825
|
-
(
|
|
826
|
-
(
|
|
827
|
-
...
|
|
828
|
-
secondaryResponse:
|
|
823
|
+
const W = JSON.parse(k);
|
|
824
|
+
W.index === 0 && we(
|
|
825
|
+
(X) => X.map(
|
|
826
|
+
(me, Ie) => Ie === X.length - 1 ? {
|
|
827
|
+
...me,
|
|
828
|
+
secondaryResponse: W.data,
|
|
829
829
|
secondaryLoading: !1
|
|
830
|
-
} :
|
|
830
|
+
} : me
|
|
831
831
|
)
|
|
832
832
|
);
|
|
833
|
-
} catch (
|
|
834
|
-
|
|
835
|
-
(
|
|
836
|
-
(
|
|
833
|
+
} catch (W) {
|
|
834
|
+
we(
|
|
835
|
+
(X) => X.map(
|
|
836
|
+
(me, Ie) => Ie === X.length - 1 ? { ...me, secondaryLoading: !1 } : me
|
|
837
837
|
)
|
|
838
|
-
), console.error("Secondary flow JSON parse error:",
|
|
838
|
+
), console.error("Secondary flow JSON parse error:", W);
|
|
839
839
|
}
|
|
840
840
|
}
|
|
841
841
|
}
|
|
842
|
-
} catch (
|
|
843
|
-
console.error("Secondary flow error:",
|
|
842
|
+
} catch (K) {
|
|
843
|
+
console.error("Secondary flow error:", K);
|
|
844
844
|
}
|
|
845
|
-
},
|
|
846
|
-
const
|
|
847
|
-
if (
|
|
848
|
-
|
|
849
|
-
|
|
845
|
+
}, Ae = async (m) => {
|
|
846
|
+
const $ = m || V.trim();
|
|
847
|
+
if ($) {
|
|
848
|
+
J(!0), be(""), s.current = null, i.current = null, c.current = null, l.current = null, we((L) => [
|
|
849
|
+
...L,
|
|
850
850
|
{
|
|
851
|
-
query:
|
|
851
|
+
query: $,
|
|
852
852
|
response: "Thinking for what suits you best...",
|
|
853
853
|
potentialQuestions: "",
|
|
854
854
|
products: [],
|
|
@@ -856,197 +856,197 @@ const it = (e) => {
|
|
|
856
856
|
}
|
|
857
857
|
]);
|
|
858
858
|
try {
|
|
859
|
-
const
|
|
860
|
-
if (!
|
|
859
|
+
const L = le, K = localStorage.getItem("customerNumber"), M = localStorage.getItem("isLoggedIn"), j = await ur(Fe, ht);
|
|
860
|
+
if (!j)
|
|
861
861
|
throw new Error("Failed to obtain access token");
|
|
862
|
-
const
|
|
863
|
-
registered: String(
|
|
864
|
-
userId: String(
|
|
865
|
-
}).toString()}`,
|
|
862
|
+
const q = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
|
|
863
|
+
registered: String(M || !1),
|
|
864
|
+
userId: String(K || (/* @__PURE__ */ new Date()).getTime())
|
|
865
|
+
}).toString()}`, D = JSON.stringify({
|
|
866
866
|
flowId: "MMHQKYI1NE",
|
|
867
867
|
flowAliasId: "SZF9ZK1ATE",
|
|
868
868
|
input: {
|
|
869
|
-
userPrompt:
|
|
870
|
-
whom:
|
|
869
|
+
userPrompt: $,
|
|
870
|
+
whom: L
|
|
871
871
|
}
|
|
872
|
-
}),
|
|
872
|
+
}), ee = await fetch(q, {
|
|
873
873
|
signal: AbortSignal.timeout(3e4),
|
|
874
874
|
method: "POST",
|
|
875
875
|
headers: {
|
|
876
876
|
"Content-Type": "application/json",
|
|
877
|
-
Authorization: `Bearer ${
|
|
877
|
+
Authorization: `Bearer ${j}`
|
|
878
878
|
},
|
|
879
|
-
body:
|
|
879
|
+
body: D
|
|
880
880
|
});
|
|
881
|
-
if (!
|
|
882
|
-
throw new Error(`HTTP error! status: ${
|
|
883
|
-
if (!
|
|
884
|
-
const
|
|
885
|
-
let
|
|
881
|
+
if (!ee.ok)
|
|
882
|
+
throw new Error(`HTTP error! status: ${ee.status}`);
|
|
883
|
+
if (!ee.body) throw new Error("Readable stream not supported");
|
|
884
|
+
const ae = ee.body.getReader(), Ne = new TextDecoder();
|
|
885
|
+
let Ce = "", te = "";
|
|
886
886
|
for (; ; ) {
|
|
887
887
|
E(!0);
|
|
888
|
-
const { done:
|
|
889
|
-
if (
|
|
890
|
-
|
|
891
|
-
const
|
|
888
|
+
const { done: Q, value: _e } = await ae.read();
|
|
889
|
+
if (Q) break;
|
|
890
|
+
Ce += Ne.decode(_e, { stream: !0 });
|
|
891
|
+
const re = Ce.split(`
|
|
892
892
|
`);
|
|
893
|
-
|
|
894
|
-
for (const k of
|
|
893
|
+
Ce = re.pop() || "";
|
|
894
|
+
for (const k of re)
|
|
895
895
|
if (k.startsWith("data:")) {
|
|
896
|
-
const
|
|
896
|
+
const W = k.slice(5).trim();
|
|
897
897
|
try {
|
|
898
|
-
const
|
|
899
|
-
|
|
900
|
-
(
|
|
901
|
-
(
|
|
902
|
-
...
|
|
903
|
-
[
|
|
904
|
-
} :
|
|
898
|
+
const X = JSON.parse(W);
|
|
899
|
+
X.index == 1 && (te = X.data), we(
|
|
900
|
+
(me) => me.map(
|
|
901
|
+
(Ie, rt) => rt === me.length - 1 ? {
|
|
902
|
+
...Ie,
|
|
903
|
+
[X.index == 0 ? "response" : X.index == 1 ? "keywords" : X.index == 2 ? "potentialQuestions" : "end"]: X.data
|
|
904
|
+
} : Ie
|
|
905
905
|
)
|
|
906
906
|
);
|
|
907
|
-
} catch (
|
|
908
|
-
console.error("Error parsing JSON:",
|
|
907
|
+
} catch (X) {
|
|
908
|
+
console.error("Error parsing JSON:", X);
|
|
909
909
|
}
|
|
910
910
|
}
|
|
911
911
|
}
|
|
912
|
-
Zt(
|
|
913
|
-
} catch (
|
|
914
|
-
console.error("Error sending message to Tanya:",
|
|
912
|
+
Zt(Pe(te));
|
|
913
|
+
} catch (L) {
|
|
914
|
+
console.error("Error sending message to Tanya:", L);
|
|
915
915
|
} finally {
|
|
916
|
-
|
|
916
|
+
J(!1);
|
|
917
917
|
}
|
|
918
918
|
}
|
|
919
|
-
},
|
|
920
|
-
const
|
|
919
|
+
}, Pe = (m) => {
|
|
920
|
+
const $ = m.match(
|
|
921
921
|
/top five relevant product or category names are: (.*)/i
|
|
922
|
-
),
|
|
923
|
-
return [...new Set(
|
|
922
|
+
), M = ($ ? $[1] : m).split(", ").map((fe) => fe.replace(/\s*(Toys|Bags|Miniature|etc\.*)\s*/gi, "").trim());
|
|
923
|
+
return [...new Set(M)].filter(Boolean).join(",");
|
|
924
924
|
}, Zt = async (m) => {
|
|
925
|
-
var
|
|
926
|
-
const
|
|
925
|
+
var L, K, M;
|
|
926
|
+
const $ = typeof m == "string" ? m.split(",") : m;
|
|
927
927
|
E(!0);
|
|
928
928
|
try {
|
|
929
|
-
const
|
|
930
|
-
|
|
929
|
+
const j = await Promise.all(
|
|
930
|
+
$.map((D) => Wo(D).catch(() => []))
|
|
931
931
|
// prevent Promise.all crash
|
|
932
|
-
),
|
|
933
|
-
keyword:
|
|
934
|
-
items:
|
|
932
|
+
), fe = $.map((D, ee) => ({
|
|
933
|
+
keyword: D,
|
|
934
|
+
items: j[ee] ?? [],
|
|
935
935
|
loading: !1
|
|
936
|
-
})).filter((
|
|
937
|
-
if (
|
|
938
|
-
i.current =
|
|
939
|
-
const
|
|
940
|
-
l.current =
|
|
936
|
+
})).filter((D) => D.items.length > 0), q = (K = (L = fe[0]) == null ? void 0 : L.items) == null ? void 0 : K[0];
|
|
937
|
+
if (q) {
|
|
938
|
+
i.current = q.product_id, s.current = q.product_name, c.current = (M = q.image) == null ? void 0 : M.link;
|
|
939
|
+
const D = typeof q.price == "number" ? q.price : null;
|
|
940
|
+
l.current = D;
|
|
941
941
|
}
|
|
942
|
-
if (
|
|
943
|
-
(
|
|
944
|
-
(
|
|
945
|
-
...
|
|
946
|
-
products:
|
|
947
|
-
productSnapshot:
|
|
942
|
+
if (we(
|
|
943
|
+
(D) => D.map(
|
|
944
|
+
(ee, ae) => ae === D.length - 1 ? {
|
|
945
|
+
...ee,
|
|
946
|
+
products: fe,
|
|
947
|
+
productSnapshot: q ? {
|
|
948
948
|
id: i.current,
|
|
949
949
|
name: s.current,
|
|
950
950
|
image: c.current,
|
|
951
951
|
price: l.current,
|
|
952
952
|
points: 0,
|
|
953
953
|
quantity: 1
|
|
954
|
-
} :
|
|
955
|
-
} :
|
|
954
|
+
} : ee.productSnapshot
|
|
955
|
+
} : ee
|
|
956
956
|
)
|
|
957
|
-
),
|
|
958
|
-
const
|
|
957
|
+
), q) {
|
|
958
|
+
const D = JSON.parse(
|
|
959
959
|
sessionStorage.getItem("customerData") || "{}"
|
|
960
960
|
);
|
|
961
|
-
|
|
961
|
+
D != null && D.isGuest || (console.log("running secondary flow", Dt), ue(s.current, 0));
|
|
962
962
|
}
|
|
963
|
-
} catch (
|
|
964
|
-
console.error("error in keyword search",
|
|
963
|
+
} catch (j) {
|
|
964
|
+
console.error("error in keyword search", j);
|
|
965
965
|
} finally {
|
|
966
966
|
E(!1);
|
|
967
967
|
}
|
|
968
|
-
}, er = async (m,
|
|
969
|
-
var
|
|
970
|
-
|
|
968
|
+
}, er = async (m, $) => {
|
|
969
|
+
var L, K, M, j, fe, q, D, ee, ae, Ne, Ce, te, Q, _e, re;
|
|
970
|
+
Y(!0);
|
|
971
971
|
try {
|
|
972
|
-
const k = await
|
|
973
|
-
if (!((
|
|
974
|
-
|
|
972
|
+
const k = await $n(m.id);
|
|
973
|
+
if (!((K = (L = k == null ? void 0 : k.variants) == null ? void 0 : L[0]) != null && K.product_id || (j = (M = k == null ? void 0 : k.variants) == null ? void 0 : M[0]) != null && j.productId) && !(k.type.item || k.type.bundle)) {
|
|
974
|
+
Y(!1), Ue.error("Variants not found", {
|
|
975
975
|
position: "bottom-right",
|
|
976
976
|
autoClose: 1e3
|
|
977
977
|
}), console.error("No product variant found");
|
|
978
978
|
return;
|
|
979
979
|
}
|
|
980
|
-
const
|
|
980
|
+
const W = [
|
|
981
981
|
{
|
|
982
|
-
product_id: ((
|
|
983
|
-
quantity:
|
|
982
|
+
product_id: ((fe = k.variants) == null ? void 0 : fe[0].product_id) || ((q = k.variants) == null ? void 0 : q[0].productId) || (k == null ? void 0 : k.id),
|
|
983
|
+
quantity: $
|
|
984
984
|
}
|
|
985
985
|
];
|
|
986
|
-
console.log(
|
|
987
|
-
const
|
|
986
|
+
console.log(W, "product data", "app version", Dt);
|
|
987
|
+
const X = JSON.parse(
|
|
988
988
|
sessionStorage.getItem("customerData") || "{}"
|
|
989
|
-
),
|
|
990
|
-
if (!
|
|
991
|
-
const At = await
|
|
992
|
-
let { customer_token:
|
|
989
|
+
), me = (X == null ? void 0 : X.basketId) || localStorage.getItem(Kt), Ie = !1, rt = localStorage.getItem(Et), pt = Date.now();
|
|
990
|
+
if (!Ie || !rt || pt >= parseInt(rt)) {
|
|
991
|
+
const At = await An();
|
|
992
|
+
let { customer_token: qe } = await jn(
|
|
993
993
|
At
|
|
994
994
|
);
|
|
995
|
-
if (
|
|
995
|
+
if (qe = "Bearer " + p.access_token, !qe) {
|
|
996
996
|
console.error("Failed to get customer_token");
|
|
997
997
|
return;
|
|
998
998
|
}
|
|
999
|
-
const jt =
|
|
1000
|
-
if (Wt(
|
|
1001
|
-
const
|
|
1002
|
-
basketId:
|
|
1003
|
-
customer_token:
|
|
999
|
+
const jt = pt + 300 * 1e3;
|
|
1000
|
+
if (Wt(qe), localStorage.setItem(Et, jt.toString()), console.log(me, "basketIdFromCustomer"), me) {
|
|
1001
|
+
const nt = await Dn({
|
|
1002
|
+
basketId: me,
|
|
1003
|
+
customer_token: qe
|
|
1004
1004
|
});
|
|
1005
|
-
if (
|
|
1005
|
+
if (nt.status === 200 && nt) {
|
|
1006
1006
|
const kt = await fr(
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1007
|
+
me,
|
|
1008
|
+
W,
|
|
1009
|
+
qe
|
|
1010
1010
|
);
|
|
1011
|
-
((
|
|
1011
|
+
((D = kt == null ? void 0 : kt.product_items) == null ? void 0 : D.length) > 0 && (Ue.success("Added to cart", {
|
|
1012
1012
|
position: "bottom-right",
|
|
1013
1013
|
autoClose: 3e3,
|
|
1014
1014
|
hideProgressBar: !1,
|
|
1015
1015
|
closeOnClick: !0,
|
|
1016
1016
|
pauseOnHover: !0,
|
|
1017
1017
|
draggable: !0
|
|
1018
|
-
}), Jt(
|
|
1018
|
+
}), Jt(me), Y(!1));
|
|
1019
1019
|
return;
|
|
1020
1020
|
}
|
|
1021
1021
|
}
|
|
1022
|
-
const
|
|
1022
|
+
const gt = {
|
|
1023
1023
|
productItems: [
|
|
1024
1024
|
{
|
|
1025
|
-
productId: ((
|
|
1025
|
+
productId: ((ee = k.variants) == null ? void 0 : ee[0].product_id) || ((ae = k.variants) == null ? void 0 : ae[0].productId) || (k == null ? void 0 : k.id),
|
|
1026
1026
|
quantity: 1
|
|
1027
1027
|
}
|
|
1028
1028
|
]
|
|
1029
|
-
}, I = await
|
|
1029
|
+
}, I = await Ln(qe, gt);
|
|
1030
1030
|
if (console.log(
|
|
1031
1031
|
I,
|
|
1032
1032
|
I == null ? void 0 : I.basket_id,
|
|
1033
1033
|
I == null ? void 0 : I.basketId,
|
|
1034
1034
|
"the basket response"
|
|
1035
1035
|
), !(I != null && I.basket_id || !(I != null && I.basketId))) {
|
|
1036
|
-
|
|
1036
|
+
Y(!1), console.error("Failed to create basket");
|
|
1037
1037
|
return;
|
|
1038
1038
|
}
|
|
1039
|
-
|
|
1039
|
+
ct(
|
|
1040
1040
|
(I == null ? void 0 : I.basket_id) || (I == null ? void 0 : I.basketId)
|
|
1041
1041
|
);
|
|
1042
|
-
const
|
|
1042
|
+
const De = await r(
|
|
1043
1043
|
{
|
|
1044
1044
|
productId: i,
|
|
1045
|
-
quantity:
|
|
1045
|
+
quantity: $
|
|
1046
1046
|
},
|
|
1047
1047
|
(I == null ? void 0 : I.basket_id) || (I == null ? void 0 : I.basketId)
|
|
1048
1048
|
);
|
|
1049
|
-
(((
|
|
1049
|
+
(((Ne = De == null ? void 0 : De.product_items) == null ? void 0 : Ne.length) > 0 || ((Ce = De == null ? void 0 : De.productItems) == null ? void 0 : Ce.length) > 0) && Ue.success("Added to cart", {
|
|
1050
1050
|
position: "bottom-right",
|
|
1051
1051
|
autoClose: 3e3,
|
|
1052
1052
|
hideProgressBar: !1,
|
|
@@ -1056,22 +1056,22 @@ const it = (e) => {
|
|
|
1056
1056
|
}), Jt(I.basket_id || (I == null ? void 0 : I.basketId));
|
|
1057
1057
|
}
|
|
1058
1058
|
} catch (k) {
|
|
1059
|
-
|
|
1059
|
+
Y(!1), console.error("Error adding to cart:", k), Ue.error("Failed to add product to cart", {
|
|
1060
1060
|
position: "bottom-right",
|
|
1061
1061
|
autoClose: 3e3
|
|
1062
|
-
}), ((
|
|
1063
|
-
((
|
|
1062
|
+
}), ((te = k == null ? void 0 : k.response) == null ? void 0 : te.status) === 404 || // Basket not found
|
|
1063
|
+
((Q = k == null ? void 0 : k.response) == null ? void 0 : Q.status) === 401 ? (((_e = k == null ? void 0 : k.response) == null ? void 0 : _e.status) === 404 && ct(null), ((re = k == null ? void 0 : k.response) == null ? void 0 : re.status) === 401 && (ct(null), Wt(null))) : (console.error("Failed to add product to basket:", k.message), Ue.error("Failed to add product to cart", {
|
|
1064
1064
|
position: "bottom-right",
|
|
1065
1065
|
autoClose: 3e3
|
|
1066
1066
|
}));
|
|
1067
1067
|
}
|
|
1068
|
-
|
|
1068
|
+
Y(!1);
|
|
1069
1069
|
};
|
|
1070
|
-
return
|
|
1070
|
+
return ke(() => {
|
|
1071
1071
|
F ? setTimeout(() => _(!0), 10) : _(!1);
|
|
1072
|
-
}, [F]), /* @__PURE__ */ a("div", { className: "relative flex justify-center", children: /* @__PURE__ */ d(
|
|
1072
|
+
}, [F]), /* @__PURE__ */ a("div", { className: "relative flex justify-center", children: /* @__PURE__ */ d(Jo, { open: y, onOpenChange: x, children: [
|
|
1073
1073
|
/* @__PURE__ */ a(
|
|
1074
|
-
|
|
1074
|
+
Ko,
|
|
1075
1075
|
{
|
|
1076
1076
|
onClick: () => x(!0),
|
|
1077
1077
|
style: {
|
|
@@ -1133,7 +1133,7 @@ const it = (e) => {
|
|
|
1133
1133
|
) })
|
|
1134
1134
|
}
|
|
1135
1135
|
),
|
|
1136
|
-
F && /* @__PURE__ */ d(
|
|
1136
|
+
F && /* @__PURE__ */ d(ve, { children: [
|
|
1137
1137
|
/* @__PURE__ */ a(
|
|
1138
1138
|
"div",
|
|
1139
1139
|
{
|
|
@@ -1277,12 +1277,12 @@ const it = (e) => {
|
|
|
1277
1277
|
/* @__PURE__ */ d(
|
|
1278
1278
|
"div",
|
|
1279
1279
|
{
|
|
1280
|
-
className: `flex flex-col h-full ${
|
|
1280
|
+
className: `flex flex-col h-full ${R ? "lg:w-2/3 w-full" : "w-full"}`,
|
|
1281
1281
|
children: [
|
|
1282
1282
|
/* @__PURE__ */ d(
|
|
1283
1283
|
"div",
|
|
1284
1284
|
{
|
|
1285
|
-
ref:
|
|
1285
|
+
ref: z,
|
|
1286
1286
|
className: "overflow-y-auto pr-5 pb-2 space-y-4 hide-scrollbar flex-grow mb-24",
|
|
1287
1287
|
children: [
|
|
1288
1288
|
(O == null ? void 0 : O.whomRequired) && /* @__PURE__ */ d(
|
|
@@ -1294,11 +1294,11 @@ const it = (e) => {
|
|
|
1294
1294
|
/* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2 mt-2", children: n.map((m) => /* @__PURE__ */ a(
|
|
1295
1295
|
"button",
|
|
1296
1296
|
{
|
|
1297
|
-
onClick: () =>
|
|
1297
|
+
onClick: () => Se(m),
|
|
1298
1298
|
className: "px-2 py-2 font-semibold text-xs text-[#18181B] bg-[#F3F3F3] rounded-2xl",
|
|
1299
1299
|
style: {
|
|
1300
|
-
backgroundColor:
|
|
1301
|
-
borderColor:
|
|
1300
|
+
backgroundColor: le === o[m] ? "#FFFFFF" : "#F3F3F3",
|
|
1301
|
+
borderColor: le === o[m] ? "#BBB3DD" : ""
|
|
1302
1302
|
},
|
|
1303
1303
|
children: m
|
|
1304
1304
|
},
|
|
@@ -1307,8 +1307,8 @@ const it = (e) => {
|
|
|
1307
1307
|
]
|
|
1308
1308
|
}
|
|
1309
1309
|
),
|
|
1310
|
-
|
|
1311
|
-
var
|
|
1310
|
+
Le.map((m, $) => {
|
|
1311
|
+
var L, K;
|
|
1312
1312
|
return /* @__PURE__ */ d("div", { children: [
|
|
1313
1313
|
/* @__PURE__ */ a(
|
|
1314
1314
|
"div",
|
|
@@ -1334,9 +1334,9 @@ const it = (e) => {
|
|
|
1334
1334
|
}
|
|
1335
1335
|
}
|
|
1336
1336
|
) }),
|
|
1337
|
-
|
|
1338
|
-
(m == null ? void 0 : m.products) && ((
|
|
1339
|
-
|
|
1337
|
+
$e && !m.response.includes("Thinking") && ((L = m.products) == null ? void 0 : L.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" }) }),
|
|
1338
|
+
(m == null ? void 0 : m.products) && ((K = m == null ? void 0 : m.products) == null ? void 0 : K.length) > 0 && /* @__PURE__ */ a(
|
|
1339
|
+
ta,
|
|
1340
1340
|
{
|
|
1341
1341
|
chat: m.products,
|
|
1342
1342
|
storeDetails: O
|
|
@@ -1351,17 +1351,17 @@ const it = (e) => {
|
|
|
1351
1351
|
children: "Why not explore these inquiries..."
|
|
1352
1352
|
}
|
|
1353
1353
|
),
|
|
1354
|
-
m.potentialQuestions.split(",").map((
|
|
1354
|
+
m.potentialQuestions.split(",").map((M, j) => /* @__PURE__ */ a(
|
|
1355
1355
|
"button",
|
|
1356
1356
|
{
|
|
1357
1357
|
className: `cursor-pointer font-nunitoSans font-semibold text-[#232323] border bg-[#804C9E0D] border-${O.themeDarkColor} m-1 rounded-xl px-2 py-1`,
|
|
1358
|
-
onClick: () =>
|
|
1358
|
+
onClick: () => Ae(M),
|
|
1359
1359
|
style: {
|
|
1360
1360
|
backgroundColor: O.tanyaThemeColorLight
|
|
1361
1361
|
},
|
|
1362
|
-
children:
|
|
1362
|
+
children: M
|
|
1363
1363
|
},
|
|
1364
|
-
|
|
1364
|
+
j
|
|
1365
1365
|
))
|
|
1366
1366
|
] }),
|
|
1367
1367
|
(m == null ? void 0 : m.secondaryLoading) && /* @__PURE__ */ a("div", { className: "mt-3 mb-4 px-4", children: /* @__PURE__ */ d(
|
|
@@ -1397,7 +1397,7 @@ const it = (e) => {
|
|
|
1397
1397
|
]
|
|
1398
1398
|
}
|
|
1399
1399
|
) }),
|
|
1400
|
-
(m == null ? void 0 : m.secondaryResponse) && /* @__PURE__ */ a(
|
|
1400
|
+
(m == null ? void 0 : m.secondaryResponse) && /* @__PURE__ */ a(ve, { children: /* @__PURE__ */ d("div", { className: "mt-3 mb-8 px-4 bg-indigo-300 rounded-tr-[5px]", children: [
|
|
1401
1401
|
/* @__PURE__ */ a(
|
|
1402
1402
|
"div",
|
|
1403
1403
|
{
|
|
@@ -1465,18 +1465,18 @@ const it = (e) => {
|
|
|
1465
1465
|
"button",
|
|
1466
1466
|
{
|
|
1467
1467
|
className: "px-3 py-1 text-sm",
|
|
1468
|
-
onClick: () =>
|
|
1469
|
-
(
|
|
1470
|
-
(
|
|
1471
|
-
...
|
|
1468
|
+
onClick: () => we(
|
|
1469
|
+
(M) => M.map(
|
|
1470
|
+
(j, fe) => fe === $ && j.productSnapshot ? {
|
|
1471
|
+
...j,
|
|
1472
1472
|
productSnapshot: {
|
|
1473
|
-
...
|
|
1473
|
+
...j.productSnapshot,
|
|
1474
1474
|
quantity: Math.max(
|
|
1475
1475
|
1,
|
|
1476
|
-
|
|
1476
|
+
j.productSnapshot.quantity - 1
|
|
1477
1477
|
)
|
|
1478
1478
|
}
|
|
1479
|
-
} :
|
|
1479
|
+
} : j
|
|
1480
1480
|
)
|
|
1481
1481
|
),
|
|
1482
1482
|
style: {
|
|
@@ -1491,15 +1491,15 @@ const it = (e) => {
|
|
|
1491
1491
|
"button",
|
|
1492
1492
|
{
|
|
1493
1493
|
className: "px-3 py-1 text-sm",
|
|
1494
|
-
onClick: () =>
|
|
1495
|
-
(
|
|
1496
|
-
(
|
|
1497
|
-
...
|
|
1494
|
+
onClick: () => we(
|
|
1495
|
+
(M) => M.map(
|
|
1496
|
+
(j, fe) => fe === $ && j.productSnapshot ? {
|
|
1497
|
+
...j,
|
|
1498
1498
|
productSnapshot: {
|
|
1499
|
-
...
|
|
1500
|
-
quantity:
|
|
1499
|
+
...j.productSnapshot,
|
|
1500
|
+
quantity: j.productSnapshot.quantity + 1
|
|
1501
1501
|
}
|
|
1502
|
-
} :
|
|
1502
|
+
} : j
|
|
1503
1503
|
)
|
|
1504
1504
|
),
|
|
1505
1505
|
style: {
|
|
@@ -1515,7 +1515,7 @@ const it = (e) => {
|
|
|
1515
1515
|
{
|
|
1516
1516
|
onClick: () => {
|
|
1517
1517
|
er(
|
|
1518
|
-
|
|
1518
|
+
Oe(
|
|
1519
1519
|
m.productSnapshot
|
|
1520
1520
|
),
|
|
1521
1521
|
m.productSnapshot.quantity
|
|
@@ -1538,7 +1538,7 @@ const it = (e) => {
|
|
|
1538
1538
|
) })
|
|
1539
1539
|
] }) }),
|
|
1540
1540
|
/* @__PURE__ */ a("div", { className: "mb-20" })
|
|
1541
|
-
] },
|
|
1541
|
+
] }, $);
|
|
1542
1542
|
})
|
|
1543
1543
|
]
|
|
1544
1544
|
}
|
|
@@ -1556,11 +1556,11 @@ const it = (e) => {
|
|
|
1556
1556
|
{
|
|
1557
1557
|
className: "flex-1 bg-[#FFFFFF] text-[#232323] outline-none border-none px-2 py-2 text-sm",
|
|
1558
1558
|
placeholder: "How can I help you...",
|
|
1559
|
-
value:
|
|
1559
|
+
value: V,
|
|
1560
1560
|
autoFocus: !0,
|
|
1561
|
-
onChange: (m) =>
|
|
1561
|
+
onChange: (m) => be(m.target.value),
|
|
1562
1562
|
onKeyDown: (m) => {
|
|
1563
|
-
m.key === "Enter" && !w &&
|
|
1563
|
+
m.key === "Enter" && !w && Ae();
|
|
1564
1564
|
}
|
|
1565
1565
|
}
|
|
1566
1566
|
),
|
|
@@ -1570,7 +1570,7 @@ const it = (e) => {
|
|
|
1570
1570
|
type: "submit",
|
|
1571
1571
|
disabled: w,
|
|
1572
1572
|
className: "p-3",
|
|
1573
|
-
onClick: () =>
|
|
1573
|
+
onClick: () => Ae(),
|
|
1574
1574
|
children: w ? /* @__PURE__ */ a(
|
|
1575
1575
|
"div",
|
|
1576
1576
|
{
|
|
@@ -1605,7 +1605,7 @@ const it = (e) => {
|
|
|
1605
1605
|
]
|
|
1606
1606
|
}
|
|
1607
1607
|
),
|
|
1608
|
-
/* @__PURE__ */ a(
|
|
1608
|
+
/* @__PURE__ */ a(na, { addToCartPwa: r })
|
|
1609
1609
|
] })
|
|
1610
1610
|
]
|
|
1611
1611
|
}
|
|
@@ -1620,7 +1620,7 @@ var mr = function(e, t) {
|
|
|
1620
1620
|
for (var o in n) Object.prototype.hasOwnProperty.call(n, o) && (r[o] = n[o]);
|
|
1621
1621
|
}, mr(e, t);
|
|
1622
1622
|
};
|
|
1623
|
-
function
|
|
1623
|
+
function aa(e, t) {
|
|
1624
1624
|
if (typeof t != "function" && t !== null)
|
|
1625
1625
|
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
|
|
1626
1626
|
mr(e, t);
|
|
@@ -1629,16 +1629,16 @@ function oa(e, t) {
|
|
|
1629
1629
|
}
|
|
1630
1630
|
e.prototype = t === null ? Object.create(t) : (r.prototype = t.prototype, new r());
|
|
1631
1631
|
}
|
|
1632
|
-
var
|
|
1633
|
-
return
|
|
1632
|
+
var Xe = function() {
|
|
1633
|
+
return Xe = Object.assign || function(t) {
|
|
1634
1634
|
for (var r, n = 1, o = arguments.length; n < o; n++) {
|
|
1635
1635
|
r = arguments[n];
|
|
1636
1636
|
for (var s in r) Object.prototype.hasOwnProperty.call(r, s) && (t[s] = r[s]);
|
|
1637
1637
|
}
|
|
1638
1638
|
return t;
|
|
1639
|
-
},
|
|
1639
|
+
}, Xe.apply(this, arguments);
|
|
1640
1640
|
};
|
|
1641
|
-
function
|
|
1641
|
+
function sa(e, t) {
|
|
1642
1642
|
var r = {};
|
|
1643
1643
|
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
|
|
1644
1644
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -1646,28 +1646,28 @@ function aa(e, t) {
|
|
|
1646
1646
|
t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
|
|
1647
1647
|
return r;
|
|
1648
1648
|
}
|
|
1649
|
-
var nr = "Invariant Violation",
|
|
1649
|
+
var nr = "Invariant Violation", Qr = Object.setPrototypeOf, ia = Qr === void 0 ? function(e, t) {
|
|
1650
1650
|
return e.__proto__ = t, e;
|
|
1651
|
-
} :
|
|
1651
|
+
} : Qr, zn = (
|
|
1652
1652
|
/** @class */
|
|
1653
1653
|
(function(e) {
|
|
1654
|
-
|
|
1654
|
+
aa(t, e);
|
|
1655
1655
|
function t(r) {
|
|
1656
1656
|
r === void 0 && (r = nr);
|
|
1657
1657
|
var n = e.call(this, typeof r == "number" ? nr + ": " + r + " (see https://github.com/apollographql/invariant-packages)" : r) || this;
|
|
1658
|
-
return n.framesToPop = 1, n.name = nr,
|
|
1658
|
+
return n.framesToPop = 1, n.name = nr, ia(n, t.prototype), n;
|
|
1659
1659
|
}
|
|
1660
1660
|
return t;
|
|
1661
1661
|
})(Error)
|
|
1662
1662
|
);
|
|
1663
|
-
function
|
|
1663
|
+
function lt(e, t) {
|
|
1664
1664
|
if (!e)
|
|
1665
|
-
throw new
|
|
1665
|
+
throw new zn(t);
|
|
1666
1666
|
}
|
|
1667
|
-
var
|
|
1667
|
+
var Mn = ["debug", "log", "warn", "error", "silent"], la = Mn.indexOf("log");
|
|
1668
1668
|
function zt(e) {
|
|
1669
1669
|
return function() {
|
|
1670
|
-
if (
|
|
1670
|
+
if (Mn.indexOf(e) >= la) {
|
|
1671
1671
|
var t = console[e] || console.log;
|
|
1672
1672
|
return t.apply(console, arguments);
|
|
1673
1673
|
}
|
|
@@ -1675,8 +1675,8 @@ function zt(e) {
|
|
|
1675
1675
|
}
|
|
1676
1676
|
(function(e) {
|
|
1677
1677
|
e.debug = zt("debug"), e.log = zt("log"), e.warn = zt("warn"), e.error = zt("error");
|
|
1678
|
-
})(
|
|
1679
|
-
var
|
|
1678
|
+
})(lt || (lt = {}));
|
|
1679
|
+
var Bn = "3.14.0";
|
|
1680
1680
|
function wt(e) {
|
|
1681
1681
|
try {
|
|
1682
1682
|
return e();
|
|
@@ -1700,13 +1700,13 @@ const hr = wt(function() {
|
|
|
1700
1700
|
wt(function() {
|
|
1701
1701
|
return wt.constructor("return this")();
|
|
1702
1702
|
});
|
|
1703
|
-
var
|
|
1704
|
-
function
|
|
1705
|
-
var t =
|
|
1706
|
-
return
|
|
1703
|
+
var Xr = /* @__PURE__ */ new Map();
|
|
1704
|
+
function ca(e) {
|
|
1705
|
+
var t = Xr.get(e) || 1;
|
|
1706
|
+
return Xr.set(e, t + 1), "".concat(e, ":").concat(t, ":").concat(Math.random().toString(36).slice(2));
|
|
1707
1707
|
}
|
|
1708
|
-
function
|
|
1709
|
-
var r =
|
|
1708
|
+
function da(e, t) {
|
|
1709
|
+
var r = ca("stringifyForDisplay");
|
|
1710
1710
|
return JSON.stringify(e, function(n, o) {
|
|
1711
1711
|
return o === void 0 ? r : o;
|
|
1712
1712
|
}, t).split(JSON.stringify(r)).join("<undefined>");
|
|
@@ -1725,132 +1725,132 @@ function Mt(e) {
|
|
|
1725
1725
|
var or = Object.assign(function(t, r) {
|
|
1726
1726
|
for (var n = [], o = 2; o < arguments.length; o++)
|
|
1727
1727
|
n[o - 2] = arguments[o];
|
|
1728
|
-
t ||
|
|
1728
|
+
t || lt(t, kr(r, n) || Sr(r, n));
|
|
1729
1729
|
}, {
|
|
1730
|
-
debug: Mt(
|
|
1731
|
-
log: Mt(
|
|
1732
|
-
warn: Mt(
|
|
1733
|
-
error: Mt(
|
|
1730
|
+
debug: Mt(lt.debug),
|
|
1731
|
+
log: Mt(lt.log),
|
|
1732
|
+
warn: Mt(lt.warn),
|
|
1733
|
+
error: Mt(lt.error)
|
|
1734
1734
|
});
|
|
1735
|
-
function
|
|
1735
|
+
function Un(e) {
|
|
1736
1736
|
for (var t = [], r = 1; r < arguments.length; r++)
|
|
1737
1737
|
t[r - 1] = arguments[r];
|
|
1738
|
-
return new
|
|
1738
|
+
return new zn(kr(e, t) || Sr(e, t));
|
|
1739
1739
|
}
|
|
1740
|
-
var
|
|
1741
|
-
function
|
|
1740
|
+
var Zr = Symbol.for("ApolloErrorMessageHandler_" + Bn);
|
|
1741
|
+
function qn(e) {
|
|
1742
1742
|
if (typeof e == "string")
|
|
1743
1743
|
return e;
|
|
1744
1744
|
try {
|
|
1745
|
-
return
|
|
1745
|
+
return da(e, 2).slice(0, 1e3);
|
|
1746
1746
|
} catch {
|
|
1747
1747
|
return "<non-serializable>";
|
|
1748
1748
|
}
|
|
1749
1749
|
}
|
|
1750
1750
|
function kr(e, t) {
|
|
1751
1751
|
if (t === void 0 && (t = []), !!e)
|
|
1752
|
-
return hr[
|
|
1752
|
+
return hr[Zr] && hr[Zr](e, t.map(qn));
|
|
1753
1753
|
}
|
|
1754
1754
|
function Sr(e, t) {
|
|
1755
1755
|
if (t === void 0 && (t = []), !!e)
|
|
1756
1756
|
return "An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({
|
|
1757
|
-
version:
|
|
1757
|
+
version: Bn,
|
|
1758
1758
|
message: e,
|
|
1759
|
-
args: t.map(
|
|
1759
|
+
args: t.map(qn)
|
|
1760
1760
|
})));
|
|
1761
1761
|
}
|
|
1762
|
-
function
|
|
1762
|
+
function ua(e) {
|
|
1763
1763
|
return e.definitions.filter(function(t) {
|
|
1764
1764
|
return t.kind === "OperationDefinition" && !!t.name;
|
|
1765
1765
|
}).map(function(t) {
|
|
1766
1766
|
return t.name.value;
|
|
1767
1767
|
})[0] || null;
|
|
1768
1768
|
}
|
|
1769
|
-
let
|
|
1770
|
-
const
|
|
1771
|
-
let
|
|
1772
|
-
const
|
|
1769
|
+
let de = null;
|
|
1770
|
+
const en = {};
|
|
1771
|
+
let fa = 1;
|
|
1772
|
+
const ma = () => class {
|
|
1773
1773
|
constructor() {
|
|
1774
1774
|
this.id = [
|
|
1775
1775
|
"slot",
|
|
1776
|
-
|
|
1776
|
+
fa++,
|
|
1777
1777
|
Date.now(),
|
|
1778
1778
|
Math.random().toString(36).slice(2)
|
|
1779
1779
|
].join(":");
|
|
1780
1780
|
}
|
|
1781
1781
|
hasValue() {
|
|
1782
|
-
for (let t =
|
|
1782
|
+
for (let t = de; t; t = t.parent)
|
|
1783
1783
|
if (this.id in t.slots) {
|
|
1784
1784
|
const r = t.slots[this.id];
|
|
1785
|
-
if (r ===
|
|
1785
|
+
if (r === en)
|
|
1786
1786
|
break;
|
|
1787
|
-
return t !==
|
|
1787
|
+
return t !== de && (de.slots[this.id] = r), !0;
|
|
1788
1788
|
}
|
|
1789
|
-
return
|
|
1789
|
+
return de && (de.slots[this.id] = en), !1;
|
|
1790
1790
|
}
|
|
1791
1791
|
getValue() {
|
|
1792
1792
|
if (this.hasValue())
|
|
1793
|
-
return
|
|
1793
|
+
return de.slots[this.id];
|
|
1794
1794
|
}
|
|
1795
1795
|
withValue(t, r, n, o) {
|
|
1796
1796
|
const s = {
|
|
1797
1797
|
__proto__: null,
|
|
1798
1798
|
[this.id]: t
|
|
1799
|
-
}, i =
|
|
1800
|
-
|
|
1799
|
+
}, i = de;
|
|
1800
|
+
de = { parent: i, slots: s };
|
|
1801
1801
|
try {
|
|
1802
1802
|
return r.apply(o, n);
|
|
1803
1803
|
} finally {
|
|
1804
|
-
|
|
1804
|
+
de = i;
|
|
1805
1805
|
}
|
|
1806
1806
|
}
|
|
1807
1807
|
// Capture the current context and wrap a callback function so that it
|
|
1808
1808
|
// reestablishes the captured context when called.
|
|
1809
1809
|
static bind(t) {
|
|
1810
|
-
const r =
|
|
1810
|
+
const r = de;
|
|
1811
1811
|
return function() {
|
|
1812
|
-
const n =
|
|
1812
|
+
const n = de;
|
|
1813
1813
|
try {
|
|
1814
|
-
return
|
|
1814
|
+
return de = r, t.apply(this, arguments);
|
|
1815
1815
|
} finally {
|
|
1816
|
-
|
|
1816
|
+
de = n;
|
|
1817
1817
|
}
|
|
1818
1818
|
};
|
|
1819
1819
|
}
|
|
1820
1820
|
// Immediately run a callback function without any captured context.
|
|
1821
1821
|
static noContext(t, r, n) {
|
|
1822
|
-
if (
|
|
1823
|
-
const o =
|
|
1822
|
+
if (de) {
|
|
1823
|
+
const o = de;
|
|
1824
1824
|
try {
|
|
1825
|
-
return
|
|
1825
|
+
return de = null, t.apply(n, r);
|
|
1826
1826
|
} finally {
|
|
1827
|
-
|
|
1827
|
+
de = o;
|
|
1828
1828
|
}
|
|
1829
1829
|
} else
|
|
1830
1830
|
return t.apply(n, r);
|
|
1831
1831
|
}
|
|
1832
1832
|
};
|
|
1833
|
-
function
|
|
1833
|
+
function tn(e) {
|
|
1834
1834
|
try {
|
|
1835
1835
|
return e();
|
|
1836
1836
|
} catch {
|
|
1837
1837
|
}
|
|
1838
1838
|
}
|
|
1839
|
-
const ar = "@wry/context:Slot",
|
|
1839
|
+
const ar = "@wry/context:Slot", ha = (
|
|
1840
1840
|
// Prefer globalThis when available.
|
|
1841
1841
|
// https://github.com/benjamn/wryware/issues/347
|
|
1842
|
-
|
|
1842
|
+
tn(() => globalThis) || // Fall back to global, which works in Node.js and may be converted by some
|
|
1843
1843
|
// bundlers to the appropriate identifier (window, self, ...) depending on the
|
|
1844
1844
|
// bundling target. https://github.com/endojs/endo/issues/576#issuecomment-1178515224
|
|
1845
|
-
|
|
1845
|
+
tn(() => global) || // Otherwise, use a dummy host that's local to this module. We used to fall
|
|
1846
1846
|
// back to using the Array constructor as a namespace, but that was flagged in
|
|
1847
1847
|
// https://github.com/benjamn/wryware/issues/347, and can be avoided.
|
|
1848
1848
|
/* @__PURE__ */ Object.create(null)
|
|
1849
|
-
),
|
|
1849
|
+
), rn = ha, Nr = rn[ar] || // Earlier versions of this package stored the globalKey property on the Array
|
|
1850
1850
|
// constructor, so we check there as well, to prevent Slot class duplication.
|
|
1851
1851
|
Array[ar] || (function(e) {
|
|
1852
1852
|
try {
|
|
1853
|
-
Object.defineProperty(
|
|
1853
|
+
Object.defineProperty(rn, ar, {
|
|
1854
1854
|
value: e,
|
|
1855
1855
|
enumerable: !1,
|
|
1856
1856
|
writable: !1,
|
|
@@ -1865,12 +1865,12 @@ Array[ar] || (function(e) {
|
|
|
1865
1865
|
} finally {
|
|
1866
1866
|
return e;
|
|
1867
1867
|
}
|
|
1868
|
-
})(
|
|
1868
|
+
})(ma()), { bind: li, noContext: ci } = Nr;
|
|
1869
1869
|
new Nr();
|
|
1870
|
-
function
|
|
1870
|
+
function pa(e, t) {
|
|
1871
1871
|
var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
1872
1872
|
if (r) return (r = r.call(e)).next.bind(r);
|
|
1873
|
-
if (Array.isArray(e) || (r =
|
|
1873
|
+
if (Array.isArray(e) || (r = ga(e)) || t) {
|
|
1874
1874
|
r && (e = r);
|
|
1875
1875
|
var n = 0;
|
|
1876
1876
|
return function() {
|
|
@@ -1880,28 +1880,28 @@ function ha(e, t) {
|
|
|
1880
1880
|
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
1881
1881
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1882
1882
|
}
|
|
1883
|
-
function
|
|
1883
|
+
function ga(e, t) {
|
|
1884
1884
|
if (e) {
|
|
1885
|
-
if (typeof e == "string") return
|
|
1885
|
+
if (typeof e == "string") return nn(e, t);
|
|
1886
1886
|
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
1887
1887
|
if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(e);
|
|
1888
|
-
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return
|
|
1888
|
+
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return nn(e, t);
|
|
1889
1889
|
}
|
|
1890
1890
|
}
|
|
1891
|
-
function
|
|
1891
|
+
function nn(e, t) {
|
|
1892
1892
|
(t == null || t > e.length) && (t = e.length);
|
|
1893
1893
|
for (var r = 0, n = new Array(t); r < t; r++)
|
|
1894
1894
|
n[r] = e[r];
|
|
1895
1895
|
return n;
|
|
1896
1896
|
}
|
|
1897
|
-
function
|
|
1897
|
+
function on(e, t) {
|
|
1898
1898
|
for (var r = 0; r < t.length; r++) {
|
|
1899
1899
|
var n = t[r];
|
|
1900
1900
|
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);
|
|
1901
1901
|
}
|
|
1902
1902
|
}
|
|
1903
1903
|
function Cr(e, t, r) {
|
|
1904
|
-
return t &&
|
|
1904
|
+
return t && on(e.prototype, t), r && on(e, r), Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
1905
1905
|
}
|
|
1906
1906
|
var _r = function() {
|
|
1907
1907
|
return typeof Symbol == "function";
|
|
@@ -1911,7 +1911,7 @@ var _r = function() {
|
|
|
1911
1911
|
return Ir(e) ? Symbol[e] : "@@" + e;
|
|
1912
1912
|
};
|
|
1913
1913
|
_r() && !Ir("observable") && (Symbol.observable = Symbol("observable"));
|
|
1914
|
-
var
|
|
1914
|
+
var wa = Fr("iterator"), pr = Fr("observable"), Rn = Fr("species");
|
|
1915
1915
|
function Gt(e, t) {
|
|
1916
1916
|
var r = e[t];
|
|
1917
1917
|
if (r != null) {
|
|
@@ -1921,10 +1921,10 @@ function Gt(e, t) {
|
|
|
1921
1921
|
}
|
|
1922
1922
|
function _t(e) {
|
|
1923
1923
|
var t = e.constructor;
|
|
1924
|
-
return t !== void 0 && (t = t[
|
|
1924
|
+
return t !== void 0 && (t = t[Rn], t === null && (t = void 0)), t !== void 0 ? t : ge;
|
|
1925
1925
|
}
|
|
1926
|
-
function
|
|
1927
|
-
return e instanceof
|
|
1926
|
+
function ya(e) {
|
|
1927
|
+
return e instanceof ge;
|
|
1928
1928
|
}
|
|
1929
1929
|
function xt(e) {
|
|
1930
1930
|
xt.log ? xt.log(e) : setTimeout(function() {
|
|
@@ -1940,7 +1940,7 @@ function Ut(e) {
|
|
|
1940
1940
|
}
|
|
1941
1941
|
});
|
|
1942
1942
|
}
|
|
1943
|
-
function
|
|
1943
|
+
function Hn(e) {
|
|
1944
1944
|
var t = e._cleanup;
|
|
1945
1945
|
if (t !== void 0 && (e._cleanup = void 0, !!t))
|
|
1946
1946
|
try {
|
|
@@ -1957,15 +1957,15 @@ function Rn(e) {
|
|
|
1957
1957
|
function gr(e) {
|
|
1958
1958
|
e._observer = void 0, e._queue = void 0, e._state = "closed";
|
|
1959
1959
|
}
|
|
1960
|
-
function
|
|
1960
|
+
function xa(e) {
|
|
1961
1961
|
var t = e._queue;
|
|
1962
1962
|
if (t) {
|
|
1963
1963
|
e._queue = void 0, e._state = "ready";
|
|
1964
|
-
for (var r = 0; r < t.length && (
|
|
1964
|
+
for (var r = 0; r < t.length && (Yn(e, t[r].type, t[r].value), e._state !== "closed"); ++r)
|
|
1965
1965
|
;
|
|
1966
1966
|
}
|
|
1967
1967
|
}
|
|
1968
|
-
function
|
|
1968
|
+
function Yn(e, t, r) {
|
|
1969
1969
|
e._state = "running";
|
|
1970
1970
|
var n = e._observer;
|
|
1971
1971
|
try {
|
|
@@ -1985,7 +1985,7 @@ function Hn(e, t, r) {
|
|
|
1985
1985
|
} catch (s) {
|
|
1986
1986
|
xt(s);
|
|
1987
1987
|
}
|
|
1988
|
-
e._state === "closed" ?
|
|
1988
|
+
e._state === "closed" ? Hn(e) : e._state === "running" && (e._state = "ready");
|
|
1989
1989
|
}
|
|
1990
1990
|
function sr(e, t, r) {
|
|
1991
1991
|
if (e._state !== "closed") {
|
|
@@ -2001,17 +2001,17 @@ function sr(e, t, r) {
|
|
|
2001
2001
|
type: t,
|
|
2002
2002
|
value: r
|
|
2003
2003
|
}], Ut(function() {
|
|
2004
|
-
return
|
|
2004
|
+
return xa(e);
|
|
2005
2005
|
});
|
|
2006
2006
|
return;
|
|
2007
2007
|
}
|
|
2008
|
-
|
|
2008
|
+
Yn(e, t, r);
|
|
2009
2009
|
}
|
|
2010
2010
|
}
|
|
2011
|
-
var
|
|
2011
|
+
var ba = /* @__PURE__ */ (function() {
|
|
2012
2012
|
function e(r, n) {
|
|
2013
2013
|
this._cleanup = void 0, this._observer = r, this._queue = void 0, this._state = "initializing";
|
|
2014
|
-
var o = new
|
|
2014
|
+
var o = new va(this);
|
|
2015
2015
|
try {
|
|
2016
2016
|
this._cleanup = n.call(void 0, o);
|
|
2017
2017
|
} catch (s) {
|
|
@@ -2021,14 +2021,14 @@ var xa = /* @__PURE__ */ (function() {
|
|
|
2021
2021
|
}
|
|
2022
2022
|
var t = e.prototype;
|
|
2023
2023
|
return t.unsubscribe = function() {
|
|
2024
|
-
this._state !== "closed" && (gr(this),
|
|
2024
|
+
this._state !== "closed" && (gr(this), Hn(this));
|
|
2025
2025
|
}, Cr(e, [{
|
|
2026
2026
|
key: "closed",
|
|
2027
2027
|
get: function() {
|
|
2028
2028
|
return this._state === "closed";
|
|
2029
2029
|
}
|
|
2030
2030
|
}]), e;
|
|
2031
|
-
})(),
|
|
2031
|
+
})(), va = /* @__PURE__ */ (function() {
|
|
2032
2032
|
function e(r) {
|
|
2033
2033
|
this._subscription = r;
|
|
2034
2034
|
}
|
|
@@ -2045,7 +2045,7 @@ var xa = /* @__PURE__ */ (function() {
|
|
|
2045
2045
|
return this._subscription._state === "closed";
|
|
2046
2046
|
}
|
|
2047
2047
|
}]), e;
|
|
2048
|
-
})(),
|
|
2048
|
+
})(), ge = /* @__PURE__ */ (function() {
|
|
2049
2049
|
function e(r) {
|
|
2050
2050
|
if (!(this instanceof e)) throw new TypeError("Observable cannot be called as a function");
|
|
2051
2051
|
if (typeof r != "function") throw new TypeError("Observable initializer must be a function");
|
|
@@ -2057,7 +2057,7 @@ var xa = /* @__PURE__ */ (function() {
|
|
|
2057
2057
|
next: n,
|
|
2058
2058
|
error: arguments[1],
|
|
2059
2059
|
complete: arguments[2]
|
|
2060
|
-
}), new
|
|
2060
|
+
}), new ba(n, this._subscriber);
|
|
2061
2061
|
}, t.forEach = function(n) {
|
|
2062
2062
|
var o = this;
|
|
2063
2063
|
return new Promise(function(s, i) {
|
|
@@ -2225,15 +2225,15 @@ var xa = /* @__PURE__ */ (function() {
|
|
|
2225
2225
|
if (s) {
|
|
2226
2226
|
var i = s.call(n);
|
|
2227
2227
|
if (Object(i) !== i) throw new TypeError(i + " is not an object");
|
|
2228
|
-
return
|
|
2228
|
+
return ya(i) && i.constructor === o ? i : new o(function(c) {
|
|
2229
2229
|
return i.subscribe(c);
|
|
2230
2230
|
});
|
|
2231
2231
|
}
|
|
2232
|
-
if (Ir("iterator") && (s = Gt(n,
|
|
2232
|
+
if (Ir("iterator") && (s = Gt(n, wa), s))
|
|
2233
2233
|
return new o(function(c) {
|
|
2234
2234
|
Ut(function() {
|
|
2235
2235
|
if (!c.closed) {
|
|
2236
|
-
for (var l =
|
|
2236
|
+
for (var l = pa(s.call(n)), p; !(p = l()).done; ) {
|
|
2237
2237
|
var g = p.value;
|
|
2238
2238
|
if (c.next(g), c.closed) return;
|
|
2239
2239
|
}
|
|
@@ -2266,20 +2266,20 @@ var xa = /* @__PURE__ */ (function() {
|
|
|
2266
2266
|
});
|
|
2267
2267
|
});
|
|
2268
2268
|
}, Cr(e, null, [{
|
|
2269
|
-
key:
|
|
2269
|
+
key: Rn,
|
|
2270
2270
|
get: function() {
|
|
2271
2271
|
return this;
|
|
2272
2272
|
}
|
|
2273
2273
|
}]), e;
|
|
2274
2274
|
})();
|
|
2275
|
-
_r() && Object.defineProperty(
|
|
2275
|
+
_r() && Object.defineProperty(ge, Symbol("extensions"), {
|
|
2276
2276
|
value: {
|
|
2277
2277
|
symbol: pr,
|
|
2278
2278
|
hostReportError: xt
|
|
2279
2279
|
},
|
|
2280
2280
|
configurable: !0
|
|
2281
2281
|
});
|
|
2282
|
-
function
|
|
2282
|
+
function ka(e) {
|
|
2283
2283
|
var t, r = e.Symbol;
|
|
2284
2284
|
if (typeof r == "function")
|
|
2285
2285
|
if (r.observable)
|
|
@@ -2297,12 +2297,12 @@ function va(e) {
|
|
|
2297
2297
|
}
|
|
2298
2298
|
var yt;
|
|
2299
2299
|
typeof self < "u" ? yt = self : typeof window < "u" ? yt = window : typeof global < "u" ? yt = global : typeof module < "u" ? yt = module : yt = Function("return this")();
|
|
2300
|
-
|
|
2301
|
-
var
|
|
2302
|
-
|
|
2300
|
+
ka(yt);
|
|
2301
|
+
var an = ge.prototype, sn = "@@observable";
|
|
2302
|
+
an[sn] || (an[sn] = function() {
|
|
2303
2303
|
return this;
|
|
2304
2304
|
});
|
|
2305
|
-
function
|
|
2305
|
+
function Sa(e) {
|
|
2306
2306
|
for (var t = [
|
|
2307
2307
|
"query",
|
|
2308
2308
|
"operationName",
|
|
@@ -2312,15 +2312,15 @@ function ka(e) {
|
|
|
2312
2312
|
], r = 0, n = Object.keys(e); r < n.length; r++) {
|
|
2313
2313
|
var o = n[r];
|
|
2314
2314
|
if (t.indexOf(o) < 0)
|
|
2315
|
-
throw
|
|
2315
|
+
throw Un(58, o);
|
|
2316
2316
|
}
|
|
2317
2317
|
return e;
|
|
2318
2318
|
}
|
|
2319
|
-
function
|
|
2320
|
-
var r =
|
|
2321
|
-
typeof s == "function" ? r =
|
|
2319
|
+
function Na(e, t) {
|
|
2320
|
+
var r = Xe({}, e), n = function(s) {
|
|
2321
|
+
typeof s == "function" ? r = Xe(Xe({}, r), s(r)) : r = Xe(Xe({}, r), s);
|
|
2322
2322
|
}, o = function() {
|
|
2323
|
-
return
|
|
2323
|
+
return Xe({}, r);
|
|
2324
2324
|
};
|
|
2325
2325
|
return Object.defineProperty(t, "setContext", {
|
|
2326
2326
|
enumerable: !1,
|
|
@@ -2330,24 +2330,24 @@ function Sa(e, t) {
|
|
|
2330
2330
|
value: o
|
|
2331
2331
|
}), t;
|
|
2332
2332
|
}
|
|
2333
|
-
function
|
|
2333
|
+
function Ca(e) {
|
|
2334
2334
|
var t = {
|
|
2335
2335
|
variables: e.variables || {},
|
|
2336
2336
|
extensions: e.extensions || {},
|
|
2337
2337
|
operationName: e.operationName,
|
|
2338
2338
|
query: e.query
|
|
2339
2339
|
};
|
|
2340
|
-
return t.operationName || (t.operationName = typeof t.query != "string" ?
|
|
2340
|
+
return t.operationName || (t.operationName = typeof t.query != "string" ? ua(t.query) || void 0 : ""), t;
|
|
2341
2341
|
}
|
|
2342
|
-
var
|
|
2343
|
-
function
|
|
2344
|
-
return _a
|
|
2342
|
+
var _a = Symbol.for("apollo.deprecations"), Ia = hr, Fa = new Nr();
|
|
2343
|
+
function Pa(e) {
|
|
2344
|
+
return Ia[_a] || (Fa.getValue() || []).includes(e);
|
|
2345
2345
|
}
|
|
2346
|
-
function
|
|
2347
|
-
|
|
2346
|
+
function Ta(e, t) {
|
|
2347
|
+
Pa(e) || t();
|
|
2348
2348
|
}
|
|
2349
|
-
function
|
|
2350
|
-
return t ? t(e) :
|
|
2349
|
+
function ln(e, t) {
|
|
2350
|
+
return t ? t(e) : ge.of();
|
|
2351
2351
|
}
|
|
2352
2352
|
function It(e) {
|
|
2353
2353
|
return typeof e == "function" ? new Vn(e) : e;
|
|
@@ -2363,21 +2363,21 @@ var Vn = (
|
|
|
2363
2363
|
}
|
|
2364
2364
|
return e.empty = function() {
|
|
2365
2365
|
return new e(function() {
|
|
2366
|
-
return
|
|
2366
|
+
return ge.of();
|
|
2367
2367
|
});
|
|
2368
2368
|
}, e.from = function(t) {
|
|
2369
2369
|
return t.length === 0 ? e.empty() : t.map(It).reduce(function(r, n) {
|
|
2370
2370
|
return r.concat(n);
|
|
2371
2371
|
});
|
|
2372
2372
|
}, e.split = function(t, r, n) {
|
|
2373
|
-
var o = It(r), s = It(n || new e(
|
|
2373
|
+
var o = It(r), s = It(n || new e(ln)), i;
|
|
2374
2374
|
return Bt(o) && Bt(s) ? i = new e(function(c) {
|
|
2375
|
-
return t(c) ? o.request(c) ||
|
|
2375
|
+
return t(c) ? o.request(c) || ge.of() : s.request(c) || ge.of();
|
|
2376
2376
|
}) : i = new e(function(c, l) {
|
|
2377
|
-
return t(c) ? o.request(c, l) ||
|
|
2377
|
+
return t(c) ? o.request(c, l) || ge.of() : s.request(c, l) || ge.of();
|
|
2378
2378
|
}), Object.assign(i, { left: o, right: s });
|
|
2379
2379
|
}, e.execute = function(t, r) {
|
|
2380
|
-
return t.request(
|
|
2380
|
+
return t.request(Na(r.context, Ca(Sa(r)))) || ge.of();
|
|
2381
2381
|
}, e.concat = function(t, r) {
|
|
2382
2382
|
var n = It(t);
|
|
2383
2383
|
if (Bt(n))
|
|
@@ -2385,21 +2385,21 @@ var Vn = (
|
|
|
2385
2385
|
var o = It(r), s;
|
|
2386
2386
|
return Bt(o) ? s = new e(function(i) {
|
|
2387
2387
|
return n.request(i, function(c) {
|
|
2388
|
-
return o.request(c) ||
|
|
2389
|
-
}) ||
|
|
2388
|
+
return o.request(c) || ge.of();
|
|
2389
|
+
}) || ge.of();
|
|
2390
2390
|
}) : s = new e(function(i, c) {
|
|
2391
2391
|
return n.request(i, function(l) {
|
|
2392
|
-
return o.request(l, c) ||
|
|
2393
|
-
}) ||
|
|
2392
|
+
return o.request(l, c) || ge.of();
|
|
2393
|
+
}) || ge.of();
|
|
2394
2394
|
}), Object.assign(s, { left: n, right: o });
|
|
2395
2395
|
}, e.prototype.split = function(t, r, n) {
|
|
2396
|
-
return this.concat(e.split(t, r, n || new e(
|
|
2396
|
+
return this.concat(e.split(t, r, n || new e(ln)));
|
|
2397
2397
|
}, e.prototype.concat = function(t) {
|
|
2398
2398
|
return e.concat(this, t);
|
|
2399
2399
|
}, e.prototype.request = function(t, r) {
|
|
2400
|
-
throw
|
|
2400
|
+
throw Un(48);
|
|
2401
2401
|
}, e.prototype.onError = function(t, r) {
|
|
2402
|
-
if (globalThis.__DEV__ !== !1 &&
|
|
2402
|
+
if (globalThis.__DEV__ !== !1 && Ta("onError", function() {
|
|
2403
2403
|
globalThis.__DEV__ !== !1 && or.warn(49);
|
|
2404
2404
|
}), r && r.error)
|
|
2405
2405
|
return r.error(t), !1;
|
|
@@ -2409,10 +2409,10 @@ var Vn = (
|
|
|
2409
2409
|
}, e;
|
|
2410
2410
|
})()
|
|
2411
2411
|
);
|
|
2412
|
-
function
|
|
2412
|
+
function Ea(e) {
|
|
2413
2413
|
return new Vn(function(t, r) {
|
|
2414
|
-
var n =
|
|
2415
|
-
return new
|
|
2414
|
+
var n = sa(t, []);
|
|
2415
|
+
return new ge(function(o) {
|
|
2416
2416
|
var s, i = !1;
|
|
2417
2417
|
return Promise.resolve(n).then(function(c) {
|
|
2418
2418
|
return e(c, t.getContext());
|
|
@@ -2428,10 +2428,10 @@ function Ta(e) {
|
|
|
2428
2428
|
});
|
|
2429
2429
|
});
|
|
2430
2430
|
}
|
|
2431
|
-
const
|
|
2431
|
+
const Oa = async () => {
|
|
2432
2432
|
const e = "https://auth.australia-southeast1.gcp.commercetools.com/oauth/token", n = "Basic " + btoa(encodeURIComponent("tfegsSBVOYnR7e_yE-AjxVVN") + ":" + encodeURIComponent("pyKWgHuTxuMwDygh9JH1ehLEaLvAhBo4"));
|
|
2433
2433
|
try {
|
|
2434
|
-
const o = await
|
|
2434
|
+
const o = await xe.post(
|
|
2435
2435
|
e,
|
|
2436
2436
|
new URLSearchParams({ grant_type: "client_credentials" }),
|
|
2437
2437
|
// Only grant_type in body
|
|
@@ -2444,31 +2444,31 @@ const Ea = async () => {
|
|
|
2444
2444
|
);
|
|
2445
2445
|
return o.status === 200 && o.data.access_token ? o.data.access_token : (console.error("Failed to fetch token:", o.data), null);
|
|
2446
2446
|
} catch (o) {
|
|
2447
|
-
return
|
|
2447
|
+
return xe.isAxiosError(o) ? console.error("Error fetching token:", o.response || o.message) : console.error("Unexpected error:", o), null;
|
|
2448
2448
|
}
|
|
2449
|
-
},
|
|
2450
|
-
uri: `${
|
|
2451
|
-
}),
|
|
2452
|
-
const r = await
|
|
2449
|
+
}, Aa = "https://api.australia-southeast1.gcp.commercetools.com/kt-demo/graphql", ja = Oo({
|
|
2450
|
+
uri: `${Aa}`
|
|
2451
|
+
}), $a = Ea(async (e, { headers: t }) => {
|
|
2452
|
+
const r = await Oa();
|
|
2453
2453
|
return {
|
|
2454
2454
|
headers: {
|
|
2455
2455
|
...t,
|
|
2456
2456
|
authorization: `Bearer ${r}`
|
|
2457
2457
|
}
|
|
2458
2458
|
};
|
|
2459
|
-
}),
|
|
2460
|
-
link:
|
|
2461
|
-
cache: new
|
|
2459
|
+
}), La = new Ao({
|
|
2460
|
+
link: $a.concat(ja),
|
|
2461
|
+
cache: new jo(),
|
|
2462
2462
|
defaultOptions: {
|
|
2463
2463
|
watchQuery: {
|
|
2464
2464
|
fetchPolicy: "cache-and-network"
|
|
2465
2465
|
}
|
|
2466
2466
|
}
|
|
2467
|
-
}),
|
|
2467
|
+
}), di = (e) => {
|
|
2468
2468
|
const { tanyaConfig: t } = e;
|
|
2469
|
-
return /* @__PURE__ */ a(
|
|
2469
|
+
return /* @__PURE__ */ a($o, { client: La, children: /* @__PURE__ */ a(Vo, { children: /* @__PURE__ */ a(oa, { tanyaConfig: t }) }) });
|
|
2470
2470
|
};
|
|
2471
|
-
function
|
|
2471
|
+
function Da(e, t) {
|
|
2472
2472
|
const r = e.icons, n = e.aliases || /* @__PURE__ */ Object.create(null), o = /* @__PURE__ */ Object.create(null);
|
|
2473
2473
|
function s(i) {
|
|
2474
2474
|
if (r[i]) return o[i] = [];
|
|
@@ -2481,7 +2481,7 @@ function La(e, t) {
|
|
|
2481
2481
|
}
|
|
2482
2482
|
return Object.keys(r).concat(Object.keys(n)).forEach(s), o;
|
|
2483
2483
|
}
|
|
2484
|
-
const
|
|
2484
|
+
const Jn = Object.freeze({
|
|
2485
2485
|
left: 0,
|
|
2486
2486
|
top: 0,
|
|
2487
2487
|
width: 16,
|
|
@@ -2491,59 +2491,59 @@ const Yn = Object.freeze({
|
|
|
2491
2491
|
vFlip: !1,
|
|
2492
2492
|
hFlip: !1
|
|
2493
2493
|
}), Pr = Object.freeze({
|
|
2494
|
-
...
|
|
2494
|
+
...Jn,
|
|
2495
2495
|
...Qt
|
|
2496
2496
|
}), wr = Object.freeze({
|
|
2497
2497
|
...Pr,
|
|
2498
2498
|
body: "",
|
|
2499
2499
|
hidden: !1
|
|
2500
2500
|
});
|
|
2501
|
-
function
|
|
2501
|
+
function za(e, t) {
|
|
2502
2502
|
const r = {};
|
|
2503
2503
|
!e.hFlip != !t.hFlip && (r.hFlip = !0), !e.vFlip != !t.vFlip && (r.vFlip = !0);
|
|
2504
2504
|
const n = ((e.rotate || 0) + (t.rotate || 0)) % 4;
|
|
2505
2505
|
return n && (r.rotate = n), r;
|
|
2506
2506
|
}
|
|
2507
|
-
function
|
|
2508
|
-
const r =
|
|
2507
|
+
function cn(e, t) {
|
|
2508
|
+
const r = za(e, t);
|
|
2509
2509
|
for (const n in wr) n in Qt ? n in e && !(n in r) && (r[n] = Qt[n]) : n in t ? r[n] = t[n] : n in e && (r[n] = e[n]);
|
|
2510
2510
|
return r;
|
|
2511
2511
|
}
|
|
2512
|
-
function
|
|
2512
|
+
function Ma(e, t, r) {
|
|
2513
2513
|
const n = e.icons, o = e.aliases || /* @__PURE__ */ Object.create(null);
|
|
2514
2514
|
let s = {};
|
|
2515
2515
|
function i(c) {
|
|
2516
|
-
s =
|
|
2516
|
+
s = cn(n[c] || o[c], s);
|
|
2517
2517
|
}
|
|
2518
|
-
return i(t), r.forEach(i),
|
|
2518
|
+
return i(t), r.forEach(i), cn(e, s);
|
|
2519
2519
|
}
|
|
2520
|
-
function
|
|
2520
|
+
function Kn(e, t) {
|
|
2521
2521
|
const r = [];
|
|
2522
2522
|
if (typeof e != "object" || typeof e.icons != "object") return r;
|
|
2523
2523
|
e.not_found instanceof Array && e.not_found.forEach((o) => {
|
|
2524
2524
|
t(o, null), r.push(o);
|
|
2525
2525
|
});
|
|
2526
|
-
const n =
|
|
2526
|
+
const n = Da(e);
|
|
2527
2527
|
for (const o in n) {
|
|
2528
2528
|
const s = n[o];
|
|
2529
|
-
s && (t(o,
|
|
2529
|
+
s && (t(o, Ma(e, o, s)), r.push(o));
|
|
2530
2530
|
}
|
|
2531
2531
|
return r;
|
|
2532
2532
|
}
|
|
2533
|
-
const
|
|
2533
|
+
const Ba = {
|
|
2534
2534
|
provider: "",
|
|
2535
2535
|
aliases: {},
|
|
2536
2536
|
not_found: {},
|
|
2537
|
-
...
|
|
2537
|
+
...Jn
|
|
2538
2538
|
};
|
|
2539
2539
|
function ir(e, t) {
|
|
2540
2540
|
for (const r in t) if (r in e && typeof e[r] != typeof t[r]) return !1;
|
|
2541
2541
|
return !0;
|
|
2542
2542
|
}
|
|
2543
|
-
function
|
|
2543
|
+
function Wn(e) {
|
|
2544
2544
|
if (typeof e != "object" || e === null) return null;
|
|
2545
2545
|
const t = e;
|
|
2546
|
-
if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !ir(e,
|
|
2546
|
+
if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !ir(e, Ba)) return null;
|
|
2547
2547
|
const r = t.icons;
|
|
2548
2548
|
for (const o in r) {
|
|
2549
2549
|
const s = r[o];
|
|
@@ -2556,8 +2556,8 @@ function Kn(e) {
|
|
|
2556
2556
|
}
|
|
2557
2557
|
return t;
|
|
2558
2558
|
}
|
|
2559
|
-
const
|
|
2560
|
-
function
|
|
2559
|
+
const dn = /* @__PURE__ */ Object.create(null);
|
|
2560
|
+
function Ua(e, t) {
|
|
2561
2561
|
return {
|
|
2562
2562
|
provider: e,
|
|
2563
2563
|
prefix: t,
|
|
@@ -2566,15 +2566,15 @@ function Ba(e, t) {
|
|
|
2566
2566
|
};
|
|
2567
2567
|
}
|
|
2568
2568
|
function bt(e, t) {
|
|
2569
|
-
const r =
|
|
2570
|
-
return r[t] || (r[t] =
|
|
2569
|
+
const r = dn[e] || (dn[e] = /* @__PURE__ */ Object.create(null));
|
|
2570
|
+
return r[t] || (r[t] = Ua(e, t));
|
|
2571
2571
|
}
|
|
2572
|
-
function
|
|
2573
|
-
return
|
|
2572
|
+
function Gn(e, t) {
|
|
2573
|
+
return Wn(t) ? Kn(t, (r, n) => {
|
|
2574
2574
|
n ? e.icons[r] = n : e.missing.add(r);
|
|
2575
2575
|
}) : [];
|
|
2576
2576
|
}
|
|
2577
|
-
function
|
|
2577
|
+
function qa(e, t, r) {
|
|
2578
2578
|
try {
|
|
2579
2579
|
if (typeof r.body == "string")
|
|
2580
2580
|
return e.icons[t] = { ...r }, !0;
|
|
@@ -2582,7 +2582,7 @@ function Ua(e, t, r) {
|
|
|
2582
2582
|
}
|
|
2583
2583
|
return !1;
|
|
2584
2584
|
}
|
|
2585
|
-
const
|
|
2585
|
+
const Qn = /^[a-z0-9]+(-[a-z0-9]+)*$/, Xt = (e, t, r, n = "") => {
|
|
2586
2586
|
const o = e.split(":");
|
|
2587
2587
|
if (e.slice(0, 1) === "@") {
|
|
2588
2588
|
if (o.length < 2 || o.length > 3) return null;
|
|
@@ -2617,28 +2617,28 @@ const Gn = /^[a-z0-9]+(-[a-z0-9]+)*$/, Xt = (e, t, r, n = "") => {
|
|
|
2617
2617
|
return null;
|
|
2618
2618
|
}, qt = (e, t) => e ? !!((t && e.prefix === "" || e.prefix) && e.name) : !1;
|
|
2619
2619
|
let Ot = !1;
|
|
2620
|
-
function
|
|
2620
|
+
function Xn(e) {
|
|
2621
2621
|
return typeof e == "boolean" && (Ot = e), Ot;
|
|
2622
2622
|
}
|
|
2623
|
-
function
|
|
2623
|
+
function un(e) {
|
|
2624
2624
|
const t = typeof e == "string" ? Xt(e, !0, Ot) : e;
|
|
2625
2625
|
if (t) {
|
|
2626
2626
|
const r = bt(t.provider, t.prefix), n = t.name;
|
|
2627
2627
|
return r.icons[n] || (r.missing.has(n) ? null : void 0);
|
|
2628
2628
|
}
|
|
2629
2629
|
}
|
|
2630
|
-
function
|
|
2630
|
+
function Ra(e, t) {
|
|
2631
2631
|
const r = Xt(e, !0, Ot);
|
|
2632
2632
|
if (!r) return !1;
|
|
2633
2633
|
const n = bt(r.provider, r.prefix);
|
|
2634
|
-
return t ?
|
|
2634
|
+
return t ? qa(n, r.name, t) : (n.missing.add(r.name), !0);
|
|
2635
2635
|
}
|
|
2636
|
-
function
|
|
2636
|
+
function Ha(e, t) {
|
|
2637
2637
|
if (typeof e != "object") return !1;
|
|
2638
2638
|
if (typeof t != "string" && (t = e.provider || ""), Ot && !t && !e.prefix) {
|
|
2639
2639
|
let o = !1;
|
|
2640
|
-
return
|
|
2641
|
-
|
|
2640
|
+
return Wn(e) && (e.prefix = "", Kn(e, (s, i) => {
|
|
2641
|
+
Ra(s, i) && (o = !0);
|
|
2642
2642
|
})), o;
|
|
2643
2643
|
}
|
|
2644
2644
|
const r = e.prefix;
|
|
@@ -2647,20 +2647,20 @@ function Ra(e, t) {
|
|
|
2647
2647
|
name: "a"
|
|
2648
2648
|
})) return !1;
|
|
2649
2649
|
const n = bt(t, r);
|
|
2650
|
-
return !!
|
|
2650
|
+
return !!Gn(n, e);
|
|
2651
2651
|
}
|
|
2652
|
-
const
|
|
2652
|
+
const Zn = Object.freeze({
|
|
2653
2653
|
width: null,
|
|
2654
2654
|
height: null
|
|
2655
|
-
}),
|
|
2656
|
-
...
|
|
2655
|
+
}), eo = Object.freeze({
|
|
2656
|
+
...Zn,
|
|
2657
2657
|
...Qt
|
|
2658
|
-
}),
|
|
2659
|
-
function
|
|
2658
|
+
}), Ya = /(-?[0-9.]*[0-9]+[0-9.]*)/g, Va = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
|
|
2659
|
+
function fn(e, t, r) {
|
|
2660
2660
|
if (t === 1) return e;
|
|
2661
2661
|
if (r = r || 100, typeof e == "number") return Math.ceil(e * t * r) / r;
|
|
2662
2662
|
if (typeof e != "string") return e;
|
|
2663
|
-
const n = e.split(
|
|
2663
|
+
const n = e.split(Ya);
|
|
2664
2664
|
if (n === null || !n.length) return e;
|
|
2665
2665
|
const o = [];
|
|
2666
2666
|
let s = n.shift(), i = Va.test(s);
|
|
@@ -2673,7 +2673,7 @@ function un(e, t, r) {
|
|
|
2673
2673
|
i = !i;
|
|
2674
2674
|
}
|
|
2675
2675
|
}
|
|
2676
|
-
function
|
|
2676
|
+
function Ja(e, t = "defs") {
|
|
2677
2677
|
let r = "";
|
|
2678
2678
|
const n = e.indexOf("<" + t);
|
|
2679
2679
|
for (; n >= 0; ) {
|
|
@@ -2688,20 +2688,20 @@ function Ya(e, t = "defs") {
|
|
|
2688
2688
|
content: e
|
|
2689
2689
|
};
|
|
2690
2690
|
}
|
|
2691
|
-
function
|
|
2691
|
+
function Ka(e, t) {
|
|
2692
2692
|
return e ? "<defs>" + e + "</defs>" + t : t;
|
|
2693
2693
|
}
|
|
2694
|
-
function
|
|
2695
|
-
const n =
|
|
2696
|
-
return
|
|
2694
|
+
function Wa(e, t, r) {
|
|
2695
|
+
const n = Ja(e);
|
|
2696
|
+
return Ka(n.defs, t + n.content + r);
|
|
2697
2697
|
}
|
|
2698
|
-
const
|
|
2699
|
-
function
|
|
2698
|
+
const Ga = (e) => e === "unset" || e === "undefined" || e === "none";
|
|
2699
|
+
function Qa(e, t) {
|
|
2700
2700
|
const r = {
|
|
2701
2701
|
...Pr,
|
|
2702
2702
|
...e
|
|
2703
2703
|
}, n = {
|
|
2704
|
-
...
|
|
2704
|
+
...eo,
|
|
2705
2705
|
...t
|
|
2706
2706
|
}, o = {
|
|
2707
2707
|
left: r.left,
|
|
@@ -2711,28 +2711,28 @@ function Ga(e, t) {
|
|
|
2711
2711
|
};
|
|
2712
2712
|
let s = r.body;
|
|
2713
2713
|
[r, n].forEach((F) => {
|
|
2714
|
-
const N = [], P = F.hFlip,
|
|
2714
|
+
const N = [], P = F.hFlip, Y = F.vFlip;
|
|
2715
2715
|
let w = F.rotate;
|
|
2716
|
-
P ?
|
|
2717
|
-
let
|
|
2716
|
+
P ? Y ? w += 2 : (N.push("translate(" + (o.width + o.left).toString() + " " + (0 - o.top).toString() + ")"), N.push("scale(-1 1)"), o.top = o.left = 0) : Y && (N.push("translate(" + (0 - o.left).toString() + " " + (o.height + o.top).toString() + ")"), N.push("scale(1 -1)"), o.top = o.left = 0);
|
|
2717
|
+
let J;
|
|
2718
2718
|
switch (w < 0 && (w -= Math.floor(w / 4) * 4), w = w % 4, w) {
|
|
2719
2719
|
case 1:
|
|
2720
|
-
|
|
2720
|
+
J = o.height / 2 + o.top, N.unshift("rotate(90 " + J.toString() + " " + J.toString() + ")");
|
|
2721
2721
|
break;
|
|
2722
2722
|
case 2:
|
|
2723
2723
|
N.unshift("rotate(180 " + (o.width / 2 + o.left).toString() + " " + (o.height / 2 + o.top).toString() + ")");
|
|
2724
2724
|
break;
|
|
2725
2725
|
case 3:
|
|
2726
|
-
|
|
2726
|
+
J = o.width / 2 + o.left, N.unshift("rotate(-90 " + J.toString() + " " + J.toString() + ")");
|
|
2727
2727
|
break;
|
|
2728
2728
|
}
|
|
2729
|
-
w % 2 === 1 && (o.left !== o.top && (
|
|
2729
|
+
w % 2 === 1 && (o.left !== o.top && (J = o.left, o.left = o.top, o.top = J), o.width !== o.height && (J = o.width, o.width = o.height, o.height = J)), N.length && (s = Wa(s, '<g transform="' + N.join(" ") + '">', "</g>"));
|
|
2730
2730
|
});
|
|
2731
2731
|
const i = n.width, c = n.height, l = o.width, p = o.height;
|
|
2732
2732
|
let g, y;
|
|
2733
|
-
i === null ? (y = c === null ? "1em" : c === "auto" ? p : c, g =
|
|
2733
|
+
i === null ? (y = c === null ? "1em" : c === "auto" ? p : c, g = fn(y, l / p)) : (g = i === "auto" ? l : i, y = c === null ? fn(g, p / l) : c === "auto" ? p : c);
|
|
2734
2734
|
const x = {}, S = (F, N) => {
|
|
2735
|
-
|
|
2735
|
+
Ga(N) || (x[F] = N.toString());
|
|
2736
2736
|
};
|
|
2737
2737
|
S("width", g), S("height", y);
|
|
2738
2738
|
const _ = [
|
|
@@ -2747,21 +2747,21 @@ function Ga(e, t) {
|
|
|
2747
2747
|
body: s
|
|
2748
2748
|
};
|
|
2749
2749
|
}
|
|
2750
|
-
const
|
|
2751
|
-
let
|
|
2752
|
-
function
|
|
2750
|
+
const Xa = /\sid="(\S+)"/g, Za = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
|
|
2751
|
+
let es = 0;
|
|
2752
|
+
function ts(e, t = Za) {
|
|
2753
2753
|
const r = [];
|
|
2754
2754
|
let n;
|
|
2755
|
-
for (; n =
|
|
2755
|
+
for (; n = Xa.exec(e); ) r.push(n[1]);
|
|
2756
2756
|
if (!r.length) return e;
|
|
2757
2757
|
const o = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
|
|
2758
2758
|
return r.forEach((s) => {
|
|
2759
|
-
const i = typeof t == "function" ? t(s) : t + (
|
|
2759
|
+
const i = typeof t == "function" ? t(s) : t + (es++).toString(), c = s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
2760
2760
|
e = e.replace(new RegExp('([#;"])(' + c + ')([")]|\\.[a-z])', "g"), "$1" + i + o + "$3");
|
|
2761
2761
|
}), e = e.replace(new RegExp(o, "g"), ""), e;
|
|
2762
2762
|
}
|
|
2763
2763
|
const yr = /* @__PURE__ */ Object.create(null);
|
|
2764
|
-
function
|
|
2764
|
+
function rs(e, t) {
|
|
2765
2765
|
yr[e] = t;
|
|
2766
2766
|
}
|
|
2767
2767
|
function xr(e) {
|
|
@@ -2785,22 +2785,22 @@ function Tr(e) {
|
|
|
2785
2785
|
const Er = /* @__PURE__ */ Object.create(null), Ft = ["https://api.simplesvg.com", "https://api.unisvg.com"], Rt = [];
|
|
2786
2786
|
for (; Ft.length > 0; ) Ft.length === 1 || Math.random() > 0.5 ? Rt.push(Ft.shift()) : Rt.push(Ft.pop());
|
|
2787
2787
|
Er[""] = Tr({ resources: ["https://api.iconify.design"].concat(Rt) });
|
|
2788
|
-
function
|
|
2788
|
+
function ns(e, t) {
|
|
2789
2789
|
const r = Tr(t);
|
|
2790
2790
|
return r === null ? !1 : (Er[e] = r, !0);
|
|
2791
2791
|
}
|
|
2792
2792
|
function Or(e) {
|
|
2793
2793
|
return Er[e];
|
|
2794
2794
|
}
|
|
2795
|
-
const
|
|
2795
|
+
const os = () => {
|
|
2796
2796
|
let e;
|
|
2797
2797
|
try {
|
|
2798
2798
|
if (e = fetch, typeof e == "function") return e;
|
|
2799
2799
|
} catch {
|
|
2800
2800
|
}
|
|
2801
2801
|
};
|
|
2802
|
-
let
|
|
2803
|
-
function
|
|
2802
|
+
let mn = os();
|
|
2803
|
+
function as(e, t) {
|
|
2804
2804
|
const r = Or(e);
|
|
2805
2805
|
if (!r) return 0;
|
|
2806
2806
|
let n;
|
|
@@ -2815,11 +2815,11 @@ function os(e, t) {
|
|
|
2815
2815
|
}
|
|
2816
2816
|
return n;
|
|
2817
2817
|
}
|
|
2818
|
-
function
|
|
2818
|
+
function ss(e) {
|
|
2819
2819
|
return e === 404;
|
|
2820
2820
|
}
|
|
2821
|
-
const
|
|
2822
|
-
const n = [], o =
|
|
2821
|
+
const is = (e, t, r) => {
|
|
2822
|
+
const n = [], o = as(e, t), s = "icons";
|
|
2823
2823
|
let i = {
|
|
2824
2824
|
type: s,
|
|
2825
2825
|
provider: e,
|
|
@@ -2835,19 +2835,19 @@ const ss = (e, t, r) => {
|
|
|
2835
2835
|
}, c = l.length), i.icons.push(l);
|
|
2836
2836
|
}), n.push(i), n;
|
|
2837
2837
|
};
|
|
2838
|
-
function
|
|
2838
|
+
function ls(e) {
|
|
2839
2839
|
if (typeof e == "string") {
|
|
2840
2840
|
const t = Or(e);
|
|
2841
2841
|
if (t) return t.path;
|
|
2842
2842
|
}
|
|
2843
2843
|
return "/";
|
|
2844
2844
|
}
|
|
2845
|
-
const
|
|
2846
|
-
if (!
|
|
2845
|
+
const cs = (e, t, r) => {
|
|
2846
|
+
if (!mn) {
|
|
2847
2847
|
r("abort", 424);
|
|
2848
2848
|
return;
|
|
2849
2849
|
}
|
|
2850
|
-
let n =
|
|
2850
|
+
let n = ls(t.provider);
|
|
2851
2851
|
switch (t.type) {
|
|
2852
2852
|
case "icons": {
|
|
2853
2853
|
const s = t.prefix, c = t.icons.join(","), l = new URLSearchParams({ icons: c });
|
|
@@ -2864,11 +2864,11 @@ const ls = (e, t, r) => {
|
|
|
2864
2864
|
return;
|
|
2865
2865
|
}
|
|
2866
2866
|
let o = 503;
|
|
2867
|
-
|
|
2867
|
+
mn(e + n).then((s) => {
|
|
2868
2868
|
const i = s.status;
|
|
2869
2869
|
if (i !== 200) {
|
|
2870
2870
|
setTimeout(() => {
|
|
2871
|
-
r(
|
|
2871
|
+
r(ss(i) ? "abort" : "next", i);
|
|
2872
2872
|
});
|
|
2873
2873
|
return;
|
|
2874
2874
|
}
|
|
@@ -2886,17 +2886,17 @@ const ls = (e, t, r) => {
|
|
|
2886
2886
|
}).catch(() => {
|
|
2887
2887
|
r("next", o);
|
|
2888
2888
|
});
|
|
2889
|
-
},
|
|
2890
|
-
prepare:
|
|
2891
|
-
send:
|
|
2889
|
+
}, ds = {
|
|
2890
|
+
prepare: is,
|
|
2891
|
+
send: cs
|
|
2892
2892
|
};
|
|
2893
|
-
function
|
|
2893
|
+
function to(e, t) {
|
|
2894
2894
|
e.forEach((r) => {
|
|
2895
2895
|
const n = r.loaderCallbacks;
|
|
2896
2896
|
n && (r.loaderCallbacks = n.filter((o) => o.id !== t));
|
|
2897
2897
|
});
|
|
2898
2898
|
}
|
|
2899
|
-
function
|
|
2899
|
+
function us(e) {
|
|
2900
2900
|
e.pendingCallbacksFlag || (e.pendingCallbacksFlag = !0, setTimeout(() => {
|
|
2901
2901
|
e.pendingCallbacksFlag = !1;
|
|
2902
2902
|
const t = e.loaderCallbacks ? e.loaderCallbacks.slice(0) : [];
|
|
@@ -2921,13 +2921,13 @@ function ds(e) {
|
|
|
2921
2921
|
else
|
|
2922
2922
|
return r = !0, !0;
|
|
2923
2923
|
return !1;
|
|
2924
|
-
}), i.pending.length !== c && (r ||
|
|
2924
|
+
}), i.pending.length !== c && (r || to([e], s.id), s.callback(i.loaded.slice(0), i.missing.slice(0), i.pending.slice(0), s.abort));
|
|
2925
2925
|
});
|
|
2926
2926
|
}));
|
|
2927
2927
|
}
|
|
2928
|
-
let
|
|
2929
|
-
function
|
|
2930
|
-
const n =
|
|
2928
|
+
let fs = 0;
|
|
2929
|
+
function ms(e, t, r) {
|
|
2930
|
+
const n = fs++, o = to.bind(null, r, n);
|
|
2931
2931
|
if (!t.pending.length) return o;
|
|
2932
2932
|
const s = {
|
|
2933
2933
|
id: n,
|
|
@@ -2939,7 +2939,7 @@ function fs(e, t, r) {
|
|
|
2939
2939
|
(i.loaderCallbacks || (i.loaderCallbacks = [])).push(s);
|
|
2940
2940
|
}), o;
|
|
2941
2941
|
}
|
|
2942
|
-
function
|
|
2942
|
+
function hs(e) {
|
|
2943
2943
|
const t = {
|
|
2944
2944
|
loaded: [],
|
|
2945
2945
|
missing: [],
|
|
@@ -2965,14 +2965,14 @@ function ms(e) {
|
|
|
2965
2965
|
g.push(y);
|
|
2966
2966
|
}), t;
|
|
2967
2967
|
}
|
|
2968
|
-
function
|
|
2968
|
+
function ps(e, t = !0, r = !1) {
|
|
2969
2969
|
const n = [];
|
|
2970
2970
|
return e.forEach((o) => {
|
|
2971
2971
|
const s = typeof o == "string" ? Xt(o, t, r) : o;
|
|
2972
2972
|
s && n.push(s);
|
|
2973
2973
|
}), n;
|
|
2974
2974
|
}
|
|
2975
|
-
const
|
|
2975
|
+
const gs = {
|
|
2976
2976
|
resources: [],
|
|
2977
2977
|
index: 0,
|
|
2978
2978
|
timeout: 2e3,
|
|
@@ -2980,14 +2980,14 @@ const ps = {
|
|
|
2980
2980
|
random: !1,
|
|
2981
2981
|
dataAfterTimeout: !1
|
|
2982
2982
|
};
|
|
2983
|
-
function
|
|
2983
|
+
function ws(e, t, r, n) {
|
|
2984
2984
|
const o = e.resources.length, s = e.random ? Math.floor(Math.random() * o) : e.index;
|
|
2985
2985
|
let i;
|
|
2986
2986
|
if (e.random) {
|
|
2987
2987
|
let E = e.resources.slice(0);
|
|
2988
2988
|
for (i = []; E.length > 1; ) {
|
|
2989
|
-
const
|
|
2990
|
-
i.push(E[
|
|
2989
|
+
const V = Math.floor(Math.random() * E.length);
|
|
2990
|
+
i.push(E[V]), E = E.slice(0, V).concat(E.slice(V + 1));
|
|
2991
2991
|
}
|
|
2992
2992
|
i = i.concat(E);
|
|
2993
2993
|
} else i = e.resources.slice(s).concat(e.resources.slice(0, s));
|
|
@@ -3002,8 +3002,8 @@ function gs(e, t, r, n) {
|
|
|
3002
3002
|
E.status === "pending" && (E.status = "aborted");
|
|
3003
3003
|
}), x = [];
|
|
3004
3004
|
}
|
|
3005
|
-
function N(E,
|
|
3006
|
-
|
|
3005
|
+
function N(E, V) {
|
|
3006
|
+
V && (S = []), typeof E == "function" && S.push(E);
|
|
3007
3007
|
}
|
|
3008
3008
|
function P() {
|
|
3009
3009
|
return {
|
|
@@ -3016,7 +3016,7 @@ function gs(e, t, r, n) {
|
|
|
3016
3016
|
abort: F
|
|
3017
3017
|
};
|
|
3018
3018
|
}
|
|
3019
|
-
function
|
|
3019
|
+
function Y() {
|
|
3020
3020
|
l = "failed", S.forEach((E) => {
|
|
3021
3021
|
E(void 0, g);
|
|
3022
3022
|
});
|
|
@@ -3026,61 +3026,61 @@ function gs(e, t, r, n) {
|
|
|
3026
3026
|
E.status === "pending" && (E.status = "aborted");
|
|
3027
3027
|
}), x = [];
|
|
3028
3028
|
}
|
|
3029
|
-
function
|
|
3030
|
-
const
|
|
3031
|
-
switch (x = x.filter((
|
|
3029
|
+
function J(E, V, be) {
|
|
3030
|
+
const le = V !== "success";
|
|
3031
|
+
switch (x = x.filter((Z) => Z !== E), l) {
|
|
3032
3032
|
case "pending":
|
|
3033
3033
|
break;
|
|
3034
3034
|
case "failed":
|
|
3035
|
-
if (
|
|
3035
|
+
if (le || !e.dataAfterTimeout) return;
|
|
3036
3036
|
break;
|
|
3037
3037
|
default:
|
|
3038
3038
|
return;
|
|
3039
3039
|
}
|
|
3040
|
-
if (
|
|
3041
|
-
g =
|
|
3040
|
+
if (V === "abort") {
|
|
3041
|
+
g = be, Y();
|
|
3042
3042
|
return;
|
|
3043
3043
|
}
|
|
3044
|
-
if (
|
|
3045
|
-
g =
|
|
3044
|
+
if (le) {
|
|
3045
|
+
g = be, x.length || (i.length ? $e() : Y());
|
|
3046
3046
|
return;
|
|
3047
3047
|
}
|
|
3048
3048
|
if (_(), w(), !e.random) {
|
|
3049
|
-
const
|
|
3050
|
-
|
|
3049
|
+
const Z = e.resources.indexOf(E.resource);
|
|
3050
|
+
Z !== -1 && Z !== e.index && (e.index = Z);
|
|
3051
3051
|
}
|
|
3052
|
-
l = "completed", S.forEach((
|
|
3053
|
-
|
|
3052
|
+
l = "completed", S.forEach((Z) => {
|
|
3053
|
+
Z(be);
|
|
3054
3054
|
});
|
|
3055
3055
|
}
|
|
3056
|
-
function
|
|
3056
|
+
function $e() {
|
|
3057
3057
|
if (l !== "pending") return;
|
|
3058
3058
|
_();
|
|
3059
3059
|
const E = i.shift();
|
|
3060
3060
|
if (E === void 0) {
|
|
3061
3061
|
if (x.length) {
|
|
3062
3062
|
y = setTimeout(() => {
|
|
3063
|
-
_(), l === "pending" && (w(),
|
|
3063
|
+
_(), l === "pending" && (w(), Y());
|
|
3064
3064
|
}, e.timeout);
|
|
3065
3065
|
return;
|
|
3066
3066
|
}
|
|
3067
|
-
|
|
3067
|
+
Y();
|
|
3068
3068
|
return;
|
|
3069
3069
|
}
|
|
3070
|
-
const
|
|
3070
|
+
const V = {
|
|
3071
3071
|
status: "pending",
|
|
3072
3072
|
resource: E,
|
|
3073
|
-
callback: (
|
|
3074
|
-
V
|
|
3073
|
+
callback: (be, le) => {
|
|
3074
|
+
J(V, be, le);
|
|
3075
3075
|
}
|
|
3076
3076
|
};
|
|
3077
|
-
x.push(
|
|
3077
|
+
x.push(V), p++, y = setTimeout($e, e.rotate), r(E, t, V.callback);
|
|
3078
3078
|
}
|
|
3079
|
-
return setTimeout(
|
|
3079
|
+
return setTimeout($e), P;
|
|
3080
3080
|
}
|
|
3081
|
-
function
|
|
3081
|
+
function ro(e) {
|
|
3082
3082
|
const t = {
|
|
3083
|
-
...
|
|
3083
|
+
...gs,
|
|
3084
3084
|
...e
|
|
3085
3085
|
};
|
|
3086
3086
|
let r = [];
|
|
@@ -3088,7 +3088,7 @@ function to(e) {
|
|
|
3088
3088
|
r = r.filter((c) => c().status === "pending");
|
|
3089
3089
|
}
|
|
3090
3090
|
function o(c, l, p) {
|
|
3091
|
-
const g =
|
|
3091
|
+
const g = ws(t, c, l, (y, x) => {
|
|
3092
3092
|
n(), p && p(y, x);
|
|
3093
3093
|
});
|
|
3094
3094
|
return r.push(g), g;
|
|
@@ -3106,14 +3106,14 @@ function to(e) {
|
|
|
3106
3106
|
cleanup: n
|
|
3107
3107
|
};
|
|
3108
3108
|
}
|
|
3109
|
-
function
|
|
3109
|
+
function hn() {
|
|
3110
3110
|
}
|
|
3111
3111
|
const lr = /* @__PURE__ */ Object.create(null);
|
|
3112
|
-
function
|
|
3112
|
+
function ys(e) {
|
|
3113
3113
|
if (!lr[e]) {
|
|
3114
3114
|
const t = Or(e);
|
|
3115
3115
|
if (!t) return;
|
|
3116
|
-
const r =
|
|
3116
|
+
const r = ro(t), n = {
|
|
3117
3117
|
config: t,
|
|
3118
3118
|
redundancy: r
|
|
3119
3119
|
};
|
|
@@ -3121,36 +3121,36 @@ function ws(e) {
|
|
|
3121
3121
|
}
|
|
3122
3122
|
return lr[e];
|
|
3123
3123
|
}
|
|
3124
|
-
function
|
|
3124
|
+
function xs(e, t, r) {
|
|
3125
3125
|
let n, o;
|
|
3126
3126
|
if (typeof e == "string") {
|
|
3127
3127
|
const s = xr(e);
|
|
3128
3128
|
if (!s)
|
|
3129
|
-
return r(void 0, 424),
|
|
3129
|
+
return r(void 0, 424), hn;
|
|
3130
3130
|
o = s.send;
|
|
3131
|
-
const i =
|
|
3131
|
+
const i = ys(e);
|
|
3132
3132
|
i && (n = i.redundancy);
|
|
3133
3133
|
} else {
|
|
3134
3134
|
const s = Tr(e);
|
|
3135
3135
|
if (s) {
|
|
3136
|
-
n =
|
|
3136
|
+
n = ro(s);
|
|
3137
3137
|
const i = e.resources ? e.resources[0] : "", c = xr(i);
|
|
3138
3138
|
c && (o = c.send);
|
|
3139
3139
|
}
|
|
3140
3140
|
}
|
|
3141
|
-
return !n || !o ? (r(void 0, 424),
|
|
3141
|
+
return !n || !o ? (r(void 0, 424), hn) : n.query(t, o, r)().abort;
|
|
3142
3142
|
}
|
|
3143
|
-
function
|
|
3143
|
+
function pn() {
|
|
3144
3144
|
}
|
|
3145
|
-
function
|
|
3145
|
+
function bs(e) {
|
|
3146
3146
|
e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
|
|
3147
|
-
e.iconsLoaderFlag = !1,
|
|
3147
|
+
e.iconsLoaderFlag = !1, us(e);
|
|
3148
3148
|
}));
|
|
3149
3149
|
}
|
|
3150
|
-
function
|
|
3150
|
+
function vs(e) {
|
|
3151
3151
|
const t = [], r = [];
|
|
3152
3152
|
return e.forEach((n) => {
|
|
3153
|
-
(n.match(
|
|
3153
|
+
(n.match(Qn) ? t : r).push(n);
|
|
3154
3154
|
}), {
|
|
3155
3155
|
valid: t,
|
|
3156
3156
|
invalid: r
|
|
@@ -3164,30 +3164,30 @@ function Pt(e, t, r) {
|
|
|
3164
3164
|
});
|
|
3165
3165
|
}
|
|
3166
3166
|
if (r && typeof r == "object") try {
|
|
3167
|
-
if (!
|
|
3167
|
+
if (!Gn(e, r).length) {
|
|
3168
3168
|
n();
|
|
3169
3169
|
return;
|
|
3170
3170
|
}
|
|
3171
3171
|
} catch (o) {
|
|
3172
3172
|
console.error(o);
|
|
3173
3173
|
}
|
|
3174
|
-
n(),
|
|
3174
|
+
n(), bs(e);
|
|
3175
3175
|
}
|
|
3176
|
-
function
|
|
3176
|
+
function gn(e, t) {
|
|
3177
3177
|
e instanceof Promise ? e.then((r) => {
|
|
3178
3178
|
t(r);
|
|
3179
3179
|
}).catch(() => {
|
|
3180
3180
|
t(null);
|
|
3181
3181
|
}) : t(e);
|
|
3182
3182
|
}
|
|
3183
|
-
function
|
|
3183
|
+
function ks(e, t) {
|
|
3184
3184
|
e.iconsToLoad ? e.iconsToLoad = e.iconsToLoad.concat(t).sort() : e.iconsToLoad = t, e.iconsQueueFlag || (e.iconsQueueFlag = !0, setTimeout(() => {
|
|
3185
3185
|
e.iconsQueueFlag = !1;
|
|
3186
3186
|
const { provider: r, prefix: n } = e, o = e.iconsToLoad;
|
|
3187
3187
|
if (delete e.iconsToLoad, !o || !o.length) return;
|
|
3188
3188
|
const s = e.loadIcon;
|
|
3189
3189
|
if (e.loadIcons && (o.length > 1 || !s)) {
|
|
3190
|
-
|
|
3190
|
+
gn(e.loadIcons(o, n, r), (g) => {
|
|
3191
3191
|
Pt(e, o, g);
|
|
3192
3192
|
});
|
|
3193
3193
|
return;
|
|
@@ -3195,7 +3195,7 @@ function vs(e, t) {
|
|
|
3195
3195
|
if (s) {
|
|
3196
3196
|
o.forEach((g) => {
|
|
3197
3197
|
const y = s(g, n, r);
|
|
3198
|
-
|
|
3198
|
+
gn(y, (x) => {
|
|
3199
3199
|
const S = x ? {
|
|
3200
3200
|
prefix: n,
|
|
3201
3201
|
icons: { [g]: x }
|
|
@@ -3205,26 +3205,26 @@ function vs(e, t) {
|
|
|
3205
3205
|
});
|
|
3206
3206
|
return;
|
|
3207
3207
|
}
|
|
3208
|
-
const { valid: i, invalid: c } =
|
|
3208
|
+
const { valid: i, invalid: c } = vs(o);
|
|
3209
3209
|
if (c.length && Pt(e, c, null), !i.length) return;
|
|
3210
|
-
const l = n.match(
|
|
3210
|
+
const l = n.match(Qn) ? xr(r) : null;
|
|
3211
3211
|
if (!l) {
|
|
3212
3212
|
Pt(e, i, null);
|
|
3213
3213
|
return;
|
|
3214
3214
|
}
|
|
3215
3215
|
l.prepare(r, n, i).forEach((g) => {
|
|
3216
|
-
|
|
3216
|
+
xs(r, g, (y) => {
|
|
3217
3217
|
Pt(e, g.icons, y);
|
|
3218
3218
|
});
|
|
3219
3219
|
});
|
|
3220
3220
|
}));
|
|
3221
3221
|
}
|
|
3222
|
-
const
|
|
3223
|
-
const r =
|
|
3222
|
+
const Ss = (e, t) => {
|
|
3223
|
+
const r = ps(e, !0, Xn()), n = hs(r);
|
|
3224
3224
|
if (!n.pending.length) {
|
|
3225
3225
|
let l = !0;
|
|
3226
3226
|
return t && setTimeout(() => {
|
|
3227
|
-
l && t(n.loaded, n.missing, n.pending,
|
|
3227
|
+
l && t(n.loaded, n.missing, n.pending, pn);
|
|
3228
3228
|
}), () => {
|
|
3229
3229
|
l = !1;
|
|
3230
3230
|
};
|
|
@@ -3242,20 +3242,20 @@ const ks = (e, t) => {
|
|
|
3242
3242
|
S.has(y) || (S.add(y), o[p][g].push(y));
|
|
3243
3243
|
}), s.forEach((l) => {
|
|
3244
3244
|
const p = o[l.provider][l.prefix];
|
|
3245
|
-
p.length &&
|
|
3246
|
-
}), t ?
|
|
3245
|
+
p.length && ks(l, p);
|
|
3246
|
+
}), t ? ms(t, n, s) : pn;
|
|
3247
3247
|
};
|
|
3248
|
-
function
|
|
3248
|
+
function Ns(e, t) {
|
|
3249
3249
|
const r = { ...e };
|
|
3250
3250
|
for (const n in t) {
|
|
3251
3251
|
const o = t[n], s = typeof o;
|
|
3252
|
-
n in
|
|
3252
|
+
n in Zn ? (o === null || o && (s === "string" || s === "number")) && (r[n] = o) : s === typeof r[n] && (r[n] = n === "rotate" ? o % 4 : o);
|
|
3253
3253
|
}
|
|
3254
3254
|
return r;
|
|
3255
3255
|
}
|
|
3256
|
-
const
|
|
3257
|
-
function
|
|
3258
|
-
t.split(
|
|
3256
|
+
const Cs = /[\s,]+/;
|
|
3257
|
+
function _s(e, t) {
|
|
3258
|
+
t.split(Cs).forEach((r) => {
|
|
3259
3259
|
switch (r.trim()) {
|
|
3260
3260
|
case "horizontal":
|
|
3261
3261
|
e.hFlip = !0;
|
|
@@ -3266,7 +3266,7 @@ function Cs(e, t) {
|
|
|
3266
3266
|
}
|
|
3267
3267
|
});
|
|
3268
3268
|
}
|
|
3269
|
-
function
|
|
3269
|
+
function Is(e, t = 0) {
|
|
3270
3270
|
const r = e.replace(/^-?[0-9.]*/, "");
|
|
3271
3271
|
function n(o) {
|
|
3272
3272
|
for (; o < 0; ) o += 4;
|
|
@@ -3291,78 +3291,78 @@ function _s(e, t = 0) {
|
|
|
3291
3291
|
}
|
|
3292
3292
|
return t;
|
|
3293
3293
|
}
|
|
3294
|
-
function
|
|
3294
|
+
function Fs(e, t) {
|
|
3295
3295
|
let r = e.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
|
|
3296
3296
|
for (const n in t) r += " " + n + '="' + t[n] + '"';
|
|
3297
3297
|
return '<svg xmlns="http://www.w3.org/2000/svg"' + r + ">" + e + "</svg>";
|
|
3298
3298
|
}
|
|
3299
|
-
function Fs(e) {
|
|
3300
|
-
return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
|
|
3301
|
-
}
|
|
3302
3299
|
function Ps(e) {
|
|
3303
|
-
return "
|
|
3300
|
+
return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
|
|
3304
3301
|
}
|
|
3305
3302
|
function Ts(e) {
|
|
3306
|
-
return
|
|
3303
|
+
return "data:image/svg+xml," + Ps(e);
|
|
3304
|
+
}
|
|
3305
|
+
function Es(e) {
|
|
3306
|
+
return 'url("' + Ts(e) + '")';
|
|
3307
3307
|
}
|
|
3308
3308
|
let Tt;
|
|
3309
|
-
function
|
|
3309
|
+
function Os() {
|
|
3310
3310
|
try {
|
|
3311
3311
|
Tt = window.trustedTypes.createPolicy("iconify", { createHTML: (e) => e });
|
|
3312
3312
|
} catch {
|
|
3313
3313
|
Tt = null;
|
|
3314
3314
|
}
|
|
3315
3315
|
}
|
|
3316
|
-
function
|
|
3317
|
-
return Tt === void 0 &&
|
|
3316
|
+
function As(e) {
|
|
3317
|
+
return Tt === void 0 && Os(), Tt ? Tt.createHTML(e) : e;
|
|
3318
3318
|
}
|
|
3319
|
-
const
|
|
3320
|
-
...
|
|
3319
|
+
const no = {
|
|
3320
|
+
...eo,
|
|
3321
3321
|
inline: !1
|
|
3322
|
-
},
|
|
3322
|
+
}, js = {
|
|
3323
3323
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3324
3324
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
3325
3325
|
"aria-hidden": !0,
|
|
3326
3326
|
role: "img"
|
|
3327
|
-
},
|
|
3327
|
+
}, $s = {
|
|
3328
3328
|
display: "inline-block"
|
|
3329
3329
|
}, br = {
|
|
3330
3330
|
backgroundColor: "currentColor"
|
|
3331
|
-
},
|
|
3331
|
+
}, oo = {
|
|
3332
3332
|
backgroundColor: "transparent"
|
|
3333
|
-
},
|
|
3333
|
+
}, wn = {
|
|
3334
3334
|
Image: "var(--svg)",
|
|
3335
3335
|
Repeat: "no-repeat",
|
|
3336
3336
|
Size: "100% 100%"
|
|
3337
|
-
},
|
|
3337
|
+
}, yn = {
|
|
3338
3338
|
WebkitMask: br,
|
|
3339
3339
|
mask: br,
|
|
3340
|
-
background:
|
|
3340
|
+
background: oo
|
|
3341
3341
|
};
|
|
3342
|
-
for (const e in
|
|
3343
|
-
const t =
|
|
3344
|
-
for (const r in
|
|
3345
|
-
t[e + r] =
|
|
3342
|
+
for (const e in yn) {
|
|
3343
|
+
const t = yn[e];
|
|
3344
|
+
for (const r in wn)
|
|
3345
|
+
t[e + r] = wn[r];
|
|
3346
3346
|
}
|
|
3347
|
-
const
|
|
3348
|
-
...
|
|
3347
|
+
const Ls = {
|
|
3348
|
+
...no,
|
|
3349
3349
|
inline: !0
|
|
3350
3350
|
};
|
|
3351
|
-
function
|
|
3351
|
+
function xn(e) {
|
|
3352
3352
|
return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
|
|
3353
3353
|
}
|
|
3354
|
-
const
|
|
3355
|
-
const n = t.inline ?
|
|
3356
|
-
...s === "svg" ?
|
|
3354
|
+
const Ds = (e, t, r) => {
|
|
3355
|
+
const n = t.inline ? Ls : no, o = Ns(n, t), s = t.mode || "svg", i = {}, c = t.style || {}, l = {
|
|
3356
|
+
...s === "svg" ? js : {}
|
|
3357
3357
|
};
|
|
3358
3358
|
if (r) {
|
|
3359
3359
|
const N = Xt(r, !1, !0);
|
|
3360
3360
|
if (N) {
|
|
3361
|
-
const P = ["iconify"],
|
|
3361
|
+
const P = ["iconify"], Y = [
|
|
3362
3362
|
"provider",
|
|
3363
3363
|
"prefix"
|
|
3364
3364
|
];
|
|
3365
|
-
for (const w of
|
|
3365
|
+
for (const w of Y)
|
|
3366
3366
|
N[w] && P.push("iconify--" + N[w]);
|
|
3367
3367
|
l.className = P.join(" ");
|
|
3368
3368
|
}
|
|
@@ -3396,7 +3396,7 @@ const Ls = (e, t, r) => {
|
|
|
3396
3396
|
break;
|
|
3397
3397
|
// Flip as string: 'horizontal,vertical'
|
|
3398
3398
|
case "flip":
|
|
3399
|
-
typeof P == "string" &&
|
|
3399
|
+
typeof P == "string" && _s(o, P);
|
|
3400
3400
|
break;
|
|
3401
3401
|
// Color: copy to style
|
|
3402
3402
|
case "color":
|
|
@@ -3404,7 +3404,7 @@ const Ls = (e, t, r) => {
|
|
|
3404
3404
|
break;
|
|
3405
3405
|
// Rotation as string
|
|
3406
3406
|
case "rotate":
|
|
3407
|
-
typeof P == "string" ? o[N] =
|
|
3407
|
+
typeof P == "string" ? o[N] = Is(P) : typeof P == "number" && (o[N] = P);
|
|
3408
3408
|
break;
|
|
3409
3409
|
// Remove aria-hidden
|
|
3410
3410
|
case "ariaHidden":
|
|
@@ -3416,7 +3416,7 @@ const Ls = (e, t, r) => {
|
|
|
3416
3416
|
n[N] === void 0 && (l[N] = P);
|
|
3417
3417
|
}
|
|
3418
3418
|
}
|
|
3419
|
-
const p =
|
|
3419
|
+
const p = Qa(e, o), g = p.attributes;
|
|
3420
3420
|
if (o.inline && (i.verticalAlign = "-0.125em"), s === "svg") {
|
|
3421
3421
|
l.style = {
|
|
3422
3422
|
...i,
|
|
@@ -3424,26 +3424,26 @@ const Ls = (e, t, r) => {
|
|
|
3424
3424
|
}, Object.assign(l, g);
|
|
3425
3425
|
let N = 0, P = t.id;
|
|
3426
3426
|
return typeof P == "string" && (P = P.replace(/-/g, "_")), l.dangerouslySetInnerHTML = {
|
|
3427
|
-
__html:
|
|
3427
|
+
__html: As(ts(p.body, P ? () => P + "ID" + N++ : "iconifyReact"))
|
|
3428
3428
|
}, cr("svg", l);
|
|
3429
3429
|
}
|
|
3430
|
-
const { body: y, width: x, height: S } = e, _ = s === "mask" || (s === "bg" ? !1 : y.indexOf("currentColor") !== -1), F =
|
|
3430
|
+
const { body: y, width: x, height: S } = e, _ = s === "mask" || (s === "bg" ? !1 : y.indexOf("currentColor") !== -1), F = Fs(y, {
|
|
3431
3431
|
...g,
|
|
3432
3432
|
width: x + "",
|
|
3433
3433
|
height: S + ""
|
|
3434
3434
|
});
|
|
3435
3435
|
return l.style = {
|
|
3436
3436
|
...i,
|
|
3437
|
-
"--svg":
|
|
3438
|
-
width:
|
|
3439
|
-
height:
|
|
3440
|
-
|
|
3441
|
-
..._ ? br :
|
|
3437
|
+
"--svg": Es(F),
|
|
3438
|
+
width: xn(g.width),
|
|
3439
|
+
height: xn(g.height),
|
|
3440
|
+
...$s,
|
|
3441
|
+
..._ ? br : oo,
|
|
3442
3442
|
...c
|
|
3443
3443
|
}, cr("span", l);
|
|
3444
3444
|
};
|
|
3445
|
-
|
|
3446
|
-
|
|
3445
|
+
Xn(!0);
|
|
3446
|
+
rs("", ds);
|
|
3447
3447
|
if (typeof document < "u" && typeof window < "u") {
|
|
3448
3448
|
const e = window;
|
|
3449
3449
|
if (e.IconifyPreload !== void 0) {
|
|
@@ -3453,7 +3453,7 @@ if (typeof document < "u" && typeof window < "u") {
|
|
|
3453
3453
|
// Check if item is an object and not null/array
|
|
3454
3454
|
(typeof n != "object" || n === null || n instanceof Array || // Check for 'icons' and 'prefix'
|
|
3455
3455
|
typeof n.icons != "object" || typeof n.prefix != "string" || // Add icon set
|
|
3456
|
-
!
|
|
3456
|
+
!Ha(n)) && console.error(r);
|
|
3457
3457
|
} catch {
|
|
3458
3458
|
console.error(r);
|
|
3459
3459
|
}
|
|
@@ -3468,14 +3468,14 @@ if (typeof document < "u" && typeof window < "u") {
|
|
|
3468
3468
|
const o = t[r];
|
|
3469
3469
|
if (typeof o != "object" || !o || o.resources === void 0)
|
|
3470
3470
|
continue;
|
|
3471
|
-
|
|
3471
|
+
ns(r, o) || console.error(n);
|
|
3472
3472
|
} catch {
|
|
3473
3473
|
console.error(n);
|
|
3474
3474
|
}
|
|
3475
3475
|
}
|
|
3476
3476
|
}
|
|
3477
3477
|
}
|
|
3478
|
-
function
|
|
3478
|
+
function ao(e) {
|
|
3479
3479
|
const [t, r] = C(!!e.ssr), [n, o] = C({});
|
|
3480
3480
|
function s(S) {
|
|
3481
3481
|
if (S) {
|
|
@@ -3485,7 +3485,7 @@ function oo(e) {
|
|
|
3485
3485
|
name: "",
|
|
3486
3486
|
data: _
|
|
3487
3487
|
};
|
|
3488
|
-
const F =
|
|
3488
|
+
const F = un(_);
|
|
3489
3489
|
if (F)
|
|
3490
3490
|
return {
|
|
3491
3491
|
name: _,
|
|
@@ -3515,43 +3515,43 @@ function oo(e) {
|
|
|
3515
3515
|
});
|
|
3516
3516
|
return;
|
|
3517
3517
|
}
|
|
3518
|
-
const F =
|
|
3518
|
+
const F = un(_);
|
|
3519
3519
|
if (p({
|
|
3520
3520
|
name: _,
|
|
3521
3521
|
data: F
|
|
3522
3522
|
}))
|
|
3523
3523
|
if (F === void 0) {
|
|
3524
|
-
const N =
|
|
3524
|
+
const N = Ss([_], g);
|
|
3525
3525
|
o({
|
|
3526
3526
|
callback: N
|
|
3527
3527
|
});
|
|
3528
3528
|
} else F && ((S = e.onLoad) === null || S === void 0 || S.call(e, _));
|
|
3529
3529
|
}
|
|
3530
|
-
|
|
3530
|
+
ke(() => (r(!0), l), []), ke(() => {
|
|
3531
3531
|
t && g();
|
|
3532
3532
|
}, [e.icon, t]);
|
|
3533
3533
|
const { name: y, data: x } = i;
|
|
3534
|
-
return x ?
|
|
3534
|
+
return x ? Ds({
|
|
3535
3535
|
...Pr,
|
|
3536
3536
|
...x
|
|
3537
3537
|
}, e, y) : e.children ? e.children : e.fallback ? e.fallback : cr("span", {});
|
|
3538
3538
|
}
|
|
3539
|
-
const
|
|
3539
|
+
const ie = In((e, t) => ao({
|
|
3540
3540
|
...e,
|
|
3541
3541
|
_ref: t
|
|
3542
3542
|
}));
|
|
3543
|
-
|
|
3543
|
+
In((e, t) => ao({
|
|
3544
3544
|
inline: !0,
|
|
3545
3545
|
...e,
|
|
3546
3546
|
_ref: t
|
|
3547
3547
|
}));
|
|
3548
|
-
const
|
|
3548
|
+
const Ve = "USD", bn = (e) => {
|
|
3549
3549
|
var n, o, s;
|
|
3550
3550
|
const t = e == null ? void 0 : e.availability;
|
|
3551
3551
|
if (!t) return !1;
|
|
3552
3552
|
const r = (s = (o = (n = t.channels) == null ? void 0 : n.results) == null ? void 0 : o[0]) == null ? void 0 : s.availability;
|
|
3553
3553
|
return r ? r.isOnStock === !0 && (r.availableQuantity ?? 0) > 0 : !1;
|
|
3554
|
-
}, vr = (e, t =
|
|
3554
|
+
}, vr = (e, t = Ve) => {
|
|
3555
3555
|
const r = (e == null ? void 0 : e.prices) ?? [];
|
|
3556
3556
|
if (!r.length) return null;
|
|
3557
3557
|
const n = (i) => {
|
|
@@ -3575,27 +3575,89 @@ const He = "USD", xn = (e) => {
|
|
|
3575
3575
|
}
|
|
3576
3576
|
), s = n(o);
|
|
3577
3577
|
return s || n(r) || null;
|
|
3578
|
-
},
|
|
3578
|
+
}, zs = (e, t) => {
|
|
3579
3579
|
if (!Array.isArray(e)) return "";
|
|
3580
3580
|
const r = e.find((n) => n.name === t) || e.find((n) => {
|
|
3581
3581
|
var o;
|
|
3582
3582
|
return ((o = n.name) == null ? void 0 : o.toLowerCase()) === t.toLowerCase();
|
|
3583
3583
|
});
|
|
3584
3584
|
return !r || !r.value ? "" : typeof r.value == "object" ? r.value.label || "" : r.value;
|
|
3585
|
-
},
|
|
3585
|
+
}, Ms = (e) => {
|
|
3586
3586
|
let t = "";
|
|
3587
3587
|
if (Array.isArray(e)) {
|
|
3588
3588
|
const r = e.find((n) => n.name === "size") || e.find((n) => n.name === "Size");
|
|
3589
3589
|
r && r.value && (t = typeof r.value == "object" ? r.value.label || "" : r.value);
|
|
3590
3590
|
}
|
|
3591
3591
|
return { sizeLabel: t };
|
|
3592
|
-
},
|
|
3592
|
+
}, Ye = (e) => zs((e == null ? void 0 : e.attributesRaw) ?? [], "color"), Qe = (e) => Ms((e == null ? void 0 : e.attributesRaw) ?? []).sizeLabel, st = (e, t, r) => {
|
|
3593
3593
|
for (const n of e) {
|
|
3594
|
-
const o =
|
|
3594
|
+
const o = Ye(n.variant), s = Qe(n.variant);
|
|
3595
3595
|
if ((t ? o === t : !0) && (r ? s === r : !0)) return n;
|
|
3596
3596
|
}
|
|
3597
3597
|
return null;
|
|
3598
|
-
},
|
|
3598
|
+
}, Bs = ({
|
|
3599
|
+
children: e,
|
|
3600
|
+
value: t,
|
|
3601
|
+
name: r,
|
|
3602
|
+
href: n,
|
|
3603
|
+
disabled: o,
|
|
3604
|
+
selected: s,
|
|
3605
|
+
isFocusable: i,
|
|
3606
|
+
variant: c = "square",
|
|
3607
|
+
onChange: l
|
|
3608
|
+
}) => /* @__PURE__ */ a(
|
|
3609
|
+
"button",
|
|
3610
|
+
{
|
|
3611
|
+
role: "radio",
|
|
3612
|
+
"aria-checked": s,
|
|
3613
|
+
disabled: o,
|
|
3614
|
+
tabIndex: i ? 0 : -1,
|
|
3615
|
+
onClick: (g) => {
|
|
3616
|
+
g.preventDefault(), !o && (l == null || l(t, r));
|
|
3617
|
+
},
|
|
3618
|
+
className: `
|
|
3619
|
+
flex items-center justify-center
|
|
3620
|
+
overflow-hidden cursor-pointer
|
|
3621
|
+
border
|
|
3622
|
+
${c === "circle" ? "rounded-full h-8 w-8" : "rounded-md h-10 px-3"}
|
|
3623
|
+
${s ? "border-black" : "border-gray-300"}
|
|
3624
|
+
${o ? "opacity-40 cursor-not-allowed" : ""}
|
|
3625
|
+
`,
|
|
3626
|
+
style: { background: "transparent" },
|
|
3627
|
+
children: typeof e == "string" ? /* @__PURE__ */ a("span", { className: "text-xs", children: e }) : e
|
|
3628
|
+
}
|
|
3629
|
+
), Us = ({
|
|
3630
|
+
children: e,
|
|
3631
|
+
value: t,
|
|
3632
|
+
label: r,
|
|
3633
|
+
displayName: n,
|
|
3634
|
+
onChange: o
|
|
3635
|
+
}) => {
|
|
3636
|
+
const s = Be(null);
|
|
3637
|
+
return /* @__PURE__ */ d("div", { className: "mb-4", children: [
|
|
3638
|
+
/* @__PURE__ */ a("div", { className: "text-sm font-medium mb-2", children: r }),
|
|
3639
|
+
/* @__PURE__ */ a(
|
|
3640
|
+
"div",
|
|
3641
|
+
{
|
|
3642
|
+
role: "radiogroup",
|
|
3643
|
+
"aria-label": r,
|
|
3644
|
+
className: "flex gap-2 flex-wrap",
|
|
3645
|
+
ref: s,
|
|
3646
|
+
children: Rr.Children.map(
|
|
3647
|
+
e,
|
|
3648
|
+
(i) => Rr.cloneElement(i, {
|
|
3649
|
+
selected: i.props.value === t,
|
|
3650
|
+
onChange: o
|
|
3651
|
+
})
|
|
3652
|
+
)
|
|
3653
|
+
}
|
|
3654
|
+
),
|
|
3655
|
+
n && /* @__PURE__ */ d("div", { className: "mt-1 text-xs text-gray-500", children: [
|
|
3656
|
+
"Selected: ",
|
|
3657
|
+
n
|
|
3658
|
+
] })
|
|
3659
|
+
] });
|
|
3660
|
+
}, Ge = (e) => e.charAt(0).toUpperCase() + e.slice(1), it = {
|
|
3599
3661
|
standard: {
|
|
3600
3662
|
label: "Standard Delivery",
|
|
3601
3663
|
fee: 0,
|
|
@@ -3614,11 +3676,11 @@ const He = "USD", xn = (e) => {
|
|
|
3614
3676
|
subtitle: "Available in select locations (+$10)",
|
|
3615
3677
|
icon: "mdi:truck-fast-outline"
|
|
3616
3678
|
}
|
|
3617
|
-
},
|
|
3679
|
+
}, qs = {
|
|
3618
3680
|
standard: "GROUND",
|
|
3619
3681
|
express: "2-DAY SHIPPING",
|
|
3620
3682
|
sameday: "OVERNIGHT"
|
|
3621
|
-
},
|
|
3683
|
+
}, je = (e, t) => {
|
|
3622
3684
|
try {
|
|
3623
3685
|
return e.toLocaleString("en-US", {
|
|
3624
3686
|
style: "currency",
|
|
@@ -3627,41 +3689,41 @@ const He = "USD", xn = (e) => {
|
|
|
3627
3689
|
} catch {
|
|
3628
3690
|
return `${t} ${e.toFixed(2)}`;
|
|
3629
3691
|
}
|
|
3630
|
-
},
|
|
3631
|
-
const t =
|
|
3632
|
-
return t ? [t, ...
|
|
3633
|
-
},
|
|
3692
|
+
}, so = (e) => e == null ? void 0 : e.masterVariant, vn = (e) => Array.isArray(e == null ? void 0 : e.variants) ? e.variants : [], Ht = (e) => {
|
|
3693
|
+
const t = so(e);
|
|
3694
|
+
return t ? [t, ...vn(e)] : vn(e);
|
|
3695
|
+
}, Rs = (e, t = 0) => Ht(e)[t], Hs = (e) => {
|
|
3634
3696
|
var t, r;
|
|
3635
3697
|
return ((r = (t = e == null ? void 0 : e.images) == null ? void 0 : t[0]) == null ? void 0 : r.url) ?? "";
|
|
3636
|
-
},
|
|
3698
|
+
}, kn = (e, t) => {
|
|
3637
3699
|
var r, n, o, s, i, c, l, p;
|
|
3638
|
-
return
|
|
3639
|
-
},
|
|
3700
|
+
return Hs(t) || ((s = (o = (n = (r = e.imageGroups) == null ? void 0 : r[0]) == null ? void 0 : n.images) == null ? void 0 : o[0]) == null ? void 0 : s.link) || ((p = (l = (c = (i = e.image_groups) == null ? void 0 : i[0]) == null ? void 0 : c.images) == null ? void 0 : l[0]) == null ? void 0 : p.link) || "";
|
|
3701
|
+
}, Sn = (e) => (e == null ? void 0 : e.name) || (e == null ? void 0 : e.title) || (e == null ? void 0 : e.productName) || "any", Yt = (e) => {
|
|
3640
3702
|
var s, i, c, l, p, g;
|
|
3641
|
-
const t = e ? vr(e,
|
|
3703
|
+
const t = e ? vr(e, Ve) : null;
|
|
3642
3704
|
if (t != null && t.cent && (t != null && t.cur))
|
|
3643
3705
|
return {
|
|
3644
3706
|
amount: +(t.cent / 100),
|
|
3645
3707
|
currency: t.cur,
|
|
3646
3708
|
regularAmount: t.regularCent ? t.regularCent / 100 : void 0
|
|
3647
3709
|
};
|
|
3648
|
-
const r = (c = (i = (s = e == null ? void 0 : e.prices) == null ? void 0 : s[0]) == null ? void 0 : i.value) == null ? void 0 : c.centAmount, n = ((g = (p = (l = e == null ? void 0 : e.prices) == null ? void 0 : l[0]) == null ? void 0 : p.value) == null ? void 0 : g.currencyCode) ??
|
|
3710
|
+
const r = (c = (i = (s = e == null ? void 0 : e.prices) == null ? void 0 : s[0]) == null ? void 0 : i.value) == null ? void 0 : c.centAmount, n = ((g = (p = (l = e == null ? void 0 : e.prices) == null ? void 0 : l[0]) == null ? void 0 : p.value) == null ? void 0 : g.currencyCode) ?? Ve;
|
|
3649
3711
|
return { amount: Number.isFinite(r) ? +(Number(r) / 100) : 0, currency: n };
|
|
3650
|
-
},
|
|
3651
|
-
const { amount: r } =
|
|
3712
|
+
}, Nn = (e, t) => {
|
|
3713
|
+
const { amount: r } = Yt(t);
|
|
3652
3714
|
if (r) return r;
|
|
3653
3715
|
const n = (e == null ? void 0 : e.price) ?? (e == null ? void 0 : e.sellingPrice) ?? (e == null ? void 0 : e.unitPrice) ?? (e == null ? void 0 : e.mrp) ?? 0, o = Number(n);
|
|
3654
3716
|
return Number.isFinite(o) ? o : 0;
|
|
3655
|
-
},
|
|
3717
|
+
}, Cn = (e) => {
|
|
3656
3718
|
var t;
|
|
3657
3719
|
return (e == null ? void 0 : e.sku) || ((t = e == null ? void 0 : e.variant) == null ? void 0 : t.sku) || (e == null ? void 0 : e.selectedSku) || "";
|
|
3658
|
-
},
|
|
3720
|
+
}, Ys = (e) => {
|
|
3659
3721
|
var t;
|
|
3660
3722
|
return (e == null ? void 0 : e.color) || (e == null ? void 0 : e.selectedColor) || ((t = e == null ? void 0 : e.variant) == null ? void 0 : t.color) || "";
|
|
3661
|
-
},
|
|
3723
|
+
}, Vs = (e) => {
|
|
3662
3724
|
var t;
|
|
3663
3725
|
return (e == null ? void 0 : e.size) || (e == null ? void 0 : e.selectedSize) || ((t = e == null ? void 0 : e.variant) == null ? void 0 : t.size) || "";
|
|
3664
|
-
},
|
|
3726
|
+
}, _n = 20, ui = ({
|
|
3665
3727
|
open: e,
|
|
3666
3728
|
onClose: t,
|
|
3667
3729
|
product: r,
|
|
@@ -3673,41 +3735,41 @@ const He = "USD", xn = (e) => {
|
|
|
3673
3735
|
const i = null, c = null, l = Ht(r), p = Math.min(
|
|
3674
3736
|
Math.max(0, n || 0),
|
|
3675
3737
|
Math.max(0, l.length - 1)
|
|
3676
|
-
), g = l.length, [y, x] = C(p), [S, _] = C(null), [F, N] = C(null), P =
|
|
3677
|
-
|
|
3738
|
+
), g = l.length, [y, x] = C(p), [S, _] = C(null), [F, N] = C(null), P = Be(null), Y = Be(null), w = Rs(r, y), [J, $e] = C(""), [E, V] = C(!1), [be, le] = C(!1), [Z, Oe] = C(!1), [Le, we] = C(""), [z, O] = C(!1), [R, et] = C(null), [Ke, Se] = C([]), [Fe, ht] = C([]), [tt, U] = C([]), [ue, Ae] = C(!1), [Pe, Zt] = C(), [er, m] = C(!0), [$, L] = C(!1), [K, M] = C(!1), [j, fe] = C("standard"), [q, D] = C(!1), [ee, ae] = C(!1), [Ne, Ce] = C("card"), [te, Q] = C(!1), [_e, re] = C(!1), [k, W] = C(!1), [X, me] = C(null), [Ie, rt] = C(null), [pt, At] = C(""), [qe, jt] = C(!1), gt = Be(null);
|
|
3739
|
+
ke(() => {
|
|
3678
3740
|
const u = Ht(r), h = Math.min(
|
|
3679
3741
|
Math.max(0, n || 0),
|
|
3680
3742
|
Math.max(0, u.length - 1)
|
|
3681
3743
|
);
|
|
3682
3744
|
x(h);
|
|
3683
|
-
const f =
|
|
3684
|
-
P.current = v || null,
|
|
3685
|
-
}, [n, r]),
|
|
3686
|
-
|
|
3745
|
+
const f = so(r), v = Ye(f), T = Qe(f);
|
|
3746
|
+
P.current = v || null, Y.current = T || null, _(v || null), N(T || null);
|
|
3747
|
+
}, [n, r]), ke(() => {
|
|
3748
|
+
gt.current && (gt.current.scrollTop = gt.current.scrollHeight);
|
|
3687
3749
|
}, [
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3750
|
+
Ke,
|
|
3751
|
+
ue,
|
|
3752
|
+
$,
|
|
3753
|
+
K,
|
|
3754
|
+
q,
|
|
3755
|
+
ee,
|
|
3756
|
+
te,
|
|
3757
|
+
_e,
|
|
3696
3758
|
k,
|
|
3697
3759
|
E,
|
|
3698
|
-
|
|
3760
|
+
be
|
|
3699
3761
|
]);
|
|
3700
|
-
const I = "var(--tanya)",
|
|
3762
|
+
const I = "var(--tanya)", De = "var(--tanya-contrast)", nt = I, kt = "#804c9e", io = () => {
|
|
3701
3763
|
console.log("AgenticShopping feedback:", {
|
|
3702
|
-
rating:
|
|
3703
|
-
comment:
|
|
3764
|
+
rating: Ie,
|
|
3765
|
+
comment: pt
|
|
3704
3766
|
}), jt(!0);
|
|
3705
|
-
},
|
|
3706
|
-
|
|
3767
|
+
}, lo = () => {
|
|
3768
|
+
rt(null), At(""), jt(!0);
|
|
3707
3769
|
}, Ar = (u) => {
|
|
3708
|
-
const f = ((u == null ? void 0 : u.intentMandateId) || (u == null ? void 0 : u.intent_mandate_id) || (u == null ? void 0 : u.id) || null) ??
|
|
3770
|
+
const f = ((u == null ? void 0 : u.intentMandateId) || (u == null ? void 0 : u.intent_mandate_id) || (u == null ? void 0 : u.id) || null) ?? X;
|
|
3709
3771
|
return e ? /* @__PURE__ */ d("div", { className: "mt-3 flex items-start gap-3 rounded-lg border border-green-200 bg-green-50 p-4 text-green-800", children: [
|
|
3710
|
-
/* @__PURE__ */ a("div", { className: "success-tick-animation", children: /* @__PURE__ */ a(
|
|
3772
|
+
/* @__PURE__ */ a("div", { className: "success-tick-animation", children: /* @__PURE__ */ a(ie, { icon: "mdi:check-circle", width: "28", color: "#16a34a" }) }),
|
|
3711
3773
|
/* @__PURE__ */ d("div", { className: "text-sm w-full", children: [
|
|
3712
3774
|
/* @__PURE__ */ a("div", { className: "font-semibold", children: "Success!" }),
|
|
3713
3775
|
/* @__PURE__ */ a("div", { children: "Your smart order has been saved. I’ll watch the price and auto-purchase when the conditions are met." }),
|
|
@@ -3721,19 +3783,19 @@ const He = "USD", xn = (e) => {
|
|
|
3721
3783
|
}
|
|
3722
3784
|
)
|
|
3723
3785
|
] }),
|
|
3724
|
-
!
|
|
3786
|
+
!qe && /* @__PURE__ */ d("div", { className: "mt-4 rounded-lg bg-white/70 p-3 text-gray-900", children: [
|
|
3725
3787
|
/* @__PURE__ */ a("h4", { className: "font-semibold mb-1", children: "Please post your feedback here" }),
|
|
3726
3788
|
/* @__PURE__ */ a("p", { className: "text-sm text-gray-700 mb-3", children: "Rate us on how much our response was helpful" }),
|
|
3727
3789
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-1 mb-3", children: [1, 2, 3, 4, 5].map((v) => /* @__PURE__ */ a(
|
|
3728
3790
|
"button",
|
|
3729
3791
|
{
|
|
3730
3792
|
type: "button",
|
|
3731
|
-
onClick: () =>
|
|
3793
|
+
onClick: () => rt(v),
|
|
3732
3794
|
className: "p-0.5",
|
|
3733
3795
|
children: /* @__PURE__ */ a(
|
|
3734
|
-
|
|
3796
|
+
ie,
|
|
3735
3797
|
{
|
|
3736
|
-
icon:
|
|
3798
|
+
icon: Ie && Ie >= v ? "mdi:star" : "mdi:star-outline",
|
|
3737
3799
|
width: "20",
|
|
3738
3800
|
className: "text-yellow-500"
|
|
3739
3801
|
}
|
|
@@ -3745,7 +3807,7 @@ const He = "USD", xn = (e) => {
|
|
|
3745
3807
|
/* @__PURE__ */ a(
|
|
3746
3808
|
"textarea",
|
|
3747
3809
|
{
|
|
3748
|
-
value:
|
|
3810
|
+
value: pt,
|
|
3749
3811
|
onChange: (v) => At(v.target.value),
|
|
3750
3812
|
rows: 3,
|
|
3751
3813
|
className: "mt-1 w-full rounded-md border border-gray-300 p-2 text-sm outline-none focus:ring-1 focus:ring-gray-300",
|
|
@@ -3757,7 +3819,7 @@ const He = "USD", xn = (e) => {
|
|
|
3757
3819
|
"button",
|
|
3758
3820
|
{
|
|
3759
3821
|
type: "button",
|
|
3760
|
-
onClick:
|
|
3822
|
+
onClick: lo,
|
|
3761
3823
|
className: "px-4 py-2 rounded-full border text-sm font-medium hover:bg-gray-50",
|
|
3762
3824
|
children: "Cancel"
|
|
3763
3825
|
}
|
|
@@ -3766,26 +3828,26 @@ const He = "USD", xn = (e) => {
|
|
|
3766
3828
|
"button",
|
|
3767
3829
|
{
|
|
3768
3830
|
type: "button",
|
|
3769
|
-
onClick:
|
|
3831
|
+
onClick: io,
|
|
3770
3832
|
className: "px-4 py-2 rounded-full text-sm font-semibold text-white shadow",
|
|
3771
3833
|
style: { background: I },
|
|
3772
|
-
disabled: !
|
|
3834
|
+
disabled: !Ie && !pt.trim(),
|
|
3773
3835
|
children: "Submit"
|
|
3774
3836
|
}
|
|
3775
3837
|
)
|
|
3776
3838
|
] })
|
|
3777
3839
|
] }),
|
|
3778
|
-
|
|
3840
|
+
qe && /* @__PURE__ */ a("div", { className: "mt-3 text-xs text-green-900 font-medium", children: "Thanks for your feedback! 💚" })
|
|
3779
3841
|
] })
|
|
3780
3842
|
] }) : null;
|
|
3781
|
-
},
|
|
3843
|
+
}, co = async () => {
|
|
3782
3844
|
try {
|
|
3783
|
-
|
|
3845
|
+
U(o);
|
|
3784
3846
|
} catch (u) {
|
|
3785
3847
|
console.error("Error fetching addresses:", u);
|
|
3786
3848
|
}
|
|
3787
3849
|
}, St = (u, h) => {
|
|
3788
|
-
|
|
3850
|
+
Se((f) => [
|
|
3789
3851
|
...f,
|
|
3790
3852
|
{
|
|
3791
3853
|
query: "",
|
|
@@ -3795,7 +3857,7 @@ const He = "USD", xn = (e) => {
|
|
|
3795
3857
|
}
|
|
3796
3858
|
]);
|
|
3797
3859
|
}, jr = (u, h) => {
|
|
3798
|
-
|
|
3860
|
+
Se(
|
|
3799
3861
|
(f) => f.map(
|
|
3800
3862
|
(v) => v.response === "__CARD__" ? {
|
|
3801
3863
|
...v,
|
|
@@ -3805,52 +3867,52 @@ const He = "USD", xn = (e) => {
|
|
|
3805
3867
|
} : v
|
|
3806
3868
|
)
|
|
3807
3869
|
);
|
|
3808
|
-
},
|
|
3809
|
-
|
|
3870
|
+
}, uo = () => {
|
|
3871
|
+
Se(
|
|
3810
3872
|
(u) => u.filter(
|
|
3811
3873
|
(h) => !(h.query === "" && h.response !== "__SNAPSHOT__" && h.response !== "__TEXT__")
|
|
3812
3874
|
)
|
|
3813
3875
|
);
|
|
3814
3876
|
}, $t = () => {
|
|
3815
|
-
|
|
3816
|
-
},
|
|
3817
|
-
|
|
3818
|
-
},
|
|
3877
|
+
re(!1), Ae(!1), M(!1), ae(!1), L(!1), D(!1), Q(!1), W(!1), O(!1), et(null), uo(), V(!1), le(!1);
|
|
3878
|
+
}, fo = () => {
|
|
3879
|
+
Ae(!1), L(!1), M(!1), fe("standard"), D(!1), ae(!1), Ce("card"), Q(!1), re(!1), W(!1), m(!0), et(null), localStorage.removeItem("agentic_order"), localStorage.removeItem("agentic_order_address"), localStorage.removeItem("agentic_order_delivery"), localStorage.removeItem("agentic_order_payment"), localStorage.removeItem("agentic_order_final");
|
|
3880
|
+
}, Te = Hr(() => Ht(r).map((h, f) => ({
|
|
3819
3881
|
index: f,
|
|
3820
3882
|
variant: h,
|
|
3821
3883
|
images: ((h == null ? void 0 : h.images) || []).map((v) => (v == null ? void 0 : v.url) || "").filter(Boolean)
|
|
3822
|
-
})), [r]), Nt =
|
|
3823
|
-
if (!
|
|
3884
|
+
})), [r]), Nt = Hr(() => {
|
|
3885
|
+
if (!Te.length) return !1;
|
|
3824
3886
|
const u = S || void 0, h = F || void 0, f = (v, T) => {
|
|
3825
|
-
var
|
|
3826
|
-
const b =
|
|
3827
|
-
|
|
3887
|
+
var B;
|
|
3888
|
+
const b = st(
|
|
3889
|
+
Te,
|
|
3828
3890
|
v || void 0,
|
|
3829
3891
|
T || void 0
|
|
3830
3892
|
);
|
|
3831
|
-
return !!(b && ((
|
|
3893
|
+
return !!(b && ((B = b.variant) != null && B.sku));
|
|
3832
3894
|
};
|
|
3833
3895
|
return u && h ? f(u, h) : u && !h ? f(u, null) : !u && h ? f(void 0, h) : !!(w && w.sku);
|
|
3834
|
-
}, [
|
|
3896
|
+
}, [Te, S, F, w]), mo = Z || z || !Nt, Ct = (u) => {
|
|
3835
3897
|
const h = Number((u == null ? void 0 : u.quantity) ?? 1);
|
|
3836
3898
|
return Number.isFinite(h) && h > 0 ? h : 1;
|
|
3837
3899
|
}, $r = (u) => {
|
|
3838
3900
|
const h = Ct(u), f = Number((u == null ? void 0 : u.max_price_minor) ?? 0);
|
|
3839
|
-
return Number.isFinite(f) && f > 0 ? +(f / 100) : +(
|
|
3901
|
+
return Number.isFinite(f) && f > 0 ? +(f / 100) : +(Nn(r, w) * h);
|
|
3840
3902
|
}, Lr = (u) => {
|
|
3841
|
-
var
|
|
3842
|
-
const h =
|
|
3843
|
-
return { product_total: T, tax: b, shipping_fee:
|
|
3903
|
+
var A;
|
|
3904
|
+
const h = R, f = Yt(w), v = u || (h == null ? void 0 : h.currency) || f.currency || Ve, T = $r(h), b = +(T * 0.08).toFixed(2), B = ((A = it[j]) == null ? void 0 : A.fee) || 0;
|
|
3905
|
+
return { product_total: T, tax: b, shipping_fee: B, currency: v };
|
|
3844
3906
|
}, tr = async (u, h, f) => {
|
|
3845
|
-
jr(),
|
|
3846
|
-
const v =
|
|
3907
|
+
jr(), fo(), Oe(!0), O(!0), V(!1), le(!1);
|
|
3908
|
+
const v = Fe.slice(-_n);
|
|
3847
3909
|
try {
|
|
3848
3910
|
const T = await ur(i, c);
|
|
3849
3911
|
if (!T) throw new Error("Failed to fetch token");
|
|
3850
|
-
const b = localStorage.getItem("customerNumber"),
|
|
3851
|
-
registered: String(
|
|
3912
|
+
const b = localStorage.getItem("customerNumber"), B = localStorage.getItem("isLoggedIn"), se = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
|
|
3913
|
+
registered: String(B || !1),
|
|
3852
3914
|
userId: String(b || (/* @__PURE__ */ new Date()).getTime())
|
|
3853
|
-
}).toString()}`,
|
|
3915
|
+
}).toString()}`, G = await fetch(`${se}`, {
|
|
3854
3916
|
method: "POST",
|
|
3855
3917
|
headers: {
|
|
3856
3918
|
"Content-Type": "application/json",
|
|
@@ -3870,100 +3932,100 @@ const He = "USD", xn = (e) => {
|
|
|
3870
3932
|
}
|
|
3871
3933
|
})
|
|
3872
3934
|
});
|
|
3873
|
-
if (!
|
|
3874
|
-
const
|
|
3875
|
-
let
|
|
3935
|
+
if (!G.body) throw new Error("Readable stream not supported");
|
|
3936
|
+
const he = G.body.getReader(), H = new TextDecoder();
|
|
3937
|
+
let ne = "", ye = "", Ee = "";
|
|
3876
3938
|
for (; ; ) {
|
|
3877
|
-
const { done:
|
|
3878
|
-
if (
|
|
3879
|
-
|
|
3880
|
-
const
|
|
3939
|
+
const { done: ce, value: ze } = await he.read();
|
|
3940
|
+
if (ce) break;
|
|
3941
|
+
ne += H.decode(ze, { stream: !0 });
|
|
3942
|
+
const Re = ne.split(`
|
|
3881
3943
|
`);
|
|
3882
|
-
|
|
3883
|
-
for (const
|
|
3884
|
-
if (!
|
|
3885
|
-
const
|
|
3944
|
+
ne = Re.pop() || "";
|
|
3945
|
+
for (const ot of Re) {
|
|
3946
|
+
if (!ot.startsWith("data:")) continue;
|
|
3947
|
+
const We = ot.slice(5).trim();
|
|
3886
3948
|
try {
|
|
3887
|
-
const
|
|
3888
|
-
|
|
3889
|
-
} catch (
|
|
3890
|
-
console.error("Error parsing JSON chunk:",
|
|
3949
|
+
const He = JSON.parse(We), Me = He.index, pe = He.data;
|
|
3950
|
+
Me === 0 ? ye = String(pe ?? "") : Me === 1 && (Ee = String(pe ?? ""));
|
|
3951
|
+
} catch (He) {
|
|
3952
|
+
console.error("Error parsing JSON chunk:", He);
|
|
3891
3953
|
}
|
|
3892
3954
|
}
|
|
3893
3955
|
}
|
|
3894
|
-
let
|
|
3895
|
-
if (
|
|
3896
|
-
const
|
|
3897
|
-
if (
|
|
3956
|
+
let oe = null;
|
|
3957
|
+
if (ye) {
|
|
3958
|
+
const ce = String(ye).replace(/\\n/g, "").trim();
|
|
3959
|
+
if (ce.startsWith("{") && ce.endsWith("}"))
|
|
3898
3960
|
try {
|
|
3899
|
-
|
|
3900
|
-
} catch (
|
|
3901
|
-
console.log(
|
|
3961
|
+
oe = JSON.parse(ce), oe.product_id = h, oe.sku_id = h, localStorage.setItem("agentic_order", JSON.stringify(oe));
|
|
3962
|
+
} catch (ze) {
|
|
3963
|
+
console.log(ze);
|
|
3902
3964
|
}
|
|
3903
3965
|
}
|
|
3904
|
-
|
|
3905
|
-
...
|
|
3966
|
+
et(oe), oe && Se((ce) => [
|
|
3967
|
+
...ce,
|
|
3906
3968
|
{
|
|
3907
3969
|
query: "",
|
|
3908
3970
|
response: "__CARD__",
|
|
3909
|
-
snapshotPayload: { extractedDetails:
|
|
3971
|
+
snapshotPayload: { extractedDetails: oe }
|
|
3910
3972
|
}
|
|
3911
|
-
]),
|
|
3912
|
-
...
|
|
3973
|
+
]), ht((ce) => [
|
|
3974
|
+
...ce,
|
|
3913
3975
|
{
|
|
3914
3976
|
userQuery: u,
|
|
3915
|
-
mainResponse:
|
|
3916
|
-
keywords:
|
|
3977
|
+
mainResponse: ye || "",
|
|
3978
|
+
keywords: Ee || ""
|
|
3917
3979
|
}
|
|
3918
|
-
].slice(-
|
|
3980
|
+
].slice(-_n));
|
|
3919
3981
|
} catch (T) {
|
|
3920
3982
|
console.error("Error sending message to Tanya:", T), O(!1);
|
|
3921
3983
|
} finally {
|
|
3922
|
-
|
|
3984
|
+
Oe(!1);
|
|
3923
3985
|
}
|
|
3924
3986
|
}, Dr = async (u) => {
|
|
3925
|
-
if (
|
|
3926
|
-
const h =
|
|
3987
|
+
if (z || Z || !Nt) return;
|
|
3988
|
+
const h = Le.trim();
|
|
3927
3989
|
if (!h) return;
|
|
3928
|
-
|
|
3929
|
-
const f = w == null ? void 0 : w.sku, v =
|
|
3990
|
+
Se((b) => [...b, { query: h, response: "" }]), we(""), $e(h);
|
|
3991
|
+
const f = w == null ? void 0 : w.sku, v = Cn(r), T = f || v || "";
|
|
3930
3992
|
if (g <= 1) {
|
|
3931
3993
|
if (T) {
|
|
3932
3994
|
tr(h, T, y);
|
|
3933
3995
|
return;
|
|
3934
3996
|
}
|
|
3935
|
-
|
|
3997
|
+
le(!0), O(!0);
|
|
3936
3998
|
return;
|
|
3937
3999
|
}
|
|
3938
|
-
T ? (
|
|
3939
|
-
}, mo = () => {
|
|
3940
|
-
const u = w == null ? void 0 : w.sku;
|
|
3941
|
-
u && tr(V, u, y);
|
|
4000
|
+
T ? (V(!0), O(!0)) : (le(!0), O(!0));
|
|
3942
4001
|
}, ho = () => {
|
|
3943
|
-
|
|
4002
|
+
const u = w == null ? void 0 : w.sku;
|
|
4003
|
+
u && tr(J, u, y);
|
|
3944
4004
|
}, po = () => {
|
|
4005
|
+
V(!1), le(!0), O(!0);
|
|
4006
|
+
}, go = () => {
|
|
3945
4007
|
if (!w || !w.sku) return;
|
|
3946
4008
|
const u = w.sku;
|
|
3947
|
-
tr(
|
|
3948
|
-
},
|
|
3949
|
-
|
|
3950
|
-
extractedDetails:
|
|
4009
|
+
tr(J, u, y);
|
|
4010
|
+
}, wo = async () => {
|
|
4011
|
+
Ae(!0), M(!1), ae(!1), re(!1), L(!1), D(!1), Q(!1), W(!1), await co(), jr("initial", {
|
|
4012
|
+
extractedDetails: R ?? void 0
|
|
3951
4013
|
});
|
|
3952
|
-
}, wo = () => {
|
|
3953
|
-
if (!Ie) return;
|
|
3954
|
-
const u = Ze.find(
|
|
3955
|
-
(h) => String(h.addressId ?? h.id) === Ie
|
|
3956
|
-
) || null;
|
|
3957
|
-
u && (localStorage.setItem("agentic_order_address", JSON.stringify(u)), $(!0), z(!0), L(!1), re(!1), W(!1), ee(!1), J(!1), St("address", u));
|
|
3958
4014
|
}, yo = () => {
|
|
3959
|
-
|
|
4015
|
+
if (!Pe) return;
|
|
4016
|
+
const u = tt.find(
|
|
4017
|
+
(h) => String(h.addressId ?? h.id) === Pe
|
|
4018
|
+
) || null;
|
|
4019
|
+
u && (localStorage.setItem("agentic_order_address", JSON.stringify(u)), L(!0), M(!0), D(!1), ae(!1), Q(!1), re(!1), W(!1), St("address", u));
|
|
3960
4020
|
}, xo = () => {
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
4021
|
+
L(!1), M(!1), D(!1), ae(!1), Q(!1), re(!1), W(!1), localStorage.removeItem("agentic_order_address");
|
|
4022
|
+
}, bo = () => {
|
|
4023
|
+
j && (localStorage.setItem("agentic_order_delivery", j), D(!0), ae(!0), Q(!1), re(!1), W(!1), St("delivery", {
|
|
4024
|
+
method: j,
|
|
4025
|
+
...it[j]
|
|
3964
4026
|
}));
|
|
3965
4027
|
}, zr = () => {
|
|
3966
|
-
|
|
4028
|
+
M(!1), D(!1), ae(!1), Q(!1), re(!1), W(!1), O(!1), $t(), Se((u) => [
|
|
3967
4029
|
...u,
|
|
3968
4030
|
{
|
|
3969
4031
|
query: "",
|
|
@@ -3973,12 +4035,12 @@ const He = "USD", xn = (e) => {
|
|
|
3973
4035
|
}
|
|
3974
4036
|
}
|
|
3975
4037
|
]);
|
|
3976
|
-
}, bo = () => {
|
|
3977
|
-
L(!1), re(!1), W(!1), ee(!1), J(!1), localStorage.removeItem("agentic_order_delivery");
|
|
3978
4038
|
}, vo = () => {
|
|
3979
|
-
|
|
4039
|
+
D(!1), ae(!1), Q(!1), re(!1), W(!1), localStorage.removeItem("agentic_order_delivery");
|
|
3980
4040
|
}, ko = () => {
|
|
3981
|
-
|
|
4041
|
+
Ne && (localStorage.setItem("agentic_order_payment", Ne), Q(!0), re(!0), W(!1), St("payment", { method: Ne }));
|
|
4042
|
+
}, So = () => {
|
|
4043
|
+
ae(!1), Q(!1), re(!1), W(!1), O(!1), $t(), Se((u) => [
|
|
3982
4044
|
...u,
|
|
3983
4045
|
{
|
|
3984
4046
|
query: "",
|
|
@@ -3988,81 +4050,81 @@ const He = "USD", xn = (e) => {
|
|
|
3988
4050
|
}
|
|
3989
4051
|
}
|
|
3990
4052
|
]);
|
|
3991
|
-
},
|
|
3992
|
-
|
|
3993
|
-
},
|
|
4053
|
+
}, No = () => {
|
|
4054
|
+
Q(!1), re(!1), W(!1), localStorage.removeItem("agentic_order_payment");
|
|
4055
|
+
}, Co = async () => {
|
|
3994
4056
|
try {
|
|
3995
|
-
|
|
3996
|
-
const u =
|
|
4057
|
+
Oe(!0);
|
|
4058
|
+
const u = R || {}, h = JSON.parse(
|
|
3997
4059
|
localStorage.getItem("agentic_order_address") || "null"
|
|
3998
4060
|
), f = localStorage.getItem(
|
|
3999
4061
|
"agentic_order_delivery"
|
|
4000
|
-
), v = localStorage.getItem("agentic_order_payment") || "card", { product_total: T, tax: b, shipping_fee:
|
|
4001
|
-
shopper_id:
|
|
4002
|
-
shipping_address_id:
|
|
4003
|
-
shipping_method_id:
|
|
4004
|
-
payment_method_id:
|
|
4005
|
-
sku:
|
|
4062
|
+
), v = localStorage.getItem("agentic_order_payment") || "card", { product_total: T, tax: b, shipping_fee: B, currency: A } = Lr(), se = u.shopper_id || localStorage.getItem("customerId") || void 0, G = (h == null ? void 0 : h.addressId) || (h == null ? void 0 : h.id) || void 0, he = f ? qs[f] : "GROUND", H = "card-visa", ne = w == null ? void 0 : w.sku, ye = (r == null ? void 0 : r.id) || "", Ee = Ct(u), oe = typeof u.max_price_minor == "number" ? u.max_price_minor : Math.round(T * 100), Re = {
|
|
4063
|
+
shopper_id: se,
|
|
4064
|
+
shipping_address_id: G,
|
|
4065
|
+
shipping_method_id: he,
|
|
4066
|
+
payment_method_id: H,
|
|
4067
|
+
sku: ne,
|
|
4006
4068
|
platform: "SFCC",
|
|
4007
4069
|
storeCode: "Sites-SiteGenesis-Site",
|
|
4008
|
-
product_id:
|
|
4009
|
-
quantity:
|
|
4010
|
-
max_price_minor:
|
|
4011
|
-
currency:
|
|
4012
|
-
instruction_text:
|
|
4070
|
+
product_id: ye,
|
|
4071
|
+
quantity: Ee,
|
|
4072
|
+
max_price_minor: oe,
|
|
4073
|
+
currency: A,
|
|
4074
|
+
instruction_text: J
|
|
4013
4075
|
};
|
|
4014
|
-
if (!
|
|
4076
|
+
if (!se || !G) {
|
|
4015
4077
|
console.error(
|
|
4016
4078
|
"Missing shopper_id or shipping_address_id for intent-mandate",
|
|
4017
4079
|
{
|
|
4018
|
-
shopperId:
|
|
4019
|
-
shippingAddressId:
|
|
4080
|
+
shopperId: se,
|
|
4081
|
+
shippingAddressId: G
|
|
4020
4082
|
}
|
|
4021
4083
|
), alert(
|
|
4022
4084
|
"Missing customer or address information. Please re-select address and try again."
|
|
4023
|
-
),
|
|
4085
|
+
), Oe(!1);
|
|
4024
4086
|
return;
|
|
4025
4087
|
}
|
|
4026
|
-
const
|
|
4027
|
-
if (!
|
|
4088
|
+
const We = (await vt()).access_token;
|
|
4089
|
+
if (!We)
|
|
4028
4090
|
throw new Error("Failed to fetch auth token for intent-mandate");
|
|
4029
|
-
const { serverUrl:
|
|
4091
|
+
const { serverUrl: He } = dt(), Me = await fetch(`${He}/api/intent-mandate`, {
|
|
4030
4092
|
method: "POST",
|
|
4031
4093
|
headers: {
|
|
4032
4094
|
"Content-Type": "application/json",
|
|
4033
|
-
Authorization: `Bearer ${
|
|
4095
|
+
Authorization: `Bearer ${We}`
|
|
4034
4096
|
},
|
|
4035
|
-
body: JSON.stringify(
|
|
4097
|
+
body: JSON.stringify(Re)
|
|
4036
4098
|
});
|
|
4037
|
-
if (!
|
|
4038
|
-
const
|
|
4039
|
-
console.error("intent-mandate failed",
|
|
4099
|
+
if (!Me.ok) {
|
|
4100
|
+
const Eo = await Me.text().catch(() => "");
|
|
4101
|
+
console.error("intent-mandate failed", Me.status, Eo), alert(
|
|
4040
4102
|
"Something went wrong while saving your smart order. Please try again."
|
|
4041
|
-
),
|
|
4103
|
+
), Oe(!1);
|
|
4042
4104
|
return;
|
|
4043
4105
|
}
|
|
4044
|
-
const
|
|
4045
|
-
console.log("intent-mandate success:",
|
|
4046
|
-
const
|
|
4047
|
-
|
|
4106
|
+
const pe = await Me.json().catch(() => null);
|
|
4107
|
+
console.log("intent-mandate success:", pe);
|
|
4108
|
+
const at = (pe == null ? void 0 : pe.intent_mandate_id) || (pe == null ? void 0 : pe.intent_mandateId) || (pe == null ? void 0 : pe.key) || null;
|
|
4109
|
+
at && me(at);
|
|
4048
4110
|
const Lt = {
|
|
4049
4111
|
...u,
|
|
4050
4112
|
address: h,
|
|
4051
4113
|
delivery: f,
|
|
4052
4114
|
payment: v,
|
|
4053
|
-
summary: { product_total: T, tax: b, shipping_fee:
|
|
4054
|
-
intent_mandate_id:
|
|
4115
|
+
summary: { product_total: T, tax: b, shipping_fee: B, currency: A },
|
|
4116
|
+
intent_mandate_id: at
|
|
4055
4117
|
};
|
|
4056
|
-
localStorage.setItem("agentic_order_final", JSON.stringify(Lt)),
|
|
4118
|
+
localStorage.setItem("agentic_order_final", JSON.stringify(Lt)), W(!0), m(!1), St("final", Lt), St("success", { intentMandateId: at }), $t();
|
|
4057
4119
|
} catch (u) {
|
|
4058
4120
|
console.error("Error in handleConfirmWatch / intent-mandate:", u), alert(
|
|
4059
4121
|
"Unable to complete your smart order right now. Please try again in a moment."
|
|
4060
4122
|
);
|
|
4061
4123
|
} finally {
|
|
4062
|
-
|
|
4124
|
+
Oe(!1);
|
|
4063
4125
|
}
|
|
4064
4126
|
}, Mr = () => {
|
|
4065
|
-
$t(),
|
|
4127
|
+
$t(), Se((u) => [
|
|
4066
4128
|
...u,
|
|
4067
4129
|
{
|
|
4068
4130
|
query: "",
|
|
@@ -4072,8 +4134,8 @@ const He = "USD", xn = (e) => {
|
|
|
4072
4134
|
}
|
|
4073
4135
|
}
|
|
4074
4136
|
]);
|
|
4075
|
-
},
|
|
4076
|
-
const u =
|
|
4137
|
+
}, _o = () => {
|
|
4138
|
+
const u = kn(r, w), h = Sn(r), f = (r == null ? void 0 : r.id) || "", v = Ye(w) || "", T = Qe(w) || "", { amount: b } = Yt(w), B = !!(r != null && r.id), A = w && B ? bn(w) : !1;
|
|
4077
4139
|
return console.log(
|
|
4078
4140
|
u,
|
|
4079
4141
|
h,
|
|
@@ -4081,8 +4143,8 @@ const He = "USD", xn = (e) => {
|
|
|
4081
4143
|
v,
|
|
4082
4144
|
T,
|
|
4083
4145
|
b,
|
|
4084
|
-
|
|
4085
|
-
|
|
4146
|
+
B,
|
|
4147
|
+
A,
|
|
4086
4148
|
"base product"
|
|
4087
4149
|
), /* @__PURE__ */ a("div", { className: "mx-4 mt-2 rounded-xl border border-gray-200 bg-white p-4", children: /* @__PURE__ */ d("div", { className: "flex flex-col sm:flex-row items-center sm:items-center gap-4", children: [
|
|
4088
4150
|
/* @__PURE__ */ a("div", { className: "flex-shrink-0 flex justify-center sm:justify-start", children: /* @__PURE__ */ a("div", { className: "w-[150px] h-[150px] rounded-lg bg-gray-50 border border-gray-200 flex items-center justify-center overflow-hidden", children: u ? /* @__PURE__ */ a(
|
|
@@ -4093,7 +4155,7 @@ const He = "USD", xn = (e) => {
|
|
|
4093
4155
|
className: "object-contain w-full h-full"
|
|
4094
4156
|
}
|
|
4095
4157
|
) : /* @__PURE__ */ a(
|
|
4096
|
-
|
|
4158
|
+
ie,
|
|
4097
4159
|
{
|
|
4098
4160
|
icon: "mdi:image-outline",
|
|
4099
4161
|
width: "28",
|
|
@@ -4107,14 +4169,14 @@ const He = "USD", xn = (e) => {
|
|
|
4107
4169
|
v && `Color: ${v}`,
|
|
4108
4170
|
T && `Size: ${T}`
|
|
4109
4171
|
].filter(Boolean).join(" • ") || "—" }),
|
|
4110
|
-
/* @__PURE__ */ a("div", { className: "mt-1 text-xl font-semibold text-gray-900", children:
|
|
4111
|
-
|
|
4172
|
+
/* @__PURE__ */ a("div", { className: "mt-1 text-xl font-semibold text-gray-900", children: B ? je(Number(b) || 0, Ve) : "Currently unavailable" }),
|
|
4173
|
+
B && !A && /* @__PURE__ */ a("div", { className: "mt-1 text-xs font-medium text-red-600", children: "Currently out of stock" })
|
|
4112
4174
|
] })
|
|
4113
4175
|
] }) });
|
|
4114
4176
|
}, Br = ({
|
|
4115
4177
|
showSubmit: u = !0
|
|
4116
4178
|
}) => {
|
|
4117
|
-
const h = {}, f =
|
|
4179
|
+
const h = {}, f = Te.map((b) => Ye(b.variant)).filter((b) => !!b && !h[b] && (h[b] = !0)), v = {}, T = Te.map((b) => Qe(b.variant)).filter((b) => !!b && !v[b] && (v[b] = !0));
|
|
4118
4180
|
return /* @__PURE__ */ d("div", { className: "mx-4 mt-4 mb-2 rounded-xl border border-gray-200 bg-white p-4 animate-fade-in", children: [
|
|
4119
4181
|
/* @__PURE__ */ a("h3", { className: "font-semibold text-gray-800", children: "Choose a variant" }),
|
|
4120
4182
|
f.length > 0 && /* @__PURE__ */ d("div", { className: "mt-4", children: [
|
|
@@ -4123,31 +4185,31 @@ const He = "USD", xn = (e) => {
|
|
|
4123
4185
|
S && /* @__PURE__ */ a("div", { className: "text-sm text-gray-600", children: S })
|
|
4124
4186
|
] }),
|
|
4125
4187
|
/* @__PURE__ */ a("div", { className: "flex flex-wrap gap-4 mt-2", children: f.map((b) => {
|
|
4126
|
-
var
|
|
4127
|
-
const
|
|
4128
|
-
(
|
|
4129
|
-
),
|
|
4188
|
+
var Ee;
|
|
4189
|
+
const B = S === b, A = F || Y.current || null, se = A ? st(Te, b, A) : st(Te, b, null), G = !!se, he = G && bn(se.variant), H = G && he ? vr(se.variant, Ve) || vr(se.variant) : null, ne = Te.find(
|
|
4190
|
+
(oe) => Ye(oe.variant) === b
|
|
4191
|
+
), ye = (Ee = ne == null ? void 0 : ne.images) == null ? void 0 : Ee[0];
|
|
4130
4192
|
return /* @__PURE__ */ d(
|
|
4131
4193
|
"div",
|
|
4132
4194
|
{
|
|
4133
4195
|
className: `flex flex-col items-center w-28 border rounded-md p-2
|
|
4134
|
-
${
|
|
4135
|
-
${!
|
|
4196
|
+
${B ? "border-2 border-tanya-light" : "border-gray-300"}
|
|
4197
|
+
${!G || !he ? "opacity-60" : ""}`,
|
|
4136
4198
|
children: [
|
|
4137
4199
|
/* @__PURE__ */ a(
|
|
4138
4200
|
"button",
|
|
4139
4201
|
{
|
|
4140
4202
|
onClick: () => {
|
|
4141
4203
|
_(b);
|
|
4142
|
-
const
|
|
4143
|
-
|
|
4204
|
+
const oe = F || Y.current || null, ce = oe && st(Te, b, oe) || st(Te, b, null);
|
|
4205
|
+
ce && x(ce.index);
|
|
4144
4206
|
},
|
|
4145
4207
|
className: "w-full h-20 flex items-center justify-center overflow-hidden",
|
|
4146
4208
|
title: b,
|
|
4147
|
-
children:
|
|
4209
|
+
children: ye ? /* @__PURE__ */ a(
|
|
4148
4210
|
"img",
|
|
4149
4211
|
{
|
|
4150
|
-
src:
|
|
4212
|
+
src: ye,
|
|
4151
4213
|
alt: b,
|
|
4152
4214
|
className: "w/full h-full object-contain"
|
|
4153
4215
|
}
|
|
@@ -4155,13 +4217,13 @@ const He = "USD", xn = (e) => {
|
|
|
4155
4217
|
}
|
|
4156
4218
|
),
|
|
4157
4219
|
/* @__PURE__ */ a("div", { className: "w-full border-t my-2" }),
|
|
4158
|
-
|
|
4159
|
-
!
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4220
|
+
G && !he && /* @__PURE__ */ a("div", { className: "text-[11px] text-red-600 text-center", children: "Out of stock" }),
|
|
4221
|
+
!G && /* @__PURE__ */ a("div", { className: "text-[11px] text-red-600 text-center", children: "any not offered" }),
|
|
4222
|
+
G && he && H && /* @__PURE__ */ d("div", { className: "text-xs text-gray-800 font-medium text-center", children: [
|
|
4223
|
+
je(H.cent / 100, H.cur),
|
|
4224
|
+
H.regularCent && H.regularCent > H.cent && /* @__PURE__ */ a("span", { className: "ml-1 line-through text-gray-500", children: je(
|
|
4225
|
+
H.regularCent / 100,
|
|
4226
|
+
H.cur
|
|
4165
4227
|
) })
|
|
4166
4228
|
] })
|
|
4167
4229
|
]
|
|
@@ -4180,8 +4242,8 @@ const He = "USD", xn = (e) => {
|
|
|
4180
4242
|
{
|
|
4181
4243
|
onClick: () => {
|
|
4182
4244
|
N(b);
|
|
4183
|
-
const
|
|
4184
|
-
|
|
4245
|
+
const A = S && st(Te, S, b) || st(Te, void 0, b);
|
|
4246
|
+
A && x(A.index);
|
|
4185
4247
|
},
|
|
4186
4248
|
className: `px-4 py-2 rounded-md border text-sm ${F === b ? "border-2 border-tanya-light font-semibold" : "border-gray-300"}`,
|
|
4187
4249
|
title: b,
|
|
@@ -4190,10 +4252,56 @@ const He = "USD", xn = (e) => {
|
|
|
4190
4252
|
`size-${b}`
|
|
4191
4253
|
)) })
|
|
4192
4254
|
] }),
|
|
4255
|
+
r.variationAttributes.map(
|
|
4256
|
+
({ id: b, name: B, selectedValue: A, values: se }) => {
|
|
4257
|
+
const G = se.map(
|
|
4258
|
+
({ href: he, name: H, image: ne, value: ye, orderable: Ee }, oe) => {
|
|
4259
|
+
const ce = ne ? /* @__PURE__ */ a(
|
|
4260
|
+
"div",
|
|
4261
|
+
{
|
|
4262
|
+
style: {
|
|
4263
|
+
height: "100%",
|
|
4264
|
+
width: "100%",
|
|
4265
|
+
minWidth: "32px",
|
|
4266
|
+
backgroundRepeat: "no-repeat",
|
|
4267
|
+
backgroundSize: "cover",
|
|
4268
|
+
backgroundColor: H == null ? void 0 : H.toLowerCase(),
|
|
4269
|
+
backgroundImage: `url(${(ne == null ? void 0 : ne.disBaseLink) || (ne == null ? void 0 : ne.link)})`
|
|
4270
|
+
}
|
|
4271
|
+
}
|
|
4272
|
+
) : H, ze = !!(A != null && A.value), Re = (A == null ? void 0 : A.value) === ye;
|
|
4273
|
+
return /* @__PURE__ */ a(
|
|
4274
|
+
Bs,
|
|
4275
|
+
{
|
|
4276
|
+
href: he,
|
|
4277
|
+
disabled: !Ee,
|
|
4278
|
+
value: ye,
|
|
4279
|
+
name: H,
|
|
4280
|
+
variant: b === "color" ? "circle" : "square",
|
|
4281
|
+
selected: Re,
|
|
4282
|
+
isFocusable: Re || !ze && oe === 0,
|
|
4283
|
+
children: ce
|
|
4284
|
+
},
|
|
4285
|
+
ye
|
|
4286
|
+
);
|
|
4287
|
+
}
|
|
4288
|
+
);
|
|
4289
|
+
return /* @__PURE__ */ a(
|
|
4290
|
+
Us,
|
|
4291
|
+
{
|
|
4292
|
+
value: A == null ? void 0 : A.value,
|
|
4293
|
+
displayName: (A == null ? void 0 : A.name) || "",
|
|
4294
|
+
label: B,
|
|
4295
|
+
children: G
|
|
4296
|
+
},
|
|
4297
|
+
b
|
|
4298
|
+
);
|
|
4299
|
+
}
|
|
4300
|
+
),
|
|
4193
4301
|
u && /* @__PURE__ */ a("div", { className: "mt-4 flex justify-end", children: /* @__PURE__ */ a(
|
|
4194
4302
|
"button",
|
|
4195
4303
|
{
|
|
4196
|
-
onClick:
|
|
4304
|
+
onClick: go,
|
|
4197
4305
|
className: "px-6 py-2.5 rounded-full font-semibold text-white shadow-md",
|
|
4198
4306
|
style: { background: I },
|
|
4199
4307
|
disabled: !Nt,
|
|
@@ -4203,9 +4311,9 @@ const He = "USD", xn = (e) => {
|
|
|
4203
4311
|
] });
|
|
4204
4312
|
}, Ur = (u, h = !0) => {
|
|
4205
4313
|
!(u != null && u.extractedDetails) && u && (u = { extractedDetails: u });
|
|
4206
|
-
const f = (u == null ? void 0 : u.extractedDetails) ||
|
|
4314
|
+
const f = (u == null ? void 0 : u.extractedDetails) || R;
|
|
4207
4315
|
if (!f) return null;
|
|
4208
|
-
const v = Ct(f), { currency: T } =
|
|
4316
|
+
const v = Ct(f), { currency: T } = Yt(w), b = Nn(r, w), B = Number((f == null ? void 0 : f.max_price_minor) ?? 0), se = Number.isFinite(B) && B > 0 ? +(B / 100) : +(b * v), G = (f == null ? void 0 : f.currency) || T || Ve, he = w != null && w.sku ? w.sku : f.product_id;
|
|
4209
4317
|
return /* @__PURE__ */ d(
|
|
4210
4318
|
"div",
|
|
4211
4319
|
{
|
|
@@ -4216,29 +4324,29 @@ const He = "USD", xn = (e) => {
|
|
|
4216
4324
|
"p",
|
|
4217
4325
|
{
|
|
4218
4326
|
className: "text-base font-semibold text-center mt-2",
|
|
4219
|
-
style: { color:
|
|
4327
|
+
style: { color: De },
|
|
4220
4328
|
children: "Here’s what I found from your instruction:"
|
|
4221
4329
|
}
|
|
4222
4330
|
),
|
|
4223
4331
|
/* @__PURE__ */ d("div", { className: "w-full max-w-md bg-white rounded-xl shadow-inner p-4", children: [
|
|
4224
4332
|
/* @__PURE__ */ d("div", { className: "grid grid-cols-2 gap-y-2 text-sm", children: [
|
|
4225
4333
|
/* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "SKU:" }),
|
|
4226
|
-
/* @__PURE__ */ a("p", { className: "text-gray-800", children:
|
|
4334
|
+
/* @__PURE__ */ a("p", { className: "text-gray-800", children: he }),
|
|
4227
4335
|
/* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "Quantity:" }),
|
|
4228
4336
|
/* @__PURE__ */ a("p", { className: "text-gray-800", children: Ct(f) }),
|
|
4229
4337
|
/* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "Currency:" }),
|
|
4230
|
-
/* @__PURE__ */ a("p", { className: "text-gray-800", children:
|
|
4338
|
+
/* @__PURE__ */ a("p", { className: "text-gray-800", children: G }),
|
|
4231
4339
|
/* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "Maximum Total Price:" }),
|
|
4232
|
-
/* @__PURE__ */ a("p", { className: "text-gray-800", children:
|
|
4340
|
+
/* @__PURE__ */ a("p", { className: "text-gray-800", children: je(se, G) })
|
|
4233
4341
|
] }),
|
|
4234
4342
|
/* @__PURE__ */ d("div", { className: "mt-3 flex flex-wrap gap-2 text-xs", children: [
|
|
4235
|
-
|
|
4343
|
+
Ye(w) && /* @__PURE__ */ d("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
|
|
4236
4344
|
"Color: ",
|
|
4237
|
-
|
|
4345
|
+
Ye(w)
|
|
4238
4346
|
] }),
|
|
4239
|
-
|
|
4347
|
+
Qe(w) && /* @__PURE__ */ d("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
|
|
4240
4348
|
"Size: ",
|
|
4241
|
-
|
|
4349
|
+
Qe(w)
|
|
4242
4350
|
] }),
|
|
4243
4351
|
(w == null ? void 0 : w.sku) && /* @__PURE__ */ d("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
|
|
4244
4352
|
"SKU: ",
|
|
@@ -4246,12 +4354,12 @@ const He = "USD", xn = (e) => {
|
|
|
4246
4354
|
] })
|
|
4247
4355
|
] })
|
|
4248
4356
|
] }),
|
|
4249
|
-
!h && /* @__PURE__ */ d(
|
|
4357
|
+
!h && /* @__PURE__ */ d(ve, { children: [
|
|
4250
4358
|
/* @__PURE__ */ d(
|
|
4251
4359
|
"p",
|
|
4252
4360
|
{
|
|
4253
4361
|
className: "text-sm font-medium text-gray-700 text-center max-w-[90%] leading-relaxed",
|
|
4254
|
-
style: { color:
|
|
4362
|
+
style: { color: De },
|
|
4255
4363
|
children: [
|
|
4256
4364
|
"Would you like me to ",
|
|
4257
4365
|
/* @__PURE__ */ a("strong", { children: "lock this in" }),
|
|
@@ -4263,13 +4371,13 @@ const He = "USD", xn = (e) => {
|
|
|
4263
4371
|
/* @__PURE__ */ d(
|
|
4264
4372
|
"button",
|
|
4265
4373
|
{
|
|
4266
|
-
onClick:
|
|
4267
|
-
disabled:
|
|
4268
|
-
className: `relative inline-flex items-center justify-center px-6 py-2.5 rounded-full font-semibold text-white shadow-md transition-all duration-300 ${
|
|
4374
|
+
onClick: wo,
|
|
4375
|
+
disabled: ue,
|
|
4376
|
+
className: `relative inline-flex items-center justify-center px-6 py-2.5 rounded-full font-semibold text-white shadow-md transition-all duration-300 ${ue ? "opacity-60 cursor-not-allowed" : "hover:-translate-y-0.5 hover:shadow-lg"}`,
|
|
4269
4377
|
style: { background: `${I}` },
|
|
4270
4378
|
children: [
|
|
4271
4379
|
/* @__PURE__ */ a(
|
|
4272
|
-
|
|
4380
|
+
ie,
|
|
4273
4381
|
{
|
|
4274
4382
|
icon: "fluent:checkmark-circle-24-filled",
|
|
4275
4383
|
className: "mr-2",
|
|
@@ -4285,12 +4393,12 @@ const He = "USD", xn = (e) => {
|
|
|
4285
4393
|
"button",
|
|
4286
4394
|
{
|
|
4287
4395
|
onClick: Mr,
|
|
4288
|
-
disabled:
|
|
4289
|
-
className: `relative inline-flex items-center justify-center px-6 py-2.5 rounded-full font-semibold border transition-all duration-300 ${
|
|
4290
|
-
style: { borderColor: I, color:
|
|
4396
|
+
disabled: ue,
|
|
4397
|
+
className: `relative inline-flex items-center justify-center px-6 py-2.5 rounded-full font-semibold border transition-all duration-300 ${ue ? "opacity-60 cursor-not-allowed" : "hover:-translate-y-0.5 hover:shadow-lg"}`,
|
|
4398
|
+
style: { borderColor: I, color: De },
|
|
4291
4399
|
children: [
|
|
4292
4400
|
/* @__PURE__ */ a(
|
|
4293
|
-
|
|
4401
|
+
ie,
|
|
4294
4402
|
{
|
|
4295
4403
|
icon: "fluent:dismiss-circle-24-filled",
|
|
4296
4404
|
className: "mr-2",
|
|
@@ -4308,22 +4416,22 @@ const He = "USD", xn = (e) => {
|
|
|
4308
4416
|
}
|
|
4309
4417
|
);
|
|
4310
4418
|
}, qr = (u, h = !0) => {
|
|
4311
|
-
var
|
|
4312
|
-
const f = u || {}, v = ((
|
|
4419
|
+
var ot, We, He, Me, pe, at;
|
|
4420
|
+
const f = u || {}, v = ((ot = f == null ? void 0 : f.summary) == null ? void 0 : ot.currency) || (R == null ? void 0 : R.currency) || Ve, T = kn(r, w), b = Sn(r), B = w != null && w.sku ? w.sku : (r == null ? void 0 : r.id) ?? (R == null ? void 0 : R.product_id), A = (w == null ? void 0 : w.sku) ?? Cn(r), se = Ye(w) || Ys(r), G = Qe(w) || Vs(r), he = Ct(f), H = ((We = f == null ? void 0 : f.summary) == null ? void 0 : We.product_total) != null ? +f.summary.product_total : $r(f), ne = he > 0 ? +(H / he).toFixed(2) : 0, ye = H, Ee = ((He = f == null ? void 0 : f.summary) == null ? void 0 : He.tax) ?? +(H * 0.08).toFixed(2), oe = ((Me = f == null ? void 0 : f.summary) == null ? void 0 : Me.shipping_fee) ?? (((pe = it[j]) == null ? void 0 : pe.fee) || 0), ce = f != null && f.address ? [
|
|
4313
4421
|
f.address.addressLine1,
|
|
4314
4422
|
f.address.addressLine2,
|
|
4315
4423
|
f.address.street,
|
|
4316
4424
|
[f.address.city, f.address.state, f.address.postalCode].filter(Boolean).join(", "),
|
|
4317
4425
|
f.address.country
|
|
4318
|
-
].filter(Boolean).map((Lt) =>
|
|
4426
|
+
].filter(Boolean).map((Lt) => Ge(String(Lt))).join(", ") : "—", ze = (f == null ? void 0 : f.payment) || "card", Re = ze === "card" ? /* @__PURE__ */ d(ve, { children: [
|
|
4319
4427
|
"Credit Card — Mastercard",
|
|
4320
4428
|
/* @__PURE__ */ a("br", {}),
|
|
4321
4429
|
"•••• 7820 Exp: 12/26"
|
|
4322
|
-
] }) : /* @__PURE__ */ a(
|
|
4430
|
+
] }) : /* @__PURE__ */ a(ve, { children: Ge(ze) });
|
|
4323
4431
|
return /* @__PURE__ */ d("div", { className: "mx-auto mt-3 mb-3 rounded-2xl bg-white", children: [
|
|
4324
4432
|
/* @__PURE__ */ a("div", { className: "px-6 pt-5 pb-3", children: /* @__PURE__ */ d("h3", { className: "font-semibold text-lg mb-2 text-gray-800 flex items-center gap-2", children: [
|
|
4325
4433
|
/* @__PURE__ */ a(
|
|
4326
|
-
|
|
4434
|
+
ie,
|
|
4327
4435
|
{
|
|
4328
4436
|
icon: "mdi:receipt-text-check-outline",
|
|
4329
4437
|
width: "24",
|
|
@@ -4341,7 +4449,7 @@ const He = "USD", xn = (e) => {
|
|
|
4341
4449
|
className: "w-full h-full object-contain"
|
|
4342
4450
|
}
|
|
4343
4451
|
) : /* @__PURE__ */ a(
|
|
4344
|
-
|
|
4452
|
+
ie,
|
|
4345
4453
|
{
|
|
4346
4454
|
icon: "mdi:image-outline",
|
|
4347
4455
|
width: "24",
|
|
@@ -4354,40 +4462,40 @@ const He = "USD", xn = (e) => {
|
|
|
4354
4462
|
/* @__PURE__ */ d("div", { className: "text-xs text-center font-bold text-gray-600", children: [
|
|
4355
4463
|
/* @__PURE__ */ a("span", { className: "font-medium", children: "SKU:" }),
|
|
4356
4464
|
" ",
|
|
4357
|
-
|
|
4465
|
+
B ?? "—"
|
|
4358
4466
|
] }),
|
|
4359
|
-
(
|
|
4360
|
-
|
|
4467
|
+
(A || se || G) && /* @__PURE__ */ d("div", { className: "text-xs text-gray-600 mt-0.5 text-center", children: [
|
|
4468
|
+
A && /* @__PURE__ */ d(ve, { children: [
|
|
4361
4469
|
/* @__PURE__ */ a("span", { className: "font-medium", children: "SKU:" }),
|
|
4362
4470
|
" ",
|
|
4363
|
-
|
|
4471
|
+
A,
|
|
4364
4472
|
" "
|
|
4365
4473
|
] }),
|
|
4366
|
-
|
|
4474
|
+
se && /* @__PURE__ */ d(ve, { children: [
|
|
4367
4475
|
/* @__PURE__ */ a("span", { className: "font-medium", children: "Color:" }),
|
|
4368
4476
|
" ",
|
|
4369
|
-
|
|
4477
|
+
se,
|
|
4370
4478
|
" "
|
|
4371
4479
|
] }),
|
|
4372
|
-
|
|
4480
|
+
G && /* @__PURE__ */ d(ve, { children: [
|
|
4373
4481
|
/* @__PURE__ */ a("span", { className: "font-medium", children: "Size:" }),
|
|
4374
4482
|
" ",
|
|
4375
|
-
|
|
4483
|
+
G
|
|
4376
4484
|
] })
|
|
4377
4485
|
] })
|
|
4378
4486
|
] }),
|
|
4379
4487
|
/* @__PURE__ */ d("div", { className: "grid grid-cols-1 md-grid-cols-3 md:grid-cols-3 gap-3", children: [
|
|
4380
4488
|
/* @__PURE__ */ d("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-white p-3 text-center", children: [
|
|
4381
4489
|
/* @__PURE__ */ a("div", { className: "text-[11px] uppercase tracking-wide text-gray-500", children: "Unit Price" }),
|
|
4382
|
-
/* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children:
|
|
4490
|
+
/* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: je(ne, v) })
|
|
4383
4491
|
] }),
|
|
4384
4492
|
/* @__PURE__ */ d("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-white p-3 text-center", children: [
|
|
4385
4493
|
/* @__PURE__ */ a("div", { className: "text-[11px] uppercase tracking-wide text-gray-500", children: "Quantity" }),
|
|
4386
|
-
/* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children:
|
|
4494
|
+
/* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: he })
|
|
4387
4495
|
] }),
|
|
4388
4496
|
/* @__PURE__ */ d("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-white p-3 text-center", children: [
|
|
4389
4497
|
/* @__PURE__ */ a("div", { className: "text-[11px] uppercase tracking-wide text-gray-500", children: "Subtotal" }),
|
|
4390
|
-
/* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children:
|
|
4498
|
+
/* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: je(ye, v) })
|
|
4391
4499
|
] })
|
|
4392
4500
|
] })
|
|
4393
4501
|
] })
|
|
@@ -4396,53 +4504,53 @@ const He = "USD", xn = (e) => {
|
|
|
4396
4504
|
/* @__PURE__ */ d("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-3 mb-3", children: [
|
|
4397
4505
|
/* @__PURE__ */ d("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
|
|
4398
4506
|
/* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "🏠 Address" }),
|
|
4399
|
-
/* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children:
|
|
4507
|
+
/* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: ce })
|
|
4400
4508
|
] }),
|
|
4401
4509
|
/* @__PURE__ */ d("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
|
|
4402
4510
|
/* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "💳 Payment" }),
|
|
4403
|
-
/* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children:
|
|
4511
|
+
/* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: Re })
|
|
4404
4512
|
] }),
|
|
4405
4513
|
/* @__PURE__ */ d("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
|
|
4406
4514
|
/* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "🚚 Delivery" }),
|
|
4407
|
-
/* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: f != null && f.delivery && ((
|
|
4515
|
+
/* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: f != null && f.delivery && ((at = it[f.delivery]) == null ? void 0 : at.label) || "—" })
|
|
4408
4516
|
] })
|
|
4409
4517
|
] }),
|
|
4410
4518
|
/* @__PURE__ */ d("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-3", children: [
|
|
4411
4519
|
/* @__PURE__ */ d("div", { className: "flex flex-col items-center justify-center rounded-xl border border-gray-200 bg-gray-50 p-4 text-center", children: [
|
|
4412
4520
|
/* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "💰 any(s)" }),
|
|
4413
|
-
/* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children:
|
|
4521
|
+
/* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: je(H, v) })
|
|
4414
4522
|
] }),
|
|
4415
4523
|
/* @__PURE__ */ d("div", { className: "flex flex-col items-center justify-center rounded-xl border border-gray-200 bg-gray-50 p-4 text-center", children: [
|
|
4416
4524
|
/* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "🏛️ Taxes" }),
|
|
4417
|
-
/* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children:
|
|
4525
|
+
/* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: je(Ee, v) })
|
|
4418
4526
|
] }),
|
|
4419
4527
|
/* @__PURE__ */ d("div", { className: "flex flex-col items-center justify-center rounded-xl border border-gray-200 bg-gray-50 p-4 text-center", children: [
|
|
4420
4528
|
/* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "🚚 Shipping" }),
|
|
4421
|
-
/* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children:
|
|
4529
|
+
/* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: je(oe, v) })
|
|
4422
4530
|
] })
|
|
4423
4531
|
] }),
|
|
4424
4532
|
/* @__PURE__ */ d(
|
|
4425
4533
|
"div",
|
|
4426
4534
|
{
|
|
4427
4535
|
className: "mt-4 rounded-xl p-4 text-center text-white shadow-sm",
|
|
4428
|
-
style: { background:
|
|
4536
|
+
style: { background: nt },
|
|
4429
4537
|
children: [
|
|
4430
4538
|
/* @__PURE__ */ a("div", { className: "text-sm/5 opacity-95", children: "🔹 Total Payable" }),
|
|
4431
|
-
/* @__PURE__ */ a("div", { className: "mt-1 text-3xl font-extrabold tracking-tight", children:
|
|
4539
|
+
/* @__PURE__ */ a("div", { className: "mt-1 text-3xl font-extrabold tracking-tight", children: je(H + Ee + oe, v) })
|
|
4432
4540
|
]
|
|
4433
4541
|
}
|
|
4434
4542
|
)
|
|
4435
4543
|
] }),
|
|
4436
4544
|
!h && /* @__PURE__ */ d("div", { className: "px-6 pb-5", children: [
|
|
4437
4545
|
!k && /* @__PURE__ */ a("p", { className: "mt-3 text-center text-sm text-gray-700", children: "Everything looks good! Do you want me to watch this product and buy it automatically when it meets your condition?" }),
|
|
4438
|
-
k && Ar({ intentMandateId:
|
|
4546
|
+
k && Ar({ intentMandateId: X }),
|
|
4439
4547
|
er && !k && /* @__PURE__ */ d("div", { className: "mt-4 flex flex-wrap items-center justify-center gap-3", children: [
|
|
4440
4548
|
/* @__PURE__ */ a(
|
|
4441
4549
|
"button",
|
|
4442
4550
|
{
|
|
4443
|
-
onClick:
|
|
4551
|
+
onClick: Co,
|
|
4444
4552
|
className: "inline-flex items-center justify-center rounded-full px-6 py-2.5 font-semibold text-white shadow-md transition-transform duration-150 hover:-translate-y-0.5 hover:shadow-lg",
|
|
4445
|
-
style: { background:
|
|
4553
|
+
style: { background: nt },
|
|
4446
4554
|
children: "Confirm"
|
|
4447
4555
|
}
|
|
4448
4556
|
),
|
|
@@ -4451,14 +4559,14 @@ const He = "USD", xn = (e) => {
|
|
|
4451
4559
|
{
|
|
4452
4560
|
onClick: Mr,
|
|
4453
4561
|
className: "inline-flex items-center justify-center rounded-full border px-6 py-2.5 font-semibold hover:bg-gray-50",
|
|
4454
|
-
style: { borderColor:
|
|
4562
|
+
style: { borderColor: nt, color: nt },
|
|
4455
4563
|
children: "Cancel"
|
|
4456
4564
|
}
|
|
4457
4565
|
)
|
|
4458
4566
|
] })
|
|
4459
4567
|
] })
|
|
4460
4568
|
] });
|
|
4461
|
-
},
|
|
4569
|
+
}, Io = (u) => {
|
|
4462
4570
|
if (!u) return null;
|
|
4463
4571
|
const h = [
|
|
4464
4572
|
u.addressLine1,
|
|
@@ -4466,7 +4574,7 @@ const He = "USD", xn = (e) => {
|
|
|
4466
4574
|
u.street,
|
|
4467
4575
|
[u.city, u.state, u.postalCode].filter(Boolean).join(", "),
|
|
4468
4576
|
u.country
|
|
4469
|
-
].filter((f) => !!f).map((f) =>
|
|
4577
|
+
].filter((f) => !!f).map((f) => Ge(f)).join(", ");
|
|
4470
4578
|
return /* @__PURE__ */ a(
|
|
4471
4579
|
"div",
|
|
4472
4580
|
{
|
|
@@ -4474,15 +4582,15 @@ const He = "USD", xn = (e) => {
|
|
|
4474
4582
|
style: { backgroundColor: "var(--tanya-light)" },
|
|
4475
4583
|
children: /* @__PURE__ */ d("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
|
|
4476
4584
|
/* @__PURE__ */ d("div", { className: "flex items-center gap-2 mb-2", children: [
|
|
4477
|
-
/* @__PURE__ */ a(
|
|
4585
|
+
/* @__PURE__ */ a(ie, { icon: "mdi:home-map-marker", width: "20", color: I }),
|
|
4478
4586
|
/* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: "Delivery Address" })
|
|
4479
4587
|
] }),
|
|
4480
4588
|
/* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: h })
|
|
4481
4589
|
] })
|
|
4482
4590
|
}
|
|
4483
4591
|
);
|
|
4484
|
-
},
|
|
4485
|
-
const h = u == null ? void 0 : u.method, f = h ?
|
|
4592
|
+
}, Fo = (u) => {
|
|
4593
|
+
const h = u == null ? void 0 : u.method, f = h ? it[h] : void 0;
|
|
4486
4594
|
return /* @__PURE__ */ a(
|
|
4487
4595
|
"div",
|
|
4488
4596
|
{
|
|
@@ -4490,12 +4598,12 @@ const He = "USD", xn = (e) => {
|
|
|
4490
4598
|
style: { backgroundColor: "var(--tanya-light)" },
|
|
4491
4599
|
children: /* @__PURE__ */ d("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
|
|
4492
4600
|
/* @__PURE__ */ d("div", { className: "flex items-center gap-2 mb-1", children: [
|
|
4493
|
-
/* @__PURE__ */ a(
|
|
4601
|
+
/* @__PURE__ */ a(ie, { icon: "mdi:truck-delivery", width: "20", color: I }),
|
|
4494
4602
|
/* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: "Delivery Method" })
|
|
4495
4603
|
] }),
|
|
4496
|
-
/* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: f ? /* @__PURE__ */ d(
|
|
4604
|
+
/* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: f ? /* @__PURE__ */ d(ve, { children: [
|
|
4497
4605
|
/* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
|
|
4498
|
-
/* @__PURE__ */ a(
|
|
4606
|
+
/* @__PURE__ */ a(ie, { icon: f.icon, width: "18" }),
|
|
4499
4607
|
/* @__PURE__ */ a("span", { className: "font-medium", children: f.label })
|
|
4500
4608
|
] }),
|
|
4501
4609
|
/* @__PURE__ */ a("div", { className: "text-gray-600", children: f.subtitle })
|
|
@@ -4503,7 +4611,7 @@ const He = "USD", xn = (e) => {
|
|
|
4503
4611
|
] })
|
|
4504
4612
|
}
|
|
4505
4613
|
);
|
|
4506
|
-
},
|
|
4614
|
+
}, Po = (u) => {
|
|
4507
4615
|
const h = (u == null ? void 0 : u.method) || "card";
|
|
4508
4616
|
return /* @__PURE__ */ a(
|
|
4509
4617
|
"div",
|
|
@@ -4513,7 +4621,7 @@ const He = "USD", xn = (e) => {
|
|
|
4513
4621
|
children: /* @__PURE__ */ d("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
|
|
4514
4622
|
/* @__PURE__ */ d("div", { className: "flex items-center gap-2 mb-1", children: [
|
|
4515
4623
|
/* @__PURE__ */ a(
|
|
4516
|
-
|
|
4624
|
+
ie,
|
|
4517
4625
|
{
|
|
4518
4626
|
icon: "mdi:credit-card-outline",
|
|
4519
4627
|
width: "20",
|
|
@@ -4522,27 +4630,27 @@ const He = "USD", xn = (e) => {
|
|
|
4522
4630
|
),
|
|
4523
4631
|
/* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: "Payment Method" })
|
|
4524
4632
|
] }),
|
|
4525
|
-
/* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: h === "card" ? /* @__PURE__ */ d(
|
|
4633
|
+
/* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: h === "card" ? /* @__PURE__ */ d(ve, { children: [
|
|
4526
4634
|
"Credit Card — Mastercard",
|
|
4527
4635
|
/* @__PURE__ */ a("br", {}),
|
|
4528
4636
|
"•••• 7820 Exp: 12/26"
|
|
4529
|
-
] }) :
|
|
4637
|
+
] }) : Ge(h) })
|
|
4530
4638
|
] })
|
|
4531
4639
|
}
|
|
4532
4640
|
);
|
|
4533
|
-
},
|
|
4641
|
+
}, To = (u, h) => {
|
|
4534
4642
|
const f = u.snapshotStage;
|
|
4535
|
-
if (!f || f === "address" &&
|
|
4643
|
+
if (!f || f === "address" && ue || f === "delivery" && K || f === "payment" && ee || f === "final" && _e)
|
|
4536
4644
|
return null;
|
|
4537
4645
|
switch (f) {
|
|
4538
4646
|
case "initial":
|
|
4539
4647
|
return Ur(u.snapshotPayload, !h);
|
|
4540
4648
|
case "address":
|
|
4541
|
-
return _o(u.snapshotPayload);
|
|
4542
|
-
case "delivery":
|
|
4543
4649
|
return Io(u.snapshotPayload);
|
|
4544
|
-
case "
|
|
4650
|
+
case "delivery":
|
|
4545
4651
|
return Fo(u.snapshotPayload);
|
|
4652
|
+
case "payment":
|
|
4653
|
+
return Po(u.snapshotPayload);
|
|
4546
4654
|
case "final":
|
|
4547
4655
|
return qr(u.snapshotPayload, !h);
|
|
4548
4656
|
case "success":
|
|
@@ -4551,7 +4659,7 @@ const He = "USD", xn = (e) => {
|
|
|
4551
4659
|
return null;
|
|
4552
4660
|
}
|
|
4553
4661
|
};
|
|
4554
|
-
return
|
|
4662
|
+
return Mo(
|
|
4555
4663
|
/* @__PURE__ */ d(
|
|
4556
4664
|
"div",
|
|
4557
4665
|
{
|
|
@@ -4591,10 +4699,25 @@ const He = "USD", xn = (e) => {
|
|
|
4591
4699
|
gap: "0.5rem"
|
|
4592
4700
|
},
|
|
4593
4701
|
children: [
|
|
4594
|
-
/* @__PURE__ */ a(
|
|
4595
|
-
|
|
4596
|
-
|
|
4597
|
-
|
|
4702
|
+
/* @__PURE__ */ a(
|
|
4703
|
+
"svg",
|
|
4704
|
+
{
|
|
4705
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4706
|
+
width: "25",
|
|
4707
|
+
height: "25",
|
|
4708
|
+
viewBox: "0 0 256 256",
|
|
4709
|
+
children: /* @__PURE__ */ d("g", { fill: "currentColor", children: [
|
|
4710
|
+
/* @__PURE__ */ a(
|
|
4711
|
+
"path",
|
|
4712
|
+
{
|
|
4713
|
+
d: "m194.82 151.43l-55.09 20.3l-20.3 55.09a7.92 7.92 0 0 1-14.86 0l-20.3-55.09l-55.09-20.3a7.92 7.92 0 0 1 0-14.86l55.09-20.3l20.3-55.09a7.92 7.92 0 0 1 14.86 0l20.3 55.09l55.09 20.3a7.92 7.92 0 0 1 0 14.86",
|
|
4714
|
+
opacity: "0.2"
|
|
4715
|
+
}
|
|
4716
|
+
),
|
|
4717
|
+
/* @__PURE__ */ a("path", { d: "M197.58 129.06L146 110l-19-51.62a15.92 15.92 0 0 0-29.88 0L78 110l-51.62 19a15.92 15.92 0 0 0 0 29.88L78 178l19 51.62a15.92 15.92 0 0 0 29.88 0L146 178l51.62-19a15.92 15.92 0 0 0 0-29.88ZM137 164.22a8 8 0 0 0-4.74 4.74L112 223.85L91.78 169a8 8 0 0 0-4.78-4.78L32.15 144L87 123.78a8 8 0 0 0 4.78-4.78L112 64.15L132.22 119a8 8 0 0 0 4.74 4.74L191.85 144ZM144 40a8 8 0 0 1 8-8h16V16a8 8 0 0 1 16 0v16h16a8 8 0 0 1 0 16h-16v16a8 8 0 0 1-16 0V48h-16a8 8 0 0 1-8-8m104 48a8 8 0 0 1-8 8h-8v8a8 8 0 0 1-16 0v-8h-8a8 8 0 0 1 0-16h8v-8a8 8 0 0 1 16 0v8h8a8 8 0 0 1 8 8" })
|
|
4718
|
+
] })
|
|
4719
|
+
}
|
|
4720
|
+
),
|
|
4598
4721
|
/* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("p", { className: "font-bold", children: "Agentic Shopping with TANYA" }) })
|
|
4599
4722
|
]
|
|
4600
4723
|
}
|
|
@@ -4609,7 +4732,7 @@ const He = "USD", xn = (e) => {
|
|
|
4609
4732
|
margin: "0.75rem"
|
|
4610
4733
|
},
|
|
4611
4734
|
children: /* @__PURE__ */ a(
|
|
4612
|
-
|
|
4735
|
+
ie,
|
|
4613
4736
|
{
|
|
4614
4737
|
icon: "fluent:dismiss-24-filled",
|
|
4615
4738
|
color: "#ffffff",
|
|
@@ -4627,7 +4750,7 @@ const He = "USD", xn = (e) => {
|
|
|
4627
4750
|
/* @__PURE__ */ d(
|
|
4628
4751
|
"div",
|
|
4629
4752
|
{
|
|
4630
|
-
ref:
|
|
4753
|
+
ref: gt,
|
|
4631
4754
|
className: "overflow-y-auto pr-5 pb-4 space-y-4 hide-scrollbar flex-grow",
|
|
4632
4755
|
children: [
|
|
4633
4756
|
/* @__PURE__ */ d(
|
|
@@ -4646,11 +4769,11 @@ const He = "USD", xn = (e) => {
|
|
|
4646
4769
|
]
|
|
4647
4770
|
}
|
|
4648
4771
|
),
|
|
4649
|
-
/* @__PURE__ */ a(
|
|
4772
|
+
/* @__PURE__ */ a(_o, {}),
|
|
4650
4773
|
g > 1 && /* @__PURE__ */ a(Br, { showSubmit: !1 }),
|
|
4651
|
-
|
|
4774
|
+
Ke.map((u, h) => {
|
|
4652
4775
|
var T;
|
|
4653
|
-
const f = h ===
|
|
4776
|
+
const f = h === Ke.length - 1, v = !!u.snapshotStage;
|
|
4654
4777
|
return /* @__PURE__ */ d("div", { children: [
|
|
4655
4778
|
u.query && /* @__PURE__ */ a("div", { className: "flex justify-end", children: /* @__PURE__ */ a(
|
|
4656
4779
|
"p",
|
|
@@ -4678,17 +4801,17 @@ const He = "USD", xn = (e) => {
|
|
|
4678
4801
|
/* @__PURE__ */ d("div", { className: "text-sm text-gray-800", children: [
|
|
4679
4802
|
"Proceed with color:",
|
|
4680
4803
|
" ",
|
|
4681
|
-
/* @__PURE__ */ a("span", { className: "font-semibold", children:
|
|
4804
|
+
/* @__PURE__ */ a("span", { className: "font-semibold", children: Ye(w) || "—" }),
|
|
4682
4805
|
", size:",
|
|
4683
4806
|
" ",
|
|
4684
|
-
/* @__PURE__ */ a("span", { className: "font-semibold", children:
|
|
4807
|
+
/* @__PURE__ */ a("span", { className: "font-semibold", children: Qe(w) || "—" }),
|
|
4685
4808
|
"?"
|
|
4686
4809
|
] }),
|
|
4687
4810
|
/* @__PURE__ */ d("div", { className: "mt-3 flex gap-3", children: [
|
|
4688
4811
|
/* @__PURE__ */ a(
|
|
4689
4812
|
"button",
|
|
4690
4813
|
{
|
|
4691
|
-
onClick:
|
|
4814
|
+
onClick: ho,
|
|
4692
4815
|
className: "px-5 py-2 rounded-full text-white font-semibold",
|
|
4693
4816
|
style: { background: I },
|
|
4694
4817
|
children: "Yes"
|
|
@@ -4697,7 +4820,7 @@ const He = "USD", xn = (e) => {
|
|
|
4697
4820
|
/* @__PURE__ */ a(
|
|
4698
4821
|
"button",
|
|
4699
4822
|
{
|
|
4700
|
-
onClick:
|
|
4823
|
+
onClick: po,
|
|
4701
4824
|
className: "px-5 py-2 rounded-full font-semibold border",
|
|
4702
4825
|
style: {
|
|
4703
4826
|
borderColor: I,
|
|
@@ -4708,8 +4831,8 @@ const He = "USD", xn = (e) => {
|
|
|
4708
4831
|
)
|
|
4709
4832
|
] })
|
|
4710
4833
|
] }),
|
|
4711
|
-
f &&
|
|
4712
|
-
f &&
|
|
4834
|
+
f && be && /* @__PURE__ */ a(Br, { showSubmit: !0 }),
|
|
4835
|
+
f && Z && /* @__PURE__ */ a("div", { className: "mt-4", children: /* @__PURE__ */ a(
|
|
4713
4836
|
"div",
|
|
4714
4837
|
{
|
|
4715
4838
|
className: "text-sm text-tanya-contrast px-7 py-4 rounded-r-xl rounded-bl-2xl w-full",
|
|
@@ -4720,7 +4843,7 @@ const He = "USD", xn = (e) => {
|
|
|
4720
4843
|
children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2 tanya-pulse-text", children: /* @__PURE__ */ a("p", { children: "Reading your instruction and setting things up…" }) })
|
|
4721
4844
|
}
|
|
4722
4845
|
) }),
|
|
4723
|
-
(v || u.response === "__CARD__") && (!
|
|
4846
|
+
(v || u.response === "__CARD__") && (!Z || !f) && /* @__PURE__ */ a(
|
|
4724
4847
|
"div",
|
|
4725
4848
|
{
|
|
4726
4849
|
className: "mt-6 mb-4 mx-4 animate-fade-in",
|
|
@@ -4730,7 +4853,7 @@ const He = "USD", xn = (e) => {
|
|
|
4730
4853
|
boxShadow: "0 2px 8px rgba(0,0,0,0.08)",
|
|
4731
4854
|
overflow: "hidden"
|
|
4732
4855
|
},
|
|
4733
|
-
children: v ?
|
|
4856
|
+
children: v ? To(u, f) : Ur(
|
|
4734
4857
|
u.snapshotPayload,
|
|
4735
4858
|
!1
|
|
4736
4859
|
)
|
|
@@ -4738,11 +4861,11 @@ const He = "USD", xn = (e) => {
|
|
|
4738
4861
|
)
|
|
4739
4862
|
] }, h);
|
|
4740
4863
|
}),
|
|
4741
|
-
|
|
4864
|
+
ue && /* @__PURE__ */ d("div", { className: "mt-6 mb-6 mx-6 rounded-xl p-6 shadow-md border border-gray-200 bg-white animate-fade-in", children: [
|
|
4742
4865
|
/* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
|
|
4743
4866
|
/* @__PURE__ */ d("h3", { className: "font-semibold text-lg text-gray-800 flex items-center gap-2", children: [
|
|
4744
4867
|
/* @__PURE__ */ a(
|
|
4745
|
-
|
|
4868
|
+
ie,
|
|
4746
4869
|
{
|
|
4747
4870
|
icon: "mdi:home-map-marker",
|
|
4748
4871
|
width: "24",
|
|
@@ -4751,12 +4874,12 @@ const He = "USD", xn = (e) => {
|
|
|
4751
4874
|
),
|
|
4752
4875
|
"Select a Delivery Address"
|
|
4753
4876
|
] }),
|
|
4754
|
-
|
|
4877
|
+
$ && /* @__PURE__ */ d(ve, { children: [
|
|
4755
4878
|
/* @__PURE__ */ a("span", { className: "ml-2 text-xs px-2 py-1 rounded-full bg-green-100 text-green-700 font-semibold", children: "Selected" }),
|
|
4756
4879
|
!k && /* @__PURE__ */ a(
|
|
4757
4880
|
"button",
|
|
4758
4881
|
{
|
|
4759
|
-
onClick:
|
|
4882
|
+
onClick: xo,
|
|
4760
4883
|
className: "ml-2 text-xs px-2 py-1 rounded-full border hover:bg-gray-50",
|
|
4761
4884
|
style: {
|
|
4762
4885
|
borderColor: "var(--tanya-light)",
|
|
@@ -4778,18 +4901,18 @@ const He = "USD", xn = (e) => {
|
|
|
4778
4901
|
}
|
|
4779
4902
|
),
|
|
4780
4903
|
/* @__PURE__ */ a("p", { className: "ml-3 text-gray-600", children: "Fetching your addresses..." })
|
|
4781
|
-
] }) :
|
|
4904
|
+
] }) : tt.length > 0 ? /* @__PURE__ */ d(
|
|
4782
4905
|
"div",
|
|
4783
4906
|
{
|
|
4784
|
-
className: `space-y-3 ${
|
|
4907
|
+
className: `space-y-3 ${$ ? "opacity-70" : ""}`,
|
|
4785
4908
|
children: [
|
|
4786
|
-
|
|
4787
|
-
const h = [u.addressLine1, u.addressLine2].filter(Boolean).map((
|
|
4909
|
+
tt.map((u) => {
|
|
4910
|
+
const h = [u.addressLine1, u.addressLine2].filter(Boolean).map((A) => Ge(A || "")).join(" "), f = Ge(u.city || ""), v = `${Ge(u.state || "")}${u.state && u.postalCode ? ", " : ""}${u.postalCode || ""}`, T = Ge(u.country || ""), b = String(u.addressId ?? u.id), B = Pe === b;
|
|
4788
4911
|
return /* @__PURE__ */ d(
|
|
4789
4912
|
"label",
|
|
4790
4913
|
{
|
|
4791
|
-
className: `flex items-start gap-3 p-4 border rounded-lg cursor-pointer transition hover:shadow-sm ${
|
|
4792
|
-
title:
|
|
4914
|
+
className: `flex items-start gap-3 p-4 border rounded-lg cursor-pointer transition hover:shadow-sm ${B ? "border-tanya-light" : "border-gray-300"} ${$ ? "pointer-events-none" : ""}`,
|
|
4915
|
+
title: $ ? "Address already submitted" : "",
|
|
4793
4916
|
children: [
|
|
4794
4917
|
/* @__PURE__ */ a(
|
|
4795
4918
|
"input",
|
|
@@ -4797,8 +4920,8 @@ const He = "USD", xn = (e) => {
|
|
|
4797
4920
|
type: "radio",
|
|
4798
4921
|
name: "address",
|
|
4799
4922
|
className: "mt-1 accent-tanya-light",
|
|
4800
|
-
checked:
|
|
4801
|
-
disabled:
|
|
4923
|
+
checked: B,
|
|
4924
|
+
disabled: $,
|
|
4802
4925
|
onChange: () => Zt(b),
|
|
4803
4926
|
value: b
|
|
4804
4927
|
}
|
|
@@ -4834,11 +4957,11 @@ const He = "USD", xn = (e) => {
|
|
|
4834
4957
|
/* @__PURE__ */ a(
|
|
4835
4958
|
"button",
|
|
4836
4959
|
{
|
|
4837
|
-
onClick:
|
|
4838
|
-
disabled:
|
|
4839
|
-
className: `px-6 py-2.5 rounded-full font-semibold text-white shadow-md transition-all duration-300 ${
|
|
4960
|
+
onClick: yo,
|
|
4961
|
+
disabled: $,
|
|
4962
|
+
className: `px-6 py-2.5 rounded-full font-semibold text-white shadow-md transition-all duration-300 ${$ ? "opacity-60 cursor-not-allowed" : "hover:-translate-y-0.5 hover:shadow-lg"}`,
|
|
4840
4963
|
style: { background: I },
|
|
4841
|
-
children:
|
|
4964
|
+
children: $ ? "Address Submitted" : "Submit Address"
|
|
4842
4965
|
}
|
|
4843
4966
|
)
|
|
4844
4967
|
] })
|
|
@@ -4846,11 +4969,11 @@ const He = "USD", xn = (e) => {
|
|
|
4846
4969
|
}
|
|
4847
4970
|
) : /* @__PURE__ */ a("div", { className: "text-center py-8 text-gray-600", children: "No addresses found. Please add a new one in your profile." })
|
|
4848
4971
|
] }),
|
|
4849
|
-
|
|
4972
|
+
K && /* @__PURE__ */ d("div", { className: "mt-2 mb-6 mx-6 rounded-xl p-6 shadow-md border border-gray-200 bg-white animate-fade-in", children: [
|
|
4850
4973
|
/* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
|
|
4851
4974
|
/* @__PURE__ */ d("h3", { className: "font-semibold text-lg text-gray-800 flex items-center gap-2", children: [
|
|
4852
4975
|
/* @__PURE__ */ a(
|
|
4853
|
-
|
|
4976
|
+
ie,
|
|
4854
4977
|
{
|
|
4855
4978
|
icon: "mdi:truck-delivery",
|
|
4856
4979
|
width: "24",
|
|
@@ -4859,12 +4982,12 @@ const He = "USD", xn = (e) => {
|
|
|
4859
4982
|
),
|
|
4860
4983
|
"Great! Now choose how fast you want it delivered 🚚"
|
|
4861
4984
|
] }),
|
|
4862
|
-
|
|
4985
|
+
q && /* @__PURE__ */ d(ve, { children: [
|
|
4863
4986
|
/* @__PURE__ */ a("span", { className: "ml-2 text-xs px-2 py-1 rounded-full bg-green-100 text-green-700 font-semibold", children: "Selected" }),
|
|
4864
4987
|
!k && /* @__PURE__ */ a(
|
|
4865
4988
|
"button",
|
|
4866
4989
|
{
|
|
4867
|
-
onClick:
|
|
4990
|
+
onClick: vo,
|
|
4868
4991
|
className: "ml-2 text-xs px-2 py-1 rounded-full border hover:bg-gray-50",
|
|
4869
4992
|
style: {
|
|
4870
4993
|
borderColor: "var(--tanya-light)",
|
|
@@ -4880,15 +5003,15 @@ const He = "USD", xn = (e) => {
|
|
|
4880
5003
|
/* @__PURE__ */ a(
|
|
4881
5004
|
"div",
|
|
4882
5005
|
{
|
|
4883
|
-
className: `space-y-3 ${
|
|
4884
|
-
children: Object.keys(
|
|
5006
|
+
className: `space-y-3 ${q ? "opacity-70" : ""}`,
|
|
5007
|
+
children: Object.keys(it).map(
|
|
4885
5008
|
(u) => {
|
|
4886
|
-
const h =
|
|
5009
|
+
const h = it[u], f = j === u;
|
|
4887
5010
|
return /* @__PURE__ */ d(
|
|
4888
5011
|
"label",
|
|
4889
5012
|
{
|
|
4890
|
-
className: `flex items-start gap-3 p-4 border rounded-lg cursor-pointer transition hover:shadow-sm ${f ? "border-tanya-light" : "border-gray-300"} ${
|
|
4891
|
-
title:
|
|
5013
|
+
className: `flex items-start gap-3 p-4 border rounded-lg cursor-pointer transition hover:shadow-sm ${f ? "border-tanya-light" : "border-gray-300"} ${q ? "pointer-events-none" : ""}`,
|
|
5014
|
+
title: q ? "Delivery already submitted" : "",
|
|
4892
5015
|
children: [
|
|
4893
5016
|
/* @__PURE__ */ a(
|
|
4894
5017
|
"input",
|
|
@@ -4897,21 +5020,21 @@ const He = "USD", xn = (e) => {
|
|
|
4897
5020
|
name: "delivery",
|
|
4898
5021
|
className: "mt-1 accent-tanya-light",
|
|
4899
5022
|
checked: f,
|
|
4900
|
-
disabled:
|
|
4901
|
-
onChange: () =>
|
|
5023
|
+
disabled: q,
|
|
5024
|
+
onChange: () => fe(u)
|
|
4902
5025
|
}
|
|
4903
5026
|
),
|
|
4904
5027
|
/* @__PURE__ */ d("div", { className: "flex-1", children: [
|
|
4905
5028
|
/* @__PURE__ */ d("div", { className: "font-semibold text-gray-800 flex items-center gap-2", children: [
|
|
4906
|
-
/* @__PURE__ */ a(
|
|
5029
|
+
/* @__PURE__ */ a(ie, { icon: h.icon, width: "18" }),
|
|
4907
5030
|
" ",
|
|
4908
5031
|
h.label
|
|
4909
5032
|
] }),
|
|
4910
5033
|
/* @__PURE__ */ a("div", { className: "text-sm text-gray-700", children: h.subtitle })
|
|
4911
5034
|
] }),
|
|
4912
|
-
/* @__PURE__ */ a("div", { className: "text-sm font-semibold text-gray-800", children: h.fee === 0 ? "Free" :
|
|
5035
|
+
/* @__PURE__ */ a("div", { className: "text-sm font-semibold text-gray-800", children: h.fee === 0 ? "Free" : je(
|
|
4913
5036
|
h.fee,
|
|
4914
|
-
(
|
|
5037
|
+
(R == null ? void 0 : R.currency) || Ve
|
|
4915
5038
|
) })
|
|
4916
5039
|
]
|
|
4917
5040
|
},
|
|
@@ -4937,20 +5060,20 @@ const He = "USD", xn = (e) => {
|
|
|
4937
5060
|
/* @__PURE__ */ a(
|
|
4938
5061
|
"button",
|
|
4939
5062
|
{
|
|
4940
|
-
onClick:
|
|
4941
|
-
disabled:
|
|
4942
|
-
className: `px-6 py-2.5 rounded-full font-semibold text-white shadow-md transition-all duration-300 ${
|
|
5063
|
+
onClick: bo,
|
|
5064
|
+
disabled: q,
|
|
5065
|
+
className: `px-6 py-2.5 rounded-full font-semibold text-white shadow-md transition-all duration-300 ${q ? "opacity-60 cursor-not-allowed" : "hover:-translate-y-0.5 hover:shadow-lg"}`,
|
|
4943
5066
|
style: { background: "var(--tanya)" },
|
|
4944
|
-
children:
|
|
5067
|
+
children: q ? "Delivery Submitted" : "Submit Delivery Option"
|
|
4945
5068
|
}
|
|
4946
5069
|
)
|
|
4947
5070
|
] })
|
|
4948
5071
|
] }),
|
|
4949
|
-
|
|
5072
|
+
ee && /* @__PURE__ */ d("div", { className: "mt-2 mb-6 mx-6 rounded-xl p-6 shadow-md border border-gray-200 bg-white animate-fade-in", children: [
|
|
4950
5073
|
/* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
|
|
4951
5074
|
/* @__PURE__ */ d("h3", { className: "font-semibold text-lg text-gray-800 flex items-center gap-2", children: [
|
|
4952
5075
|
/* @__PURE__ */ a(
|
|
4953
|
-
|
|
5076
|
+
ie,
|
|
4954
5077
|
{
|
|
4955
5078
|
icon: "mdi:credit-card-outline",
|
|
4956
5079
|
width: "24",
|
|
@@ -4959,12 +5082,12 @@ const He = "USD", xn = (e) => {
|
|
|
4959
5082
|
),
|
|
4960
5083
|
"Almost done! 💳"
|
|
4961
5084
|
] }),
|
|
4962
|
-
|
|
5085
|
+
te && /* @__PURE__ */ d(ve, { children: [
|
|
4963
5086
|
/* @__PURE__ */ a("span", { className: "ml-2 text-xs px-2 py-1 rounded-full bg-green-100 text-green-700 font-semibold", children: "Selected" }),
|
|
4964
5087
|
!k && /* @__PURE__ */ a(
|
|
4965
5088
|
"button",
|
|
4966
5089
|
{
|
|
4967
|
-
onClick:
|
|
5090
|
+
onClick: No,
|
|
4968
5091
|
className: "ml-2 text-xs px-2 py-1 rounded-full border hover:bg-gray-50",
|
|
4969
5092
|
style: {
|
|
4970
5093
|
borderColor: "var(--tanya-light)",
|
|
@@ -4980,12 +5103,12 @@ const He = "USD", xn = (e) => {
|
|
|
4980
5103
|
/* @__PURE__ */ a(
|
|
4981
5104
|
"div",
|
|
4982
5105
|
{
|
|
4983
|
-
className: `space-y-3 ${
|
|
5106
|
+
className: `space-y-3 ${te ? "opacity-70" : ""}`,
|
|
4984
5107
|
children: /* @__PURE__ */ d(
|
|
4985
5108
|
"label",
|
|
4986
5109
|
{
|
|
4987
|
-
className: `flex items-start gap-3 p-4 border rounded-lg cursor-pointer transition hover:shadow-sm ${
|
|
4988
|
-
title:
|
|
5110
|
+
className: `flex items-start gap-3 p-4 border rounded-lg cursor-pointer transition hover:shadow-sm ${Ne === "card" ? "border-tanya-light" : "border-gray-300"} ${te ? "pointer-events-none" : ""}`,
|
|
5111
|
+
title: te ? "Payment already submitted" : "",
|
|
4989
5112
|
children: [
|
|
4990
5113
|
/* @__PURE__ */ a(
|
|
4991
5114
|
"input",
|
|
@@ -4993,18 +5116,18 @@ const He = "USD", xn = (e) => {
|
|
|
4993
5116
|
type: "radio",
|
|
4994
5117
|
name: "payment",
|
|
4995
5118
|
className: "mt-1 accent-tanya-light",
|
|
4996
|
-
checked:
|
|
4997
|
-
disabled:
|
|
4998
|
-
onChange: () =>
|
|
5119
|
+
checked: Ne === "card",
|
|
5120
|
+
disabled: te,
|
|
5121
|
+
onChange: () => Ce("card")
|
|
4999
5122
|
}
|
|
5000
5123
|
),
|
|
5001
5124
|
/* @__PURE__ */ d("div", { className: "flex-1", children: [
|
|
5002
5125
|
/* @__PURE__ */ d("div", { className: "font-semibold text-gray-800 flex items-center gap-2", children: [
|
|
5003
|
-
/* @__PURE__ */ a(
|
|
5126
|
+
/* @__PURE__ */ a(ie, { icon: "mdi:credit-card-chip-outline", width: "18" }),
|
|
5004
5127
|
" ",
|
|
5005
5128
|
"Credit Card"
|
|
5006
5129
|
] }),
|
|
5007
|
-
|
|
5130
|
+
Ne === "card" && /* @__PURE__ */ d("div", { className: "text-sm text-gray-700 mt-1", children: [
|
|
5008
5131
|
"Mastercard •••• 7820",
|
|
5009
5132
|
/* @__PURE__ */ a("br", {}),
|
|
5010
5133
|
"Expiry: 12/26"
|
|
@@ -5019,7 +5142,7 @@ const He = "USD", xn = (e) => {
|
|
|
5019
5142
|
/* @__PURE__ */ a(
|
|
5020
5143
|
"button",
|
|
5021
5144
|
{
|
|
5022
|
-
onClick:
|
|
5145
|
+
onClick: So,
|
|
5023
5146
|
className: "px-6 py-2.5 rounded-full font-semibold border transition-all hover:-translate-y-0.5 hover:shadow-sm",
|
|
5024
5147
|
style: {
|
|
5025
5148
|
borderColor: "var(--tanya-light)",
|
|
@@ -5031,24 +5154,24 @@ const He = "USD", xn = (e) => {
|
|
|
5031
5154
|
/* @__PURE__ */ a(
|
|
5032
5155
|
"button",
|
|
5033
5156
|
{
|
|
5034
|
-
onClick:
|
|
5035
|
-
disabled:
|
|
5036
|
-
className: `px-6 py-2.5 rounded-full font-semibold text-white shadow-md transition-all duration-300 ${
|
|
5157
|
+
onClick: ko,
|
|
5158
|
+
disabled: te,
|
|
5159
|
+
className: `px-6 py-2.5 rounded-full font-semibold text-white shadow-md transition-all duration-300 ${te ? "opacity-60 cursor-not-allowed" : "hover:-translate-y-0.5 hover:shadow-lg"}`,
|
|
5037
5160
|
style: { background: "var(--tanya)" },
|
|
5038
|
-
children:
|
|
5161
|
+
children: te ? "Payment Submitted" : "Submit Payment Method"
|
|
5039
5162
|
}
|
|
5040
5163
|
)
|
|
5041
5164
|
] })
|
|
5042
5165
|
] }),
|
|
5043
|
-
|
|
5166
|
+
_e && qr(
|
|
5044
5167
|
{
|
|
5045
|
-
...
|
|
5168
|
+
...R,
|
|
5046
5169
|
address: JSON.parse(
|
|
5047
5170
|
localStorage.getItem("agentic_order_address") || "null"
|
|
5048
5171
|
),
|
|
5049
5172
|
delivery: localStorage.getItem("agentic_order_delivery"),
|
|
5050
5173
|
payment: localStorage.getItem("agentic_order_payment"),
|
|
5051
|
-
summary: Lr(
|
|
5174
|
+
summary: Lr(R == null ? void 0 : R.currency)
|
|
5052
5175
|
},
|
|
5053
5176
|
!1
|
|
5054
5177
|
)
|
|
@@ -5059,33 +5182,33 @@ const He = "USD", xn = (e) => {
|
|
|
5059
5182
|
/* @__PURE__ */ a(
|
|
5060
5183
|
"input",
|
|
5061
5184
|
{
|
|
5062
|
-
placeholder:
|
|
5063
|
-
disabled:
|
|
5185
|
+
placeholder: z ? "Complete the current step…" : Nt ? `What would you like me to do? (e.g., If this product goes below $${parseInt(r.price) - 5}, grab it for me.)` : "Oops! This combination isn’t available for this product. Try a different option.",
|
|
5186
|
+
disabled: mo,
|
|
5064
5187
|
className: `w-full rounded-full p-4 outline-none border-none focus:ring-0 focus:border-transparent disabled:bg-gray-100 disabled:cursor-not-allowed
|
|
5065
5188
|
${Nt ? "" : "placeholder:text-red-400 text-red-500"}`,
|
|
5066
|
-
value:
|
|
5189
|
+
value: Le,
|
|
5067
5190
|
onKeyDown: (u) => {
|
|
5068
|
-
u.key === "Enter" && !
|
|
5191
|
+
u.key === "Enter" && !Z && !z && Dr();
|
|
5069
5192
|
},
|
|
5070
|
-
onChange: (u) =>
|
|
5193
|
+
onChange: (u) => we(u.target.value)
|
|
5071
5194
|
}
|
|
5072
5195
|
),
|
|
5073
5196
|
/* @__PURE__ */ a(
|
|
5074
5197
|
"button",
|
|
5075
5198
|
{
|
|
5076
5199
|
type: "submit",
|
|
5077
|
-
disabled:
|
|
5200
|
+
disabled: Z || z,
|
|
5078
5201
|
className: "mr-6 font-medium",
|
|
5079
5202
|
style: { color: "var(--tanya-light)" },
|
|
5080
5203
|
onClick: () => Dr(),
|
|
5081
|
-
children:
|
|
5204
|
+
children: Z ? /* @__PURE__ */ a(
|
|
5082
5205
|
"div",
|
|
5083
5206
|
{
|
|
5084
5207
|
className: "m-3 animate-spin rounded-full h-6 w-6 border-b-2",
|
|
5085
5208
|
style: { borderBottom: "2px solid" }
|
|
5086
5209
|
}
|
|
5087
5210
|
) : /* @__PURE__ */ a(
|
|
5088
|
-
|
|
5211
|
+
ie,
|
|
5089
5212
|
{
|
|
5090
5213
|
icon: "fluent:send-48-filled",
|
|
5091
5214
|
color: "var(--tanya-light)",
|
|
@@ -5104,8 +5227,8 @@ const He = "USD", xn = (e) => {
|
|
|
5104
5227
|
);
|
|
5105
5228
|
};
|
|
5106
5229
|
export {
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5230
|
+
ui as AgenticShoppingButton,
|
|
5231
|
+
di as TanyaChatbot,
|
|
5232
|
+
ai as TanyaChatbotProvider
|
|
5110
5233
|
};
|
|
5111
5234
|
//# sourceMappingURL=tanya-chatbot.es.js.map
|