@axos-web-dev/shared-components 2.0.0-dev.29 → 2.0.0-dev.29-toasts

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.
Files changed (216) hide show
  1. package/dist/ATMLocator/ATMLocator.js +7 -2
  2. package/dist/Article/Article.css.d.ts +8 -4
  3. package/dist/ArticlesSet/ArticlesSet.css.d.ts +23 -1
  4. package/dist/ArticlesSet/ArticlesSet.css.js +7 -7
  5. package/dist/ArticlesSet/ArticlesSet.js +3 -4
  6. package/dist/Auth/ErrorAlert.js +8 -3
  7. package/dist/Auth/SignInPassword.js +1 -1
  8. package/dist/AwardsItem/AwardsItem.js +2 -2
  9. package/dist/Button/Button.js +26 -3
  10. package/dist/Calculators/ApyCalculatorUserTest/ApyCalculatorUserTest.css.d.ts +95 -0
  11. package/dist/Calculators/ApyCalculatorUserTest/ApyCalculatorUserTest.css.js +101 -0
  12. package/dist/Calculators/ApyCalculatorUserTest/index.d.ts +12 -0
  13. package/dist/Calculators/ApyCalculatorUserTest/index.js +618 -0
  14. package/dist/Calculators/AxosOneCalculator/BalanceAPYCalculator.css.js +2 -1
  15. package/dist/Calculators/Calculator.js +18 -3
  16. package/dist/Calculators/MarginTradingCalculator/index.js +7 -2
  17. package/dist/Calculators/index.d.ts +1 -0
  18. package/dist/Calculators/index.js +2 -0
  19. package/dist/Carousel/index.js +7 -2
  20. package/dist/Chatbot/AudioManager.d.ts +19 -0
  21. package/dist/Chatbot/AudioManager.js +61 -0
  22. package/dist/Chatbot/Bubble.css.js +2 -2
  23. package/dist/Chatbot/Bubble.js +1 -1
  24. package/dist/Chatbot/ChatWindow.css.d.ts +4 -0
  25. package/dist/Chatbot/ChatWindow.css.js +44 -36
  26. package/dist/Chatbot/ChatWindow.js +457 -387
  27. package/dist/Chatbot/Chatbot.css.js +0 -1
  28. package/dist/Chatbot/Chatbot.css.ts.vanilla.css.js +1 -0
  29. package/dist/Chatbot/Chatbot.d.ts +3 -0
  30. package/dist/Chatbot/Chatbot.js +103 -43
  31. package/dist/Chatbot/ChatbotMessage.js +183 -197
  32. package/dist/Chatbot/EllipsisAnimation.js +0 -6
  33. package/dist/Chatbot/ExpandChatToggle.d.ts +8 -0
  34. package/dist/Chatbot/ExpandChatToggle.js +74 -0
  35. package/dist/Chatbot/index.js +7 -2
  36. package/dist/Chatbot/store/chat.d.ts +8 -0
  37. package/dist/Chatbot/store/chat.js +14 -2
  38. package/dist/Chevron/Chevron.interface.d.ts +1 -0
  39. package/dist/Chevron/index.js +12 -3
  40. package/dist/Comparison/Comparison.css.d.ts +1 -0
  41. package/dist/Comparison/Comparison.css.js +16 -13
  42. package/dist/Comparison/Comparison.js +7 -2
  43. package/dist/Comparison/ComparisonSet.js +2 -1
  44. package/dist/Comparison/index.js +2 -1
  45. package/dist/ExecutiveBio/ExecutiveBio.css.d.ts +27 -0
  46. package/dist/ExecutiveBio/ExecutiveBio.js +281 -262
  47. package/dist/FaqAccordion/index.js +7 -2
  48. package/dist/FdicCallout/index.js +2 -1
  49. package/dist/FooterDisclosure/FooterDisclosure.js +1 -0
  50. package/dist/FooterSiteMap/AxosBank/FooterSiteMap.js +670 -659
  51. package/dist/Forms/ApplyNow.js +7 -2
  52. package/dist/Forms/CommercialDepositsACS.d.ts +3 -0
  53. package/dist/Forms/CommercialDepositsACS.js +278 -0
  54. package/dist/Forms/ContactUsBusiness.js +9 -4
  55. package/dist/Forms/ContactUsBusinessNameEmail.js +9 -4
  56. package/dist/Forms/ContactUsNMLSId.js +9 -4
  57. package/dist/Forms/ContactUsSchwabAAS.d.ts +11 -0
  58. package/dist/Forms/ContactUsSchwabAAS.js +263 -0
  59. package/dist/Forms/CpraRequest.js +8 -3
  60. package/dist/Forms/CraPublicFile.js +9 -4
  61. package/dist/Forms/EmailOnly.js +10 -5
  62. package/dist/Forms/Forms.css.d.ts +3 -0
  63. package/dist/Forms/MortgageRate/MortgageRateForm.js +7 -2
  64. package/dist/Forms/MortgageRate/MortgageRateWatch.js +7 -2
  65. package/dist/Forms/MortgageWarehouseLending.d.ts +1 -1
  66. package/dist/Forms/MortgageWarehouseLending.js +16 -11
  67. package/dist/Forms/SuccesForm.js +8 -3
  68. package/dist/Forms/index.d.ts +2 -0
  69. package/dist/Forms/index.js +4 -0
  70. package/dist/HeroBanner/HeroBanner.d.ts +1 -1
  71. package/dist/HeroBanner/HeroBanner.interface.d.ts +2 -0
  72. package/dist/HeroBanner/HeroBanner.js +33 -28
  73. package/dist/Hyperlink/index.js +9 -4
  74. package/dist/IconBillboard/IconBillboard.css.d.ts +16 -0
  75. package/dist/IconBillboard/IconBillboard.css.js +7 -4
  76. package/dist/IconBillboard/IconBillboard.interface.d.ts +2 -0
  77. package/dist/IconBillboard/IconBillboardSet.js +68 -62
  78. package/dist/IconBillboard/index.js +2 -1
  79. package/dist/IconBillboard/sections/CallToActionSection.js +3 -1
  80. package/dist/ImageBillboard/ImageBillboard.interface.d.ts +2 -0
  81. package/dist/ImageBillboard/ImageBillboardSet.d.ts +1 -1
  82. package/dist/ImageBillboard/ImageBillboardSet.js +28 -20
  83. package/dist/ImageLink/ImageLink.js +7 -2
  84. package/dist/ImageLink/ImageLinkSet.js +7 -2
  85. package/dist/ImageLink/index.js +8 -3
  86. package/dist/ImageToast/ImageToast.css.d.ts +5 -0
  87. package/dist/ImageToast/ImageToast.css.js +13 -0
  88. package/dist/ImageToast/index.d.ts +9 -0
  89. package/dist/{NavigationMenu/Navbar.js → ImageToast/index.js} +82 -93
  90. package/dist/Insight/Featured/CategorySelector.d.ts +1 -1
  91. package/dist/Insight/Featured/CategorySelector.js +10 -4
  92. package/dist/Insight/Featured/Featured.js +7 -2
  93. package/dist/Insight/Featured/Header.d.ts +1 -2
  94. package/dist/Insight/Featured/Header.js +7 -2
  95. package/dist/LandingPageHeader/LandingPageHeader.js +25 -16
  96. package/dist/Modal/Modal.js +8 -3
  97. package/dist/Modal/contextApi/store.d.ts +6 -1
  98. package/dist/Modal/contextApi/store.js +112 -6
  99. package/dist/NavigationMenu/AxosALTS/NavBar.module.js +23 -23
  100. package/dist/NavigationMenu/AxosALTS/index.js +42 -23
  101. package/dist/NavigationMenu/AxosAdvisor/NavBar.module.js +52 -52
  102. package/dist/NavigationMenu/AxosAdvisor/index.js +1 -1
  103. package/dist/NavigationMenu/AxosAdvisorServices/NavBar.module.js +53 -53
  104. package/dist/NavigationMenu/AxosAdvisorServices/index.js +31 -24
  105. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileMenu.js +7 -2
  106. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileNavData.d.ts +3 -9
  107. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileNavData.js +13 -25
  108. package/dist/NavigationMenu/AxosBank/SubNavBar.js +37 -116
  109. package/dist/NavigationMenu/AxosBank/index.js +58 -39
  110. package/dist/NavigationMenu/AxosClearing/NavBar.module.js +37 -37
  111. package/dist/NavigationMenu/AxosClearing/SubNavBar.js +6 -6
  112. package/dist/NavigationMenu/AxosClearing/index.js +31 -16
  113. package/dist/NavigationMenu/AxosFiduciary/NavBar.module.js +40 -43
  114. package/dist/NavigationMenu/AxosFiduciary/index.js +5 -3
  115. package/dist/NavigationMenu/LaVictoire/index.js +8 -3
  116. package/dist/NavigationMenu/NavItem/index.js +141 -1
  117. package/dist/NavigationMenu/ServerNavigation/DropwdownButton.d.ts +7 -0
  118. package/dist/NavigationMenu/ServerNavigation/DropwdownButton.js +248 -0
  119. package/dist/NavigationMenu/ServerNavigation/Menu.d.ts +40 -0
  120. package/dist/NavigationMenu/ServerNavigation/Menu.js +268 -0
  121. package/dist/NavigationMenu/ServerNavigation/MobileMenu/MobileMenu.d.ts +13 -0
  122. package/dist/NavigationMenu/ServerNavigation/MobileMenu/MobileMenu.js +637 -0
  123. package/dist/NavigationMenu/ServerNavigation/MobileMenu/MobileMenu.module.js +86 -0
  124. package/dist/NavigationMenu/ServerNavigation/MobileMenu/MobileNavData.d.ts +51 -0
  125. package/dist/NavigationMenu/ServerNavigation/MobileMenu/MobileNavData.js +96 -0
  126. package/dist/NavigationMenu/ServerNavigation/MobileMenu/mobileReducer.d.ts +36 -0
  127. package/dist/NavigationMenu/ServerNavigation/MobileMenu/mobileReducer.js +105 -0
  128. package/dist/NavigationMenu/ServerNavigation/NavBar.module.js +125 -0
  129. package/dist/NavigationMenu/ServerNavigation/NavigationBar.css.d.ts +7 -0
  130. package/dist/NavigationMenu/ServerNavigation/NavigationBar.css.js +22 -0
  131. package/dist/NavigationMenu/ServerNavigation/SubNavBar.d.ts +6 -0
  132. package/dist/NavigationMenu/ServerNavigation/SubNavBar.js +281 -0
  133. package/dist/NavigationMenu/ServerNavigation/SubNavItem.d.ts +1 -0
  134. package/dist/NavigationMenu/ServerNavigation/SubNavItem.js +317 -0
  135. package/dist/NavigationMenu/ServerNavigation/SubNavbar.css.d.ts +60 -0
  136. package/dist/NavigationMenu/ServerNavigation/SubNavbar.css.js +22 -0
  137. package/dist/NavigationMenu/ServerNavigation/index.d.ts +7 -0
  138. package/dist/NavigationMenu/ServerNavigation/index.js +297 -0
  139. package/dist/NavigationMenu/index.d.ts +2 -0
  140. package/dist/NavigationMenu/index.js +19 -10
  141. package/dist/NavigationMenu/utils.d.ts +480 -0
  142. package/dist/NavigationMenu/utils.js +128 -0
  143. package/dist/PageNavSet/PageNavSet.js +16 -8
  144. package/dist/SecondaryFooter/index.js +8 -1
  145. package/dist/SetContainer/SetContainer.css.d.ts +3 -0
  146. package/dist/SetContainer/SetContainer.js +7 -2
  147. package/dist/SocialMediaBar/iconsRepository.js +8 -3
  148. package/dist/SocialMediaBar/index.js +1 -1
  149. package/dist/StepItemSet/StepItemSet.css.d.ts +3 -0
  150. package/dist/Table/Table.css.d.ts +14 -1
  151. package/dist/Table/Table.css.js +21 -19
  152. package/dist/Table/Table.d.ts +1 -1
  153. package/dist/Table/Table.js +5 -3
  154. package/dist/TopicalNavItem/TopicalNavItem.css.d.ts +0 -1
  155. package/dist/TopicalNavItem/TopicalNavItem.css.js +2 -4
  156. package/dist/TopicalNavItem/TopicalNavItem.js +11 -33
  157. package/dist/TopicalNavItem/index.js +1 -2
  158. package/dist/TopicalNavSet/TopicalNavSet.js +17 -9
  159. package/dist/VideoTile/VideoTile.js +7 -2
  160. package/dist/VideoWrapper/index.js +8 -3
  161. package/dist/assets/Article/Article.css +8 -4
  162. package/dist/assets/ArticlesSet/ArticlesSet.css +54 -39
  163. package/dist/assets/Auth/SignIn.css +2 -1
  164. package/dist/assets/Calculators/ApyCalculatorUserTest/ApyCalculatorUserTest.css +424 -0
  165. package/dist/assets/Calculators/AxosOneCalculator/BalanceAPYCalculator.css +2 -2
  166. package/dist/assets/CallToActionBar/CallToActionBar.css +2 -0
  167. package/dist/assets/Chatbot/AnimatedGradientBorder.css +1 -1
  168. package/dist/assets/Chatbot/Bubble.css +6 -2
  169. package/dist/assets/Chatbot/ChatWindow.css +120 -65
  170. package/dist/assets/Comparison/Comparison.css +32 -29
  171. package/dist/assets/DownloadTile/DownloadTile.css +0 -5
  172. package/dist/assets/ExecutiveBio/ExecutiveBio.css +55 -17
  173. package/dist/assets/FaqAccordion/FaqAccordion.css +1 -1
  174. package/dist/assets/FooterSiteMap/AxosBank/FooterSiteMap.css +2 -2
  175. package/dist/assets/Forms/Forms.css +3 -2
  176. package/dist/assets/HeroBanner/HeroBanner.css +1 -0
  177. package/dist/assets/IconBillboard/IconBillboard.css +64 -13
  178. package/dist/assets/ImageToast/ImageToast.css +39 -0
  179. package/dist/assets/Insight/Featured/Header.css +4 -2
  180. package/dist/assets/NavigationMenu/AxosALTS/NavBar.css +265 -264
  181. package/dist/assets/NavigationMenu/AxosAdvisor/NavBar.css +609 -609
  182. package/dist/assets/NavigationMenu/AxosAdvisorServices/NavBar.css +631 -630
  183. package/dist/assets/NavigationMenu/AxosClearing/NavBar.css +485 -484
  184. package/dist/assets/NavigationMenu/AxosFiduciary/NavBar.css +428 -427
  185. package/dist/assets/NavigationMenu/ServerNavigation/MobileMenu/MobileMenu.css +353 -0
  186. package/dist/assets/NavigationMenu/ServerNavigation/NavBar.css +483 -0
  187. package/dist/assets/NavigationMenu/ServerNavigation/NavigationBar.css +40 -0
  188. package/dist/assets/NavigationMenu/ServerNavigation/SubNavbar.css +87 -0
  189. package/dist/assets/SetContainer/SetContainer.css +7 -10
  190. package/dist/assets/SocialMediaBar/SocialMediaBar.css +1 -0
  191. package/dist/assets/StepItemSet/StepItemSet.css +3 -3
  192. package/dist/assets/Table/Table.css +82 -77
  193. package/dist/assets/TopicalNavItem/TopicalNavItem.css +25 -52
  194. package/dist/assets/TopicalNavSet/TopicalNavSet.css +28 -6
  195. package/dist/assets/VideoTile/VideoTile.css +3 -0
  196. package/dist/assets/globals.css +34 -2
  197. package/dist/globals.css.js +8 -1
  198. package/dist/icons/QuoteIconGrey.js +1 -0
  199. package/dist/icons/QuoteIconWhite.js +1 -0
  200. package/dist/icons/QuoteIconYellow.js +1 -0
  201. package/dist/index.css.js +8 -1
  202. package/dist/main.js +40 -17
  203. package/dist/utils/allowedAxosDomains.js +8 -13
  204. package/dist/utils/appendQueryParams.d.ts +3 -1
  205. package/dist/utils/appendQueryParams.js +66 -66
  206. package/dist/utils/index.js +3 -1
  207. package/dist/utils/tealiumOrganicFallback.d.ts +21 -0
  208. package/dist/utils/tealiumOrganicFallback.js +26 -0
  209. package/dist/utils/useVisibility.d.ts +1 -0
  210. package/dist/utils/useVisibility.js +21 -0
  211. package/dist/vite-env.d.js +1 -0
  212. package/package.json +148 -148
  213. package/dist/NavigationMenu/Navbar.d.ts +0 -5
  214. package/dist/NavigationMenu/SignInNavButton.d.ts +0 -1
  215. package/dist/NavigationMenu/SignInNavButton.js +0 -363
  216. package/dist/assets/Chatbot/Chatbot.css +0 -3
@@ -1,5 +1,6 @@
1
1
  "use client";
2
2
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
3
+ import { LoadingIndicator } from "../LoadingIndicator/index.js";
3
4
  import { vars } from "../themes/axos.css.js";
4
5
  import '../assets/themes/victorie.css';import '../assets/themes/ufb.css';import '../assets/themes/premier.css';import '../assets/themes/axos.css';/* empty css */
5
6
  /* empty css */
@@ -10,8 +11,9 @@ import React, { useRef, useState, useEffect } from "react";
10
11
  import { useNetworkState, useMount } from "react-use";
11
12
  import { focusAnimation, gradientFocus } from "./AnimatedGradientBorder.css.js";
12
13
  import { ChatbotMessage } from "./ChatbotMessage.js";
13
- import { windowBarStyle, left_bar_section, chat_title, button_bar, chatbotMenuItem, chatbotMenu, chatEndDialogOverlay, chatFinishDialog, chatEndCircle, endChatButtonStyle, noAnswerButton, arrowFill, button_reset, buttonss_section, chatNetworkStatus, shimmerText, messagesContainerStyle, inputStyle, autoResize, sendButtonStyle, windowStyle, windowOpenStyle } from "./ChatWindow.css.js";
14
+ import { windowBarStyle, left_bar_section, chat_title, button_bar, chatbotMenuItem, chatbotMenu, chatEndDialogOverlay, chatFinishDialog, chatEndCircle, endChatButtonStyle, noAnswerButton, arrowFill, button_reset, buttonss_section, chatNetworkStatus, shimmerText, messagesContainerStyle, formTextButton, inputStyle, autoResize, sendButtonStyle, chatAiDisclaimer, windowStyle, windowOpenStyle, windowExpandedStyle } from "./ChatWindow.css.js";
14
15
  import { EllipsisIcon } from "./EllipsisIcon.js";
16
+ import { ExpandChatToggle } from "./ExpandChatToggle.js";
15
17
  import { useOpenChat } from "./store/chat.js";
16
18
  import { ThankYouMessage } from "./ThankYouMessage.js";
17
19
  const ChatWindow = ({
@@ -39,12 +41,15 @@ const ChatWindow = ({
39
41
  }) => {
40
42
  const {
41
43
  showThankyouMessage,
42
- displayThankyouMessage,
43
44
  toggleThankyouMessage,
44
45
  hasEscalated,
45
46
  isBlockedInput,
46
47
  isOpen,
47
- hasOpenedOnce
48
+ hasOpenedOnce,
49
+ chatStatus,
50
+ setChatStatus,
51
+ isWindowExpanded,
52
+ toggleWindowExpanded
48
53
  } = useOpenChat();
49
54
  const [mounted, setMounted] = React.useState(false);
50
55
  const [menuOpen, setMenuOpen] = React.useState(false);
@@ -84,9 +89,6 @@ const ChatWindow = ({
84
89
  useEffect(() => {
85
90
  autoResizeTextarea();
86
91
  }, [input]);
87
- const displayThankYouScreen = () => {
88
- displayThankyouMessage();
89
- };
90
92
  const onCancelEndChat = () => {
91
93
  setShowEndChatDialog(false);
92
94
  toggleThankyouMessage?.();
@@ -103,102 +105,177 @@ const ChatWindow = ({
103
105
  inputRef.current.focus();
104
106
  }
105
107
  }, [messages]);
106
- return /* @__PURE__ */ jsxs("div", { className: clsx(windowStyle, isOpen && windowOpenStyle), children: [
107
- /* @__PURE__ */ jsxs("div", { className: windowBarStyle, children: [
108
- /* @__PURE__ */ jsx("div", { className: clsx(left_bar_section) }),
109
- /* @__PURE__ */ jsxs(
110
- "div",
111
- {
112
- className: "flex middle center",
113
- style: { paddingBlock: "6px", gap: 4 },
114
- children: [
115
- /* @__PURE__ */ jsxs(
116
- "svg",
108
+ return /* @__PURE__ */ jsxs(
109
+ "div",
110
+ {
111
+ className: clsx(
112
+ windowStyle,
113
+ isOpen && windowOpenStyle,
114
+ isWindowExpanded && windowExpandedStyle
115
+ ),
116
+ children: [
117
+ /* @__PURE__ */ jsxs("div", { className: windowBarStyle, children: [
118
+ /* @__PURE__ */ jsx("div", { className: clsx(left_bar_section), children: /* @__PURE__ */ jsx(
119
+ ExpandChatToggle,
120
+ {
121
+ isExpanded: isWindowExpanded,
122
+ onToggle: toggleWindowExpanded
123
+ }
124
+ ) }),
125
+ /* @__PURE__ */ jsxs(
126
+ "div",
127
+ {
128
+ className: "flex middle center",
129
+ style: { paddingBlock: "6px", gap: 4 },
130
+ children: [
131
+ /* @__PURE__ */ jsxs(
132
+ "svg",
133
+ {
134
+ xmlns: "http://www.w3.org/2000/svg",
135
+ width: "20",
136
+ height: "17",
137
+ viewBox: "0 0 20 17",
138
+ fill: "none",
139
+ "aria-hidden": "true",
140
+ children: [
141
+ /* @__PURE__ */ jsx(
142
+ "path",
143
+ {
144
+ d: "M10.5277 2.78937C10.8911 2.78937 11.1852 3.08251 11.1853 3.44452C11.1852 3.80654 10.8911 4.10056 10.5277 4.10056H5.26386C4.5371 4.10064 3.94791 4.68761 3.94789 5.41175V10.6565C3.9479 11.3806 4.5371 11.9676 5.26386 11.9677H6.97488C7.12012 11.9678 7.23818 12.0854 7.23825 12.2301V15.6861L10.8932 12.0445C10.9424 11.9956 11.0092 11.9679 11.0786 11.9677H14.4765C15.2032 11.9676 15.7925 11.3806 15.7925 10.6565V9.27302C15.7925 8.91106 16.0868 8.61721 16.45 8.61697C16.8134 8.61699 17.1084 8.91093 17.1084 9.27302V10.6565C17.1084 12.1048 15.9301 13.2788 14.4765 13.2789H11.5149L8.16901 16.6135C7.33997 17.4393 5.92245 16.8542 5.92229 15.6861V13.2789H5.26386C3.81026 13.2788 2.63193 12.1048 2.63193 10.6565V5.41175C2.63194 3.96341 3.81027 2.78945 5.26386 2.78937H10.5277Z",
145
+ fill: "#1E3860"
146
+ }
147
+ ),
148
+ /* @__PURE__ */ jsx(
149
+ "path",
150
+ {
151
+ d: "M9.21265 0.166102C9.57579 0.166381 9.87012 0.460269 9.87018 0.822142C9.87004 1.18394 9.57574 1.47701 9.21265 1.47729H3.29036C2.20017 1.47729 1.31606 2.35831 1.31596 3.44452V6.72294C1.31577 7.08487 1.02083 7.37808 0.657534 7.37808C0.294361 7.37794 0.000196551 7.08478 0 6.72294V3.44452C9.80773e-05 1.63411 1.47333 0.166102 3.29036 0.166102H9.21265Z",
152
+ fill: "#1E3860"
153
+ }
154
+ ),
155
+ /* @__PURE__ */ jsx(
156
+ "path",
157
+ {
158
+ d: "M15.7145 0.475824C15.9558 -0.158638 16.8779 -0.158578 17.1192 0.475824L17.6459 1.8611C17.7218 2.06058 17.8835 2.2175 18.0885 2.29132L19.511 2.80454C20.163 3.03936 20.163 3.93626 19.511 4.17107L18.0885 4.6843C17.8835 4.75812 17.7218 4.91504 17.6459 5.11452L17.1192 6.49979C16.8779 7.1342 15.9558 7.13426 15.7145 6.49979L15.1878 5.11452C15.1119 4.91508 14.9502 4.75811 14.7453 4.6843L13.3227 4.17107C12.6708 3.93622 12.6708 3.0394 13.3227 2.80454L14.7453 2.29132C14.9502 2.21751 15.1119 2.06054 15.1878 1.8611L15.7145 0.475824Z",
159
+ fill: "#1E3860"
160
+ }
161
+ )
162
+ ]
163
+ }
164
+ ),
165
+ /* @__PURE__ */ jsx("h2", { className: chat_title, children: "Ask Evo AI" })
166
+ ]
167
+ }
168
+ ),
169
+ /* @__PURE__ */ jsxs("div", { className: clsx(buttonss_section), children: [
170
+ /* @__PURE__ */ jsx(
171
+ "button",
172
+ {
173
+ disabled: messages.length === 0,
174
+ onClick: () => {
175
+ setMenuOpen(!menuOpen);
176
+ },
177
+ className: clsx(button_bar),
178
+ style: {
179
+ border: menuOpen ? `1px solid ${vars.chatbot.window.headerText}` : "none",
180
+ cursor: "pointer",
181
+ padding: 0,
182
+ display: "flex",
183
+ alignContent: "center",
184
+ background: menuOpen ? "#0000000f" : void 0
185
+ },
186
+ "aria-label": "end chat with evo ai",
187
+ title: "end chat",
188
+ children: /* @__PURE__ */ jsx(EllipsisIcon, { color: vars.chatbot.window.headerText })
189
+ }
190
+ ),
191
+ menuOpen && /* @__PURE__ */ jsx("ul", { className: clsx(chatbotMenu), children: /* @__PURE__ */ jsx("li", { className: chatbotMenuItem, children: /* @__PURE__ */ jsxs(
192
+ "button",
117
193
  {
118
- xmlns: "http://www.w3.org/2000/svg",
119
- width: "20",
120
- height: "17",
121
- viewBox: "0 0 20 17",
122
- fill: "none",
194
+ type: "button",
195
+ onClick: () => {
196
+ setShowEndChatDialog(true);
197
+ setMenuOpen(false);
198
+ },
199
+ style: {
200
+ width: "100%",
201
+ display: "flex",
202
+ alignItems: "center",
203
+ gap: "12px"
204
+ },
123
205
  children: [
124
- /* @__PURE__ */ jsx(
125
- "path",
126
- {
127
- d: "M10.5277 2.78937C10.8911 2.78937 11.1852 3.08251 11.1853 3.44452C11.1852 3.80654 10.8911 4.10056 10.5277 4.10056H5.26386C4.5371 4.10064 3.94791 4.68761 3.94789 5.41175V10.6565C3.9479 11.3806 4.5371 11.9676 5.26386 11.9677H6.97488C7.12012 11.9678 7.23818 12.0854 7.23825 12.2301V15.6861L10.8932 12.0445C10.9424 11.9956 11.0092 11.9679 11.0786 11.9677H14.4765C15.2032 11.9676 15.7925 11.3806 15.7925 10.6565V9.27302C15.7925 8.91106 16.0868 8.61721 16.45 8.61697C16.8134 8.61699 17.1084 8.91093 17.1084 9.27302V10.6565C17.1084 12.1048 15.9301 13.2788 14.4765 13.2789H11.5149L8.16901 16.6135C7.33997 17.4393 5.92245 16.8542 5.92229 15.6861V13.2789H5.26386C3.81026 13.2788 2.63193 12.1048 2.63193 10.6565V5.41175C2.63194 3.96341 3.81027 2.78945 5.26386 2.78937H10.5277Z",
128
- fill: "#1E3860"
129
- }
130
- ),
131
- /* @__PURE__ */ jsx(
132
- "path",
206
+ /* @__PURE__ */ jsx("div", { className: clsx(button_bar), children: /* @__PURE__ */ jsxs(
207
+ "svg",
133
208
  {
134
- d: "M9.21265 0.166102C9.57579 0.166381 9.87012 0.460269 9.87018 0.822142C9.87004 1.18394 9.57574 1.47701 9.21265 1.47729H3.29036C2.20017 1.47729 1.31606 2.35831 1.31596 3.44452V6.72294C1.31577 7.08487 1.02083 7.37808 0.657534 7.37808C0.294361 7.37794 0.000196551 7.08478 0 6.72294V3.44452C9.80773e-05 1.63411 1.47333 0.166102 3.29036 0.166102H9.21265Z",
135
- fill: "#1E3860"
209
+ xmlns: "http://www.w3.org/2000/svg",
210
+ width: "16",
211
+ height: "16",
212
+ viewBox: "0 0 16 16",
213
+ fill: "none",
214
+ "aria-hidden": true,
215
+ children: [
216
+ /* @__PURE__ */ jsxs("g", { clipPath: "url(#clip0_92_1389)", children: [
217
+ /* @__PURE__ */ jsx(
218
+ "path",
219
+ {
220
+ d: "M11.1236 5.37374L8.60278 7.89457L11.1236 10.4167L10.4166 11.1237L7.89445 8.6029L5.37362 11.1237L4.66658 10.4167L7.18742 7.89457L4.66658 5.37374L5.37362 4.66671L7.89445 7.18754L10.4166 4.66671L11.1236 5.37374Z",
221
+ fill: vars.chatbot.window.headerText
222
+ }
223
+ ),
224
+ /* @__PURE__ */ jsx(
225
+ "path",
226
+ {
227
+ fillRule: "evenodd",
228
+ clipRule: "evenodd",
229
+ d: "M13.3333 0.833374C14.3458 0.833374 15.1666 1.65419 15.1666 2.66671V13.3334C15.1666 14.3459 14.3458 15.1667 13.3333 15.1667H2.66659C1.65406 15.1667 0.833252 14.3459 0.833252 13.3334V2.66671C0.833252 1.65419 1.65406 0.833374 2.66659 0.833374H13.3333ZM2.66659 1.83337C2.20635 1.83337 1.83325 2.20647 1.83325 2.66671V13.3334C1.83325 13.7936 2.20635 14.1667 2.66659 14.1667H13.3333C13.7935 14.1667 14.1666 13.7936 14.1666 13.3334V2.66671C14.1666 2.20647 13.7935 1.83337 13.3333 1.83337H2.66659Z",
230
+ fill: vars.chatbot.window.headerText
231
+ }
232
+ )
233
+ ] }),
234
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "clip0_92_1389", children: /* @__PURE__ */ jsx("rect", { width: "16", height: "16", fill: "white" }) }) })
235
+ ]
136
236
  }
137
- ),
138
- /* @__PURE__ */ jsx(
139
- "path",
140
- {
141
- d: "M15.7145 0.475824C15.9558 -0.158638 16.8779 -0.158578 17.1192 0.475824L17.6459 1.8611C17.7218 2.06058 17.8835 2.2175 18.0885 2.29132L19.511 2.80454C20.163 3.03936 20.163 3.93626 19.511 4.17107L18.0885 4.6843C17.8835 4.75812 17.7218 4.91504 17.6459 5.11452L17.1192 6.49979C16.8779 7.1342 15.9558 7.13426 15.7145 6.49979L15.1878 5.11452C15.1119 4.91508 14.9502 4.75811 14.7453 4.6843L13.3227 4.17107C12.6708 3.93622 12.6708 3.0394 13.3227 2.80454L14.7453 2.29132C14.9502 2.21751 15.1119 2.06054 15.1878 1.8611L15.7145 0.475824Z",
142
- fill: "#1E3860"
143
- }
144
- )
237
+ ) }),
238
+ /* @__PURE__ */ jsx("span", { children: "End Chat" })
145
239
  ]
146
240
  }
147
- ),
148
- /* @__PURE__ */ jsx("h2", { className: chat_title, children: "Ask Evo AI" })
149
- ]
150
- }
151
- ),
152
- /* @__PURE__ */ jsxs("div", { className: clsx(buttonss_section), children: [
153
- /* @__PURE__ */ jsx(
154
- "button",
155
- {
156
- disabled: messages.length === 0,
157
- onClick: () => {
158
- setMenuOpen(!menuOpen);
159
- },
160
- className: clsx(button_bar),
161
- style: {
162
- border: menuOpen ? `1px solid ${vars.chatbot.window.headerText}` : "none",
163
- cursor: "pointer",
164
- padding: 0,
165
- display: "flex",
166
- alignContent: "center",
167
- background: menuOpen ? "#0000000f" : void 0
168
- },
169
- children: /* @__PURE__ */ jsx(EllipsisIcon, {})
170
- }
171
- ),
172
- menuOpen && /* @__PURE__ */ jsx("ul", { className: clsx(chatbotMenu), children: /* @__PURE__ */ jsx("li", { className: chatbotMenuItem, children: /* @__PURE__ */ jsxs(
173
- "button",
174
- {
175
- type: "button",
176
- onClick: () => {
177
- setShowEndChatDialog(true);
178
- setMenuOpen(false);
179
- },
180
- style: {
181
- width: "100%",
182
- display: "flex",
183
- alignItems: "center",
184
- gap: "12px"
185
- },
186
- children: [
187
- /* @__PURE__ */ jsx("div", { className: clsx(button_bar), children: /* @__PURE__ */ jsxs(
188
- "svg",
241
+ ) }) }),
242
+ showEndChatDialog && /* @__PURE__ */ jsxs(Fragment, { children: [
243
+ /* @__PURE__ */ jsx(
244
+ "div",
189
245
  {
190
- xmlns: "http://www.w3.org/2000/svg",
191
- width: "16",
192
- height: "16",
193
- viewBox: "0 0 16 16",
194
- fill: "none",
195
- children: [
196
- /* @__PURE__ */ jsxs("g", { clipPath: "url(#clip0_92_1389)", children: [
246
+ style: {
247
+ background: "#00000080",
248
+ position: "fixed",
249
+ top: 0,
250
+ left: 0,
251
+ right: 0,
252
+ bottom: 0,
253
+ zIndex: 999
254
+ }
255
+ }
256
+ ),
257
+ /* @__PURE__ */ jsx("dialog", { open: showEndChatDialog, className: chatEndDialogOverlay, children: /* @__PURE__ */ jsxs("form", { method: "dialog", className: chatFinishDialog, children: [
258
+ /* @__PURE__ */ jsx("div", { className: clsx(button_bar, chatEndCircle), children: /* @__PURE__ */ jsxs(
259
+ "svg",
260
+ {
261
+ xmlns: "http://www.w3.org/2000/svg",
262
+ width: "24",
263
+ height: "24",
264
+ viewBox: "0 0 24 24",
265
+ fill: "none",
266
+ children: [
197
267
  /* @__PURE__ */ jsx(
198
268
  "path",
199
269
  {
200
- d: "M11.1236 5.37374L8.60278 7.89457L11.1236 10.4167L10.4166 11.1237L7.89445 8.6029L5.37362 11.1237L4.66658 10.4167L7.18742 7.89457L4.66658 5.37374L5.37362 4.66671L7.89445 7.18754L10.4166 4.66671L11.1236 5.37374Z",
201
- fill: "#1E3860"
270
+ d: "M12.7514 7.14531V15.3953H11.2514V7.14531H12.7514Z",
271
+ fill: "#D2272F"
272
+ }
273
+ ),
274
+ /* @__PURE__ */ jsx(
275
+ "path",
276
+ {
277
+ d: "M12.0014 16.8953C12.6227 16.8953 13.1264 17.399 13.1264 18.0203C13.1264 18.6416 12.6227 19.1453 12.0014 19.1453C11.3801 19.1453 10.8764 18.6416 10.8764 18.0203C10.8764 17.399 11.3801 16.8953 12.0014 16.8953Z",
278
+ fill: "#D2272F"
202
279
  }
203
280
  ),
204
281
  /* @__PURE__ */ jsx(
@@ -206,344 +283,337 @@ const ChatWindow = ({
206
283
  {
207
284
  fillRule: "evenodd",
208
285
  clipRule: "evenodd",
209
- d: "M13.3333 0.833374C14.3458 0.833374 15.1666 1.65419 15.1666 2.66671V13.3334C15.1666 14.3459 14.3458 15.1667 13.3333 15.1667H2.66659C1.65406 15.1667 0.833252 14.3459 0.833252 13.3334V2.66671C0.833252 1.65419 1.65406 0.833374 2.66659 0.833374H13.3333ZM2.66659 1.83337C2.20635 1.83337 1.83325 2.20647 1.83325 2.66671V13.3334C1.83325 13.7936 2.20635 14.1667 2.66659 14.1667H13.3333C13.7935 14.1667 14.1666 13.7936 14.1666 13.3334V2.66671C14.1666 2.20647 13.7935 1.83337 13.3333 1.83337H2.66659Z",
210
- fill: "#1E3860"
286
+ d: "M9.31805 3.51187L2.17215 17.8037C1.1748 19.7984 2.62529 22.1453 4.85543 22.1453H19.1472C21.3774 22.1453 22.8279 19.7984 21.8305 17.8037L14.6846 3.51188C13.579 1.30073 10.4236 1.30073 9.31805 3.51187ZM3.51379 18.4745L10.6597 4.18269C11.2125 3.07712 12.7902 3.07712 13.343 4.1827L20.4889 18.4745C20.9875 19.4718 20.2623 20.6453 19.1472 20.6453H4.85543C3.74036 20.6453 3.01512 19.4718 3.51379 18.4745Z",
287
+ fill: "#D2272F"
211
288
  }
212
289
  )
213
- ] }),
214
- /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "clip0_92_1389", children: /* @__PURE__ */ jsx("rect", { width: "16", height: "16", fill: "white" }) }) })
215
- ]
290
+ ]
291
+ }
292
+ ) }),
293
+ /* @__PURE__ */ jsxs("p", { children: [
294
+ "Are you sure you want to end",
295
+ /* @__PURE__ */ jsx("br", {}),
296
+ " this chat?"
297
+ ] }),
298
+ /* @__PURE__ */ jsxs(
299
+ "div",
300
+ {
301
+ style: {
302
+ display: "flex",
303
+ gap: "1rem",
304
+ marginTop: "1rem",
305
+ flexDirection: "column",
306
+ marginBottom: 24,
307
+ width: "100%"
308
+ },
309
+ children: [
310
+ /* @__PURE__ */ jsx(
311
+ "button",
312
+ {
313
+ className: endChatButtonStyle,
314
+ type: "submit",
315
+ onClick: () => {
316
+ endChat();
317
+ setChatStatus("ending");
318
+ setShowEndChatDialog(false);
319
+ },
320
+ children: "Yes, End Chat"
321
+ }
322
+ ),
323
+ /* @__PURE__ */ jsx(
324
+ "button",
325
+ {
326
+ className: clsx(endChatButtonStyle, noAnswerButton),
327
+ type: "button",
328
+ onClick: () => {
329
+ setShowEndChatDialog(false);
330
+ },
331
+ children: "No, Go Back"
332
+ }
333
+ )
334
+ ]
335
+ }
336
+ ),
337
+ " "
338
+ ] }) })
339
+ ] }),
340
+ chatStatus == "ending" && /* @__PURE__ */ jsxs("div", { children: [
341
+ /* @__PURE__ */ jsx(
342
+ "div",
343
+ {
344
+ style: {
345
+ background: "#00000080",
346
+ position: "fixed",
347
+ top: 0,
348
+ left: 0,
349
+ right: 0,
350
+ bottom: 0,
351
+ zIndex: 999
352
+ }
216
353
  }
217
- ) }),
218
- /* @__PURE__ */ jsx("span", { children: "End Chat" })
219
- ]
220
- }
221
- ) }) }),
222
- showEndChatDialog && /* @__PURE__ */ jsxs(Fragment, { children: [
223
- /* @__PURE__ */ jsx(
224
- "div",
225
- {
226
- style: {
227
- background: "#00000080",
228
- position: "fixed",
229
- top: 0,
230
- left: 0,
231
- right: 0,
232
- bottom: 0,
233
- zIndex: 999
234
- }
235
- }
236
- ),
237
- /* @__PURE__ */ jsx("dialog", { open: showEndChatDialog, className: chatEndDialogOverlay, children: /* @__PURE__ */ jsxs("form", { method: "dialog", className: chatFinishDialog, children: [
238
- /* @__PURE__ */ jsx("div", { className: clsx(button_bar, chatEndCircle), children: /* @__PURE__ */ jsxs(
239
- "svg",
240
- {
241
- xmlns: "http://www.w3.org/2000/svg",
242
- width: "24",
243
- height: "24",
244
- viewBox: "0 0 24 24",
245
- fill: "none",
246
- children: [
247
- /* @__PURE__ */ jsx(
248
- "path",
249
- {
250
- d: "M12.7514 7.14531V15.3953H11.2514V7.14531H12.7514Z",
251
- fill: "#D2272F"
252
- }
253
- ),
254
- /* @__PURE__ */ jsx(
255
- "path",
256
- {
257
- d: "M12.0014 16.8953C12.6227 16.8953 13.1264 17.399 13.1264 18.0203C13.1264 18.6416 12.6227 19.1453 12.0014 19.1453C11.3801 19.1453 10.8764 18.6416 10.8764 18.0203C10.8764 17.399 11.3801 16.8953 12.0014 16.8953Z",
258
- fill: "#D2272F"
259
- }
260
- ),
261
- /* @__PURE__ */ jsx(
262
- "path",
354
+ ),
355
+ /* @__PURE__ */ jsx(
356
+ "div",
357
+ {
358
+ style: {
359
+ position: "fixed",
360
+ top: 0,
361
+ left: 0,
362
+ right: 0,
363
+ bottom: 0,
364
+ zIndex: 1e3,
365
+ display: "flex",
366
+ justifyContent: "center",
367
+ alignItems: "center"
368
+ },
369
+ children: /* @__PURE__ */ jsx(
370
+ LoadingIndicator,
263
371
  {
264
- fillRule: "evenodd",
265
- clipRule: "evenodd",
266
- d: "M9.31805 3.51187L2.17215 17.8037C1.1748 19.7984 2.62529 22.1453 4.85543 22.1453H19.1472C21.3774 22.1453 22.8279 19.7984 21.8305 17.8037L14.6846 3.51188C13.579 1.30073 10.4236 1.30073 9.31805 3.51187ZM3.51379 18.4745L10.6597 4.18269C11.2125 3.07712 12.7902 3.07712 13.343 4.1827L20.4889 18.4745C20.9875 19.4718 20.2623 20.6453 19.1472 20.6453H4.85543C3.74036 20.6453 3.01512 19.4718 3.51379 18.4745Z",
267
- fill: "#D2272F"
372
+ variant: "primary",
373
+ style: { borderTopColor: vars.chatbot.bubble.glowShadow }
268
374
  }
269
375
  )
270
- ]
271
- }
272
- ) }),
273
- /* @__PURE__ */ jsxs("p", { children: [
274
- "Are you sure you want to end",
275
- /* @__PURE__ */ jsx("br", {}),
276
- " this chat?"
376
+ }
377
+ )
277
378
  ] }),
278
- /* @__PURE__ */ jsxs(
279
- "div",
379
+ /* @__PURE__ */ jsx(
380
+ ThankYouMessage,
280
381
  {
281
- style: {
282
- display: "flex",
283
- gap: "1rem",
284
- marginTop: "1rem",
285
- flexDirection: "column",
286
- marginBottom: 24,
287
- width: "100%"
382
+ showEndChatDialog: showThankyouMessage,
383
+ onStart: onStartChat,
384
+ onClose: onCancelEndChat
385
+ }
386
+ ),
387
+ onClose && /* @__PURE__ */ jsxs(
388
+ "button",
389
+ {
390
+ onClick: () => {
391
+ onClose();
392
+ setMenuOpen(false);
288
393
  },
394
+ className: clsx(button_reset, button_bar),
395
+ "aria-label": "Close chat window",
396
+ title: "Close",
289
397
  children: [
290
398
  /* @__PURE__ */ jsx(
291
- "button",
399
+ "svg",
292
400
  {
293
- className: endChatButtonStyle,
294
- type: "submit",
295
- onClick: () => {
296
- endChat();
297
- displayThankYouScreen();
298
- setShowEndChatDialog(false);
299
- },
300
- children: "Yes, End Chat"
401
+ xmlns: "http://www.w3.org/2000/svg",
402
+ width: "24",
403
+ height: "24",
404
+ viewBox: "0 0 24 24",
405
+ fill: "none",
406
+ "aria-hidden": "true",
407
+ children: /* @__PURE__ */ jsx(
408
+ "path",
409
+ {
410
+ className: arrowFill,
411
+ d: "M2.46875 7.76574L11.9991 17.2961L21.5294 7.76574L20.4687 6.70508L11.9991 15.1749L3.52941 6.70508L2.46875 7.76574Z"
412
+ }
413
+ )
301
414
  }
302
415
  ),
303
416
  /* @__PURE__ */ jsx(
304
- "button",
417
+ "svg",
305
418
  {
306
- className: clsx(endChatButtonStyle, noAnswerButton),
307
- type: "button",
308
- onClick: () => {
309
- setShowEndChatDialog(false);
310
- },
311
- children: "No, Go Back"
419
+ width: "15",
420
+ height: "15",
421
+ viewBox: "0 0 15 15",
422
+ fill: "none",
423
+ xmlns: "http://www.w3.org/2000/svg",
424
+ "aria-hidden": "true",
425
+ children: /* @__PURE__ */ jsx(
426
+ "path",
427
+ {
428
+ d: "M13.2187 0L14.0142 0.795495L7.803 7.0065L14.0142 13.2187L13.2187 14.0142L7.0065 7.803L0.795495 14.0142L0 13.2187L6.21112 7.0065L0 0.795495L0.795495 0L7.0065 6.21112L13.2187 0Z",
429
+ fill: vars.chatbot.window.headerText
430
+ }
431
+ )
312
432
  }
313
433
  )
314
434
  ]
315
435
  }
316
- ),
317
- " "
318
- ] }) })
436
+ )
437
+ ] })
319
438
  ] }),
320
- /* @__PURE__ */ jsx(
321
- ThankYouMessage,
439
+ mounted && !state.online ? /* @__PURE__ */ jsx("div", { className: clsx(chatNetworkStatus), children: /* @__PURE__ */ jsxs(
440
+ "div",
322
441
  {
323
- showEndChatDialog: showThankyouMessage,
324
- onStart: onStartChat,
325
- onClose: onCancelEndChat
326
- }
327
- ),
328
- onClose && /* @__PURE__ */ jsxs(
329
- "button",
330
- {
331
- onClick: () => {
332
- onClose();
333
- setMenuOpen(false);
442
+ style: {
443
+ color: "#d32f2f",
444
+ textAlign: "center",
445
+ padding: "8px 0",
446
+ fontWeight: 500
334
447
  },
335
- className: clsx(button_reset, button_bar),
336
- "aria-label": "Close chat window",
337
- title: "Close",
338
448
  children: [
339
449
  /* @__PURE__ */ jsx(
340
- "svg",
450
+ "span",
341
451
  {
342
- xmlns: "http://www.w3.org/2000/svg",
343
- width: "24",
344
- height: "24",
345
- viewBox: "0 0 24 24",
346
- fill: "none",
347
- children: /* @__PURE__ */ jsx(
348
- "path",
349
- {
350
- className: arrowFill,
351
- d: "M2.46875 7.76574L11.9991 17.2961L21.5294 7.76574L20.4687 6.70508L11.9991 15.1749L3.52941 6.70508L2.46875 7.76574Z",
352
- color: vars.chatbot.window.headerText
353
- }
354
- )
452
+ role: "img",
453
+ "aria-label": "disconnected",
454
+ style: { marginRight: 6 },
455
+ children: "⚠️"
355
456
  }
356
457
  ),
357
- /* @__PURE__ */ jsx(
358
- "svg",
359
- {
360
- width: "15",
361
- height: "15",
362
- viewBox: "0 0 15 15",
363
- fill: "none",
364
- xmlns: "http://www.w3.org/2000/svg",
365
- children: /* @__PURE__ */ jsx(
366
- "path",
367
- {
368
- d: "M13.2187 0L14.0142 0.795495L7.803 7.0065L14.0142 13.2187L13.2187 14.0142L7.0065 7.803L0.795495 14.0142L0 13.2187L6.21112 7.0065L0 0.795495L0.795495 0L7.0065 6.21112L13.2187 0Z",
369
- fill: vars.chatbot.window.headerText
370
- }
371
- )
372
- }
373
- )
458
+ "You are currently disconnected. Please check your connection."
374
459
  ]
375
460
  }
376
- )
377
- ] })
378
- ] }),
379
- mounted && !state.online ? /* @__PURE__ */ jsx("div", { className: clsx(chatNetworkStatus), children: /* @__PURE__ */ jsxs(
380
- "div",
381
- {
382
- style: {
383
- color: "#d32f2f",
384
- textAlign: "center",
385
- padding: "8px 0",
386
- fontWeight: 500
387
- },
388
- children: [
389
- /* @__PURE__ */ jsx(
390
- "span",
391
- {
392
- role: "img",
393
- "aria-label": "disconnected",
394
- style: { marginRight: 6 },
395
- children: "⚠️"
396
- }
397
- ),
398
- "You are currently disconnected. Please check your connection."
399
- ]
400
- }
401
- ) }) : null,
402
- /* @__PURE__ */ jsxs("div", { className: clsx(messagesContainerStyle), children: [
403
- (status === "idle" && messages.length == 0 || messages.length == 0) && /* @__PURE__ */ jsx(
404
- "div",
405
- {
406
- className: clsx(),
407
- style: {
408
- textAlign: "left",
409
- alignSelf: "flex-start",
410
- color: "#1e3860",
411
- borderRadius: 16,
412
- padding: "8px 8px",
413
- maxWidth: "80%",
414
- marginBottom: 2
415
- },
416
- children: /* @__PURE__ */ jsx(
461
+ ) }) : null,
462
+ /* @__PURE__ */ jsxs("div", { className: clsx(messagesContainerStyle), children: [
463
+ (status === "idle" && messages.length == 0 || messages.length == 0) && /* @__PURE__ */ jsx(
417
464
  "div",
418
465
  {
466
+ className: clsx(),
419
467
  style: {
420
- fontSize: 14,
421
- display: "flex",
422
- flexDirection: "column",
423
- gap: 4
468
+ textAlign: "left",
469
+ alignSelf: "flex-start",
470
+ color: "#1e3860",
471
+ borderRadius: 16,
472
+ padding: "8px 8px",
473
+ maxWidth: "80%",
474
+ marginBottom: 2
424
475
  },
425
- children: /* @__PURE__ */ jsx("p", { className: shimmerText, children: "Chat connecting..." })
476
+ children: /* @__PURE__ */ jsx(
477
+ "div",
478
+ {
479
+ style: {
480
+ fontSize: 14,
481
+ display: "flex",
482
+ flexDirection: "column",
483
+ gap: 16
484
+ },
485
+ children: /* @__PURE__ */ jsx("p", { className: shimmerText, children: "Chat connecting..." })
486
+ }
487
+ )
426
488
  }
427
- )
428
- }
429
- ),
430
- messages?.map((msg) => {
431
- if (!hasOpenedOnce) {
432
- return null;
433
- }
434
- return /* @__PURE__ */ jsx(
435
- ChatbotMessage,
436
- {
437
- msg,
438
- onSend,
439
- showAvatar,
440
- showName,
441
- virtualAgent,
442
- onCancelEndChat,
443
- onEndChat: () => {
444
- endChat();
445
- onCloseAfterThankYou();
446
- },
447
- inputRef
448
- },
449
- msg?.$index
450
- );
451
- }),
452
- showReconnect && /* @__PURE__ */ jsx(
453
- "button",
454
- {
455
- style: { margin: "12px auto", display: "block" },
456
- onClick: () => {
457
- },
458
- children: "Reconnect Chat"
459
- }
460
- ),
461
- /* @__PURE__ */ jsx("div", { ref: messagesEndRef })
462
- ] }),
463
- /* @__PURE__ */ jsx("div", { style: { padding: "16px 16px 24px 16px" }, children: /* @__PURE__ */ jsxs("form", { onSubmit: handleSend, className: clsx(gradientFocus), children: [
464
- /* @__PURE__ */ jsx(
465
- "div",
466
- {
467
- className: clsx(focused ? focusAnimation : ""),
468
- style: {
469
- position: "absolute",
470
- // border: "1px solid red",
471
- left: "10%",
472
- width: "80%",
473
- height: "40px",
474
- zIndex: "-1"
475
- }
476
- }
477
- ),
478
- /* @__PURE__ */ jsxs(
479
- "div",
480
- {
481
- style: {
482
- display: "flex",
483
- padding: "12px 16px",
484
- background: isBlockedInput || inputDisabled || status !== "connected" || messages.length == 0 || escalationDeflected ? "light-dark(rgba(239, 239, 239, 0.3), rgba(59, 59, 59, 0.3))" : "#ffffff",
485
- borderRadius: 12
486
- },
487
- children: [
488
- /* @__PURE__ */ jsx(
489
- "textarea",
489
+ ),
490
+ messages?.map((msg) => {
491
+ if (!hasOpenedOnce) {
492
+ return null;
493
+ }
494
+ return /* @__PURE__ */ jsx(
495
+ ChatbotMessage,
490
496
  {
491
- ref: inputRef,
492
- value: input,
493
- onChange: (e) => setInput(e.target.value),
494
- onKeyDown: (e) => {
495
- if (hasEscalated) {
496
- previewTyping(e.target?.value);
497
- }
498
- if (e.key === "Enter" && !e.shiftKey) {
499
- handleSend(e);
500
- }
497
+ msg,
498
+ onSend,
499
+ showAvatar,
500
+ showName,
501
+ virtualAgent,
502
+ onCancelEndChat,
503
+ onEndChat: () => {
504
+ endChat();
505
+ onCloseAfterThankYou();
501
506
  },
502
- onFocus: () => setFocused(true),
503
- onBlur: () => setFocused(false),
504
- placeholder: "Ask anything...",
505
- className: clsx(inputStyle, autoResize),
506
- autoFocus: true,
507
- disabled: isBlockedInput || inputDisabled || status !== "connected" || messages.length == 0 || escalationDeflected,
508
- rows: 1
509
- }
510
- ),
507
+ inputRef
508
+ },
509
+ msg?.$index
510
+ );
511
+ }),
512
+ showReconnect && /* @__PURE__ */ jsx(
513
+ "button",
514
+ {
515
+ style: { margin: "12px auto", display: "block" },
516
+ onClick: () => {
517
+ },
518
+ children: "Reconnect Chat"
519
+ }
520
+ ),
521
+ /* @__PURE__ */ jsx("div", { ref: messagesEndRef })
522
+ ] }),
523
+ /* @__PURE__ */ jsxs("div", { style: { padding: "16px 16px 24px 16px" }, children: [
524
+ /* @__PURE__ */ jsxs("form", { onSubmit: handleSend, className: clsx(gradientFocus), children: [
511
525
  /* @__PURE__ */ jsx(
512
- "button",
526
+ "div",
513
527
  {
514
528
  className: clsx(
515
- sendButtonStyle,
516
- input.trim().length > 0 && "active"
529
+ focused && !inputDisabled && !isBlockedInput ? focusAnimation : ""
517
530
  ),
518
- type: "submit",
519
- title: "Send message",
520
- disabled: isBlockedInput || inputDisabled || status !== "connected" || !input.trim() || messages.length == 0 || escalationDeflected,
521
- children: /* @__PURE__ */ jsx(
522
- "svg",
523
- {
524
- xmlns: "http://www.w3.org/2000/svg",
525
- width: "20",
526
- height: "20",
527
- viewBox: "0 0 16 16",
528
- fill: "none",
529
- children: /* @__PURE__ */ jsx(
530
- "path",
531
- {
532
- fillRule: "evenodd",
533
- clipRule: "evenodd",
534
- d: "M0.0030533 5.42479C0.0273417 5.1795 0.193529 4.9714 0.427369 4.89345L15.0114 0.0320896C15.236 -0.0427712 15.4836 0.0156801 15.651 0.183075C15.8184 0.35047 15.8769 0.598075 15.802 0.822659L10.9407 15.4067C10.8627 15.6406 10.6546 15.8068 10.4093 15.8311C10.164 15.8553 9.92737 15.7332 9.80508 15.5192L6.35411 9.47999L0.314925 6.02903C0.100912 5.90673 -0.0212351 5.67008 0.0030533 5.42479ZM7.59169 9.1263L9.64202 12.7144C9.85645 13.0896 10.4138 13.0344 10.5505 12.6244L13.9046 2.56191C14.0349 2.17103 13.6631 1.79916 13.2722 1.92946L3.20969 5.28362C2.79967 5.4203 2.74448 5.97766 3.11973 6.19209L6.70781 8.24242L9.90579 5.04443C10.1499 4.80036 10.5456 4.80036 10.7897 5.04443C11.0337 5.28851 11.0337 5.68424 10.7897 5.92832L7.59169 9.1263Z",
535
- fill: "#435164"
536
- }
537
- )
538
- }
539
- )
531
+ style: {
532
+ position: "absolute",
533
+ left: "10%",
534
+ width: "80%",
535
+ height: "40px",
536
+ zIndex: "-1"
537
+ }
538
+ }
539
+ ),
540
+ /* @__PURE__ */ jsxs(
541
+ "div",
542
+ {
543
+ className: formTextButton,
544
+ style: {
545
+ display: "flex",
546
+ padding: "12px 16px",
547
+ background: isBlockedInput || inputDisabled || status !== "connected" || messages.length == 0 || escalationDeflected ? "light-dark(rgba(239, 239, 239, 0.3), rgba(59, 59, 59, 0.3))" : "#ffffff",
548
+ borderRadius: 12
549
+ },
550
+ children: [
551
+ /* @__PURE__ */ jsx(
552
+ "textarea",
553
+ {
554
+ ref: inputRef,
555
+ value: input,
556
+ onChange: (e) => setInput(e.target.value),
557
+ onKeyDown: (e) => {
558
+ if (hasEscalated) {
559
+ previewTyping(e.target?.value);
560
+ }
561
+ if (e.key === "Enter" && !e.shiftKey) {
562
+ handleSend(e);
563
+ }
564
+ },
565
+ onFocus: () => setFocused(() => true),
566
+ onBlur: () => setFocused(() => false),
567
+ placeholder: "Ask anything...",
568
+ "aria-label": "Ask anything...",
569
+ className: clsx(inputStyle, autoResize),
570
+ autoFocus: true,
571
+ disabled: isBlockedInput || inputDisabled || status !== "connected" || messages.length == 0 || escalationDeflected,
572
+ rows: 1
573
+ }
574
+ ),
575
+ /* @__PURE__ */ jsx(
576
+ "button",
577
+ {
578
+ className: clsx(
579
+ sendButtonStyle,
580
+ input.trim().length > 0 && "active"
581
+ ),
582
+ type: "submit",
583
+ title: "Send message",
584
+ "aria-label": "Send message",
585
+ disabled: isBlockedInput || inputDisabled || status !== "connected" || !input.trim() || messages.length == 0 || escalationDeflected,
586
+ children: /* @__PURE__ */ jsx(
587
+ "svg",
588
+ {
589
+ xmlns: "http://www.w3.org/2000/svg",
590
+ width: "20",
591
+ height: "20",
592
+ viewBox: "0 0 16 16",
593
+ fill: "none",
594
+ "aria-hidden": true,
595
+ children: /* @__PURE__ */ jsx(
596
+ "path",
597
+ {
598
+ fillRule: "evenodd",
599
+ clipRule: "evenodd",
600
+ d: "M0.0030533 5.42479C0.0273417 5.1795 0.193529 4.9714 0.427369 4.89345L15.0114 0.0320896C15.236 -0.0427712 15.4836 0.0156801 15.651 0.183075C15.8184 0.35047 15.8769 0.598075 15.802 0.822659L10.9407 15.4067C10.8627 15.6406 10.6546 15.8068 10.4093 15.8311C10.164 15.8553 9.92737 15.7332 9.80508 15.5192L6.35411 9.47999L0.314925 6.02903C0.100912 5.90673 -0.0212351 5.67008 0.0030533 5.42479ZM7.59169 9.1263L9.64202 12.7144C9.85645 13.0896 10.4138 13.0344 10.5505 12.6244L13.9046 2.56191C14.0349 2.17103 13.6631 1.79916 13.2722 1.92946L3.20969 5.28362C2.79967 5.4203 2.74448 5.97766 3.11973 6.19209L6.70781 8.24242L9.90579 5.04443C10.1499 4.80036 10.5456 4.80036 10.7897 5.04443C11.0337 5.28851 11.0337 5.68424 10.7897 5.92832L7.59169 9.1263Z",
601
+ fill: "#435164"
602
+ }
603
+ )
604
+ }
605
+ )
606
+ }
607
+ )
608
+ ]
540
609
  }
541
610
  )
542
- ]
543
- }
544
- )
545
- ] }) })
546
- ] });
611
+ ] }),
612
+ /* @__PURE__ */ jsx("p", { className: chatAiDisclaimer, children: "Evo is AI and can make mistakes. Verify important details." })
613
+ ] })
614
+ ]
615
+ }
616
+ );
547
617
  };
548
618
  export {
549
619
  ChatWindow