@copart/ops-tool-kit 1.10.20-alpha.7 → 1.10.20-alpha.9

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.
@@ -33,7 +33,7 @@ var ReactDOM__namespace = /*#__PURE__*/_interopNamespace(ReactDOM);
33
33
  var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
34
34
 
35
35
  const name$r = "@copart/ops-tool-kit";
36
- const version$5 = "1.10.20-alpha.7";
36
+ const version$5 = "1.10.20-alpha.9";
37
37
  const main$1 = "dist/ops-tool-kit.js";
38
38
  const style = "dist/ops-tool-kit.css";
39
39
  const files = [
@@ -38080,7 +38080,7 @@ var GoHome = function GoHome(props) {
38080
38080
  }, props.reason));
38081
38081
  };
38082
38082
 
38083
- var css_248z$2 = ".utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper {\r\n position: absolute;\r\n /* right: 50px;\r\n bottom: 30px; */\r\n z-index: 9999;\r\n height: auto;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatIcon {\r\n position: absolute;\r\n right: 0;\r\n bottom: 0px;\r\n background: #1d5ab9;\r\n border-radius: 50%;\r\n width: 60px;\r\n height: 60px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n border: 5px solid #fff;\r\n box-shadow: 0 0px 6px #c1c1c1;\r\n cursor: pointer;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n position: absolute;\r\n /* right: 0;\r\n bottom: 68px; */\r\n box-shadow: 0 0px 6px #c1c1c1;\r\n height: 600px;\r\n width: 500px;\r\n border-radius: 8px;\r\n overflow: hidden;\r\n display: flex;\r\n flex-direction: column;\r\n background: #fff;\r\n}\r\n\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--spinner{\r\n position: absolute;\r\n background: rgba(0, 0, 0, 0.5);\r\n top: 0;\r\n bottom: 0;\r\n left: 0;\r\n right: 0;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowHeader {\r\n background: #1d5ab9;\r\n display: flex;\r\n justify-content: space-between;\r\n padding: 15px;\r\n align-items: center;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowHeader .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--title {\r\n font-size: 16px;\r\n font-weight: 600;\r\n line-height: 22px;\r\n color: #fff;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody {\r\n flex: 1;\r\n padding: 12px 36px;\r\n overflow: auto;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatVisible {\r\n padding-top: 56px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatContainer {\r\n padding: 8px 0;\r\n border-bottom: 1px solid #d1d1d1;\r\n display: flex;\r\n justify-content: end;\r\n align-items: center;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatVisible .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatContainer {\r\n position: absolute;\r\n width: calc(100% - 72px);\r\n top: 57px;\r\n background: #fff;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messagesContainer {\r\n width: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n grid-gap: 16px;\r\n gap: 16px;\r\n cursor: auto;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatContainer .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatButton {\r\n display: flex;\r\n align-items: center;\r\n grid-gap: 6px;\r\n gap: 6px;\r\n cursor: pointer;\r\n border: 1px solid #d1d1d1;\r\n border-radius: 4px;\r\n padding: 6px 12px;\r\n font-weight: 600;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--message {\r\n display: flex;\r\n align-items: flex-start;\r\n grid-gap: 10px;\r\n gap: 10px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--message.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--user {\r\n justify-content: flex-end;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--message.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--welcomeQuestion {\r\n margin-top: 5px;\r\n margin-left: 36px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestions {\r\n display: flex;\r\n flex-direction: column;\r\n grid-gap: 12px;\r\n gap: 12px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestions .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestionWrapper {\r\n display: flex;\r\n flex-direction: row-reverse;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestions .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestionContainer {\r\n max-width: 95%;\r\n word-break: break-all;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestions .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestion {\r\n border: 1px solid #3261bd;\r\n border-radius: 16px;\r\n padding: 6px 8px;\r\n font-size: 14px;\r\n color: #3261bd;\r\n cursor: pointer;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--agentIcon {\r\n width: 26px;\r\n border-radius: 50%;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble {\r\n background-color: #f5f5f5;\r\n border-radius: 0px 12px 12px 12px;\r\n padding: 10px 15px;\r\n max-width: 85%;\r\n font-size: 14px;\r\n line-height: 1.5;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--error {\r\n border: 1px solid #f1bbbc;\r\n background: #fdf6f6;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--message.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--user .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble {\r\n background: #3261bd;\r\n color: #fff;\r\n border-radius: 12px 0px 12px 12px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--feedbackContainer {\r\n display: flex;\r\n grid-gap: 8px;\r\n gap: 8px;\r\n margin-top: 10px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble p {\r\n margin: 0;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble p a {\r\n color: #1e54ad;\r\n text-decoration: underline;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble p ol,\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble p ul {\r\n padding-left: 15px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowFooter {\r\n border-top: 1px solid #d1d1d1;\r\n padding: 16px 24px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer {\r\n display: flex;\r\n align-items: center;\r\n border: 1px solid #ddd;\r\n border-radius: 12px;\r\n padding: 10px 15px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--disabled {\r\n background-color: #fafafa;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer input {\r\n border: none;\r\n outline: none;\r\n flex-grow: 1;\r\n font-size: 14px !important;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer input:disabled::-webkit-input-placeholder {\r\n color: #757575;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer input:disabled::-moz-placeholder {\r\n color: #757575;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer input:disabled::-ms-input-placeholder {\r\n color: #757575;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer input:disabled::placeholder {\r\n color: #757575;\r\n}\r\n\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatbotLoader {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding: 10px;\r\n width: 75px;\r\n background-color: #f5f5f5;\r\n border-radius: 0px 12px 12px 12px;\r\n}\r\n\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatbotLoader .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--dot {\r\n width: 8px;\r\n height: 8px;\r\n margin: 0 3px;\r\n background-color: #3261bd;\r\n border-radius: 50%;\r\n display: inline-block;\r\n -webkit-animation: utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--bounce 1.2s infinite ease-in-out both;\r\n animation: utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--bounce 1.2s infinite ease-in-out both;\r\n}\r\n\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatbotLoader .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--dot:nth-child(1) {\r\n -webkit-animation-delay: -0.32s;\r\n animation-delay: -0.32s;\r\n}\r\n\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatbotLoader .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--dot:nth-child(2) {\r\n -webkit-animation-delay: -0.16s;\r\n animation-delay: -0.16s;\r\n}\r\n\r\n@-webkit-keyframes utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--bounce {\r\n 0%,\r\n 80%,\r\n 100% {\r\n -webkit-transform: scale(0);\r\n transform: scale(0);\r\n }\r\n 40% {\r\n -webkit-transform: scale(1);\r\n transform: scale(1);\r\n }\r\n}\r\n\r\n@keyframes utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--bounce {\r\n 0%,\r\n 80%,\r\n 100% {\r\n -webkit-transform: scale(0);\r\n transform: scale(0);\r\n }\r\n 40% {\r\n -webkit-transform: scale(1);\r\n transform: scale(1);\r\n }\r\n}\r\n\r\n@media (max-width: 575px) {\r\n /* .mihelpAgentWrapper {\r\n right: 20px;\r\n bottom: 100px;\r\n } */\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--iphoneChrome {\r\n bottom: 125px;\r\n }\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 450px;\r\n }\r\n}\r\n\r\n@media (max-width: 475px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 400px;\r\n }\r\n}\r\n\r\n@media (max-width: 425px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 350px;\r\n }\r\n}\r\n\r\n@media (max-width: 375px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 325px;\r\n }\r\n}\r\n\r\n@media (max-width: 350px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 300px;\r\n }\r\n}\r\n\r\n@media (max-width: 325px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 275px;\r\n }\r\n}\r\n";
38083
+ var css_248z$2 = ".utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper {\r\n position: absolute;\r\n /* right: 50px;\r\n bottom: 30px; */\r\n z-index: 9999;\r\n height: auto;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatIcon {\r\n position: absolute;\r\n right: 0;\r\n bottom: 0px;\r\n background: #1d5ab9;\r\n border-radius: 50%;\r\n width: 60px;\r\n height: 60px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n border: 5px solid #fff;\r\n box-shadow: 0 0px 6px #c1c1c1;\r\n cursor: pointer;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n position: absolute;\r\n /* right: 0;\r\n bottom: 68px; */\r\n box-shadow: 0 0px 6px #c1c1c1;\r\n height: 600px;\r\n width: 500px;\r\n border-radius: 8px;\r\n overflow: hidden;\r\n display: flex;\r\n flex-direction: column;\r\n background: #fff;\r\n}\r\n\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--spinner{\r\n position: absolute;\r\n background: rgba(0, 0, 0, 0.5);\r\n top: 0;\r\n bottom: 0;\r\n left: 0;\r\n right: 0;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n cursor: auto;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowHeader {\r\n background: #1d5ab9;\r\n display: flex;\r\n justify-content: space-between;\r\n padding: 15px;\r\n align-items: center;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowHeader .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--title {\r\n font-size: 16px;\r\n font-weight: 600;\r\n line-height: 22px;\r\n color: #fff;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody {\r\n flex: 1;\r\n padding: 12px 36px;\r\n overflow: auto;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatVisible {\r\n padding-top: 56px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatContainer {\r\n padding: 8px 0;\r\n border-bottom: 1px solid #d1d1d1;\r\n display: flex;\r\n justify-content: end;\r\n align-items: center;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatVisible .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatContainer {\r\n position: absolute;\r\n width: calc(100% - 72px);\r\n top: 57px;\r\n background: #fff;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messagesContainer {\r\n width: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n grid-gap: 16px;\r\n gap: 16px;\r\n cursor: auto;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatContainer .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatButton {\r\n display: flex;\r\n align-items: center;\r\n grid-gap: 6px;\r\n gap: 6px;\r\n cursor: pointer;\r\n border: 1px solid #d1d1d1;\r\n border-radius: 4px;\r\n padding: 6px 12px;\r\n font-weight: 600;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--message {\r\n display: flex;\r\n align-items: flex-start;\r\n grid-gap: 10px;\r\n gap: 10px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--message.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--user {\r\n justify-content: flex-end;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--message.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--welcomeQuestion {\r\n margin-top: 5px;\r\n margin-left: 36px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestions {\r\n display: flex;\r\n flex-direction: column;\r\n grid-gap: 12px;\r\n gap: 12px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestions .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestionWrapper {\r\n display: flex;\r\n flex-direction: row-reverse;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestions .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestionContainer {\r\n max-width: 95%;\r\n word-break: break-all;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestions .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestion {\r\n border: 1px solid #3261bd;\r\n border-radius: 16px;\r\n padding: 6px 8px;\r\n font-size: 14px;\r\n color: #3261bd;\r\n cursor: pointer;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--agentIcon {\r\n width: 26px;\r\n border-radius: 50%;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble {\r\n background-color: #f5f5f5;\r\n border-radius: 0px 12px 12px 12px;\r\n padding: 10px 15px;\r\n max-width: 85%;\r\n font-size: 14px;\r\n line-height: 1.5;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--error {\r\n border: 1px solid #f1bbbc;\r\n background: #fdf6f6;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--message.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--user .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble {\r\n background: #3261bd;\r\n color: #fff;\r\n border-radius: 12px 0px 12px 12px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--feedbackContainer {\r\n display: flex;\r\n grid-gap: 8px;\r\n gap: 8px;\r\n margin-top: 10px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--feedbackContainer i {\r\n cursor: pointer;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble p {\r\n margin: 0;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble p a {\r\n color: #1e54ad;\r\n text-decoration: underline;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble p ol,\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble p ul {\r\n padding-left: 15px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowFooter {\r\n border-top: 1px solid #d1d1d1;\r\n padding: 16px 24px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer {\r\n display: flex;\r\n align-items: center;\r\n border: 1px solid #ddd;\r\n border-radius: 12px;\r\n padding: 10px 15px;\r\n cursor: auto;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--disabled {\r\n background-color: #fafafa;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer input {\r\n border: none;\r\n outline: none;\r\n flex-grow: 1;\r\n font-size: 14px !important;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer input:disabled::-webkit-input-placeholder {\r\n color: #757575;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer input:disabled::-moz-placeholder {\r\n color: #757575;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer input:disabled::-ms-input-placeholder {\r\n color: #757575;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer input:disabled::placeholder {\r\n color: #757575;\r\n}\r\n\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatbotLoader {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding: 10px;\r\n width: 75px;\r\n background-color: #f5f5f5;\r\n border-radius: 0px 12px 12px 12px;\r\n}\r\n\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatbotLoader .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--dot {\r\n width: 8px;\r\n height: 8px;\r\n margin: 0 3px;\r\n background-color: #3261bd;\r\n border-radius: 50%;\r\n display: inline-block;\r\n -webkit-animation: utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--bounce 1.2s infinite ease-in-out both;\r\n animation: utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--bounce 1.2s infinite ease-in-out both;\r\n}\r\n\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatbotLoader .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--dot:nth-child(1) {\r\n -webkit-animation-delay: -0.32s;\r\n animation-delay: -0.32s;\r\n}\r\n\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatbotLoader .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--dot:nth-child(2) {\r\n -webkit-animation-delay: -0.16s;\r\n animation-delay: -0.16s;\r\n}\r\n\r\n@-webkit-keyframes utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--bounce {\r\n 0%,\r\n 80%,\r\n 100% {\r\n -webkit-transform: scale(0);\r\n transform: scale(0);\r\n }\r\n 40% {\r\n -webkit-transform: scale(1);\r\n transform: scale(1);\r\n }\r\n}\r\n\r\n@keyframes utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--bounce {\r\n 0%,\r\n 80%,\r\n 100% {\r\n -webkit-transform: scale(0);\r\n transform: scale(0);\r\n }\r\n 40% {\r\n -webkit-transform: scale(1);\r\n transform: scale(1);\r\n }\r\n}\r\n\r\n@media (max-width: 575px) {\r\n /* .mihelpAgentWrapper {\r\n right: 20px;\r\n bottom: 100px;\r\n } */\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--iphoneChrome {\r\n bottom: 125px;\r\n }\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 450px;\r\n }\r\n}\r\n\r\n@media (max-width: 475px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 400px;\r\n }\r\n}\r\n\r\n@media (max-width: 425px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 350px;\r\n }\r\n}\r\n\r\n@media (max-width: 375px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 325px;\r\n }\r\n}\r\n\r\n@media (max-width: 350px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 300px;\r\n }\r\n}\r\n\r\n@media (max-width: 325px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 275px;\r\n }\r\n}\r\n";
38084
38084
  styleInject(css_248z$2);
38085
38085
 
38086
38086
  var _styleModuleImportMap$1 = {
@@ -38125,6 +38125,8 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
38125
38125
  systemPrompt = _ref$systemPrompt === void 0 ? '' : _ref$systemPrompt,
38126
38126
  _ref$contextMessagesC = _ref.contextMessagesCount,
38127
38127
  contextMessagesCount = _ref$contextMessagesC === void 0 ? 5 : _ref$contextMessagesC,
38128
+ _ref$contextChunks = _ref.contextChunks,
38129
+ contextChunks = _ref$contextChunks === void 0 ? 10 : _ref$contextChunks,
38128
38130
  mihelpAgentRef = _ref.mihelpAgentRef;
38129
38131
  var _useState = React.useState(false),
38130
38132
  _useState2 = _slicedToArray(_useState, 2),
@@ -38144,6 +38146,8 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
38144
38146
  setCollectionError = _useState8[1];
38145
38147
  var retryCount = React.useRef(0);
38146
38148
  var messagesContainerRef = React.useRef(null);
38149
+ var inputContainerRef = React.useRef(null);
38150
+ var spinnerRef = React.useRef(null);
38147
38151
  var _useState9 = React.useState(false),
38148
38152
  _useState10 = _slicedToArray(_useState9, 2),
38149
38153
  messageError = _useState10[0],
@@ -38205,7 +38209,11 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
38205
38209
  _useState34 = _slicedToArray(_useState33, 2),
38206
38210
  windowInnerWidthForMobile = _useState34[0],
38207
38211
  setWindowInnerWidthForMobile = _useState34[1];
38208
- var chatWindowHeight = 600; //update this if changed in css
38212
+ var _useState35 = React.useState(600),
38213
+ _useState36 = _slicedToArray(_useState35, 2),
38214
+ chatWindowHeight = _useState36[0],
38215
+ setchatWindowHeight = _useState36[1]; //update this if changed in css
38216
+
38209
38217
  var chatIconSize = 60; //update this if changed in css
38210
38218
 
38211
38219
  React.useEffect(function () {
@@ -38244,8 +38252,9 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
38244
38252
  };
38245
38253
  }, []);
38246
38254
  var handleStart = function handleStart(e) {
38255
+ var _e$target;
38247
38256
  var target = e.target;
38248
- if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || messagesContainerRef.current && messagesContainerRef.current.contains(target)) {
38257
+ if (inputContainerRef.current && inputContainerRef.current.contains(target) || messagesContainerRef.current && messagesContainerRef.current.contains(target) || spinnerRef.current && spinnerRef.current.contains(target) || e !== null && e !== void 0 && (_e$target = e.target) !== null && _e$target !== void 0 && _e$target.closest('#chatCloseIcon')) {
38249
38258
  return;
38250
38259
  }
38251
38260
  e.preventDefault();
@@ -38259,8 +38268,8 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
38259
38268
  });
38260
38269
  };
38261
38270
  var handleMove = function handleMove(e) {
38262
- var _e$target;
38263
- if (e !== null && e !== void 0 && (_e$target = e.target) !== null && _e$target !== void 0 && _e$target.closest('#chatCloseIcon')) return;
38271
+ var _e$target2;
38272
+ if (e !== null && e !== void 0 && (_e$target2 = e.target) !== null && _e$target2 !== void 0 && _e$target2.closest('#chatCloseIcon')) return;
38264
38273
  if (isDragging) {
38265
38274
  setDragged(true);
38266
38275
  var clientX = e.touches ? e.touches[0].clientX : e.clientX;
@@ -38292,12 +38301,16 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
38292
38301
  }
38293
38302
  }, [isDragging, position, showChatWindow]);
38294
38303
  React.useEffect(function () {
38295
- var isMobile = window.innerWidth < 575;
38296
- if (showChatWindow && isMobile && !dragged) {
38304
+ var isSmallDevice = windowInnerWidthForMobile < 1000;
38305
+ if (showChatWindow && isSmallDevice && !dragged) {
38297
38306
  adjustChatWindowPosition();
38298
38307
  }
38299
38308
  }, [position, dragged]);
38300
38309
  var adjustChatWindowPosition = function adjustChatWindowPosition() {
38310
+ if (chatWindowHeight + chatIconSize + 20 > window.innerHeight) {
38311
+ return setchatWindowHeight(window.innerHeight - chatIconSize - 20);
38312
+ }
38313
+ // if (chatWindowHeight + chatIconSize + 20 > window.innerHeight) return
38301
38314
  var bufferForMobile = window.innerWidth <= 575 ? 40 : 0;
38302
38315
  // let chatX = 0 - chatIconSize + bufferForMobile
38303
38316
  var chatX = 0 - chatIconSize;
@@ -38319,9 +38332,12 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
38319
38332
  });
38320
38333
  };
38321
38334
  var adjustChatIconPosition = function adjustChatIconPosition() {
38335
+ // if (chatWindowHeight + chatIconSize + 20 > window.innerHeight) {
38336
+ // return setchatWindowHeight(500)
38337
+ // }
38322
38338
  var newX = position.x;
38323
38339
  var newY = position.y;
38324
- var isMobile = windowInnerWidthForMobile < 575;
38340
+ var isSmallDevice = windowInnerWidthForMobile < 1000;
38325
38341
  var middleX = windowInnerWidthForMobile / 2; // Middle of the screen
38326
38342
  var closerToLeft = position.x < middleX; // Check if icon is closer to left or right
38327
38343
 
@@ -38336,7 +38352,7 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
38336
38352
  }
38337
38353
 
38338
38354
  // In Mobile, move chat icon to the nearest screen edge (left or right)
38339
- if (isMobile) {
38355
+ if (isSmallDevice) {
38340
38356
  newX = closerToLeft ? 70 : windowInnerWidthForMobile - 10;
38341
38357
  }
38342
38358
  if (newX !== position.x || newY !== position.y) {
@@ -38346,6 +38362,12 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
38346
38362
  });
38347
38363
  }
38348
38364
  };
38365
+ React.useEffect(function () {
38366
+ if (chatWindowHeight !== 600) {
38367
+ adjustChatWindowPosition();
38368
+ // adjustChatIconPosition()
38369
+ }
38370
+ }, [chatWindowHeight]);
38349
38371
  React.useEffect(function () {
38350
38372
  if (isDragging) {
38351
38373
  document.addEventListener('mousemove', handleMove);
@@ -38379,6 +38401,27 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
38379
38401
  adjustChatIconPosition();
38380
38402
  }
38381
38403
  }, [showChatWindow]);
38404
+ var saveCurrentContext = function saveCurrentContext(conversationsToBeSaved) {
38405
+ var _systemPrompts;
38406
+ var systemPrompts = conversationsToBeSaved.filter(function (c) {
38407
+ return (c === null || c === void 0 ? void 0 : c.role) === 'system';
38408
+ });
38409
+ var latestPrompt = ((_systemPrompts = systemPrompts[systemPrompts.length - 1]) === null || _systemPrompts === void 0 ? void 0 : _systemPrompts.content) || '';
38410
+ var match = latestPrompt.match(/<context>\s*([\s\S]*?)\s*<\/context>/);
38411
+ if (match) {
38412
+ var latestContext = {};
38413
+ try {
38414
+ latestContext = JSON.parse(match[1]);
38415
+ } catch (e) {
38416
+ console.log('context parse error', e);
38417
+ }
38418
+ if (!isEmpty$2(latestContext)) {
38419
+ setCurrentContext(latestContext);
38420
+ }
38421
+ } else {
38422
+ console.log('No context found');
38423
+ }
38424
+ };
38382
38425
  React.useEffect(function () {
38383
38426
  var conversationsFromSession = storage$1.getLocalItem('mihelpAgentConversations');
38384
38427
  var conversationsToBeSaved = !isEmpty$2(conversationsFromSession) ? conversationsFromSession : [];
@@ -38387,25 +38430,7 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
38387
38430
  var feedbacksToBeSaved = !isEmpty$2(feedbacksFromSession) ? feedbacksFromSession : {};
38388
38431
  setFeedbacks(feedbacksToBeSaved);
38389
38432
  if (conversationsToBeSaved.length) {
38390
- var _systemPrompts;
38391
- var systemPrompts = conversationsToBeSaved.filter(function (c) {
38392
- return (c === null || c === void 0 ? void 0 : c.role) === 'system';
38393
- });
38394
- var latestPrompt = ((_systemPrompts = systemPrompts[systemPrompts.length - 1]) === null || _systemPrompts === void 0 ? void 0 : _systemPrompts.content) || '';
38395
- var match = latestPrompt.match(/<context>\s*([\s\S]*?)\s*<\/context>/);
38396
- if (match) {
38397
- var latestContext = {};
38398
- try {
38399
- latestContext = JSON.parse(match[1]);
38400
- } catch (e) {
38401
- console.log('context parse error', e);
38402
- }
38403
- if (!isEmpty$2(latestContext)) {
38404
- setCurrentContext(latestContext);
38405
- }
38406
- } else {
38407
- console.log('No context found');
38408
- }
38433
+ saveCurrentContext(conversationsToBeSaved);
38409
38434
  }
38410
38435
  if (mihelpAgentRef && _typeof(mihelpAgentRef) === 'object') {
38411
38436
  mihelpAgentRef.current = {
@@ -38424,6 +38449,9 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
38424
38449
  var conversationsFromSession = JSON.parse(event.newValue);
38425
38450
  var conversationsToBeSaved = !isEmpty$2(conversationsFromSession) ? conversationsFromSession : [];
38426
38451
  setConversations(conversationsToBeSaved);
38452
+ if (conversationsToBeSaved.length) {
38453
+ saveCurrentContext(conversationsToBeSaved);
38454
+ }
38427
38455
  }
38428
38456
  if (event.key === 'mihelpAgentFeedbacks') {
38429
38457
  var feedbacksFromSession = JSON.parse(event.newValue);
@@ -38508,7 +38536,8 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
38508
38536
  messages: messagesWithOutId,
38509
38537
  collection: collection,
38510
38538
  last_n: contextMessagesCount,
38511
- appName: isCoreApp ? 'g2Home' : appAuthName
38539
+ appName: isCoreApp ? 'g2Home' : appAuthName,
38540
+ k: contextChunks
38512
38541
  };
38513
38542
  endpoint = (_storage$getLocalItem = storage$1.getLocalItem('opsportal-core:config')) === null || _storage$getLocalItem === void 0 ? void 0 : (_storage$getLocalItem2 = _storage$getLocalItem.endpoints) === null || _storage$getLocalItem2 === void 0 ? void 0 : _storage$getLocalItem2.mihelpChat;
38514
38543
  _context.next = 15;
@@ -38746,7 +38775,8 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
38746
38775
  className: "utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow",
38747
38776
  style: {
38748
38777
  left: "".concat(chatPosition.x, "px"),
38749
- top: "".concat(chatPosition.y, "px")
38778
+ top: "".concat(chatPosition.y, "px"),
38779
+ height: chatWindowHeight
38750
38780
  }
38751
38781
  }, /*#__PURE__*/React__default["default"].createElement("div", {
38752
38782
  className: "utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowHeader"
@@ -38907,6 +38937,7 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
38907
38937
  }, /*#__PURE__*/React__default["default"].createElement("p", null, "Oops! Something went wrong. Please try again."))))), /*#__PURE__*/React__default["default"].createElement("div", {
38908
38938
  className: "utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowFooter"
38909
38939
  }, /*#__PURE__*/React__default["default"].createElement("div", {
38940
+ ref: inputContainerRef,
38910
38941
  className: _getClassName("inputContainer ".concat(collectionError ? 'disabled' : ''), _styleModuleImportMap$1, {
38911
38942
  "handleMissingStyleName": "warn"
38912
38943
  })
@@ -38933,7 +38964,8 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
38933
38964
  },
38934
38965
  disabled: isLoading || collectionError
38935
38966
  })))), isFeedbackLoading && /*#__PURE__*/React__default["default"].createElement("div", {
38936
- className: "utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--spinner"
38967
+ className: "utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--spinner",
38968
+ ref: spinnerRef
38937
38969
  }, /*#__PURE__*/React__default["default"].createElement(coreComponents.Spinner, {
38938
38970
  size: "60px"
38939
38971
  }))), /*#__PURE__*/React__default["default"].createElement("span", {
@@ -38977,7 +39009,7 @@ var SCROLL = {
38977
39009
  var NO_SCROLL = {};
38978
39010
  var defaultSystemPrompt = 'Format all of the subsequent AI responses in valid HTML5, without markdown code blocks or any additional formatting, ensuring that the response consists only of raw HTML tags. Format your response in this structure:<html> <p> Your answer here </p> </html>';
38979
39011
  var AppFrame = function AppFrame(props) {
38980
- var _props$mihelpAgentPro, _props$mihelpAgentPro2, _props$mihelpAgentPro3, _props$mihelpAgentPro4, _props$mihelpAgentPro5;
39012
+ var _props$mihelpAgentPro, _props$mihelpAgentPro2, _props$mihelpAgentPro3, _props$mihelpAgentPro4, _props$mihelpAgentPro5, _props$mihelpAgentPro6;
38981
39013
  // Check if the child AppBar is mounted
38982
39014
  var _useState = React.useState(false),
38983
39015
  _useState2 = _slicedToArray(_useState, 2),
@@ -38991,6 +39023,7 @@ var AppFrame = function AppFrame(props) {
38991
39023
  _useState6 = _slicedToArray(_useState5, 2),
38992
39024
  isLandscapeInMobile = _useState6[0],
38993
39025
  setIsLandscapeInMobile = _useState6[1];
39026
+ var chatBotEnabledRef = React.useRef(false);
38994
39027
  var setChatBotEnableStatus = function setChatBotEnableStatus() {
38995
39028
  var coreAppConfig = storage$1.getLocalItem('opsportal-core:config');
38996
39029
  var tileData = findAppData(coreAppConfig.tiles, coreAppConfig.tileOverrides) || {};
@@ -39000,6 +39033,7 @@ var AppFrame = function AppFrame(props) {
39000
39033
  console.log("***chatBotEnabled=", chatBotEnabled, coreAppConfig);
39001
39034
  console.log("***isCoreRoute=", isCoreRoute, enableChatBot, window.location.pathname, !window.location.pathname.includes('embedded'));
39002
39035
  setChatBotEnabled(chatBotEnabled);
39036
+ chatBotEnabledRef.current = chatBotEnabled;
39003
39037
  };
39004
39038
  React.useEffect(function () {
39005
39039
  if (appBarMounted) {
@@ -39019,17 +39053,28 @@ var AppFrame = function AppFrame(props) {
39019
39053
  });
39020
39054
  var isMobileLandscape = function isMobileLandscape() {
39021
39055
  var userAgent = navigator.userAgent || navigator.vendor || window.opera;
39022
- var isMobile = /android|iphone|ipod|blackberry|iemobile|opera mini/i.test(userAgent) && !/ipad|tablet|playbook|silk/i.test(userAgent);
39056
+ var isMobile = /android|iphone|ipod|blackberry|iemobile|opera mini/i.test(userAgent) && !/ipad|tablet|playbook|silk|mediapad/i.test(userAgent);
39057
+ var isSmallDevice = Math.min(screen.width, screen.height) <= 500;
39023
39058
  var isLandscape = window.innerWidth > window.innerHeight;
39024
- return isMobile && isLandscape;
39059
+ return isMobile && isLandscape && isSmallDevice;
39025
39060
  };
39026
39061
  React.useEffect(function () {
39027
39062
  var handleResize = function handleResize() {
39028
39063
  setIsLandscapeInMobile(isMobileLandscape());
39029
39064
  };
39065
+ var handleOrientationChange = function handleOrientationChange() {
39066
+ if (chatBotEnabledRef.current) {
39067
+ setChatBotEnabled(false);
39068
+ setTimeout(function () {
39069
+ setChatBotEnabled(true);
39070
+ }, 200);
39071
+ }
39072
+ };
39030
39073
  window.addEventListener("resize", handleResize);
39074
+ window.addEventListener("orientationchange", handleOrientationChange);
39031
39075
  return function () {
39032
- return window.removeEventListener("resize", handleResize);
39076
+ window.removeEventListener("resize", handleResize);
39077
+ window.removeEventListener("orientationchange", handleOrientationChange);
39033
39078
  };
39034
39079
  }, []);
39035
39080
  return /*#__PURE__*/React__default["default"].createElement("div", {
@@ -39062,7 +39107,8 @@ var AppFrame = function AppFrame(props) {
39062
39107
  collection: props === null || props === void 0 ? void 0 : (_props$mihelpAgentPro2 = props.mihelpAgentProps) === null || _props$mihelpAgentPro2 === void 0 ? void 0 : _props$mihelpAgentPro2.collection,
39063
39108
  systemPrompt: (props === null || props === void 0 ? void 0 : (_props$mihelpAgentPro3 = props.mihelpAgentProps) === null || _props$mihelpAgentPro3 === void 0 ? void 0 : _props$mihelpAgentPro3.systemPrompt) || defaultSystemPrompt,
39064
39109
  contextMessagesCount: props === null || props === void 0 ? void 0 : (_props$mihelpAgentPro4 = props.mihelpAgentProps) === null || _props$mihelpAgentPro4 === void 0 ? void 0 : _props$mihelpAgentPro4.contextMessagesCount,
39065
- mihelpAgentRef: props === null || props === void 0 ? void 0 : (_props$mihelpAgentPro5 = props.mihelpAgentProps) === null || _props$mihelpAgentPro5 === void 0 ? void 0 : _props$mihelpAgentPro5.mihelpAgentRef
39110
+ contextChunks: props === null || props === void 0 ? void 0 : (_props$mihelpAgentPro5 = props.mihelpAgentProps) === null || _props$mihelpAgentPro5 === void 0 ? void 0 : _props$mihelpAgentPro5.contextChunksCount,
39111
+ mihelpAgentRef: props === null || props === void 0 ? void 0 : (_props$mihelpAgentPro6 = props.mihelpAgentProps) === null || _props$mihelpAgentPro6 === void 0 ? void 0 : _props$mihelpAgentPro6.mihelpAgentRef
39066
39112
  })))));
39067
39113
  };
39068
39114
  AppFrame.defaultProps = {