@carbon/ai-chat 1.3.2 → 1.4.0-rc.1

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 (35) hide show
  1. package/dist/es/aiChatEntry.js +96 -132
  2. package/dist/es/aiChatEntry.js.map +1 -1
  3. package/dist/es/chat.ChatAppEntry.js +1808 -4924
  4. package/dist/es/chat.ChatAppEntry.js.map +1 -1
  5. package/dist/es/chat.LayoutCustomProperties.js +12 -0
  6. package/dist/es/chat.LayoutCustomProperties.js.map +1 -0
  7. package/dist/es/{chat.PageObjectId.js → chat.languages.js} +489 -227
  8. package/dist/es/chat.languages.js.map +1 -0
  9. package/dist/es/serverEntry.js +36 -9
  10. package/dist/es/serverEntry.js.map +1 -1
  11. package/dist/es/web-components/cds-aichat-container/index.js +31 -67
  12. package/dist/es/web-components/cds-aichat-container/index.js.map +1 -1
  13. package/dist/es/web-components/cds-aichat-custom-element/index.js +30 -66
  14. package/dist/es/web-components/cds-aichat-custom-element/index.js.map +1 -1
  15. package/dist/es-custom/aiChatEntry.js +96 -132
  16. package/dist/es-custom/aiChatEntry.js.map +1 -1
  17. package/dist/es-custom/chat.ChatAppEntry.js +1808 -4924
  18. package/dist/es-custom/chat.ChatAppEntry.js.map +1 -1
  19. package/dist/es-custom/chat.LayoutCustomProperties.js +12 -0
  20. package/dist/es-custom/chat.LayoutCustomProperties.js.map +1 -0
  21. package/dist/es-custom/{chat.PageObjectId.js → chat.languages.js} +489 -227
  22. package/dist/es-custom/chat.languages.js.map +1 -0
  23. package/dist/es-custom/serverEntry.js +36 -9
  24. package/dist/es-custom/serverEntry.js.map +1 -1
  25. package/dist/es-custom/web-components/cds-aichat-container/index.js +31 -67
  26. package/dist/es-custom/web-components/cds-aichat-container/index.js.map +1 -1
  27. package/dist/es-custom/web-components/cds-aichat-custom-element/index.js +30 -66
  28. package/dist/es-custom/web-components/cds-aichat-custom-element/index.js.map +1 -1
  29. package/dist/types/aiChatEntry.d.ts +4 -3
  30. package/dist/types/{serverEntry-ojFJl1OR.d.ts → serverEntry-BZ90jVeY.d.ts} +1026 -975
  31. package/dist/types/serverEntry.d.ts +3 -2
  32. package/package.json +8 -19
  33. package/telemetry.yml +0 -5
  34. package/dist/es/chat.PageObjectId.js.map +0 -1
  35. package/dist/es-custom/chat.PageObjectId.js.map +0 -1
@@ -1,3 +1,32 @@
1
+ import "@carbon/ai-chat-components/es/components/chain-of-thought/src/types.js";
2
+
3
+ import dayjs from "dayjs";
4
+
5
+ import enLocaleData from "dayjs/locale/en.js";
6
+
7
+ import React from "react";
8
+
9
+ var PageObjectId;
10
+
11
+ (function(PageObjectId) {
12
+ PageObjectId["CLOSE_CHAT"] = "close_chat";
13
+ PageObjectId["LAUNCHER"] = "launcher_open_chat";
14
+ PageObjectId["INPUT"] = "input_field";
15
+ PageObjectId["INPUT_SEND"] = "input_send";
16
+ PageObjectId["HEADER_TITLE"] = "header_title";
17
+ PageObjectId["HEADER_NAME"] = "header_name";
18
+ PageObjectId["MAIN_PANEL"] = "main_panel";
19
+ PageObjectId["DISCLAIMER_PANEL"] = "disclaimer_panel";
20
+ PageObjectId["DISCLAIMER_ACCEPT_BUTTON"] = "disclaimer_accept_button";
21
+ PageObjectId["HOME_SCREEN_PANEL"] = "home_screen_panel";
22
+ PageObjectId["HYDRATING_PANEL"] = "hydrating_panel";
23
+ PageObjectId["CATASTROPHIC_PANEL"] = "catastrophic_panel";
24
+ PageObjectId["IFRAME_PANEL"] = "iframe_panel";
25
+ PageObjectId["CONVERSATIONAL_SEARCH_CITATION_PANEL"] = "conversational_search_citation_panel";
26
+ PageObjectId["CUSTOM_PANEL"] = "custom_panel";
27
+ PageObjectId["BUTTON_RESPONSE_PANEL"] = "button_response_panel";
28
+ })(PageObjectId || (PageObjectId = {}));
29
+
1
30
  var ViewType;
2
31
 
3
32
  (function(ViewType) {
@@ -189,11 +218,11 @@ var launcher_isOpen = "Close the chat window";
189
218
 
190
219
  var launcher_isClosed = "Open the chat window";
191
220
 
192
- var launcher_desktopGreeting = "Hi! I’m a virtual assistant. How can I help you today?";
221
+ var launcher_desktopGreeting = "Hi! How can I help you today?";
193
222
 
194
223
  var launcher_mobileGreeting = "Hi! How can I help you today?";
195
224
 
196
- var launcher_ariaIsExpanded = "Close the chat launcher";
225
+ var launcher_ariaIsExpanded = "Dismiss launcher notification";
197
226
 
198
227
  var launcher_closeButton = "Close";
199
228
 
@@ -221,6 +250,8 @@ var messages_assistantIsLoading = "{assistantName} is thinking";
221
250
 
222
251
  var messages_agentIsTyping = "The live agent is typing";
223
252
 
253
+ var messages_focusHandle = "Message";
254
+
224
255
  var messages_scrollHandle = "Chat history begin";
225
256
 
226
257
  var messages_scrollHandleDetailed = "Chat history begin. Activate to focus the first message then use the arrow, home, and end keys to move between messages. Press escape to exit.";
@@ -235,8 +266,6 @@ var message_labelAssistant = "{actorName} {timestamp}";
235
266
 
236
267
  var message_labelYou = "You {timestamp}";
237
268
 
238
- var notifications_toastClose = "Close notification";
239
-
240
269
  var buttons_restart = "Restart conversation";
241
270
 
242
271
  var buttons_cancel = "Cancel";
@@ -419,8 +448,6 @@ var conversationalSearch_toggleCitations = "Open or close the list of sources";
419
448
 
420
449
  var conversationalSearch_responseStopped = "Response stopped";
421
450
 
422
- var launcher_chatNow = "Chat now";
423
-
424
451
  var iframe_ariaSourceLoaded = "The web page has loaded.";
425
452
 
426
453
  var iframe_ariaImageAltText = "Preview image for the web page panel.";
@@ -473,6 +500,22 @@ var table_paginationSupplementalText = "of {pagesCount, number} {pagesCount, plu
473
500
 
474
501
  var table_paginationStatus = "{start, number}–{end, number} of {count, number} {count, plural, one {item} other {items}}";
475
502
 
503
+ var codeSnippet_feedback = "Copied!";
504
+
505
+ var codeSnippet_showLessText = "Show less";
506
+
507
+ var codeSnippet_showMoreText = "Show more";
508
+
509
+ var codeSnippet_tooltipContent = "Copy to clipboard";
510
+
511
+ var codeSnippet_lineCount = "{count, plural, one {{count, number} line} other {{count, number} lines}}";
512
+
513
+ var codeSnippet_foldCollapse = "Collapse code block";
514
+
515
+ var codeSnippet_foldExpand = "Expand code block";
516
+
517
+ var table_downloadButton = "Download table data";
518
+
476
519
  var feedback_positiveLabel = "Good response";
477
520
 
478
521
  var feedback_negativeLabel = "Bad response";
@@ -507,198 +550,211 @@ var chainOfThought_statusProcessingLabel = "Processing";
507
550
 
508
551
  var chainOfThought_explainabilityLabel = "How did I get this answer?";
509
552
 
553
+ var reasoningSteps_mainLabelOpen = "Hide reasoning";
554
+
555
+ var reasoningSteps_mainLabelClosed = "Show reasoning";
556
+
510
557
  var enLanguagePackData = {
511
- ai_slug_label: ai_slug_label,
512
- ai_slug_title: ai_slug_title,
513
- ai_slug_description: ai_slug_description,
514
- components_overflow_ariaLabel: components_overflow_ariaLabel,
515
- components_swiper_currentLabel: components_swiper_currentLabel,
516
- errors_communicating: errors_communicating,
517
- errors_imageSource: errors_imageSource,
518
- errors_videoSource: errors_videoSource,
519
- errors_audioSource: errors_audioSource,
520
- errors_iframeSource: errors_iframeSource,
521
- errors_singleMessage: errors_singleMessage,
522
- errors_ariaMessageRetrying: errors_ariaMessageRetrying,
523
- errors_ariaMessageFailed: errors_ariaMessageFailed,
524
- errors_noHumanAgentsAvailable: errors_noHumanAgentsAvailable,
525
- errors_noHumanAgentsJoined: errors_noHumanAgentsJoined,
526
- errors_connectingToHumanAgent: errors_connectingToHumanAgent,
527
- errors_busy: errors_busy,
528
- errors_agentAppSessionExpired: errors_agentAppSessionExpired,
529
- errors_generalContent: errors_generalContent,
530
- errors_somethingWrong: errors_somethingWrong,
531
- input_ariaLabel: input_ariaLabel,
532
- input_placeholder: input_placeholder,
533
- input_buttonLabel: input_buttonLabel,
534
- input_uploadButtonLabel: input_uploadButtonLabel,
535
- window_title: window_title,
536
- window_ariaChatRegion: window_ariaChatRegion,
537
- window_ariaChatRegionNamespace: window_ariaChatRegionNamespace,
538
- window_ariaWindowOpened: window_ariaWindowOpened,
539
- window_ariaWindowClosed: window_ariaWindowClosed,
540
- window_ariaWindowLoading: window_ariaWindowLoading,
541
- launcher_isOpen: launcher_isOpen,
542
- launcher_isClosed: launcher_isClosed,
543
- launcher_desktopGreeting: launcher_desktopGreeting,
544
- launcher_mobileGreeting: launcher_mobileGreeting,
545
- launcher_ariaIsExpanded: launcher_ariaIsExpanded,
546
- launcher_closeButton: launcher_closeButton,
547
- media_transcript_label: media_transcript_label,
548
- messages_youSaid: messages_youSaid,
549
- messages_assistantSaid: messages_assistantSaid,
550
- messages_agentSaid: messages_agentSaid,
551
- messages_searchResults: messages_searchResults,
552
- messages_searchResultsLink: messages_searchResultsLink,
553
- messages_searchResultsOpenDocument: messages_searchResultsOpenDocument,
554
- messages_searchResultsOpenDocumentWithLabel: messages_searchResultsOpenDocumentWithLabel,
555
- messages_searchResultsExpand: messages_searchResultsExpand,
556
- messages_searchResultsCollapse: messages_searchResultsCollapse,
557
- messages_assistantIsLoading: messages_assistantIsLoading,
558
- messages_agentIsTyping: messages_agentIsTyping,
559
- messages_scrollHandle: messages_scrollHandle,
560
- messages_scrollHandleDetailed: messages_scrollHandleDetailed,
561
- messages_scrollHandleEnd: messages_scrollHandleEnd,
562
- messages_scrollHandleEndDetailed: messages_scrollHandleEndDetailed,
563
- messages_scrollMoreButton: messages_scrollMoreButton,
564
- message_labelAssistant: message_labelAssistant,
565
- message_labelYou: message_labelYou,
566
- notifications_toastClose: notifications_toastClose,
567
- buttons_restart: buttons_restart,
568
- buttons_cancel: buttons_cancel,
569
- buttons_retry: buttons_retry,
570
- options_select: options_select,
571
- options_ariaOptionsDisabled: options_ariaOptionsDisabled,
572
- header_previewLinkTitle: header_previewLinkTitle,
573
- header_ariaAssistantAvatar: header_ariaAssistantAvatar,
574
- header_overflowMenu_options: header_overflowMenu_options,
575
- homeScreen_returnToAssistant: homeScreen_returnToAssistant,
576
- homeScreen_returnToHome: homeScreen_returnToHome,
577
- homeScreen_overflowMenuHomeScreen: homeScreen_overflowMenuHomeScreen,
578
- homeScreen_ariaQuickStartListButton: homeScreen_ariaQuickStartListButton,
579
- homeScreen_ariaQuickStartListOpened: homeScreen_ariaQuickStartListOpened,
580
- homeScreen_ariaQuickStartListClosed: homeScreen_ariaQuickStartListClosed,
581
- default_agent_availableMessage: default_agent_availableMessage,
582
- default_agent_unavailableMessage: default_agent_unavailableMessage,
583
- agent_reason_error: agent_reason_error,
584
- agent_sdMissingWarning: agent_sdMissingWarning,
585
- agent_noName: agent_noName,
586
- agent_chatTitle: agent_chatTitle,
587
- agent_startChat: agent_startChat,
588
- agent_connecting: agent_connecting,
589
- agent_agentNoNameTitle: agent_agentNoNameTitle,
590
- agent_agentJoinedName: agent_agentJoinedName,
591
- agent_agentJoinedNoName: agent_agentJoinedNoName,
592
- agent_youConnectedWarning: agent_youConnectedWarning,
593
- agent_connectingMinutes: agent_connectingMinutes,
594
- agent_connectingQueue: agent_connectingQueue,
595
- agent_ariaHumanAgentAvatar: agent_ariaHumanAgentAvatar,
596
- agent_ariaGenericAvatar: agent_ariaGenericAvatar,
597
- agent_ariaGenericAssistantAvatar: agent_ariaGenericAssistantAvatar,
598
- agent_youEndedChat: agent_youEndedChat,
599
- agent_conversationWasEnded: agent_conversationWasEnded,
600
- agent_disconnected: agent_disconnected,
601
- agent_reconnected: agent_reconnected,
602
- agent_agentLeftChat: agent_agentLeftChat,
603
- agent_agentLeftChatNoName: agent_agentLeftChatNoName,
604
- agent_agentEndedChat: agent_agentEndedChat,
605
- agent_agentEndedChatNoName: agent_agentEndedChatNoName,
606
- agent_transferring: agent_transferring,
607
- agent_transferringNoName: agent_transferringNoName,
608
- agent_endChat: agent_endChat,
609
- agent_confirmSuspendedEndChatTitle: agent_confirmSuspendedEndChatTitle,
610
- agent_confirmSuspendedEndChatMessage: agent_confirmSuspendedEndChatMessage,
611
- agent_confirmCancelRequestTitle: agent_confirmCancelRequestTitle,
612
- agent_confirmCancelRequestMessage: agent_confirmCancelRequestMessage,
613
- agent_confirmCancelRequestNo: agent_confirmCancelRequestNo,
614
- agent_confirmCancelRequestYes: agent_confirmCancelRequestYes,
615
- agent_confirmEndChat: agent_confirmEndChat,
616
- agent_confirmEndChatNo: agent_confirmEndChatNo,
617
- agent_confirmEndChatYes: agent_confirmEndChatYes,
618
- agent_confirmEndSuspendedYes: agent_confirmEndSuspendedYes,
619
- agent_assistantReturned: agent_assistantReturned,
620
- agent_newMessage: agent_newMessage,
621
- agent_cardButtonChatRequested: agent_cardButtonChatRequested,
622
- agent_cardButtonConnected: agent_cardButtonConnected,
623
- agent_cardButtonChatEnded: agent_cardButtonChatEnded,
624
- agent_cardMessageChatEnded: agent_cardMessageChatEnded,
625
- agent_cardMessageConnected: agent_cardMessageConnected,
626
- agent_connectButtonCancel: agent_connectButtonCancel,
627
- agent_connectedButtonEndChat: agent_connectedButtonEndChat,
628
- agent_connectWaiting: agent_connectWaiting,
629
- agent_defaultMessageToHumanAgent: agent_defaultMessageToHumanAgent,
630
- agent_inputPlaceholderConnecting: agent_inputPlaceholderConnecting,
631
- agent_inputPlaceholderReconnecting: agent_inputPlaceholderReconnecting,
632
- agent_sharingStopSharingButton: agent_sharingStopSharingButton,
633
- agent_sharingRequestTitle: agent_sharingRequestTitle,
634
- agent_sharingRequestMessage: agent_sharingRequestMessage,
635
- agent_sharingAcceptButton: agent_sharingAcceptButton,
636
- agent_sharingDeclineButton: agent_sharingDeclineButton,
637
- agent_sharingRequested: agent_sharingRequested,
638
- agent_sharingAccepted: agent_sharingAccepted,
639
- agent_sharingDeclined: agent_sharingDeclined,
640
- agent_sharingCancelled: agent_sharingCancelled,
641
- agent_sharingEnded: agent_sharingEnded,
642
- agent_suspendedWarning: agent_suspendedWarning,
643
- icon_ariaUnreadMessages: icon_ariaUnreadMessages,
644
- showMore: showMore,
645
- showMoreResults: showMoreResults,
646
- disclaimer_title: disclaimer_title,
647
- disclaimer_accept: disclaimer_accept,
648
- general_ariaCloseInformationOverlay: general_ariaCloseInformationOverlay,
649
- general_ariaAnnounceOpenedInformationOverlay: general_ariaAnnounceOpenedInformationOverlay,
650
- general_ariaAnnounceClosedInformationOverlay: general_ariaAnnounceClosedInformationOverlay,
651
- general_ariaAnnounceEscapeOverlay: general_ariaAnnounceEscapeOverlay,
652
- general_returnToAssistant: general_returnToAssistant,
653
- conversationalSearch_streamingIncomplete: conversationalSearch_streamingIncomplete,
654
- conversationalSearch_viewSourceDocument: conversationalSearch_viewSourceDocument,
655
- conversationalSearch_citationsLabel: conversationalSearch_citationsLabel,
656
- conversationalSearch_toggleCitations: conversationalSearch_toggleCitations,
657
- conversationalSearch_responseStopped: conversationalSearch_responseStopped,
658
- launcher_chatNow: launcher_chatNow,
659
- iframe_ariaSourceLoaded: iframe_ariaSourceLoaded,
660
- iframe_ariaImageAltText: iframe_ariaImageAltText,
661
- iframe_ariaClosePanel: iframe_ariaClosePanel,
662
- iframe_ariaOpenedPanel: iframe_ariaOpenedPanel,
663
- iframe_ariaClosedPanel: iframe_ariaClosedPanel,
664
- iframe_ariaClickPreviewCard: iframe_ariaClickPreviewCard,
665
- datePicker_chooseDate: datePicker_chooseDate,
666
- datePicker_confirmDate: datePicker_confirmDate,
667
- fileSharing_fileTooLarge: fileSharing_fileTooLarge,
668
- fileSharing_ariaAnnounceSuccess: fileSharing_ariaAnnounceSuccess,
669
- fileSharing_fileIcon: fileSharing_fileIcon,
670
- fileSharing_removeButtonTitle: fileSharing_removeButtonTitle,
671
- fileSharing_statusUploading: fileSharing_statusUploading,
672
- fileSharing_uploadFailed: fileSharing_uploadFailed,
673
- fileSharing_agentMessageText: fileSharing_agentMessageText,
674
- fileSharing_request: fileSharing_request,
675
- carousel_prevNavButton: carousel_prevNavButton,
676
- carousel_nextNavButton: carousel_nextNavButton,
677
- input_completionsTagApp: input_completionsTagApp,
678
- input_completionsTagAssistant: input_completionsTagAssistant,
679
- table_filterPlaceholder: table_filterPlaceholder,
680
- table_previousPage: table_previousPage,
681
- table_nextPage: table_nextPage,
682
- table_itemsPerPage: table_itemsPerPage,
683
- table_paginationSupplementalText: table_paginationSupplementalText,
684
- table_paginationStatus: table_paginationStatus,
685
- feedback_positiveLabel: feedback_positiveLabel,
686
- feedback_negativeLabel: feedback_negativeLabel,
687
- feedback_defaultTitle: feedback_defaultTitle,
688
- feedback_defaultPrompt: feedback_defaultPrompt,
689
- feedback_defaultPlaceholder: feedback_defaultPlaceholder,
690
- feedback_submitLabel: feedback_submitLabel,
691
- feedback_cancelLabel: feedback_cancelLabel,
692
- input_stopResponse: input_stopResponse,
693
- messages_responseStopped: messages_responseStopped,
694
- chainOfThought_stepTitle: chainOfThought_stepTitle,
695
- chainOfThought_inputLabel: chainOfThought_inputLabel,
696
- chainOfThought_outputLabel: chainOfThought_outputLabel,
697
- chainOfThought_toolLabel: chainOfThought_toolLabel,
698
- chainOfThought_statusSucceededLabel: chainOfThought_statusSucceededLabel,
699
- chainOfThought_statusFailedLabel: chainOfThought_statusFailedLabel,
700
- chainOfThought_statusProcessingLabel: chainOfThought_statusProcessingLabel,
701
- chainOfThought_explainabilityLabel: chainOfThought_explainabilityLabel
558
+ ai_slug_label,
559
+ ai_slug_title,
560
+ ai_slug_description,
561
+ components_overflow_ariaLabel,
562
+ components_swiper_currentLabel,
563
+ errors_communicating,
564
+ errors_imageSource,
565
+ errors_videoSource,
566
+ errors_audioSource,
567
+ errors_iframeSource,
568
+ errors_singleMessage,
569
+ errors_ariaMessageRetrying,
570
+ errors_ariaMessageFailed,
571
+ errors_noHumanAgentsAvailable,
572
+ errors_noHumanAgentsJoined,
573
+ errors_connectingToHumanAgent,
574
+ errors_busy,
575
+ errors_agentAppSessionExpired,
576
+ errors_generalContent,
577
+ errors_somethingWrong,
578
+ input_ariaLabel,
579
+ input_placeholder,
580
+ input_buttonLabel,
581
+ input_uploadButtonLabel,
582
+ window_title,
583
+ window_ariaChatRegion,
584
+ window_ariaChatRegionNamespace,
585
+ window_ariaWindowOpened,
586
+ window_ariaWindowClosed,
587
+ window_ariaWindowLoading,
588
+ launcher_isOpen,
589
+ launcher_isClosed,
590
+ launcher_desktopGreeting,
591
+ launcher_mobileGreeting,
592
+ launcher_ariaIsExpanded,
593
+ launcher_closeButton,
594
+ media_transcript_label,
595
+ messages_youSaid,
596
+ messages_assistantSaid,
597
+ messages_agentSaid,
598
+ messages_searchResults,
599
+ messages_searchResultsLink,
600
+ messages_searchResultsOpenDocument,
601
+ messages_searchResultsOpenDocumentWithLabel,
602
+ messages_searchResultsExpand,
603
+ messages_searchResultsCollapse,
604
+ messages_assistantIsLoading,
605
+ messages_agentIsTyping,
606
+ messages_focusHandle,
607
+ messages_scrollHandle,
608
+ messages_scrollHandleDetailed,
609
+ messages_scrollHandleEnd,
610
+ messages_scrollHandleEndDetailed,
611
+ messages_scrollMoreButton,
612
+ message_labelAssistant,
613
+ message_labelYou,
614
+ buttons_restart,
615
+ buttons_cancel,
616
+ buttons_retry,
617
+ options_select,
618
+ options_ariaOptionsDisabled,
619
+ header_previewLinkTitle,
620
+ header_ariaAssistantAvatar,
621
+ header_overflowMenu_options,
622
+ homeScreen_returnToAssistant,
623
+ homeScreen_returnToHome,
624
+ homeScreen_overflowMenuHomeScreen,
625
+ homeScreen_ariaQuickStartListButton,
626
+ homeScreen_ariaQuickStartListOpened,
627
+ homeScreen_ariaQuickStartListClosed,
628
+ default_agent_availableMessage,
629
+ default_agent_unavailableMessage,
630
+ agent_reason_error,
631
+ agent_sdMissingWarning,
632
+ agent_noName,
633
+ agent_chatTitle,
634
+ agent_startChat,
635
+ agent_connecting,
636
+ agent_agentNoNameTitle,
637
+ agent_agentJoinedName,
638
+ agent_agentJoinedNoName,
639
+ agent_youConnectedWarning,
640
+ agent_connectingMinutes,
641
+ agent_connectingQueue,
642
+ agent_ariaHumanAgentAvatar,
643
+ agent_ariaGenericAvatar,
644
+ agent_ariaGenericAssistantAvatar,
645
+ agent_youEndedChat,
646
+ agent_conversationWasEnded,
647
+ agent_disconnected,
648
+ agent_reconnected,
649
+ agent_agentLeftChat,
650
+ agent_agentLeftChatNoName,
651
+ agent_agentEndedChat,
652
+ agent_agentEndedChatNoName,
653
+ agent_transferring,
654
+ agent_transferringNoName,
655
+ agent_endChat,
656
+ agent_confirmSuspendedEndChatTitle,
657
+ agent_confirmSuspendedEndChatMessage,
658
+ agent_confirmCancelRequestTitle,
659
+ agent_confirmCancelRequestMessage,
660
+ agent_confirmCancelRequestNo,
661
+ agent_confirmCancelRequestYes,
662
+ agent_confirmEndChat,
663
+ agent_confirmEndChatNo,
664
+ agent_confirmEndChatYes,
665
+ agent_confirmEndSuspendedYes,
666
+ agent_assistantReturned,
667
+ agent_newMessage,
668
+ agent_cardButtonChatRequested,
669
+ agent_cardButtonConnected,
670
+ agent_cardButtonChatEnded,
671
+ agent_cardMessageChatEnded,
672
+ agent_cardMessageConnected,
673
+ agent_connectButtonCancel,
674
+ agent_connectedButtonEndChat,
675
+ agent_connectWaiting,
676
+ agent_defaultMessageToHumanAgent,
677
+ agent_inputPlaceholderConnecting,
678
+ agent_inputPlaceholderReconnecting,
679
+ agent_sharingStopSharingButton,
680
+ agent_sharingRequestTitle,
681
+ agent_sharingRequestMessage,
682
+ agent_sharingAcceptButton,
683
+ agent_sharingDeclineButton,
684
+ agent_sharingRequested,
685
+ agent_sharingAccepted,
686
+ agent_sharingDeclined,
687
+ agent_sharingCancelled,
688
+ agent_sharingEnded,
689
+ agent_suspendedWarning,
690
+ icon_ariaUnreadMessages,
691
+ showMore,
692
+ showMoreResults,
693
+ disclaimer_title,
694
+ disclaimer_accept,
695
+ general_ariaCloseInformationOverlay,
696
+ general_ariaAnnounceOpenedInformationOverlay,
697
+ general_ariaAnnounceClosedInformationOverlay,
698
+ general_ariaAnnounceEscapeOverlay,
699
+ general_returnToAssistant,
700
+ conversationalSearch_streamingIncomplete,
701
+ conversationalSearch_viewSourceDocument,
702
+ conversationalSearch_citationsLabel,
703
+ conversationalSearch_toggleCitations,
704
+ conversationalSearch_responseStopped,
705
+ iframe_ariaSourceLoaded,
706
+ iframe_ariaImageAltText,
707
+ iframe_ariaClosePanel,
708
+ iframe_ariaOpenedPanel,
709
+ iframe_ariaClosedPanel,
710
+ iframe_ariaClickPreviewCard,
711
+ datePicker_chooseDate,
712
+ datePicker_confirmDate,
713
+ fileSharing_fileTooLarge,
714
+ fileSharing_ariaAnnounceSuccess,
715
+ fileSharing_fileIcon,
716
+ fileSharing_removeButtonTitle,
717
+ fileSharing_statusUploading,
718
+ fileSharing_uploadFailed,
719
+ fileSharing_agentMessageText,
720
+ fileSharing_request,
721
+ carousel_prevNavButton,
722
+ carousel_nextNavButton,
723
+ input_completionsTagApp,
724
+ input_completionsTagAssistant,
725
+ table_filterPlaceholder,
726
+ table_previousPage,
727
+ table_nextPage,
728
+ table_itemsPerPage,
729
+ table_paginationSupplementalText,
730
+ table_paginationStatus,
731
+ codeSnippet_feedback,
732
+ codeSnippet_showLessText,
733
+ codeSnippet_showMoreText,
734
+ codeSnippet_tooltipContent,
735
+ codeSnippet_lineCount,
736
+ codeSnippet_foldCollapse,
737
+ codeSnippet_foldExpand,
738
+ table_downloadButton,
739
+ feedback_positiveLabel,
740
+ feedback_negativeLabel,
741
+ feedback_defaultTitle,
742
+ feedback_defaultPrompt,
743
+ feedback_defaultPlaceholder,
744
+ feedback_submitLabel,
745
+ feedback_cancelLabel,
746
+ input_stopResponse,
747
+ messages_responseStopped,
748
+ chainOfThought_stepTitle,
749
+ chainOfThought_inputLabel,
750
+ chainOfThought_outputLabel,
751
+ chainOfThought_toolLabel,
752
+ chainOfThought_statusSucceededLabel,
753
+ chainOfThought_statusFailedLabel,
754
+ chainOfThought_statusProcessingLabel,
755
+ chainOfThought_explainabilityLabel,
756
+ reasoningSteps_mainLabelOpen,
757
+ reasoningSteps_mainLabelClosed
702
758
  };
703
759
 
704
760
  const enLanguagePack = enLanguagePackData;
@@ -821,14 +877,6 @@ var HumanAgentMessageType;
821
877
  HumanAgentMessageType["SYSTEM"] = "system";
822
878
  })(HumanAgentMessageType || (HumanAgentMessageType = {}));
823
879
 
824
- var ChainOfThoughtStepStatus;
825
-
826
- (function(ChainOfThoughtStepStatus) {
827
- ChainOfThoughtStepStatus["PROCESSING"] = "processing";
828
- ChainOfThoughtStepStatus["FAILURE"] = "failure";
829
- ChainOfThoughtStepStatus["SUCCESS"] = "success";
830
- })(ChainOfThoughtStepStatus || (ChainOfThoughtStepStatus = {}));
831
-
832
880
  var OptionItemPreference;
833
881
 
834
882
  (function(OptionItemPreference) {
@@ -871,6 +919,14 @@ var ButtonItemKind;
871
919
  ButtonItemKind["LINK"] = "link";
872
920
  })(ButtonItemKind || (ButtonItemKind = {}));
873
921
 
922
+ var ReasoningStepOpenState;
923
+
924
+ (function(ReasoningStepOpenState) {
925
+ ReasoningStepOpenState["OPEN"] = "open";
926
+ ReasoningStepOpenState["CLOSE"] = "close";
927
+ ReasoningStepOpenState["DEFAULT"] = "default";
928
+ })(ReasoningStepOpenState || (ReasoningStepOpenState = {}));
929
+
874
930
  var UserType;
875
931
 
876
932
  (function(UserType) {
@@ -889,26 +945,232 @@ var MessageErrorState;
889
945
  MessageErrorState[MessageErrorState["WAITING"] = 5] = "WAITING";
890
946
  })(MessageErrorState || (MessageErrorState = {}));
891
947
 
892
- var PageObjectId;
893
-
894
- (function(PageObjectId) {
895
- PageObjectId["CLOSE_CHAT"] = "close_chat";
896
- PageObjectId["LAUNCHER"] = "launcher_open_chat";
897
- PageObjectId["INPUT"] = "input_field";
898
- PageObjectId["INPUT_SEND"] = "input_send";
899
- PageObjectId["HEADER_TITLE"] = "header_title";
900
- PageObjectId["HEADER_NAME"] = "header_name";
901
- PageObjectId["MAIN_PANEL"] = "main_panel";
902
- PageObjectId["DISCLAIMER_PANEL"] = "disclaimer_panel";
903
- PageObjectId["DISCLAIMER_ACCEPT_BUTTON"] = "disclaimer_accept_button";
904
- PageObjectId["HOME_SCREEN_PANEL"] = "home_screen_panel";
905
- PageObjectId["HYDRATING_PANEL"] = "hydrating_panel";
906
- PageObjectId["CATASTROPHIC_PANEL"] = "catastrophic_panel";
907
- PageObjectId["IFRAME_PANEL"] = "iframe_panel";
908
- PageObjectId["CONVERSATIONAL_SEARCH_CITATION_PANEL"] = "conversational_search_citation_panel";
909
- PageObjectId["CUSTOM_PANEL"] = "custom_panel";
910
- PageObjectId["BUTTON_RESPONSE_PANEL"] = "button_response_panel";
911
- })(PageObjectId || (PageObjectId = {}));
948
+ const WA_CONSOLE_PREFIX = "[Chat]";
949
+
950
+ const RIGHT_TO_LEFT_MARK = String.fromCharCode(8207);
951
+
952
+ const ENGLISH_US_DATE_FORMAT = "mm/dd/yyyy";
953
+
954
+ const RESPONSE_TYPE_TIMEOUT_MS = 2e4;
955
+
956
+ const DEFAULT_CUSTOM_PANEL_ID = "wac-default-panel";
957
+
958
+ function THROW_ERROR() {
959
+ throw Error("Not implemented.");
960
+ }
961
+
962
+ const AUTO_SCROLL_EXTRA = 28 - 8;
963
+
964
+ const ONE_LINE_MESSAGE_HEIGHT = 88;
965
+
966
+ const AUTO_SCROLL_THROTTLE_TIMEOUT = 100;
967
+
968
+ async function sleep(milliseconds) {
969
+ await new Promise(resolve => {
970
+ setTimeout(resolve, milliseconds);
971
+ });
972
+ }
973
+
974
+ function resolveOrTimeout(promise, duration, errorMessage) {
975
+ const timeout = new Promise((resolve, reject) => {
976
+ setTimeout(() => {
977
+ const message = errorMessage || `The operation timed out after ${duration}ms`;
978
+ reject(message);
979
+ }, duration);
980
+ });
981
+ return Promise.race([ promise, timeout ]);
982
+ }
983
+
984
+ let enableDebugLog = false;
985
+
986
+ function debugLog(message, ...args) {
987
+ if (enableDebugLog) {
988
+ console.log(`${WA_CONSOLE_PREFIX} ${message}`, ...args);
989
+ }
990
+ }
991
+
992
+ function consoleError(message, ...args) {
993
+ console.error(`${WA_CONSOLE_PREFIX} ${message}`, ...args);
994
+ }
995
+
996
+ function consoleLog(message, ...args) {
997
+ console.log(`${WA_CONSOLE_PREFIX} ${message}`, ...args);
998
+ }
999
+
1000
+ function consoleDebug(message, ...args) {
1001
+ console.debug(`${WA_CONSOLE_PREFIX} ${message}`, ...args);
1002
+ }
1003
+
1004
+ function consoleWarn(message, ...args) {
1005
+ console.warn(`${WA_CONSOLE_PREFIX} ${message}`, ...args);
1006
+ }
1007
+
1008
+ function setEnableDebugLog(debug) {
1009
+ enableDebugLog = debug;
1010
+ }
1011
+
1012
+ function isEnableDebugLog() {
1013
+ return enableDebugLog;
1014
+ }
1015
+
1016
+ async function safeFetchTextWithTimeout(response) {
1017
+ try {
1018
+ if (response) {
1019
+ return resolveOrTimeout(response.text(), 2e3, "Getting response text");
1020
+ }
1021
+ } catch (error) {
1022
+ consoleError("Error getting fetch text", error);
1023
+ }
1024
+ return undefined;
1025
+ }
1026
+
1027
+ function createDidCatchErrorData(component, error, errorInfo, isCatastrophicError) {
1028
+ return {
1029
+ errorType: OnErrorType.RENDER,
1030
+ message: `${component}.componentDidCatch`,
1031
+ otherData: {
1032
+ error,
1033
+ errorInfo
1034
+ },
1035
+ catastrophicErrorType: isCatastrophicError
1036
+ };
1037
+ }
1038
+
1039
+ function getResponsiveElementPaddingValue(baseHeight = 180) {
1040
+ return `${100 / (320 / baseHeight)}%`;
1041
+ }
1042
+
1043
+ function isValidForUpload(upload) {
1044
+ return upload.status === FileStatusValue.EDIT && !upload.isError;
1045
+ }
1046
+
1047
+ function callOnError(onError, data) {
1048
+ if (onError) {
1049
+ try {
1050
+ onError(data);
1051
+ } catch (error) {
1052
+ consoleError("Error calling onError", error);
1053
+ }
1054
+ }
1055
+ }
1056
+
1057
+ function normalizeModuleInterop(mod) {
1058
+ let resolved = mod;
1059
+ while (resolved && typeof resolved === "object" && "default" in resolved && resolved.default !== resolved) {
1060
+ resolved = resolved.default;
1061
+ }
1062
+ return resolved;
1063
+ }
1064
+
1065
+ const localeLoaders = {
1066
+ ar: () => import("dayjs/locale/ar.js").then(mod => normalizeModuleInterop(mod)),
1067
+ "ar-dz": () => import("dayjs/locale/ar-dz.js").then(mod => normalizeModuleInterop(mod)),
1068
+ "ar-kw": () => import("dayjs/locale/ar-kw.js").then(mod => normalizeModuleInterop(mod)),
1069
+ "ar-ly": () => import("dayjs/locale/ar-ly.js").then(mod => normalizeModuleInterop(mod)),
1070
+ "ar-ma": () => import("dayjs/locale/ar-ma.js").then(mod => normalizeModuleInterop(mod)),
1071
+ "ar-sa": () => import("dayjs/locale/ar-sa.js").then(mod => normalizeModuleInterop(mod)),
1072
+ "ar-tn": () => import("dayjs/locale/ar-tn.js").then(mod => normalizeModuleInterop(mod)),
1073
+ cs: () => import("dayjs/locale/cs.js").then(mod => normalizeModuleInterop(mod)),
1074
+ de: () => import("dayjs/locale/de.js").then(mod => normalizeModuleInterop(mod)),
1075
+ "de-at": () => import("dayjs/locale/de-at.js").then(mod => normalizeModuleInterop(mod)),
1076
+ "de-ch": () => import("dayjs/locale/de-ch.js").then(mod => normalizeModuleInterop(mod)),
1077
+ en: () => import("dayjs/locale/en.js").then(mod => normalizeModuleInterop(mod)),
1078
+ "en-au": () => import("dayjs/locale/en-au.js").then(mod => normalizeModuleInterop(mod)),
1079
+ "en-ca": () => import("dayjs/locale/en-ca.js").then(mod => normalizeModuleInterop(mod)),
1080
+ "en-gb": () => import("dayjs/locale/en-gb.js").then(mod => normalizeModuleInterop(mod)),
1081
+ "en-ie": () => import("dayjs/locale/en-ie.js").then(mod => normalizeModuleInterop(mod)),
1082
+ "en-il": () => import("dayjs/locale/en-il.js").then(mod => normalizeModuleInterop(mod)),
1083
+ "en-nz": () => import("dayjs/locale/en-nz.js").then(mod => normalizeModuleInterop(mod)),
1084
+ es: () => import("dayjs/locale/es.js").then(mod => normalizeModuleInterop(mod)),
1085
+ "es-do": () => import("dayjs/locale/es-do.js").then(mod => normalizeModuleInterop(mod)),
1086
+ "es-us": () => import("dayjs/locale/es-us.js").then(mod => normalizeModuleInterop(mod)),
1087
+ nl: () => import("dayjs/locale/nl.js").then(mod => normalizeModuleInterop(mod)),
1088
+ fr: () => import("dayjs/locale/fr.js").then(mod => normalizeModuleInterop(mod)),
1089
+ "fr-ca": () => import("dayjs/locale/fr-ca.js").then(mod => normalizeModuleInterop(mod)),
1090
+ "fr-ch": () => import("dayjs/locale/fr-ch.js").then(mod => normalizeModuleInterop(mod)),
1091
+ it: () => import("dayjs/locale/it.js").then(mod => normalizeModuleInterop(mod)),
1092
+ "it-ch": () => import("dayjs/locale/it-ch.js").then(mod => normalizeModuleInterop(mod)),
1093
+ ja: () => import("dayjs/locale/ja.js").then(mod => normalizeModuleInterop(mod)),
1094
+ ko: () => import("dayjs/locale/ko.js").then(mod => normalizeModuleInterop(mod)),
1095
+ pt: () => import("dayjs/locale/pt.js").then(mod => normalizeModuleInterop(mod)),
1096
+ "pt-br": () => import("dayjs/locale/pt-br.js").then(mod => normalizeModuleInterop(mod)),
1097
+ zh: () => import("dayjs/locale/zh-cn.js").then(mod => normalizeModuleInterop(mod)),
1098
+ "zh-cn": () => import("dayjs/locale/zh-cn.js").then(mod => normalizeModuleInterop(mod)),
1099
+ "zh-tw": () => import("dayjs/locale/zh-tw.js").then(mod => normalizeModuleInterop(mod)),
1100
+ "zh-mo": () => import("dayjs/locale/zh-tw.js").then(mod => normalizeModuleInterop(mod)),
1101
+ "zh-hk": () => import("dayjs/locale/zh-tw.js").then(mod => normalizeModuleInterop(mod))
1102
+ };
912
1103
 
913
- export { BusEventType as B, CornersType as C, ErrorType as E, FeedbackInteractionType as F, HumanAgentsOnlineStatus as H, IFrameItemDisplayOption as I, MessageSendSource as M, OnErrorType as O, PanelType as P, ScreenShareState as S, UserType as U, ViewType as V, WriteableElementName as W, ViewChangeReason as a, CancellationReason as b, CarbonTheme as c, MinimizeButtonIconType as d, enLanguagePack as e, FileStatusValue as f, ButtonItemKind as g, ButtonItemType as h, MessageInputType as i, MessageResponseTypes as j, OptionItemPreference as k, WidthOptions as l, HumanAgentMessageType as m, ChainOfThoughtStepStatus as n, MessageErrorState as o, PageObjectId as p, InternalMessageRequestType as q, MainWindowOpenReason as r, MainWindowCloseReason as s };
914
- //# sourceMappingURL=chat.PageObjectId.js.map
1104
+ function isSupportedLocale(locale, object) {
1105
+ if (!locale) {
1106
+ return null;
1107
+ }
1108
+ locale = locale.toLowerCase().replace(/_/g, "-");
1109
+ if (object[locale]) {
1110
+ return locale;
1111
+ }
1112
+ const language = locale.substring(0, 2);
1113
+ if (object[language]) {
1114
+ return language;
1115
+ }
1116
+ return null;
1117
+ }
1118
+
1119
+ function findSupportedKey(requestedLocale, object, objectType) {
1120
+ const requestedSupported = isSupportedLocale(requestedLocale, object);
1121
+ if (requestedSupported) {
1122
+ return requestedSupported;
1123
+ }
1124
+ if (requestedLocale) {
1125
+ const keyList = JSON.stringify(Object.keys(object));
1126
+ consoleError(`The requested locale "${requestedLocale}" does not contain a supported ${objectType}. We are defaulting to "en". The supported values are ${keyList}.`);
1127
+ }
1128
+ return "en";
1129
+ }
1130
+
1131
+ async function loadLocale(requestedLocale) {
1132
+ try {
1133
+ const localeKey = findSupportedKey(requestedLocale, localeLoaders, "locale");
1134
+ const localeModule = await localeLoaders[localeKey]();
1135
+ if (localeModule) {
1136
+ return localeModule;
1137
+ }
1138
+ consoleError(`The locale data for "${localeKey}" did not load. The application will default to "en".`);
1139
+ } catch (error) {
1140
+ consoleError(`An error occurred loading the locale data for "${requestedLocale}". The application will default to "en".`, error);
1141
+ }
1142
+ return enLocaleData;
1143
+ }
1144
+
1145
+ function handleBTag(chunks) {
1146
+ return React.createElement("b", null, chunks);
1147
+ }
1148
+
1149
+ function handleBRTag() {
1150
+ return React.createElement("br", null);
1151
+ }
1152
+
1153
+ function addHTMLSupport(values) {
1154
+ values.b = handleBTag;
1155
+ values.br = handleBRTag;
1156
+ return values;
1157
+ }
1158
+
1159
+ async function loadDayjsLocale(locale) {
1160
+ if (!dayjs.Ls[locale]) {
1161
+ const previousLocale = dayjs.locale();
1162
+ const localePack = await loadLocale(locale);
1163
+ dayjs.locale(localePack);
1164
+ dayjs.locale(previousLocale);
1165
+ const isLoaded = Boolean(dayjs.Ls[locale]);
1166
+ if (!isLoaded && locale.length === 2) {
1167
+ throw Error("Locale is not recognized.");
1168
+ } else if (!isLoaded) {
1169
+ return loadDayjsLocale(locale.substring(0, 2));
1170
+ }
1171
+ }
1172
+ return locale;
1173
+ }
1174
+
1175
+ export { ENGLISH_US_DATE_FORMAT as $, WA_CONSOLE_PREFIX as A, BusEventType as B, CornersType as C, DEFAULT_CUSTOM_PANEL_ID as D, ErrorType as E, FeedbackInteractionType as F, setEnableDebugLog as G, HumanAgentsOnlineStatus as H, IFrameItemDisplayOption as I, consoleDebug as J, resolveOrTimeout as K, loadLocale as L, MessageSendSource as M, MainWindowOpenReason as N, OnErrorType as O, PageObjectId as P, addHTMLSupport as Q, ReasoningStepOpenState as R, ScreenShareState as S, getResponsiveElementPaddingValue as T, UserType as U, ViewType as V, WriteableElementName as W, RESPONSE_TYPE_TIMEOUT_MS as X, THROW_ERROR as Y, RIGHT_TO_LEFT_MARK as Z, loadDayjsLocale as _, PanelType as a, createDidCatchErrorData as a0, AUTO_SCROLL_EXTRA as a1, ONE_LINE_MESSAGE_HEIGHT as a2, AUTO_SCROLL_THROTTLE_TIMEOUT as a3, isValidForUpload as a4, MainWindowCloseReason as a5, ViewChangeReason as b, CancellationReason as c, CarbonTheme as d, enLanguagePack as e, MinimizeButtonIconType as f, FileStatusValue as g, ButtonItemKind as h, ButtonItemType as i, MessageInputType as j, MessageResponseTypes as k, OptionItemPreference as l, WidthOptions as m, HumanAgentMessageType as n, MessageErrorState as o, normalizeModuleInterop as p, localeLoaders as q, InternalMessageRequestType as r, consoleError as s, debugLog as t, sleep as u, callOnError as v, consoleWarn as w, consoleLog as x, isEnableDebugLog as y, safeFetchTextWithTimeout as z };
1176
+ //# sourceMappingURL=chat.languages.js.map