tanya-chatbot 0.8.3 → 0.8.5
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 +13 -13
- package/dist/tanya-chatbot.cjs.js.map +1 -1
- package/dist/tanya-chatbot.es.js +833 -852
- package/dist/tanya-chatbot.es.js.map +1 -1
- package/package.json +1 -1
package/dist/tanya-chatbot.es.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { useEffect as
|
|
2
|
-
import { jsx as a, jsxs as c, Fragment as
|
|
1
|
+
import { useEffect as Ne, useState as C, useRef as He, forwardRef as Pn, createElement as fr, useMemo as Yr } from "react";
|
|
2
|
+
import { jsx as a, jsxs as c, Fragment as ke } from "react/jsx-runtime";
|
|
3
3
|
import { createHttpLink as $o, ApolloClient as Lo, InMemoryCache as Do, ApolloProvider as zo } from "@apollo/client";
|
|
4
4
|
import { Provider as Mo, useDispatch as Tn, useSelector as Wt } from "react-redux";
|
|
5
5
|
import { createSlice as En, configureStore as Bo } from "@reduxjs/toolkit";
|
|
6
6
|
import * as On 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
11
|
import { Icon as Uo } from "@iconify/react";
|
|
12
|
-
import { toast as
|
|
12
|
+
import { toast as Me } from "react-toastify";
|
|
13
13
|
import { createPortal as qo } from "react-dom";
|
|
14
|
-
const Ro = '*,: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-9{height:2.25rem}.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-12{width:3rem}.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-9{width:2.25rem}.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-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\\:border-gray-500:hover{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}.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}}';
|
|
14
|
+
const Ro = '*,: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-12{width:3rem}.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-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-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\\:border-gray-500:hover{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}.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
15
|
function li() {
|
|
16
|
-
return
|
|
16
|
+
return Ne(() => {
|
|
17
17
|
if (typeof document < "u") {
|
|
18
18
|
const e = document.createElement("style");
|
|
19
19
|
return e.textContent = Ro, document.head.appendChild(e), () => {
|
|
@@ -64,11 +64,11 @@ const Ho = {
|
|
|
64
64
|
e.store = t.payload;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
}), { setStore: ci } = An.actions,
|
|
67
|
+
}), { setStore: ci } = An.actions, Vo = An.reducer, Yo = {
|
|
68
68
|
product: null
|
|
69
69
|
}, jn = En({
|
|
70
70
|
name: "product",
|
|
71
|
-
initialState:
|
|
71
|
+
initialState: Yo,
|
|
72
72
|
reducers: {
|
|
73
73
|
setProduct: (e, t) => {
|
|
74
74
|
e.product = t.payload;
|
|
@@ -76,7 +76,7 @@ const Ho = {
|
|
|
76
76
|
}
|
|
77
77
|
}), { setProduct: mr } = jn.actions, Jo = jn.reducer, Ko = Bo({
|
|
78
78
|
reducer: {
|
|
79
|
-
store:
|
|
79
|
+
store: Vo,
|
|
80
80
|
product: Jo
|
|
81
81
|
}
|
|
82
82
|
}), Wo = ({ children: e }) => /* @__PURE__ */ a(Mo, { store: Ko, children: e }), Gt = (e) => {
|
|
@@ -98,21 +98,21 @@ function Qo({
|
|
|
98
98
|
}) {
|
|
99
99
|
return /* @__PURE__ */ a(On.Trigger, { "data-slot": "popover-trigger", ...e });
|
|
100
100
|
}
|
|
101
|
-
const
|
|
101
|
+
const lt = () => ({ 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" }), $n = 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=${tt()}&siteId=${Ye()}`
|
|
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
|
}, Ln = 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=${tt()}&siteId=${Ye()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
|
|
116
116
|
{},
|
|
117
117
|
{
|
|
118
118
|
headers: {
|
|
@@ -123,12 +123,12 @@ const dt = () => ({ 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
|
-
async function
|
|
129
|
+
async function xt() {
|
|
130
130
|
var s;
|
|
131
|
-
const e =
|
|
131
|
+
const e = Ye(), 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 hr = async (e, t) => {
|
|
@@ -156,18 +156,18 @@ const hr = 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
|
+
}, tt = () => sessionStorage.getItem("Host"), Ye = () => sessionStorage.getItem("SiteId"), ct = () => sessionStorage.getItem("pubCfg"), dt = () => sessionStorage.getItem("envRef"), ut = () => sessionStorage.getItem("orgRef"), Xo = async (e) => {
|
|
160
160
|
console.log("fetching results");
|
|
161
|
-
const { serverUrl: t, basePath: r } =
|
|
161
|
+
const { serverUrl: t, basePath: r } = lt();
|
|
162
162
|
let n = "";
|
|
163
163
|
{
|
|
164
|
-
const o = await
|
|
164
|
+
const o = await xt();
|
|
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 = tt();
|
|
169
|
+
return (await xe.get(
|
|
170
|
+
`${t}${r}/search-sfcc?baseUrl=${o}&query=${e}&siteId=${Ye()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
|
|
171
171
|
{
|
|
172
172
|
headers: {
|
|
173
173
|
"Content-Type": "application/json",
|
|
@@ -180,11 +180,11 @@ const hr = async (e, t) => {
|
|
|
180
180
|
}
|
|
181
181
|
}, Dn = 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 } = lt(), n = tt();
|
|
184
184
|
console.log("calling access");
|
|
185
|
-
const { access_token: o } = await
|
|
186
|
-
return (await
|
|
187
|
-
`${t}${r}/product-sfcc/${e}?baseUrl=${n}&siteId=${
|
|
185
|
+
const { access_token: o } = await xt();
|
|
186
|
+
return (await xe.get(
|
|
187
|
+
`${t}${r}/product-sfcc/${e}?baseUrl=${n}&siteId=${Ye()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
|
|
188
188
|
{
|
|
189
189
|
headers: {
|
|
190
190
|
"Content-Type": "application/json",
|
|
@@ -196,9 +196,9 @@ const hr = async (e, t) => {
|
|
|
196
196
|
if (!e) throw new Error("customerId is required");
|
|
197
197
|
const t = await $n(), { customer_token: r } = await Ln(
|
|
198
198
|
t
|
|
199
|
-
), { serverUrl: n, basePath: o } =
|
|
200
|
-
return (await
|
|
201
|
-
`${n}${o}/get-interest?baseUrl=${
|
|
199
|
+
), { serverUrl: n, basePath: o } = lt(), i = (await xt()).access_token;
|
|
200
|
+
return (await xe.get(
|
|
201
|
+
`${n}${o}/get-interest?baseUrl=${tt()}&customerId=${e}&siteId=${Ye()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
|
|
202
202
|
{
|
|
203
203
|
headers: {
|
|
204
204
|
"Content-Type": "application/json",
|
|
@@ -224,7 +224,7 @@ const hr = async (e, t) => {
|
|
|
224
224
|
}).join("");
|
|
225
225
|
function ra() {
|
|
226
226
|
const e = () => window.innerWidth < 425 ? 1 : window.innerWidth < 768 ? 2 : 4, [t, r] = C(e);
|
|
227
|
-
return
|
|
227
|
+
return Ne(() => {
|
|
228
228
|
const n = () => r(e());
|
|
229
229
|
return window.addEventListener("resize", n), () => window.removeEventListener("resize", n);
|
|
230
230
|
}, []), t;
|
|
@@ -259,7 +259,7 @@ const na = ({
|
|
|
259
259
|
}
|
|
260
260
|
),
|
|
261
261
|
/* @__PURE__ */ a("div", { className: "flex gap-5 justify-center flex-1 overflow-hidden", children: e.slice(n, n + r).map((l) => {
|
|
262
|
-
var p, g,
|
|
262
|
+
var p, g, b, x;
|
|
263
263
|
return /* @__PURE__ */ c(
|
|
264
264
|
"div",
|
|
265
265
|
{
|
|
@@ -299,7 +299,7 @@ const na = ({
|
|
|
299
299
|
zIndex: 50
|
|
300
300
|
},
|
|
301
301
|
children: l != null && l.productName ? l.productName : l != null && l.product_name ? l.product_name : Gr(
|
|
302
|
-
Jr((
|
|
302
|
+
Jr((b = l == null ? void 0 : l.name) == null ? void 0 : b["en-US"]),
|
|
303
303
|
60
|
|
304
304
|
) || "Product"
|
|
305
305
|
}
|
|
@@ -308,7 +308,7 @@ const na = ({
|
|
|
308
308
|
/* @__PURE__ */ c("div", { className: " flex text-center items-center gap-2 text-[14px] text-[#14121F] font-bold font-nunitoSans text-base mb-1", children: [
|
|
309
309
|
/* @__PURE__ */ a("p", { children: ea(
|
|
310
310
|
l != null && l.price ? Number(l == null ? void 0 : l.price) : Wr(l).centAmount || 0,
|
|
311
|
-
(
|
|
311
|
+
(x = Wr(l)) == null ? void 0 : x.currencyCode
|
|
312
312
|
) }),
|
|
313
313
|
/* @__PURE__ */ c("p", { className: "text-[#14121F] font-normal line-through text-sm font-nunitoSans truncate", children: [
|
|
314
314
|
"$",
|
|
@@ -365,10 +365,10 @@ const na = ({
|
|
|
365
365
|
n
|
|
366
366
|
)) }), zn = async (e, t) => {
|
|
367
367
|
var s, i;
|
|
368
|
-
const { serverUrl: r, basePath: n } =
|
|
368
|
+
const { serverUrl: r, basePath: n } = lt(), o = `${r}`;
|
|
369
369
|
try {
|
|
370
|
-
const d = await
|
|
371
|
-
`${o}${n}/basket/create?baseUrl=${
|
|
370
|
+
const d = await xe.post(
|
|
371
|
+
`${o}${n}/basket/create?baseUrl=${tt()}&siteId=${Ye()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
|
|
372
372
|
t,
|
|
373
373
|
{
|
|
374
374
|
headers: {
|
|
@@ -385,13 +385,13 @@ const na = ({
|
|
|
385
385
|
"*"
|
|
386
386
|
), d.data;
|
|
387
387
|
} catch (d) {
|
|
388
|
-
return
|
|
388
|
+
return xe.isAxiosError(d) ? console.error("Error creating basket:", d.response || d.message) : console.error("Unexpected error:", d), null;
|
|
389
389
|
}
|
|
390
390
|
}, pr = async (e, t, r) => {
|
|
391
|
-
const { serverUrl: n, basePath: o } =
|
|
391
|
+
const { serverUrl: n, basePath: o } = lt(), 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=${tt()}&siteId=${Ye()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
|
|
395
395
|
t,
|
|
396
396
|
{
|
|
397
397
|
headers: {
|
|
@@ -402,7 +402,7 @@ const na = ({
|
|
|
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;
|
|
@@ -412,10 +412,10 @@ const na = ({
|
|
|
412
412
|
customer_token: t
|
|
413
413
|
}) => {
|
|
414
414
|
var s;
|
|
415
|
-
const { serverUrl: r, basePath: n } =
|
|
415
|
+
const { serverUrl: r, basePath: n } = lt(), 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=${tt()}&siteId=${Ye()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
|
|
419
419
|
{
|
|
420
420
|
headers: {
|
|
421
421
|
"Content-Type": "application/json",
|
|
@@ -425,10 +425,10 @@ const na = ({
|
|
|
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
430
|
}, Qt = "sfcc_basket_id", Qr = "sfcc_customer_token", Ot = "sfcc_token_expiry", aa = 300 * 1e3, Bt = "1.0.0";
|
|
431
|
-
const
|
|
431
|
+
const it = (e) => {
|
|
432
432
|
try {
|
|
433
433
|
e ? localStorage.setItem(Qt, e) : localStorage.removeItem(Qt);
|
|
434
434
|
} catch (t) {
|
|
@@ -446,93 +446,93 @@ const ct = (e) => {
|
|
|
446
446
|
console.error("Error storing token:", t);
|
|
447
447
|
}
|
|
448
448
|
}, Xr = 300, sa = ({ addToCartPwa: e }) => {
|
|
449
|
-
var l, p, g,
|
|
449
|
+
var l, p, g, b, x, _;
|
|
450
450
|
const t = Tn(), r = Wt((S) => S.product.product), n = Wt((S) => S.store.store), [o, s] = C(!!r);
|
|
451
|
-
if (
|
|
451
|
+
if (Ne(() => {
|
|
452
452
|
s(!!r);
|
|
453
453
|
}, [r]), !r) return null;
|
|
454
454
|
const i = async () => {
|
|
455
|
-
var S,
|
|
455
|
+
var S, P, k, I, J, B, w, Pe, T, K, ue, be, re, Te, ve, ge;
|
|
456
456
|
try {
|
|
457
|
-
if (!((
|
|
458
|
-
|
|
457
|
+
if (!((P = (S = r == null ? void 0 : r.variants) == null ? void 0 : S[0]) != null && P.product_id) && !(r.type.item || r.type.bundle) && !((I = (k = r == null ? void 0 : r.variants) == null ? void 0 : k[0]) != null && I.productId)) {
|
|
458
|
+
Me.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 U = [
|
|
465
465
|
{
|
|
466
|
-
product_id: ((
|
|
466
|
+
product_id: ((J = r.variants) == null ? void 0 : J[0].product_id) || ((B = r.variants) == null ? void 0 : B[0].productId) || (r == null ? void 0 : r.id),
|
|
467
467
|
quantity: 1
|
|
468
468
|
}
|
|
469
469
|
], j = JSON.parse(
|
|
470
470
|
sessionStorage.getItem("customerData") || "{}"
|
|
471
|
-
),
|
|
472
|
-
if (!
|
|
471
|
+
), fe = (j == null ? void 0 : j.basketId) || localStorage.getItem(Qt), W = !1, Je = localStorage.getItem(Ot), Ke = Date.now();
|
|
472
|
+
if (!W || !Je || Ke >= parseInt(Je)) {
|
|
473
473
|
let Z = "";
|
|
474
|
-
if (Z = "Bearer " + (await
|
|
474
|
+
if (Z = "Bearer " + (await xt()).access_token, !Z) {
|
|
475
475
|
console.error("Failed to get customer_token");
|
|
476
476
|
return;
|
|
477
477
|
}
|
|
478
|
-
const
|
|
479
|
-
if (Xt(Z), localStorage.setItem(Ot,
|
|
480
|
-
const
|
|
481
|
-
basketId:
|
|
478
|
+
const ft = Ke + 300 * 1e3;
|
|
479
|
+
if (Xt(Z), localStorage.setItem(Ot, ft.toString()), fe) {
|
|
480
|
+
const we = await Mn({
|
|
481
|
+
basketId: fe,
|
|
482
482
|
customer_token: Z
|
|
483
483
|
});
|
|
484
|
-
if (
|
|
485
|
-
const
|
|
486
|
-
|
|
487
|
-
|
|
484
|
+
if (we.status === 200 && we) {
|
|
485
|
+
const Ee = await pr(
|
|
486
|
+
fe,
|
|
487
|
+
U,
|
|
488
488
|
Z
|
|
489
489
|
);
|
|
490
|
-
(((w =
|
|
490
|
+
(((w = Ee == null ? void 0 : Ee.product_items) == null ? void 0 : w.length) > 0 || ((Pe = Ee == null ? void 0 : Ee.productItems) == null ? void 0 : Pe.length) > 0) && (Me.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
|
-
}), Gt(
|
|
497
|
+
}), Gt(fe));
|
|
498
498
|
return;
|
|
499
499
|
}
|
|
500
500
|
}
|
|
501
|
-
const
|
|
501
|
+
const bt = {
|
|
502
502
|
productItems: [
|
|
503
503
|
{
|
|
504
|
-
productId: ((
|
|
504
|
+
productId: ((T = r.variants) == null ? void 0 : T[0].product_id) || ((K = r.variants) == null ? void 0 : K[0].productId) || (r == null ? void 0 : r.id),
|
|
505
505
|
quantity: 1
|
|
506
506
|
}
|
|
507
507
|
]
|
|
508
|
-
},
|
|
509
|
-
if (!(
|
|
508
|
+
}, D = await zn(Z, bt);
|
|
509
|
+
if (!(D != null && D.basket_id) && !(D != null && D.basketId)) {
|
|
510
510
|
console.error("Failed to create basket");
|
|
511
511
|
return;
|
|
512
512
|
}
|
|
513
|
-
|
|
514
|
-
(
|
|
513
|
+
it(
|
|
514
|
+
(D == null ? void 0 : D.basket_id) || (D == null ? void 0 : D.basketId)
|
|
515
515
|
), console.log("adding product to basket");
|
|
516
516
|
const Le = await pr(
|
|
517
|
-
(
|
|
518
|
-
|
|
517
|
+
(D == null ? void 0 : D.basket_id) || (D == null ? void 0 : D.basketId),
|
|
518
|
+
U,
|
|
519
519
|
Z
|
|
520
520
|
);
|
|
521
|
-
console.log("object added to basket"), (((
|
|
521
|
+
console.log("object added to basket"), (((ue = Le == null ? void 0 : Le.product_items) == null ? void 0 : ue.length) > 0 || ((be = Le == null ? void 0 : Le.productItems) == null ? void 0 : be.length) > 0) && Me.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
|
-
}), Gt(
|
|
528
|
+
}), Gt(D.basket_id || (D == null ? void 0 : D.basketId));
|
|
529
529
|
}
|
|
530
|
-
} catch (
|
|
531
|
-
console.error("Error adding to cart:",
|
|
530
|
+
} catch (U) {
|
|
531
|
+
console.error("Error adding to cart:", U), Me.error("Failed to add product to cart", {
|
|
532
532
|
position: "bottom-right",
|
|
533
533
|
autoClose: 3e3
|
|
534
|
-
}), ((
|
|
535
|
-
((
|
|
534
|
+
}), ((re = U == null ? void 0 : U.response) == null ? void 0 : re.status) === 404 || // Basket not found
|
|
535
|
+
((Te = U == null ? void 0 : U.response) == null ? void 0 : Te.status) === 401 ? (((ve = U == null ? void 0 : U.response) == null ? void 0 : ve.status) === 404 && it(null), ((ge = U == null ? void 0 : U.response) == null ? void 0 : ge.status) === 401 && (it(null), Xt(null))) : (console.error("Failed to add product to basket:", U.message), Me.error("Failed to add product to cart", {
|
|
536
536
|
position: "bottom-right",
|
|
537
537
|
autoClose: 3e3
|
|
538
538
|
}));
|
|
@@ -542,7 +542,7 @@ const ct = (e) => {
|
|
|
542
542
|
const S = window.location.origin + "/product/" + r.id;
|
|
543
543
|
console.log("path", S), window.location.href = S;
|
|
544
544
|
};
|
|
545
|
-
return console.log(r, "the prod"), /* @__PURE__ */ c(
|
|
545
|
+
return console.log(r, "the prod"), /* @__PURE__ */ c(ke, { children: [
|
|
546
546
|
/* @__PURE__ */ a(
|
|
547
547
|
"div",
|
|
548
548
|
{
|
|
@@ -583,20 +583,20 @@ const ct = (e) => {
|
|
|
583
583
|
/* @__PURE__ */ a("div", { className: "flex flex-row items-center justify-center w-[120px] h-[120px] my-5", children: /* @__PURE__ */ a(
|
|
584
584
|
"img",
|
|
585
585
|
{
|
|
586
|
-
src: (
|
|
586
|
+
src: (b = (g = (p = (l = r.imageGroups) == null ? void 0 : l[0]) == null ? void 0 : p.images) == null ? void 0 : g[0]) == null ? void 0 : b.link,
|
|
587
587
|
alt: r.name,
|
|
588
588
|
className: "rounded-[10px]"
|
|
589
589
|
}
|
|
590
590
|
) }),
|
|
591
591
|
/* @__PURE__ */ a("div", { className: "flex flex-col items-center gap-2", children: r.imageGroups.slice(1, 2).map(
|
|
592
|
-
(S) => S.images.slice(1, 2).map((
|
|
592
|
+
(S) => S.images.slice(1, 2).map((P) => /* @__PURE__ */ a(
|
|
593
593
|
"img",
|
|
594
594
|
{
|
|
595
|
-
src:
|
|
595
|
+
src: P.link,
|
|
596
596
|
alt: r.name,
|
|
597
597
|
className: "rounded-[10px] w-[60px] h-[60px]"
|
|
598
598
|
},
|
|
599
|
-
|
|
599
|
+
P.link
|
|
600
600
|
))
|
|
601
601
|
) })
|
|
602
602
|
] }),
|
|
@@ -632,7 +632,7 @@ const ct = (e) => {
|
|
|
632
632
|
/* @__PURE__ */ c("div", { className: "mt-4 flex flex-col gap-2 w-full p-2", children: [
|
|
633
633
|
/* @__PURE__ */ a("div", { className: "flex flex-row items-center gap-2", children: /* @__PURE__ */ c("div", { className: "flex items-center gap-2 text-left font-nunitoSans", children: [
|
|
634
634
|
/* @__PURE__ */ c("div", { className: "text-[#323135] font-bold", children: [
|
|
635
|
-
((
|
|
635
|
+
((x = r == null ? void 0 : r.rating) == null ? void 0 : x.rate) || 0,
|
|
636
636
|
" /",
|
|
637
637
|
" ",
|
|
638
638
|
/* @__PURE__ */ a("span", { className: "text-[#68656E]", children: "5" })
|
|
@@ -643,7 +643,7 @@ const ct = (e) => {
|
|
|
643
643
|
" ratings"
|
|
644
644
|
] })
|
|
645
645
|
] }) }),
|
|
646
|
-
/* @__PURE__ */ a("div", { className: "mt-2 flex flex-row items-center gap-2", children: Array.from({ length: 5 }).map((S,
|
|
646
|
+
/* @__PURE__ */ a("div", { className: "mt-2 flex flex-row items-center gap-2", children: Array.from({ length: 5 }).map((S, P) => {
|
|
647
647
|
var k;
|
|
648
648
|
return /* @__PURE__ */ a(
|
|
649
649
|
Uo,
|
|
@@ -652,10 +652,10 @@ const ct = (e) => {
|
|
|
652
652
|
width: "20",
|
|
653
653
|
height: "20",
|
|
654
654
|
className: `text-yellow-500
|
|
655
|
-
${((k = r == null ? void 0 : r.rating) == null ? void 0 : k.rate) >
|
|
655
|
+
${((k = r == null ? void 0 : r.rating) == null ? void 0 : k.rate) > P ? "text-yellow-500" : "text-gray-300"}
|
|
656
656
|
`
|
|
657
657
|
},
|
|
658
|
-
|
|
658
|
+
P
|
|
659
659
|
);
|
|
660
660
|
}) })
|
|
661
661
|
] }),
|
|
@@ -709,146 +709,146 @@ const ct = (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 [
|
|
712
|
+
}, s = He(null), i = He(null), d = He(null), l = He(null), [p, g] = C(null);
|
|
713
|
+
He(null);
|
|
714
|
+
const [b, x] = C(!1), [_, S] = C(!1), [P, k] = C(!1), [I, J] = C(!1), [B, w] = C(!1), [Pe, T] = C(!1), [K, ue] = C(""), [be, re] = C(""), Te = (h) => ({
|
|
715
715
|
id: h.id,
|
|
716
716
|
title: h.name,
|
|
717
717
|
image: h.image ?? "",
|
|
718
718
|
price: h.price ?? 0
|
|
719
|
-
}), [
|
|
720
|
-
|
|
719
|
+
}), [ve, ge] = C([]), U = He(null), j = Wt((h) => h.store.store), fe = Wt((h) => h.product.product);
|
|
720
|
+
Ne(() => {
|
|
721
721
|
const h = localStorage.getItem(
|
|
722
722
|
`access_token_${e.siteId}`
|
|
723
|
-
),
|
|
723
|
+
), M = localStorage.getItem(
|
|
724
724
|
`chat-token-${e.siteId}`
|
|
725
725
|
);
|
|
726
|
-
if (h &&
|
|
727
|
-
const
|
|
728
|
-
|
|
726
|
+
if (h && M === h) {
|
|
727
|
+
const E = localStorage.getItem("chatHistory");
|
|
728
|
+
E && ge(JSON.parse(E));
|
|
729
729
|
} else
|
|
730
730
|
localStorage.setItem("chatHistory", JSON.stringify([])), localStorage.setItem(
|
|
731
731
|
`chat-token-${e.siteId}`,
|
|
732
732
|
h || ""
|
|
733
733
|
);
|
|
734
|
-
}, []),
|
|
735
|
-
localStorage.setItem("chatHistory", JSON.stringify(
|
|
734
|
+
}, []), Ne(() => {
|
|
735
|
+
localStorage.setItem("chatHistory", JSON.stringify(ve));
|
|
736
736
|
const h = localStorage.getItem(
|
|
737
737
|
`access_token_${e.siteId}`
|
|
738
738
|
);
|
|
739
739
|
h && localStorage.setItem(`chat-token-${e.siteId}`, h);
|
|
740
|
-
}, [
|
|
741
|
-
const
|
|
740
|
+
}, [ve]);
|
|
741
|
+
const W = () => {
|
|
742
742
|
k(!0), setTimeout(() => S(!0), 10);
|
|
743
|
-
},
|
|
743
|
+
}, Je = () => {
|
|
744
744
|
S(!1), setTimeout(() => k(!1), 300);
|
|
745
745
|
};
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
}, [
|
|
749
|
-
const
|
|
750
|
-
|
|
746
|
+
Ne(() => {
|
|
747
|
+
b ? W() : Je();
|
|
748
|
+
}, [b]);
|
|
749
|
+
const Ke = (h) => {
|
|
750
|
+
re(o[h]);
|
|
751
751
|
};
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
top:
|
|
752
|
+
Ne(() => {
|
|
753
|
+
P && U.current && U.current.scrollTo({
|
|
754
|
+
top: U.current.scrollHeight,
|
|
755
755
|
behavior: "smooth"
|
|
756
756
|
});
|
|
757
|
-
}, [
|
|
758
|
-
const Z = null,
|
|
759
|
-
const h = await
|
|
757
|
+
}, [ve, P]);
|
|
758
|
+
const Z = null, ft = null, bt = async () => {
|
|
759
|
+
const h = await xt();
|
|
760
760
|
h != null && g(h);
|
|
761
761
|
};
|
|
762
|
-
|
|
762
|
+
Ne(() => {
|
|
763
763
|
if (e != null && e.siteId) {
|
|
764
|
-
const { clientID: h, host:
|
|
765
|
-
sessionStorage.setItem("Host",
|
|
764
|
+
const { clientID: h, host: M, organizationID: E, shortCode: R, siteId: H } = e;
|
|
765
|
+
sessionStorage.setItem("Host", M), sessionStorage.setItem("SiteId", H), sessionStorage.setItem("pubCfg", btoa(h)), sessionStorage.setItem("envRef", R), sessionStorage.setItem("orgRef", E);
|
|
766
766
|
}
|
|
767
|
-
|
|
768
|
-
}, []),
|
|
769
|
-
t && (console.log("setting the basket id", t),
|
|
767
|
+
bt(), console.log("scapi environment v1");
|
|
768
|
+
}, []), Ne(() => {
|
|
769
|
+
t && (console.log("setting the basket id", t), it(t));
|
|
770
770
|
}, [t]);
|
|
771
|
-
const
|
|
771
|
+
const D = async () => {
|
|
772
772
|
const h = JSON.parse(
|
|
773
773
|
sessionStorage.getItem("customerData") || "{}"
|
|
774
774
|
).customerId;
|
|
775
775
|
return (await Zo(h || "")).c_interests;
|
|
776
|
-
}, Le = async (h,
|
|
776
|
+
}, Le = async (h, M) => {
|
|
777
777
|
console.log("in secondary flow", Bt);
|
|
778
|
-
const
|
|
779
|
-
if (console.log(
|
|
778
|
+
const E = await D();
|
|
779
|
+
if (console.log(E, "interests of customer", Bt), !!E)
|
|
780
780
|
try {
|
|
781
|
-
|
|
782
|
-
(
|
|
783
|
-
(ee,
|
|
781
|
+
ge(
|
|
782
|
+
(Se) => Se.map(
|
|
783
|
+
(ee, Q) => Q === Se.length - 1 ? { ...ee, secondaryLoading: !0 } : ee
|
|
784
784
|
)
|
|
785
785
|
);
|
|
786
|
-
const
|
|
787
|
-
if (!
|
|
788
|
-
const
|
|
789
|
-
registered: String(
|
|
790
|
-
userId: String(
|
|
786
|
+
const R = await hr(Z, ft);
|
|
787
|
+
if (!R) throw new Error("Failed to fetch token");
|
|
788
|
+
const H = localStorage.getItem("customerNumber"), O = localStorage.getItem("isLoggedIn"), ne = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
|
|
789
|
+
registered: String(O || !1),
|
|
790
|
+
userId: String(H || (/* @__PURE__ */ new Date()).getTime())
|
|
791
791
|
}).toString()}`, $ = JSON.stringify({
|
|
792
792
|
flowId: "Q166PR519W",
|
|
793
793
|
flowAliasId: "HKFUVLWVH2",
|
|
794
794
|
input: {
|
|
795
795
|
loyaltyPoints: "",
|
|
796
796
|
productName: h,
|
|
797
|
-
productPoints: String(
|
|
798
|
-
interests:
|
|
797
|
+
productPoints: String(M || 0),
|
|
798
|
+
interests: E
|
|
799
799
|
}
|
|
800
|
-
}),
|
|
800
|
+
}), q = await fetch(ne, {
|
|
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 ${R}`
|
|
806
806
|
},
|
|
807
807
|
body: $
|
|
808
808
|
});
|
|
809
|
-
if (!
|
|
810
|
-
const
|
|
811
|
-
let
|
|
809
|
+
if (!q.body) throw new Error("Readable stream not supported");
|
|
810
|
+
const Oe = q.body.getReader(), me = new TextDecoder();
|
|
811
|
+
let se = "";
|
|
812
812
|
for (; ; ) {
|
|
813
|
-
const { done:
|
|
814
|
-
if (
|
|
815
|
-
|
|
816
|
-
const
|
|
813
|
+
const { done: Se, value: ee } = await Oe.read();
|
|
814
|
+
if (Se) break;
|
|
815
|
+
se += me.decode(ee, { stream: !0 });
|
|
816
|
+
const Q = se.split(`
|
|
817
817
|
`);
|
|
818
|
-
|
|
819
|
-
for (const
|
|
820
|
-
if (
|
|
821
|
-
const N =
|
|
818
|
+
se = Q.pop() || "";
|
|
819
|
+
for (const Ae of Q)
|
|
820
|
+
if (Ae.startsWith("data:")) {
|
|
821
|
+
const N = Ae.slice(5).trim();
|
|
822
822
|
try {
|
|
823
|
-
const
|
|
824
|
-
|
|
823
|
+
const ie = JSON.parse(N);
|
|
824
|
+
ie.index === 0 && ge(
|
|
825
825
|
(L) => L.map(
|
|
826
|
-
(
|
|
827
|
-
...
|
|
828
|
-
secondaryResponse:
|
|
826
|
+
(le, De) => De === L.length - 1 ? {
|
|
827
|
+
...le,
|
|
828
|
+
secondaryResponse: ie.data,
|
|
829
829
|
secondaryLoading: !1
|
|
830
|
-
} :
|
|
830
|
+
} : le
|
|
831
831
|
)
|
|
832
832
|
);
|
|
833
|
-
} catch (
|
|
834
|
-
|
|
833
|
+
} catch (ie) {
|
|
834
|
+
ge(
|
|
835
835
|
(L) => L.map(
|
|
836
|
-
(
|
|
836
|
+
(le, De) => De === L.length - 1 ? { ...le, secondaryLoading: !1 } : le
|
|
837
837
|
)
|
|
838
|
-
), console.error("Secondary flow JSON parse error:",
|
|
838
|
+
), console.error("Secondary flow JSON parse error:", ie);
|
|
839
839
|
}
|
|
840
840
|
}
|
|
841
841
|
}
|
|
842
|
-
} catch (
|
|
843
|
-
console.error("Secondary flow error:",
|
|
842
|
+
} catch (R) {
|
|
843
|
+
console.error("Secondary flow error:", R);
|
|
844
844
|
}
|
|
845
|
-
},
|
|
846
|
-
const
|
|
847
|
-
if (
|
|
848
|
-
w(!0),
|
|
849
|
-
...
|
|
845
|
+
}, we = async (h) => {
|
|
846
|
+
const M = h || K.trim();
|
|
847
|
+
if (M) {
|
|
848
|
+
w(!0), ue(""), s.current = null, i.current = null, d.current = null, l.current = null, ge((E) => [
|
|
849
|
+
...E,
|
|
850
850
|
{
|
|
851
|
-
query:
|
|
851
|
+
query: M,
|
|
852
852
|
response: "Thinking for what suits you best...",
|
|
853
853
|
potentialQuestions: "",
|
|
854
854
|
products: [],
|
|
@@ -856,49 +856,49 @@ const ct = (e) => {
|
|
|
856
856
|
}
|
|
857
857
|
]);
|
|
858
858
|
try {
|
|
859
|
-
const
|
|
860
|
-
if (!
|
|
859
|
+
const E = be, R = localStorage.getItem("customerNumber"), H = localStorage.getItem("isLoggedIn"), O = await hr(Z, ft);
|
|
860
|
+
if (!O)
|
|
861
861
|
throw new Error("Failed to obtain access token");
|
|
862
|
-
const
|
|
863
|
-
registered: String(
|
|
864
|
-
userId: String(
|
|
862
|
+
const ne = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
|
|
863
|
+
registered: String(H || !1),
|
|
864
|
+
userId: String(R || (/* @__PURE__ */ new Date()).getTime())
|
|
865
865
|
}).toString()}`, $ = JSON.stringify({
|
|
866
866
|
flowId: "MMHQKYI1NE",
|
|
867
867
|
flowAliasId: "SZF9ZK1ATE",
|
|
868
868
|
input: {
|
|
869
|
-
userPrompt:
|
|
870
|
-
whom:
|
|
869
|
+
userPrompt: M,
|
|
870
|
+
whom: E
|
|
871
871
|
}
|
|
872
|
-
}),
|
|
872
|
+
}), q = await fetch(ne, {
|
|
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 ${O}`
|
|
878
878
|
},
|
|
879
879
|
body: $
|
|
880
880
|
});
|
|
881
|
-
if (!
|
|
882
|
-
throw new Error(`HTTP error! status: ${
|
|
883
|
-
if (!
|
|
884
|
-
const
|
|
885
|
-
let
|
|
881
|
+
if (!q.ok)
|
|
882
|
+
throw new Error(`HTTP error! status: ${q.status}`);
|
|
883
|
+
if (!q.body) throw new Error("Readable stream not supported");
|
|
884
|
+
const Oe = q.body.getReader(), me = new TextDecoder();
|
|
885
|
+
let se = "", Se = "";
|
|
886
886
|
for (; ; ) {
|
|
887
|
-
|
|
888
|
-
const { done: ee, value:
|
|
887
|
+
T(!0);
|
|
888
|
+
const { done: ee, value: Q } = await Oe.read();
|
|
889
889
|
if (ee) break;
|
|
890
|
-
|
|
891
|
-
const
|
|
890
|
+
se += me.decode(Q, { stream: !0 });
|
|
891
|
+
const Ae = se.split(`
|
|
892
892
|
`);
|
|
893
|
-
|
|
894
|
-
for (const N of
|
|
893
|
+
se = Ae.pop() || "";
|
|
894
|
+
for (const N of Ae)
|
|
895
895
|
if (N.startsWith("data:")) {
|
|
896
|
-
const
|
|
896
|
+
const ie = N.slice(5).trim();
|
|
897
897
|
try {
|
|
898
|
-
const L = JSON.parse(
|
|
899
|
-
L.index == 1 && (
|
|
900
|
-
(
|
|
901
|
-
(De,
|
|
898
|
+
const L = JSON.parse(ie);
|
|
899
|
+
L.index == 1 && (Se = L.data), ge(
|
|
900
|
+
(le) => le.map(
|
|
901
|
+
(De, Be) => Be === le.length - 1 ? {
|
|
902
902
|
...De,
|
|
903
903
|
[L.index == 0 ? "response" : L.index == 1 ? "keywords" : L.index == 2 ? "potentialQuestions" : "end"]: L.data
|
|
904
904
|
} : De
|
|
@@ -909,171 +909,171 @@ const ct = (e) => {
|
|
|
909
909
|
}
|
|
910
910
|
}
|
|
911
911
|
}
|
|
912
|
-
vt(
|
|
913
|
-
} catch (
|
|
914
|
-
console.error("Error sending message to Tanya:",
|
|
912
|
+
vt(Ee(Se));
|
|
913
|
+
} catch (E) {
|
|
914
|
+
console.error("Error sending message to Tanya:", E);
|
|
915
915
|
} finally {
|
|
916
916
|
w(!1);
|
|
917
917
|
}
|
|
918
918
|
}
|
|
919
|
-
},
|
|
920
|
-
const
|
|
919
|
+
}, Ee = (h) => {
|
|
920
|
+
const M = h.match(
|
|
921
921
|
/top five relevant product or category names are: (.*)/i
|
|
922
|
-
),
|
|
923
|
-
return [...new Set(
|
|
922
|
+
), H = (M ? M[1] : h).split(", ").map((G) => G.replace(/\s*(Toys|Bags|Miniature|etc\.*)\s*/gi, "").trim());
|
|
923
|
+
return [...new Set(H)].filter(Boolean).join(",");
|
|
924
924
|
}, vt = async (h) => {
|
|
925
|
-
var
|
|
926
|
-
const
|
|
927
|
-
|
|
925
|
+
var E, R, H;
|
|
926
|
+
const M = typeof h == "string" ? h.split(",") : h;
|
|
927
|
+
T(!0);
|
|
928
928
|
try {
|
|
929
|
-
const
|
|
930
|
-
|
|
929
|
+
const O = await Promise.all(
|
|
930
|
+
M.map(($) => Xo($).catch(() => []))
|
|
931
931
|
// prevent Promise.all crash
|
|
932
|
-
),
|
|
932
|
+
), G = M.map(($, q) => ({
|
|
933
933
|
keyword: $,
|
|
934
|
-
items:
|
|
934
|
+
items: O[q] ?? [],
|
|
935
935
|
loading: !1
|
|
936
|
-
})).filter(($) => $.items.length > 0),
|
|
937
|
-
if (
|
|
938
|
-
i.current =
|
|
939
|
-
const $ = typeof
|
|
936
|
+
})).filter(($) => $.items.length > 0), ne = (R = (E = G[0]) == null ? void 0 : E.items) == null ? void 0 : R[0];
|
|
937
|
+
if (ne) {
|
|
938
|
+
i.current = ne.product_id, s.current = ne.product_name, d.current = (H = ne.image) == null ? void 0 : H.link;
|
|
939
|
+
const $ = typeof ne.price == "number" ? ne.price : null;
|
|
940
940
|
l.current = $;
|
|
941
941
|
}
|
|
942
|
-
if (
|
|
942
|
+
if (ge(
|
|
943
943
|
($) => $.map(
|
|
944
|
-
(
|
|
945
|
-
...
|
|
946
|
-
products:
|
|
947
|
-
productSnapshot:
|
|
944
|
+
(q, Oe) => Oe === $.length - 1 ? {
|
|
945
|
+
...q,
|
|
946
|
+
products: G,
|
|
947
|
+
productSnapshot: ne ? {
|
|
948
948
|
id: i.current,
|
|
949
949
|
name: s.current,
|
|
950
950
|
image: d.current,
|
|
951
951
|
price: l.current,
|
|
952
952
|
points: 0,
|
|
953
953
|
quantity: 1
|
|
954
|
-
} :
|
|
955
|
-
} :
|
|
954
|
+
} : q.productSnapshot
|
|
955
|
+
} : q
|
|
956
956
|
)
|
|
957
|
-
),
|
|
957
|
+
), ne) {
|
|
958
958
|
const $ = JSON.parse(
|
|
959
959
|
sessionStorage.getItem("customerData") || "{}"
|
|
960
960
|
);
|
|
961
961
|
$ != null && $.isGuest || (console.log("running secondary flow", Bt), Le(s.current, 0));
|
|
962
962
|
}
|
|
963
|
-
} catch (
|
|
964
|
-
console.error("error in keyword search",
|
|
963
|
+
} catch (O) {
|
|
964
|
+
console.error("error in keyword search", O);
|
|
965
965
|
} finally {
|
|
966
|
-
|
|
966
|
+
T(!1);
|
|
967
967
|
}
|
|
968
|
-
}, rr = async (h,
|
|
969
|
-
var
|
|
970
|
-
|
|
968
|
+
}, rr = async (h, M) => {
|
|
969
|
+
var E, R, H, O, G, ne, $, q, Oe, me, se, Se, ee, Q, Ae;
|
|
970
|
+
J(!0);
|
|
971
971
|
try {
|
|
972
972
|
const N = await Dn(h.id);
|
|
973
|
-
if (!((
|
|
974
|
-
|
|
973
|
+
if (!((R = (E = N == null ? void 0 : N.variants) == null ? void 0 : E[0]) != null && R.product_id || (O = (H = N == null ? void 0 : N.variants) == null ? void 0 : H[0]) != null && O.productId) && !(N.type.item || N.type.bundle)) {
|
|
974
|
+
J(!1), Me.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 ie = [
|
|
981
981
|
{
|
|
982
|
-
product_id: ((
|
|
983
|
-
quantity:
|
|
982
|
+
product_id: ((G = N.variants) == null ? void 0 : G[0].product_id) || ((ne = N.variants) == null ? void 0 : ne[0].productId) || (N == null ? void 0 : N.id),
|
|
983
|
+
quantity: M
|
|
984
984
|
}
|
|
985
985
|
];
|
|
986
|
-
console.log(
|
|
986
|
+
console.log(ie, "product data", "app version", Bt);
|
|
987
987
|
const L = JSON.parse(
|
|
988
988
|
sessionStorage.getItem("customerData") || "{}"
|
|
989
|
-
),
|
|
990
|
-
if (!De || !
|
|
989
|
+
), le = (L == null ? void 0 : L.basketId) || localStorage.getItem(Qt), De = !1, Be = localStorage.getItem(Ot), kt = Date.now();
|
|
990
|
+
if (!De || !Be || kt >= parseInt(Be)) {
|
|
991
991
|
const Nt = await $n();
|
|
992
|
-
let { customer_token:
|
|
992
|
+
let { customer_token: Ue } = await Ln(
|
|
993
993
|
Nt
|
|
994
994
|
);
|
|
995
|
-
if (
|
|
995
|
+
if (Ue = "Bearer " + p.access_token, !Ue) {
|
|
996
996
|
console.error("Failed to get customer_token");
|
|
997
997
|
return;
|
|
998
998
|
}
|
|
999
999
|
const jt = kt + 300 * 1e3;
|
|
1000
|
-
if (Xt(
|
|
1000
|
+
if (Xt(Ue), localStorage.setItem(Ot, jt.toString()), console.log(le, "basketIdFromCustomer"), le) {
|
|
1001
1001
|
const Lt = await Mn({
|
|
1002
|
-
basketId:
|
|
1003
|
-
customer_token:
|
|
1002
|
+
basketId: le,
|
|
1003
|
+
customer_token: Ue
|
|
1004
1004
|
});
|
|
1005
1005
|
if (Lt.status === 200 && Lt) {
|
|
1006
|
-
const
|
|
1007
|
-
ce,
|
|
1006
|
+
const Ge = await pr(
|
|
1008
1007
|
le,
|
|
1009
|
-
|
|
1008
|
+
ie,
|
|
1009
|
+
Ue
|
|
1010
1010
|
);
|
|
1011
|
-
(($ =
|
|
1011
|
+
(($ = Ge == null ? void 0 : Ge.product_items) == null ? void 0 : $.length) > 0 && (Me.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
|
-
}), Gt(
|
|
1018
|
+
}), Gt(le), J(!1));
|
|
1019
1019
|
return;
|
|
1020
1020
|
}
|
|
1021
1021
|
}
|
|
1022
1022
|
const $t = {
|
|
1023
1023
|
productItems: [
|
|
1024
1024
|
{
|
|
1025
|
-
productId: ((
|
|
1025
|
+
productId: ((q = N.variants) == null ? void 0 : q[0].product_id) || ((Oe = N.variants) == null ? void 0 : Oe[0].productId) || (N == null ? void 0 : N.id),
|
|
1026
1026
|
quantity: 1
|
|
1027
1027
|
}
|
|
1028
1028
|
]
|
|
1029
|
-
},
|
|
1029
|
+
}, A = await zn(Ue, $t);
|
|
1030
1030
|
if (console.log(
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1031
|
+
A,
|
|
1032
|
+
A == null ? void 0 : A.basket_id,
|
|
1033
|
+
A == null ? void 0 : A.basketId,
|
|
1034
1034
|
"the basket response"
|
|
1035
|
-
), !(
|
|
1036
|
-
|
|
1035
|
+
), !(A != null && A.basket_id || !(A != null && A.basketId))) {
|
|
1036
|
+
J(!1), console.error("Failed to create basket");
|
|
1037
1037
|
return;
|
|
1038
1038
|
}
|
|
1039
|
-
|
|
1040
|
-
(
|
|
1039
|
+
it(
|
|
1040
|
+
(A == null ? void 0 : A.basket_id) || (A == null ? void 0 : A.basketId)
|
|
1041
1041
|
);
|
|
1042
|
-
const
|
|
1042
|
+
const We = await r(
|
|
1043
1043
|
{
|
|
1044
1044
|
productId: i,
|
|
1045
|
-
quantity:
|
|
1045
|
+
quantity: M
|
|
1046
1046
|
},
|
|
1047
|
-
(
|
|
1047
|
+
(A == null ? void 0 : A.basket_id) || (A == null ? void 0 : A.basketId)
|
|
1048
1048
|
);
|
|
1049
|
-
(((
|
|
1049
|
+
(((me = We == null ? void 0 : We.product_items) == null ? void 0 : me.length) > 0 || ((se = We == null ? void 0 : We.productItems) == null ? void 0 : se.length) > 0) && Me.success("Added to cart", {
|
|
1050
1050
|
position: "bottom-right",
|
|
1051
1051
|
autoClose: 3e3,
|
|
1052
1052
|
hideProgressBar: !1,
|
|
1053
1053
|
closeOnClick: !0,
|
|
1054
1054
|
pauseOnHover: !0,
|
|
1055
1055
|
draggable: !0
|
|
1056
|
-
}), Gt(
|
|
1056
|
+
}), Gt(A.basket_id || (A == null ? void 0 : A.basketId));
|
|
1057
1057
|
}
|
|
1058
1058
|
} catch (N) {
|
|
1059
|
-
|
|
1059
|
+
J(!1), console.error("Error adding to cart:", N), Me.error("Failed to add product to cart", {
|
|
1060
1060
|
position: "bottom-right",
|
|
1061
1061
|
autoClose: 3e3
|
|
1062
|
-
}), ((
|
|
1063
|
-
((ee = N == null ? void 0 : N.response) == null ? void 0 : ee.status) === 401 ? (((
|
|
1062
|
+
}), ((Se = N == null ? void 0 : N.response) == null ? void 0 : Se.status) === 404 || // Basket not found
|
|
1063
|
+
((ee = N == null ? void 0 : N.response) == null ? void 0 : ee.status) === 401 ? (((Q = N == null ? void 0 : N.response) == null ? void 0 : Q.status) === 404 && it(null), ((Ae = N == null ? void 0 : N.response) == null ? void 0 : Ae.status) === 401 && (it(null), Xt(null))) : (console.error("Failed to add product to basket:", N.message), Me.error("Failed to add product to cart", {
|
|
1064
1064
|
position: "bottom-right",
|
|
1065
1065
|
autoClose: 3e3
|
|
1066
1066
|
}));
|
|
1067
1067
|
}
|
|
1068
|
-
|
|
1068
|
+
J(!1);
|
|
1069
1069
|
};
|
|
1070
|
-
return
|
|
1071
|
-
|
|
1072
|
-
}, [
|
|
1070
|
+
return Ne(() => {
|
|
1071
|
+
P ? setTimeout(() => S(!0), 10) : S(!1);
|
|
1072
|
+
}, [P]), /* @__PURE__ */ a("div", { className: "relative flex justify-center", children: /* @__PURE__ */ c(Go, { open: b, onOpenChange: x, children: [
|
|
1073
1073
|
/* @__PURE__ */ a(
|
|
1074
1074
|
Qo,
|
|
1075
1075
|
{
|
|
1076
|
-
onClick: () =>
|
|
1076
|
+
onClick: () => x(!0),
|
|
1077
1077
|
style: {
|
|
1078
1078
|
// background: storeDetails.tanyaThemeColor,
|
|
1079
1079
|
},
|
|
@@ -1133,12 +1133,12 @@ const ct = (e) => {
|
|
|
1133
1133
|
) })
|
|
1134
1134
|
}
|
|
1135
1135
|
),
|
|
1136
|
-
|
|
1136
|
+
P && /* @__PURE__ */ c(ke, { children: [
|
|
1137
1137
|
/* @__PURE__ */ a(
|
|
1138
1138
|
"div",
|
|
1139
1139
|
{
|
|
1140
1140
|
className: "fixed inset-0 z-40 bg-black/30",
|
|
1141
|
-
onClick: () =>
|
|
1141
|
+
onClick: () => x(!1)
|
|
1142
1142
|
}
|
|
1143
1143
|
),
|
|
1144
1144
|
/* @__PURE__ */ c(
|
|
@@ -1225,7 +1225,7 @@ const ct = (e) => {
|
|
|
1225
1225
|
gap: "1.25rem",
|
|
1226
1226
|
margin: "0.75rem"
|
|
1227
1227
|
},
|
|
1228
|
-
children: /* @__PURE__ */ a("button", { onClick: () =>
|
|
1228
|
+
children: /* @__PURE__ */ a("button", { onClick: () => x(!1), children: /* @__PURE__ */ c(
|
|
1229
1229
|
"svg",
|
|
1230
1230
|
{
|
|
1231
1231
|
width: "24",
|
|
@@ -1277,12 +1277,12 @@ const ct = (e) => {
|
|
|
1277
1277
|
/* @__PURE__ */ c(
|
|
1278
1278
|
"div",
|
|
1279
1279
|
{
|
|
1280
|
-
className: `flex flex-col h-full ${
|
|
1280
|
+
className: `flex flex-col h-full ${fe ? "lg:w-2/3 w-full" : "w-full"}`,
|
|
1281
1281
|
children: [
|
|
1282
1282
|
/* @__PURE__ */ c(
|
|
1283
1283
|
"div",
|
|
1284
1284
|
{
|
|
1285
|
-
ref:
|
|
1285
|
+
ref: U,
|
|
1286
1286
|
className: "overflow-y-auto pr-5 pb-2 space-y-4 hide-scrollbar flex-grow mb-24",
|
|
1287
1287
|
children: [
|
|
1288
1288
|
(j == null ? void 0 : j.whomRequired) && /* @__PURE__ */ c(
|
|
@@ -1294,11 +1294,11 @@ const ct = (e) => {
|
|
|
1294
1294
|
/* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2 mt-2", children: n.map((h) => /* @__PURE__ */ a(
|
|
1295
1295
|
"button",
|
|
1296
1296
|
{
|
|
1297
|
-
onClick: () =>
|
|
1297
|
+
onClick: () => Ke(h),
|
|
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: be === o[h] ? "#FFFFFF" : "#F3F3F3",
|
|
1301
|
+
borderColor: be === o[h] ? "#BBB3DD" : ""
|
|
1302
1302
|
},
|
|
1303
1303
|
children: h
|
|
1304
1304
|
},
|
|
@@ -1307,8 +1307,8 @@ const ct = (e) => {
|
|
|
1307
1307
|
]
|
|
1308
1308
|
}
|
|
1309
1309
|
),
|
|
1310
|
-
|
|
1311
|
-
var
|
|
1310
|
+
ve.map((h, M) => {
|
|
1311
|
+
var E, R;
|
|
1312
1312
|
return /* @__PURE__ */ c("div", { children: [
|
|
1313
1313
|
/* @__PURE__ */ a(
|
|
1314
1314
|
"div",
|
|
@@ -1334,8 +1334,8 @@ const ct = (e) => {
|
|
|
1334
1334
|
}
|
|
1335
1335
|
}
|
|
1336
1336
|
) }),
|
|
1337
|
-
|
|
1338
|
-
(h == null ? void 0 : h.products) && ((
|
|
1337
|
+
Pe && !h.response.includes("Thinking") && ((E = h.products) == null ? void 0 : E.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
|
+
(h == null ? void 0 : h.products) && ((R = h == null ? void 0 : h.products) == null ? void 0 : R.length) > 0 && /* @__PURE__ */ a(
|
|
1339
1339
|
oa,
|
|
1340
1340
|
{
|
|
1341
1341
|
chat: h.products,
|
|
@@ -1351,17 +1351,17 @@ const ct = (e) => {
|
|
|
1351
1351
|
children: "Why not explore these inquiries..."
|
|
1352
1352
|
}
|
|
1353
1353
|
),
|
|
1354
|
-
h.potentialQuestions.split(",").map((
|
|
1354
|
+
h.potentialQuestions.split(",").map((H, O) => /* @__PURE__ */ a(
|
|
1355
1355
|
"button",
|
|
1356
1356
|
{
|
|
1357
1357
|
className: `cursor-pointer font-nunitoSans font-semibold text-[#232323] border bg-[#804C9E0D] border-${j.themeDarkColor} m-1 rounded-xl px-2 py-1`,
|
|
1358
|
-
onClick: () =>
|
|
1358
|
+
onClick: () => we(H),
|
|
1359
1359
|
style: {
|
|
1360
1360
|
backgroundColor: j.tanyaThemeColorLight
|
|
1361
1361
|
},
|
|
1362
|
-
children:
|
|
1362
|
+
children: H
|
|
1363
1363
|
},
|
|
1364
|
-
|
|
1364
|
+
O
|
|
1365
1365
|
))
|
|
1366
1366
|
] }),
|
|
1367
1367
|
(h == null ? void 0 : h.secondaryLoading) && /* @__PURE__ */ a("div", { className: "mt-3 mb-4 px-4", children: /* @__PURE__ */ c(
|
|
@@ -1397,7 +1397,7 @@ const ct = (e) => {
|
|
|
1397
1397
|
]
|
|
1398
1398
|
}
|
|
1399
1399
|
) }),
|
|
1400
|
-
(h == null ? void 0 : h.secondaryResponse) && /* @__PURE__ */ a(
|
|
1400
|
+
(h == null ? void 0 : h.secondaryResponse) && /* @__PURE__ */ a(ke, { children: /* @__PURE__ */ c("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 ct = (e) => {
|
|
|
1465
1465
|
"button",
|
|
1466
1466
|
{
|
|
1467
1467
|
className: "px-3 py-1 text-sm",
|
|
1468
|
-
onClick: () =>
|
|
1469
|
-
(
|
|
1470
|
-
(
|
|
1471
|
-
...
|
|
1468
|
+
onClick: () => ge(
|
|
1469
|
+
(H) => H.map(
|
|
1470
|
+
(O, G) => G === M && O.productSnapshot ? {
|
|
1471
|
+
...O,
|
|
1472
1472
|
productSnapshot: {
|
|
1473
|
-
...
|
|
1473
|
+
...O.productSnapshot,
|
|
1474
1474
|
quantity: Math.max(
|
|
1475
1475
|
1,
|
|
1476
|
-
|
|
1476
|
+
O.productSnapshot.quantity - 1
|
|
1477
1477
|
)
|
|
1478
1478
|
}
|
|
1479
|
-
} :
|
|
1479
|
+
} : O
|
|
1480
1480
|
)
|
|
1481
1481
|
),
|
|
1482
1482
|
style: {
|
|
@@ -1491,15 +1491,15 @@ const ct = (e) => {
|
|
|
1491
1491
|
"button",
|
|
1492
1492
|
{
|
|
1493
1493
|
className: "px-3 py-1 text-sm",
|
|
1494
|
-
onClick: () =>
|
|
1495
|
-
(
|
|
1496
|
-
(
|
|
1497
|
-
...
|
|
1494
|
+
onClick: () => ge(
|
|
1495
|
+
(H) => H.map(
|
|
1496
|
+
(O, G) => G === M && O.productSnapshot ? {
|
|
1497
|
+
...O,
|
|
1498
1498
|
productSnapshot: {
|
|
1499
|
-
...
|
|
1500
|
-
quantity:
|
|
1499
|
+
...O.productSnapshot,
|
|
1500
|
+
quantity: O.productSnapshot.quantity + 1
|
|
1501
1501
|
}
|
|
1502
|
-
} :
|
|
1502
|
+
} : O
|
|
1503
1503
|
)
|
|
1504
1504
|
),
|
|
1505
1505
|
style: {
|
|
@@ -1515,7 +1515,7 @@ const ct = (e) => {
|
|
|
1515
1515
|
{
|
|
1516
1516
|
onClick: () => {
|
|
1517
1517
|
rr(
|
|
1518
|
-
|
|
1518
|
+
Te(
|
|
1519
1519
|
h.productSnapshot
|
|
1520
1520
|
),
|
|
1521
1521
|
h.productSnapshot.quantity
|
|
@@ -1538,7 +1538,7 @@ const ct = (e) => {
|
|
|
1538
1538
|
) })
|
|
1539
1539
|
] }) }),
|
|
1540
1540
|
/* @__PURE__ */ a("div", { className: "mb-20" })
|
|
1541
|
-
] },
|
|
1541
|
+
] }, M);
|
|
1542
1542
|
})
|
|
1543
1543
|
]
|
|
1544
1544
|
}
|
|
@@ -1556,11 +1556,11 @@ const ct = (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: K,
|
|
1560
1560
|
autoFocus: !0,
|
|
1561
|
-
onChange: (h) =>
|
|
1561
|
+
onChange: (h) => ue(h.target.value),
|
|
1562
1562
|
onKeyDown: (h) => {
|
|
1563
|
-
h.key === "Enter" && !
|
|
1563
|
+
h.key === "Enter" && !B && we();
|
|
1564
1564
|
}
|
|
1565
1565
|
}
|
|
1566
1566
|
),
|
|
@@ -1568,10 +1568,10 @@ const ct = (e) => {
|
|
|
1568
1568
|
"button",
|
|
1569
1569
|
{
|
|
1570
1570
|
type: "submit",
|
|
1571
|
-
disabled:
|
|
1571
|
+
disabled: B,
|
|
1572
1572
|
className: "p-3",
|
|
1573
|
-
onClick: () =>
|
|
1574
|
-
children:
|
|
1573
|
+
onClick: () => we(),
|
|
1574
|
+
children: B ? /* @__PURE__ */ a(
|
|
1575
1575
|
"div",
|
|
1576
1576
|
{
|
|
1577
1577
|
className: "p-3 animate-spin rounded-full h-3 w-3 border-b-2",
|
|
@@ -1629,14 +1629,14 @@ function la(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 et = function() {
|
|
1633
|
+
return et = 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
|
+
}, et.apply(this, arguments);
|
|
1640
1640
|
};
|
|
1641
1641
|
function ca(e, t) {
|
|
1642
1642
|
var r = {};
|
|
@@ -1660,7 +1660,7 @@ var sr = "Invariant Violation", Zr = Object.setPrototypeOf, da = Zr === void 0 ?
|
|
|
1660
1660
|
return t;
|
|
1661
1661
|
})(Error)
|
|
1662
1662
|
);
|
|
1663
|
-
function
|
|
1663
|
+
function st(e, t) {
|
|
1664
1664
|
if (!e)
|
|
1665
1665
|
throw new Bn(t);
|
|
1666
1666
|
}
|
|
@@ -1675,7 +1675,7 @@ function Ut(e) {
|
|
|
1675
1675
|
}
|
|
1676
1676
|
(function(e) {
|
|
1677
1677
|
e.debug = Ut("debug"), e.log = Ut("log"), e.warn = Ut("warn"), e.error = Ut("error");
|
|
1678
|
-
})(
|
|
1678
|
+
})(st || (st = {}));
|
|
1679
1679
|
var qn = "3.14.0";
|
|
1680
1680
|
function pt(e) {
|
|
1681
1681
|
try {
|
|
@@ -1725,12 +1725,12 @@ function qt(e) {
|
|
|
1725
1725
|
var ir = 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 || st(t, Cr(r, n) || _r(r, n));
|
|
1729
1729
|
}, {
|
|
1730
|
-
debug: qt(
|
|
1731
|
-
log: qt(
|
|
1732
|
-
warn: qt(
|
|
1733
|
-
error: qt(
|
|
1730
|
+
debug: qt(st.debug),
|
|
1731
|
+
log: qt(st.log),
|
|
1732
|
+
warn: qt(st.warn),
|
|
1733
|
+
error: qt(st.error)
|
|
1734
1734
|
});
|
|
1735
1735
|
function Rn(e) {
|
|
1736
1736
|
for (var t = [], r = 1; r < arguments.length; r++)
|
|
@@ -1766,7 +1766,7 @@ function ha(e) {
|
|
|
1766
1766
|
return t.name.value;
|
|
1767
1767
|
})[0] || null;
|
|
1768
1768
|
}
|
|
1769
|
-
let
|
|
1769
|
+
let de = null;
|
|
1770
1770
|
const rn = {};
|
|
1771
1771
|
let pa = 1;
|
|
1772
1772
|
const ga = () => class {
|
|
@@ -1779,52 +1779,52 @@ const ga = () => class {
|
|
|
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
1785
|
if (r === rn)
|
|
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] = rn), !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);
|
|
@@ -1870,7 +1870,7 @@ new Ir();
|
|
|
1870
1870
|
function ya(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 = xa(e)) || t) {
|
|
1874
1874
|
r && (e = r);
|
|
1875
1875
|
var n = 0;
|
|
1876
1876
|
return function() {
|
|
@@ -1880,7 +1880,7 @@ function ya(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 xa(e, t) {
|
|
1884
1884
|
if (e) {
|
|
1885
1885
|
if (typeof e == "string") return an(e, t);
|
|
1886
1886
|
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
@@ -1911,7 +1911,7 @@ var Pr = function() {
|
|
|
1911
1911
|
return Tr(e) ? Symbol[e] : "@@" + e;
|
|
1912
1912
|
};
|
|
1913
1913
|
Pr() && !Tr("observable") && (Symbol.observable = Symbol("observable"));
|
|
1914
|
-
var
|
|
1914
|
+
var ba = Er("iterator"), yr = Er("observable"), Vn = Er("species");
|
|
1915
1915
|
function Zt(e, t) {
|
|
1916
1916
|
var r = e[t];
|
|
1917
1917
|
if (r != null) {
|
|
@@ -1921,10 +1921,10 @@ function Zt(e, t) {
|
|
|
1921
1921
|
}
|
|
1922
1922
|
function It(e) {
|
|
1923
1923
|
var t = e.constructor;
|
|
1924
|
-
return t !== void 0 && (t = t[
|
|
1924
|
+
return t !== void 0 && (t = t[Vn], t === null && (t = void 0)), t !== void 0 ? t : pe;
|
|
1925
1925
|
}
|
|
1926
1926
|
function va(e) {
|
|
1927
|
-
return e instanceof
|
|
1927
|
+
return e instanceof pe;
|
|
1928
1928
|
}
|
|
1929
1929
|
function wt(e) {
|
|
1930
1930
|
wt.log ? wt.log(e) : setTimeout(function() {
|
|
@@ -1940,7 +1940,7 @@ function Ht(e) {
|
|
|
1940
1940
|
}
|
|
1941
1941
|
});
|
|
1942
1942
|
}
|
|
1943
|
-
function
|
|
1943
|
+
function Yn(e) {
|
|
1944
1944
|
var t = e._cleanup;
|
|
1945
1945
|
if (t !== void 0 && (e._cleanup = void 0, !!t))
|
|
1946
1946
|
try {
|
|
@@ -1954,7 +1954,7 @@ function Vn(e) {
|
|
|
1954
1954
|
wt(n);
|
|
1955
1955
|
}
|
|
1956
1956
|
}
|
|
1957
|
-
function
|
|
1957
|
+
function xr(e) {
|
|
1958
1958
|
e._observer = void 0, e._queue = void 0, e._state = "closed";
|
|
1959
1959
|
}
|
|
1960
1960
|
function ka(e) {
|
|
@@ -1975,17 +1975,17 @@ function Jn(e, t, r) {
|
|
|
1975
1975
|
o && o.call(n, r);
|
|
1976
1976
|
break;
|
|
1977
1977
|
case "error":
|
|
1978
|
-
if (
|
|
1978
|
+
if (xr(e), o) o.call(n, r);
|
|
1979
1979
|
else throw r;
|
|
1980
1980
|
break;
|
|
1981
1981
|
case "complete":
|
|
1982
|
-
|
|
1982
|
+
xr(e), o && o.call(n);
|
|
1983
1983
|
break;
|
|
1984
1984
|
}
|
|
1985
1985
|
} catch (s) {
|
|
1986
1986
|
wt(s);
|
|
1987
1987
|
}
|
|
1988
|
-
e._state === "closed" ?
|
|
1988
|
+
e._state === "closed" ? Yn(e) : e._state === "running" && (e._state = "ready");
|
|
1989
1989
|
}
|
|
1990
1990
|
function cr(e, t, r) {
|
|
1991
1991
|
if (e._state !== "closed") {
|
|
@@ -2021,7 +2021,7 @@ var Na = /* @__PURE__ */ (function() {
|
|
|
2021
2021
|
}
|
|
2022
2022
|
var t = e.prototype;
|
|
2023
2023
|
return t.unsubscribe = function() {
|
|
2024
|
-
this._state !== "closed" && (
|
|
2024
|
+
this._state !== "closed" && (xr(this), Yn(this));
|
|
2025
2025
|
}, Fr(e, [{
|
|
2026
2026
|
key: "closed",
|
|
2027
2027
|
get: function() {
|
|
@@ -2045,7 +2045,7 @@ var Na = /* @__PURE__ */ (function() {
|
|
|
2045
2045
|
return this._subscription._state === "closed";
|
|
2046
2046
|
}
|
|
2047
2047
|
}]), e;
|
|
2048
|
-
})(),
|
|
2048
|
+
})(), pe = /* @__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");
|
|
@@ -2130,19 +2130,19 @@ var Na = /* @__PURE__ */ (function() {
|
|
|
2130
2130
|
var s = It(this), i = arguments.length > 1, d = !1, l = arguments[1], p = l;
|
|
2131
2131
|
return new s(function(g) {
|
|
2132
2132
|
return o.subscribe({
|
|
2133
|
-
next: function(
|
|
2134
|
-
var
|
|
2135
|
-
if (d = !0, !
|
|
2133
|
+
next: function(b) {
|
|
2134
|
+
var x = !d;
|
|
2135
|
+
if (d = !0, !x || i)
|
|
2136
2136
|
try {
|
|
2137
|
-
p = n(p,
|
|
2137
|
+
p = n(p, b);
|
|
2138
2138
|
} catch (_) {
|
|
2139
2139
|
return g.error(_);
|
|
2140
2140
|
}
|
|
2141
2141
|
else
|
|
2142
|
-
p =
|
|
2142
|
+
p = b;
|
|
2143
2143
|
},
|
|
2144
|
-
error: function(
|
|
2145
|
-
g.error(
|
|
2144
|
+
error: function(b) {
|
|
2145
|
+
g.error(b);
|
|
2146
2146
|
},
|
|
2147
2147
|
complete: function() {
|
|
2148
2148
|
if (!d && !i) return g.error(new TypeError("Cannot reduce an empty sequence"));
|
|
@@ -2156,8 +2156,8 @@ var Na = /* @__PURE__ */ (function() {
|
|
|
2156
2156
|
var d = It(this);
|
|
2157
2157
|
return new d(function(l) {
|
|
2158
2158
|
var p, g = 0;
|
|
2159
|
-
function x
|
|
2160
|
-
p =
|
|
2159
|
+
function b(x) {
|
|
2160
|
+
p = x.subscribe({
|
|
2161
2161
|
next: function(_) {
|
|
2162
2162
|
l.next(_);
|
|
2163
2163
|
},
|
|
@@ -2165,11 +2165,11 @@ var Na = /* @__PURE__ */ (function() {
|
|
|
2165
2165
|
l.error(_);
|
|
2166
2166
|
},
|
|
2167
2167
|
complete: function() {
|
|
2168
|
-
g === s.length ? (p = void 0, l.complete()) :
|
|
2168
|
+
g === s.length ? (p = void 0, l.complete()) : b(d.from(s[g++]));
|
|
2169
2169
|
}
|
|
2170
2170
|
});
|
|
2171
2171
|
}
|
|
2172
|
-
return
|
|
2172
|
+
return b(n), function() {
|
|
2173
2173
|
p && (p.unsubscribe(), p = void 0);
|
|
2174
2174
|
};
|
|
2175
2175
|
});
|
|
@@ -2183,22 +2183,22 @@ var Na = /* @__PURE__ */ (function() {
|
|
|
2183
2183
|
if (n)
|
|
2184
2184
|
try {
|
|
2185
2185
|
g = n(g);
|
|
2186
|
-
} catch (
|
|
2187
|
-
return i.error(
|
|
2186
|
+
} catch (x) {
|
|
2187
|
+
return i.error(x);
|
|
2188
2188
|
}
|
|
2189
|
-
var
|
|
2190
|
-
next: function(
|
|
2191
|
-
i.next(
|
|
2189
|
+
var b = s.from(g).subscribe({
|
|
2190
|
+
next: function(x) {
|
|
2191
|
+
i.next(x);
|
|
2192
2192
|
},
|
|
2193
|
-
error: function(
|
|
2194
|
-
i.error(
|
|
2193
|
+
error: function(x) {
|
|
2194
|
+
i.error(x);
|
|
2195
2195
|
},
|
|
2196
2196
|
complete: function() {
|
|
2197
|
-
var
|
|
2198
|
-
|
|
2197
|
+
var x = d.indexOf(b);
|
|
2198
|
+
x >= 0 && d.splice(x, 1), p();
|
|
2199
2199
|
}
|
|
2200
2200
|
});
|
|
2201
|
-
d.push(
|
|
2201
|
+
d.push(b);
|
|
2202
2202
|
},
|
|
2203
2203
|
error: function(g) {
|
|
2204
2204
|
i.error(g);
|
|
@@ -2229,7 +2229,7 @@ var Na = /* @__PURE__ */ (function() {
|
|
|
2229
2229
|
return i.subscribe(d);
|
|
2230
2230
|
});
|
|
2231
2231
|
}
|
|
2232
|
-
if (Tr("iterator") && (s = Zt(n,
|
|
2232
|
+
if (Tr("iterator") && (s = Zt(n, ba), s))
|
|
2233
2233
|
return new o(function(d) {
|
|
2234
2234
|
Ht(function() {
|
|
2235
2235
|
if (!d.closed) {
|
|
@@ -2266,13 +2266,13 @@ var Na = /* @__PURE__ */ (function() {
|
|
|
2266
2266
|
});
|
|
2267
2267
|
});
|
|
2268
2268
|
}, Fr(e, null, [{
|
|
2269
|
-
key:
|
|
2269
|
+
key: Vn,
|
|
2270
2270
|
get: function() {
|
|
2271
2271
|
return this;
|
|
2272
2272
|
}
|
|
2273
2273
|
}]), e;
|
|
2274
2274
|
})();
|
|
2275
|
-
Pr() && Object.defineProperty(
|
|
2275
|
+
Pr() && Object.defineProperty(pe, Symbol("extensions"), {
|
|
2276
2276
|
value: {
|
|
2277
2277
|
symbol: yr,
|
|
2278
2278
|
hostReportError: wt
|
|
@@ -2298,7 +2298,7 @@ function Ca(e) {
|
|
|
2298
2298
|
var gt;
|
|
2299
2299
|
typeof self < "u" ? gt = self : typeof window < "u" ? gt = window : typeof global < "u" ? gt = global : typeof module < "u" ? gt = module : gt = Function("return this")();
|
|
2300
2300
|
Ca(gt);
|
|
2301
|
-
var ln =
|
|
2301
|
+
var ln = pe.prototype, cn = "@@observable";
|
|
2302
2302
|
ln[cn] || (ln[cn] = function() {
|
|
2303
2303
|
return this;
|
|
2304
2304
|
});
|
|
@@ -2317,10 +2317,10 @@ function _a(e) {
|
|
|
2317
2317
|
return e;
|
|
2318
2318
|
}
|
|
2319
2319
|
function Ia(e, t) {
|
|
2320
|
-
var r =
|
|
2321
|
-
typeof s == "function" ? r =
|
|
2320
|
+
var r = et({}, e), n = function(s) {
|
|
2321
|
+
typeof s == "function" ? r = et(et({}, r), s(r)) : r = et(et({}, r), s);
|
|
2322
2322
|
}, o = function() {
|
|
2323
|
-
return
|
|
2323
|
+
return et({}, r);
|
|
2324
2324
|
};
|
|
2325
2325
|
return Object.defineProperty(t, "setContext", {
|
|
2326
2326
|
enumerable: !1,
|
|
@@ -2347,7 +2347,7 @@ function Aa(e, t) {
|
|
|
2347
2347
|
Oa(e) || t();
|
|
2348
2348
|
}
|
|
2349
2349
|
function dn(e, t) {
|
|
2350
|
-
return t ? t(e) :
|
|
2350
|
+
return t ? t(e) : pe.of();
|
|
2351
2351
|
}
|
|
2352
2352
|
function Ft(e) {
|
|
2353
2353
|
return typeof e == "function" ? new Kn(e) : e;
|
|
@@ -2363,7 +2363,7 @@ var Kn = (
|
|
|
2363
2363
|
}
|
|
2364
2364
|
return e.empty = function() {
|
|
2365
2365
|
return new e(function() {
|
|
2366
|
-
return
|
|
2366
|
+
return pe.of();
|
|
2367
2367
|
});
|
|
2368
2368
|
}, e.from = function(t) {
|
|
2369
2369
|
return t.length === 0 ? e.empty() : t.map(Ft).reduce(function(r, n) {
|
|
@@ -2372,12 +2372,12 @@ var Kn = (
|
|
|
2372
2372
|
}, e.split = function(t, r, n) {
|
|
2373
2373
|
var o = Ft(r), s = Ft(n || new e(dn)), i;
|
|
2374
2374
|
return Rt(o) && Rt(s) ? i = new e(function(d) {
|
|
2375
|
-
return t(d) ? o.request(d) ||
|
|
2375
|
+
return t(d) ? o.request(d) || pe.of() : s.request(d) || pe.of();
|
|
2376
2376
|
}) : i = new e(function(d, l) {
|
|
2377
|
-
return t(d) ? o.request(d, l) ||
|
|
2377
|
+
return t(d) ? o.request(d, l) || pe.of() : s.request(d, l) || pe.of();
|
|
2378
2378
|
}), Object.assign(i, { left: o, right: s });
|
|
2379
2379
|
}, e.execute = function(t, r) {
|
|
2380
|
-
return t.request(Ia(r.context, Fa(_a(r)))) ||
|
|
2380
|
+
return t.request(Ia(r.context, Fa(_a(r)))) || pe.of();
|
|
2381
2381
|
}, e.concat = function(t, r) {
|
|
2382
2382
|
var n = Ft(t);
|
|
2383
2383
|
if (Rt(n))
|
|
@@ -2385,12 +2385,12 @@ var Kn = (
|
|
|
2385
2385
|
var o = Ft(r), s;
|
|
2386
2386
|
return Rt(o) ? s = new e(function(i) {
|
|
2387
2387
|
return n.request(i, function(d) {
|
|
2388
|
-
return o.request(d) ||
|
|
2389
|
-
}) ||
|
|
2388
|
+
return o.request(d) || pe.of();
|
|
2389
|
+
}) || pe.of();
|
|
2390
2390
|
}) : s = new e(function(i, d) {
|
|
2391
2391
|
return n.request(i, function(l) {
|
|
2392
|
-
return o.request(l, d) ||
|
|
2393
|
-
}) ||
|
|
2392
|
+
return o.request(l, d) || pe.of();
|
|
2393
|
+
}) || pe.of();
|
|
2394
2394
|
}), Object.assign(s, { left: n, right: o });
|
|
2395
2395
|
}, e.prototype.split = function(t, r, n) {
|
|
2396
2396
|
return this.concat(e.split(t, r, n || new e(dn)));
|
|
@@ -2412,7 +2412,7 @@ var Kn = (
|
|
|
2412
2412
|
function ja(e) {
|
|
2413
2413
|
return new Kn(function(t, r) {
|
|
2414
2414
|
var n = ca(t, []);
|
|
2415
|
-
return new
|
|
2415
|
+
return new pe(function(o) {
|
|
2416
2416
|
var s, i = !1;
|
|
2417
2417
|
return Promise.resolve(n).then(function(d) {
|
|
2418
2418
|
return e(d, t.getContext());
|
|
@@ -2431,7 +2431,7 @@ function ja(e) {
|
|
|
2431
2431
|
const $a = 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,7 +2444,7 @@ const $a = 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
2449
|
}, La = "https://api.australia-southeast1.gcp.commercetools.com/kt-demo/graphql", Da = $o({
|
|
2450
2450
|
uri: `${La}`
|
|
@@ -2493,7 +2493,7 @@ const Wn = Object.freeze({
|
|
|
2493
2493
|
}), Or = Object.freeze({
|
|
2494
2494
|
...Wn,
|
|
2495
2495
|
...er
|
|
2496
|
-
}),
|
|
2496
|
+
}), br = Object.freeze({
|
|
2497
2497
|
...Or,
|
|
2498
2498
|
body: "",
|
|
2499
2499
|
hidden: !1
|
|
@@ -2506,7 +2506,7 @@ function Ua(e, t) {
|
|
|
2506
2506
|
}
|
|
2507
2507
|
function un(e, t) {
|
|
2508
2508
|
const r = Ua(e, t);
|
|
2509
|
-
for (const n in
|
|
2509
|
+
for (const n in br) n in er ? n in e && !(n in r) && (r[n] = er[n]) : n in t ? r[n] = t[n] : n in e && (r[n] = e[n]);
|
|
2510
2510
|
return r;
|
|
2511
2511
|
}
|
|
2512
2512
|
function qa(e, t, r) {
|
|
@@ -2547,12 +2547,12 @@ function Qn(e) {
|
|
|
2547
2547
|
const r = t.icons;
|
|
2548
2548
|
for (const o in r) {
|
|
2549
2549
|
const s = r[o];
|
|
2550
|
-
if (!o || typeof s.body != "string" || !dr(s,
|
|
2550
|
+
if (!o || typeof s.body != "string" || !dr(s, br)) return null;
|
|
2551
2551
|
}
|
|
2552
2552
|
const n = t.aliases || /* @__PURE__ */ Object.create(null);
|
|
2553
2553
|
for (const o in n) {
|
|
2554
2554
|
const s = n[o], i = s.parent;
|
|
2555
|
-
if (!o || typeof i != "string" || !r[i] && !n[i] || !dr(s,
|
|
2555
|
+
if (!o || typeof i != "string" || !r[i] && !n[i] || !dr(s, br)) return null;
|
|
2556
2556
|
}
|
|
2557
2557
|
return t;
|
|
2558
2558
|
}
|
|
@@ -2574,7 +2574,7 @@ function Xn(e, t) {
|
|
|
2574
2574
|
n ? e.icons[r] = n : e.missing.add(r);
|
|
2575
2575
|
}) : [];
|
|
2576
2576
|
}
|
|
2577
|
-
function
|
|
2577
|
+
function Va(e, t, r) {
|
|
2578
2578
|
try {
|
|
2579
2579
|
if (typeof r.body == "string")
|
|
2580
2580
|
return e.icons[t] = { ...r }, !0;
|
|
@@ -2595,7 +2595,7 @@ const Zn = /^[a-z0-9]+(-[a-z0-9]+)*$/, tr = (e, t, r, n = "") => {
|
|
|
2595
2595
|
prefix: l,
|
|
2596
2596
|
name: d
|
|
2597
2597
|
};
|
|
2598
|
-
return t && !
|
|
2598
|
+
return t && !Vt(p) ? null : p;
|
|
2599
2599
|
}
|
|
2600
2600
|
const s = o[0], i = s.split("-");
|
|
2601
2601
|
if (i.length > 1) {
|
|
@@ -2604,7 +2604,7 @@ const Zn = /^[a-z0-9]+(-[a-z0-9]+)*$/, tr = (e, t, r, n = "") => {
|
|
|
2604
2604
|
prefix: i.shift(),
|
|
2605
2605
|
name: i.join("-")
|
|
2606
2606
|
};
|
|
2607
|
-
return t && !
|
|
2607
|
+
return t && !Vt(d) ? null : d;
|
|
2608
2608
|
}
|
|
2609
2609
|
if (r && n === "") {
|
|
2610
2610
|
const d = {
|
|
@@ -2612,10 +2612,10 @@ const Zn = /^[a-z0-9]+(-[a-z0-9]+)*$/, tr = (e, t, r, n = "") => {
|
|
|
2612
2612
|
prefix: "",
|
|
2613
2613
|
name: s
|
|
2614
2614
|
};
|
|
2615
|
-
return t && !
|
|
2615
|
+
return t && !Vt(d, r) ? null : d;
|
|
2616
2616
|
}
|
|
2617
2617
|
return null;
|
|
2618
|
-
},
|
|
2618
|
+
}, Vt = (e, t) => e ? !!((t && e.prefix === "" || e.prefix) && e.name) : !1;
|
|
2619
2619
|
let At = !1;
|
|
2620
2620
|
function eo(e) {
|
|
2621
2621
|
return typeof e == "boolean" && (At = e), At;
|
|
@@ -2627,22 +2627,22 @@ function mn(e) {
|
|
|
2627
2627
|
return r.icons[n] || (r.missing.has(n) ? null : void 0);
|
|
2628
2628
|
}
|
|
2629
2629
|
}
|
|
2630
|
-
function
|
|
2630
|
+
function Ya(e, t) {
|
|
2631
2631
|
const r = tr(e, !0, At);
|
|
2632
2632
|
if (!r) return !1;
|
|
2633
2633
|
const n = yt(r.provider, r.prefix);
|
|
2634
|
-
return t ?
|
|
2634
|
+
return t ? Va(n, r.name, t) : (n.missing.add(r.name), !0);
|
|
2635
2635
|
}
|
|
2636
2636
|
function Ja(e, t) {
|
|
2637
2637
|
if (typeof e != "object") return !1;
|
|
2638
2638
|
if (typeof t != "string" && (t = e.provider || ""), At && !t && !e.prefix) {
|
|
2639
2639
|
let o = !1;
|
|
2640
2640
|
return Qn(e) && (e.prefix = "", Gn(e, (s, i) => {
|
|
2641
|
-
|
|
2641
|
+
Ya(s, i) && (o = !0);
|
|
2642
2642
|
})), o;
|
|
2643
2643
|
}
|
|
2644
2644
|
const r = e.prefix;
|
|
2645
|
-
if (!
|
|
2645
|
+
if (!Vt({
|
|
2646
2646
|
prefix: r,
|
|
2647
2647
|
name: "a"
|
|
2648
2648
|
})) return !1;
|
|
@@ -2710,12 +2710,12 @@ function es(e, t) {
|
|
|
2710
2710
|
height: r.height
|
|
2711
2711
|
};
|
|
2712
2712
|
let s = r.body;
|
|
2713
|
-
[r, n].forEach((
|
|
2714
|
-
const k = [], I =
|
|
2715
|
-
let
|
|
2716
|
-
I ?
|
|
2713
|
+
[r, n].forEach((P) => {
|
|
2714
|
+
const k = [], I = P.hFlip, J = P.vFlip;
|
|
2715
|
+
let B = P.rotate;
|
|
2716
|
+
I ? J ? B += 2 : (k.push("translate(" + (o.width + o.left).toString() + " " + (0 - o.top).toString() + ")"), k.push("scale(-1 1)"), o.top = o.left = 0) : J && (k.push("translate(" + (0 - o.left).toString() + " " + (o.height + o.top).toString() + ")"), k.push("scale(1 -1)"), o.top = o.left = 0);
|
|
2717
2717
|
let w;
|
|
2718
|
-
switch (
|
|
2718
|
+
switch (B < 0 && (B -= Math.floor(B / 4) * 4), B = B % 4, B) {
|
|
2719
2719
|
case 1:
|
|
2720
2720
|
w = o.height / 2 + o.top, k.unshift("rotate(90 " + w.toString() + " " + w.toString() + ")");
|
|
2721
2721
|
break;
|
|
@@ -2726,23 +2726,23 @@ function es(e, t) {
|
|
|
2726
2726
|
w = o.width / 2 + o.left, k.unshift("rotate(-90 " + w.toString() + " " + w.toString() + ")");
|
|
2727
2727
|
break;
|
|
2728
2728
|
}
|
|
2729
|
-
|
|
2729
|
+
B % 2 === 1 && (o.left !== o.top && (w = o.left, o.left = o.top, o.top = w), o.width !== o.height && (w = o.width, o.width = o.height, o.height = w)), k.length && (s = Xa(s, '<g transform="' + k.join(" ") + '">', "</g>"));
|
|
2730
2730
|
});
|
|
2731
2731
|
const i = n.width, d = n.height, l = o.width, p = o.height;
|
|
2732
|
-
let g,
|
|
2733
|
-
i === null ? (
|
|
2734
|
-
const
|
|
2735
|
-
Za(k) || (
|
|
2732
|
+
let g, b;
|
|
2733
|
+
i === null ? (b = d === null ? "1em" : d === "auto" ? p : d, g = hn(b, l / p)) : (g = i === "auto" ? l : i, b = d === null ? hn(g, p / l) : d === "auto" ? p : d);
|
|
2734
|
+
const x = {}, _ = (P, k) => {
|
|
2735
|
+
Za(k) || (x[P] = k.toString());
|
|
2736
2736
|
};
|
|
2737
|
-
_("width", g), _("height",
|
|
2737
|
+
_("width", g), _("height", b);
|
|
2738
2738
|
const S = [
|
|
2739
2739
|
o.left,
|
|
2740
2740
|
o.top,
|
|
2741
2741
|
l,
|
|
2742
2742
|
p
|
|
2743
2743
|
];
|
|
2744
|
-
return
|
|
2745
|
-
attributes:
|
|
2744
|
+
return x.viewBox = S.join(" "), {
|
|
2745
|
+
attributes: x,
|
|
2746
2746
|
viewBox: S,
|
|
2747
2747
|
body: s
|
|
2748
2748
|
};
|
|
@@ -2782,9 +2782,9 @@ function Ar(e) {
|
|
|
2782
2782
|
dataAfterTimeout: e.dataAfterTimeout !== !1
|
|
2783
2783
|
};
|
|
2784
2784
|
}
|
|
2785
|
-
const jr = /* @__PURE__ */ Object.create(null), Pt = ["https://api.simplesvg.com", "https://api.unisvg.com"],
|
|
2786
|
-
for (; Pt.length > 0; ) Pt.length === 1 || Math.random() > 0.5 ?
|
|
2787
|
-
jr[""] = Ar({ resources: ["https://api.iconify.design"].concat(
|
|
2785
|
+
const jr = /* @__PURE__ */ Object.create(null), Pt = ["https://api.simplesvg.com", "https://api.unisvg.com"], Yt = [];
|
|
2786
|
+
for (; Pt.length > 0; ) Pt.length === 1 || Math.random() > 0.5 ? Yt.push(Pt.shift()) : Yt.push(Pt.pop());
|
|
2787
|
+
jr[""] = Ar({ resources: ["https://api.iconify.design"].concat(Yt) });
|
|
2788
2788
|
function ss(e, t) {
|
|
2789
2789
|
const r = Ar(t);
|
|
2790
2790
|
return r === null ? !1 : (jr[e] = r, !0);
|
|
@@ -2957,12 +2957,12 @@ function ws(e) {
|
|
|
2957
2957
|
const s = o.provider, i = o.prefix, d = o.name, l = r[s] || (r[s] = /* @__PURE__ */ Object.create(null)), p = l[i] || (l[i] = yt(s, i));
|
|
2958
2958
|
let g;
|
|
2959
2959
|
d in p.icons ? g = t.loaded : i === "" || p.missing.has(d) ? g = t.missing : g = t.pending;
|
|
2960
|
-
const
|
|
2960
|
+
const b = {
|
|
2961
2961
|
provider: s,
|
|
2962
2962
|
prefix: i,
|
|
2963
2963
|
name: d
|
|
2964
2964
|
};
|
|
2965
|
-
g.push(
|
|
2965
|
+
g.push(b);
|
|
2966
2966
|
}), t;
|
|
2967
2967
|
}
|
|
2968
2968
|
function ys(e, t = !0, r = !1) {
|
|
@@ -2972,7 +2972,7 @@ function ys(e, t = !0, r = !1) {
|
|
|
2972
2972
|
s && n.push(s);
|
|
2973
2973
|
}), n;
|
|
2974
2974
|
}
|
|
2975
|
-
const
|
|
2975
|
+
const xs = {
|
|
2976
2976
|
resources: [],
|
|
2977
2977
|
index: 0,
|
|
2978
2978
|
timeout: 2e3,
|
|
@@ -2980,30 +2980,30 @@ const bs = {
|
|
|
2980
2980
|
random: !1,
|
|
2981
2981
|
dataAfterTimeout: !1
|
|
2982
2982
|
};
|
|
2983
|
-
function
|
|
2983
|
+
function bs(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
|
-
let
|
|
2988
|
-
for (i = [];
|
|
2989
|
-
const
|
|
2990
|
-
i.push(
|
|
2987
|
+
let T = e.resources.slice(0);
|
|
2988
|
+
for (i = []; T.length > 1; ) {
|
|
2989
|
+
const K = Math.floor(Math.random() * T.length);
|
|
2990
|
+
i.push(T[K]), T = T.slice(0, K).concat(T.slice(K + 1));
|
|
2991
2991
|
}
|
|
2992
|
-
i = i.concat(
|
|
2992
|
+
i = i.concat(T);
|
|
2993
2993
|
} else i = e.resources.slice(s).concat(e.resources.slice(0, s));
|
|
2994
2994
|
const d = Date.now();
|
|
2995
|
-
let l = "pending", p = 0, g,
|
|
2995
|
+
let l = "pending", p = 0, g, b = null, x = [], _ = [];
|
|
2996
2996
|
typeof n == "function" && _.push(n);
|
|
2997
2997
|
function S() {
|
|
2998
|
-
|
|
2998
|
+
b && (clearTimeout(b), b = null);
|
|
2999
2999
|
}
|
|
3000
|
-
function
|
|
3001
|
-
l === "pending" && (l = "aborted"), S(),
|
|
3002
|
-
|
|
3003
|
-
}),
|
|
3000
|
+
function P() {
|
|
3001
|
+
l === "pending" && (l = "aborted"), S(), x.forEach((T) => {
|
|
3002
|
+
T.status === "pending" && (T.status = "aborted");
|
|
3003
|
+
}), x = [];
|
|
3004
3004
|
}
|
|
3005
|
-
function k(
|
|
3006
|
-
|
|
3005
|
+
function k(T, K) {
|
|
3006
|
+
K && (_ = []), typeof T == "function" && _.push(T);
|
|
3007
3007
|
}
|
|
3008
3008
|
function I() {
|
|
3009
3009
|
return {
|
|
@@ -3011,76 +3011,76 @@ function xs(e, t, r, n) {
|
|
|
3011
3011
|
payload: t,
|
|
3012
3012
|
status: l,
|
|
3013
3013
|
queriesSent: p,
|
|
3014
|
-
queriesPending:
|
|
3014
|
+
queriesPending: x.length,
|
|
3015
3015
|
subscribe: k,
|
|
3016
|
-
abort:
|
|
3016
|
+
abort: P
|
|
3017
3017
|
};
|
|
3018
3018
|
}
|
|
3019
|
-
function
|
|
3020
|
-
l = "failed", _.forEach((
|
|
3021
|
-
|
|
3019
|
+
function J() {
|
|
3020
|
+
l = "failed", _.forEach((T) => {
|
|
3021
|
+
T(void 0, g);
|
|
3022
3022
|
});
|
|
3023
3023
|
}
|
|
3024
|
-
function
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
}),
|
|
3024
|
+
function B() {
|
|
3025
|
+
x.forEach((T) => {
|
|
3026
|
+
T.status === "pending" && (T.status = "aborted");
|
|
3027
|
+
}), x = [];
|
|
3028
3028
|
}
|
|
3029
|
-
function w(
|
|
3030
|
-
const
|
|
3031
|
-
switch (
|
|
3029
|
+
function w(T, K, ue) {
|
|
3030
|
+
const be = K !== "success";
|
|
3031
|
+
switch (x = x.filter((re) => re !== T), l) {
|
|
3032
3032
|
case "pending":
|
|
3033
3033
|
break;
|
|
3034
3034
|
case "failed":
|
|
3035
|
-
if (
|
|
3035
|
+
if (be || !e.dataAfterTimeout) return;
|
|
3036
3036
|
break;
|
|
3037
3037
|
default:
|
|
3038
3038
|
return;
|
|
3039
3039
|
}
|
|
3040
|
-
if (
|
|
3041
|
-
g =
|
|
3040
|
+
if (K === "abort") {
|
|
3041
|
+
g = ue, J();
|
|
3042
3042
|
return;
|
|
3043
3043
|
}
|
|
3044
|
-
if (
|
|
3045
|
-
g =
|
|
3044
|
+
if (be) {
|
|
3045
|
+
g = ue, x.length || (i.length ? Pe() : J());
|
|
3046
3046
|
return;
|
|
3047
3047
|
}
|
|
3048
|
-
if (S(),
|
|
3049
|
-
const
|
|
3050
|
-
|
|
3048
|
+
if (S(), B(), !e.random) {
|
|
3049
|
+
const re = e.resources.indexOf(T.resource);
|
|
3050
|
+
re !== -1 && re !== e.index && (e.index = re);
|
|
3051
3051
|
}
|
|
3052
|
-
l = "completed", _.forEach((
|
|
3053
|
-
|
|
3052
|
+
l = "completed", _.forEach((re) => {
|
|
3053
|
+
re(ue);
|
|
3054
3054
|
});
|
|
3055
3055
|
}
|
|
3056
|
-
function
|
|
3056
|
+
function Pe() {
|
|
3057
3057
|
if (l !== "pending") return;
|
|
3058
3058
|
S();
|
|
3059
|
-
const
|
|
3060
|
-
if (
|
|
3061
|
-
if (
|
|
3062
|
-
|
|
3063
|
-
S(), l === "pending" && (
|
|
3059
|
+
const T = i.shift();
|
|
3060
|
+
if (T === void 0) {
|
|
3061
|
+
if (x.length) {
|
|
3062
|
+
b = setTimeout(() => {
|
|
3063
|
+
S(), l === "pending" && (B(), J());
|
|
3064
3064
|
}, e.timeout);
|
|
3065
3065
|
return;
|
|
3066
3066
|
}
|
|
3067
|
-
|
|
3067
|
+
J();
|
|
3068
3068
|
return;
|
|
3069
3069
|
}
|
|
3070
|
-
const
|
|
3070
|
+
const K = {
|
|
3071
3071
|
status: "pending",
|
|
3072
|
-
resource:
|
|
3073
|
-
callback: (
|
|
3074
|
-
w(
|
|
3072
|
+
resource: T,
|
|
3073
|
+
callback: (ue, be) => {
|
|
3074
|
+
w(K, ue, be);
|
|
3075
3075
|
}
|
|
3076
3076
|
};
|
|
3077
|
-
|
|
3077
|
+
x.push(K), p++, b = setTimeout(Pe, e.rotate), r(T, t, K.callback);
|
|
3078
3078
|
}
|
|
3079
|
-
return setTimeout(
|
|
3079
|
+
return setTimeout(Pe), I;
|
|
3080
3080
|
}
|
|
3081
3081
|
function oo(e) {
|
|
3082
3082
|
const t = {
|
|
3083
|
-
...
|
|
3083
|
+
...xs,
|
|
3084
3084
|
...e
|
|
3085
3085
|
};
|
|
3086
3086
|
let r = [];
|
|
@@ -3088,8 +3088,8 @@ function oo(e) {
|
|
|
3088
3088
|
r = r.filter((d) => d().status === "pending");
|
|
3089
3089
|
}
|
|
3090
3090
|
function o(d, l, p) {
|
|
3091
|
-
const g =
|
|
3092
|
-
n(), p && p(
|
|
3091
|
+
const g = bs(t, d, l, (b, x) => {
|
|
3092
|
+
n(), p && p(b, x);
|
|
3093
3093
|
});
|
|
3094
3094
|
return r.push(g), g;
|
|
3095
3095
|
}
|
|
@@ -3194,11 +3194,11 @@ function Cs(e, t) {
|
|
|
3194
3194
|
}
|
|
3195
3195
|
if (s) {
|
|
3196
3196
|
o.forEach((g) => {
|
|
3197
|
-
const
|
|
3198
|
-
yn(
|
|
3199
|
-
const _ =
|
|
3197
|
+
const b = s(g, n, r);
|
|
3198
|
+
yn(b, (x) => {
|
|
3199
|
+
const _ = x ? {
|
|
3200
3200
|
prefix: n,
|
|
3201
|
-
icons: { [g]:
|
|
3201
|
+
icons: { [g]: x }
|
|
3202
3202
|
} : null;
|
|
3203
3203
|
Tt(e, [g], _);
|
|
3204
3204
|
});
|
|
@@ -3213,8 +3213,8 @@ function Cs(e, t) {
|
|
|
3213
3213
|
return;
|
|
3214
3214
|
}
|
|
3215
3215
|
l.prepare(r, n, i).forEach((g) => {
|
|
3216
|
-
ks(r, g, (
|
|
3217
|
-
Tt(e, g.icons,
|
|
3216
|
+
ks(r, g, (b) => {
|
|
3217
|
+
Tt(e, g.icons, b);
|
|
3218
3218
|
});
|
|
3219
3219
|
});
|
|
3220
3220
|
}));
|
|
@@ -3235,11 +3235,11 @@ const _s = (e, t) => {
|
|
|
3235
3235
|
const { provider: p, prefix: g } = l;
|
|
3236
3236
|
if (g === d && p === i) return;
|
|
3237
3237
|
i = p, d = g, s.push(yt(p, g));
|
|
3238
|
-
const
|
|
3239
|
-
|
|
3238
|
+
const b = o[p] || (o[p] = /* @__PURE__ */ Object.create(null));
|
|
3239
|
+
b[g] || (b[g] = []);
|
|
3240
3240
|
}), n.pending.forEach((l) => {
|
|
3241
|
-
const { provider: p, prefix: g, name:
|
|
3242
|
-
_.has(
|
|
3241
|
+
const { provider: p, prefix: g, name: b } = l, x = yt(p, g), _ = x.pendingIcons || (x.pendingIcons = /* @__PURE__ */ new Set());
|
|
3242
|
+
_.has(b) || (_.add(b), o[p][g].push(b));
|
|
3243
3243
|
}), s.forEach((l) => {
|
|
3244
3244
|
const p = o[l.provider][l.prefix];
|
|
3245
3245
|
p.length && Cs(l, p);
|
|
@@ -3330,19 +3330,19 @@ const ao = {
|
|
|
3330
3330
|
backgroundColor: "currentColor"
|
|
3331
3331
|
}, so = {
|
|
3332
3332
|
backgroundColor: "transparent"
|
|
3333
|
-
},
|
|
3333
|
+
}, xn = {
|
|
3334
3334
|
Image: "var(--svg)",
|
|
3335
3335
|
Repeat: "no-repeat",
|
|
3336
3336
|
Size: "100% 100%"
|
|
3337
|
-
},
|
|
3337
|
+
}, bn = {
|
|
3338
3338
|
WebkitMask: Nr,
|
|
3339
3339
|
mask: Nr,
|
|
3340
3340
|
background: so
|
|
3341
3341
|
};
|
|
3342
|
-
for (const e in
|
|
3343
|
-
const t =
|
|
3344
|
-
for (const r in
|
|
3345
|
-
t[e + r] =
|
|
3342
|
+
for (const e in bn) {
|
|
3343
|
+
const t = bn[e];
|
|
3344
|
+
for (const r in xn)
|
|
3345
|
+
t[e + r] = xn[r];
|
|
3346
3346
|
}
|
|
3347
3347
|
const Ms = {
|
|
3348
3348
|
...ao,
|
|
@@ -3358,12 +3358,12 @@ const Bs = (e, t, r) => {
|
|
|
3358
3358
|
if (r) {
|
|
3359
3359
|
const k = tr(r, !1, !0);
|
|
3360
3360
|
if (k) {
|
|
3361
|
-
const I = ["iconify"],
|
|
3361
|
+
const I = ["iconify"], J = [
|
|
3362
3362
|
"provider",
|
|
3363
3363
|
"prefix"
|
|
3364
3364
|
];
|
|
3365
|
-
for (const
|
|
3366
|
-
k[
|
|
3365
|
+
for (const B of J)
|
|
3366
|
+
k[B] && I.push("iconify--" + k[B]);
|
|
3367
3367
|
l.className = I.join(" ");
|
|
3368
3368
|
}
|
|
3369
3369
|
}
|
|
@@ -3427,14 +3427,14 @@ const Bs = (e, t, r) => {
|
|
|
3427
3427
|
__html: Ls(os(p.body, I ? () => I + "ID" + k++ : "iconifyReact"))
|
|
3428
3428
|
}, fr("svg", l);
|
|
3429
3429
|
}
|
|
3430
|
-
const { body:
|
|
3430
|
+
const { body: b, width: x, height: _ } = e, S = s === "mask" || (s === "bg" ? !1 : b.indexOf("currentColor") !== -1), P = Es(b, {
|
|
3431
3431
|
...g,
|
|
3432
|
-
width:
|
|
3432
|
+
width: x + "",
|
|
3433
3433
|
height: _ + ""
|
|
3434
3434
|
});
|
|
3435
3435
|
return l.style = {
|
|
3436
3436
|
...i,
|
|
3437
|
-
"--svg": js(
|
|
3437
|
+
"--svg": js(P),
|
|
3438
3438
|
width: vn(g.width),
|
|
3439
3439
|
height: vn(g.height),
|
|
3440
3440
|
...zs,
|
|
@@ -3485,11 +3485,11 @@ function io(e) {
|
|
|
3485
3485
|
name: "",
|
|
3486
3486
|
data: S
|
|
3487
3487
|
};
|
|
3488
|
-
const
|
|
3489
|
-
if (
|
|
3488
|
+
const P = mn(S);
|
|
3489
|
+
if (P)
|
|
3490
3490
|
return {
|
|
3491
3491
|
name: S,
|
|
3492
|
-
data:
|
|
3492
|
+
data: P
|
|
3493
3493
|
};
|
|
3494
3494
|
}
|
|
3495
3495
|
return {
|
|
@@ -3515,28 +3515,28 @@ function io(e) {
|
|
|
3515
3515
|
});
|
|
3516
3516
|
return;
|
|
3517
3517
|
}
|
|
3518
|
-
const
|
|
3518
|
+
const P = mn(S);
|
|
3519
3519
|
if (p({
|
|
3520
3520
|
name: S,
|
|
3521
|
-
data:
|
|
3521
|
+
data: P
|
|
3522
3522
|
}))
|
|
3523
|
-
if (
|
|
3523
|
+
if (P === void 0) {
|
|
3524
3524
|
const k = _s([S], g);
|
|
3525
3525
|
o({
|
|
3526
3526
|
callback: k
|
|
3527
3527
|
});
|
|
3528
|
-
} else
|
|
3528
|
+
} else P && ((_ = e.onLoad) === null || _ === void 0 || _.call(e, S));
|
|
3529
3529
|
}
|
|
3530
|
-
|
|
3530
|
+
Ne(() => (r(!0), l), []), Ne(() => {
|
|
3531
3531
|
t && g();
|
|
3532
3532
|
}, [e.icon, t]);
|
|
3533
|
-
const { name:
|
|
3534
|
-
return
|
|
3533
|
+
const { name: b, data: x } = i;
|
|
3534
|
+
return x ? Bs({
|
|
3535
3535
|
...Or,
|
|
3536
|
-
...
|
|
3537
|
-
}, e,
|
|
3536
|
+
...x
|
|
3537
|
+
}, e, b) : e.children ? e.children : e.fallback ? e.fallback : fr("span", {});
|
|
3538
3538
|
}
|
|
3539
|
-
const
|
|
3539
|
+
const ae = Pn((e, t) => io({
|
|
3540
3540
|
...e,
|
|
3541
3541
|
_ref: t
|
|
3542
3542
|
}));
|
|
@@ -3545,20 +3545,20 @@ Pn((e, t) => io({
|
|
|
3545
3545
|
...e,
|
|
3546
3546
|
_ref: t
|
|
3547
3547
|
}));
|
|
3548
|
-
const
|
|
3548
|
+
const Ve = "USD", kn = (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
|
-
}, Sr = (e, t =
|
|
3554
|
+
}, Sr = (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) => {
|
|
3558
3558
|
var p, g;
|
|
3559
|
-
const d = i.find((
|
|
3560
|
-
var
|
|
3561
|
-
return !!((
|
|
3559
|
+
const d = i.find((b) => {
|
|
3560
|
+
var x;
|
|
3561
|
+
return !!((x = b.discounted) != null && x.value);
|
|
3562
3562
|
});
|
|
3563
3563
|
if (d)
|
|
3564
3564
|
return {
|
|
@@ -3589,9 +3589,9 @@ const Je = "USD", kn = (e) => {
|
|
|
3589
3589
|
r && r.value && (t = typeof r.value == "object" ? r.value.label || "" : r.value);
|
|
3590
3590
|
}
|
|
3591
3591
|
return { sizeLabel: t };
|
|
3592
|
-
},
|
|
3592
|
+
}, Re = (e) => Us((e == null ? void 0 : e.attributesRaw) ?? [], "color"), Ze = (e) => qs((e == null ? void 0 : e.attributesRaw) ?? []).sizeLabel, ot = (e, t, r) => {
|
|
3593
3593
|
for (const n of e) {
|
|
3594
|
-
const o =
|
|
3594
|
+
const o = Re(n.variant), s = Ze(n.variant);
|
|
3595
3595
|
if ((t ? o === t : !0) && (r ? s === r : !0)) return n;
|
|
3596
3596
|
}
|
|
3597
3597
|
return null;
|
|
@@ -3608,7 +3608,7 @@ const Je = "USD", kn = (e) => {
|
|
|
3608
3608
|
onClick: s,
|
|
3609
3609
|
className: `
|
|
3610
3610
|
flex items-center justify-center border
|
|
3611
|
-
${r === "circle" ? "h-
|
|
3611
|
+
${r === "circle" ? "h-12 w-12 rounded-full" : "h-12 w-12 rounded-md"}
|
|
3612
3612
|
bg-white cursor-pointer relative
|
|
3613
3613
|
${o ? "border-black" : "border-gray-300 hover:border-gray-500"}
|
|
3614
3614
|
`,
|
|
@@ -3636,7 +3636,7 @@ const Je = "USD", kn = (e) => {
|
|
|
3636
3636
|
/* @__PURE__ */ a("span", { className: "font-normal text-gray-700", children: t || "" })
|
|
3637
3637
|
] }),
|
|
3638
3638
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-3 flex-wrap", children: n })
|
|
3639
|
-
] }),
|
|
3639
|
+
] }), Xe = (e) => e.charAt(0).toUpperCase() + e.slice(1), at = {
|
|
3640
3640
|
standard: {
|
|
3641
3641
|
label: "Standard Delivery",
|
|
3642
3642
|
fee: 0,
|
|
@@ -3655,7 +3655,7 @@ const Je = "USD", kn = (e) => {
|
|
|
3655
3655
|
subtitle: "Available in select locations (+$10)",
|
|
3656
3656
|
icon: "mdi:truck-fast-outline"
|
|
3657
3657
|
}
|
|
3658
|
-
},
|
|
3658
|
+
}, Vs = {
|
|
3659
3659
|
standard: "GROUND",
|
|
3660
3660
|
express: "2-DAY SHIPPING",
|
|
3661
3661
|
sameday: "OVERNIGHT"
|
|
@@ -3671,7 +3671,7 @@ const Je = "USD", kn = (e) => {
|
|
|
3671
3671
|
}, lo = (e) => e == null ? void 0 : e.masterVariant, Nn = (e) => Array.isArray(e == null ? void 0 : e.variants) ? e.variants : [], Jt = (e) => {
|
|
3672
3672
|
const t = lo(e);
|
|
3673
3673
|
return t ? [t, ...Nn(e)] : Nn(e);
|
|
3674
|
-
},
|
|
3674
|
+
}, Ys = (e, t = 0) => Jt(e)[t], Js = (e) => {
|
|
3675
3675
|
var t, r;
|
|
3676
3676
|
return ((r = (t = e == null ? void 0 : e.images) == null ? void 0 : t[0]) == null ? void 0 : r.url) ?? "";
|
|
3677
3677
|
}, Sn = (e, t) => {
|
|
@@ -3679,14 +3679,14 @@ const Je = "USD", kn = (e) => {
|
|
|
3679
3679
|
return Js(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 = (d = (i = e.image_groups) == null ? void 0 : i[0]) == null ? void 0 : d.images) == null ? void 0 : l[0]) == null ? void 0 : p.link) || "";
|
|
3680
3680
|
}, Cn = (e) => (e == null ? void 0 : e.name) || (e == null ? void 0 : e.title) || (e == null ? void 0 : e.productName) || "any", Kt = (e) => {
|
|
3681
3681
|
var s, i, d, l, p, g;
|
|
3682
|
-
const t = e ? Sr(e,
|
|
3682
|
+
const t = e ? Sr(e, Ve) : null;
|
|
3683
3683
|
if (t != null && t.cent && (t != null && t.cur))
|
|
3684
3684
|
return {
|
|
3685
3685
|
amount: +(t.cent / 100),
|
|
3686
3686
|
currency: t.cur,
|
|
3687
3687
|
regularAmount: t.regularCent ? t.regularCent / 100 : void 0
|
|
3688
3688
|
};
|
|
3689
|
-
const r = (d = (i = (s = e == null ? void 0 : e.prices) == null ? void 0 : s[0]) == null ? void 0 : i.value) == null ? void 0 : d.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) ??
|
|
3689
|
+
const r = (d = (i = (s = e == null ? void 0 : e.prices) == null ? void 0 : s[0]) == null ? void 0 : i.value) == null ? void 0 : d.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;
|
|
3690
3690
|
return { amount: Number.isFinite(r) ? +(Number(r) / 100) : 0, currency: n };
|
|
3691
3691
|
}, _n = (e, t) => {
|
|
3692
3692
|
const { amount: r } = Kt(t);
|
|
@@ -3715,46 +3715,46 @@ const Je = "USD", kn = (e) => {
|
|
|
3715
3715
|
const d = null, l = null, p = Jt(r), g = Math.min(
|
|
3716
3716
|
Math.max(0, n || 0),
|
|
3717
3717
|
Math.max(0, p.length - 1)
|
|
3718
|
-
),
|
|
3719
|
-
|
|
3718
|
+
), b = p.length, [x, _] = C(g), [S, P] = C(null), [k, I] = C(null), J = He(null), B = He(null), w = Ys(r, x), [Pe, T] = C(""), [K, ue] = C(!1), [be, re] = C(!1), [Te, ve] = C(!1), [ge, U] = C(""), [j, fe] = C(!1), [W, Je] = C(null), [Ke, Z] = C([]), [ft, bt] = C([]), [D, Le] = C([]), [we, Ee] = C(!1), [vt, rr] = C(), [h, M] = C(!0), [E, R] = C(!1), [H, O] = C(!1), [G, ne] = C("standard"), [$, q] = C(!1), [Oe, me] = C(!1), [se, Se] = C("card"), [ee, Q] = C(!1), [Ae, N] = C(!1), [ie, L] = C(!1), [le, De] = C(null), [Be, kt] = C(null), [Nt, Ue] = C(""), [jt, $t] = C(!1), [A, We] = C({}), Lt = (u, m, f) => {
|
|
3719
|
+
We((v) => ({
|
|
3720
3720
|
...v,
|
|
3721
3721
|
[u]: { value: m, name: f }
|
|
3722
3722
|
}));
|
|
3723
|
-
},
|
|
3724
|
-
|
|
3723
|
+
}, Ge = He(null);
|
|
3724
|
+
Ne(() => {
|
|
3725
3725
|
const u = Jt(r), m = Math.min(
|
|
3726
3726
|
Math.max(0, n || 0),
|
|
3727
3727
|
Math.max(0, u.length - 1)
|
|
3728
3728
|
);
|
|
3729
3729
|
_(m);
|
|
3730
|
-
const f = lo(r), v =
|
|
3731
|
-
|
|
3732
|
-
}, [n, r]),
|
|
3733
|
-
|
|
3730
|
+
const f = lo(r), v = Re(f), F = Ze(f);
|
|
3731
|
+
J.current = v || null, B.current = F || null, P(v || null), I(F || null);
|
|
3732
|
+
}, [n, r]), Ne(() => {
|
|
3733
|
+
Ge.current && (Ge.current.scrollTop = Ge.current.scrollHeight);
|
|
3734
3734
|
}, [
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3735
|
+
Ke,
|
|
3736
|
+
we,
|
|
3737
|
+
E,
|
|
3738
|
+
H,
|
|
3739
3739
|
$,
|
|
3740
|
-
Ee,
|
|
3741
|
-
ee,
|
|
3742
3740
|
Oe,
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3741
|
+
ee,
|
|
3742
|
+
Ae,
|
|
3743
|
+
ie,
|
|
3744
|
+
K,
|
|
3745
|
+
be
|
|
3746
3746
|
]);
|
|
3747
|
-
const
|
|
3747
|
+
const Ce = "var(--tanya)", nr = "var(--tanya-contrast)", Dt = Ce, co = "#804c9e", uo = () => {
|
|
3748
3748
|
console.log("AgenticShopping feedback:", {
|
|
3749
|
-
rating:
|
|
3749
|
+
rating: Be,
|
|
3750
3750
|
comment: Nt
|
|
3751
3751
|
}), $t(!0);
|
|
3752
3752
|
}, fo = () => {
|
|
3753
|
-
kt(null),
|
|
3753
|
+
kt(null), Ue(""), $t(!0);
|
|
3754
3754
|
}, Lr = (u) => {
|
|
3755
|
-
const f = ((u == null ? void 0 : u.intentMandateId) || (u == null ? void 0 : u.intent_mandate_id) || (u == null ? void 0 : u.id) || null) ??
|
|
3755
|
+
const f = ((u == null ? void 0 : u.intentMandateId) || (u == null ? void 0 : u.intent_mandate_id) || (u == null ? void 0 : u.id) || null) ?? le;
|
|
3756
3756
|
return e ? /* @__PURE__ */ c("div", { className: "mt-3 flex items-start gap-3 rounded-lg border border-green-200 bg-green-50 p-4 text-green-800", children: [
|
|
3757
|
-
/* @__PURE__ */ a("div", { className: "success-tick-animation", children: /* @__PURE__ */ a(
|
|
3757
|
+
/* @__PURE__ */ a("div", { className: "success-tick-animation", children: /* @__PURE__ */ a(ae, { icon: "mdi:check-circle", width: "28", color: "#16a34a" }) }),
|
|
3758
3758
|
/* @__PURE__ */ c("div", { className: "text-sm w-full", children: [
|
|
3759
3759
|
/* @__PURE__ */ a("div", { className: "font-semibold", children: "Success!" }),
|
|
3760
3760
|
/* @__PURE__ */ a("div", { children: "Your smart order has been saved. I’ll watch the price and auto-purchase when the conditions are met." }),
|
|
@@ -3778,9 +3778,9 @@ const Je = "USD", kn = (e) => {
|
|
|
3778
3778
|
onClick: () => kt(v),
|
|
3779
3779
|
className: "p-0.5",
|
|
3780
3780
|
children: /* @__PURE__ */ a(
|
|
3781
|
-
|
|
3781
|
+
ae,
|
|
3782
3782
|
{
|
|
3783
|
-
icon:
|
|
3783
|
+
icon: Be && Be >= v ? "mdi:star" : "mdi:star-outline",
|
|
3784
3784
|
width: "20",
|
|
3785
3785
|
className: "text-yellow-500"
|
|
3786
3786
|
}
|
|
@@ -3793,7 +3793,7 @@ const Je = "USD", kn = (e) => {
|
|
|
3793
3793
|
"textarea",
|
|
3794
3794
|
{
|
|
3795
3795
|
value: Nt,
|
|
3796
|
-
onChange: (v) =>
|
|
3796
|
+
onChange: (v) => Ue(v.target.value),
|
|
3797
3797
|
rows: 3,
|
|
3798
3798
|
className: "mt-1 w-full rounded-md border border-gray-300 p-2 text-sm outline-none focus:ring-1 focus:ring-gray-300",
|
|
3799
3799
|
placeholder: "Your feedback helps us improve..."
|
|
@@ -3815,8 +3815,8 @@ const Je = "USD", kn = (e) => {
|
|
|
3815
3815
|
type: "button",
|
|
3816
3816
|
onClick: uo,
|
|
3817
3817
|
className: "px-4 py-2 rounded-full text-sm font-semibold text-white shadow",
|
|
3818
|
-
style: { background:
|
|
3819
|
-
disabled: !
|
|
3818
|
+
style: { background: Ce },
|
|
3819
|
+
disabled: !Be && !Nt.trim(),
|
|
3820
3820
|
children: "Submit"
|
|
3821
3821
|
}
|
|
3822
3822
|
)
|
|
@@ -3859,45 +3859,45 @@ const Je = "USD", kn = (e) => {
|
|
|
3859
3859
|
)
|
|
3860
3860
|
);
|
|
3861
3861
|
}, zt = () => {
|
|
3862
|
-
N(!1),
|
|
3862
|
+
N(!1), Ee(!1), O(!1), me(!1), R(!1), q(!1), Q(!1), L(!1), fe(!1), Je(null), ho(), ue(!1), re(!1);
|
|
3863
3863
|
}, po = () => {
|
|
3864
|
-
|
|
3865
|
-
},
|
|
3864
|
+
Ee(!1), R(!1), O(!1), ne("standard"), q(!1), me(!1), Se("card"), Q(!1), N(!1), L(!1), M(!0), Je(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");
|
|
3865
|
+
}, je = Yr(() => Jt(r).map((m, f) => ({
|
|
3866
3866
|
index: f,
|
|
3867
3867
|
variant: m,
|
|
3868
3868
|
images: ((m == null ? void 0 : m.images) || []).map((v) => (v == null ? void 0 : v.url) || "").filter(Boolean)
|
|
3869
|
-
})), [r]), Ct =
|
|
3870
|
-
if (!
|
|
3869
|
+
})), [r]), Ct = Yr(() => {
|
|
3870
|
+
if (!je.length) return !1;
|
|
3871
3871
|
const u = S || void 0, m = k || void 0, f = (v, F) => {
|
|
3872
|
-
var
|
|
3873
|
-
const
|
|
3874
|
-
|
|
3872
|
+
var z;
|
|
3873
|
+
const y = ot(
|
|
3874
|
+
je,
|
|
3875
3875
|
v || void 0,
|
|
3876
3876
|
F || void 0
|
|
3877
3877
|
);
|
|
3878
|
-
return !!(
|
|
3878
|
+
return !!(y && ((z = y.variant) != null && z.sku));
|
|
3879
3879
|
};
|
|
3880
3880
|
return u && m ? f(u, m) : u && !m ? f(u, null) : !u && m ? f(void 0, m) : !!(w && w.sku);
|
|
3881
|
-
}, [
|
|
3881
|
+
}, [je, S, k, w]), go = Te || j || !Ct, _t = (u) => {
|
|
3882
3882
|
const m = Number((u == null ? void 0 : u.quantity) ?? 1);
|
|
3883
3883
|
return Number.isFinite(m) && m > 0 ? m : 1;
|
|
3884
3884
|
}, zr = (u) => {
|
|
3885
3885
|
const m = _t(u), f = Number((u == null ? void 0 : u.max_price_minor) ?? 0);
|
|
3886
3886
|
return Number.isFinite(f) && f > 0 ? +(f / 100) : +(_n(r, w) * m);
|
|
3887
3887
|
}, Mr = (u) => {
|
|
3888
|
-
var
|
|
3889
|
-
const m =
|
|
3890
|
-
return { product_total: F, tax:
|
|
3888
|
+
var V;
|
|
3889
|
+
const m = W, f = Kt(w), v = u || (m == null ? void 0 : m.currency) || f.currency || Ve, F = zr(m), y = +(F * 0.08).toFixed(2), z = ((V = at[G]) == null ? void 0 : V.fee) || 0;
|
|
3890
|
+
return { product_total: F, tax: y, shipping_fee: z, currency: v };
|
|
3891
3891
|
}, or = async (u, m, f) => {
|
|
3892
|
-
Dr(), po(),
|
|
3893
|
-
const v =
|
|
3892
|
+
Dr(), po(), ve(!0), fe(!0), ue(!1), re(!1);
|
|
3893
|
+
const v = ft.slice(-Fn);
|
|
3894
3894
|
try {
|
|
3895
3895
|
const F = await hr(d, l);
|
|
3896
3896
|
if (!F) throw new Error("Failed to fetch token");
|
|
3897
|
-
const
|
|
3898
|
-
registered: String(
|
|
3899
|
-
userId: String(
|
|
3900
|
-
}).toString()}`,
|
|
3897
|
+
const y = localStorage.getItem("customerNumber"), z = localStorage.getItem("isLoggedIn"), oe = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
|
|
3898
|
+
registered: String(z || !1),
|
|
3899
|
+
userId: String(y || (/* @__PURE__ */ new Date()).getTime())
|
|
3900
|
+
}).toString()}`, Y = await fetch(`${oe}`, {
|
|
3901
3901
|
method: "POST",
|
|
3902
3902
|
headers: {
|
|
3903
3903
|
"Content-Type": "application/json",
|
|
@@ -3917,100 +3917,100 @@ const Je = "USD", kn = (e) => {
|
|
|
3917
3917
|
}
|
|
3918
3918
|
})
|
|
3919
3919
|
});
|
|
3920
|
-
if (!
|
|
3921
|
-
const
|
|
3922
|
-
let
|
|
3920
|
+
if (!Y.body) throw new Error("Readable stream not supported");
|
|
3921
|
+
const te = Y.body.getReader(), X = new TextDecoder();
|
|
3922
|
+
let _e = "", Ie = "", Fe = "";
|
|
3923
3923
|
for (; ; ) {
|
|
3924
|
-
const { done:
|
|
3925
|
-
if (
|
|
3926
|
-
|
|
3927
|
-
const
|
|
3924
|
+
const { done: ye, value: Qe } = await te.read();
|
|
3925
|
+
if (ye) break;
|
|
3926
|
+
_e += X.decode(Qe, { stream: !0 });
|
|
3927
|
+
const mt = _e.split(`
|
|
3928
3928
|
`);
|
|
3929
|
-
|
|
3930
|
-
for (const
|
|
3931
|
-
if (!
|
|
3932
|
-
const
|
|
3929
|
+
_e = mt.pop() || "";
|
|
3930
|
+
for (const ht of mt) {
|
|
3931
|
+
if (!ht.startsWith("data:")) continue;
|
|
3932
|
+
const rt = ht.slice(5).trim();
|
|
3933
3933
|
try {
|
|
3934
|
-
const
|
|
3935
|
-
|
|
3936
|
-
} catch (
|
|
3937
|
-
console.error("Error parsing JSON chunk:",
|
|
3934
|
+
const qe = JSON.parse(rt), ze = qe.index, he = qe.data;
|
|
3935
|
+
ze === 0 ? Ie = String(he ?? "") : ze === 1 && (Fe = String(he ?? ""));
|
|
3936
|
+
} catch (qe) {
|
|
3937
|
+
console.error("Error parsing JSON chunk:", qe);
|
|
3938
3938
|
}
|
|
3939
3939
|
}
|
|
3940
3940
|
}
|
|
3941
|
-
let
|
|
3942
|
-
if (
|
|
3943
|
-
const
|
|
3944
|
-
if (
|
|
3941
|
+
let ce = null;
|
|
3942
|
+
if (Ie) {
|
|
3943
|
+
const ye = String(Ie).replace(/\\n/g, "").trim();
|
|
3944
|
+
if (ye.startsWith("{") && ye.endsWith("}"))
|
|
3945
3945
|
try {
|
|
3946
|
-
|
|
3947
|
-
} catch (
|
|
3948
|
-
console.log(
|
|
3946
|
+
ce = JSON.parse(ye), ce.product_id = m, ce.sku_id = m, localStorage.setItem("agentic_order", JSON.stringify(ce));
|
|
3947
|
+
} catch (Qe) {
|
|
3948
|
+
console.log(Qe);
|
|
3949
3949
|
}
|
|
3950
3950
|
}
|
|
3951
|
-
|
|
3952
|
-
...
|
|
3951
|
+
Je(ce), ce && Z((ye) => [
|
|
3952
|
+
...ye,
|
|
3953
3953
|
{
|
|
3954
3954
|
query: "",
|
|
3955
3955
|
response: "__CARD__",
|
|
3956
|
-
snapshotPayload: { extractedDetails:
|
|
3956
|
+
snapshotPayload: { extractedDetails: ce }
|
|
3957
3957
|
}
|
|
3958
|
-
]),
|
|
3959
|
-
...
|
|
3958
|
+
]), bt((ye) => [
|
|
3959
|
+
...ye,
|
|
3960
3960
|
{
|
|
3961
3961
|
userQuery: u,
|
|
3962
|
-
mainResponse:
|
|
3963
|
-
keywords:
|
|
3962
|
+
mainResponse: Ie || "",
|
|
3963
|
+
keywords: Fe || ""
|
|
3964
3964
|
}
|
|
3965
3965
|
].slice(-Fn));
|
|
3966
3966
|
} catch (F) {
|
|
3967
|
-
console.error("Error sending message to Tanya:", F),
|
|
3967
|
+
console.error("Error sending message to Tanya:", F), fe(!1);
|
|
3968
3968
|
} finally {
|
|
3969
|
-
|
|
3969
|
+
ve(!1);
|
|
3970
3970
|
}
|
|
3971
3971
|
}, Br = async (u) => {
|
|
3972
|
-
if (j ||
|
|
3973
|
-
const m =
|
|
3972
|
+
if (j || Te || !Ct) return;
|
|
3973
|
+
const m = ge.trim();
|
|
3974
3974
|
if (!m) return;
|
|
3975
|
-
Z((
|
|
3975
|
+
Z((y) => [...y, { query: m, response: "" }]), U(""), T(m);
|
|
3976
3976
|
const f = w == null ? void 0 : w.sku, v = In(r), F = f || v || "";
|
|
3977
|
-
if (
|
|
3977
|
+
if (b <= 1) {
|
|
3978
3978
|
if (F) {
|
|
3979
|
-
or(m, F,
|
|
3979
|
+
or(m, F, x);
|
|
3980
3980
|
return;
|
|
3981
3981
|
}
|
|
3982
|
-
|
|
3982
|
+
re(!0), fe(!0);
|
|
3983
3983
|
return;
|
|
3984
3984
|
}
|
|
3985
|
-
F ? (
|
|
3985
|
+
F ? (ue(!0), fe(!0)) : (re(!0), fe(!0));
|
|
3986
3986
|
}, wo = () => {
|
|
3987
3987
|
const u = w == null ? void 0 : w.sku;
|
|
3988
|
-
u && or(
|
|
3988
|
+
u && or(Pe, u, x);
|
|
3989
3989
|
}, yo = () => {
|
|
3990
|
-
|
|
3991
|
-
},
|
|
3990
|
+
ue(!1), re(!0), fe(!0);
|
|
3991
|
+
}, xo = () => {
|
|
3992
3992
|
if (!w || !w.sku) return;
|
|
3993
3993
|
const u = w.sku;
|
|
3994
|
-
or(
|
|
3995
|
-
},
|
|
3996
|
-
|
|
3997
|
-
extractedDetails:
|
|
3994
|
+
or(Pe, u, x);
|
|
3995
|
+
}, bo = async () => {
|
|
3996
|
+
Ee(!0), O(!1), me(!1), N(!1), R(!1), q(!1), Q(!1), L(!1), await mo(), Dr("initial", {
|
|
3997
|
+
extractedDetails: W ?? void 0
|
|
3998
3998
|
});
|
|
3999
3999
|
}, vo = () => {
|
|
4000
4000
|
if (!vt) return;
|
|
4001
|
-
const u =
|
|
4001
|
+
const u = D.find(
|
|
4002
4002
|
(m) => String(m.addressId ?? m.id) === vt
|
|
4003
4003
|
) || null;
|
|
4004
|
-
u && (localStorage.setItem("agentic_order_address", JSON.stringify(u)),
|
|
4004
|
+
u && (localStorage.setItem("agentic_order_address", JSON.stringify(u)), R(!0), O(!0), q(!1), me(!1), Q(!1), N(!1), L(!1), St("address", u));
|
|
4005
4005
|
}, ko = () => {
|
|
4006
|
-
|
|
4006
|
+
R(!1), O(!1), q(!1), me(!1), Q(!1), N(!1), L(!1), localStorage.removeItem("agentic_order_address");
|
|
4007
4007
|
}, No = () => {
|
|
4008
|
-
|
|
4009
|
-
method:
|
|
4010
|
-
...
|
|
4008
|
+
G && (localStorage.setItem("agentic_order_delivery", G), q(!0), me(!0), Q(!1), N(!1), L(!1), St("delivery", {
|
|
4009
|
+
method: G,
|
|
4010
|
+
...at[G]
|
|
4011
4011
|
}));
|
|
4012
4012
|
}, Ur = () => {
|
|
4013
|
-
|
|
4013
|
+
O(!1), q(!1), me(!1), Q(!1), N(!1), L(!1), fe(!1), zt(), Z((u) => [
|
|
4014
4014
|
...u,
|
|
4015
4015
|
{
|
|
4016
4016
|
query: "",
|
|
@@ -4021,11 +4021,11 @@ const Je = "USD", kn = (e) => {
|
|
|
4021
4021
|
}
|
|
4022
4022
|
]);
|
|
4023
4023
|
}, So = () => {
|
|
4024
|
-
|
|
4024
|
+
q(!1), me(!1), Q(!1), N(!1), L(!1), localStorage.removeItem("agentic_order_delivery");
|
|
4025
4025
|
}, Co = () => {
|
|
4026
|
-
|
|
4026
|
+
se && (localStorage.setItem("agentic_order_payment", se), Q(!0), N(!0), L(!1), St("payment", { method: se }));
|
|
4027
4027
|
}, _o = () => {
|
|
4028
|
-
|
|
4028
|
+
me(!1), Q(!1), N(!1), L(!1), fe(!1), zt(), Z((u) => [
|
|
4029
4029
|
...u,
|
|
4030
4030
|
{
|
|
4031
4031
|
query: "",
|
|
@@ -4036,77 +4036,77 @@ const Je = "USD", kn = (e) => {
|
|
|
4036
4036
|
}
|
|
4037
4037
|
]);
|
|
4038
4038
|
}, Io = () => {
|
|
4039
|
-
|
|
4039
|
+
Q(!1), N(!1), L(!1), localStorage.removeItem("agentic_order_payment");
|
|
4040
4040
|
}, Fo = async () => {
|
|
4041
4041
|
try {
|
|
4042
|
-
|
|
4043
|
-
const u =
|
|
4042
|
+
ve(!0);
|
|
4043
|
+
const u = W || {}, m = JSON.parse(
|
|
4044
4044
|
localStorage.getItem("agentic_order_address") || "null"
|
|
4045
4045
|
), f = localStorage.getItem(
|
|
4046
4046
|
"agentic_order_delivery"
|
|
4047
|
-
), v = localStorage.getItem("agentic_order_payment") || "card", { product_total: F, tax:
|
|
4048
|
-
shopper_id:
|
|
4049
|
-
shipping_address_id:
|
|
4050
|
-
shipping_method_id:
|
|
4051
|
-
payment_method_id:
|
|
4052
|
-
sku:
|
|
4047
|
+
), v = localStorage.getItem("agentic_order_payment") || "card", { product_total: F, tax: y, shipping_fee: z, currency: V } = Mr(), oe = u.shopper_id || localStorage.getItem("customerId") || void 0, Y = (m == null ? void 0 : m.addressId) || (m == null ? void 0 : m.id) || void 0, te = f ? Vs[f] : "GROUND", X = "card-visa", _e = w == null ? void 0 : w.sku, Ie = (r == null ? void 0 : r.id) || "", Fe = _t(u), ce = typeof u.max_price_minor == "number" ? u.max_price_minor : Math.round(F * 100), mt = {
|
|
4048
|
+
shopper_id: oe,
|
|
4049
|
+
shipping_address_id: Y,
|
|
4050
|
+
shipping_method_id: te,
|
|
4051
|
+
payment_method_id: X,
|
|
4052
|
+
sku: _e,
|
|
4053
4053
|
platform: "SFCC",
|
|
4054
4054
|
storeCode: "Sites-SiteGenesis-Site",
|
|
4055
|
-
product_id:
|
|
4056
|
-
quantity:
|
|
4057
|
-
max_price_minor:
|
|
4058
|
-
currency:
|
|
4059
|
-
instruction_text:
|
|
4055
|
+
product_id: Ie,
|
|
4056
|
+
quantity: Fe,
|
|
4057
|
+
max_price_minor: ce,
|
|
4058
|
+
currency: V,
|
|
4059
|
+
instruction_text: Pe
|
|
4060
4060
|
};
|
|
4061
|
-
if (!
|
|
4061
|
+
if (!oe || !Y) {
|
|
4062
4062
|
console.error(
|
|
4063
4063
|
"Missing shopper_id or shipping_address_id for intent-mandate",
|
|
4064
4064
|
{
|
|
4065
|
-
shopperId:
|
|
4066
|
-
shippingAddressId:
|
|
4065
|
+
shopperId: oe,
|
|
4066
|
+
shippingAddressId: Y
|
|
4067
4067
|
}
|
|
4068
4068
|
), alert(
|
|
4069
4069
|
"Missing customer or address information. Please re-select address and try again."
|
|
4070
|
-
),
|
|
4070
|
+
), ve(!1);
|
|
4071
4071
|
return;
|
|
4072
4072
|
}
|
|
4073
|
-
const
|
|
4074
|
-
if (!
|
|
4073
|
+
const rt = (await xt()).access_token;
|
|
4074
|
+
if (!rt)
|
|
4075
4075
|
throw new Error("Failed to fetch auth token for intent-mandate");
|
|
4076
|
-
const { serverUrl:
|
|
4076
|
+
const { serverUrl: qe } = lt(), ze = await fetch(`${qe}/api/intent-mandate`, {
|
|
4077
4077
|
method: "POST",
|
|
4078
4078
|
headers: {
|
|
4079
4079
|
"Content-Type": "application/json",
|
|
4080
|
-
Authorization: `Bearer ${
|
|
4080
|
+
Authorization: `Bearer ${rt}`
|
|
4081
4081
|
},
|
|
4082
|
-
body: JSON.stringify(
|
|
4082
|
+
body: JSON.stringify(mt)
|
|
4083
4083
|
});
|
|
4084
|
-
if (!
|
|
4085
|
-
const jo = await
|
|
4086
|
-
console.error("intent-mandate failed",
|
|
4084
|
+
if (!ze.ok) {
|
|
4085
|
+
const jo = await ze.text().catch(() => "");
|
|
4086
|
+
console.error("intent-mandate failed", ze.status, jo), alert(
|
|
4087
4087
|
"Something went wrong while saving your smart order. Please try again."
|
|
4088
|
-
),
|
|
4088
|
+
), ve(!1);
|
|
4089
4089
|
return;
|
|
4090
4090
|
}
|
|
4091
|
-
const
|
|
4092
|
-
console.log("intent-mandate success:",
|
|
4093
|
-
const
|
|
4094
|
-
|
|
4091
|
+
const he = await ze.json().catch(() => null);
|
|
4092
|
+
console.log("intent-mandate success:", he);
|
|
4093
|
+
const nt = (he == null ? void 0 : he.intent_mandate_id) || (he == null ? void 0 : he.intent_mandateId) || (he == null ? void 0 : he.key) || null;
|
|
4094
|
+
nt && De(nt);
|
|
4095
4095
|
const Mt = {
|
|
4096
4096
|
...u,
|
|
4097
4097
|
address: m,
|
|
4098
4098
|
delivery: f,
|
|
4099
4099
|
payment: v,
|
|
4100
|
-
summary: { product_total: F, tax:
|
|
4101
|
-
intent_mandate_id:
|
|
4100
|
+
summary: { product_total: F, tax: y, shipping_fee: z, currency: V },
|
|
4101
|
+
intent_mandate_id: nt
|
|
4102
4102
|
};
|
|
4103
|
-
localStorage.setItem("agentic_order_final", JSON.stringify(Mt)), L(!0),
|
|
4103
|
+
localStorage.setItem("agentic_order_final", JSON.stringify(Mt)), L(!0), M(!1), St("final", Mt), St("success", { intentMandateId: nt }), zt();
|
|
4104
4104
|
} catch (u) {
|
|
4105
4105
|
console.error("Error in handleConfirmWatch / intent-mandate:", u), alert(
|
|
4106
4106
|
"Unable to complete your smart order right now. Please try again in a moment."
|
|
4107
4107
|
);
|
|
4108
4108
|
} finally {
|
|
4109
|
-
|
|
4109
|
+
ve(!1);
|
|
4110
4110
|
}
|
|
4111
4111
|
}, qr = () => {
|
|
4112
4112
|
zt(), Z((u) => [
|
|
@@ -4120,16 +4120,16 @@ const Je = "USD", kn = (e) => {
|
|
|
4120
4120
|
}
|
|
4121
4121
|
]);
|
|
4122
4122
|
}, Po = () => {
|
|
4123
|
-
const u = Sn(r, w), m = Cn(r), f = (r == null ? void 0 : r.id) || "", v =
|
|
4123
|
+
const u = Sn(r, w), m = Cn(r), f = (r == null ? void 0 : r.id) || "", v = Re(w) || "", F = Ze(w) || "", { amount: y } = Kt(w), z = !!(r != null && r.id), V = w && z ? kn(w) : !1;
|
|
4124
4124
|
return console.log(
|
|
4125
4125
|
u,
|
|
4126
4126
|
m,
|
|
4127
4127
|
f,
|
|
4128
4128
|
v,
|
|
4129
4129
|
F,
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4130
|
+
y,
|
|
4131
|
+
z,
|
|
4132
|
+
V,
|
|
4133
4133
|
"base product"
|
|
4134
4134
|
), /* @__PURE__ */ a("div", { className: "mx-4 mt-2 rounded-xl border border-gray-200 bg-white p-4", children: /* @__PURE__ */ c("div", { className: "flex flex-col sm:flex-row items-center sm:items-center gap-4", children: [
|
|
4135
4135
|
/* @__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(
|
|
@@ -4140,7 +4140,7 @@ const Je = "USD", kn = (e) => {
|
|
|
4140
4140
|
className: "object-contain w-full h-full"
|
|
4141
4141
|
}
|
|
4142
4142
|
) : /* @__PURE__ */ a(
|
|
4143
|
-
|
|
4143
|
+
ae,
|
|
4144
4144
|
{
|
|
4145
4145
|
icon: "mdi:image-outline",
|
|
4146
4146
|
width: "28",
|
|
@@ -4154,14 +4154,14 @@ const Je = "USD", kn = (e) => {
|
|
|
4154
4154
|
v && `Color: ${v}`,
|
|
4155
4155
|
F && `Size: ${F}`
|
|
4156
4156
|
].filter(Boolean).join(" • ") || "—" }),
|
|
4157
|
-
/* @__PURE__ */ a("div", { className: "mt-1 text-xl font-semibold text-gray-900", children:
|
|
4158
|
-
|
|
4157
|
+
/* @__PURE__ */ a("div", { className: "mt-1 text-xl font-semibold text-gray-900", children: z ? $e(Number(y) || 0, Ve) : "Currently unavailable" }),
|
|
4158
|
+
z && !V && /* @__PURE__ */ a("div", { className: "mt-1 text-xs font-medium text-red-600", children: "Currently out of stock" })
|
|
4159
4159
|
] })
|
|
4160
4160
|
] }) });
|
|
4161
4161
|
}, Rr = ({
|
|
4162
4162
|
showSubmit: u = !0
|
|
4163
4163
|
}) => {
|
|
4164
|
-
const m = {}, f =
|
|
4164
|
+
const m = {}, f = je.map((y) => Re(y.variant)).filter((y) => !!y && !m[y] && (m[y] = !0)), v = {}, F = je.map((y) => Ze(y.variant)).filter((y) => !!y && !v[y] && (v[y] = !0));
|
|
4165
4165
|
return /* @__PURE__ */ c("div", { className: "mx-4 mt-4 mb-2 rounded-xl border border-gray-200 bg-white p-4 animate-fade-in", children: [
|
|
4166
4166
|
/* @__PURE__ */ a("h3", { className: "font-semibold text-gray-800", children: "Choose a variant" }),
|
|
4167
4167
|
f.length > 0 && /* @__PURE__ */ c("div", { className: "mt-4", children: [
|
|
@@ -4169,51 +4169,51 @@ const Je = "USD", kn = (e) => {
|
|
|
4169
4169
|
/* @__PURE__ */ a("div", { className: "text-sm font-bold", children: "Color :" }),
|
|
4170
4170
|
S && /* @__PURE__ */ a("div", { className: "text-sm text-gray-600", children: S })
|
|
4171
4171
|
] }),
|
|
4172
|
-
/* @__PURE__ */ a("div", { className: "flex flex-wrap gap-4 mt-2", children: f.map((
|
|
4173
|
-
var
|
|
4174
|
-
const
|
|
4175
|
-
(
|
|
4176
|
-
),
|
|
4172
|
+
/* @__PURE__ */ a("div", { className: "flex flex-wrap gap-4 mt-2", children: f.map((y) => {
|
|
4173
|
+
var Fe;
|
|
4174
|
+
const z = S === y, V = k || B.current || null, oe = V ? ot(je, y, V) : ot(je, y, null), Y = !!oe, te = Y && kn(oe.variant), X = Y && te ? Sr(oe.variant, Ve) || Sr(oe.variant) : null, _e = je.find(
|
|
4175
|
+
(ce) => Re(ce.variant) === y
|
|
4176
|
+
), Ie = (Fe = _e == null ? void 0 : _e.images) == null ? void 0 : Fe[0];
|
|
4177
4177
|
return /* @__PURE__ */ c(
|
|
4178
4178
|
"div",
|
|
4179
4179
|
{
|
|
4180
4180
|
className: `flex flex-col items-center w-28 border rounded-md p-2
|
|
4181
|
-
${
|
|
4182
|
-
${!
|
|
4181
|
+
${z ? "border-2 border-tanya-light" : "border-gray-300"}
|
|
4182
|
+
${!Y || !te ? "opacity-60" : ""}`,
|
|
4183
4183
|
children: [
|
|
4184
4184
|
/* @__PURE__ */ a(
|
|
4185
4185
|
"button",
|
|
4186
4186
|
{
|
|
4187
4187
|
onClick: () => {
|
|
4188
|
-
|
|
4189
|
-
const
|
|
4190
|
-
|
|
4188
|
+
P(y);
|
|
4189
|
+
const ce = k || B.current || null, ye = ce && ot(je, y, ce) || ot(je, y, null);
|
|
4190
|
+
ye && _(ye.index);
|
|
4191
4191
|
},
|
|
4192
4192
|
className: "w-full h-20 flex items-center justify-center overflow-hidden",
|
|
4193
|
-
title:
|
|
4194
|
-
children:
|
|
4193
|
+
title: y,
|
|
4194
|
+
children: Ie ? /* @__PURE__ */ a(
|
|
4195
4195
|
"img",
|
|
4196
4196
|
{
|
|
4197
|
-
src:
|
|
4198
|
-
alt:
|
|
4197
|
+
src: Ie,
|
|
4198
|
+
alt: y,
|
|
4199
4199
|
className: "w/full h-full object-contain"
|
|
4200
4200
|
}
|
|
4201
|
-
) : /* @__PURE__ */ a("div", { className: "w-full h-full flex items-center justify-center text-xs px-1", children:
|
|
4201
|
+
) : /* @__PURE__ */ a("div", { className: "w-full h-full flex items-center justify-center text-xs px-1", children: y })
|
|
4202
4202
|
}
|
|
4203
4203
|
),
|
|
4204
4204
|
/* @__PURE__ */ a("div", { className: "w-full border-t my-2" }),
|
|
4205
|
-
|
|
4206
|
-
!
|
|
4207
|
-
|
|
4208
|
-
$e(
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4205
|
+
Y && !te && /* @__PURE__ */ a("div", { className: "text-[11px] text-red-600 text-center", children: "Out of stock" }),
|
|
4206
|
+
!Y && /* @__PURE__ */ a("div", { className: "text-[11px] text-red-600 text-center", children: "any not offered" }),
|
|
4207
|
+
Y && te && X && /* @__PURE__ */ c("div", { className: "text-xs text-gray-800 font-medium text-center", children: [
|
|
4208
|
+
$e(X.cent / 100, X.cur),
|
|
4209
|
+
X.regularCent && X.regularCent > X.cent && /* @__PURE__ */ a("span", { className: "ml-1 line-through text-gray-500", children: $e(
|
|
4210
|
+
X.regularCent / 100,
|
|
4211
|
+
X.cur
|
|
4212
4212
|
) })
|
|
4213
4213
|
] })
|
|
4214
4214
|
]
|
|
4215
4215
|
},
|
|
4216
|
-
`color-${
|
|
4216
|
+
`color-${y}`
|
|
4217
4217
|
);
|
|
4218
4218
|
}) })
|
|
4219
4219
|
] }),
|
|
@@ -4222,73 +4222,54 @@ const Je = "USD", kn = (e) => {
|
|
|
4222
4222
|
/* @__PURE__ */ a("div", { className: "text-sm font-bold", children: "Size :" }),
|
|
4223
4223
|
k && /* @__PURE__ */ a("div", { className: "text-sm text-gray-600", children: k })
|
|
4224
4224
|
] }),
|
|
4225
|
-
/* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2 mt-2", children: F.map((
|
|
4225
|
+
/* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2 mt-2", children: F.map((y) => /* @__PURE__ */ a(
|
|
4226
4226
|
"button",
|
|
4227
4227
|
{
|
|
4228
4228
|
onClick: () => {
|
|
4229
|
-
I(
|
|
4230
|
-
const
|
|
4231
|
-
|
|
4229
|
+
I(y);
|
|
4230
|
+
const V = S && ot(je, S, y) || ot(je, void 0, y);
|
|
4231
|
+
V && _(V.index);
|
|
4232
4232
|
},
|
|
4233
|
-
className: `px-4 py-2 rounded-md border text-sm ${k ===
|
|
4234
|
-
title:
|
|
4235
|
-
children:
|
|
4233
|
+
className: `px-4 py-2 rounded-md border text-sm ${k === y ? "border-2 border-tanya-light font-semibold" : "border-gray-300"}`,
|
|
4234
|
+
title: y,
|
|
4235
|
+
children: y
|
|
4236
4236
|
},
|
|
4237
|
-
`size-${
|
|
4237
|
+
`size-${y}`
|
|
4238
4238
|
)) })
|
|
4239
4239
|
] }),
|
|
4240
|
-
i.map(({ id:
|
|
4241
|
-
|
|
4242
|
-
({ href: pe, name: V, image: te, value: xe, orderable: je }, re) => {
|
|
4243
|
-
const de = te ? /* @__PURE__ */ a(
|
|
4244
|
-
"div",
|
|
4245
|
-
{
|
|
4246
|
-
style: {
|
|
4247
|
-
height: "100%",
|
|
4248
|
-
width: "100%",
|
|
4249
|
-
minWidth: "32px",
|
|
4250
|
-
backgroundRepeat: "no-repeat",
|
|
4251
|
-
backgroundSize: "cover",
|
|
4252
|
-
backgroundColor: V == null ? void 0 : V.toLowerCase(),
|
|
4253
|
-
backgroundImage: `url(${(te == null ? void 0 : te.disBaseLink) || (te == null ? void 0 : te.link)})`,
|
|
4254
|
-
borderRadius: "50%"
|
|
4255
|
-
}
|
|
4256
|
-
}
|
|
4257
|
-
) : V, ze = !!(P != null && P.value), Re = (P == null ? void 0 : P.value) === xe;
|
|
4258
|
-
return /* @__PURE__ */ a(
|
|
4259
|
-
Rs,
|
|
4260
|
-
{
|
|
4261
|
-
href: pe,
|
|
4262
|
-
disabled: !je,
|
|
4263
|
-
value: xe,
|
|
4264
|
-
name: V,
|
|
4265
|
-
variant: b === "color" ? "circle" : "square",
|
|
4266
|
-
selected: Re,
|
|
4267
|
-
isFocusable: Re || !ze && re === 0,
|
|
4268
|
-
children: de
|
|
4269
|
-
},
|
|
4270
|
-
xe
|
|
4271
|
-
);
|
|
4272
|
-
}
|
|
4273
|
-
);
|
|
4240
|
+
i.map(({ id: y, name: z, selectedValue: V, values: oe }) => {
|
|
4241
|
+
var Y;
|
|
4274
4242
|
return /* @__PURE__ */ a(
|
|
4275
4243
|
Hs,
|
|
4276
4244
|
{
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4245
|
+
label: z,
|
|
4246
|
+
selectedValue: ((Y = A[y]) == null ? void 0 : Y.name) || "",
|
|
4247
|
+
children: oe.map(({ value: te, name: X, image: _e }) => {
|
|
4248
|
+
var Fe;
|
|
4249
|
+
const Ie = ((Fe = A[y]) == null ? void 0 : Fe.value) === te;
|
|
4250
|
+
return /* @__PURE__ */ a(
|
|
4251
|
+
Rs,
|
|
4252
|
+
{
|
|
4253
|
+
value: te,
|
|
4254
|
+
name: X,
|
|
4255
|
+
image: _e,
|
|
4256
|
+
variant: y === "color" ? "circle" : "square",
|
|
4257
|
+
selected: Ie,
|
|
4258
|
+
onClick: () => Lt(y, te, X)
|
|
4259
|
+
},
|
|
4260
|
+
te
|
|
4261
|
+
);
|
|
4262
|
+
})
|
|
4282
4263
|
},
|
|
4283
|
-
|
|
4264
|
+
y
|
|
4284
4265
|
);
|
|
4285
4266
|
}),
|
|
4286
4267
|
u && /* @__PURE__ */ a("div", { className: "mt-4 flex justify-end", children: /* @__PURE__ */ a(
|
|
4287
4268
|
"button",
|
|
4288
4269
|
{
|
|
4289
|
-
onClick:
|
|
4270
|
+
onClick: xo,
|
|
4290
4271
|
className: "px-6 py-2.5 rounded-full font-semibold text-white shadow-md",
|
|
4291
|
-
style: { background:
|
|
4272
|
+
style: { background: Ce },
|
|
4292
4273
|
disabled: !Ct,
|
|
4293
4274
|
children: "Submit"
|
|
4294
4275
|
}
|
|
@@ -4296,9 +4277,9 @@ const Je = "USD", kn = (e) => {
|
|
|
4296
4277
|
] });
|
|
4297
4278
|
}, Hr = (u, m = !0) => {
|
|
4298
4279
|
!(u != null && u.extractedDetails) && u && (u = { extractedDetails: u });
|
|
4299
|
-
const f = (u == null ? void 0 : u.extractedDetails) ||
|
|
4280
|
+
const f = (u == null ? void 0 : u.extractedDetails) || W;
|
|
4300
4281
|
if (!f) return null;
|
|
4301
|
-
const v = _t(f), { currency: F } = Kt(w),
|
|
4282
|
+
const v = _t(f), { currency: F } = Kt(w), y = _n(r, w), z = Number((f == null ? void 0 : f.max_price_minor) ?? 0), oe = Number.isFinite(z) && z > 0 ? +(z / 100) : +(y * v), Y = (f == null ? void 0 : f.currency) || F || Ve, te = w != null && w.sku ? w.sku : f.product_id;
|
|
4302
4283
|
return /* @__PURE__ */ c(
|
|
4303
4284
|
"div",
|
|
4304
4285
|
{
|
|
@@ -4316,22 +4297,22 @@ const Je = "USD", kn = (e) => {
|
|
|
4316
4297
|
/* @__PURE__ */ c("div", { className: "w-full max-w-md bg-white rounded-xl shadow-inner p-4", children: [
|
|
4317
4298
|
/* @__PURE__ */ c("div", { className: "grid grid-cols-2 gap-y-2 text-sm", children: [
|
|
4318
4299
|
/* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "SKU:" }),
|
|
4319
|
-
/* @__PURE__ */ a("p", { className: "text-gray-800", children:
|
|
4300
|
+
/* @__PURE__ */ a("p", { className: "text-gray-800", children: te }),
|
|
4320
4301
|
/* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "Quantity:" }),
|
|
4321
4302
|
/* @__PURE__ */ a("p", { className: "text-gray-800", children: _t(f) }),
|
|
4322
4303
|
/* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "Currency:" }),
|
|
4323
|
-
/* @__PURE__ */ a("p", { className: "text-gray-800", children:
|
|
4304
|
+
/* @__PURE__ */ a("p", { className: "text-gray-800", children: Y }),
|
|
4324
4305
|
/* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "Maximum Total Price:" }),
|
|
4325
|
-
/* @__PURE__ */ a("p", { className: "text-gray-800", children: $e(
|
|
4306
|
+
/* @__PURE__ */ a("p", { className: "text-gray-800", children: $e(oe, Y) })
|
|
4326
4307
|
] }),
|
|
4327
4308
|
/* @__PURE__ */ c("div", { className: "mt-3 flex flex-wrap gap-2 text-xs", children: [
|
|
4328
|
-
|
|
4309
|
+
Re(w) && /* @__PURE__ */ c("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
|
|
4329
4310
|
"Color: ",
|
|
4330
|
-
|
|
4311
|
+
Re(w)
|
|
4331
4312
|
] }),
|
|
4332
|
-
|
|
4313
|
+
Ze(w) && /* @__PURE__ */ c("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
|
|
4333
4314
|
"Size: ",
|
|
4334
|
-
|
|
4315
|
+
Ze(w)
|
|
4335
4316
|
] }),
|
|
4336
4317
|
(w == null ? void 0 : w.sku) && /* @__PURE__ */ c("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
|
|
4337
4318
|
"SKU: ",
|
|
@@ -4339,7 +4320,7 @@ const Je = "USD", kn = (e) => {
|
|
|
4339
4320
|
] })
|
|
4340
4321
|
] })
|
|
4341
4322
|
] }),
|
|
4342
|
-
!m && /* @__PURE__ */ c(
|
|
4323
|
+
!m && /* @__PURE__ */ c(ke, { children: [
|
|
4343
4324
|
/* @__PURE__ */ c(
|
|
4344
4325
|
"p",
|
|
4345
4326
|
{
|
|
@@ -4356,13 +4337,13 @@ const Je = "USD", kn = (e) => {
|
|
|
4356
4337
|
/* @__PURE__ */ c(
|
|
4357
4338
|
"button",
|
|
4358
4339
|
{
|
|
4359
|
-
onClick:
|
|
4360
|
-
disabled:
|
|
4361
|
-
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 ${
|
|
4362
|
-
style: { background: `${
|
|
4340
|
+
onClick: bo,
|
|
4341
|
+
disabled: we,
|
|
4342
|
+
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 ${we ? "opacity-60 cursor-not-allowed" : "hover:-translate-y-0.5 hover:shadow-lg"}`,
|
|
4343
|
+
style: { background: `${Ce}` },
|
|
4363
4344
|
children: [
|
|
4364
4345
|
/* @__PURE__ */ a(
|
|
4365
|
-
|
|
4346
|
+
ae,
|
|
4366
4347
|
{
|
|
4367
4348
|
icon: "fluent:checkmark-circle-24-filled",
|
|
4368
4349
|
className: "mr-2",
|
|
@@ -4378,12 +4359,12 @@ const Je = "USD", kn = (e) => {
|
|
|
4378
4359
|
"button",
|
|
4379
4360
|
{
|
|
4380
4361
|
onClick: qr,
|
|
4381
|
-
disabled:
|
|
4382
|
-
className: `relative inline-flex items-center justify-center px-6 py-2.5 rounded-full font-semibold border transition-all duration-300 ${
|
|
4383
|
-
style: { borderColor:
|
|
4362
|
+
disabled: we,
|
|
4363
|
+
className: `relative inline-flex items-center justify-center px-6 py-2.5 rounded-full font-semibold border transition-all duration-300 ${we ? "opacity-60 cursor-not-allowed" : "hover:-translate-y-0.5 hover:shadow-lg"}`,
|
|
4364
|
+
style: { borderColor: Ce, color: nr },
|
|
4384
4365
|
children: [
|
|
4385
4366
|
/* @__PURE__ */ a(
|
|
4386
|
-
|
|
4367
|
+
ae,
|
|
4387
4368
|
{
|
|
4388
4369
|
icon: "fluent:dismiss-circle-24-filled",
|
|
4389
4370
|
className: "mr-2",
|
|
@@ -4400,27 +4381,27 @@ const Je = "USD", kn = (e) => {
|
|
|
4400
4381
|
]
|
|
4401
4382
|
}
|
|
4402
4383
|
);
|
|
4403
|
-
},
|
|
4404
|
-
var
|
|
4405
|
-
const f = u || {}, v = ((
|
|
4384
|
+
}, Vr = (u, m = !0) => {
|
|
4385
|
+
var ht, rt, qe, ze, he, nt;
|
|
4386
|
+
const f = u || {}, v = ((ht = f == null ? void 0 : f.summary) == null ? void 0 : ht.currency) || (W == null ? void 0 : W.currency) || Ve, F = Sn(r, w), y = Cn(r), z = w != null && w.sku ? w.sku : (r == null ? void 0 : r.id) ?? (W == null ? void 0 : W.product_id), V = (w == null ? void 0 : w.sku) ?? In(r), oe = Re(w) || Ks(r), Y = Ze(w) || Ws(r), te = _t(f), X = ((rt = f == null ? void 0 : f.summary) == null ? void 0 : rt.product_total) != null ? +f.summary.product_total : zr(f), _e = te > 0 ? +(X / te).toFixed(2) : 0, Ie = X, Fe = ((qe = f == null ? void 0 : f.summary) == null ? void 0 : qe.tax) ?? +(X * 0.08).toFixed(2), ce = ((ze = f == null ? void 0 : f.summary) == null ? void 0 : ze.shipping_fee) ?? (((he = at[G]) == null ? void 0 : he.fee) || 0), ye = f != null && f.address ? [
|
|
4406
4387
|
f.address.addressLine1,
|
|
4407
4388
|
f.address.addressLine2,
|
|
4408
4389
|
f.address.street,
|
|
4409
4390
|
[f.address.city, f.address.state, f.address.postalCode].filter(Boolean).join(", "),
|
|
4410
4391
|
f.address.country
|
|
4411
|
-
].filter(Boolean).map((Mt) =>
|
|
4392
|
+
].filter(Boolean).map((Mt) => Xe(String(Mt))).join(", ") : "—", Qe = (f == null ? void 0 : f.payment) || "card", mt = Qe === "card" ? /* @__PURE__ */ c(ke, { children: [
|
|
4412
4393
|
"Credit Card — Mastercard",
|
|
4413
4394
|
/* @__PURE__ */ a("br", {}),
|
|
4414
4395
|
"•••• 7820 Exp: 12/26"
|
|
4415
|
-
] }) : /* @__PURE__ */ a(
|
|
4396
|
+
] }) : /* @__PURE__ */ a(ke, { children: Xe(Qe) });
|
|
4416
4397
|
return /* @__PURE__ */ c("div", { className: "mx-auto mt-3 mb-3 rounded-2xl bg-white", children: [
|
|
4417
4398
|
/* @__PURE__ */ a("div", { className: "px-6 pt-5 pb-3", children: /* @__PURE__ */ c("h3", { className: "font-semibold text-lg mb-2 text-gray-800 flex items-center gap-2", children: [
|
|
4418
4399
|
/* @__PURE__ */ a(
|
|
4419
|
-
|
|
4400
|
+
ae,
|
|
4420
4401
|
{
|
|
4421
4402
|
icon: "mdi:receipt-text-check-outline",
|
|
4422
4403
|
width: "24",
|
|
4423
|
-
color:
|
|
4404
|
+
color: Ce
|
|
4424
4405
|
}
|
|
4425
4406
|
),
|
|
4426
4407
|
"All set! Here’s what your smart order looks like 🧾"
|
|
@@ -4430,11 +4411,11 @@ const Je = "USD", kn = (e) => {
|
|
|
4430
4411
|
"img",
|
|
4431
4412
|
{
|
|
4432
4413
|
src: F,
|
|
4433
|
-
alt:
|
|
4414
|
+
alt: y,
|
|
4434
4415
|
className: "w-full h-full object-contain"
|
|
4435
4416
|
}
|
|
4436
4417
|
) : /* @__PURE__ */ a(
|
|
4437
|
-
|
|
4418
|
+
ae,
|
|
4438
4419
|
{
|
|
4439
4420
|
icon: "mdi:image-outline",
|
|
4440
4421
|
width: "24",
|
|
@@ -4443,44 +4424,44 @@ const Je = "USD", kn = (e) => {
|
|
|
4443
4424
|
) }) }),
|
|
4444
4425
|
/* @__PURE__ */ c("div", { className: "sm:col-span-10", children: [
|
|
4445
4426
|
/* @__PURE__ */ c("div", { className: "mb-3", children: [
|
|
4446
|
-
/* @__PURE__ */ a("div", { className: "text-lg text-center font-bold text-gray-900", children:
|
|
4427
|
+
/* @__PURE__ */ a("div", { className: "text-lg text-center font-bold text-gray-900", children: y }),
|
|
4447
4428
|
/* @__PURE__ */ c("div", { className: "text-xs text-center font-bold text-gray-600", children: [
|
|
4448
4429
|
/* @__PURE__ */ a("span", { className: "font-medium", children: "SKU:" }),
|
|
4449
4430
|
" ",
|
|
4450
|
-
|
|
4431
|
+
z ?? "—"
|
|
4451
4432
|
] }),
|
|
4452
|
-
(
|
|
4453
|
-
|
|
4433
|
+
(V || oe || Y) && /* @__PURE__ */ c("div", { className: "text-xs text-gray-600 mt-0.5 text-center", children: [
|
|
4434
|
+
V && /* @__PURE__ */ c(ke, { children: [
|
|
4454
4435
|
/* @__PURE__ */ a("span", { className: "font-medium", children: "SKU:" }),
|
|
4455
4436
|
" ",
|
|
4456
|
-
|
|
4437
|
+
V,
|
|
4457
4438
|
" "
|
|
4458
4439
|
] }),
|
|
4459
|
-
|
|
4440
|
+
oe && /* @__PURE__ */ c(ke, { children: [
|
|
4460
4441
|
/* @__PURE__ */ a("span", { className: "font-medium", children: "Color:" }),
|
|
4461
4442
|
" ",
|
|
4462
|
-
|
|
4443
|
+
oe,
|
|
4463
4444
|
" "
|
|
4464
4445
|
] }),
|
|
4465
|
-
|
|
4446
|
+
Y && /* @__PURE__ */ c(ke, { children: [
|
|
4466
4447
|
/* @__PURE__ */ a("span", { className: "font-medium", children: "Size:" }),
|
|
4467
4448
|
" ",
|
|
4468
|
-
|
|
4449
|
+
Y
|
|
4469
4450
|
] })
|
|
4470
4451
|
] })
|
|
4471
4452
|
] }),
|
|
4472
4453
|
/* @__PURE__ */ c("div", { className: "grid grid-cols-1 md-grid-cols-3 md:grid-cols-3 gap-3", children: [
|
|
4473
4454
|
/* @__PURE__ */ c("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-white p-3 text-center", children: [
|
|
4474
4455
|
/* @__PURE__ */ a("div", { className: "text-[11px] uppercase tracking-wide text-gray-500", children: "Unit Price" }),
|
|
4475
|
-
/* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: $e(
|
|
4456
|
+
/* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: $e(_e, v) })
|
|
4476
4457
|
] }),
|
|
4477
4458
|
/* @__PURE__ */ c("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-white p-3 text-center", children: [
|
|
4478
4459
|
/* @__PURE__ */ a("div", { className: "text-[11px] uppercase tracking-wide text-gray-500", children: "Quantity" }),
|
|
4479
|
-
/* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children:
|
|
4460
|
+
/* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: te })
|
|
4480
4461
|
] }),
|
|
4481
4462
|
/* @__PURE__ */ c("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-white p-3 text-center", children: [
|
|
4482
4463
|
/* @__PURE__ */ a("div", { className: "text-[11px] uppercase tracking-wide text-gray-500", children: "Subtotal" }),
|
|
4483
|
-
/* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: $e(
|
|
4464
|
+
/* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: $e(Ie, v) })
|
|
4484
4465
|
] })
|
|
4485
4466
|
] })
|
|
4486
4467
|
] })
|
|
@@ -4489,29 +4470,29 @@ const Je = "USD", kn = (e) => {
|
|
|
4489
4470
|
/* @__PURE__ */ c("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-3 mb-3", children: [
|
|
4490
4471
|
/* @__PURE__ */ c("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
|
|
4491
4472
|
/* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "🏠 Address" }),
|
|
4492
|
-
/* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children:
|
|
4473
|
+
/* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: ye })
|
|
4493
4474
|
] }),
|
|
4494
4475
|
/* @__PURE__ */ c("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
|
|
4495
4476
|
/* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "💳 Payment" }),
|
|
4496
|
-
/* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children:
|
|
4477
|
+
/* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: mt })
|
|
4497
4478
|
] }),
|
|
4498
4479
|
/* @__PURE__ */ c("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
|
|
4499
4480
|
/* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "🚚 Delivery" }),
|
|
4500
|
-
/* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: f != null && f.delivery && ((
|
|
4481
|
+
/* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: f != null && f.delivery && ((nt = at[f.delivery]) == null ? void 0 : nt.label) || "—" })
|
|
4501
4482
|
] })
|
|
4502
4483
|
] }),
|
|
4503
4484
|
/* @__PURE__ */ c("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-3", children: [
|
|
4504
4485
|
/* @__PURE__ */ c("div", { className: "flex flex-col items-center justify-center rounded-xl border border-gray-200 bg-gray-50 p-4 text-center", children: [
|
|
4505
4486
|
/* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "💰 any(s)" }),
|
|
4506
|
-
/* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: $e(
|
|
4487
|
+
/* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: $e(X, v) })
|
|
4507
4488
|
] }),
|
|
4508
4489
|
/* @__PURE__ */ c("div", { className: "flex flex-col items-center justify-center rounded-xl border border-gray-200 bg-gray-50 p-4 text-center", children: [
|
|
4509
4490
|
/* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "🏛️ Taxes" }),
|
|
4510
|
-
/* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: $e(
|
|
4491
|
+
/* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: $e(Fe, v) })
|
|
4511
4492
|
] }),
|
|
4512
4493
|
/* @__PURE__ */ c("div", { className: "flex flex-col items-center justify-center rounded-xl border border-gray-200 bg-gray-50 p-4 text-center", children: [
|
|
4513
4494
|
/* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "🚚 Shipping" }),
|
|
4514
|
-
/* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: $e(
|
|
4495
|
+
/* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: $e(ce, v) })
|
|
4515
4496
|
] })
|
|
4516
4497
|
] }),
|
|
4517
4498
|
/* @__PURE__ */ c(
|
|
@@ -4521,15 +4502,15 @@ const Je = "USD", kn = (e) => {
|
|
|
4521
4502
|
style: { background: Dt },
|
|
4522
4503
|
children: [
|
|
4523
4504
|
/* @__PURE__ */ a("div", { className: "text-sm/5 opacity-95", children: "🔹 Total Payable" }),
|
|
4524
|
-
/* @__PURE__ */ a("div", { className: "mt-1 text-3xl font-extrabold tracking-tight", children: $e(
|
|
4505
|
+
/* @__PURE__ */ a("div", { className: "mt-1 text-3xl font-extrabold tracking-tight", children: $e(X + Fe + ce, v) })
|
|
4525
4506
|
]
|
|
4526
4507
|
}
|
|
4527
4508
|
)
|
|
4528
4509
|
] }),
|
|
4529
4510
|
!m && /* @__PURE__ */ c("div", { className: "px-6 pb-5", children: [
|
|
4530
|
-
!
|
|
4531
|
-
|
|
4532
|
-
h && !
|
|
4511
|
+
!ie && /* @__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?" }),
|
|
4512
|
+
ie && Lr({ intentMandateId: le }),
|
|
4513
|
+
h && !ie && /* @__PURE__ */ c("div", { className: "mt-4 flex flex-wrap items-center justify-center gap-3", children: [
|
|
4533
4514
|
/* @__PURE__ */ a(
|
|
4534
4515
|
"button",
|
|
4535
4516
|
{
|
|
@@ -4559,7 +4540,7 @@ const Je = "USD", kn = (e) => {
|
|
|
4559
4540
|
u.street,
|
|
4560
4541
|
[u.city, u.state, u.postalCode].filter(Boolean).join(", "),
|
|
4561
4542
|
u.country
|
|
4562
|
-
].filter((f) => !!f).map((f) =>
|
|
4543
|
+
].filter((f) => !!f).map((f) => Xe(f)).join(", ");
|
|
4563
4544
|
return /* @__PURE__ */ a(
|
|
4564
4545
|
"div",
|
|
4565
4546
|
{
|
|
@@ -4567,7 +4548,7 @@ const Je = "USD", kn = (e) => {
|
|
|
4567
4548
|
style: { backgroundColor: "var(--tanya-light)" },
|
|
4568
4549
|
children: /* @__PURE__ */ c("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
|
|
4569
4550
|
/* @__PURE__ */ c("div", { className: "flex items-center gap-2 mb-2", children: [
|
|
4570
|
-
/* @__PURE__ */ a(
|
|
4551
|
+
/* @__PURE__ */ a(ae, { icon: "mdi:home-map-marker", width: "20", color: Ce }),
|
|
4571
4552
|
/* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: "Delivery Address" })
|
|
4572
4553
|
] }),
|
|
4573
4554
|
/* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: m })
|
|
@@ -4575,7 +4556,7 @@ const Je = "USD", kn = (e) => {
|
|
|
4575
4556
|
}
|
|
4576
4557
|
);
|
|
4577
4558
|
}, Eo = (u) => {
|
|
4578
|
-
const m = u == null ? void 0 : u.method, f = m ?
|
|
4559
|
+
const m = u == null ? void 0 : u.method, f = m ? at[m] : void 0;
|
|
4579
4560
|
return /* @__PURE__ */ a(
|
|
4580
4561
|
"div",
|
|
4581
4562
|
{
|
|
@@ -4583,12 +4564,12 @@ const Je = "USD", kn = (e) => {
|
|
|
4583
4564
|
style: { backgroundColor: "var(--tanya-light)" },
|
|
4584
4565
|
children: /* @__PURE__ */ c("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
|
|
4585
4566
|
/* @__PURE__ */ c("div", { className: "flex items-center gap-2 mb-1", children: [
|
|
4586
|
-
/* @__PURE__ */ a(
|
|
4567
|
+
/* @__PURE__ */ a(ae, { icon: "mdi:truck-delivery", width: "20", color: Ce }),
|
|
4587
4568
|
/* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: "Delivery Method" })
|
|
4588
4569
|
] }),
|
|
4589
|
-
/* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: f ? /* @__PURE__ */ c(
|
|
4570
|
+
/* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: f ? /* @__PURE__ */ c(ke, { children: [
|
|
4590
4571
|
/* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
|
|
4591
|
-
/* @__PURE__ */ a(
|
|
4572
|
+
/* @__PURE__ */ a(ae, { icon: f.icon, width: "18" }),
|
|
4592
4573
|
/* @__PURE__ */ a("span", { className: "font-medium", children: f.label })
|
|
4593
4574
|
] }),
|
|
4594
4575
|
/* @__PURE__ */ a("div", { className: "text-gray-600", children: f.subtitle })
|
|
@@ -4606,26 +4587,26 @@ const Je = "USD", kn = (e) => {
|
|
|
4606
4587
|
children: /* @__PURE__ */ c("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
|
|
4607
4588
|
/* @__PURE__ */ c("div", { className: "flex items-center gap-2 mb-1", children: [
|
|
4608
4589
|
/* @__PURE__ */ a(
|
|
4609
|
-
|
|
4590
|
+
ae,
|
|
4610
4591
|
{
|
|
4611
4592
|
icon: "mdi:credit-card-outline",
|
|
4612
4593
|
width: "20",
|
|
4613
|
-
color:
|
|
4594
|
+
color: Ce
|
|
4614
4595
|
}
|
|
4615
4596
|
),
|
|
4616
4597
|
/* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: "Payment Method" })
|
|
4617
4598
|
] }),
|
|
4618
|
-
/* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: m === "card" ? /* @__PURE__ */ c(
|
|
4599
|
+
/* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: m === "card" ? /* @__PURE__ */ c(ke, { children: [
|
|
4619
4600
|
"Credit Card — Mastercard",
|
|
4620
4601
|
/* @__PURE__ */ a("br", {}),
|
|
4621
4602
|
"•••• 7820 Exp: 12/26"
|
|
4622
|
-
] }) :
|
|
4603
|
+
] }) : Xe(m) })
|
|
4623
4604
|
] })
|
|
4624
4605
|
}
|
|
4625
4606
|
);
|
|
4626
4607
|
}, Ao = (u, m) => {
|
|
4627
4608
|
const f = u.snapshotStage;
|
|
4628
|
-
if (!f || f === "address" &&
|
|
4609
|
+
if (!f || f === "address" && we || f === "delivery" && H || f === "payment" && Oe || f === "final" && Ae)
|
|
4629
4610
|
return null;
|
|
4630
4611
|
switch (f) {
|
|
4631
4612
|
case "initial":
|
|
@@ -4637,7 +4618,7 @@ const Je = "USD", kn = (e) => {
|
|
|
4637
4618
|
case "payment":
|
|
4638
4619
|
return Oo(u.snapshotPayload);
|
|
4639
4620
|
case "final":
|
|
4640
|
-
return
|
|
4621
|
+
return Vr(u.snapshotPayload, !m);
|
|
4641
4622
|
case "success":
|
|
4642
4623
|
return Lr(u.snapshotPayload);
|
|
4643
4624
|
default:
|
|
@@ -4717,7 +4698,7 @@ const Je = "USD", kn = (e) => {
|
|
|
4717
4698
|
margin: "0.75rem"
|
|
4718
4699
|
},
|
|
4719
4700
|
children: /* @__PURE__ */ a(
|
|
4720
|
-
|
|
4701
|
+
ae,
|
|
4721
4702
|
{
|
|
4722
4703
|
icon: "fluent:dismiss-24-filled",
|
|
4723
4704
|
color: "#ffffff",
|
|
@@ -4735,7 +4716,7 @@ const Je = "USD", kn = (e) => {
|
|
|
4735
4716
|
/* @__PURE__ */ c(
|
|
4736
4717
|
"div",
|
|
4737
4718
|
{
|
|
4738
|
-
ref:
|
|
4719
|
+
ref: Ge,
|
|
4739
4720
|
className: "overflow-y-auto pr-5 pb-4 space-y-4 hide-scrollbar flex-grow",
|
|
4740
4721
|
children: [
|
|
4741
4722
|
/* @__PURE__ */ c(
|
|
@@ -4755,10 +4736,10 @@ const Je = "USD", kn = (e) => {
|
|
|
4755
4736
|
}
|
|
4756
4737
|
),
|
|
4757
4738
|
/* @__PURE__ */ a(Po, {}),
|
|
4758
|
-
|
|
4759
|
-
|
|
4739
|
+
b > 1 && /* @__PURE__ */ a(Rr, { showSubmit: !1 }),
|
|
4740
|
+
Ke.map((u, m) => {
|
|
4760
4741
|
var F;
|
|
4761
|
-
const f = m ===
|
|
4742
|
+
const f = m === Ke.length - 1, v = !!u.snapshotStage;
|
|
4762
4743
|
return /* @__PURE__ */ c("div", { children: [
|
|
4763
4744
|
u.query && /* @__PURE__ */ a("div", { className: "flex justify-end", children: /* @__PURE__ */ a(
|
|
4764
4745
|
"p",
|
|
@@ -4782,14 +4763,14 @@ const Je = "USD", kn = (e) => {
|
|
|
4782
4763
|
children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ a("p", { children: u.snapshotPayload.text }) })
|
|
4783
4764
|
}
|
|
4784
4765
|
) }),
|
|
4785
|
-
f &&
|
|
4766
|
+
f && K && b > 1 && /* @__PURE__ */ c("div", { className: "mx-4 mt-2 rounded-xl border border-gray-200 bg-white p-4 animate-fade-in", children: [
|
|
4786
4767
|
/* @__PURE__ */ c("div", { className: "text-sm text-gray-800", children: [
|
|
4787
4768
|
"Proceed with color:",
|
|
4788
4769
|
" ",
|
|
4789
|
-
/* @__PURE__ */ a("span", { className: "font-semibold", children:
|
|
4770
|
+
/* @__PURE__ */ a("span", { className: "font-semibold", children: Re(w) || "—" }),
|
|
4790
4771
|
", size:",
|
|
4791
4772
|
" ",
|
|
4792
|
-
/* @__PURE__ */ a("span", { className: "font-semibold", children:
|
|
4773
|
+
/* @__PURE__ */ a("span", { className: "font-semibold", children: Ze(w) || "—" }),
|
|
4793
4774
|
"?"
|
|
4794
4775
|
] }),
|
|
4795
4776
|
/* @__PURE__ */ c("div", { className: "mt-3 flex gap-3", children: [
|
|
@@ -4798,7 +4779,7 @@ const Je = "USD", kn = (e) => {
|
|
|
4798
4779
|
{
|
|
4799
4780
|
onClick: wo,
|
|
4800
4781
|
className: "px-5 py-2 rounded-full text-white font-semibold",
|
|
4801
|
-
style: { background:
|
|
4782
|
+
style: { background: Ce },
|
|
4802
4783
|
children: "Yes"
|
|
4803
4784
|
}
|
|
4804
4785
|
),
|
|
@@ -4808,16 +4789,16 @@ const Je = "USD", kn = (e) => {
|
|
|
4808
4789
|
onClick: yo,
|
|
4809
4790
|
className: "px-5 py-2 rounded-full font-semibold border",
|
|
4810
4791
|
style: {
|
|
4811
|
-
borderColor:
|
|
4812
|
-
color:
|
|
4792
|
+
borderColor: Ce,
|
|
4793
|
+
color: Ce
|
|
4813
4794
|
},
|
|
4814
4795
|
children: "No, change SKU"
|
|
4815
4796
|
}
|
|
4816
4797
|
)
|
|
4817
4798
|
] })
|
|
4818
4799
|
] }),
|
|
4819
|
-
f &&
|
|
4820
|
-
f &&
|
|
4800
|
+
f && be && /* @__PURE__ */ a(Rr, { showSubmit: !0 }),
|
|
4801
|
+
f && Te && /* @__PURE__ */ a("div", { className: "mt-4", children: /* @__PURE__ */ a(
|
|
4821
4802
|
"div",
|
|
4822
4803
|
{
|
|
4823
4804
|
className: "text-sm text-tanya-contrast px-7 py-4 rounded-r-xl rounded-bl-2xl w-full",
|
|
@@ -4828,7 +4809,7 @@ const Je = "USD", kn = (e) => {
|
|
|
4828
4809
|
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…" }) })
|
|
4829
4810
|
}
|
|
4830
4811
|
) }),
|
|
4831
|
-
(v || u.response === "__CARD__") && (!
|
|
4812
|
+
(v || u.response === "__CARD__") && (!Te || !f) && /* @__PURE__ */ a(
|
|
4832
4813
|
"div",
|
|
4833
4814
|
{
|
|
4834
4815
|
className: "mt-6 mb-4 mx-4 animate-fade-in",
|
|
@@ -4846,11 +4827,11 @@ const Je = "USD", kn = (e) => {
|
|
|
4846
4827
|
)
|
|
4847
4828
|
] }, m);
|
|
4848
4829
|
}),
|
|
4849
|
-
|
|
4830
|
+
we && /* @__PURE__ */ c("div", { className: "mt-6 mb-6 mx-6 rounded-xl p-6 shadow-md border border-gray-200 bg-white animate-fade-in", children: [
|
|
4850
4831
|
/* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
|
|
4851
4832
|
/* @__PURE__ */ c("h3", { className: "font-semibold text-lg text-gray-800 flex items-center gap-2", children: [
|
|
4852
4833
|
/* @__PURE__ */ a(
|
|
4853
|
-
|
|
4834
|
+
ae,
|
|
4854
4835
|
{
|
|
4855
4836
|
icon: "mdi:home-map-marker",
|
|
4856
4837
|
width: "24",
|
|
@@ -4859,9 +4840,9 @@ const Je = "USD", kn = (e) => {
|
|
|
4859
4840
|
),
|
|
4860
4841
|
"Select a Delivery Address"
|
|
4861
4842
|
] }),
|
|
4862
|
-
|
|
4843
|
+
E && /* @__PURE__ */ c(ke, { children: [
|
|
4863
4844
|
/* @__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
|
-
!
|
|
4845
|
+
!ie && /* @__PURE__ */ a(
|
|
4865
4846
|
"button",
|
|
4866
4847
|
{
|
|
4867
4848
|
onClick: ko,
|
|
@@ -4886,18 +4867,18 @@ const Je = "USD", kn = (e) => {
|
|
|
4886
4867
|
}
|
|
4887
4868
|
),
|
|
4888
4869
|
/* @__PURE__ */ a("p", { className: "ml-3 text-gray-600", children: "Fetching your addresses..." })
|
|
4889
|
-
] }) :
|
|
4870
|
+
] }) : D.length > 0 ? /* @__PURE__ */ c(
|
|
4890
4871
|
"div",
|
|
4891
4872
|
{
|
|
4892
|
-
className: `space-y-3 ${
|
|
4873
|
+
className: `space-y-3 ${E ? "opacity-70" : ""}`,
|
|
4893
4874
|
children: [
|
|
4894
|
-
|
|
4895
|
-
const m = [u.addressLine1, u.addressLine2].filter(Boolean).map((
|
|
4875
|
+
D.map((u) => {
|
|
4876
|
+
const m = [u.addressLine1, u.addressLine2].filter(Boolean).map((V) => Xe(V || "")).join(" "), f = Xe(u.city || ""), v = `${Xe(u.state || "")}${u.state && u.postalCode ? ", " : ""}${u.postalCode || ""}`, F = Xe(u.country || ""), y = String(u.addressId ?? u.id), z = vt === y;
|
|
4896
4877
|
return /* @__PURE__ */ c(
|
|
4897
4878
|
"label",
|
|
4898
4879
|
{
|
|
4899
|
-
className: `flex items-start gap-3 p-4 border rounded-lg cursor-pointer transition hover:shadow-sm ${
|
|
4900
|
-
title:
|
|
4880
|
+
className: `flex items-start gap-3 p-4 border rounded-lg cursor-pointer transition hover:shadow-sm ${z ? "border-tanya-light" : "border-gray-300"} ${E ? "pointer-events-none" : ""}`,
|
|
4881
|
+
title: E ? "Address already submitted" : "",
|
|
4901
4882
|
children: [
|
|
4902
4883
|
/* @__PURE__ */ a(
|
|
4903
4884
|
"input",
|
|
@@ -4905,10 +4886,10 @@ const Je = "USD", kn = (e) => {
|
|
|
4905
4886
|
type: "radio",
|
|
4906
4887
|
name: "address",
|
|
4907
4888
|
className: "mt-1 accent-tanya-light",
|
|
4908
|
-
checked:
|
|
4909
|
-
disabled:
|
|
4910
|
-
onChange: () => rr(
|
|
4911
|
-
value:
|
|
4889
|
+
checked: z,
|
|
4890
|
+
disabled: E,
|
|
4891
|
+
onChange: () => rr(y),
|
|
4892
|
+
value: y
|
|
4912
4893
|
}
|
|
4913
4894
|
),
|
|
4914
4895
|
/* @__PURE__ */ c("div", { className: "flex-1", children: [
|
|
@@ -4923,7 +4904,7 @@ const Je = "USD", kn = (e) => {
|
|
|
4923
4904
|
] })
|
|
4924
4905
|
]
|
|
4925
4906
|
},
|
|
4926
|
-
|
|
4907
|
+
y
|
|
4927
4908
|
);
|
|
4928
4909
|
}),
|
|
4929
4910
|
/* @__PURE__ */ c("div", { className: "flex justify-between pt-2", children: [
|
|
@@ -4943,10 +4924,10 @@ const Je = "USD", kn = (e) => {
|
|
|
4943
4924
|
"button",
|
|
4944
4925
|
{
|
|
4945
4926
|
onClick: vo,
|
|
4946
|
-
disabled:
|
|
4947
|
-
className: `px-6 py-2.5 rounded-full font-semibold text-white shadow-md transition-all duration-300 ${
|
|
4948
|
-
style: { background:
|
|
4949
|
-
children:
|
|
4927
|
+
disabled: E,
|
|
4928
|
+
className: `px-6 py-2.5 rounded-full font-semibold text-white shadow-md transition-all duration-300 ${E ? "opacity-60 cursor-not-allowed" : "hover:-translate-y-0.5 hover:shadow-lg"}`,
|
|
4929
|
+
style: { background: Ce },
|
|
4930
|
+
children: E ? "Address Submitted" : "Submit Address"
|
|
4950
4931
|
}
|
|
4951
4932
|
)
|
|
4952
4933
|
] })
|
|
@@ -4954,11 +4935,11 @@ const Je = "USD", kn = (e) => {
|
|
|
4954
4935
|
}
|
|
4955
4936
|
) : /* @__PURE__ */ a("div", { className: "text-center py-8 text-gray-600", children: "No addresses found. Please add a new one in your profile." })
|
|
4956
4937
|
] }),
|
|
4957
|
-
|
|
4938
|
+
H && /* @__PURE__ */ c("div", { className: "mt-2 mb-6 mx-6 rounded-xl p-6 shadow-md border border-gray-200 bg-white animate-fade-in", children: [
|
|
4958
4939
|
/* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
|
|
4959
4940
|
/* @__PURE__ */ c("h3", { className: "font-semibold text-lg text-gray-800 flex items-center gap-2", children: [
|
|
4960
4941
|
/* @__PURE__ */ a(
|
|
4961
|
-
|
|
4942
|
+
ae,
|
|
4962
4943
|
{
|
|
4963
4944
|
icon: "mdi:truck-delivery",
|
|
4964
4945
|
width: "24",
|
|
@@ -4967,9 +4948,9 @@ const Je = "USD", kn = (e) => {
|
|
|
4967
4948
|
),
|
|
4968
4949
|
"Great! Now choose how fast you want it delivered 🚚"
|
|
4969
4950
|
] }),
|
|
4970
|
-
$ && /* @__PURE__ */ c(
|
|
4951
|
+
$ && /* @__PURE__ */ c(ke, { children: [
|
|
4971
4952
|
/* @__PURE__ */ a("span", { className: "ml-2 text-xs px-2 py-1 rounded-full bg-green-100 text-green-700 font-semibold", children: "Selected" }),
|
|
4972
|
-
!
|
|
4953
|
+
!ie && /* @__PURE__ */ a(
|
|
4973
4954
|
"button",
|
|
4974
4955
|
{
|
|
4975
4956
|
onClick: So,
|
|
@@ -4989,9 +4970,9 @@ const Je = "USD", kn = (e) => {
|
|
|
4989
4970
|
"div",
|
|
4990
4971
|
{
|
|
4991
4972
|
className: `space-y-3 ${$ ? "opacity-70" : ""}`,
|
|
4992
|
-
children: Object.keys(
|
|
4973
|
+
children: Object.keys(at).map(
|
|
4993
4974
|
(u) => {
|
|
4994
|
-
const m =
|
|
4975
|
+
const m = at[u], f = G === u;
|
|
4995
4976
|
return /* @__PURE__ */ c(
|
|
4996
4977
|
"label",
|
|
4997
4978
|
{
|
|
@@ -5006,12 +4987,12 @@ const Je = "USD", kn = (e) => {
|
|
|
5006
4987
|
className: "mt-1 accent-tanya-light",
|
|
5007
4988
|
checked: f,
|
|
5008
4989
|
disabled: $,
|
|
5009
|
-
onChange: () =>
|
|
4990
|
+
onChange: () => ne(u)
|
|
5010
4991
|
}
|
|
5011
4992
|
),
|
|
5012
4993
|
/* @__PURE__ */ c("div", { className: "flex-1", children: [
|
|
5013
4994
|
/* @__PURE__ */ c("div", { className: "font-semibold text-gray-800 flex items-center gap-2", children: [
|
|
5014
|
-
/* @__PURE__ */ a(
|
|
4995
|
+
/* @__PURE__ */ a(ae, { icon: m.icon, width: "18" }),
|
|
5015
4996
|
" ",
|
|
5016
4997
|
m.label
|
|
5017
4998
|
] }),
|
|
@@ -5019,7 +5000,7 @@ const Je = "USD", kn = (e) => {
|
|
|
5019
5000
|
] }),
|
|
5020
5001
|
/* @__PURE__ */ a("div", { className: "text-sm font-semibold text-gray-800", children: m.fee === 0 ? "Free" : $e(
|
|
5021
5002
|
m.fee,
|
|
5022
|
-
(
|
|
5003
|
+
(W == null ? void 0 : W.currency) || Ve
|
|
5023
5004
|
) })
|
|
5024
5005
|
]
|
|
5025
5006
|
},
|
|
@@ -5054,11 +5035,11 @@ const Je = "USD", kn = (e) => {
|
|
|
5054
5035
|
)
|
|
5055
5036
|
] })
|
|
5056
5037
|
] }),
|
|
5057
|
-
|
|
5038
|
+
Oe && /* @__PURE__ */ c("div", { className: "mt-2 mb-6 mx-6 rounded-xl p-6 shadow-md border border-gray-200 bg-white animate-fade-in", children: [
|
|
5058
5039
|
/* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
|
|
5059
5040
|
/* @__PURE__ */ c("h3", { className: "font-semibold text-lg text-gray-800 flex items-center gap-2", children: [
|
|
5060
5041
|
/* @__PURE__ */ a(
|
|
5061
|
-
|
|
5042
|
+
ae,
|
|
5062
5043
|
{
|
|
5063
5044
|
icon: "mdi:credit-card-outline",
|
|
5064
5045
|
width: "24",
|
|
@@ -5067,9 +5048,9 @@ const Je = "USD", kn = (e) => {
|
|
|
5067
5048
|
),
|
|
5068
5049
|
"Almost done! 💳"
|
|
5069
5050
|
] }),
|
|
5070
|
-
ee && /* @__PURE__ */ c(
|
|
5051
|
+
ee && /* @__PURE__ */ c(ke, { children: [
|
|
5071
5052
|
/* @__PURE__ */ a("span", { className: "ml-2 text-xs px-2 py-1 rounded-full bg-green-100 text-green-700 font-semibold", children: "Selected" }),
|
|
5072
|
-
!
|
|
5053
|
+
!ie && /* @__PURE__ */ a(
|
|
5073
5054
|
"button",
|
|
5074
5055
|
{
|
|
5075
5056
|
onClick: Io,
|
|
@@ -5092,7 +5073,7 @@ const Je = "USD", kn = (e) => {
|
|
|
5092
5073
|
children: /* @__PURE__ */ c(
|
|
5093
5074
|
"label",
|
|
5094
5075
|
{
|
|
5095
|
-
className: `flex items-start gap-3 p-4 border rounded-lg cursor-pointer transition hover:shadow-sm ${
|
|
5076
|
+
className: `flex items-start gap-3 p-4 border rounded-lg cursor-pointer transition hover:shadow-sm ${se === "card" ? "border-tanya-light" : "border-gray-300"} ${ee ? "pointer-events-none" : ""}`,
|
|
5096
5077
|
title: ee ? "Payment already submitted" : "",
|
|
5097
5078
|
children: [
|
|
5098
5079
|
/* @__PURE__ */ a(
|
|
@@ -5101,18 +5082,18 @@ const Je = "USD", kn = (e) => {
|
|
|
5101
5082
|
type: "radio",
|
|
5102
5083
|
name: "payment",
|
|
5103
5084
|
className: "mt-1 accent-tanya-light",
|
|
5104
|
-
checked:
|
|
5085
|
+
checked: se === "card",
|
|
5105
5086
|
disabled: ee,
|
|
5106
|
-
onChange: () =>
|
|
5087
|
+
onChange: () => Se("card")
|
|
5107
5088
|
}
|
|
5108
5089
|
),
|
|
5109
5090
|
/* @__PURE__ */ c("div", { className: "flex-1", children: [
|
|
5110
5091
|
/* @__PURE__ */ c("div", { className: "font-semibold text-gray-800 flex items-center gap-2", children: [
|
|
5111
|
-
/* @__PURE__ */ a(
|
|
5092
|
+
/* @__PURE__ */ a(ae, { icon: "mdi:credit-card-chip-outline", width: "18" }),
|
|
5112
5093
|
" ",
|
|
5113
5094
|
"Credit Card"
|
|
5114
5095
|
] }),
|
|
5115
|
-
|
|
5096
|
+
se === "card" && /* @__PURE__ */ c("div", { className: "text-sm text-gray-700 mt-1", children: [
|
|
5116
5097
|
"Mastercard •••• 7820",
|
|
5117
5098
|
/* @__PURE__ */ a("br", {}),
|
|
5118
5099
|
"Expiry: 12/26"
|
|
@@ -5148,15 +5129,15 @@ const Je = "USD", kn = (e) => {
|
|
|
5148
5129
|
)
|
|
5149
5130
|
] })
|
|
5150
5131
|
] }),
|
|
5151
|
-
|
|
5132
|
+
Ae && Vr(
|
|
5152
5133
|
{
|
|
5153
|
-
...
|
|
5134
|
+
...W,
|
|
5154
5135
|
address: JSON.parse(
|
|
5155
5136
|
localStorage.getItem("agentic_order_address") || "null"
|
|
5156
5137
|
),
|
|
5157
5138
|
delivery: localStorage.getItem("agentic_order_delivery"),
|
|
5158
5139
|
payment: localStorage.getItem("agentic_order_payment"),
|
|
5159
|
-
summary: Mr(
|
|
5140
|
+
summary: Mr(W == null ? void 0 : W.currency)
|
|
5160
5141
|
},
|
|
5161
5142
|
!1
|
|
5162
5143
|
)
|
|
@@ -5171,29 +5152,29 @@ const Je = "USD", kn = (e) => {
|
|
|
5171
5152
|
disabled: go,
|
|
5172
5153
|
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
|
|
5173
5154
|
${Ct ? "" : "placeholder:text-red-400 text-red-500"}`,
|
|
5174
|
-
value:
|
|
5155
|
+
value: ge,
|
|
5175
5156
|
onKeyDown: (u) => {
|
|
5176
|
-
u.key === "Enter" && !
|
|
5157
|
+
u.key === "Enter" && !Te && !j && Br();
|
|
5177
5158
|
},
|
|
5178
|
-
onChange: (u) =>
|
|
5159
|
+
onChange: (u) => U(u.target.value)
|
|
5179
5160
|
}
|
|
5180
5161
|
),
|
|
5181
5162
|
/* @__PURE__ */ a(
|
|
5182
5163
|
"button",
|
|
5183
5164
|
{
|
|
5184
5165
|
type: "submit",
|
|
5185
|
-
disabled:
|
|
5166
|
+
disabled: Te || j,
|
|
5186
5167
|
className: "mr-6 font-medium",
|
|
5187
5168
|
style: { color: "var(--tanya-light)" },
|
|
5188
5169
|
onClick: () => Br(),
|
|
5189
|
-
children:
|
|
5170
|
+
children: Te ? /* @__PURE__ */ a(
|
|
5190
5171
|
"div",
|
|
5191
5172
|
{
|
|
5192
5173
|
className: "m-3 animate-spin rounded-full h-6 w-6 border-b-2",
|
|
5193
5174
|
style: { borderBottom: "2px solid" }
|
|
5194
5175
|
}
|
|
5195
5176
|
) : /* @__PURE__ */ a(
|
|
5196
|
-
|
|
5177
|
+
ae,
|
|
5197
5178
|
{
|
|
5198
5179
|
icon: "fluent:send-48-filled",
|
|
5199
5180
|
color: "var(--tanya-light)",
|