@wallavi/widget 1.11.1 → 1.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +56 -7
- package/dist/index.d.ts +56 -7
- package/dist/index.js +1063 -514
- package/dist/index.mjs +1061 -515
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -58,7 +58,7 @@ function styleInject(css, { insertAt } = {}) {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
// src/styles.css
|
|
61
|
-
styleInject(".ww-pointer-events-none {\n pointer-events: none;\n}\n.ww-absolute {\n position: absolute;\n}\n.ww-relative {\n position: relative;\n}\n.ww-inset-0 {\n inset: 0px;\n}\n.ww-inset-4 {\n inset: 1rem;\n}\n.ww-inset-8 {\n inset: 2rem;\n}\n.ww-left-2\\.5 {\n left: 0.625rem;\n}\n.ww-top-1\\/2 {\n top: 50%;\n}\n.ww-z-50 {\n z-index: 50;\n}\n.ww-z-\\[100\\] {\n z-index: 100;\n}\n.ww-mx-0\\.5 {\n margin-left: 0.125rem;\n margin-right: 0.125rem;\n}\n.ww-mb-1 {\n margin-bottom: 0.25rem;\n}\n.ww-mb-12 {\n margin-bottom: 3rem;\n}\n.ww-mb-2 {\n margin-bottom: 0.5rem;\n}\n.ww-ml-0\\.5 {\n margin-left: 0.125rem;\n}\n.ww-ml-1 {\n margin-left: 0.25rem;\n}\n.ww-mt-0\\.5 {\n margin-top: 0.125rem;\n}\n.ww-mt-1 {\n margin-top: 0.25rem;\n}\n.ww-mt-2 {\n margin-top: 0.5rem;\n}\n.ww-line-clamp-2 {\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n}\n.ww-block {\n display: block;\n}\n.ww-inline-block {\n display: inline-block;\n}\n.ww-flex {\n display: flex;\n}\n.ww-inline-flex {\n display: inline-flex;\n}\n.ww-grid {\n display: grid;\n}\n.ww-hidden {\n display: none;\n}\n.ww-h-1\\.5 {\n height: 0.375rem;\n}\n.ww-h-10 {\n height: 2.5rem;\n}\n.ww-h-16 {\n height: 4rem;\n}\n.ww-h-2 {\n height: 0.5rem;\n}\n.ww-h-2\\.5 {\n height: 0.625rem;\n}\n.ww-h-20 {\n height: 5rem;\n}\n.ww-h-3 {\n height: 0.75rem;\n}\n.ww-h-3\\.5 {\n height: 0.875rem;\n}\n.ww-h-4 {\n height: 1rem;\n}\n.ww-h-40 {\n height: 10rem;\n}\n.ww-h-48 {\n height: 12rem;\n}\n.ww-h-6 {\n height: 1.5rem;\n}\n.ww-h-7 {\n height: 1.75rem;\n}\n.ww-h-8 {\n height: 2rem;\n}\n.ww-h-full {\n height: 100%;\n}\n.ww-max-h-32 {\n max-height: 8rem;\n}\n.ww-max-h-48 {\n max-height: 12rem;\n}\n.ww-max-h-\\[168px\\] {\n max-height: 168px;\n}\n.ww-max-h-\\[180px\\] {\n max-height: 180px;\n}\n.ww-min-h-\\[22px\\] {\n min-height: 22px;\n}\n.ww-w-0\\.5 {\n width: 0.125rem;\n}\n.ww-w-1\\.5 {\n width: 0.375rem;\n}\n.ww-w-10 {\n width: 2.5rem;\n}\n.ww-w-16 {\n width: 4rem;\n}\n.ww-w-2 {\n width: 0.5rem;\n}\n.ww-w-2\\.5 {\n width: 0.625rem;\n}\n.ww-w-20 {\n width: 5rem;\n}\n.ww-w-3 {\n width: 0.75rem;\n}\n.ww-w-3\\.5 {\n width: 0.875rem;\n}\n.ww-w-4 {\n width: 1rem;\n}\n.ww-w-48 {\n width: 12rem;\n}\n.ww-w-6 {\n width: 1.5rem;\n}\n.ww-w-7 {\n width: 1.75rem;\n}\n.ww-w-8 {\n width: 2rem;\n}\n.ww-w-\\[280px\\] {\n width: 280px;\n}\n.ww-w-fit {\n width: -moz-fit-content;\n width: fit-content;\n}\n.ww-w-full {\n width: 100%;\n}\n.ww-min-w-0 {\n min-width: 0px;\n}\n.ww-max-w-\\[120px\\] {\n max-width: 120px;\n}\n.ww-max-w-\\[200px\\] {\n max-width: 200px;\n}\n.ww-max-w-\\[78\\%\\] {\n max-width: 78%;\n}\n.ww-max-w-\\[82\\%\\] {\n max-width: 82%;\n}\n.ww-max-w-full {\n max-width: 100%;\n}\n.ww-max-w-none {\n max-width: none;\n}\n.ww-flex-1 {\n flex: 1 1 0%;\n}\n.ww-shrink-0 {\n flex-shrink: 0;\n}\n.ww-rotate-180 {\n --tw-rotate: 180deg;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.ww-scale-100 {\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.ww-scale-105 {\n --tw-scale-x: 1.05;\n --tw-scale-y: 1.05;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.ww-scale-110 {\n --tw-scale-x: 1.1;\n --tw-scale-y: 1.1;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.ww-scale-90 {\n --tw-scale-x: .9;\n --tw-scale-y: .9;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n@keyframes ww-ping {\n 75%, 100% {\n transform: scale(2);\n opacity: 0;\n }\n}\n.ww-animate-ping {\n animation: ww-ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;\n}\n@keyframes ww-pulse {\n 50% {\n opacity: .5;\n }\n}\n.ww-animate-pulse {\n animation: ww-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n}\n@keyframes ww-spin {\n to {\n transform: rotate(360deg);\n }\n}\n.ww-animate-spin {\n animation: ww-spin 1s linear infinite;\n}\n.ww-cursor-default {\n cursor: default;\n}\n.ww-cursor-pointer {\n cursor: pointer;\n}\n.ww-touch-none {\n touch-action: none;\n}\n.ww-select-none {\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n.ww-select-all {\n -webkit-user-select: all;\n -moz-user-select: all;\n user-select: all;\n}\n.ww-grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n.ww-flex-row {\n flex-direction: row;\n}\n.ww-flex-col {\n flex-direction: column;\n}\n.ww-flex-wrap {\n flex-wrap: wrap;\n}\n.ww-items-start {\n align-items: flex-start;\n}\n.ww-items-end {\n align-items: flex-end;\n}\n.ww-items-center {\n align-items: center;\n}\n.ww-justify-end {\n justify-content: flex-end;\n}\n.ww-justify-center {\n justify-content: center;\n}\n.ww-justify-between {\n justify-content: space-between;\n}\n.ww-gap-0\\.5 {\n gap: 0.125rem;\n}\n.ww-gap-1 {\n gap: 0.25rem;\n}\n.ww-gap-1\\.5 {\n gap: 0.375rem;\n}\n.ww-gap-2 {\n gap: 0.5rem;\n}\n.ww-gap-2\\.5 {\n gap: 0.625rem;\n}\n.ww-gap-4 {\n gap: 1rem;\n}\n.ww-gap-5 {\n gap: 1.25rem;\n}\n.ww-gap-6 {\n gap: 1.5rem;\n}\n.ww-gap-8 {\n gap: 2rem;\n}\n.ww-divide-y > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-y-reverse: 0;\n border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));\n border-bottom-width: calc(1px * var(--tw-divide-y-reverse));\n}\n.ww-divide-border\\/40 > :not([hidden]) ~ :not([hidden]) {\n border-color: hsl(var(--border) / 0.4);\n}\n.ww-overflow-hidden {\n overflow: hidden;\n}\n.ww-overflow-y-auto {\n overflow-y: auto;\n}\n.ww-overscroll-contain {\n overscroll-behavior: contain;\n}\n.ww-overscroll-none {\n overscroll-behavior: none;\n}\n.ww-truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.ww-whitespace-pre-wrap {\n white-space: pre-wrap;\n}\n.ww-rounded {\n border-radius: 0.25rem;\n}\n.ww-rounded-2xl {\n border-radius: 1rem;\n}\n.ww-rounded-full {\n border-radius: 9999px;\n}\n.ww-rounded-lg {\n border-radius: var(--radius);\n}\n.ww-rounded-md {\n border-radius: calc(var(--radius) - 2px);\n}\n.ww-rounded-xl {\n border-radius: 0.75rem;\n}\n.ww-rounded-tl-none {\n border-top-left-radius: 0px;\n}\n.ww-rounded-tl-sm {\n border-top-left-radius: calc(var(--radius) - 4px);\n}\n.ww-rounded-tr-sm {\n border-top-right-radius: calc(var(--radius) - 4px);\n}\n.ww-border {\n border-width: 1px;\n}\n.ww-border-2 {\n border-width: 2px;\n}\n.ww-border-b {\n border-bottom-width: 1px;\n}\n.ww-border-l {\n border-left-width: 1px;\n}\n.ww-border-l-2 {\n border-left-width: 2px;\n}\n.ww-border-t {\n border-top-width: 1px;\n}\n.ww-border-background {\n border-color: hsl(var(--background));\n}\n.ww-border-black\\/10 {\n border-color: rgb(0 0 0 / 0.1);\n}\n.ww-border-border {\n border-color: hsl(var(--border));\n}\n.ww-border-border\\/30 {\n border-color: hsl(var(--border) / 0.3);\n}\n.ww-border-border\\/40 {\n border-color: hsl(var(--border) / 0.4);\n}\n.ww-border-border\\/50 {\n border-color: hsl(var(--border) / 0.5);\n}\n.ww-border-border\\/60 {\n border-color: hsl(var(--border) / 0.6);\n}\n.ww-border-border\\/80 {\n border-color: hsl(var(--border) / 0.8);\n}\n.ww-border-muted {\n border-color: hsl(var(--muted));\n}\n.ww-border-muted-foreground\\/30 {\n border-color: hsl(var(--muted-foreground) / 0.3);\n}\n.ww-border-primary\\/10 {\n border-color: hsl(var(--primary) / 0.1);\n}\n.ww-border-primary\\/20 {\n border-color: hsl(var(--primary) / 0.2);\n}\n.ww-border-red-200 {\n --tw-border-opacity: 1;\n border-color: rgb(254 202 202 / var(--tw-border-opacity, 1));\n}\n.ww-border-transparent {\n border-color: transparent;\n}\n.ww-border-white\\/20 {\n border-color: rgb(255 255 255 / 0.2);\n}\n.ww-border-white\\/30 {\n border-color: rgb(255 255 255 / 0.3);\n}\n.ww-bg-background {\n background-color: hsl(var(--background));\n}\n.ww-bg-background\\/20 {\n background-color: hsl(var(--background) / 0.2);\n}\n.ww-bg-background\\/90 {\n background-color: hsl(var(--background) / 0.9);\n}\n.ww-bg-background\\/95 {\n background-color: hsl(var(--background) / 0.95);\n}\n.ww-bg-black\\/10 {\n background-color: rgb(0 0 0 / 0.1);\n}\n.ww-bg-emerald-400 {\n --tw-bg-opacity: 1;\n background-color: rgb(52 211 153 / var(--tw-bg-opacity, 1));\n}\n.ww-bg-emerald-500 {\n --tw-bg-opacity: 1;\n background-color: rgb(16 185 129 / var(--tw-bg-opacity, 1));\n}\n.ww-bg-emerald-500\\/10 {\n background-color: rgb(16 185 129 / 0.1);\n}\n.ww-bg-emerald-500\\/20 {\n background-color: rgb(16 185 129 / 0.2);\n}\n.ww-bg-foreground\\/20 {\n background-color: hsl(var(--foreground) / 0.2);\n}\n.ww-bg-foreground\\/5 {\n background-color: hsl(var(--foreground) / 0.05);\n}\n.ww-bg-foreground\\/60 {\n background-color: hsl(var(--foreground) / 0.6);\n}\n.ww-bg-muted {\n background-color: hsl(var(--muted));\n}\n.ww-bg-muted-foreground\\/10 {\n background-color: hsl(var(--muted-foreground) / 0.1);\n}\n.ww-bg-muted\\/10 {\n background-color: hsl(var(--muted) / 0.1);\n}\n.ww-bg-muted\\/30 {\n background-color: hsl(var(--muted) / 0.3);\n}\n.ww-bg-muted\\/40 {\n background-color: hsl(var(--muted) / 0.4);\n}\n.ww-bg-muted\\/50 {\n background-color: hsl(var(--muted) / 0.5);\n}\n.ww-bg-muted\\/60 {\n background-color: hsl(var(--muted) / 0.6);\n}\n.ww-bg-primary {\n background-color: hsl(var(--primary));\n}\n.ww-bg-primary\\/10 {\n background-color: hsl(var(--primary) / 0.1);\n}\n.ww-bg-primary\\/5 {\n background-color: hsl(var(--primary) / 0.05);\n}\n.ww-bg-purple-500\\/20 {\n background-color: rgb(168 85 247 / 0.2);\n}\n.ww-bg-purple-500\\/30 {\n background-color: rgb(168 85 247 / 0.3);\n}\n.ww-bg-red-50 {\n --tw-bg-opacity: 1;\n background-color: rgb(254 242 242 / var(--tw-bg-opacity, 1));\n}\n.ww-bg-transparent {\n background-color: transparent;\n}\n.ww-bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));\n}\n.ww-bg-white\\/10 {\n background-color: rgb(255 255 255 / 0.1);\n}\n.ww-bg-white\\/15 {\n background-color: rgb(255 255 255 / 0.15);\n}\n.ww-bg-white\\/20 {\n background-color: rgb(255 255 255 / 0.2);\n}\n.ww-fill-current {\n fill: currentColor;\n}\n.ww-object-cover {\n -o-object-fit: cover;\n object-fit: cover;\n}\n.ww-p-0\\.5 {\n padding: 0.125rem;\n}\n.ww-p-1\\.5 {\n padding: 0.375rem;\n}\n.ww-p-2\\.5 {\n padding: 0.625rem;\n}\n.ww-p-3 {\n padding: 0.75rem;\n}\n.ww-p-4 {\n padding: 1rem;\n}\n.ww-px-1 {\n padding-left: 0.25rem;\n padding-right: 0.25rem;\n}\n.ww-px-2 {\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n}\n.ww-px-2\\.5 {\n padding-left: 0.625rem;\n padding-right: 0.625rem;\n}\n.ww-px-3 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n.ww-px-3\\.5 {\n padding-left: 0.875rem;\n padding-right: 0.875rem;\n}\n.ww-px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n.ww-py-0\\.5 {\n padding-top: 0.125rem;\n padding-bottom: 0.125rem;\n}\n.ww-py-1 {\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n}\n.ww-py-1\\.5 {\n padding-top: 0.375rem;\n padding-bottom: 0.375rem;\n}\n.ww-py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.ww-py-2\\.5 {\n padding-top: 0.625rem;\n padding-bottom: 0.625rem;\n}\n.ww-py-3 {\n padding-top: 0.75rem;\n padding-bottom: 0.75rem;\n}\n.ww-py-4 {\n padding-top: 1rem;\n padding-bottom: 1rem;\n}\n.ww-pb-1\\.5 {\n padding-bottom: 0.375rem;\n}\n.ww-pb-2 {\n padding-bottom: 0.5rem;\n}\n.ww-pb-4 {\n padding-bottom: 1rem;\n}\n.ww-pl-2 {\n padding-left: 0.5rem;\n}\n.ww-pl-7 {\n padding-left: 1.75rem;\n}\n.ww-pr-0\\.5 {\n padding-right: 0.125rem;\n}\n.ww-pr-3 {\n padding-right: 0.75rem;\n}\n.ww-pt-2 {\n padding-top: 0.5rem;\n}\n.ww-pt-2\\.5 {\n padding-top: 0.625rem;\n}\n.ww-pt-5 {\n padding-top: 1.25rem;\n}\n.ww-text-left {\n text-align: left;\n}\n.ww-text-center {\n text-align: center;\n}\n.ww-align-middle {\n vertical-align: middle;\n}\n.ww-text-\\[10\\.5px\\] {\n font-size: 10.5px;\n}\n.ww-text-\\[10px\\] {\n font-size: 10px;\n}\n.ww-text-\\[11px\\] {\n font-size: 11px;\n}\n.ww-text-\\[12\\.5px\\] {\n font-size: 12.5px;\n}\n.ww-text-\\[13px\\] {\n font-size: 13px;\n}\n.ww-text-\\[8px\\] {\n font-size: 8px;\n}\n.ww-text-\\[9px\\] {\n font-size: 9px;\n}\n.ww-text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.ww-text-xs {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n.ww-font-bold {\n font-weight: 700;\n}\n.ww-font-medium {\n font-weight: 500;\n}\n.ww-font-semibold {\n font-weight: 600;\n}\n.ww-uppercase {\n text-transform: uppercase;\n}\n.ww-italic {\n font-style: italic;\n}\n.ww-leading-none {\n line-height: 1;\n}\n.ww-leading-relaxed {\n line-height: 1.625;\n}\n.ww-leading-snug {\n line-height: 1.375;\n}\n.ww-leading-tight {\n line-height: 1.25;\n}\n.ww-tracking-wide {\n letter-spacing: 0.025em;\n}\n.ww-tracking-wider {\n letter-spacing: 0.05em;\n}\n.ww-tracking-widest {\n letter-spacing: 0.1em;\n}\n.ww-text-black\\/40 {\n color: rgb(0 0 0 / 0.4);\n}\n.ww-text-black\\/60 {\n color: rgb(0 0 0 / 0.6);\n}\n.ww-text-destructive {\n color: hsl(var(--destructive));\n}\n.ww-text-destructive\\/70 {\n color: hsl(var(--destructive) / 0.7);\n}\n.ww-text-emerald-500 {\n --tw-text-opacity: 1;\n color: rgb(16 185 129 / var(--tw-text-opacity, 1));\n}\n.ww-text-foreground {\n color: hsl(var(--foreground));\n}\n.ww-text-foreground\\/60 {\n color: hsl(var(--foreground) / 0.6);\n}\n.ww-text-foreground\\/70 {\n color: hsl(var(--foreground) / 0.7);\n}\n.ww-text-foreground\\/80 {\n color: hsl(var(--foreground) / 0.8);\n}\n.ww-text-foreground\\/90 {\n color: hsl(var(--foreground) / 0.9);\n}\n.ww-text-inherit {\n color: inherit;\n}\n.ww-text-muted-foreground {\n color: hsl(var(--muted-foreground));\n}\n.ww-text-muted-foreground\\/40 {\n color: hsl(var(--muted-foreground) / 0.4);\n}\n.ww-text-muted-foreground\\/50 {\n color: hsl(var(--muted-foreground) / 0.5);\n}\n.ww-text-muted-foreground\\/70 {\n color: hsl(var(--muted-foreground) / 0.7);\n}\n.ww-text-muted-foreground\\/80 {\n color: hsl(var(--muted-foreground) / 0.8);\n}\n.ww-text-primary {\n color: hsl(var(--primary));\n}\n.ww-text-primary-foreground {\n color: hsl(var(--primary-foreground));\n}\n.ww-text-primary\\/70 {\n color: hsl(var(--primary) / 0.7);\n}\n.ww-text-primary\\/80 {\n color: hsl(var(--primary) / 0.8);\n}\n.ww-text-red-400 {\n --tw-text-opacity: 1;\n color: rgb(248 113 113 / var(--tw-text-opacity, 1));\n}\n.ww-text-red-500 {\n --tw-text-opacity: 1;\n color: rgb(239 68 68 / var(--tw-text-opacity, 1));\n}\n.ww-text-red-600 {\n --tw-text-opacity: 1;\n color: rgb(220 38 38 / var(--tw-text-opacity, 1));\n}\n.ww-text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1));\n}\n.ww-text-white\\/60 {\n color: rgb(255 255 255 / 0.6);\n}\n.ww-text-white\\/80 {\n color: rgb(255 255 255 / 0.8);\n}\n.ww-text-zinc-400 {\n --tw-text-opacity: 1;\n color: rgb(161 161 170 / var(--tw-text-opacity, 1));\n}\n.ww-underline {\n text-decoration-line: underline;\n}\n.ww-line-through {\n text-decoration-line: line-through;\n}\n.ww-no-underline {\n text-decoration-line: none;\n}\n.ww-decoration-foreground\\/20 {\n text-decoration-color: hsl(var(--foreground) / 0.2);\n}\n.ww-opacity-100 {\n opacity: 1;\n}\n.ww-opacity-25 {\n opacity: 0.25;\n}\n.ww-opacity-30 {\n opacity: 0.3;\n}\n.ww-opacity-40 {\n opacity: 0.4;\n}\n.ww-opacity-60 {\n opacity: 0.6;\n}\n.ww-opacity-70 {\n opacity: 0.7;\n}\n.ww-opacity-75 {\n opacity: 0.75;\n}\n.ww-opacity-80 {\n opacity: 0.8;\n}\n.ww-opacity-90 {\n opacity: 0.9;\n}\n.ww-shadow-2xl {\n --tw-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);\n --tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.ww-shadow-lg {\n --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.ww-shadow-md {\n --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.ww-shadow-sm {\n --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);\n --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.ww-shadow-xl {\n --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.ww-outline-none {\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n.ww-ring-2 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow:\n var(--tw-ring-offset-shadow),\n var(--tw-ring-shadow),\n var(--tw-shadow, 0 0 #0000);\n}\n.ww-ring-inset {\n --tw-ring-inset: inset;\n}\n.ww-ring-primary\\/20 {\n --tw-ring-color: hsl(var(--primary) / 0.2);\n}\n.ww-ring-primary\\/60 {\n --tw-ring-color: hsl(var(--primary) / 0.6);\n}\n.ww-backdrop-blur-sm {\n --tw-backdrop-blur: blur(4px);\n backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);\n}\n.ww-backdrop-blur-xl {\n --tw-backdrop-blur: blur(24px);\n backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);\n}\n.ww-transition-all {\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.ww-transition-colors {\n transition-property:\n color,\n background-color,\n border-color,\n text-decoration-color,\n fill,\n stroke;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.ww-transition-opacity {\n transition-property: opacity;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.ww-transition-shadow {\n transition-property: box-shadow;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.ww-transition-transform {\n transition-property: transform;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.ww-duration-1000 {\n transition-duration: 1000ms;\n}\n.ww-duration-150 {\n transition-duration: 150ms;\n}\n.ww-duration-200 {\n transition-duration: 200ms;\n}\n.ww-duration-300 {\n transition-duration: 300ms;\n}\n.ww-duration-500 {\n transition-duration: 500ms;\n}\n.ww-duration-700 {\n transition-duration: 700ms;\n}\n@keyframes enter {\n from {\n opacity: var(--tw-enter-opacity, 1);\n 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));\n }\n}\n@keyframes exit {\n to {\n opacity: var(--tw-exit-opacity, 1);\n 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));\n }\n}\n.ww-animate-in {\n animation-name: enter;\n animation-duration: 150ms;\n --tw-enter-opacity: initial;\n --tw-enter-scale: initial;\n --tw-enter-rotate: initial;\n --tw-enter-translate-x: initial;\n --tw-enter-translate-y: initial;\n}\n.ww-fade-in {\n --tw-enter-opacity: 0;\n}\n.ww-slide-in-from-top-1 {\n --tw-enter-translate-y: -0.25rem;\n}\n.ww-duration-1000 {\n animation-duration: 1000ms;\n}\n.ww-duration-150 {\n animation-duration: 150ms;\n}\n.ww-duration-200 {\n animation-duration: 200ms;\n}\n.ww-duration-300 {\n animation-duration: 300ms;\n}\n.ww-duration-500 {\n animation-duration: 500ms;\n}\n.ww-duration-700 {\n animation-duration: 700ms;\n}\n.wallavi-widget *,\n.wallavi-widget *::before,\n.wallavi-widget *::after {\n box-sizing: border-box;\n border-width: 0;\n border-style: solid;\n}\n.wallavi-widget button {\n -moz-appearance: none;\n appearance: none;\n -webkit-appearance: none;\n background: transparent;\n border: none;\n cursor: pointer;\n}\n.wallavi-widget textarea,\n.wallavi-widget input,\n.wallavi-widget select {\n font-family: inherit;\n font-size: inherit;\n}\n.wallavi-widget img,\n.wallavi-widget video {\n max-width: 100%;\n height: auto;\n}\n.wallavi-widget .lk-control-bar {\n background: transparent !important;\n border: none !important;\n box-shadow: none !important;\n padding: 0 !important;\n gap: 1.5rem !important;\n justify-content: center !important;\n}\n.wallavi-widget .lk-button {\n background: rgba(25, 25, 28, 0.05) !important;\n border-radius: 9999px !important;\n padding: 1.25rem !important;\n color: var(--ww-fg, #19191c) !important;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;\n border: 1px solid rgba(25, 25, 28, 0.1) !important;\n}\n.wallavi-widget .lk-button:hover {\n background: rgba(25, 25, 28, 0.1) !important;\n transform: scale(1.05) !important;\n}\n.wallavi-widget .lk-disconnect-button {\n background: #ef4444 !important;\n color: white !important;\n border: none !important;\n}\n.wallavi-widget .lk-disconnect-button:hover {\n background: #dc2626 !important;\n}\n.wallavi-widget .lk-device-menu {\n bottom: 100% !important;\n top: auto !important;\n margin-bottom: 1rem !important;\n max-width: 250px !important;\n width: -moz-max-content !important;\n width: max-content !important;\n left: 50% !important;\n transform: translateX(-50%) !important;\n background: #ffffff !important;\n border-radius: 16px !important;\n box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15), 0 10px 20px -10px rgba(0, 0, 0, 0.1) !important;\n z-index: 1000 !important;\n overflow: hidden !important;\n border: 1px solid rgba(0, 0, 0, 0.05) !important;\n padding: 0.5rem !important;\n}\n.wallavi-widget .lk-device-menu > li {\n padding: 0.75rem 1rem !important;\n font-size: 0.875rem !important;\n color: #19191c !important;\n white-space: nowrap !important;\n overflow: hidden !important;\n text-overflow: ellipsis !important;\n border-radius: 8px !important;\n transition: background 0.15s !important;\n}\n.wallavi-widget .lk-device-menu > li:hover {\n background: rgba(0, 0, 0, 0.05) !important;\n}\n.wallavi-widget .lk-device-menu > li.lk-active {\n background: rgba(0, 0, 0, 0.08) !important;\n font-weight: 600 !important;\n}\n.placeholder\\:ww-text-muted-foreground\\/40::-moz-placeholder {\n color: hsl(var(--muted-foreground) / 0.4);\n}\n.placeholder\\:ww-text-muted-foreground\\/40::placeholder {\n color: hsl(var(--muted-foreground) / 0.4);\n}\n.focus-within\\:ww-ring-1:focus-within {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow:\n var(--tw-ring-offset-shadow),\n var(--tw-ring-shadow),\n var(--tw-shadow, 0 0 #0000);\n}\n.focus-within\\:ww-ring-ring\\/40:focus-within {\n --tw-ring-color: hsl(var(--ring) / 0.4);\n}\n.hover\\:-ww-translate-y-1:hover {\n --tw-translate-y: -0.25rem;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.hover\\:ww-scale-110:hover {\n --tw-scale-x: 1.1;\n --tw-scale-y: 1.1;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.hover\\:ww-border-accent-foreground\\/20:hover {\n border-color: hsl(var(--accent-foreground) / 0.2);\n}\n.hover\\:ww-border-accent-foreground\\/25:hover {\n border-color: hsl(var(--accent-foreground) / 0.25);\n}\n.hover\\:ww-border-primary\\/40:hover {\n border-color: hsl(var(--primary) / 0.4);\n}\n.hover\\:ww-bg-accent:hover {\n background-color: hsl(var(--accent));\n}\n.hover\\:ww-bg-accent\\/30:hover {\n background-color: hsl(var(--accent) / 0.3);\n}\n.hover\\:ww-bg-accent\\/40:hover {\n background-color: hsl(var(--accent) / 0.4);\n}\n.hover\\:ww-bg-foreground\\/10:hover {\n background-color: hsl(var(--foreground) / 0.1);\n}\n.hover\\:ww-bg-foreground\\/30:hover {\n background-color: hsl(var(--foreground) / 0.3);\n}\n.hover\\:ww-bg-muted:hover {\n background-color: hsl(var(--muted));\n}\n.hover\\:ww-bg-white\\/10:hover {\n background-color: rgb(255 255 255 / 0.1);\n}\n.hover\\:ww-text-accent-foreground:hover {\n color: hsl(var(--accent-foreground));\n}\n.hover\\:ww-text-foreground:hover {\n color: hsl(var(--foreground));\n}\n.hover\\:ww-text-primary:hover {\n color: hsl(var(--primary));\n}\n.hover\\:ww-opacity-80:hover {\n opacity: 0.8;\n}\n.hover\\:ww-opacity-85:hover {\n opacity: 0.85;\n}\n.hover\\:ww-shadow-sm:hover {\n --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);\n --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.hover\\:ww-shadow-xl:hover {\n --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.focus\\:ww-ring-1:focus {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow:\n var(--tw-ring-offset-shadow),\n var(--tw-ring-shadow),\n var(--tw-shadow, 0 0 #0000);\n}\n.focus\\:ww-ring-ring\\/40:focus {\n --tw-ring-color: hsl(var(--ring) / 0.4);\n}\n.active\\:ww-scale-\\[0\\.98\\]:active {\n --tw-scale-x: 0.98;\n --tw-scale-y: 0.98;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.disabled\\:ww-pointer-events-none:disabled {\n pointer-events: none;\n}\n.disabled\\:ww-opacity-40:disabled {\n opacity: 0.4;\n}\n.disabled\\:ww-opacity-50:disabled {\n opacity: 0.5;\n}\n.ww-group:hover .group-hover\\:ww-rotate-12 {\n --tw-rotate: 12deg;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.ww-group:hover .group-hover\\:ww-text-primary {\n color: hsl(var(--primary));\n}\n.dark\\:ww-border-red-800:is(.ww-dark *) {\n --tw-border-opacity: 1;\n border-color: rgb(153 27 27 / var(--tw-border-opacity, 1));\n}\n.dark\\:ww-bg-red-950:is(.ww-dark *) {\n --tw-bg-opacity: 1;\n background-color: rgb(69 10 10 / var(--tw-bg-opacity, 1));\n}\n.dark\\:ww-text-red-400:is(.ww-dark *) {\n --tw-text-opacity: 1;\n color: rgb(248 113 113 / var(--tw-text-opacity, 1));\n}\n");
|
|
61
|
+
styleInject('.ww-pointer-events-none {\n pointer-events: none;\n}\n.ww-absolute {\n position: absolute;\n}\n.ww-relative {\n position: relative;\n}\n.ww-inset-0 {\n inset: 0px;\n}\n.ww-inset-4 {\n inset: 1rem;\n}\n.ww-inset-8 {\n inset: 2rem;\n}\n.ww-left-2\\.5 {\n left: 0.625rem;\n}\n.ww-top-1\\/2 {\n top: 50%;\n}\n.ww-z-50 {\n z-index: 50;\n}\n.ww-z-\\[100\\] {\n z-index: 100;\n}\n.ww-mx-0\\.5 {\n margin-left: 0.125rem;\n margin-right: 0.125rem;\n}\n.ww-mb-1 {\n margin-bottom: 0.25rem;\n}\n.ww-mb-12 {\n margin-bottom: 3rem;\n}\n.ww-mb-2 {\n margin-bottom: 0.5rem;\n}\n.ww-mb-2\\.5 {\n margin-bottom: 0.625rem;\n}\n.ww-ml-0\\.5 {\n margin-left: 0.125rem;\n}\n.ww-ml-1 {\n margin-left: 0.25rem;\n}\n.ww-mt-0\\.5 {\n margin-top: 0.125rem;\n}\n.ww-mt-1 {\n margin-top: 0.25rem;\n}\n.ww-mt-1\\.5 {\n margin-top: 0.375rem;\n}\n.ww-line-clamp-1 {\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 1;\n}\n.ww-line-clamp-2 {\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n}\n.ww-block {\n display: block;\n}\n.ww-inline-block {\n display: inline-block;\n}\n.ww-flex {\n display: flex;\n}\n.ww-inline-flex {\n display: inline-flex;\n}\n.ww-grid {\n display: grid;\n}\n.ww-hidden {\n display: none;\n}\n.ww-h-1\\.5 {\n height: 0.375rem;\n}\n.ww-h-10 {\n height: 2.5rem;\n}\n.ww-h-16 {\n height: 4rem;\n}\n.ww-h-2 {\n height: 0.5rem;\n}\n.ww-h-2\\.5 {\n height: 0.625rem;\n}\n.ww-h-20 {\n height: 5rem;\n}\n.ww-h-3 {\n height: 0.75rem;\n}\n.ww-h-3\\.5 {\n height: 0.875rem;\n}\n.ww-h-4 {\n height: 1rem;\n}\n.ww-h-40 {\n height: 10rem;\n}\n.ww-h-48 {\n height: 12rem;\n}\n.ww-h-6 {\n height: 1.5rem;\n}\n.ww-h-7 {\n height: 1.75rem;\n}\n.ww-h-8 {\n height: 2rem;\n}\n.ww-h-full {\n height: 100%;\n}\n.ww-max-h-32 {\n max-height: 8rem;\n}\n.ww-max-h-48 {\n max-height: 12rem;\n}\n.ww-max-h-\\[168px\\] {\n max-height: 168px;\n}\n.ww-max-h-\\[180px\\] {\n max-height: 180px;\n}\n.ww-min-h-\\[22px\\] {\n min-height: 22px;\n}\n.ww-w-0\\.5 {\n width: 0.125rem;\n}\n.ww-w-1\\.5 {\n width: 0.375rem;\n}\n.ww-w-10 {\n width: 2.5rem;\n}\n.ww-w-16 {\n width: 4rem;\n}\n.ww-w-2 {\n width: 0.5rem;\n}\n.ww-w-2\\.5 {\n width: 0.625rem;\n}\n.ww-w-20 {\n width: 5rem;\n}\n.ww-w-3 {\n width: 0.75rem;\n}\n.ww-w-3\\.5 {\n width: 0.875rem;\n}\n.ww-w-4 {\n width: 1rem;\n}\n.ww-w-48 {\n width: 12rem;\n}\n.ww-w-6 {\n width: 1.5rem;\n}\n.ww-w-7 {\n width: 1.75rem;\n}\n.ww-w-8 {\n width: 2rem;\n}\n.ww-w-\\[300px\\] {\n width: 300px;\n}\n.ww-w-fit {\n width: -moz-fit-content;\n width: fit-content;\n}\n.ww-w-full {\n width: 100%;\n}\n.ww-min-w-0 {\n min-width: 0px;\n}\n.ww-max-w-\\[120px\\] {\n max-width: 120px;\n}\n.ww-max-w-\\[170px\\] {\n max-width: 170px;\n}\n.ww-max-w-\\[200px\\] {\n max-width: 200px;\n}\n.ww-max-w-\\[78\\%\\] {\n max-width: 78%;\n}\n.ww-max-w-\\[82\\%\\] {\n max-width: 82%;\n}\n.ww-max-w-none {\n max-width: none;\n}\n.ww-flex-1 {\n flex: 1 1 0%;\n}\n.ww-shrink-0 {\n flex-shrink: 0;\n}\n.ww-translate-x-\\[-4px\\] {\n --tw-translate-x: -4px;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.ww-rotate-180 {\n --tw-rotate: 180deg;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.ww-scale-100 {\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.ww-scale-105 {\n --tw-scale-x: 1.05;\n --tw-scale-y: 1.05;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.ww-scale-110 {\n --tw-scale-x: 1.1;\n --tw-scale-y: 1.1;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.ww-scale-90 {\n --tw-scale-x: .9;\n --tw-scale-y: .9;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n@keyframes ww-ping {\n 75%, 100% {\n transform: scale(2);\n opacity: 0;\n }\n}\n.ww-animate-ping {\n animation: ww-ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;\n}\n@keyframes ww-pulse {\n 50% {\n opacity: .5;\n }\n}\n.ww-animate-pulse {\n animation: ww-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n}\n@keyframes ww-spin {\n to {\n transform: rotate(360deg);\n }\n}\n.ww-animate-spin {\n animation: ww-spin 1s linear infinite;\n}\n.ww-cursor-default {\n cursor: default;\n}\n.ww-cursor-pointer {\n cursor: pointer;\n}\n.ww-touch-none {\n touch-action: none;\n}\n.ww-select-none {\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n.ww-select-all {\n -webkit-user-select: all;\n -moz-user-select: all;\n user-select: all;\n}\n.ww-grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n.ww-flex-row {\n flex-direction: row;\n}\n.ww-flex-col {\n flex-direction: column;\n}\n.ww-flex-wrap {\n flex-wrap: wrap;\n}\n.ww-items-start {\n align-items: flex-start;\n}\n.ww-items-end {\n align-items: flex-end;\n}\n.ww-items-center {\n align-items: center;\n}\n.ww-justify-end {\n justify-content: flex-end;\n}\n.ww-justify-center {\n justify-content: center;\n}\n.ww-justify-between {\n justify-content: space-between;\n}\n.ww-gap-0\\.5 {\n gap: 0.125rem;\n}\n.ww-gap-1 {\n gap: 0.25rem;\n}\n.ww-gap-1\\.5 {\n gap: 0.375rem;\n}\n.ww-gap-2 {\n gap: 0.5rem;\n}\n.ww-gap-2\\.5 {\n gap: 0.625rem;\n}\n.ww-gap-3\\.5 {\n gap: 0.875rem;\n}\n.ww-gap-4 {\n gap: 1rem;\n}\n.ww-gap-5 {\n gap: 1.25rem;\n}\n.ww-gap-6 {\n gap: 1.5rem;\n}\n.ww-gap-8 {\n gap: 2rem;\n}\n.ww-divide-y > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-y-reverse: 0;\n border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));\n border-bottom-width: calc(1px * var(--tw-divide-y-reverse));\n}\n.ww-divide-border\\/40 > :not([hidden]) ~ :not([hidden]) {\n border-color: hsl(var(--border) / 0.4);\n}\n.ww-overflow-hidden {\n overflow: hidden;\n}\n.ww-overflow-y-auto {\n overflow-y: auto;\n}\n.ww-overscroll-contain {\n overscroll-behavior: contain;\n}\n.ww-overscroll-none {\n overscroll-behavior: none;\n}\n.ww-truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.ww-whitespace-pre-wrap {\n white-space: pre-wrap;\n}\n.\\!ww-rounded-full {\n border-radius: 9999px !important;\n}\n.ww-rounded {\n border-radius: 0.25rem;\n}\n.ww-rounded-2xl {\n border-radius: 1rem;\n}\n.ww-rounded-full {\n border-radius: 9999px;\n}\n.ww-rounded-lg {\n border-radius: var(--radius);\n}\n.ww-rounded-md {\n border-radius: calc(var(--radius) - 2px);\n}\n.ww-rounded-xl {\n border-radius: 0.75rem;\n}\n.ww-rounded-br-2xl {\n border-bottom-right-radius: 1rem;\n}\n.ww-rounded-tl-none {\n border-top-left-radius: 0px;\n}\n.ww-rounded-tl-sm {\n border-top-left-radius: calc(var(--radius) - 4px);\n}\n.ww-rounded-tr-sm {\n border-top-right-radius: calc(var(--radius) - 4px);\n}\n.ww-border {\n border-width: 1px;\n}\n.ww-border-2 {\n border-width: 2px;\n}\n.ww-border-b {\n border-bottom-width: 1px;\n}\n.ww-border-l {\n border-left-width: 1px;\n}\n.ww-border-l-2 {\n border-left-width: 2px;\n}\n.ww-border-t {\n border-top-width: 1px;\n}\n.ww-border-background {\n border-color: hsl(var(--background));\n}\n.ww-border-black\\/10 {\n border-color: rgb(0 0 0 / 0.1);\n}\n.ww-border-border {\n border-color: hsl(var(--border));\n}\n.ww-border-border\\/30 {\n border-color: hsl(var(--border) / 0.3);\n}\n.ww-border-border\\/40 {\n border-color: hsl(var(--border) / 0.4);\n}\n.ww-border-border\\/50 {\n border-color: hsl(var(--border) / 0.5);\n}\n.ww-border-border\\/60 {\n border-color: hsl(var(--border) / 0.6);\n}\n.ww-border-border\\/80 {\n border-color: hsl(var(--border) / 0.8);\n}\n.ww-border-muted {\n border-color: hsl(var(--muted));\n}\n.ww-border-muted-foreground\\/30 {\n border-color: hsl(var(--muted-foreground) / 0.3);\n}\n.ww-border-primary\\/10 {\n border-color: hsl(var(--primary) / 0.1);\n}\n.ww-border-primary\\/20 {\n border-color: hsl(var(--primary) / 0.2);\n}\n.ww-border-red-200 {\n --tw-border-opacity: 1;\n border-color: rgb(254 202 202 / var(--tw-border-opacity, 1));\n}\n.ww-border-transparent {\n border-color: transparent;\n}\n.ww-border-white\\/20 {\n border-color: rgb(255 255 255 / 0.2);\n}\n.ww-border-white\\/30 {\n border-color: rgb(255 255 255 / 0.3);\n}\n.ww-bg-background {\n background-color: hsl(var(--background));\n}\n.ww-bg-background\\/20 {\n background-color: hsl(var(--background) / 0.2);\n}\n.ww-bg-background\\/90 {\n background-color: hsl(var(--background) / 0.9);\n}\n.ww-bg-background\\/95 {\n background-color: hsl(var(--background) / 0.95);\n}\n.ww-bg-black\\/10 {\n background-color: rgb(0 0 0 / 0.1);\n}\n.ww-bg-emerald-400 {\n --tw-bg-opacity: 1;\n background-color: rgb(52 211 153 / var(--tw-bg-opacity, 1));\n}\n.ww-bg-emerald-500 {\n --tw-bg-opacity: 1;\n background-color: rgb(16 185 129 / var(--tw-bg-opacity, 1));\n}\n.ww-bg-emerald-500\\/10 {\n background-color: rgb(16 185 129 / 0.1);\n}\n.ww-bg-emerald-500\\/20 {\n background-color: rgb(16 185 129 / 0.2);\n}\n.ww-bg-foreground\\/20 {\n background-color: hsl(var(--foreground) / 0.2);\n}\n.ww-bg-foreground\\/5 {\n background-color: hsl(var(--foreground) / 0.05);\n}\n.ww-bg-foreground\\/60 {\n background-color: hsl(var(--foreground) / 0.6);\n}\n.ww-bg-indigo-500\\/10 {\n background-color: rgb(99 102 241 / 0.1);\n}\n.ww-bg-muted {\n background-color: hsl(var(--muted));\n}\n.ww-bg-muted-foreground\\/10 {\n background-color: hsl(var(--muted-foreground) / 0.1);\n}\n.ww-bg-muted\\/10 {\n background-color: hsl(var(--muted) / 0.1);\n}\n.ww-bg-muted\\/30 {\n background-color: hsl(var(--muted) / 0.3);\n}\n.ww-bg-muted\\/40 {\n background-color: hsl(var(--muted) / 0.4);\n}\n.ww-bg-muted\\/50 {\n background-color: hsl(var(--muted) / 0.5);\n}\n.ww-bg-muted\\/60 {\n background-color: hsl(var(--muted) / 0.6);\n}\n.ww-bg-primary {\n background-color: hsl(var(--primary));\n}\n.ww-bg-primary\\/10 {\n background-color: hsl(var(--primary) / 0.1);\n}\n.ww-bg-primary\\/5 {\n background-color: hsl(var(--primary) / 0.05);\n}\n.ww-bg-purple-500\\/20 {\n background-color: rgb(168 85 247 / 0.2);\n}\n.ww-bg-purple-500\\/30 {\n background-color: rgb(168 85 247 / 0.3);\n}\n.ww-bg-red-50 {\n --tw-bg-opacity: 1;\n background-color: rgb(254 242 242 / var(--tw-bg-opacity, 1));\n}\n.ww-bg-transparent {\n background-color: transparent;\n}\n.ww-bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));\n}\n.ww-bg-white\\/10 {\n background-color: rgb(255 255 255 / 0.1);\n}\n.ww-bg-white\\/15 {\n background-color: rgb(255 255 255 / 0.15);\n}\n.ww-bg-white\\/20 {\n background-color: rgb(255 255 255 / 0.2);\n}\n.ww-fill-current {\n fill: currentColor;\n}\n.ww-object-cover {\n -o-object-fit: cover;\n object-fit: cover;\n}\n.ww-p-0\\.5 {\n padding: 0.125rem;\n}\n.ww-p-1\\.5 {\n padding: 0.375rem;\n}\n.ww-p-3 {\n padding: 0.75rem;\n}\n.ww-p-3\\.5 {\n padding: 0.875rem;\n}\n.ww-px-1 {\n padding-left: 0.25rem;\n padding-right: 0.25rem;\n}\n.ww-px-1\\.5 {\n padding-left: 0.375rem;\n padding-right: 0.375rem;\n}\n.ww-px-2 {\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n}\n.ww-px-3 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n.ww-px-3\\.5 {\n padding-left: 0.875rem;\n padding-right: 0.875rem;\n}\n.ww-px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n.ww-py-0\\.5 {\n padding-top: 0.125rem;\n padding-bottom: 0.125rem;\n}\n.ww-py-1 {\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n}\n.ww-py-1\\.5 {\n padding-top: 0.375rem;\n padding-bottom: 0.375rem;\n}\n.ww-py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.ww-py-2\\.5 {\n padding-top: 0.625rem;\n padding-bottom: 0.625rem;\n}\n.ww-py-3 {\n padding-top: 0.75rem;\n padding-bottom: 0.75rem;\n}\n.ww-py-4 {\n padding-top: 1rem;\n padding-bottom: 1rem;\n}\n.ww-pb-1\\.5 {\n padding-bottom: 0.375rem;\n}\n.ww-pb-2 {\n padding-bottom: 0.5rem;\n}\n.ww-pb-3 {\n padding-bottom: 0.75rem;\n}\n.ww-pb-4 {\n padding-bottom: 1rem;\n}\n.ww-pl-2 {\n padding-left: 0.5rem;\n}\n.ww-pl-7 {\n padding-left: 1.75rem;\n}\n.ww-pr-0\\.5 {\n padding-right: 0.125rem;\n}\n.ww-pr-3 {\n padding-right: 0.75rem;\n}\n.ww-pt-0\\.5 {\n padding-top: 0.125rem;\n}\n.ww-pt-2 {\n padding-top: 0.5rem;\n}\n.ww-pt-2\\.5 {\n padding-top: 0.625rem;\n}\n.ww-pt-4 {\n padding-top: 1rem;\n}\n.ww-pt-5 {\n padding-top: 1.25rem;\n}\n.ww-text-left {\n text-align: left;\n}\n.ww-text-center {\n text-align: center;\n}\n.ww-align-baseline {\n vertical-align: baseline;\n}\n.ww-align-middle {\n vertical-align: middle;\n}\n.ww-font-mono {\n font-family:\n ui-monospace,\n SFMono-Regular,\n Menlo,\n Monaco,\n Consolas,\n "Liberation Mono",\n "Courier New",\n monospace;\n}\n.ww-text-\\[10\\.5px\\] {\n font-size: 10.5px;\n}\n.ww-text-\\[10px\\] {\n font-size: 10px;\n}\n.ww-text-\\[11px\\] {\n font-size: 11px;\n}\n.ww-text-\\[12\\.5px\\] {\n font-size: 12.5px;\n}\n.ww-text-\\[12px\\] {\n font-size: 12px;\n}\n.ww-text-\\[13px\\] {\n font-size: 13px;\n}\n.ww-text-\\[8px\\] {\n font-size: 8px;\n}\n.ww-text-\\[9px\\] {\n font-size: 9px;\n}\n.ww-text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.ww-text-xs {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n.ww-font-bold {\n font-weight: 700;\n}\n.ww-font-medium {\n font-weight: 500;\n}\n.ww-font-semibold {\n font-weight: 600;\n}\n.ww-uppercase {\n text-transform: uppercase;\n}\n.ww-leading-none {\n line-height: 1;\n}\n.ww-leading-normal {\n line-height: 1.5;\n}\n.ww-leading-relaxed {\n line-height: 1.625;\n}\n.ww-leading-snug {\n line-height: 1.375;\n}\n.ww-leading-tight {\n line-height: 1.25;\n}\n.ww-tracking-\\[0\\.06em\\] {\n letter-spacing: 0.06em;\n}\n.ww-tracking-\\[0\\.12em\\] {\n letter-spacing: 0.12em;\n}\n.ww-tracking-wide {\n letter-spacing: 0.025em;\n}\n.ww-tracking-wider {\n letter-spacing: 0.05em;\n}\n.ww-tracking-widest {\n letter-spacing: 0.1em;\n}\n.ww-text-amber-500 {\n --tw-text-opacity: 1;\n color: rgb(245 158 11 / var(--tw-text-opacity, 1));\n}\n.ww-text-black\\/40 {\n color: rgb(0 0 0 / 0.4);\n}\n.ww-text-black\\/60 {\n color: rgb(0 0 0 / 0.6);\n}\n.ww-text-destructive {\n color: hsl(var(--destructive));\n}\n.ww-text-destructive\\/70 {\n color: hsl(var(--destructive) / 0.7);\n}\n.ww-text-emerald-500 {\n --tw-text-opacity: 1;\n color: rgb(16 185 129 / var(--tw-text-opacity, 1));\n}\n.ww-text-foreground {\n color: hsl(var(--foreground));\n}\n.ww-text-foreground\\/60 {\n color: hsl(var(--foreground) / 0.6);\n}\n.ww-text-foreground\\/70 {\n color: hsl(var(--foreground) / 0.7);\n}\n.ww-text-foreground\\/80 {\n color: hsl(var(--foreground) / 0.8);\n}\n.ww-text-indigo-500 {\n --tw-text-opacity: 1;\n color: rgb(99 102 241 / var(--tw-text-opacity, 1));\n}\n.ww-text-inherit {\n color: inherit;\n}\n.ww-text-muted-foreground {\n color: hsl(var(--muted-foreground));\n}\n.ww-text-muted-foreground\\/40 {\n color: hsl(var(--muted-foreground) / 0.4);\n}\n.ww-text-muted-foreground\\/45 {\n color: hsl(var(--muted-foreground) / 0.45);\n}\n.ww-text-muted-foreground\\/50 {\n color: hsl(var(--muted-foreground) / 0.5);\n}\n.ww-text-muted-foreground\\/60 {\n color: hsl(var(--muted-foreground) / 0.6);\n}\n.ww-text-muted-foreground\\/70 {\n color: hsl(var(--muted-foreground) / 0.7);\n}\n.ww-text-muted-foreground\\/80 {\n color: hsl(var(--muted-foreground) / 0.8);\n}\n.ww-text-primary {\n color: hsl(var(--primary));\n}\n.ww-text-primary-foreground {\n color: hsl(var(--primary-foreground));\n}\n.ww-text-primary\\/60 {\n color: hsl(var(--primary) / 0.6);\n}\n.ww-text-primary\\/70 {\n color: hsl(var(--primary) / 0.7);\n}\n.ww-text-primary\\/80 {\n color: hsl(var(--primary) / 0.8);\n}\n.ww-text-red-400 {\n --tw-text-opacity: 1;\n color: rgb(248 113 113 / var(--tw-text-opacity, 1));\n}\n.ww-text-red-500 {\n --tw-text-opacity: 1;\n color: rgb(239 68 68 / var(--tw-text-opacity, 1));\n}\n.ww-text-red-600 {\n --tw-text-opacity: 1;\n color: rgb(220 38 38 / var(--tw-text-opacity, 1));\n}\n.ww-text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1));\n}\n.ww-text-white\\/60 {\n color: rgb(255 255 255 / 0.6);\n}\n.ww-text-white\\/80 {\n color: rgb(255 255 255 / 0.8);\n}\n.ww-underline {\n text-decoration-line: underline;\n}\n.ww-line-through {\n text-decoration-line: line-through;\n}\n.ww-no-underline {\n text-decoration-line: none;\n}\n.ww-decoration-foreground\\/20 {\n text-decoration-color: hsl(var(--foreground) / 0.2);\n}\n.ww-opacity-0 {\n opacity: 0;\n}\n.ww-opacity-100 {\n opacity: 1;\n}\n.ww-opacity-25 {\n opacity: 0.25;\n}\n.ww-opacity-30 {\n opacity: 0.3;\n}\n.ww-opacity-40 {\n opacity: 0.4;\n}\n.ww-opacity-55 {\n opacity: 0.55;\n}\n.ww-opacity-60 {\n opacity: 0.6;\n}\n.ww-opacity-70 {\n opacity: 0.7;\n}\n.ww-opacity-75 {\n opacity: 0.75;\n}\n.ww-opacity-80 {\n opacity: 0.8;\n}\n.ww-opacity-90 {\n opacity: 0.9;\n}\n.ww-shadow-2xl {\n --tw-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);\n --tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.ww-shadow-\\[0_-4px_20px_rgba\\(0\\,0\\,0\\,0\\.02\\)\\] {\n --tw-shadow: 0 -4px 20px rgba(0,0,0,0.02);\n --tw-shadow-colored: 0 -4px 20px var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.ww-shadow-\\[0_1px_2px_rgba\\(0\\,0\\,0\\,0\\.03\\)\\] {\n --tw-shadow: 0 1px 2px rgba(0,0,0,0.03);\n --tw-shadow-colored: 0 1px 2px var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.ww-shadow-lg {\n --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.ww-shadow-md {\n --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.ww-shadow-sm {\n --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);\n --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.ww-shadow-xl {\n --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.ww-outline-none {\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n.ww-ring-2 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow:\n var(--tw-ring-offset-shadow),\n var(--tw-ring-shadow),\n var(--tw-shadow, 0 0 #0000);\n}\n.ww-ring-inset {\n --tw-ring-inset: inset;\n}\n.ww-ring-primary\\/20 {\n --tw-ring-color: hsl(var(--primary) / 0.2);\n}\n.ww-ring-primary\\/60 {\n --tw-ring-color: hsl(var(--primary) / 0.6);\n}\n.ww-backdrop-blur-sm {\n --tw-backdrop-blur: blur(4px);\n backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);\n}\n.ww-backdrop-blur-xl {\n --tw-backdrop-blur: blur(24px);\n backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);\n}\n.ww-transition-all {\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.ww-transition-colors {\n transition-property:\n color,\n background-color,\n border-color,\n text-decoration-color,\n fill,\n stroke;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.ww-transition-opacity {\n transition-property: opacity;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.ww-transition-transform {\n transition-property: transform;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.ww-duration-1000 {\n transition-duration: 1000ms;\n}\n.ww-duration-200 {\n transition-duration: 200ms;\n}\n.ww-duration-300 {\n transition-duration: 300ms;\n}\n.ww-duration-500 {\n transition-duration: 500ms;\n}\n.ww-duration-700 {\n transition-duration: 700ms;\n}\n@keyframes enter {\n from {\n opacity: var(--tw-enter-opacity, 1);\n 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));\n }\n}\n@keyframes exit {\n to {\n opacity: var(--tw-exit-opacity, 1);\n 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));\n }\n}\n.ww-animate-in {\n animation-name: enter;\n animation-duration: 150ms;\n --tw-enter-opacity: initial;\n --tw-enter-scale: initial;\n --tw-enter-rotate: initial;\n --tw-enter-translate-x: initial;\n --tw-enter-translate-y: initial;\n}\n.ww-fade-in {\n --tw-enter-opacity: 0;\n}\n.ww-slide-in-from-bottom-1 {\n --tw-enter-translate-y: 0.25rem;\n}\n.ww-slide-in-from-bottom-2 {\n --tw-enter-translate-y: 0.5rem;\n}\n.ww-slide-in-from-right-2 {\n --tw-enter-translate-x: 0.5rem;\n}\n.ww-duration-1000 {\n animation-duration: 1000ms;\n}\n.ww-duration-200 {\n animation-duration: 200ms;\n}\n.ww-duration-300 {\n animation-duration: 300ms;\n}\n.ww-duration-500 {\n animation-duration: 500ms;\n}\n.ww-duration-700 {\n animation-duration: 700ms;\n}\n.wallavi-widget *,\n.wallavi-widget *::before,\n.wallavi-widget *::after {\n box-sizing: border-box;\n border-width: 0;\n border-style: solid;\n}\n.wallavi-widget button {\n -moz-appearance: none;\n appearance: none;\n -webkit-appearance: none;\n background: transparent;\n border: none;\n cursor: pointer;\n}\n.wallavi-widget textarea,\n.wallavi-widget input,\n.wallavi-widget select {\n font-family: inherit;\n font-size: inherit;\n}\n.wallavi-widget img,\n.wallavi-widget video {\n max-width: 100%;\n height: auto;\n}\n.wallavi-widget .lk-control-bar {\n background: transparent !important;\n border: none !important;\n box-shadow: none !important;\n padding: 0 !important;\n gap: 1.5rem !important;\n justify-content: center !important;\n}\n.wallavi-widget .lk-button {\n background: rgba(25, 25, 28, 0.05) !important;\n border-radius: 9999px !important;\n padding: 1.25rem !important;\n color: var(--ww-fg, #19191c) !important;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;\n border: 1px solid rgba(25, 25, 28, 0.1) !important;\n}\n.wallavi-widget .lk-button:hover {\n background: rgba(25, 25, 28, 0.1) !important;\n transform: scale(1.05) !important;\n}\n.wallavi-widget .lk-disconnect-button {\n background: #ef4444 !important;\n color: white !important;\n border: none !important;\n}\n.wallavi-widget .lk-disconnect-button:hover {\n background: #dc2626 !important;\n}\n.wallavi-widget .lk-device-menu {\n bottom: 100% !important;\n top: auto !important;\n margin-bottom: 1rem !important;\n max-width: 250px !important;\n width: -moz-max-content !important;\n width: max-content !important;\n left: 50% !important;\n transform: translateX(-50%) !important;\n background: #ffffff !important;\n border-radius: 16px !important;\n box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15), 0 10px 20px -10px rgba(0, 0, 0, 0.1) !important;\n z-index: 1000 !important;\n overflow: hidden !important;\n border: 1px solid rgba(0, 0, 0, 0.05) !important;\n padding: 0.5rem !important;\n}\n.wallavi-widget .lk-device-menu > li {\n padding: 0.75rem 1rem !important;\n font-size: 0.875rem !important;\n color: #19191c !important;\n white-space: nowrap !important;\n overflow: hidden !important;\n text-overflow: ellipsis !important;\n border-radius: 8px !important;\n transition: background 0.15s !important;\n}\n.wallavi-widget .lk-device-menu > li:hover {\n background: rgba(0, 0, 0, 0.05) !important;\n}\n.wallavi-widget .lk-device-menu > li.lk-active {\n background: rgba(0, 0, 0, 0.08) !important;\n font-weight: 600 !important;\n}\n.placeholder\\:ww-text-muted-foreground\\/40::-moz-placeholder {\n color: hsl(var(--muted-foreground) / 0.4);\n}\n.placeholder\\:ww-text-muted-foreground\\/40::placeholder {\n color: hsl(var(--muted-foreground) / 0.4);\n}\n.hover\\:-ww-translate-y-1:hover {\n --tw-translate-y: -0.25rem;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.hover\\:ww-scale-105:hover {\n --tw-scale-x: 1.05;\n --tw-scale-y: 1.05;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.hover\\:ww-scale-110:hover {\n --tw-scale-x: 1.1;\n --tw-scale-y: 1.1;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.hover\\:ww-border-border\\/80:hover {\n border-color: hsl(var(--border) / 0.8);\n}\n.hover\\:ww-border-primary\\/40:hover {\n border-color: hsl(var(--primary) / 0.4);\n}\n.hover\\:ww-bg-accent:hover {\n background-color: hsl(var(--accent));\n}\n.hover\\:ww-bg-foreground\\/10:hover {\n background-color: hsl(var(--foreground) / 0.1);\n}\n.hover\\:ww-bg-foreground\\/30:hover {\n background-color: hsl(var(--foreground) / 0.3);\n}\n.hover\\:ww-bg-muted:hover {\n background-color: hsl(var(--muted));\n}\n.hover\\:ww-bg-muted\\/20:hover {\n background-color: hsl(var(--muted) / 0.2);\n}\n.hover\\:ww-bg-muted\\/70:hover {\n background-color: hsl(var(--muted) / 0.7);\n}\n.hover\\:ww-bg-primary\\/10:hover {\n background-color: hsl(var(--primary) / 0.1);\n}\n.hover\\:ww-bg-white\\/10:hover {\n background-color: rgb(255 255 255 / 0.1);\n}\n.hover\\:ww-text-accent-foreground:hover {\n color: hsl(var(--accent-foreground));\n}\n.hover\\:ww-text-foreground:hover {\n color: hsl(var(--foreground));\n}\n.hover\\:ww-text-primary:hover {\n color: hsl(var(--primary));\n}\n.hover\\:ww-opacity-80:hover {\n opacity: 0.8;\n}\n.hover\\:ww-opacity-85:hover {\n opacity: 0.85;\n}\n.hover\\:ww-shadow-md:hover {\n --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.hover\\:ww-shadow-sm:hover {\n --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);\n --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.hover\\:ww-shadow-xl:hover {\n --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);\n box-shadow:\n var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000),\n var(--tw-shadow);\n}\n.focus\\:ww-ring-1:focus {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow:\n var(--tw-ring-offset-shadow),\n var(--tw-ring-shadow),\n var(--tw-shadow, 0 0 #0000);\n}\n.focus\\:ww-ring-ring\\/40:focus {\n --tw-ring-color: hsl(var(--ring) / 0.4);\n}\n.focus-visible\\:ww-outline-none:focus-visible {\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n.focus-visible\\:ww-ring-2:focus-visible {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow:\n var(--tw-ring-offset-shadow),\n var(--tw-ring-shadow),\n var(--tw-shadow, 0 0 #0000);\n}\n.focus-visible\\:ww-ring-ring\\/40:focus-visible {\n --tw-ring-color: hsl(var(--ring) / 0.4);\n}\n.active\\:ww-scale-95:active {\n --tw-scale-x: .95;\n --tw-scale-y: .95;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.active\\:ww-scale-\\[0\\.98\\]:active {\n --tw-scale-x: 0.98;\n --tw-scale-y: 0.98;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.disabled\\:ww-pointer-events-none:disabled {\n pointer-events: none;\n}\n.disabled\\:ww-opacity-40:disabled {\n opacity: 0.4;\n}\n.disabled\\:ww-opacity-50:disabled {\n opacity: 0.5;\n}\n.ww-group:hover .group-hover\\:ww-translate-x-0 {\n --tw-translate-x: 0px;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.ww-group:hover .group-hover\\:ww-rotate-12 {\n --tw-rotate: 12deg;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.ww-group:hover .group-hover\\:ww-scale-105 {\n --tw-scale-x: 1.05;\n --tw-scale-y: 1.05;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.ww-group:hover .group-hover\\:ww-scale-110 {\n --tw-scale-x: 1.1;\n --tw-scale-y: 1.1;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.ww-group:hover .group-hover\\:ww-opacity-100 {\n opacity: 1;\n}\n.dark\\:ww-border-red-800:is(.ww-dark *) {\n --tw-border-opacity: 1;\n border-color: rgb(153 27 27 / var(--tw-border-opacity, 1));\n}\n.dark\\:ww-bg-indigo-400\\/10:is(.ww-dark *) {\n background-color: rgb(129 140 248 / 0.1);\n}\n.dark\\:ww-bg-red-950:is(.ww-dark *) {\n --tw-bg-opacity: 1;\n background-color: rgb(69 10 10 / var(--tw-bg-opacity, 1));\n}\n.dark\\:ww-text-indigo-400:is(.ww-dark *) {\n --tw-text-opacity: 1;\n color: rgb(129 140 248 / var(--tw-text-opacity, 1));\n}\n.dark\\:ww-text-red-400:is(.ww-dark *) {\n --tw-text-opacity: 1;\n color: rgb(248 113 113 / var(--tw-text-opacity, 1));\n}\n');
|
|
62
62
|
var twMerge = tailwindMerge.extendTailwindMerge({ prefix: "ww-" });
|
|
63
63
|
var cn = (...inputs) => twMerge(clsx.clsx(inputs));
|
|
64
64
|
async function getFreshClerkToken() {
|
|
@@ -686,7 +686,20 @@ function useChat({
|
|
|
686
686
|
const userInput = (text ?? input).trim();
|
|
687
687
|
if (!userInput || streaming) return;
|
|
688
688
|
setInput("");
|
|
689
|
-
const
|
|
689
|
+
const contextMatches = Array.from(
|
|
690
|
+
userInput.matchAll(/\[([^\]]+)\]\(wallavi:\/\/([^/]+)\/([^)]+)\)/g)
|
|
691
|
+
);
|
|
692
|
+
let contextToSend = selectedContext;
|
|
693
|
+
if (!contextToSend && contextMatches.length > 0) {
|
|
694
|
+
const lastMatch = contextMatches[contextMatches.length - 1];
|
|
695
|
+
if (lastMatch) {
|
|
696
|
+
contextToSend = {
|
|
697
|
+
name: lastMatch[1] || "",
|
|
698
|
+
type: lastMatch[2] || "",
|
|
699
|
+
id: lastMatch[3] || ""
|
|
700
|
+
};
|
|
701
|
+
}
|
|
702
|
+
}
|
|
690
703
|
setSelectedContext(null);
|
|
691
704
|
const attachments = pendingAttachmentsRef.current.length > 0 ? [...pendingAttachmentsRef.current] : void 0;
|
|
692
705
|
pendingAttachmentsRef.current = [];
|
|
@@ -1146,6 +1159,118 @@ function MinimizeIcon() {
|
|
|
1146
1159
|
}
|
|
1147
1160
|
) });
|
|
1148
1161
|
}
|
|
1162
|
+
|
|
1163
|
+
// src/lib/translations.ts
|
|
1164
|
+
var WIDGET_TRANSLATIONS = {
|
|
1165
|
+
en: {
|
|
1166
|
+
quickActions: "Quick Actions",
|
|
1167
|
+
documentation: "Documentation",
|
|
1168
|
+
askAbout: "Ask about",
|
|
1169
|
+
poweredBy: "Powered by",
|
|
1170
|
+
sendMessage: "Send a message\u2026",
|
|
1171
|
+
search: "Search\u2026",
|
|
1172
|
+
generalContext: "General Context",
|
|
1173
|
+
defaultGreeting: "Hello! How can I help you today?",
|
|
1174
|
+
connecting: "Connecting...",
|
|
1175
|
+
listening: "Listening...",
|
|
1176
|
+
speaking: "Speaking...",
|
|
1177
|
+
ready: "Ready",
|
|
1178
|
+
aiAssistant: "AI Assistant",
|
|
1179
|
+
minimize: "Minimize",
|
|
1180
|
+
expand: "Expand",
|
|
1181
|
+
voiceCall: "Voice Call",
|
|
1182
|
+
newConversation: "New conversation",
|
|
1183
|
+
close: "Close",
|
|
1184
|
+
dropFiles: "Drop files to attach",
|
|
1185
|
+
talkingToAgent: "Talking to an agent",
|
|
1186
|
+
muteMic: "Mute microphone",
|
|
1187
|
+
unmuteMic: "Unmute microphone",
|
|
1188
|
+
disconnect: "Disconnect",
|
|
1189
|
+
calling: "Calling",
|
|
1190
|
+
called: "Called",
|
|
1191
|
+
failed: "Failed",
|
|
1192
|
+
reasoning: "Reasoning",
|
|
1193
|
+
noResults: "No results",
|
|
1194
|
+
proceed: "Proceed",
|
|
1195
|
+
proceedMessage: "yes, proceed",
|
|
1196
|
+
cancel: "Cancel",
|
|
1197
|
+
cancelMessage: "cancel",
|
|
1198
|
+
regenerateResponse: "Regenerate response",
|
|
1199
|
+
removeContext: "Remove context",
|
|
1200
|
+
stopRecording: "Stop recording",
|
|
1201
|
+
recordVoiceMessage: "Record voice message",
|
|
1202
|
+
attachFile: "Attach file (CSV, image\u2026)",
|
|
1203
|
+
requestHuman: "Talk to an agent",
|
|
1204
|
+
requestHumanSublabel: "We'll connect you with an available agent",
|
|
1205
|
+
returnToAi: "Return to AI chat",
|
|
1206
|
+
returnToAiSublabel: "Instant response with artificial intelligence",
|
|
1207
|
+
filesCount: "{count} file(s)",
|
|
1208
|
+
tellMeAbout: "Tell me about {name}",
|
|
1209
|
+
tellMeMoreAbout: "Tell me more about: {name}",
|
|
1210
|
+
whatDoYouKnowAbout: "What do you know about {name}?",
|
|
1211
|
+
uploadFailed: "Upload failed",
|
|
1212
|
+
remove: "Remove"
|
|
1213
|
+
},
|
|
1214
|
+
es: {
|
|
1215
|
+
quickActions: "Acciones r\xE1pidas",
|
|
1216
|
+
documentation: "Documentaci\xF3n",
|
|
1217
|
+
askAbout: "Preguntas frecuentes",
|
|
1218
|
+
poweredBy: "Powered by",
|
|
1219
|
+
sendMessage: "Enviar un mensaje...",
|
|
1220
|
+
search: "Buscar...",
|
|
1221
|
+
generalContext: "Contexto general",
|
|
1222
|
+
defaultGreeting: "\xA1Hola! \xBFC\xF3mo puedo ayudarte hoy?",
|
|
1223
|
+
connecting: "Conectando...",
|
|
1224
|
+
listening: "Escuchando...",
|
|
1225
|
+
speaking: "Hablando...",
|
|
1226
|
+
ready: "Listo",
|
|
1227
|
+
aiAssistant: "Asistente de IA",
|
|
1228
|
+
minimize: "Minimizar",
|
|
1229
|
+
expand: "Expandir",
|
|
1230
|
+
voiceCall: "Llamada de voz",
|
|
1231
|
+
newConversation: "Nueva conversaci\xF3n",
|
|
1232
|
+
close: "Cerrar",
|
|
1233
|
+
dropFiles: "Arrastra archivos para adjuntar",
|
|
1234
|
+
talkingToAgent: "Hablando con un agente",
|
|
1235
|
+
muteMic: "Silenciar micr\xF3fono",
|
|
1236
|
+
unmuteMic: "Activar micr\xF3fono",
|
|
1237
|
+
disconnect: "Desconectar",
|
|
1238
|
+
calling: "Llamando",
|
|
1239
|
+
called: "Llamado",
|
|
1240
|
+
failed: "Fall\xF3",
|
|
1241
|
+
reasoning: "Razonamiento",
|
|
1242
|
+
noResults: "Sin resultados",
|
|
1243
|
+
proceed: "Proceder",
|
|
1244
|
+
proceedMessage: "s\xED, proceder",
|
|
1245
|
+
cancel: "Cancelar",
|
|
1246
|
+
cancelMessage: "cancelar",
|
|
1247
|
+
regenerateResponse: "Regenerar respuesta",
|
|
1248
|
+
removeContext: "Eliminar contexto",
|
|
1249
|
+
stopRecording: "Detener grabaci\xF3n",
|
|
1250
|
+
recordVoiceMessage: "Grabar mensaje de voz",
|
|
1251
|
+
attachFile: "Adjuntar archivo (CSV, imagen...)",
|
|
1252
|
+
requestHuman: "Hablar con un agente",
|
|
1253
|
+
requestHumanSublabel: "Te conectamos con un agente disponible",
|
|
1254
|
+
returnToAi: "Volver a chatear con la IA",
|
|
1255
|
+
returnToAiSublabel: "Respuesta instant\xE1nea con inteligencia artificial",
|
|
1256
|
+
filesCount: "{count} archivo(s)",
|
|
1257
|
+
tellMeAbout: "H\xE1blame de {name}",
|
|
1258
|
+
tellMeMoreAbout: "Cu\xE9ntame m\xE1s sobre: {name}",
|
|
1259
|
+
whatDoYouKnowAbout: "\xBFQu\xE9 sabes sobre {name}?",
|
|
1260
|
+
uploadFailed: "Error al subir",
|
|
1261
|
+
remove: "Quitar"
|
|
1262
|
+
}
|
|
1263
|
+
};
|
|
1264
|
+
function getWidgetTranslation(key, locale, replacements) {
|
|
1265
|
+
const lang = locale === "es" ? "es" : "en";
|
|
1266
|
+
let text = WIDGET_TRANSLATIONS[lang][key];
|
|
1267
|
+
if (replacements) {
|
|
1268
|
+
Object.entries(replacements).forEach(([k, v]) => {
|
|
1269
|
+
text = text.replace(`{${k}}`, v);
|
|
1270
|
+
});
|
|
1271
|
+
}
|
|
1272
|
+
return text;
|
|
1273
|
+
}
|
|
1149
1274
|
var Avatar = ({
|
|
1150
1275
|
style,
|
|
1151
1276
|
...p
|
|
@@ -1208,7 +1333,8 @@ function ChatHeader({
|
|
|
1208
1333
|
onExpand,
|
|
1209
1334
|
expanded,
|
|
1210
1335
|
onCall,
|
|
1211
|
-
isCallLoading
|
|
1336
|
+
isCallLoading,
|
|
1337
|
+
locale
|
|
1212
1338
|
}) {
|
|
1213
1339
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1214
1340
|
"header",
|
|
@@ -1241,7 +1367,7 @@ function ChatHeader({
|
|
|
1241
1367
|
),
|
|
1242
1368
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ww-min-w-0", children: [
|
|
1243
1369
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "ww-font-semibold ww-text-sm ww-truncate ww-leading-tight", children: title }),
|
|
1244
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "ww-text-[10px] ww-opacity-70 ww-leading-tight", children: "
|
|
1370
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "ww-text-[10px] ww-opacity-70 ww-leading-tight", children: getWidgetTranslation("aiAssistant", locale) })
|
|
1245
1371
|
] })
|
|
1246
1372
|
] }),
|
|
1247
1373
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ww-flex ww-items-center ww-gap-1", children: [
|
|
@@ -1250,7 +1376,7 @@ function ChatHeader({
|
|
|
1250
1376
|
{
|
|
1251
1377
|
onClick: onExpand,
|
|
1252
1378
|
className: "ww-rounded-full ww-p-1.5 ww-transition-colors hover:ww-bg-white/10",
|
|
1253
|
-
title: expanded ? "
|
|
1379
|
+
title: expanded ? getWidgetTranslation("minimize", locale) : getWidgetTranslation("expand", locale),
|
|
1254
1380
|
children: expanded ? /* @__PURE__ */ jsxRuntime.jsx(MinimizeIcon, {}) : /* @__PURE__ */ jsxRuntime.jsx(ExpandIcon, {})
|
|
1255
1381
|
}
|
|
1256
1382
|
),
|
|
@@ -1260,7 +1386,7 @@ function ChatHeader({
|
|
|
1260
1386
|
onClick: onCall,
|
|
1261
1387
|
disabled: isCallLoading,
|
|
1262
1388
|
className: "ww-rounded-full ww-p-1.5 ww-transition-colors hover:ww-bg-white/10 disabled:ww-opacity-50",
|
|
1263
|
-
title: "
|
|
1389
|
+
title: getWidgetTranslation("voiceCall", locale),
|
|
1264
1390
|
children: isCallLoading ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1265
1391
|
"svg",
|
|
1266
1392
|
{
|
|
@@ -1304,7 +1430,7 @@ function ChatHeader({
|
|
|
1304
1430
|
{
|
|
1305
1431
|
onClick: onReset,
|
|
1306
1432
|
className: "ww-rounded-full ww-p-1.5 ww-transition-colors hover:ww-bg-white/10",
|
|
1307
|
-
title: "
|
|
1433
|
+
title: getWidgetTranslation("newConversation", locale),
|
|
1308
1434
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1309
1435
|
lucideReact.RotateCcw,
|
|
1310
1436
|
{
|
|
@@ -1319,7 +1445,7 @@ function ChatHeader({
|
|
|
1319
1445
|
{
|
|
1320
1446
|
onClick: onClose,
|
|
1321
1447
|
className: "ww-rounded-full ww-p-1.5 ww-transition-colors hover:ww-bg-white/10",
|
|
1322
|
-
title: "
|
|
1448
|
+
title: getWidgetTranslation("close", locale),
|
|
1323
1449
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "ww-h-3.5 ww-w-3.5", style: { color: headerText } })
|
|
1324
1450
|
}
|
|
1325
1451
|
)
|
|
@@ -1361,7 +1487,8 @@ function ChipLeading({ a }) {
|
|
|
1361
1487
|
}
|
|
1362
1488
|
function AttachmentChips({
|
|
1363
1489
|
attachments,
|
|
1364
|
-
onRemove
|
|
1490
|
+
onRemove,
|
|
1491
|
+
locale
|
|
1365
1492
|
}) {
|
|
1366
1493
|
if (attachments.length === 0) return null;
|
|
1367
1494
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ww-flex ww-flex-wrap ww-gap-1.5 ww-px-1 ww-pb-1.5", children: attachments.map((a) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -1373,7 +1500,7 @@ function AttachmentChips({
|
|
|
1373
1500
|
),
|
|
1374
1501
|
children: [
|
|
1375
1502
|
/* @__PURE__ */ jsxRuntime.jsx(ChipLeading, { a }),
|
|
1376
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ww-truncate ww-leading-tight", children: a.status === "error" ? a.errorMessage ?? "
|
|
1503
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ww-truncate ww-leading-tight", children: a.status === "error" ? a.errorMessage ?? getWidgetTranslation("uploadFailed", locale) : a.name }),
|
|
1377
1504
|
a.status === "ready" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ww-shrink-0 ww-text-muted-foreground/50", children: formatBytes(a.sizeBytes) }),
|
|
1378
1505
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1379
1506
|
"button",
|
|
@@ -1381,7 +1508,7 @@ function AttachmentChips({
|
|
|
1381
1508
|
type: "button",
|
|
1382
1509
|
onClick: () => onRemove(a.id),
|
|
1383
1510
|
className: "ww-shrink-0 ww-rounded-full ww-p-0.5 hover:ww-bg-foreground/10 ww-transition-colors ww-ml-0.5",
|
|
1384
|
-
title: "
|
|
1511
|
+
title: getWidgetTranslation("remove", locale),
|
|
1385
1512
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "ww-h-2.5 ww-w-2.5" })
|
|
1386
1513
|
}
|
|
1387
1514
|
)
|
|
@@ -1461,7 +1588,8 @@ function PlanStepIcon({ status }) {
|
|
|
1461
1588
|
function PlanCard({
|
|
1462
1589
|
part,
|
|
1463
1590
|
onSend,
|
|
1464
|
-
disabled
|
|
1591
|
+
disabled,
|
|
1592
|
+
locale
|
|
1465
1593
|
}) {
|
|
1466
1594
|
const successCount = part.steps.filter((s) => s.status === "success").length;
|
|
1467
1595
|
const hasExecuting = part.steps.some((s) => s.status === "executing");
|
|
@@ -1513,7 +1641,7 @@ function PlanCard({
|
|
|
1513
1641
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1514
1642
|
"button",
|
|
1515
1643
|
{
|
|
1516
|
-
onClick: () => onSend("
|
|
1644
|
+
onClick: () => onSend(getWidgetTranslation("proceedMessage", locale)),
|
|
1517
1645
|
disabled,
|
|
1518
1646
|
className: "ww-flex-1 ww-flex ww-items-center ww-justify-center ww-gap-1.5 ww-rounded-lg ww-py-1.5 ww-text-xs ww-font-semibold ww-transition-opacity hover:ww-opacity-85 active:ww-scale-[0.98] disabled:ww-opacity-50 disabled:ww-pointer-events-none",
|
|
1519
1647
|
style: {
|
|
@@ -1522,19 +1650,19 @@ function PlanCard({
|
|
|
1522
1650
|
},
|
|
1523
1651
|
children: [
|
|
1524
1652
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "ww-h-3 ww-w-3 ww-shrink-0" }),
|
|
1525
|
-
"
|
|
1653
|
+
getWidgetTranslation("proceed", locale)
|
|
1526
1654
|
]
|
|
1527
1655
|
}
|
|
1528
1656
|
),
|
|
1529
1657
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1530
1658
|
"button",
|
|
1531
1659
|
{
|
|
1532
|
-
onClick: () => onSend("
|
|
1660
|
+
onClick: () => onSend(getWidgetTranslation("cancelMessage", locale)),
|
|
1533
1661
|
disabled,
|
|
1534
1662
|
className: "ww-flex ww-items-center ww-justify-center ww-gap-1.5 ww-rounded-lg ww-px-3 ww-py-1.5 ww-text-xs ww-font-medium ww-bg-muted ww-text-muted-foreground ww-transition-opacity hover:ww-opacity-80 active:ww-scale-[0.98] disabled:ww-opacity-50 disabled:ww-pointer-events-none",
|
|
1535
1663
|
children: [
|
|
1536
1664
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "ww-h-3 ww-w-3 ww-shrink-0" }),
|
|
1537
|
-
"
|
|
1665
|
+
getWidgetTranslation("cancel", locale)
|
|
1538
1666
|
]
|
|
1539
1667
|
}
|
|
1540
1668
|
)
|
|
@@ -1578,19 +1706,25 @@ function ThinkingDots() {
|
|
|
1578
1706
|
)
|
|
1579
1707
|
] });
|
|
1580
1708
|
}
|
|
1581
|
-
function ToolCallBadge({
|
|
1709
|
+
function ToolCallBadge({
|
|
1710
|
+
part,
|
|
1711
|
+
locale
|
|
1712
|
+
}) {
|
|
1582
1713
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ww-flex ww-items-center ww-gap-1.5 ww-text-xs ww-text-muted-foreground ww-bg-muted/60 ww-border ww-rounded-full ww-px-3 ww-py-1 ww-w-fit", children: [
|
|
1583
1714
|
part.status === "running" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "ww-h-3 ww-w-3 ww-animate-spin" }),
|
|
1584
1715
|
part.status === "done" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle2, { className: "ww-h-3 ww-w-3 ww-text-emerald-500" }),
|
|
1585
1716
|
part.status === "error" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertCircle, { className: "ww-h-3 ww-w-3 ww-text-destructive" }),
|
|
1586
1717
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
1587
|
-
part.status === "running" ? "
|
|
1718
|
+
part.status === "running" ? getWidgetTranslation("calling", locale) : part.status === "done" ? getWidgetTranslation("called", locale) : getWidgetTranslation("failed", locale),
|
|
1588
1719
|
" ",
|
|
1589
1720
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ww-font-medium ww-text-foreground", children: formatToolName(part.toolName) })
|
|
1590
1721
|
] })
|
|
1591
1722
|
] });
|
|
1592
1723
|
}
|
|
1593
|
-
function ReasoningBlock({
|
|
1724
|
+
function ReasoningBlock({
|
|
1725
|
+
text,
|
|
1726
|
+
locale
|
|
1727
|
+
}) {
|
|
1594
1728
|
const [open, setOpen] = react.useState(false);
|
|
1595
1729
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ww-mb-1", children: [
|
|
1596
1730
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -1600,7 +1734,7 @@ function ReasoningBlock({ text }) {
|
|
|
1600
1734
|
className: "ww-flex ww-items-center ww-gap-1 ww-text-xs ww-text-muted-foreground hover:ww-text-foreground ww-transition-colors",
|
|
1601
1735
|
children: [
|
|
1602
1736
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Zap, { className: "ww-h-3 ww-w-3" }),
|
|
1603
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "
|
|
1737
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: getWidgetTranslation("reasoning", locale) }),
|
|
1604
1738
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1605
1739
|
lucideReact.ChevronDown,
|
|
1606
1740
|
{
|
|
@@ -1619,7 +1753,8 @@ function ReasoningBlock({ text }) {
|
|
|
1619
1753
|
function PickerSelector({
|
|
1620
1754
|
part,
|
|
1621
1755
|
disabled,
|
|
1622
|
-
onSelect
|
|
1756
|
+
onSelect,
|
|
1757
|
+
locale
|
|
1623
1758
|
}) {
|
|
1624
1759
|
const count = part.options.length;
|
|
1625
1760
|
const mode = count <= 6 ? "pills" : count <= 20 ? "grid" : "list";
|
|
@@ -1651,7 +1786,7 @@ function PickerSelector({
|
|
|
1651
1786
|
type: "text",
|
|
1652
1787
|
value: query,
|
|
1653
1788
|
onChange: (e) => setQuery(e.target.value),
|
|
1654
|
-
placeholder: "
|
|
1789
|
+
placeholder: getWidgetTranslation("search", locale),
|
|
1655
1790
|
disabled: disabled || isConsumed,
|
|
1656
1791
|
className: "ww-w-full ww-rounded-lg ww-border ww-bg-background ww-pl-7 ww-pr-3 ww-py-1.5 ww-text-xs ww-outline-none focus:ww-ring-1 focus:ww-ring-ring/40 placeholder:ww-text-muted-foreground/40 disabled:ww-opacity-50"
|
|
1657
1792
|
}
|
|
@@ -1700,7 +1835,7 @@ function PickerSelector({
|
|
|
1700
1835
|
);
|
|
1701
1836
|
}) }),
|
|
1702
1837
|
mode === "list" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ww-flex ww-flex-col ww-gap-0.5 ww-max-h-[180px] ww-overflow-y-auto ww-pr-0.5", children: [
|
|
1703
|
-
filtered.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "ww-py-3 ww-text-center ww-text-xs ww-text-muted-foreground/50", children: "
|
|
1838
|
+
filtered.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "ww-py-3 ww-text-center ww-text-xs ww-text-muted-foreground/50", children: getWidgetTranslation("noResults", locale) }),
|
|
1704
1839
|
filtered.map((opt, i) => {
|
|
1705
1840
|
const sel = part.selectedValue === opt.value;
|
|
1706
1841
|
const faded = isConsumed && !sel;
|
|
@@ -1957,10 +2092,11 @@ function MessageBubble({
|
|
|
1957
2092
|
userColor,
|
|
1958
2093
|
agentName,
|
|
1959
2094
|
profilePicture,
|
|
1960
|
-
isStreaming,
|
|
2095
|
+
isStreaming = false,
|
|
1961
2096
|
showThinking = true,
|
|
1962
2097
|
onPickerSelect,
|
|
1963
|
-
onSend
|
|
2098
|
+
onSend,
|
|
2099
|
+
locale
|
|
1964
2100
|
}) {
|
|
1965
2101
|
const isUser = message.role === "user";
|
|
1966
2102
|
const textPart = message.parts.find((p) => p.type === "text");
|
|
@@ -2021,24 +2157,26 @@ function MessageBubble({
|
|
|
2021
2157
|
}
|
|
2022
2158
|
),
|
|
2023
2159
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ww-flex ww-flex-col ww-gap-1.5 ww-min-w-0 ww-max-w-[82%]", children: [
|
|
2024
|
-
showThinking && reasoningPart && /* @__PURE__ */ jsxRuntime.jsx(ReasoningBlock, { text: reasoningPart.text }),
|
|
2160
|
+
showThinking && reasoningPart && /* @__PURE__ */ jsxRuntime.jsx(ReasoningBlock, { text: reasoningPart.text, locale }),
|
|
2025
2161
|
planParts.map((p) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2026
2162
|
PlanCard,
|
|
2027
2163
|
{
|
|
2028
2164
|
part: p,
|
|
2029
2165
|
onSend,
|
|
2030
|
-
disabled: isStreaming
|
|
2166
|
+
disabled: isStreaming,
|
|
2167
|
+
locale
|
|
2031
2168
|
},
|
|
2032
2169
|
p.planId
|
|
2033
2170
|
)),
|
|
2034
|
-
visibleToolParts.map((t) => /* @__PURE__ */ jsxRuntime.jsx(ToolCallBadge, { part: t }, t.toolCallId)),
|
|
2171
|
+
visibleToolParts.map((t) => /* @__PURE__ */ jsxRuntime.jsx(ToolCallBadge, { part: t, locale }, t.toolCallId)),
|
|
2035
2172
|
pickerParts.map((p) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2036
2173
|
PickerSelector,
|
|
2037
2174
|
{
|
|
2038
2175
|
part: p,
|
|
2039
2176
|
disabled: isStreaming ?? false,
|
|
2040
2177
|
onSelect: onPickerSelect ?? (() => {
|
|
2041
|
-
})
|
|
2178
|
+
}),
|
|
2179
|
+
locale
|
|
2042
2180
|
},
|
|
2043
2181
|
p.pickerId
|
|
2044
2182
|
)),
|
|
@@ -2086,7 +2224,9 @@ function ChatMessages({
|
|
|
2086
2224
|
suggestedMessages = [],
|
|
2087
2225
|
showThinking = true,
|
|
2088
2226
|
onSuggest,
|
|
2089
|
-
onPickerSelect
|
|
2227
|
+
onPickerSelect,
|
|
2228
|
+
commandPanel,
|
|
2229
|
+
locale
|
|
2090
2230
|
}) {
|
|
2091
2231
|
const bottomRef = react.useRef(null);
|
|
2092
2232
|
const greetText = initialMessages[0];
|
|
@@ -2099,6 +2239,7 @@ function ChatMessages({
|
|
|
2099
2239
|
/* @__PURE__ */ jsxRuntime.jsx(Avatar3, { className: "ww-h-7 ww-w-7 ww-shrink-0 ww-mt-0.5 ww-border", children: profilePicture ? /* @__PURE__ */ jsxRuntime.jsx(AvatarImage3, { src: profilePicture, alt: agentName }) : /* @__PURE__ */ jsxRuntime.jsx(AvatarFallback3, { className: "ww-text-[10px] ww-font-semibold ww-bg-primary ww-text-primary-foreground", children: agentName.slice(0, 2).toUpperCase() }) }),
|
|
2100
2240
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ww-rounded-2xl ww-rounded-tl-sm ww-bg-muted ww-px-4 ww-py-2.5 ww-text-sm ww-leading-relaxed ww-max-w-[82%]", children: greetText })
|
|
2101
2241
|
] }),
|
|
2242
|
+
showGreeting && commandPanel,
|
|
2102
2243
|
showGreeting && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ww-flex-1" }),
|
|
2103
2244
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ww-flex ww-flex-col ww-gap-4 ww-px-4 ww-py-4", children: messages.map((msg, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2104
2245
|
MessageBubble,
|
|
@@ -2110,7 +2251,8 @@ function ChatMessages({
|
|
|
2110
2251
|
isStreaming: streaming && i === messages.length - 1 && msg.role === "assistant",
|
|
2111
2252
|
showThinking,
|
|
2112
2253
|
onPickerSelect,
|
|
2113
|
-
onSend: i === messages.length - 1 ? onSuggest : void 0
|
|
2254
|
+
onSend: i === messages.length - 1 ? onSuggest : void 0,
|
|
2255
|
+
locale
|
|
2114
2256
|
},
|
|
2115
2257
|
msg.id
|
|
2116
2258
|
)) }),
|
|
@@ -2199,16 +2341,16 @@ var serializeEditor = (editor) => {
|
|
|
2199
2341
|
var createChipElement = (name, type, id, accentColor) => {
|
|
2200
2342
|
const span = document.createElement("span");
|
|
2201
2343
|
span.setAttribute("contenteditable", "false");
|
|
2202
|
-
span.className = "ww-inline-flex ww-items-center ww-gap-1
|
|
2344
|
+
span.className = "ww-inline-flex ww-items-center ww-gap-1 ww-bg-primary/10 ww-border ww-border-primary/20 ww-text-primary ww-text-[11px] ww-font-semibold ww-px-1.5 ww-py-0.5 ww-rounded ww-mx-0.5 ww-align-baseline ww-select-all ww-shadow-3xs";
|
|
2203
2345
|
span.style.setProperty("--primary", accentColor);
|
|
2204
2346
|
span.setAttribute("data-wlv-context-id", id);
|
|
2205
2347
|
span.setAttribute("data-wlv-context-type", type);
|
|
2206
2348
|
span.setAttribute("data-wlv-context-name", name);
|
|
2207
2349
|
const dot = document.createElement("span");
|
|
2208
|
-
dot.className = "ww-h-1.5 ww-w-1.5 ww-rounded-full ww-bg-primary";
|
|
2350
|
+
dot.className = "ww-h-1.5 ww-w-1.5 ww-rounded-full ww-bg-primary ww-shrink-0";
|
|
2209
2351
|
span.appendChild(dot);
|
|
2210
2352
|
const typeSpan = document.createElement("span");
|
|
2211
|
-
typeSpan.className = "ww-opacity-
|
|
2353
|
+
typeSpan.className = "ww-opacity-60 ww-uppercase ww-text-[8px] ww-tracking-[0.06em] ww-font-bold";
|
|
2212
2354
|
typeSpan.textContent = `${type}:`;
|
|
2213
2355
|
span.appendChild(typeSpan);
|
|
2214
2356
|
const nameSpan = document.createElement("span");
|
|
@@ -2216,7 +2358,7 @@ var createChipElement = (name, type, id, accentColor) => {
|
|
|
2216
2358
|
span.appendChild(nameSpan);
|
|
2217
2359
|
const button = document.createElement("button");
|
|
2218
2360
|
button.type = "button";
|
|
2219
|
-
button.className = "ww-ml-1 ww-text-primary/
|
|
2361
|
+
button.className = "ww-ml-1 ww-text-primary/60 hover:ww-text-primary hover:ww-scale-110 ww-transition-all ww-font-bold ww-rounded-full hover:ww-bg-primary/10 ww-w-3.5 ww-h-3.5 ww-flex ww-items-center ww-justify-center ww-text-[10px]";
|
|
2220
2362
|
button.textContent = "\xD7";
|
|
2221
2363
|
button.onclick = () => {
|
|
2222
2364
|
span.remove();
|
|
@@ -2242,12 +2384,23 @@ function ChatInput({
|
|
|
2242
2384
|
onRemoveAttachment,
|
|
2243
2385
|
isUploading = false,
|
|
2244
2386
|
selectedContext,
|
|
2245
|
-
onClearContext
|
|
2387
|
+
onClearContext,
|
|
2388
|
+
locale
|
|
2246
2389
|
}) {
|
|
2247
2390
|
const hasVoice = onVoiceStart !== void 0;
|
|
2248
2391
|
const hasAttachments = onAttach !== void 0;
|
|
2249
2392
|
const fileInputRef = react.useRef(null);
|
|
2250
2393
|
const textareaRef = react.useRef(null);
|
|
2394
|
+
const lastRangeRef = react.useRef(null);
|
|
2395
|
+
const saveSelection = () => {
|
|
2396
|
+
const sel = window.getSelection();
|
|
2397
|
+
if (sel && sel.rangeCount > 0) {
|
|
2398
|
+
const range = sel.getRangeAt(0);
|
|
2399
|
+
if (textareaRef.current?.contains(range.commonAncestorContainer)) {
|
|
2400
|
+
lastRangeRef.current = range.cloneRange();
|
|
2401
|
+
}
|
|
2402
|
+
}
|
|
2403
|
+
};
|
|
2251
2404
|
const insertNodeAtCursor = (node) => {
|
|
2252
2405
|
const sel = window.getSelection();
|
|
2253
2406
|
if (sel && sel.rangeCount > 0) {
|
|
@@ -2292,8 +2445,27 @@ function ChatInput({
|
|
|
2292
2445
|
accentColor
|
|
2293
2446
|
);
|
|
2294
2447
|
textareaRef.current.focus();
|
|
2448
|
+
const sel = window.getSelection();
|
|
2449
|
+
if (sel) {
|
|
2450
|
+
if (lastRangeRef.current && textareaRef.current.contains(
|
|
2451
|
+
lastRangeRef.current.commonAncestorContainer
|
|
2452
|
+
)) {
|
|
2453
|
+
sel.removeAllRanges();
|
|
2454
|
+
sel.addRange(lastRangeRef.current);
|
|
2455
|
+
} else {
|
|
2456
|
+
const range = document.createRange();
|
|
2457
|
+
range.selectNodeContents(textareaRef.current);
|
|
2458
|
+
range.collapse(false);
|
|
2459
|
+
sel.removeAllRanges();
|
|
2460
|
+
sel.addRange(range);
|
|
2461
|
+
}
|
|
2462
|
+
}
|
|
2295
2463
|
insertNodeAtCursor(chipEl);
|
|
2296
2464
|
setInput(serializeEditor(textareaRef.current));
|
|
2465
|
+
const newSel = window.getSelection();
|
|
2466
|
+
if (newSel && newSel.rangeCount > 0) {
|
|
2467
|
+
lastRangeRef.current = newSel.getRangeAt(0).cloneRange();
|
|
2468
|
+
}
|
|
2297
2469
|
if (onClearContext) {
|
|
2298
2470
|
onClearContext();
|
|
2299
2471
|
}
|
|
@@ -2345,13 +2517,28 @@ function ChatInput({
|
|
|
2345
2517
|
}
|
|
2346
2518
|
};
|
|
2347
2519
|
const hasText = input.trim().length > 0;
|
|
2348
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ww-shrink-0 ww-border-t ww-bg-
|
|
2520
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ww-shrink-0 ww-border-t ww-border-border/40 ww-bg-muted/30 ww-px-3.5 ww-py-3 ww-shadow-[0_-4px_20px_rgba(0,0,0,0.02)]", children: [
|
|
2349
2521
|
/* @__PURE__ */ jsxRuntime.jsx("style", { children: `
|
|
2350
2522
|
#wallavi-chat-input:empty::before {
|
|
2351
2523
|
content: attr(placeholder);
|
|
2352
2524
|
color: rgba(120, 120, 120, 0.45);
|
|
2353
2525
|
pointer-events: none;
|
|
2354
2526
|
}
|
|
2527
|
+
#wallavi-chat-input-container {
|
|
2528
|
+
border: 1.5px solid rgba(var(--accent-rgb), 0.18);
|
|
2529
|
+
box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.03), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
|
|
2530
|
+
transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
|
|
2531
|
+
}
|
|
2532
|
+
#wallavi-chat-input-container:hover {
|
|
2533
|
+
border-color: rgba(var(--accent-rgb), 0.42);
|
|
2534
|
+
box-shadow: 0 10px 20px -4px rgba(var(--accent-rgb), 0.08), 0 4px 8px -2px rgba(var(--accent-rgb), 0.04);
|
|
2535
|
+
transform: translateY(-1px);
|
|
2536
|
+
}
|
|
2537
|
+
#wallavi-chat-input-container:focus-within {
|
|
2538
|
+
border-color: var(--accent-color);
|
|
2539
|
+
box-shadow: 0 20px 32px -8px rgba(var(--accent-rgb), 0.15), 0 8px 16px -4px rgba(var(--accent-rgb), 0.08), 0 0 0 4px rgba(var(--accent-rgb), 0.18);
|
|
2540
|
+
transform: translateY(-2px) scale(1.005);
|
|
2541
|
+
}
|
|
2355
2542
|
` }),
|
|
2356
2543
|
canRegenerate && onRegenerate && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2357
2544
|
"button",
|
|
@@ -2361,135 +2548,176 @@ function ChatInput({
|
|
|
2361
2548
|
className: "ww-flex ww-items-center ww-gap-1 ww-text-[11px] ww-text-muted-foreground hover:ww-text-foreground ww-transition-colors ww-mb-2 disabled:ww-opacity-40",
|
|
2362
2549
|
children: [
|
|
2363
2550
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.RotateCcw, { className: "ww-h-3 ww-w-3" }),
|
|
2364
|
-
"
|
|
2551
|
+
getWidgetTranslation("regenerateResponse", locale)
|
|
2365
2552
|
]
|
|
2366
2553
|
}
|
|
2367
2554
|
),
|
|
2368
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2555
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2556
|
+
"div",
|
|
2557
|
+
{
|
|
2558
|
+
id: "wallavi-chat-input-container",
|
|
2559
|
+
className: "ww-flex ww-flex-col ww-rounded-2xl ww-bg-background ww-shadow-sm",
|
|
2560
|
+
style: {
|
|
2561
|
+
["--accent-color"]: accentColor,
|
|
2562
|
+
["--accent-rgb"]: (() => {
|
|
2563
|
+
const clean = accentColor.replace("#", "");
|
|
2564
|
+
const r = parseInt(clean.substring(0, 2), 16);
|
|
2565
|
+
const g = parseInt(clean.substring(2, 4), 16);
|
|
2566
|
+
const b = parseInt(clean.substring(4, 6), 16);
|
|
2567
|
+
return isNaN(r) || isNaN(g) || isNaN(b) ? "120, 120, 120" : `${r}, ${g}, ${b}`;
|
|
2568
|
+
})()
|
|
2569
|
+
},
|
|
2570
|
+
children: [
|
|
2571
|
+
selectedContext && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ww-px-3 ww-pt-2.5 ww-flex ww-items-center", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ww-flex ww-items-center ww-gap-2 ww-bg-primary/5 ww-border ww-border-primary/10 ww-text-primary ww-text-xs ww-font-semibold ww-px-3 ww-py-1.5 ww-rounded-xl ww-shadow-2xs ww-backdrop-blur-sm ww-animate-in ww-fade-in ww-slide-in-from-bottom-2 ww-duration-200", children: [
|
|
2572
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2384
2573
|
"svg",
|
|
2385
2574
|
{
|
|
2386
|
-
className: "ww-h-3 ww-
|
|
2575
|
+
className: "ww-w-3.5 ww-h-3.5 ww-shrink-0 ww-opacity-60",
|
|
2387
2576
|
viewBox: "0 0 24 24",
|
|
2388
2577
|
fill: "none",
|
|
2389
2578
|
stroke: "currentColor",
|
|
2390
|
-
strokeWidth: "2
|
|
2579
|
+
strokeWidth: "2",
|
|
2391
2580
|
strokeLinecap: "round",
|
|
2392
2581
|
strokeLinejoin: "round",
|
|
2393
2582
|
children: [
|
|
2394
|
-
/* @__PURE__ */ jsxRuntime.jsx("
|
|
2395
|
-
/* @__PURE__ */ jsxRuntime.jsx("
|
|
2583
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "10" }),
|
|
2584
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "6" }),
|
|
2585
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "2" })
|
|
2396
2586
|
]
|
|
2397
2587
|
}
|
|
2588
|
+
),
|
|
2589
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ww-opacity-55 ww-uppercase ww-text-[9px] ww-tracking-[0.06em] ww-font-bold", children: [
|
|
2590
|
+
selectedContext.type,
|
|
2591
|
+
":"
|
|
2592
|
+
] }),
|
|
2593
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ww-font-semibold", children: selectedContext.name }),
|
|
2594
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2595
|
+
"button",
|
|
2596
|
+
{
|
|
2597
|
+
type: "button",
|
|
2598
|
+
onClick: onClearContext,
|
|
2599
|
+
className: "ww-ml-0.5 ww-text-muted-foreground hover:ww-text-foreground ww-transition-all ww-rounded-full hover:ww-bg-primary/10 ww-w-4 ww-h-4 ww-flex ww-items-center ww-justify-center",
|
|
2600
|
+
title: getWidgetTranslation("removeContext", locale),
|
|
2601
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2602
|
+
"svg",
|
|
2603
|
+
{
|
|
2604
|
+
className: "ww-h-3 ww-w-3",
|
|
2605
|
+
viewBox: "0 0 24 24",
|
|
2606
|
+
fill: "none",
|
|
2607
|
+
stroke: "currentColor",
|
|
2608
|
+
strokeWidth: "2.5",
|
|
2609
|
+
strokeLinecap: "round",
|
|
2610
|
+
strokeLinejoin: "round",
|
|
2611
|
+
children: [
|
|
2612
|
+
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
2613
|
+
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
2614
|
+
]
|
|
2615
|
+
}
|
|
2616
|
+
)
|
|
2617
|
+
}
|
|
2398
2618
|
)
|
|
2399
|
-
}
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
onRemove: (id) => onRemoveAttachment?.(id)
|
|
2407
|
-
}
|
|
2408
|
-
) }),
|
|
2409
|
-
hasAttachments && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2410
|
-
"input",
|
|
2411
|
-
{
|
|
2412
|
-
ref: fileInputRef,
|
|
2413
|
-
type: "file",
|
|
2414
|
-
multiple: true,
|
|
2415
|
-
accept: ".csv,.txt,.tsv,.pdf,text/plain,text/csv,application/pdf,image/jpeg,image/png,image/webp,image/gif",
|
|
2416
|
-
className: "ww-hidden",
|
|
2417
|
-
onChange: (e) => {
|
|
2418
|
-
if (e.target.files?.length) {
|
|
2419
|
-
onAttach(e.target.files);
|
|
2420
|
-
e.target.value = "";
|
|
2619
|
+
] }) }),
|
|
2620
|
+
hasAttachments && attachments && attachments.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ww-px-2 ww-pt-2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2621
|
+
AttachmentChips,
|
|
2622
|
+
{
|
|
2623
|
+
attachments,
|
|
2624
|
+
onRemove: (id) => onRemoveAttachment?.(id),
|
|
2625
|
+
locale
|
|
2421
2626
|
}
|
|
2422
|
-
}
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2627
|
+
) }),
|
|
2628
|
+
hasAttachments && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2629
|
+
"input",
|
|
2630
|
+
{
|
|
2631
|
+
ref: fileInputRef,
|
|
2632
|
+
type: "file",
|
|
2633
|
+
multiple: true,
|
|
2634
|
+
accept: ".csv,.txt,.tsv,.pdf,text/plain,text/csv,application/pdf,image/jpeg,image/png,image/webp,image/gif",
|
|
2635
|
+
className: "ww-hidden",
|
|
2636
|
+
onChange: (e) => {
|
|
2637
|
+
if (e.target.files?.length) {
|
|
2638
|
+
onAttach(e.target.files);
|
|
2639
|
+
e.target.value = "";
|
|
2640
|
+
}
|
|
2641
|
+
}
|
|
2642
|
+
}
|
|
2643
|
+
),
|
|
2644
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ww-flex ww-items-end ww-gap-2 ww-px-3 ww-py-2", children: [
|
|
2645
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2646
|
+
"div",
|
|
2647
|
+
{
|
|
2648
|
+
id: "wallavi-chat-input",
|
|
2649
|
+
ref: textareaRef,
|
|
2650
|
+
contentEditable: !streaming && voiceState !== "recording" && voiceState !== "transcribing",
|
|
2651
|
+
className: "ww-flex-1 ww-min-h-[22px] ww-max-h-32 ww-overflow-y-auto ww-py-1 ww-outline-none ww-text-sm ww-leading-relaxed ww-bg-transparent",
|
|
2652
|
+
...{
|
|
2653
|
+
placeholder: placeholder || getWidgetTranslation("sendMessage", locale)
|
|
2654
|
+
},
|
|
2655
|
+
onKeyDown: handleKeyDown,
|
|
2656
|
+
onInput: handleInput,
|
|
2657
|
+
onPaste: handlePaste,
|
|
2658
|
+
onMouseUp: saveSelection,
|
|
2659
|
+
onKeyUp: saveSelection,
|
|
2660
|
+
style: { wordBreak: "break-word" }
|
|
2661
|
+
}
|
|
2452
2662
|
),
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2663
|
+
hasVoice && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2664
|
+
"button",
|
|
2665
|
+
{
|
|
2666
|
+
type: "button",
|
|
2667
|
+
onClick: voiceState === "recording" ? onVoiceStop : onVoiceStart,
|
|
2668
|
+
disabled: streaming || voiceState === "transcribing",
|
|
2669
|
+
title: voiceState === "recording" ? getWidgetTranslation("stopRecording", locale) : getWidgetTranslation("recordVoiceMessage", locale),
|
|
2670
|
+
className: cn3(
|
|
2671
|
+
"ww-h-7 ww-w-7 ww-shrink-0 ww-rounded-xl ww-flex ww-items-center ww-justify-center ww-transition-all ww-duration-200 hover:ww-bg-muted/70 hover:ww-scale-105 active:ww-scale-95",
|
|
2672
|
+
voiceState === "recording" && "ww-animate-pulse",
|
|
2673
|
+
voiceState === "error" ? "ww-text-red-500 ww-opacity-80" : "ww-text-muted-foreground hover:ww-text-foreground",
|
|
2674
|
+
(streaming || voiceState === "transcribing") && "ww-opacity-40 ww-pointer-events-none"
|
|
2675
|
+
),
|
|
2676
|
+
style: voiceState === "recording" ? { color: accentColor } : void 0,
|
|
2677
|
+
children: voiceState === "transcribing" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "ww-h-3.5 ww-w-3.5 ww-animate-spin" }) : voiceState === "recording" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Square, { className: "ww-h-3.5 ww-w-3.5 ww-fill-current" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Mic, { className: "ww-h-3.5 ww-w-3.5" })
|
|
2678
|
+
}
|
|
2468
2679
|
),
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2680
|
+
hasAttachments && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2681
|
+
"button",
|
|
2682
|
+
{
|
|
2683
|
+
type: "button",
|
|
2684
|
+
onClick: () => fileInputRef.current?.click(),
|
|
2685
|
+
disabled: streaming || isUploading,
|
|
2686
|
+
title: getWidgetTranslation("attachFile", locale),
|
|
2687
|
+
className: cn3(
|
|
2688
|
+
"ww-h-7 ww-w-7 ww-shrink-0 ww-rounded-xl ww-flex ww-items-center ww-justify-center ww-transition-all ww-duration-200 hover:ww-bg-muted/70 hover:ww-scale-105 active:ww-scale-95",
|
|
2689
|
+
"ww-text-muted-foreground hover:ww-text-foreground",
|
|
2690
|
+
(streaming || isUploading) && "ww-opacity-40 ww-pointer-events-none"
|
|
2691
|
+
),
|
|
2692
|
+
children: isUploading ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "ww-h-3.5 ww-w-3.5 ww-animate-spin" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Paperclip, { className: "ww-h-3.5 ww-w-3.5" })
|
|
2693
|
+
}
|
|
2480
2694
|
),
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2695
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2696
|
+
"button",
|
|
2697
|
+
{
|
|
2698
|
+
onClick: onSend,
|
|
2699
|
+
disabled: streaming || !hasText || voiceState === "recording" || voiceState === "transcribing",
|
|
2700
|
+
className: cn3(
|
|
2701
|
+
"ww-h-7 ww-w-7 ww-shrink-0 ww-rounded-xl ww-flex ww-items-center ww-justify-center ww-transition-all ww-duration-200 hover:ww-scale-105 active:ww-scale-95",
|
|
2702
|
+
hasText || streaming ? "ww-opacity-100 ww-shadow-sm hover:ww-shadow-md" : "ww-opacity-30"
|
|
2703
|
+
),
|
|
2704
|
+
style: hasText || streaming ? {
|
|
2705
|
+
backgroundColor: accentColor,
|
|
2706
|
+
color: getContrastColor(accentColor)
|
|
2707
|
+
} : { backgroundColor: "transparent", color: "currentColor" },
|
|
2708
|
+
children: streaming ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "ww-h-3.5 ww-w-3.5 ww-animate-spin" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUp, { className: "ww-h-3.5 ww-w-3.5" })
|
|
2709
|
+
}
|
|
2710
|
+
)
|
|
2711
|
+
] })
|
|
2712
|
+
]
|
|
2713
|
+
}
|
|
2714
|
+
)
|
|
2490
2715
|
] });
|
|
2491
2716
|
}
|
|
2492
|
-
function CustomControlBar({
|
|
2717
|
+
function CustomControlBar({
|
|
2718
|
+
onClose,
|
|
2719
|
+
locale
|
|
2720
|
+
}) {
|
|
2493
2721
|
const { localParticipant, isMicrophoneEnabled } = componentsReact.useLocalParticipant();
|
|
2494
2722
|
const room = componentsReact.useRoomContext();
|
|
2495
2723
|
const toggleMic = async () => {
|
|
@@ -2509,7 +2737,7 @@ function CustomControlBar({ onClose }) {
|
|
|
2509
2737
|
{
|
|
2510
2738
|
onClick: toggleMic,
|
|
2511
2739
|
className: `ww-flex ww-items-center ww-justify-center ww-h-16 ww-w-16 ww-rounded-full ww-transition-all ww-duration-300 ${isMicrophoneEnabled ? "ww-bg-foreground/5 hover:ww-bg-foreground/10 ww-text-foreground" : "ww-bg-foreground/20 hover:ww-bg-foreground/30 ww-text-foreground"}`,
|
|
2512
|
-
title: isMicrophoneEnabled ? "
|
|
2740
|
+
title: isMicrophoneEnabled ? getWidgetTranslation("muteMic", locale) : getWidgetTranslation("unmuteMic", locale),
|
|
2513
2741
|
children: isMicrophoneEnabled ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Mic, { className: "ww-w-6 ww-h-6" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MicOff, { className: "ww-w-6 ww-h-6" })
|
|
2514
2742
|
}
|
|
2515
2743
|
),
|
|
@@ -2519,7 +2747,7 @@ function CustomControlBar({ onClose }) {
|
|
|
2519
2747
|
onClick: disconnect,
|
|
2520
2748
|
className: "ww-flex ww-items-center ww-justify-center ww-h-16 ww-w-16 ww-rounded-full ww-text-white ww-transition-all ww-duration-300 ww-shadow-lg hover:ww-shadow-xl hover:-ww-translate-y-1",
|
|
2521
2749
|
style: { backgroundColor: "#ef4444" },
|
|
2522
|
-
title: "
|
|
2750
|
+
title: getWidgetTranslation("disconnect", locale),
|
|
2523
2751
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PhoneOff, { className: "ww-w-6 ww-h-6" })
|
|
2524
2752
|
}
|
|
2525
2753
|
)
|
|
@@ -2582,17 +2810,25 @@ function ChatGPTOrb() {
|
|
|
2582
2810
|
)
|
|
2583
2811
|
] });
|
|
2584
2812
|
}
|
|
2585
|
-
function AssistantVisualizer({
|
|
2813
|
+
function AssistantVisualizer({
|
|
2814
|
+
onClose,
|
|
2815
|
+
locale
|
|
2816
|
+
}) {
|
|
2586
2817
|
const { state } = componentsReact.useVoiceAssistant();
|
|
2587
2818
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ww-flex ww-flex-col ww-items-center ww-justify-center ww-h-full ww-w-full", children: [
|
|
2588
2819
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ww-flex-1 ww-flex ww-items-center ww-justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(ChatGPTOrb, {}) }),
|
|
2589
2820
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ww-h-40 ww-flex ww-flex-col ww-items-center ww-justify-center ww-gap-8 ww-mb-12", children: [
|
|
2590
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ww-text-sm ww-font-medium ww-tracking-wide ww-text-foreground/60 ww-uppercase", children: state === "connecting" || state === "initializing" ? "
|
|
2591
|
-
/* @__PURE__ */ jsxRuntime.jsx(CustomControlBar, { onClose })
|
|
2821
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ww-text-sm ww-font-medium ww-tracking-wide ww-text-foreground/60 ww-uppercase", children: state === "connecting" || state === "initializing" ? getWidgetTranslation("connecting", locale) : state === "listening" ? getWidgetTranslation("listening", locale) : state === "speaking" ? getWidgetTranslation("speaking", locale) : getWidgetTranslation("ready", locale) }),
|
|
2822
|
+
/* @__PURE__ */ jsxRuntime.jsx(CustomControlBar, { onClose, locale })
|
|
2592
2823
|
] })
|
|
2593
2824
|
] });
|
|
2594
2825
|
}
|
|
2595
|
-
function VoiceOverlay({
|
|
2826
|
+
function VoiceOverlay({
|
|
2827
|
+
token,
|
|
2828
|
+
serverUrl,
|
|
2829
|
+
onClose,
|
|
2830
|
+
locale
|
|
2831
|
+
}) {
|
|
2596
2832
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ww-absolute ww-inset-0 ww-z-[100] ww-flex ww-flex-col ww-bg-background/95 ww-backdrop-blur-xl", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2597
2833
|
componentsReact.LiveKitRoom,
|
|
2598
2834
|
{
|
|
@@ -2604,78 +2840,394 @@ function VoiceOverlay({ token, serverUrl, onClose }) {
|
|
|
2604
2840
|
className: "ww-flex-1",
|
|
2605
2841
|
children: [
|
|
2606
2842
|
/* @__PURE__ */ jsxRuntime.jsx(componentsReact.RoomAudioRenderer, {}),
|
|
2607
|
-
/* @__PURE__ */ jsxRuntime.jsx(AssistantVisualizer, { onClose })
|
|
2843
|
+
/* @__PURE__ */ jsxRuntime.jsx(AssistantVisualizer, { onClose, locale })
|
|
2608
2844
|
]
|
|
2609
2845
|
}
|
|
2610
2846
|
) });
|
|
2611
2847
|
}
|
|
2612
|
-
function
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2848
|
+
function SvgIcon({
|
|
2849
|
+
className,
|
|
2850
|
+
strokeWidth = "1.8",
|
|
2851
|
+
children
|
|
2852
|
+
}) {
|
|
2853
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2854
|
+
"svg",
|
|
2855
|
+
{
|
|
2856
|
+
className,
|
|
2857
|
+
viewBox: "0 0 24 24",
|
|
2858
|
+
fill: "none",
|
|
2859
|
+
stroke: "currentColor",
|
|
2860
|
+
strokeWidth,
|
|
2861
|
+
strokeLinecap: "round",
|
|
2862
|
+
strokeLinejoin: "round",
|
|
2863
|
+
children
|
|
2864
|
+
}
|
|
2865
|
+
);
|
|
2866
|
+
}
|
|
2867
|
+
function IconBolt({ className }) {
|
|
2868
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SvgIcon, { className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M13 2L3 14h9l-1 8 10-12h-9l1-8z" }) });
|
|
2869
|
+
}
|
|
2870
|
+
function IconDocument({ className }) {
|
|
2871
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(SvgIcon, { className, children: [
|
|
2872
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
|
|
2873
|
+
/* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "14 2 14 8 20 8" }),
|
|
2874
|
+
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "16", y1: "13", x2: "8", y2: "13" }),
|
|
2875
|
+
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "16", y1: "17", x2: "8", y2: "17" }),
|
|
2876
|
+
/* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "10 9 9 9 8 9" })
|
|
2877
|
+
] });
|
|
2878
|
+
}
|
|
2879
|
+
function IconSparkle({ className }) {
|
|
2880
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SvgIcon, { className, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z" }) });
|
|
2881
|
+
}
|
|
2882
|
+
function IconTarget({ className }) {
|
|
2883
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(SvgIcon, { className, children: [
|
|
2884
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "10" }),
|
|
2885
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "6" }),
|
|
2886
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "2" })
|
|
2887
|
+
] });
|
|
2888
|
+
}
|
|
2889
|
+
function IconArrowRight({ className }) {
|
|
2890
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(SvgIcon, { className, strokeWidth: "2", children: [
|
|
2891
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 12h14" }),
|
|
2892
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "m12 5 7 7-7 7" })
|
|
2893
|
+
] });
|
|
2894
|
+
}
|
|
2895
|
+
function LiveDot({ size = "sm" }) {
|
|
2896
|
+
const px = size === "md" ? "ww-h-2 ww-w-2" : "ww-h-1.5 ww-w-1.5";
|
|
2897
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `ww-relative ww-flex ${px} ww-shrink-0`, children: [
|
|
2898
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2899
|
+
"span",
|
|
2622
2900
|
{
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2901
|
+
className: `ww-animate-ping ww-absolute ww-inline-flex ww-h-full ww-w-full ww-rounded-full ww-bg-emerald-400 ww-opacity-75`
|
|
2902
|
+
}
|
|
2903
|
+
),
|
|
2904
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2905
|
+
"span",
|
|
2626
2906
|
{
|
|
2627
|
-
|
|
2628
|
-
category: "pricing"
|
|
2907
|
+
className: `ww-relative ww-inline-flex ww-rounded-full ${px} ww-bg-emerald-500`
|
|
2629
2908
|
}
|
|
2630
|
-
|
|
2909
|
+
)
|
|
2910
|
+
] });
|
|
2911
|
+
}
|
|
2912
|
+
function urlRelevance(docUrl, pageUrl) {
|
|
2913
|
+
if (!docUrl || !pageUrl) return 0;
|
|
2914
|
+
const docClean = docUrl.toLowerCase().replace(/https?:\/\//, "");
|
|
2915
|
+
const pageClean = pageUrl.toLowerCase().replace(/https?:\/\//, "");
|
|
2916
|
+
if (docClean === pageClean) return 100;
|
|
2917
|
+
if (docClean.startsWith(pageClean) || pageClean.startsWith(docClean))
|
|
2918
|
+
return 50;
|
|
2919
|
+
const docParts = docClean.split(/[/?#]/).filter(Boolean);
|
|
2920
|
+
const pageParts = pageClean.split(/[/?#]/).filter(Boolean);
|
|
2921
|
+
let score = 0;
|
|
2922
|
+
for (const part of pageParts) {
|
|
2923
|
+
if (docParts.includes(part)) score += 10;
|
|
2631
2924
|
}
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2925
|
+
return score;
|
|
2926
|
+
}
|
|
2927
|
+
function topicToQuestion(topic, locale) {
|
|
2928
|
+
const name = topic.name.trim();
|
|
2929
|
+
if (name.endsWith("?")) return name;
|
|
2930
|
+
return getWidgetTranslation("tellMeAbout", locale, { name });
|
|
2931
|
+
}
|
|
2932
|
+
var STAGGER_MS = 50;
|
|
2933
|
+
var cardBase = "ww-group ww-w-full ww-rounded-xl ww-border ww-border-border ww-bg-background ww-text-left ww-shadow-[0_1px_2px_rgba(0,0,0,0.03)] hover:ww-bg-muted/20 hover:ww-border-border/80 hover:ww-shadow-md active:ww-scale-[0.98] ww-transition-all ww-duration-200 ww-animate-in ww-fade-in ww-slide-in-from-bottom-1 focus-visible:ww-ring-2 focus-visible:ww-ring-ring/40 focus-visible:ww-outline-none";
|
|
2934
|
+
function SectionLabel({ children }) {
|
|
2935
|
+
return /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "ww-text-[10px] ww-font-semibold ww-uppercase ww-tracking-[0.12em] ww-mb-2.5 ww-text-muted-foreground/80", children });
|
|
2936
|
+
}
|
|
2937
|
+
function PageBadge({
|
|
2938
|
+
pageTitle,
|
|
2939
|
+
pageUrl,
|
|
2940
|
+
locale
|
|
2941
|
+
}) {
|
|
2942
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ww-px-4 ww-pt-4 ww-pb-2", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ww-flex ww-items-center ww-justify-between ww-px-3 ww-py-2 ww-rounded-xl ww-bg-muted/40 ww-border ww-border-border/60", children: [
|
|
2943
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ww-flex ww-items-center ww-gap-2.5 ww-min-w-0", children: [
|
|
2944
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ww-w-2 ww-h-2 ww-rounded-full ww-bg-emerald-500 ww-animate-pulse ww-shrink-0" }),
|
|
2945
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ww-text-[11px] ww-font-medium ww-text-foreground ww-truncate ww-max-w-[170px]", children: pageTitle || pageUrl || getWidgetTranslation("generalContext", locale) })
|
|
2946
|
+
] }),
|
|
2947
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ww-text-[9px] ww-font-mono ww-bg-background ww-border ww-border-border ww-text-muted-foreground ww-px-1.5 ww-py-0.5 ww-rounded-md", children: "LIVE" })
|
|
2948
|
+
] }) });
|
|
2949
|
+
}
|
|
2950
|
+
function ActionCard({
|
|
2951
|
+
action,
|
|
2952
|
+
index,
|
|
2953
|
+
accentColor,
|
|
2954
|
+
onExecute
|
|
2955
|
+
}) {
|
|
2956
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2957
|
+
"button",
|
|
2958
|
+
{
|
|
2959
|
+
onClick: onExecute,
|
|
2960
|
+
className: `${cardBase} ww-flex ww-items-start ww-gap-3.5 ww-p-3.5`,
|
|
2961
|
+
style: {
|
|
2962
|
+
animationDelay: `${index * STAGGER_MS}ms`,
|
|
2963
|
+
animationFillMode: "both"
|
|
2640
2964
|
},
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2965
|
+
children: [
|
|
2966
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2967
|
+
"div",
|
|
2968
|
+
{
|
|
2969
|
+
className: "ww-shrink-0 ww-w-8 ww-h-8 ww-rounded-lg ww-flex ww-items-center ww-justify-center ww-transition-transform ww-duration-200 group-hover:ww-scale-105",
|
|
2970
|
+
style: { backgroundColor: `${accentColor}12`, color: accentColor },
|
|
2971
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(IconBolt, { className: "ww-w-4 ww-h-4" })
|
|
2972
|
+
}
|
|
2973
|
+
),
|
|
2974
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ww-flex-1 ww-min-w-0 ww-pt-0.5", children: [
|
|
2975
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ww-text-[13px] ww-font-medium ww-block ww-truncate ww-text-foreground", children: action.name }),
|
|
2976
|
+
action.description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ww-text-[11px] ww-mt-0.5 ww-block ww-line-clamp-2 ww-text-muted-foreground ww-leading-normal", children: action.description })
|
|
2977
|
+
] }),
|
|
2978
|
+
/* @__PURE__ */ jsxRuntime.jsx(IconArrowRight, { className: "ww-w-3.5 ww-h-3.5 ww-shrink-0 ww-mt-1.5 ww-text-muted-foreground/60 ww-opacity-0 group-hover:ww-opacity-100 ww-transition-all ww-duration-200 ww-translate-x-[-4px] group-hover:ww-translate-x-0" })
|
|
2979
|
+
]
|
|
2980
|
+
}
|
|
2981
|
+
);
|
|
2982
|
+
}
|
|
2983
|
+
function ActionCardCompact({
|
|
2984
|
+
action,
|
|
2985
|
+
index,
|
|
2986
|
+
accentColor,
|
|
2987
|
+
onExecute
|
|
2988
|
+
}) {
|
|
2989
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2990
|
+
"button",
|
|
2991
|
+
{
|
|
2992
|
+
onClick: onExecute,
|
|
2993
|
+
className: `${cardBase} ww-flex ww-flex-col ww-items-start ww-gap-2.5 ww-p-3.5`,
|
|
2994
|
+
style: {
|
|
2995
|
+
animationDelay: `${index * STAGGER_MS}ms`,
|
|
2996
|
+
animationFillMode: "both"
|
|
2651
2997
|
},
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2998
|
+
children: [
|
|
2999
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3000
|
+
"div",
|
|
3001
|
+
{
|
|
3002
|
+
className: "ww-w-8 ww-h-8 ww-rounded-lg ww-flex ww-items-center ww-justify-center ww-transition-transform ww-duration-200 group-hover:ww-scale-105",
|
|
3003
|
+
style: { backgroundColor: `${accentColor}12`, color: accentColor },
|
|
3004
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(IconBolt, { className: "ww-w-4 ww-h-4" })
|
|
3005
|
+
}
|
|
3006
|
+
),
|
|
3007
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ww-min-w-0 ww-w-full", children: [
|
|
3008
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ww-text-[12px] ww-font-medium ww-block ww-truncate ww-text-foreground", children: action.name }),
|
|
3009
|
+
action.description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ww-text-[10px] ww-mt-0.5 ww-block ww-line-clamp-1 ww-text-muted-foreground ww-leading-normal", children: action.description })
|
|
3010
|
+
] })
|
|
3011
|
+
]
|
|
3012
|
+
}
|
|
3013
|
+
);
|
|
3014
|
+
}
|
|
3015
|
+
function DocCard({
|
|
3016
|
+
doc,
|
|
3017
|
+
index,
|
|
3018
|
+
onSend,
|
|
3019
|
+
locale
|
|
3020
|
+
}) {
|
|
3021
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3022
|
+
"button",
|
|
3023
|
+
{
|
|
3024
|
+
onClick: () => onSend(
|
|
3025
|
+
doc.summary ? getWidgetTranslation("tellMeMoreAbout", locale, {
|
|
3026
|
+
name: doc.name
|
|
3027
|
+
}) : getWidgetTranslation("whatDoYouKnowAbout", locale, {
|
|
3028
|
+
name: doc.name
|
|
3029
|
+
})
|
|
3030
|
+
),
|
|
3031
|
+
className: `${cardBase} ww-flex ww-items-start ww-gap-3.5 ww-p-3.5`,
|
|
3032
|
+
style: {
|
|
3033
|
+
animationDelay: `${index * STAGGER_MS}ms`,
|
|
3034
|
+
animationFillMode: "both"
|
|
2666
3035
|
},
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
3036
|
+
children: [
|
|
3037
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ww-shrink-0 ww-w-8 ww-h-8 ww-rounded-lg ww-flex ww-items-center ww-justify-center ww-bg-indigo-500/10 ww-text-indigo-500 dark:ww-bg-indigo-400/10 dark:ww-text-indigo-400 ww-transition-transform ww-duration-200 group-hover:ww-scale-105", children: /* @__PURE__ */ jsxRuntime.jsx(IconDocument, { className: "ww-w-4 ww-h-4" }) }),
|
|
3038
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ww-flex-1 ww-min-w-0 ww-pt-0.5", children: [
|
|
3039
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ww-text-[13px] ww-font-medium ww-block ww-truncate ww-text-foreground", children: doc.name }),
|
|
3040
|
+
doc.summary && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ww-text-[11px] ww-mt-0.5 ww-block ww-line-clamp-2 ww-text-muted-foreground ww-leading-normal", children: doc.summary })
|
|
3041
|
+
] }),
|
|
3042
|
+
/* @__PURE__ */ jsxRuntime.jsx(IconArrowRight, { className: "ww-w-3.5 ww-h-3.5 ww-shrink-0 ww-mt-1.5 ww-text-muted-foreground/60 ww-opacity-0 group-hover:ww-opacity-100 ww-transition-all ww-duration-200 ww-translate-x-[-4px] group-hover:ww-translate-x-0" })
|
|
3043
|
+
]
|
|
3044
|
+
}
|
|
3045
|
+
);
|
|
3046
|
+
}
|
|
3047
|
+
function TopicChip({
|
|
3048
|
+
topic,
|
|
3049
|
+
index,
|
|
3050
|
+
compact = false,
|
|
3051
|
+
onSend
|
|
3052
|
+
}) {
|
|
3053
|
+
const cls = compact ? `${cardBase} ww-flex ww-items-center ww-gap-1.5 !ww-rounded-full ww-px-3 ww-py-1.5` : `${cardBase} ww-flex ww-items-center ww-gap-2.5 ww-px-3.5 ww-py-2.5 !ww-rounded-full`;
|
|
3054
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3055
|
+
"button",
|
|
3056
|
+
{
|
|
3057
|
+
onClick: () => onSend(topic.question),
|
|
3058
|
+
className: cls,
|
|
3059
|
+
style: {
|
|
3060
|
+
animationDelay: `${index * STAGGER_MS}ms`,
|
|
3061
|
+
animationFillMode: "both"
|
|
3062
|
+
},
|
|
3063
|
+
children: [
|
|
3064
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3065
|
+
IconSparkle,
|
|
3066
|
+
{
|
|
3067
|
+
className: `${compact ? "ww-w-3 ww-h-3" : "ww-w-3.5 ww-h-3.5"} ww-shrink-0 ww-text-amber-500 ww-transition-transform ww-duration-200 group-hover:ww-scale-110 group-hover:ww-rotate-12`
|
|
3068
|
+
}
|
|
3069
|
+
),
|
|
3070
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3071
|
+
"span",
|
|
3072
|
+
{
|
|
3073
|
+
className: `${compact ? "ww-text-[11px]" : "ww-text-[12px]"} ww-font-medium ww-text-foreground ww-flex-1 ww-text-left`,
|
|
3074
|
+
children: topic.question
|
|
3075
|
+
}
|
|
3076
|
+
),
|
|
3077
|
+
!compact && /* @__PURE__ */ jsxRuntime.jsx(IconArrowRight, { className: "ww-w-3.5 ww-h-3.5 ww-shrink-0 ww-text-muted-foreground/60 ww-opacity-0 group-hover:ww-opacity-100 ww-transition-all ww-duration-200 ww-translate-x-[-4px] group-hover:ww-translate-x-0" })
|
|
3078
|
+
]
|
|
3079
|
+
}
|
|
3080
|
+
);
|
|
3081
|
+
}
|
|
3082
|
+
function CommandPanel({
|
|
3083
|
+
mode,
|
|
3084
|
+
pageUrl = "",
|
|
3085
|
+
pageTitle,
|
|
3086
|
+
clientActions = [],
|
|
3087
|
+
ragTopics = [],
|
|
3088
|
+
ragDocuments = [],
|
|
3089
|
+
onSend,
|
|
3090
|
+
onExecuteAction,
|
|
3091
|
+
accentColor = "#3b82f6",
|
|
3092
|
+
watermark = false,
|
|
3093
|
+
watermarkLogoUrl = "/wallavi.svg",
|
|
3094
|
+
footer,
|
|
3095
|
+
locale
|
|
3096
|
+
}) {
|
|
3097
|
+
const relevantDocs = react.useMemo(() => {
|
|
3098
|
+
if (!pageUrl && ragDocuments.length > 0) return ragDocuments.slice(0, 5);
|
|
3099
|
+
return ragDocuments.map((doc) => ({ ...doc, score: urlRelevance(doc.url, pageUrl) })).sort((a, b) => b.score - a.score).slice(0, 5);
|
|
3100
|
+
}, [ragDocuments, pageUrl]);
|
|
3101
|
+
const topicQuestions = react.useMemo(
|
|
3102
|
+
() => ragTopics.slice(0, 5).map((t) => ({
|
|
3103
|
+
...t,
|
|
3104
|
+
question: topicToQuestion(t, locale)
|
|
3105
|
+
})),
|
|
3106
|
+
[ragTopics, locale]
|
|
3107
|
+
);
|
|
3108
|
+
const hasActions = clientActions.length > 0;
|
|
3109
|
+
const hasDocs = relevantDocs.length > 0;
|
|
3110
|
+
const hasTopics = topicQuestions.length > 0;
|
|
3111
|
+
const hasContent = hasActions || hasDocs || hasTopics;
|
|
3112
|
+
if (!hasContent) return null;
|
|
3113
|
+
const isSidebar = mode === "sidebar";
|
|
3114
|
+
const handleExecute = (steps) => onExecuteAction?.(steps);
|
|
3115
|
+
if (isSidebar) {
|
|
3116
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ww-w-[300px] ww-shrink-0 ww-border-l ww-border-border ww-bg-muted/50 ww-flex ww-flex-col ww-h-full ww-overflow-hidden ww-animate-in ww-fade-in ww-slide-in-from-right-2 ww-duration-300", children: [
|
|
3117
|
+
/* @__PURE__ */ jsxRuntime.jsx(PageBadge, { pageTitle, pageUrl, locale }),
|
|
3118
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ww-flex-1 ww-overflow-y-auto ww-px-4 ww-pb-4 ww-flex ww-flex-col ww-gap-5", children: [
|
|
3119
|
+
hasActions && /* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
|
|
3120
|
+
/* @__PURE__ */ jsxRuntime.jsx(SectionLabel, { children: getWidgetTranslation("quickActions", locale) }),
|
|
3121
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ww-flex ww-flex-col ww-gap-2", children: clientActions.map((action, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3122
|
+
ActionCard,
|
|
3123
|
+
{
|
|
3124
|
+
action,
|
|
3125
|
+
index: i,
|
|
3126
|
+
accentColor,
|
|
3127
|
+
onExecute: () => handleExecute(action.steps)
|
|
3128
|
+
},
|
|
3129
|
+
action.name
|
|
3130
|
+
)) })
|
|
3131
|
+
] }),
|
|
3132
|
+
hasDocs && /* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
|
|
3133
|
+
/* @__PURE__ */ jsxRuntime.jsx(SectionLabel, { children: getWidgetTranslation("documentation", locale) }),
|
|
3134
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ww-flex ww-flex-col ww-gap-2", children: relevantDocs.map((doc, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3135
|
+
DocCard,
|
|
3136
|
+
{
|
|
3137
|
+
doc,
|
|
3138
|
+
index: i,
|
|
3139
|
+
onSend,
|
|
3140
|
+
locale
|
|
3141
|
+
},
|
|
3142
|
+
`${doc.name}-${doc.url ?? i}`
|
|
3143
|
+
)) })
|
|
3144
|
+
] }),
|
|
3145
|
+
hasTopics && /* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
|
|
3146
|
+
/* @__PURE__ */ jsxRuntime.jsx(SectionLabel, { children: getWidgetTranslation("askAbout", locale) }),
|
|
3147
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ww-flex ww-flex-col ww-gap-1.5", children: topicQuestions.map((topic, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3148
|
+
TopicChip,
|
|
3149
|
+
{
|
|
3150
|
+
topic,
|
|
3151
|
+
index: i,
|
|
3152
|
+
onSend
|
|
3153
|
+
},
|
|
3154
|
+
topic.name
|
|
3155
|
+
)) })
|
|
3156
|
+
] })
|
|
3157
|
+
] }),
|
|
3158
|
+
watermark && /* @__PURE__ */ jsxRuntime.jsxs("footer", { className: "ww-shrink-0 ww-flex ww-items-center ww-justify-center ww-gap-1.5 ww-py-2.5 ww-border-t ww-border-border/40 ww-touch-none ww-bg-muted/10", children: [
|
|
3159
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3160
|
+
"a",
|
|
3161
|
+
{
|
|
3162
|
+
href: "https://wallavi.com",
|
|
3163
|
+
target: "_blank",
|
|
3164
|
+
rel: "noopener noreferrer",
|
|
3165
|
+
className: "ww-flex ww-items-center ww-gap-1 ww-text-[10px] ww-text-muted-foreground hover:ww-text-foreground ww-transition-colors",
|
|
3166
|
+
children: [
|
|
3167
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3168
|
+
"img",
|
|
3169
|
+
{
|
|
3170
|
+
src: watermarkLogoUrl,
|
|
3171
|
+
alt: "Wallavi",
|
|
3172
|
+
width: 11,
|
|
3173
|
+
height: 11
|
|
3174
|
+
}
|
|
3175
|
+
),
|
|
3176
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
3177
|
+
getWidgetTranslation("poweredBy", locale),
|
|
3178
|
+
" Wallavi"
|
|
3179
|
+
] })
|
|
3180
|
+
]
|
|
3181
|
+
}
|
|
3182
|
+
),
|
|
3183
|
+
footer && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3184
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ww-text-muted-foreground/45 ww-text-[10px]", children: "\xB7" }),
|
|
3185
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ww-text-[10px] ww-text-muted-foreground ww-truncate ww-max-w-[120px]", children: footer })
|
|
3186
|
+
] })
|
|
3187
|
+
] })
|
|
3188
|
+
] });
|
|
2673
3189
|
}
|
|
2674
|
-
return [
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
3190
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ww-px-4 ww-pt-2 ww-pb-3 ww-flex ww-flex-col ww-gap-4 ww-animate-in ww-fade-in ww-duration-300", children: [
|
|
3191
|
+
hasActions && /* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
|
|
3192
|
+
/* @__PURE__ */ jsxRuntime.jsx(SectionLabel, { children: getWidgetTranslation("quickActions", locale) }),
|
|
3193
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ww-grid ww-grid-cols-2 ww-gap-2", children: clientActions.slice(0, 4).map((action, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3194
|
+
ActionCardCompact,
|
|
3195
|
+
{
|
|
3196
|
+
action,
|
|
3197
|
+
index: i,
|
|
3198
|
+
accentColor,
|
|
3199
|
+
onExecute: () => handleExecute(action.steps)
|
|
3200
|
+
},
|
|
3201
|
+
action.name
|
|
3202
|
+
)) })
|
|
3203
|
+
] }),
|
|
3204
|
+
hasDocs && /* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
|
|
3205
|
+
/* @__PURE__ */ jsxRuntime.jsx(SectionLabel, { children: getWidgetTranslation("documentation", locale) }),
|
|
3206
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ww-flex ww-flex-col ww-gap-2", children: relevantDocs.slice(0, 3).map((doc, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3207
|
+
DocCard,
|
|
3208
|
+
{
|
|
3209
|
+
doc,
|
|
3210
|
+
index: i,
|
|
3211
|
+
onSend,
|
|
3212
|
+
locale
|
|
3213
|
+
},
|
|
3214
|
+
`${doc.name}-${doc.url ?? i}`
|
|
3215
|
+
)) })
|
|
3216
|
+
] }),
|
|
3217
|
+
hasTopics && /* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
|
|
3218
|
+
/* @__PURE__ */ jsxRuntime.jsx(SectionLabel, { children: getWidgetTranslation("askAbout", locale) }),
|
|
3219
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ww-flex ww-flex-wrap ww-gap-1.5", children: topicQuestions.slice(0, 4).map((topic, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3220
|
+
TopicChip,
|
|
3221
|
+
{
|
|
3222
|
+
topic,
|
|
3223
|
+
index: i,
|
|
3224
|
+
compact: true,
|
|
3225
|
+
onSend
|
|
3226
|
+
},
|
|
3227
|
+
topic.name
|
|
3228
|
+
)) })
|
|
3229
|
+
] })
|
|
3230
|
+
] });
|
|
2679
3231
|
}
|
|
2680
3232
|
function ChatWidget({
|
|
2681
3233
|
agentId,
|
|
@@ -2684,7 +3236,7 @@ function ChatWidget({
|
|
|
2684
3236
|
displayName,
|
|
2685
3237
|
profilePicture,
|
|
2686
3238
|
userMessageColor = "#19191c",
|
|
2687
|
-
initialMessages
|
|
3239
|
+
initialMessages,
|
|
2688
3240
|
suggestedMessages = [],
|
|
2689
3241
|
messagePlaceholder,
|
|
2690
3242
|
watermark = true,
|
|
@@ -2712,7 +3264,14 @@ function ChatWidget({
|
|
|
2712
3264
|
envId,
|
|
2713
3265
|
onDebugTrace,
|
|
2714
3266
|
widgetLayout,
|
|
2715
|
-
|
|
3267
|
+
showCommandPanel = true,
|
|
3268
|
+
showRagTopics = true,
|
|
3269
|
+
showRagDocuments = true,
|
|
3270
|
+
showQuickActions = true,
|
|
3271
|
+
locale = "en",
|
|
3272
|
+
clientActions = [],
|
|
3273
|
+
ragTopics = [],
|
|
3274
|
+
ragDocuments = []
|
|
2716
3275
|
}) {
|
|
2717
3276
|
const [isDesktop, setIsDesktop] = react.useState(false);
|
|
2718
3277
|
react.useEffect(() => {
|
|
@@ -2801,10 +3360,24 @@ function ChatWidget({
|
|
|
2801
3360
|
chat.reset();
|
|
2802
3361
|
onReset?.();
|
|
2803
3362
|
};
|
|
2804
|
-
const
|
|
3363
|
+
const [resolvedTheme, setResolvedTheme] = react.useState("light");
|
|
3364
|
+
react.useEffect(() => {
|
|
3365
|
+
if (theme === "system") {
|
|
3366
|
+
const media = window.matchMedia("(prefers-color-scheme: dark)");
|
|
3367
|
+
setResolvedTheme(media.matches ? "dark" : "light");
|
|
3368
|
+
const listener = (e) => {
|
|
3369
|
+
setResolvedTheme(e.matches ? "dark" : "light");
|
|
3370
|
+
};
|
|
3371
|
+
media.addEventListener("change", listener);
|
|
3372
|
+
return () => media.removeEventListener("change", listener);
|
|
3373
|
+
} else {
|
|
3374
|
+
setResolvedTheme(theme || "light");
|
|
3375
|
+
}
|
|
3376
|
+
}, [theme]);
|
|
3377
|
+
const isDark = resolvedTheme === "dark";
|
|
2805
3378
|
const cssVars = {
|
|
2806
3379
|
fontFamily: 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
|
|
2807
|
-
colorScheme:
|
|
3380
|
+
colorScheme: resolvedTheme,
|
|
2808
3381
|
// Inline style has higher specificity than any host-site stylesheet,
|
|
2809
3382
|
// so background-color set here cannot be overridden by host CSS.
|
|
2810
3383
|
backgroundColor: isDark ? "hsl(240 10% 3.9%)" : "hsl(0 0% 100%)",
|
|
@@ -2822,13 +3395,36 @@ function ChatWidget({
|
|
|
2822
3395
|
["--ring"]: isDark ? "240 4.9% 83.9%" : "240 10% 3.9%",
|
|
2823
3396
|
["--radius"]: "0.5rem"
|
|
2824
3397
|
};
|
|
2825
|
-
const
|
|
3398
|
+
const defaultEnglishGreeting = "Hello! How can I help you today?";
|
|
3399
|
+
const isDefaultGreeting = !initialMessages || initialMessages.length === 0 || initialMessages.length === 1 && initialMessages[0] === defaultEnglishGreeting;
|
|
3400
|
+
const messagesList = isDefaultGreeting ? [getWidgetTranslation("defaultGreeting", locale)] : initialMessages;
|
|
3401
|
+
const showSidebar = showCommandPanel && widgetLayout === "center" && isDesktop;
|
|
3402
|
+
const showInlineCommandPanel = showCommandPanel && !showSidebar && chat.messages.length === 0 && (showQuickActions && clientActions.length > 0 || showRagTopics && ragTopics.length > 0 || showRagDocuments && ragDocuments.length > 0);
|
|
3403
|
+
const handleExecuteAction = react.useCallback(
|
|
3404
|
+
(steps) => {
|
|
3405
|
+
executeDeclarativeSteps(steps, onNavigate);
|
|
3406
|
+
},
|
|
3407
|
+
[onNavigate]
|
|
3408
|
+
);
|
|
3409
|
+
const commandPanelProps = {
|
|
3410
|
+
pageUrl: userContext?.pageContext?.url,
|
|
3411
|
+
pageTitle: userContext?.pageContext?.title,
|
|
3412
|
+
clientActions: showQuickActions ? clientActions : [],
|
|
3413
|
+
ragTopics: showRagTopics ? ragTopics : [],
|
|
3414
|
+
ragDocuments: showRagDocuments ? ragDocuments : [],
|
|
3415
|
+
onSend: (text) => chat.send(text),
|
|
3416
|
+
onExecuteAction: handleExecuteAction,
|
|
3417
|
+
accentColor: userMessageColor,
|
|
3418
|
+
watermark,
|
|
3419
|
+
watermarkLogoUrl,
|
|
3420
|
+
footer,
|
|
3421
|
+
locale
|
|
3422
|
+
};
|
|
2826
3423
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2827
3424
|
"div",
|
|
2828
3425
|
{
|
|
2829
3426
|
className: cn(
|
|
2830
|
-
"wallavi-widget ww-flex ww-overflow-hidden ww-bg-background ww-h-full ww-relative ww-overscroll-none",
|
|
2831
|
-
showSplitLayout ? "ww-flex-row" : "ww-flex-col",
|
|
3427
|
+
"wallavi-widget ww-flex ww-flex-col ww-overflow-hidden ww-bg-background ww-h-full ww-relative ww-overscroll-none",
|
|
2832
3428
|
!embedded && "ww-rounded-2xl ww-border ww-shadow-xl",
|
|
2833
3429
|
isDragOver && "ww-ring-2 ww-ring-inset ww-ring-primary/60",
|
|
2834
3430
|
className
|
|
@@ -2839,293 +3435,228 @@ function ChatWidget({
|
|
|
2839
3435
|
onDragLeave: handleDragLeave,
|
|
2840
3436
|
onDrop: handleDrop,
|
|
2841
3437
|
children: [
|
|
2842
|
-
/* @__PURE__ */ jsxRuntime.
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
VoiceOverlay,
|
|
2865
|
-
{
|
|
2866
|
-
token: chat.voiceCall.token,
|
|
2867
|
-
serverUrl: chat.voiceCall.serverUrl,
|
|
2868
|
-
onClose: chat.voiceCall.stop,
|
|
2869
|
-
accentColor: userMessageColor
|
|
2870
|
-
}
|
|
2871
|
-
),
|
|
2872
|
-
customBackend?.mode === "human" && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2873
|
-
"div",
|
|
2874
|
-
{
|
|
2875
|
-
className: "ww-shrink-0 ww-flex ww-items-center ww-gap-2 ww-px-4 ww-py-1.5 ww-border-b",
|
|
2876
|
-
style: { backgroundColor: `${userMessageColor}0d` },
|
|
2877
|
-
children: [
|
|
2878
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ww-relative ww-flex ww-h-2 ww-w-2 ww-shrink-0", children: [
|
|
2879
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ww-animate-ping ww-absolute ww-inline-flex ww-h-full ww-w-full ww-rounded-full ww-bg-emerald-400 ww-opacity-75" }),
|
|
2880
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ww-relative ww-inline-flex ww-rounded-full ww-h-2 ww-w-2 ww-bg-emerald-500" })
|
|
2881
|
-
] }),
|
|
2882
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ww-text-xs ww-font-medium ww-text-foreground/60", children: "Hablando con un agente" })
|
|
2883
|
-
]
|
|
2884
|
-
}
|
|
2885
|
-
),
|
|
2886
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2887
|
-
ChatMessages,
|
|
2888
|
-
{
|
|
2889
|
-
messages: chat.messages,
|
|
2890
|
-
streaming: chat.streaming,
|
|
2891
|
-
agentName,
|
|
2892
|
-
profilePicture,
|
|
2893
|
-
userColor: userMessageColor,
|
|
2894
|
-
initialMessages,
|
|
2895
|
-
suggestedMessages,
|
|
2896
|
-
showThinking,
|
|
2897
|
-
onSuggest: (msg) => chat.send(msg),
|
|
2898
|
-
onPickerSelect: chat.selectPickerOption
|
|
2899
|
-
}
|
|
2900
|
-
),
|
|
2901
|
-
customBackend?.footerAction && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ww-shrink-0 ww-px-3 ww-py-1.5 ww-border-t ww-bg-background", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2902
|
-
"button",
|
|
2903
|
-
{
|
|
2904
|
-
onClick: () => void customBackend.footerAction.onClick(),
|
|
2905
|
-
disabled: customBackend.footerAction.loading,
|
|
2906
|
-
style: customBackend.footerAction.icon === "human" ? {
|
|
2907
|
-
backgroundColor: userMessageColor,
|
|
2908
|
-
color: "#ffffff",
|
|
2909
|
-
boxShadow: `0 2px 12px ${userMessageColor}55`
|
|
2910
|
-
} : {
|
|
2911
|
-
borderColor: `${userMessageColor}35`,
|
|
2912
|
-
backgroundColor: `${userMessageColor}0d`,
|
|
2913
|
-
color: userMessageColor
|
|
2914
|
-
},
|
|
2915
|
-
className: [
|
|
2916
|
-
"ww-w-full ww-flex ww-items-center ww-gap-2 ww-rounded-full ww-px-3.5 ww-py-1.5 ww-text-xs ww-font-semibold ww-transition-all",
|
|
2917
|
-
"hover:ww-opacity-85 active:ww-scale-[0.98] disabled:ww-opacity-50 disabled:ww-pointer-events-none",
|
|
2918
|
-
customBackend.footerAction.icon === "human" ? "" : "ww-border"
|
|
2919
|
-
].join(" "),
|
|
2920
|
-
children: [
|
|
2921
|
-
customBackend.footerAction.loading ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2922
|
-
"svg",
|
|
2923
|
-
{
|
|
2924
|
-
className: "ww-animate-spin ww-w-3.5 ww-h-3.5 ww-shrink-0",
|
|
2925
|
-
viewBox: "0 0 24 24",
|
|
2926
|
-
fill: "none",
|
|
2927
|
-
children: [
|
|
2928
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2929
|
-
"circle",
|
|
2930
|
-
{
|
|
2931
|
-
className: "ww-opacity-25",
|
|
2932
|
-
cx: "12",
|
|
2933
|
-
cy: "12",
|
|
2934
|
-
r: "10",
|
|
2935
|
-
stroke: "currentColor",
|
|
2936
|
-
strokeWidth: "3"
|
|
2937
|
-
}
|
|
2938
|
-
),
|
|
2939
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2940
|
-
"path",
|
|
2941
|
-
{
|
|
2942
|
-
className: "ww-opacity-75",
|
|
2943
|
-
fill: "currentColor",
|
|
2944
|
-
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"
|
|
2945
|
-
}
|
|
2946
|
-
)
|
|
2947
|
-
]
|
|
2948
|
-
}
|
|
2949
|
-
) : customBackend.footerAction.icon === "ai" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2950
|
-
"svg",
|
|
2951
|
-
{
|
|
2952
|
-
className: "ww-w-3.5 ww-h-3.5 ww-shrink-0",
|
|
2953
|
-
viewBox: "0 0 24 24",
|
|
2954
|
-
fill: "none",
|
|
2955
|
-
stroke: "currentColor",
|
|
2956
|
-
strokeWidth: "2",
|
|
2957
|
-
strokeLinecap: "round",
|
|
2958
|
-
strokeLinejoin: "round",
|
|
2959
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z" })
|
|
2960
|
-
}
|
|
2961
|
-
) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2962
|
-
"svg",
|
|
2963
|
-
{
|
|
2964
|
-
className: "ww-w-3.5 ww-h-3.5 ww-shrink-0",
|
|
2965
|
-
viewBox: "0 0 24 24",
|
|
2966
|
-
fill: "none",
|
|
2967
|
-
stroke: "currentColor",
|
|
2968
|
-
strokeWidth: "2",
|
|
2969
|
-
strokeLinecap: "round",
|
|
2970
|
-
strokeLinejoin: "round",
|
|
2971
|
-
children: [
|
|
2972
|
-
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3 18v-6a9 9 0 0 1 18 0v6" }),
|
|
2973
|
-
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z" })
|
|
2974
|
-
]
|
|
2975
|
-
}
|
|
2976
|
-
),
|
|
2977
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ww-flex-1 ww-text-left ww-truncate", children: customBackend.footerAction.label }),
|
|
2978
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2979
|
-
"svg",
|
|
2980
|
-
{
|
|
2981
|
-
className: "ww-shrink-0 ww-w-3 ww-h-3 ww-opacity-60",
|
|
2982
|
-
viewBox: "0 0 24 24",
|
|
2983
|
-
fill: "none",
|
|
2984
|
-
stroke: "currentColor",
|
|
2985
|
-
strokeWidth: "2.5",
|
|
2986
|
-
strokeLinecap: "round",
|
|
2987
|
-
strokeLinejoin: "round",
|
|
2988
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9 18l6-6-6-6" })
|
|
2989
|
-
}
|
|
2990
|
-
)
|
|
2991
|
-
]
|
|
2992
|
-
}
|
|
2993
|
-
) }),
|
|
2994
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2995
|
-
ChatInput,
|
|
2996
|
-
{
|
|
2997
|
-
input: chat.input,
|
|
2998
|
-
setInput: chat.setInput,
|
|
2999
|
-
onSend: handleSend,
|
|
3000
|
-
streaming: chat.streaming,
|
|
3001
|
-
placeholder: messagePlaceholder,
|
|
3002
|
-
accentColor: userMessageColor,
|
|
3003
|
-
canRegenerate: !!canRegenerate,
|
|
3004
|
-
onRegenerate: () => void chat.regenerate(),
|
|
3005
|
-
selectedContext: chat.selectedContext,
|
|
3006
|
-
onClearContext: () => chat.setSelectedContext(null),
|
|
3007
|
-
...enableVoice && voice.isSupported ? {
|
|
3008
|
-
voiceState: voice.voiceState,
|
|
3009
|
-
onVoiceStart: () => void voice.start(),
|
|
3010
|
-
onVoiceStop: voice.stop
|
|
3011
|
-
} : {},
|
|
3012
|
-
...enableAttachments ? {
|
|
3013
|
-
attachments: attachmentHook.attachments,
|
|
3014
|
-
onAttach: attachmentHook.attach,
|
|
3015
|
-
onRemoveAttachment: attachmentHook.remove,
|
|
3016
|
-
isUploading: attachmentHook.isUploading
|
|
3017
|
-
} : {}
|
|
3018
|
-
}
|
|
3019
|
-
),
|
|
3020
|
-
watermark && /* @__PURE__ */ jsxRuntime.jsxs("footer", { className: "ww-shrink-0 ww-flex ww-items-center ww-justify-center ww-gap-1.5 ww-bg-muted/50 ww-py-1.5 ww-border-t ww-touch-none", children: [
|
|
3021
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3022
|
-
"a",
|
|
3023
|
-
{
|
|
3024
|
-
href: "https://wallavi.com",
|
|
3025
|
-
target: "_blank",
|
|
3026
|
-
rel: "noopener noreferrer",
|
|
3027
|
-
className: "ww-flex ww-items-center ww-gap-1 ww-text-[10px] ww-text-muted-foreground hover:ww-text-foreground ww-transition-colors",
|
|
3028
|
-
children: [
|
|
3029
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3030
|
-
"img",
|
|
3031
|
-
{
|
|
3032
|
-
src: watermarkLogoUrl,
|
|
3033
|
-
alt: "Wallavi",
|
|
3034
|
-
width: 12,
|
|
3035
|
-
height: 12
|
|
3036
|
-
}
|
|
3037
|
-
),
|
|
3038
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Powered by Wallavi" })
|
|
3039
|
-
]
|
|
3040
|
-
}
|
|
3438
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3439
|
+
ChatHeader,
|
|
3440
|
+
{
|
|
3441
|
+
title,
|
|
3442
|
+
profilePicture,
|
|
3443
|
+
headerBg,
|
|
3444
|
+
headerText,
|
|
3445
|
+
onReset: handleReset,
|
|
3446
|
+
onClose: hideCloseButton ? void 0 : onClose,
|
|
3447
|
+
onExpand,
|
|
3448
|
+
expanded,
|
|
3449
|
+
onCall: enableVoice && chat.voiceCall ? () => chat.voiceCall?.start() : void 0,
|
|
3450
|
+
isCallLoading: chat.voiceCall?.loading,
|
|
3451
|
+
locale
|
|
3452
|
+
}
|
|
3453
|
+
),
|
|
3454
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3455
|
+
"div",
|
|
3456
|
+
{
|
|
3457
|
+
className: cn(
|
|
3458
|
+
"ww-flex ww-flex-row ww-flex-1 ww-w-full ww-overflow-hidden",
|
|
3459
|
+
showSidebar && "ww-bg-muted/50"
|
|
3041
3460
|
),
|
|
3042
|
-
|
|
3043
|
-
/* @__PURE__ */ jsxRuntime.
|
|
3044
|
-
|
|
3045
|
-
] })
|
|
3046
|
-
] })
|
|
3047
|
-
] }),
|
|
3048
|
-
showSplitLayout && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ww-w-[280px] ww-shrink-0 ww-border-l ww-border-border ww-bg-muted/10 ww-flex ww-flex-col ww-h-full ww-overflow-hidden", children: [
|
|
3049
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ww-p-4 ww-border-b ww-border-border ww-shrink-0", children: [
|
|
3050
|
-
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "ww-text-xs ww-font-bold ww-text-foreground ww-uppercase ww-tracking-wider", children: "Centro de Comando" }),
|
|
3051
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ww-flex ww-items-center ww-gap-1.5 ww-px-2.5 ww-py-1 ww-rounded-full ww-text-[10px] ww-font-medium ww-bg-emerald-500/10 ww-text-emerald-500 ww-w-fit ww-mt-2 ww-max-w-full", children: [
|
|
3052
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ww-relative ww-flex ww-h-1.5 ww-w-1.5", children: [
|
|
3053
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ww-animate-ping ww-absolute ww-inline-flex ww-h-full ww-w-full ww-rounded-full ww-bg-emerald-400 ww-opacity-75" }),
|
|
3054
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ww-relative ww-inline-flex ww-rounded-full ww-h-1.5 ww-w-1.5 ww-bg-emerald-500" })
|
|
3055
|
-
] }),
|
|
3056
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ww-truncate", children: userContext?.pageContext?.title || userContext?.pageContext?.url || "P\xE1gina General" })
|
|
3057
|
-
] })
|
|
3058
|
-
] }),
|
|
3059
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ww-flex-1 ww-overflow-y-auto ww-p-4 ww-flex ww-flex-col ww-gap-5", children: [
|
|
3060
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ww-flex ww-flex-col ww-gap-2.5", children: [
|
|
3061
|
-
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "ww-text-[10px] ww-font-bold ww-text-muted-foreground ww-uppercase ww-tracking-wider", children: "Acciones R\xE1pidas" }),
|
|
3062
|
-
clientActions && clientActions.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ww-flex ww-flex-col ww-gap-2", children: clientActions.map((action) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3063
|
-
"button",
|
|
3461
|
+
children: [
|
|
3462
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3463
|
+
"div",
|
|
3064
3464
|
{
|
|
3065
|
-
|
|
3066
|
-
|
|
3465
|
+
className: cn(
|
|
3466
|
+
"ww-flex ww-flex-col ww-flex-1 ww-h-full ww-overflow-hidden ww-relative ww-bg-background",
|
|
3467
|
+
showSidebar && "ww-rounded-br-2xl"
|
|
3468
|
+
),
|
|
3067
3469
|
children: [
|
|
3068
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ww-flex ww-items-center ww-gap-
|
|
3069
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3470
|
+
isDragOver && enableAttachments && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ww-absolute ww-inset-0 ww-z-50 ww-flex ww-flex-col ww-items-center ww-justify-center ww-gap-2 ww-rounded-2xl ww-bg-background/90 ww-backdrop-blur-sm ww-pointer-events-none", children: [
|
|
3471
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.UploadCloud, { className: "ww-h-8 ww-w-8 ww-text-primary/70" }),
|
|
3472
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ww-text-sm ww-font-medium ww-text-foreground/70", children: getWidgetTranslation("dropFiles", locale) }),
|
|
3473
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ww-text-xs ww-text-muted-foreground", children: "CSV, TXT, PDF, JPG, PNG, WebP" })
|
|
3474
|
+
] }),
|
|
3475
|
+
chat.voiceCall?.active && chat.voiceCall.token && chat.voiceCall.serverUrl && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3476
|
+
VoiceOverlay,
|
|
3477
|
+
{
|
|
3478
|
+
token: chat.voiceCall.token,
|
|
3479
|
+
serverUrl: chat.voiceCall.serverUrl,
|
|
3480
|
+
onClose: chat.voiceCall.stop,
|
|
3481
|
+
accentColor: userMessageColor,
|
|
3482
|
+
locale
|
|
3483
|
+
}
|
|
3484
|
+
),
|
|
3485
|
+
customBackend?.mode === "human" && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3486
|
+
"div",
|
|
3487
|
+
{
|
|
3488
|
+
className: "ww-shrink-0 ww-flex ww-items-center ww-gap-2 ww-px-4 ww-py-1.5 ww-border-b",
|
|
3489
|
+
style: { backgroundColor: `${userMessageColor}0d` },
|
|
3490
|
+
children: [
|
|
3491
|
+
/* @__PURE__ */ jsxRuntime.jsx(LiveDot, { size: "md" }),
|
|
3492
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ww-text-xs ww-font-medium ww-text-foreground/60", children: getWidgetTranslation("talkingToAgent", locale) })
|
|
3493
|
+
]
|
|
3494
|
+
}
|
|
3495
|
+
),
|
|
3496
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3497
|
+
ChatMessages,
|
|
3498
|
+
{
|
|
3499
|
+
messages: chat.messages,
|
|
3500
|
+
streaming: chat.streaming,
|
|
3501
|
+
agentName,
|
|
3502
|
+
profilePicture,
|
|
3503
|
+
userColor: userMessageColor,
|
|
3504
|
+
initialMessages: messagesList,
|
|
3505
|
+
suggestedMessages,
|
|
3506
|
+
showThinking,
|
|
3507
|
+
onSuggest: (msg) => chat.send(msg),
|
|
3508
|
+
onPickerSelect: chat.selectPickerOption,
|
|
3509
|
+
locale,
|
|
3510
|
+
commandPanel: showInlineCommandPanel ? /* @__PURE__ */ jsxRuntime.jsx(CommandPanel, { mode: "inline", ...commandPanelProps }) : void 0
|
|
3511
|
+
}
|
|
3512
|
+
),
|
|
3513
|
+
customBackend?.footerAction && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ww-shrink-0 ww-px-3 ww-py-1.5 ww-border-t ww-bg-background", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3514
|
+
"button",
|
|
3515
|
+
{
|
|
3516
|
+
onClick: () => void customBackend.footerAction.onClick(),
|
|
3517
|
+
disabled: customBackend.footerAction.loading,
|
|
3518
|
+
style: customBackend.footerAction.icon === "human" ? {
|
|
3519
|
+
backgroundColor: userMessageColor,
|
|
3520
|
+
color: "#ffffff",
|
|
3521
|
+
boxShadow: `0 2px 12px ${userMessageColor}55`
|
|
3522
|
+
} : {
|
|
3523
|
+
borderColor: `${userMessageColor}35`,
|
|
3524
|
+
backgroundColor: `${userMessageColor}0d`,
|
|
3525
|
+
color: userMessageColor
|
|
3526
|
+
},
|
|
3527
|
+
className: [
|
|
3528
|
+
"ww-w-full ww-flex ww-items-center ww-gap-2 ww-rounded-full ww-px-3.5 ww-py-1.5 ww-text-xs ww-font-semibold ww-transition-all",
|
|
3529
|
+
"hover:ww-opacity-85 active:ww-scale-[0.98] disabled:ww-opacity-50 disabled:ww-pointer-events-none",
|
|
3530
|
+
customBackend.footerAction.icon === "human" ? "" : "ww-border"
|
|
3531
|
+
].join(" "),
|
|
3532
|
+
children: [
|
|
3533
|
+
customBackend.footerAction.loading ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3534
|
+
"svg",
|
|
3079
3535
|
{
|
|
3536
|
+
className: "ww-animate-spin ww-w-3.5 ww-h-3.5 ww-shrink-0",
|
|
3537
|
+
viewBox: "0 0 24 24",
|
|
3538
|
+
fill: "none",
|
|
3539
|
+
children: [
|
|
3540
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3541
|
+
"circle",
|
|
3542
|
+
{
|
|
3543
|
+
className: "ww-opacity-25",
|
|
3544
|
+
cx: "12",
|
|
3545
|
+
cy: "12",
|
|
3546
|
+
r: "10",
|
|
3547
|
+
stroke: "currentColor",
|
|
3548
|
+
strokeWidth: "3"
|
|
3549
|
+
}
|
|
3550
|
+
),
|
|
3551
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3552
|
+
"path",
|
|
3553
|
+
{
|
|
3554
|
+
className: "ww-opacity-75",
|
|
3555
|
+
fill: "currentColor",
|
|
3556
|
+
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"
|
|
3557
|
+
}
|
|
3558
|
+
)
|
|
3559
|
+
]
|
|
3560
|
+
}
|
|
3561
|
+
) : customBackend.footerAction.icon === "ai" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3562
|
+
"svg",
|
|
3563
|
+
{
|
|
3564
|
+
className: "ww-w-3.5 ww-h-3.5 ww-shrink-0",
|
|
3565
|
+
viewBox: "0 0 24 24",
|
|
3566
|
+
fill: "none",
|
|
3567
|
+
stroke: "currentColor",
|
|
3568
|
+
strokeWidth: "2",
|
|
3080
3569
|
strokeLinecap: "round",
|
|
3081
3570
|
strokeLinejoin: "round",
|
|
3082
|
-
d: "
|
|
3571
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z" })
|
|
3083
3572
|
}
|
|
3084
|
-
)
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
children: [
|
|
3104
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3105
|
-
"svg",
|
|
3106
|
-
{
|
|
3107
|
-
className: "ww-w-3.5 ww-h-3.5 ww-text-zinc-400 ww-shrink-0 ww-mt-0.5",
|
|
3108
|
-
viewBox: "0 0 24 24",
|
|
3109
|
-
fill: "none",
|
|
3110
|
-
stroke: "currentColor",
|
|
3111
|
-
strokeWidth: "2",
|
|
3112
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3113
|
-
"path",
|
|
3573
|
+
) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3574
|
+
"svg",
|
|
3575
|
+
{
|
|
3576
|
+
className: "ww-w-3.5 ww-h-3.5 ww-shrink-0",
|
|
3577
|
+
viewBox: "0 0 24 24",
|
|
3578
|
+
fill: "none",
|
|
3579
|
+
stroke: "currentColor",
|
|
3580
|
+
strokeWidth: "2",
|
|
3581
|
+
strokeLinecap: "round",
|
|
3582
|
+
strokeLinejoin: "round",
|
|
3583
|
+
children: [
|
|
3584
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3 18v-6a9 9 0 0 1 18 0v6" }),
|
|
3585
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z" })
|
|
3586
|
+
]
|
|
3587
|
+
}
|
|
3588
|
+
),
|
|
3589
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ww-flex-1 ww-text-left ww-truncate", children: customBackend.footerAction.label }),
|
|
3590
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3591
|
+
"svg",
|
|
3114
3592
|
{
|
|
3593
|
+
className: "ww-shrink-0 ww-w-3 ww-h-3 ww-opacity-60",
|
|
3594
|
+
viewBox: "0 0 24 24",
|
|
3595
|
+
fill: "none",
|
|
3596
|
+
stroke: "currentColor",
|
|
3597
|
+
strokeWidth: "2.5",
|
|
3115
3598
|
strokeLinecap: "round",
|
|
3116
3599
|
strokeLinejoin: "round",
|
|
3117
|
-
|
|
3600
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9 18l6-6-6-6" })
|
|
3118
3601
|
}
|
|
3119
3602
|
)
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3603
|
+
]
|
|
3604
|
+
}
|
|
3605
|
+
) }),
|
|
3606
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3607
|
+
ChatInput,
|
|
3608
|
+
{
|
|
3609
|
+
input: chat.input,
|
|
3610
|
+
setInput: chat.setInput,
|
|
3611
|
+
onSend: handleSend,
|
|
3612
|
+
streaming: chat.streaming,
|
|
3613
|
+
placeholder: messagePlaceholder,
|
|
3614
|
+
accentColor: userMessageColor,
|
|
3615
|
+
locale,
|
|
3616
|
+
canRegenerate: !!canRegenerate,
|
|
3617
|
+
onRegenerate: () => void chat.regenerate(),
|
|
3618
|
+
selectedContext: chat.selectedContext,
|
|
3619
|
+
onClearContext: () => chat.setSelectedContext(null),
|
|
3620
|
+
...enableVoice && voice.isSupported ? {
|
|
3621
|
+
voiceState: voice.voiceState,
|
|
3622
|
+
onVoiceStart: () => void voice.start(),
|
|
3623
|
+
onVoiceStop: voice.stop
|
|
3624
|
+
} : {},
|
|
3625
|
+
...enableAttachments ? {
|
|
3626
|
+
attachments: attachmentHook.attachments,
|
|
3627
|
+
onAttach: attachmentHook.attach,
|
|
3628
|
+
onRemoveAttachment: attachmentHook.remove,
|
|
3629
|
+
isUploading: attachmentHook.isUploading
|
|
3630
|
+
} : {}
|
|
3631
|
+
}
|
|
3632
|
+
)
|
|
3633
|
+
]
|
|
3634
|
+
}
|
|
3635
|
+
),
|
|
3636
|
+
showSidebar && /* @__PURE__ */ jsxRuntime.jsx(CommandPanel, { mode: "sidebar", ...commandPanelProps })
|
|
3637
|
+
]
|
|
3638
|
+
}
|
|
3639
|
+
),
|
|
3640
|
+
watermark && !showSidebar && /* @__PURE__ */ jsxRuntime.jsxs("footer", { className: "ww-shrink-0 ww-flex ww-items-center ww-justify-center ww-gap-1.5 ww-bg-muted/50 ww-py-1.5 ww-border-t ww-touch-none", children: [
|
|
3641
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3642
|
+
"a",
|
|
3643
|
+
{
|
|
3644
|
+
href: "https://wallavi.com",
|
|
3645
|
+
target: "_blank",
|
|
3646
|
+
rel: "noopener noreferrer",
|
|
3647
|
+
className: "ww-flex ww-items-center ww-gap-1 ww-text-[10px] ww-text-muted-foreground hover:ww-text-foreground ww-transition-colors",
|
|
3648
|
+
children: [
|
|
3649
|
+
/* @__PURE__ */ jsxRuntime.jsx("img", { src: watermarkLogoUrl, alt: "Wallavi", width: 12, height: 12 }),
|
|
3650
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
3651
|
+
getWidgetTranslation("poweredBy", locale),
|
|
3652
|
+
" Wallavi"
|
|
3653
|
+
] })
|
|
3654
|
+
]
|
|
3655
|
+
}
|
|
3656
|
+
),
|
|
3657
|
+
footer && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3658
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ww-text-muted-foreground/40 ww-text-[10px]", children: "\xB7" }),
|
|
3659
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ww-text-[10px] ww-text-muted-foreground", children: footer })
|
|
3129
3660
|
] })
|
|
3130
3661
|
] })
|
|
3131
3662
|
]
|
|
@@ -3186,6 +3717,10 @@ function useAutoConfig(agentId, enabled) {
|
|
|
3186
3717
|
remote.enableVoice = cfg.enableVoice;
|
|
3187
3718
|
if (cfg.clientActions)
|
|
3188
3719
|
remote.clientActions = cfg.clientActions;
|
|
3720
|
+
if (Array.isArray(cfg.ragTopics))
|
|
3721
|
+
remote.ragTopics = cfg.ragTopics;
|
|
3722
|
+
if (Array.isArray(cfg.ragDocuments))
|
|
3723
|
+
remote.ragDocuments = cfg.ragDocuments;
|
|
3189
3724
|
setResult({
|
|
3190
3725
|
remoteConfig: remote,
|
|
3191
3726
|
bubbleIconUrl: cfg.chatIcon || cfg.profilePicture || void 0,
|
|
@@ -3220,8 +3755,11 @@ function useSupportChat({
|
|
|
3220
3755
|
inboxToken,
|
|
3221
3756
|
apiBase = "https://app.wallavi.com",
|
|
3222
3757
|
requestHumanLabel = "Hablar con un agente",
|
|
3223
|
-
returnToAiLabel
|
|
3758
|
+
returnToAiLabel,
|
|
3759
|
+
locale
|
|
3224
3760
|
}) {
|
|
3761
|
+
const resolvedRequestHumanLabel = requestHumanLabel && requestHumanLabel !== "Hablar con un agente" ? requestHumanLabel : getWidgetTranslation("requestHuman", locale);
|
|
3762
|
+
const resolvedReturnToAiLabel = returnToAiLabel && returnToAiLabel !== "Volver a chatear con la IA" ? returnToAiLabel : returnToAiLabel ? getWidgetTranslation("returnToAi", locale) : void 0;
|
|
3225
3763
|
const enabled = Boolean(inboxToken) && inboxToken !== "__disabled__";
|
|
3226
3764
|
const STORAGE_KEY = `wlv_support_${inboxToken}`;
|
|
3227
3765
|
const base = apiBase.replace(/\/$/, "");
|
|
@@ -3362,7 +3900,9 @@ function useSupportChat({
|
|
|
3362
3900
|
{
|
|
3363
3901
|
id: `tmp_${Date.now()}`,
|
|
3364
3902
|
role: "customer",
|
|
3365
|
-
content: text || `[${
|
|
3903
|
+
content: text || `[${getWidgetTranslation("filesCount", locale, {
|
|
3904
|
+
count: String(attachments?.length ?? 0)
|
|
3905
|
+
})}]`,
|
|
3366
3906
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
3367
3907
|
metadata: attachments?.length ? { attachments } : void 0
|
|
3368
3908
|
}
|
|
@@ -3373,7 +3913,9 @@ function useSupportChat({
|
|
|
3373
3913
|
headers: { "Content-Type": "application/json" },
|
|
3374
3914
|
body: JSON.stringify({
|
|
3375
3915
|
inboxToken,
|
|
3376
|
-
message: text || `[${
|
|
3916
|
+
message: text || `[${getWidgetTranslation("filesCount", locale, {
|
|
3917
|
+
count: String(attachments.length)
|
|
3918
|
+
})}]`,
|
|
3377
3919
|
attachments
|
|
3378
3920
|
})
|
|
3379
3921
|
});
|
|
@@ -3402,7 +3944,9 @@ function useSupportChat({
|
|
|
3402
3944
|
{
|
|
3403
3945
|
id: `tmp_${Date.now()}`,
|
|
3404
3946
|
role: "customer",
|
|
3405
|
-
content: text || `[${
|
|
3947
|
+
content: text || `[${getWidgetTranslation("filesCount", locale, {
|
|
3948
|
+
count: String(attachments.length)
|
|
3949
|
+
})}]`,
|
|
3406
3950
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
3407
3951
|
metadata: attachments?.length ? { attachments } : void 0
|
|
3408
3952
|
}
|
|
@@ -3522,17 +4066,17 @@ function useSupportChat({
|
|
|
3522
4066
|
const footerAction = react.useMemo(() => {
|
|
3523
4067
|
if (isAiMode) {
|
|
3524
4068
|
return {
|
|
3525
|
-
label:
|
|
3526
|
-
sublabel: "
|
|
4069
|
+
label: resolvedRequestHumanLabel,
|
|
4070
|
+
sublabel: getWidgetTranslation("requestHumanSublabel", locale),
|
|
3527
4071
|
icon: "human",
|
|
3528
4072
|
onClick: requestHuman,
|
|
3529
4073
|
loading: requestingHuman
|
|
3530
4074
|
};
|
|
3531
4075
|
}
|
|
3532
|
-
if (
|
|
4076
|
+
if (session && resolvedReturnToAiLabel) {
|
|
3533
4077
|
return {
|
|
3534
|
-
label:
|
|
3535
|
-
sublabel: "
|
|
4078
|
+
label: resolvedReturnToAiLabel,
|
|
4079
|
+
sublabel: getWidgetTranslation("returnToAiSublabel", locale),
|
|
3536
4080
|
icon: "ai",
|
|
3537
4081
|
onClick: returnToAi,
|
|
3538
4082
|
loading: returningToAi
|
|
@@ -3542,12 +4086,13 @@ function useSupportChat({
|
|
|
3542
4086
|
}, [
|
|
3543
4087
|
isAiMode,
|
|
3544
4088
|
session,
|
|
3545
|
-
|
|
4089
|
+
resolvedRequestHumanLabel,
|
|
4090
|
+
resolvedReturnToAiLabel,
|
|
3546
4091
|
requestHuman,
|
|
3547
4092
|
requestingHuman,
|
|
3548
|
-
returnToAiLabel,
|
|
3549
4093
|
returnToAi,
|
|
3550
|
-
returningToAi
|
|
4094
|
+
returningToAi,
|
|
4095
|
+
locale
|
|
3551
4096
|
]);
|
|
3552
4097
|
return react.useMemo(
|
|
3553
4098
|
() => ({
|
|
@@ -3610,14 +4155,6 @@ function BubbleWidget({
|
|
|
3610
4155
|
onOpenChange,
|
|
3611
4156
|
...chatProps
|
|
3612
4157
|
}) {
|
|
3613
|
-
const supportBackend = useSupportChat(
|
|
3614
|
-
inboxToken ? {
|
|
3615
|
-
inboxToken,
|
|
3616
|
-
apiBase: supportApiBase,
|
|
3617
|
-
requestHumanLabel,
|
|
3618
|
-
returnToAiLabel
|
|
3619
|
-
} : { inboxToken: "__disabled__", apiBase: supportApiBase }
|
|
3620
|
-
);
|
|
3621
4158
|
const isControlled = isOpenProp !== void 0;
|
|
3622
4159
|
const [internalOpen, setInternalOpen] = react.useState(false);
|
|
3623
4160
|
const open = isControlled ? isOpenProp : internalOpen;
|
|
@@ -3669,6 +4206,15 @@ function BubbleWidget({
|
|
|
3669
4206
|
agentName: remote.remoteConfig.agentName ?? chatProps.agentName ?? "Asistente",
|
|
3670
4207
|
source: chatProps.source ?? remote.remoteConfig.source ?? "web"
|
|
3671
4208
|
};
|
|
4209
|
+
const supportBackend = useSupportChat(
|
|
4210
|
+
inboxToken ? {
|
|
4211
|
+
inboxToken,
|
|
4212
|
+
apiBase: supportApiBase,
|
|
4213
|
+
requestHumanLabel,
|
|
4214
|
+
returnToAiLabel,
|
|
4215
|
+
locale: mergedConfig.locale
|
|
4216
|
+
} : { inboxToken: "__disabled__", apiBase: supportApiBase }
|
|
4217
|
+
);
|
|
3672
4218
|
const setOpenRef = react.useRef(setOpen);
|
|
3673
4219
|
react.useEffect(() => {
|
|
3674
4220
|
setOpenRef.current = setOpen;
|
|
@@ -3826,6 +4372,9 @@ function BubbleWidget({
|
|
|
3826
4372
|
|
|
3827
4373
|
exports.BubbleWidget = BubbleWidget;
|
|
3828
4374
|
exports.ChatWidget = ChatWidget;
|
|
4375
|
+
exports.CommandPanel = CommandPanel;
|
|
4376
|
+
exports.IconTarget = IconTarget;
|
|
4377
|
+
exports.LiveDot = LiveDot;
|
|
3829
4378
|
exports.PlanCard = PlanCard;
|
|
3830
4379
|
exports.ReasoningBlock = ReasoningBlock;
|
|
3831
4380
|
exports.ToolCallBadge = ToolCallBadge;
|