@inkeep/agents-ui 0.15.28 → 0.15.30

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 (52) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.js +156 -158
  3. package/dist/primitives/components/embedded-chat.cjs +4 -4
  4. package/dist/primitives/components/embedded-chat.d.ts +6 -16
  5. package/dist/primitives/components/embedded-chat.js +809 -859
  6. package/dist/primitives/components/embedded-search.cjs +1 -1
  7. package/dist/primitives/components/embedded-search.d.ts +3 -4
  8. package/dist/primitives/components/embedded-search.js +290 -294
  9. package/dist/primitives/components/tagline-logo-icon.cjs +1 -1
  10. package/dist/primitives/components/tagline-logo-icon.js +11 -21
  11. package/dist/primitives/hooks/use-feedback-api.cjs +1 -0
  12. package/dist/primitives/hooks/use-feedback-api.d.ts +19 -0
  13. package/dist/primitives/hooks/use-feedback-api.js +37 -0
  14. package/dist/primitives/index.cjs +1 -1
  15. package/dist/primitives/index.js +134 -137
  16. package/dist/primitives/providers/base-events-provider.cjs +1 -1
  17. package/dist/primitives/providers/base-events-provider.js +1 -1
  18. package/dist/primitives/providers/feedback-provider.cjs +1 -1
  19. package/dist/primitives/providers/feedback-provider.d.ts +1 -1
  20. package/dist/primitives/providers/feedback-provider.js +57 -64
  21. package/dist/primitives/providers/index.cjs +1 -1
  22. package/dist/primitives/providers/index.d.ts +0 -1
  23. package/dist/primitives/providers/index.js +42 -45
  24. package/dist/primitives/utils/component-ids.cjs +1 -1
  25. package/dist/primitives/utils/component-ids.d.ts +2 -10
  26. package/dist/primitives/utils/component-ids.js +2 -6
  27. package/dist/react/embedded-chat.cjs +1 -1
  28. package/dist/react/embedded-chat.js +249 -265
  29. package/dist/react/embedded-search.cjs +1 -1
  30. package/dist/react/embedded-search.js +63 -64
  31. package/dist/react/index.cjs +1 -1
  32. package/dist/react/index.js +156 -158
  33. package/dist/styled/components/embedded-chat.cjs +1 -1
  34. package/dist/styled/components/embedded-chat.d.ts +2 -5
  35. package/dist/styled/components/embedded-chat.js +397 -441
  36. package/dist/styled/components/embedded-search.cjs +1 -1
  37. package/dist/styled/components/embedded-search.d.ts +1 -2
  38. package/dist/styled/components/embedded-search.js +119 -133
  39. package/dist/styled/components/index.cjs +1 -1
  40. package/dist/styled/components/index.js +12 -11
  41. package/dist/styled/components/message.cjs +1 -1
  42. package/dist/styled/components/message.d.ts +20 -0
  43. package/dist/styled/components/message.js +304 -228
  44. package/dist/styled/index.cjs +1 -1
  45. package/dist/styled/index.js +152 -154
  46. package/dist/styled/inkeep.css.cjs +82 -15
  47. package/dist/styled/inkeep.css.js +82 -15
  48. package/dist/types/events.d.ts +3 -17
  49. package/package.json +1 -1
  50. package/dist/primitives/providers/feedback-item-provider.cjs +0 -1
  51. package/dist/primitives/providers/feedback-item-provider.d.ts +0 -10
  52. package/dist/primitives/providers/feedback-item-provider.js +0 -16
@@ -1,82 +1,75 @@
1
1
  "use client";
2
- import { jsx as y } from "react/jsx-runtime";
3
- import { createContext as P, useContext as E, useState as m, useCallback as b } from "react";
4
- import { useChat as f } from "../components/embedded-chat/chat-provider.js";
5
- import { getMessageContent as l } from "../utils/misc.js";
6
- import { useInkeepConfig as N } from "./config-provider.js";
7
- import { useBaseEvents as M } from "./base-events-provider.js";
8
- const F = P(void 0);
9
- function S() {
10
- const { baseSettings: e } = N(), [s, n] = m(null), [k, g] = m({}), { conversationId: r } = f(), { messages: c } = f(), { analyticsProperties: C } = e, { logEvent: p } = M(), i = b(
11
- async (t, o, a = []) => {
12
- const d = await e.onFeedback?.({
13
- type: o,
14
- messageId: t,
15
- reasons: a,
16
- properties: C
17
- });
18
- d && g((u) => ({
19
- ...u,
20
- [t]: { type: d.type, messageId: t, reasons: d.reasons }
21
- }));
22
- const v = c.findIndex((u) => u.id === t), x = c[v], w = {
23
- conversationId: r,
24
- question: l(c[v - 1]),
25
- answer: l(x),
26
- messageId: t,
27
- reasons: a
2
+ import { jsx as E } from "react/jsx-runtime";
3
+ import { createContext as N, useContext as M, useState as k, useCallback as b } from "react";
4
+ import { useChat as U } from "../components/embedded-chat/chat-provider.js";
5
+ import { getMessageContent as p } from "../utils/misc.js";
6
+ import { useInkeepConfig as j } from "./config-provider.js";
7
+ import { useBaseEvents as q } from "./base-events-provider.js";
8
+ import { useFeedbackApi as y } from "../hooks/use-feedback-api.js";
9
+ const m = N(void 0);
10
+ function B() {
11
+ const { baseSettings: t, aiChatSettings: n } = j(), [v, f] = k(null), [F, l] = k({}), { conversationId: a, messages: c, authToken: C, getCaptchaHeader: g, invalidateCaptcha: h, refreshSession: _ } = U(), { analyticsProperties: w } = t, { logEvent: d } = q(), { submitFeedback: x } = y({
12
+ baseUrl: n.baseUrl,
13
+ appId: n.appId,
14
+ authToken: C,
15
+ getCaptchaHeader: g,
16
+ invalidateCaptcha: h,
17
+ refreshSession: _
18
+ }), r = b(
19
+ async (e, s, i) => {
20
+ l((o) => ({ ...o, [e]: { type: s, messageId: e, details: i } })), t.onFeedback ? t.onFeedback({ type: s, messageId: e, details: i, properties: w }).catch(
21
+ (o) => console.warn("[feedback] onFeedback error:", o)
22
+ ) : x({ conversationId: a, messageId: e, type: s, details: i }).catch(
23
+ (o) => console.warn("[feedback] submitFeedbackToApi error:", o)
24
+ );
25
+ const u = c.findIndex((o) => o.id === e), T = c[u], A = {
26
+ conversationId: a,
27
+ question: p(c[u - 1]),
28
+ answer: p(T),
29
+ messageId: e,
30
+ details: i
28
31
  };
29
- p({
30
- eventName: o === "positive" ? "assistant_positive_feedback_submitted" : "assistant_negative_feedback_submitted",
31
- properties: w
32
- }), o === "negative" && p({
32
+ d({
33
+ eventName: s === "positive" ? "assistant_positive_feedback_submitted" : "assistant_negative_feedback_submitted",
34
+ properties: A
35
+ }), s === "negative" && d({
33
36
  eventName: "user_escalation_indicated",
34
37
  properties: {
35
38
  escalationType: "downvote",
36
- conversationId: r
39
+ conversationId: a
37
40
  }
38
41
  });
39
42
  },
40
- [c, r]
41
- ), _ = b(
42
- async (t) => {
43
- i(t, "positive");
43
+ [c, a]
44
+ ), P = b(
45
+ async (e) => {
46
+ r(e, "positive");
44
47
  },
45
- [i]
46
- ), h = b(
47
- async (t, o) => {
48
- const a = j(o);
49
- i(t, "negative", a);
48
+ [r]
49
+ ), S = b(
50
+ async (e, s) => {
51
+ r(e, "negative", s);
50
52
  },
51
- [i]
53
+ [r]
52
54
  );
53
55
  return {
54
- feedback: k,
55
- currentFeedback: s,
56
- setCurrentFeedback: n,
57
- submitPositiveFeedback: _,
58
- submitNegativeFeedback: h
56
+ feedback: F,
57
+ currentFeedback: v,
58
+ setCurrentFeedback: f,
59
+ submitPositiveFeedback: P,
60
+ submitNegativeFeedback: S
59
61
  };
60
62
  }
61
- const A = ({ children: e }) => {
62
- const s = S();
63
- return /* @__PURE__ */ y(F.Provider, { value: s, children: e });
64
- }, D = () => {
65
- const e = E(F);
66
- if (!e)
63
+ const L = ({ children: t }) => {
64
+ const n = B();
65
+ return /* @__PURE__ */ E(m.Provider, { value: n, children: t });
66
+ }, O = () => {
67
+ const t = M(m);
68
+ if (!t)
67
69
  throw new Error("useFeedback must be used within a FeedbackProvider");
68
- return e;
70
+ return t;
69
71
  };
70
- function j(e) {
71
- const s = [];
72
- for (const n in e)
73
- e[n] === "on" && s.push({
74
- label: n,
75
- details: e[`${n}:description`] || ""
76
- });
77
- return s.length > 0 ? s : [];
78
- }
79
72
  export {
80
- A as FeedbackProvider,
81
- D as useMessageFeedback
73
+ L as FeedbackProvider,
74
+ O as useMessageFeedback
82
75
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./base-events-provider.cjs"),o=require("./chat-form-provider.cjs"),d=require("./chat-history-provider.cjs"),i=require("./config-provider.cjs"),u=require("./feedback-item-provider.cjs"),n=require("./feedback-provider.cjs"),v=require("./form-field-provider.cjs"),t=require("./help-menu-provider.cjs"),P=require("./markdown-provider.cjs"),s=require("./message-provider.cjs"),h=require("./root-provider.cjs"),b=require("./source-item-provider.cjs"),C=require("./theme-provider.cjs"),c=require("./widget-provider.cjs"),e=require("./sidebar-chat-provider.cjs"),r=require("./chat-bubble-provider.cjs");exports.BaseEventsProvider=a.BaseEventsProvider;exports.useBaseEvents=a.useBaseEvents;exports.ChatFormProvider=o.ChatFormProvider;exports.useChatForm=o.useChatForm;exports.useChatFormState=o.useChatFormState;exports.ChatHistoryProvider=d.ChatHistoryProvider;exports.useChatHistory=d.useChatHistory;exports.InkeepConfigProvider=i.InkeepConfigProvider;exports.WebWidgetInteractionType=i.WebWidgetInteractionType;exports.useInkeepConfig=i.useInkeepConfig;exports.FeedbackItemProvider=u.FeedbackItemProvider;exports.useFeedbackItem=u.useFeedbackItem;exports.FeedbackProvider=n.FeedbackProvider;exports.useMessageFeedback=n.useMessageFeedback;exports.FormFieldProvider=v.FormFieldProvider;exports.useFormField=v.useFormField;exports.HelpMenuProvider=t.HelpMenuProvider;exports.useHelpMenu=t.useHelpMenu;exports.useHelpMenuState=t.useHelpMenuState;exports.ChatMarkdownProvider=P.ChatMarkdownProvider;exports.useChatMarkdown=P.useChatMarkdown;exports.MessageProvider=s.MessageProvider;exports.useMessage=s.useMessage;exports.useOptionalMessage=s.useOptionalMessage;exports.RootProvider=h.RootProvider;exports.SourceItemProvider=b.SourceItemProvider;exports.useSourceItem=b.useSourceItem;exports.ThemeProvider=C.ThemeProvider;exports.WidgetProvider=c.WidgetProvider;exports.useWidget=c.useWidget;exports.SidebarChatProvider=e.SidebarChatProvider;exports.useInkeepSidebarChat=e.useInkeepSidebarChat;exports.useOptionalSidebarChat=e.useOptionalSidebarChat;exports.useSidebarChat=e.useSidebarChat;exports.ChatBubbleProvider=r.ChatBubbleProvider;exports.useChatBubble=r.useChatBubble;exports.useInkeepChatBubble=r.useInkeepChatBubble;exports.useOptionalChatBubble=r.useOptionalChatBubble;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./base-events-provider.cjs"),o=require("./chat-form-provider.cjs"),u=require("./chat-history-provider.cjs"),i=require("./config-provider.cjs"),d=require("./feedback-provider.cjs"),n=require("./form-field-provider.cjs"),t=require("./help-menu-provider.cjs"),v=require("./markdown-provider.cjs"),s=require("./message-provider.cjs"),b=require("./root-provider.cjs"),P=require("./source-item-provider.cjs"),C=require("./theme-provider.cjs"),h=require("./widget-provider.cjs"),e=require("./sidebar-chat-provider.cjs"),r=require("./chat-bubble-provider.cjs");exports.BaseEventsProvider=a.BaseEventsProvider;exports.useBaseEvents=a.useBaseEvents;exports.ChatFormProvider=o.ChatFormProvider;exports.useChatForm=o.useChatForm;exports.useChatFormState=o.useChatFormState;exports.ChatHistoryProvider=u.ChatHistoryProvider;exports.useChatHistory=u.useChatHistory;exports.InkeepConfigProvider=i.InkeepConfigProvider;exports.WebWidgetInteractionType=i.WebWidgetInteractionType;exports.useInkeepConfig=i.useInkeepConfig;exports.FeedbackProvider=d.FeedbackProvider;exports.useMessageFeedback=d.useMessageFeedback;exports.FormFieldProvider=n.FormFieldProvider;exports.useFormField=n.useFormField;exports.HelpMenuProvider=t.HelpMenuProvider;exports.useHelpMenu=t.useHelpMenu;exports.useHelpMenuState=t.useHelpMenuState;exports.ChatMarkdownProvider=v.ChatMarkdownProvider;exports.useChatMarkdown=v.useChatMarkdown;exports.MessageProvider=s.MessageProvider;exports.useMessage=s.useMessage;exports.useOptionalMessage=s.useOptionalMessage;exports.RootProvider=b.RootProvider;exports.SourceItemProvider=P.SourceItemProvider;exports.useSourceItem=P.useSourceItem;exports.ThemeProvider=C.ThemeProvider;exports.WidgetProvider=h.WidgetProvider;exports.useWidget=h.useWidget;exports.SidebarChatProvider=e.SidebarChatProvider;exports.useInkeepSidebarChat=e.useInkeepSidebarChat;exports.useOptionalSidebarChat=e.useOptionalSidebarChat;exports.useSidebarChat=e.useSidebarChat;exports.ChatBubbleProvider=r.ChatBubbleProvider;exports.useChatBubble=r.useChatBubble;exports.useInkeepChatBubble=r.useInkeepChatBubble;exports.useOptionalChatBubble=r.useOptionalChatBubble;
@@ -2,7 +2,6 @@ export * from './base-events-provider';
2
2
  export * from './chat-form-provider';
3
3
  export * from './chat-history-provider';
4
4
  export * from './config-provider';
5
- export * from './feedback-item-provider';
6
5
  export * from './feedback-provider';
7
6
  export * from './form-field-provider';
8
7
  export * from './help-menu-provider';
@@ -1,56 +1,53 @@
1
1
  import { BaseEventsProvider as o, useBaseEvents as t } from "./base-events-provider.js";
2
- import { ChatFormProvider as s, useChatForm as i, useChatFormState as d } from "./chat-form-provider.js";
2
+ import { ChatFormProvider as s, useChatForm as i, useChatFormState as u } from "./chat-form-provider.js";
3
3
  import { ChatHistoryProvider as p, useChatHistory as m } from "./chat-history-provider.js";
4
- import { InkeepConfigProvider as n, WebWidgetInteractionType as v, useInkeepConfig as b } from "./config-provider.js";
5
- import { FeedbackItemProvider as h, useFeedbackItem as x } from "./feedback-item-provider.js";
6
- import { FeedbackProvider as l, useMessageFeedback as F } from "./feedback-provider.js";
7
- import { FormFieldProvider as g, useFormField as I } from "./form-field-provider.js";
8
- import { HelpMenuProvider as S, useHelpMenu as c, useHelpMenuState as B } from "./help-menu-provider.js";
9
- import { ChatMarkdownProvider as W, useChatMarkdown as y } from "./markdown-provider.js";
10
- import { MessageProvider as w, useMessage as E, useOptionalMessage as T } from "./message-provider.js";
11
- import { RootProvider as j } from "./root-provider.js";
12
- import { SourceItemProvider as z, useSourceItem as A } from "./source-item-provider.js";
13
- import { ThemeProvider as G } from "./theme-provider.js";
14
- import { WidgetProvider as K, useWidget as L } from "./widget-provider.js";
15
- import { SidebarChatProvider as Q, useInkeepSidebarChat as U, useOptionalSidebarChat as V, useSidebarChat as X } from "./sidebar-chat-provider.js";
16
- import { ChatBubbleProvider as Z, useChatBubble as _, useInkeepChatBubble as $, useOptionalChatBubble as ee } from "./chat-bubble-provider.js";
4
+ import { InkeepConfigProvider as f, WebWidgetInteractionType as v, useInkeepConfig as C } from "./config-provider.js";
5
+ import { FeedbackProvider as b, useMessageFeedback as x } from "./feedback-provider.js";
6
+ import { FormFieldProvider as l, useFormField as g } from "./form-field-provider.js";
7
+ import { HelpMenuProvider as M, useHelpMenu as k, useHelpMenuState as S } from "./help-menu-provider.js";
8
+ import { ChatMarkdownProvider as B, useChatMarkdown as c } from "./markdown-provider.js";
9
+ import { MessageProvider as W, useMessage as y, useOptionalMessage as O } from "./message-provider.js";
10
+ import { RootProvider as E } from "./root-provider.js";
11
+ import { SourceItemProvider as R, useSourceItem as j } from "./source-item-provider.js";
12
+ import { ThemeProvider as z } from "./theme-provider.js";
13
+ import { WidgetProvider as D, useWidget as G } from "./widget-provider.js";
14
+ import { SidebarChatProvider as K, useInkeepSidebarChat as L, useOptionalSidebarChat as N, useSidebarChat as Q } from "./sidebar-chat-provider.js";
15
+ import { ChatBubbleProvider as V, useChatBubble as X, useInkeepChatBubble as Y, useOptionalChatBubble as Z } from "./chat-bubble-provider.js";
17
16
  export {
18
17
  o as BaseEventsProvider,
19
- Z as ChatBubbleProvider,
18
+ V as ChatBubbleProvider,
20
19
  s as ChatFormProvider,
21
20
  p as ChatHistoryProvider,
22
- W as ChatMarkdownProvider,
23
- h as FeedbackItemProvider,
24
- l as FeedbackProvider,
25
- g as FormFieldProvider,
26
- S as HelpMenuProvider,
27
- n as InkeepConfigProvider,
28
- w as MessageProvider,
29
- j as RootProvider,
30
- Q as SidebarChatProvider,
31
- z as SourceItemProvider,
32
- G as ThemeProvider,
21
+ B as ChatMarkdownProvider,
22
+ b as FeedbackProvider,
23
+ l as FormFieldProvider,
24
+ M as HelpMenuProvider,
25
+ f as InkeepConfigProvider,
26
+ W as MessageProvider,
27
+ E as RootProvider,
28
+ K as SidebarChatProvider,
29
+ R as SourceItemProvider,
30
+ z as ThemeProvider,
33
31
  v as WebWidgetInteractionType,
34
- K as WidgetProvider,
32
+ D as WidgetProvider,
35
33
  t as useBaseEvents,
36
- _ as useChatBubble,
34
+ X as useChatBubble,
37
35
  i as useChatForm,
38
- d as useChatFormState,
36
+ u as useChatFormState,
39
37
  m as useChatHistory,
40
- y as useChatMarkdown,
41
- x as useFeedbackItem,
42
- I as useFormField,
43
- c as useHelpMenu,
44
- B as useHelpMenuState,
45
- $ as useInkeepChatBubble,
46
- b as useInkeepConfig,
47
- U as useInkeepSidebarChat,
48
- E as useMessage,
49
- F as useMessageFeedback,
50
- ee as useOptionalChatBubble,
51
- T as useOptionalMessage,
52
- V as useOptionalSidebarChat,
53
- X as useSidebarChat,
54
- A as useSourceItem,
55
- L as useWidget
38
+ c as useChatMarkdown,
39
+ g as useFormField,
40
+ k as useHelpMenu,
41
+ S as useHelpMenuState,
42
+ Y as useInkeepChatBubble,
43
+ C as useInkeepConfig,
44
+ L as useInkeepSidebarChat,
45
+ y as useMessage,
46
+ x as useMessageFeedback,
47
+ Z as useOptionalChatBubble,
48
+ O as useOptionalMessage,
49
+ N as useOptionalSidebarChat,
50
+ Q as useSidebarChat,
51
+ j as useSourceItem,
52
+ G as useWidget
56
53
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a={icon:"icon",loadingIndicator__Text:"loadingIndicator__Text",loadingIndicator__Dots:"loadingIndicator__Dots",loadingIndicator__Dot:"loadingIndicator__Dot",view_toggle:"view_toggle",view_toggle_button:"view_toggle_button",view_toggle_icon:"view_toggle_icon"},e={codeblockContainer:"codeblockContainer",codeblockHeader:"codeblockHeader",codeblockHeaderLanguage:"codeblockHeaderLanguage",codeblockCopyButton:"codeblockCopyButton",codeblockHighlighterWrapper:"codeblockHighlighterWrapper",codeblockHighlighter:"codeblockHighlighter",codeblockCode:"codeblockCode",markdownH1:"markdownH1",markdownH2:"markdownH2",markdownP:"markdownP",markdownLi:"markdownLi",markdownUl:"markdownUl",markdownOl:"markdownOl",markdownLink:"markdownLink",markdownSourceLink:"markdownSourceLink",markdownTable:"markdownTable",markdownTh:"markdownTh",markdownTd:"markdownTd",markdownCode:"markdownCode",markdownInput:"markdownInput",markdownSup:"markdownSup",markdownImg:"markdownImg",markdownHr:"markdownHr"},t={aiChatWrapper:"aiChatWrapper",aiChatRoot:"aiChatRoot",aiChatHeader:"aiChatHeader",aiChatHeader__Toolbar:"aiChatHeader__Toolbar",aiChatHeader__ToolbarHeader:"aiChatHeader__ToolbarHeader",aiChatHeader__ToolbarHeaderWrapper:"aiChatHeader__ToolbarHeaderWrapper",aiChatHeader__ChatHistoryButtonIcon:"aiChatHeader__ChatHistoryButtonIcon",aiChatHeader__ChatHistoryButton:"aiChatHeader__ChatHistoryButton",aiChatContent:"aiChatContent",aiChatContentScrollArea:"aiChatContentScrollArea",aiChatContentScrollArea__Viewport:"aiChatContentScrollArea__Viewport",aiChatContentScrollArea__Scrollbar:"aiChatContentScrollArea__Scrollbar",aiChatContentScrollArea__Thumb:"aiChatContentScrollArea__Thumb",aiChatContentScrollArea__Corner:"aiChatContentScrollArea__Corner",aiChatDisclaimer:"aiChatDisclaimer",aiChatDisclaimerLabel:"aiChatDisclaimerLabel",aiChatDisclaimerTrigger:"aiChatDisclaimerTrigger",aiChatDisclaimerContent:"aiChatDisclaimerContent",aiChatDisclaimerText:"aiChatDisclaimerText",aiChatDisclaimerArrow:"aiChatDisclaimerArrow",aiChatExampleQuestions:"aiChatExampleQuestions",aiChatExampleQuestionsLabel:"aiChatExampleQuestionsLabel",aiChatExampleQuestionsList:"aiChatExampleQuestionsList",aiChatExampleQuestion:"aiChatExampleQuestion",aiChatExampleQuestionButton:"aiChatExampleQuestionButton",aiChatMessages:"aiChatMessages",aiChatMessageWrapper:"aiChatMessageWrapper",aiChatMessageHeader:"aiChatMessageHeader",aiChatMessageLoading:"aiChatMessageLoading",aiChatMessageAvatar:"aiChatMessageAvatar",aiChatMessageAvatarFallback:"aiChatMessageAvatarFallback",aiChatMessageAvatarImage:"aiChatMessageAvatarImage",aiChatMessageAvatarContent:"aiChatMessageAvatarContent",aiChatMessageName:"aiChatMessageName",aiChatMessageContentWrapper:"aiChatMessageContentWrapper",aiChatMessageContent:"aiChatMessageContent",aiChatMessage__Files:"aiChatMessage__Files",aiChatMessage__File:"aiChatMessage__File",aiChatMessagePart:"aiChatMessagePart",aiChatMessageToolbar:"aiChatMessageToolbar",aiChatMessageCustomActions:"aiChatMessageCustomActions",aiChatMessageCustomAction:"aiChatMessageCustomAction",aiChatMessageAction:"aiChatMessageAction",aiChatMessageSources:"aiChatMessageSources",aiChatMessageSources__Header:"aiChatMessageSources__Header",aiChatMessageSources__List:"aiChatMessageSources__List",aiChatMessageSourceItem:"aiChatMessageSourceItem",aiChatMessageSourceItem__Icon:"aiChatMessageSourceItem__Icon",aiChatMessageSourceItem__Breadcrumbs:"aiChatMessageSourceItem__Breadcrumbs",aiChatMessageSourceItem__Breadcrumb:"aiChatMessageSourceItem__Breadcrumb",aiChatMessageSourceItem__BreadcrumbIcon:"aiChatMessageSourceItem__BreadcrumbIcon",aiChatMessageSourceItem__Title:"aiChatMessageSourceItem__Title",aiChatMessageSourceItem__Tag:"aiChatMessageSourceItem__Tag",aiChatMessageSourceItem__Description:"aiChatMessageSourceItem__Description",aiChatMessageSourceItem__DescriptionPart:"aiChatMessageSourceItem__DescriptionPart",aiChatMessageSourceItem__Indicator:"aiChatMessageSourceItem__Indicator",aiChatFooter:"aiChatFooter",aiChatInput__Fieldset:"aiChatInput__Fieldset",aiChatInput__Group:"aiChatInput__Group",aiChatInput:"aiChatInput",aiChatInput__SendButton:"aiChatInput__SendButton",aiChatInput__SendButtonIcon:"aiChatInput__SendButtonIcon",aiChatInput__FileUploadButton:"aiChatInput__FileUploadButton",aiChatInput__FileUploadButtonIcon:"aiChatInput__FileUploadButtonIcon",aiChatInput__FileInput:"aiChatInput__FileInput",aiChatInput__FileList:"aiChatInput__FileList",aiChatInput__FileItem:"aiChatInput__FileItem",aiChatInput__FilePreviewTrigger:"aiChatInput__FilePreviewTrigger",aiChatInput__FileContent:"aiChatInput__FileContent",aiChatInput__FileThumbnail:"aiChatInput__FileThumbnail",aiChatInput__FileName:"aiChatInput__FileName",aiChatInput__FileRemove:"aiChatInput__FileRemove",aiChatInput__FileRemoveIcon:"aiChatInput__FileRemoveIcon",aiChatInput__DropZone:"aiChatInput__DropZone",aiChatInput__Notification:"aiChatInput__Notification",aiChatInput__NotificationContent:"aiChatInput__NotificationContent",aiChatInput__NotificationHeader:"aiChatInput__NotificationHeader",aiChatInput__NotificationTitle:"aiChatInput__NotificationTitle",aiChatInput__NotificationMessage:"aiChatInput__NotificationMessage",aiChatInput__NotificationClose:"aiChatInput__NotificationClose",aiChatActionBar:"aiChatActionBar",aiChat__ChatActions:"aiChat__ChatActions",aiChat__ChatAction:"aiChat__ChatAction",aiChat__ChatActionLabel:"aiChat__ChatActionLabel",aiChat__ChatActionFeeback:"aiChat__ChatActionFeeback",aiChatHelpActions:"aiChatHelpActions",aiChatHelpAction:"aiChatHelpAction",aiChatHelpActions__Trigger:"aiChatHelpActions__Trigger",aiChatHelpActions__Menu:"aiChatHelpActions__Menu",aiChatHelpActions__MenuArrow:"aiChatHelpActions__MenuArrow",aiChatHelpActions__MenuItem:"aiChatHelpActions__MenuItem",aiChatHelpActions_MenuItemIcon:"aiChatHelpActions_MenuItemIcon",aiChatTagline__Container:"aiChatTagline__Container",aiChatTagline__Text:"aiChatTagline__Text",aiChatTagline__Logo:"aiChatTagline__Logo",aiChatTagline__BrandName:"aiChatTagline__BrandName",aiChatFeedbackModal:"aiChatFeedbackModal",aiChatFeedbackModal__Overlay:"aiChatFeedbackModal__Overlay",aiChatFeedbackModal__Content:"aiChatFeedbackModal__Content",aiChatFeedbackModal__Header:"aiChatFeedbackModal__Header",aiChatFeedbackModal__Close:"aiChatFeedbackModal__Close",aiChatFeedbackModal__Body:"aiChatFeedbackModal__Body",aiChatImagePreviewModal:"aiChatImagePreviewModal",aiChatImagePreviewModal__Overlay:"aiChatImagePreviewModal__Overlay",aiChatImagePreviewModal__Content:"aiChatImagePreviewModal__Content",aiChatImagePreviewModal__Image:"aiChatImagePreviewModal__Image",aiChatImagePreviewModal__Footer:"aiChatImagePreviewModal__Footer",aiChatImagePreviewModal__FileName:"aiChatImagePreviewModal__FileName",aiChatImagePreviewModal__Close:"aiChatImagePreviewModal__Close",aiChatFeedbackForm:"aiChatFeedbackForm",aiChatFeedbackItem:"aiChatFeedbackItem",aiChatFeedbackItem__Checkbox:"aiChatFeedbackItem__Checkbox",aiChatFeedbackItem__CheckboxIndicator:"aiChatFeedbackItem__CheckboxIndicator",aiChatFeedbackItem__Label:"aiChatFeedbackItem__Label",aiChatFeedbackItem__Description:"aiChatFeedbackItem__Description",aiChatFeedbackForm__SubmitButton:"aiChatFeedbackForm__SubmitButton",aiChatForm__Wrapper:"aiChatForm__Wrapper",aiChatForm:"aiChatForm",aiChatForm__Close:"aiChatForm__Close",aiChatForm__Header:"aiChatForm__Header",aiChatForm__Heading:"aiChatForm__Heading",aiChatForm__Description:"aiChatForm__Description",aiChatForm__Content:"aiChatForm__Content",aiChatForm__Field:"aiChatForm__Field",aiChatForm__FieldLabel:"aiChatForm__FieldLabel",aiChatForm__FieldText:"aiChatForm__FieldText",aiChatForm__FieldEmail:"aiChatForm__FieldEmail",aiChatForm__FieldFile:"aiChatForm__FieldFile",aiChatForm__FieldTextArea:"aiChatForm__FieldTextArea",aiChatForm__FieldCheckbox:"aiChatForm__FieldCheckbox",aiChatForm__FieldCheckboxIndicator:"aiChatForm__FieldCheckboxIndicator",aiChatForm__FieldSelect:"aiChatForm__FieldSelect",aiChatForm__FieldSelect__Trigger:"aiChatForm__FieldSelect__Trigger",aiChatForm__FieldSelect__Value:"aiChatForm__FieldSelect__Value",aiChatForm__FieldSelect__Icon:"aiChatForm__FieldSelect__Icon",aiChatForm__FieldSelect__Content:"aiChatForm__FieldSelect__Content",aiChatForm__FieldSelect__Viewport:"aiChatForm__FieldSelect__Viewport",aiChatForm__FieldSelect__Item:"aiChatForm__FieldSelect__Item",aiChatForm__FieldSelect__ItemIndicator:"aiChatForm__FieldSelect__ItemIndicator",aiChatForm__FieldSelect__ItemText:"aiChatForm__FieldSelect__ItemText",aiChatForm__FieldCombobox__Control:"aiChatForm__FieldCombobox__Control",aiChatForm__FieldCombobox__Positioner:"aiChatForm__FieldCombobox__Positioner",aiChatForm__FieldCombobox__Input:"aiChatForm__FieldCombobox__Input",aiChatForm__FieldCombobox__Trigger:"aiChatForm__FieldCombobox__Trigger",aiChatForm__FieldCombobox__SelectedTags:"aiChatForm__FieldCombobox__SelectedTags",aiChatForm__FieldCombobox__Content:"aiChatForm__FieldCombobox__Content",aiChatForm__FieldCombobox__List:"aiChatForm__FieldCombobox__List",aiChatForm__FieldCombobox__ListEmpty:"aiChatForm__FieldCombobox__ListEmpty",aiChatForm__FieldCombobox__Item:"aiChatForm__FieldCombobox__Item",aiChatForm__FieldCombobox__ItemText:"aiChatForm__FieldCombobox__ItemText",aiChatForm__FieldCombobox__ItemIndicator:"aiChatForm__FieldCombobox__ItemIndicator",aiChatForm__FieldDescription:"aiChatForm__FieldDescription",aiChatForm__FieldError:"aiChatForm__FieldError",aiChatForm__Error:"aiChatForm__Error",aiChatForm__Footer:"aiChatForm__Footer",aiChatForm__Cancel:"aiChatForm__Cancel",aiChatForm__Submit:"aiChatForm__Submit",aiChatForm__Success:"aiChatForm__Success",aiChatForm__SuccessHeading:"aiChatForm__SuccessHeading",aiChatForm__SuccessMessage:"aiChatForm__SuccessMessage",aiChatForm__SuccessButton:"aiChatForm__SuccessButton",aiChatLink:"aiChatLink"},_={aiSearchWrapper:"aiSearchWrapper",aiSearchRoot:"aiSearchRoot",aiSearchContent:"aiSearchContent",aiSearchInputGroup:"aiSearchInputGroup",aiSearchInputIcon:"aiSearchInputIcon",aiSearchInput:"aiSearchInput",aiSearchLoading:"aiSearchLoading",aiAskAITrigger:"aiAskAITrigger",aiAskAITrigger__Icon:"aiAskAITrigger__Icon",aiAskAITrigger__Label:"aiAskAITrigger__Label",aiAskAITrigger__Query:"aiAskAITrigger__Query",aiAskAITrigger__Indicator:"aiAskAITrigger__Indicator",aiAskAITrigger__IndicatorText:"aiAskAITrigger__IndicatorText",aiSearchResults:"aiSearchResults",aiSearchResults__Loading:"aiSearchResults__Loading",aiSearchResults__Empty:"aiSearchResults__Empty",aiSearchResults__TabList:"aiSearchResults__TabList",aiSearchResults__Tab:"aiSearchResults__Tab",aiSearchResults__Content:"aiSearchResults__Content",aiSearchResults__ScrollArea:"aiSearchResults__ScrollArea",aiSearchResults__ScrollAreaViewport:"aiSearchResults__ScrollAreaViewport",aiSearchResults__List:"aiSearchResults__List",aiSearchResults__Item:"aiSearchResults__Item",aiSearchResults__ItemIcon:"aiSearchResults__ItemIcon",aiSearchResults__ItemBreadcrumbs:"aiSearchResults__ItemBreadcrumbs",aiSearchResults__ItemBreadcrumbIcon:"aiSearchResults__ItemBreadcrumbIcon",aiSearchResults__ItemTitle:"aiSearchResults__ItemTitle",aiSearchResults__ItemTag:"aiSearchResults__ItemTag",aiSearchResults__ItemDescription:"aiSearchResults__ItemDescription",aiSearchResults__ItemDescriptionPart:"aiSearchResults__ItemDescriptionPart",aiSearchResults__ItemIndicator:"aiSearchResults__ItemIndicator",aiSearchResults__ItemPreview:"aiSearchResults__ItemPreview",aiSearchResults__ItemPreview__Header:"aiSearchResults__ItemPreview__Header",aiSearchResults__ItemPreview__Heading:"aiSearchResults__ItemPreview__Heading",aiSearchResults__ItemPreview__Title:"aiSearchResults__ItemPreview__Title",aiSearchResults__ItemPreview__Title__LinkIcon:"aiSearchResults__ItemPreview__Title__LinkIcon",aiSearchResults__ItemPreview__Breadcrumbs:"aiSearchResults__ItemPreview__Breadcrumbs",aiSearchResults__ItemPreview__BreadcrumbIcon:"aiSearchResults__ItemPreview__BreadcrumbIcon",aiSearchResults__ItemPreview__Body:"aiSearchResults__ItemPreview__Body",aiSearchResults__ItemPreview__Outline:"aiSearchResults__ItemPreview__Outline",aiSearchResults__ItemPreview__Outline__Title:"aiSearchResults__ItemPreview__Outline__Title",aiSearchResults__ItemPreview__Outline__List:"aiSearchResults__ItemPreview__Outline__List",aiSearchResults__ItemPreview__Outline__Item:"aiSearchResults__ItemPreview__Outline__Item",aiSearchResults__ItemPreview__Outline__ItemIcon:"aiSearchResults__ItemPreview__Outline__ItemIcon",aiSearchResults__ItemPreview__Outline__ItemText:"aiSearchResults__ItemPreview__Outline__ItemText",aiSearchResults__ItemPreview__Outline__ItemLinkIcon:"aiSearchResults__ItemPreview__Outline__ItemLinkIcon",aiSearchResults__ScrollAreaScrollbar:"aiSearchResults__ScrollAreaScrollbar",aiSearchResults__ScrollAreaThumb:"aiSearchResults__ScrollAreaThumb",aiSearchResults__ScrollAreaCorner:"aiSearchResults__ScrollAreaCorner",aiSearchFooter:"aiSearchFooter",aiSearchTagline__Container:"aiSearchTagline__Container",aiSearchTagline__Text:"aiSearchTagline__Text",aiSearchTagline__Logo:"aiSearchTagline__Logo",aiSearchTagline__BrandName:"aiSearchTagline__BrandName"},i={modal:"modal",modal__Overlay:"modal__Overlay",modal__Content:"modal__Content",modal__Close:"modal__Close"},o={chatButton__Text:"chatButton__Text",chatButton__Button:"chatButton__Button",chatButton__Container:"chatButton__Container",chatButton__AvatarImage:"chatButton__AvatarImage",chatButton__AvatarContent:"chatButton__AvatarContent",chatButton__CloseIcon:"chatButton__CloseIcon"},r={searchBar__Container:"searchBar__Container",searchBar__Button:"searchBar__Button",searchBar__ContentWrapper:"searchBar__ContentWrapper",searchBar__Text:"searchBar__Text",searchBar__Icon:"searchBar__Icon",searchBar__KbdWrapper:"searchBar__KbdWrapper",searchBar__CmdIcon:"searchBar__CmdIcon",searchBar__Ctrl:"searchBar__Ctrl",searchBar__KbdShortcutKey:"searchBar__KbdShortcutKey"},n={sidebarChat__Root:"sidebarChat__Root",sidebarChat__Resizer:"sidebarChat__Resizer",sidebarChat__CloseButton:"sidebarChat__CloseButton",sidebarChat__Header:"sidebarChat__Header"},h={chatBubble__Root:"chatBubble__Root",chatBubble__CloseButton:"chatBubble__CloseButton",chatBubble__Header:"chatBubble__Header"},s={dataSummary__Group:"dataSummary__Group",dataSummary__Toggle:"dataSummary__Toggle",dataSummary__ToggleText:"dataSummary__ToggleText",dataSummary__Collapsible:"dataSummary__Collapsible",dataSummary__List:"dataSummary__List",dataSummary__Item:"dataSummary__Item",dataSummary__Connector:"dataSummary__Connector",dataSummary__IconContainer:"dataSummary__IconContainer",dataSummary__Content:"dataSummary__Content",dataSummary__Details:"dataSummary__Details",dataSummary__Label:"dataSummary__Label"},C={aiChatHistory:"aiChatHistory",aiChatHistory__Header:"aiChatHistory__Header",aiChatHistory__BackButton:"aiChatHistory__BackButton",aiChatHistory__BackButtonIcon:"aiChatHistory__BackButtonIcon",aiChatHistory__Title:"aiChatHistory__Title",aiChatHistory__List:"aiChatHistory__List",aiChatHistory__Item:"aiChatHistory__Item",aiChatHistory__ItemTitle:"aiChatHistory__ItemTitle",aiChatHistory__ItemDate:"aiChatHistory__ItemDate",aiChatHistory__EmptyState:"aiChatHistory__EmptyState",aiChatHistory__LoadingState:"aiChatHistory__LoadingState",aiChatHistory__Footer:"aiChatHistory__Footer",aiChatHistory__NewConversationButton:"aiChatHistory__NewConversationButton"},l={...e,...t,..._,...i,...o,...r,...a,...n,...h,...s,...C};exports.ChatBubbleComponentIds=h;exports.DataSummaryComponentIds=s;exports.SearchBarComponentIds=r;exports.SidebarChatComponentIds=n;exports.aiChatComponentIds=t;exports.aiChatHistoryComponentIds=C;exports.aiSearchComponentIds=_;exports.chatButtonComponentIds=o;exports.componentIDs=l;exports.markDownComponentIds=e;exports.miscellanousComponentIds=a;exports.modalComponentIds=i;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a={icon:"icon",loadingIndicator__Text:"loadingIndicator__Text",loadingIndicator__Dots:"loadingIndicator__Dots",loadingIndicator__Dot:"loadingIndicator__Dot",view_toggle:"view_toggle",view_toggle_button:"view_toggle_button",view_toggle_icon:"view_toggle_icon"},e={codeblockContainer:"codeblockContainer",codeblockHeader:"codeblockHeader",codeblockHeaderLanguage:"codeblockHeaderLanguage",codeblockCopyButton:"codeblockCopyButton",codeblockHighlighterWrapper:"codeblockHighlighterWrapper",codeblockHighlighter:"codeblockHighlighter",codeblockCode:"codeblockCode",markdownH1:"markdownH1",markdownH2:"markdownH2",markdownP:"markdownP",markdownLi:"markdownLi",markdownUl:"markdownUl",markdownOl:"markdownOl",markdownLink:"markdownLink",markdownSourceLink:"markdownSourceLink",markdownTable:"markdownTable",markdownTh:"markdownTh",markdownTd:"markdownTd",markdownCode:"markdownCode",markdownInput:"markdownInput",markdownSup:"markdownSup",markdownImg:"markdownImg",markdownHr:"markdownHr"},t={aiChatWrapper:"aiChatWrapper",aiChatRoot:"aiChatRoot",aiChatHeader:"aiChatHeader",aiChatHeader__Toolbar:"aiChatHeader__Toolbar",aiChatHeader__ToolbarHeader:"aiChatHeader__ToolbarHeader",aiChatHeader__ToolbarHeaderWrapper:"aiChatHeader__ToolbarHeaderWrapper",aiChatHeader__ChatHistoryButtonIcon:"aiChatHeader__ChatHistoryButtonIcon",aiChatHeader__ChatHistoryButton:"aiChatHeader__ChatHistoryButton",aiChatContent:"aiChatContent",aiChatContentScrollArea:"aiChatContentScrollArea",aiChatContentScrollArea__Viewport:"aiChatContentScrollArea__Viewport",aiChatContentScrollArea__Scrollbar:"aiChatContentScrollArea__Scrollbar",aiChatContentScrollArea__Thumb:"aiChatContentScrollArea__Thumb",aiChatContentScrollArea__Corner:"aiChatContentScrollArea__Corner",aiChatDisclaimer:"aiChatDisclaimer",aiChatDisclaimerLabel:"aiChatDisclaimerLabel",aiChatDisclaimerTrigger:"aiChatDisclaimerTrigger",aiChatDisclaimerContent:"aiChatDisclaimerContent",aiChatDisclaimerText:"aiChatDisclaimerText",aiChatDisclaimerArrow:"aiChatDisclaimerArrow",aiChatExampleQuestions:"aiChatExampleQuestions",aiChatExampleQuestionsLabel:"aiChatExampleQuestionsLabel",aiChatExampleQuestionsList:"aiChatExampleQuestionsList",aiChatExampleQuestion:"aiChatExampleQuestion",aiChatExampleQuestionButton:"aiChatExampleQuestionButton",aiChatMessages:"aiChatMessages",aiChatMessageWrapper:"aiChatMessageWrapper",aiChatMessageHeader:"aiChatMessageHeader",aiChatMessageLoading:"aiChatMessageLoading",aiChatMessageAvatar:"aiChatMessageAvatar",aiChatMessageAvatarFallback:"aiChatMessageAvatarFallback",aiChatMessageAvatarImage:"aiChatMessageAvatarImage",aiChatMessageAvatarContent:"aiChatMessageAvatarContent",aiChatMessageName:"aiChatMessageName",aiChatMessageContentWrapper:"aiChatMessageContentWrapper",aiChatMessageContent:"aiChatMessageContent",aiChatMessage__Files:"aiChatMessage__Files",aiChatMessage__File:"aiChatMessage__File",aiChatMessagePart:"aiChatMessagePart",aiChatMessageToolbar:"aiChatMessageToolbar",aiChatMessageCustomActions:"aiChatMessageCustomActions",aiChatMessageCustomAction:"aiChatMessageCustomAction",aiChatMessageAction:"aiChatMessageAction",aiChatMessageSources:"aiChatMessageSources",aiChatMessageSources__Header:"aiChatMessageSources__Header",aiChatMessageSources__List:"aiChatMessageSources__List",aiChatMessageSourceItem:"aiChatMessageSourceItem",aiChatMessageSourceItem__Icon:"aiChatMessageSourceItem__Icon",aiChatMessageSourceItem__Breadcrumbs:"aiChatMessageSourceItem__Breadcrumbs",aiChatMessageSourceItem__Breadcrumb:"aiChatMessageSourceItem__Breadcrumb",aiChatMessageSourceItem__BreadcrumbIcon:"aiChatMessageSourceItem__BreadcrumbIcon",aiChatMessageSourceItem__Title:"aiChatMessageSourceItem__Title",aiChatMessageSourceItem__Tag:"aiChatMessageSourceItem__Tag",aiChatMessageSourceItem__Description:"aiChatMessageSourceItem__Description",aiChatMessageSourceItem__DescriptionPart:"aiChatMessageSourceItem__DescriptionPart",aiChatMessageSourceItem__Indicator:"aiChatMessageSourceItem__Indicator",aiChatFooter:"aiChatFooter",aiChatInput__Fieldset:"aiChatInput__Fieldset",aiChatInput__Group:"aiChatInput__Group",aiChatInput:"aiChatInput",aiChatInput__SendButton:"aiChatInput__SendButton",aiChatInput__SendButtonIcon:"aiChatInput__SendButtonIcon",aiChatInput__FileUploadButton:"aiChatInput__FileUploadButton",aiChatInput__FileUploadButtonIcon:"aiChatInput__FileUploadButtonIcon",aiChatInput__FileInput:"aiChatInput__FileInput",aiChatInput__FileList:"aiChatInput__FileList",aiChatInput__FileItem:"aiChatInput__FileItem",aiChatInput__FilePreviewTrigger:"aiChatInput__FilePreviewTrigger",aiChatInput__FileContent:"aiChatInput__FileContent",aiChatInput__FileThumbnail:"aiChatInput__FileThumbnail",aiChatInput__FileName:"aiChatInput__FileName",aiChatInput__FileRemove:"aiChatInput__FileRemove",aiChatInput__FileRemoveIcon:"aiChatInput__FileRemoveIcon",aiChatInput__DropZone:"aiChatInput__DropZone",aiChatInput__Notification:"aiChatInput__Notification",aiChatInput__NotificationContent:"aiChatInput__NotificationContent",aiChatInput__NotificationHeader:"aiChatInput__NotificationHeader",aiChatInput__NotificationTitle:"aiChatInput__NotificationTitle",aiChatInput__NotificationMessage:"aiChatInput__NotificationMessage",aiChatInput__NotificationClose:"aiChatInput__NotificationClose",aiChatActionBar:"aiChatActionBar",aiChat__ChatActions:"aiChat__ChatActions",aiChat__ChatAction:"aiChat__ChatAction",aiChat__ChatActionLabel:"aiChat__ChatActionLabel",aiChat__ChatActionFeeback:"aiChat__ChatActionFeeback",aiChatHelpActions:"aiChatHelpActions",aiChatHelpAction:"aiChatHelpAction",aiChatHelpActions__Trigger:"aiChatHelpActions__Trigger",aiChatHelpActions__Menu:"aiChatHelpActions__Menu",aiChatHelpActions__MenuArrow:"aiChatHelpActions__MenuArrow",aiChatHelpActions__MenuItem:"aiChatHelpActions__MenuItem",aiChatHelpActions_MenuItemIcon:"aiChatHelpActions_MenuItemIcon",aiChatTagline__Container:"aiChatTagline__Container",aiChatTagline__Text:"aiChatTagline__Text",aiChatTagline__Logo:"aiChatTagline__Logo",aiChatFeedbackModal:"aiChatFeedbackModal",aiChatFeedbackModal__Overlay:"aiChatFeedbackModal__Overlay",aiChatFeedbackModal__Content:"aiChatFeedbackModal__Content",aiChatFeedbackModal__Header:"aiChatFeedbackModal__Header",aiChatFeedbackModal__Close:"aiChatFeedbackModal__Close",aiChatFeedbackModal__Body:"aiChatFeedbackModal__Body",aiChatImagePreviewModal:"aiChatImagePreviewModal",aiChatImagePreviewModal__Overlay:"aiChatImagePreviewModal__Overlay",aiChatImagePreviewModal__Content:"aiChatImagePreviewModal__Content",aiChatImagePreviewModal__Image:"aiChatImagePreviewModal__Image",aiChatImagePreviewModal__Footer:"aiChatImagePreviewModal__Footer",aiChatImagePreviewModal__FileName:"aiChatImagePreviewModal__FileName",aiChatImagePreviewModal__Close:"aiChatImagePreviewModal__Close",aiChatFeedbackForm:"aiChatFeedbackForm",aiChatFeedbackForm__Field:"aiChatFeedbackForm__Field",aiChatFeedbackItem__Label:"aiChatFeedbackItem__Label",aiChatFeedbackItem__Description:"aiChatFeedbackItem__Description",aiChatFeedbackForm__SubmitButton:"aiChatFeedbackForm__SubmitButton",aiChatForm__Wrapper:"aiChatForm__Wrapper",aiChatForm:"aiChatForm",aiChatForm__Close:"aiChatForm__Close",aiChatForm__Header:"aiChatForm__Header",aiChatForm__Heading:"aiChatForm__Heading",aiChatForm__Description:"aiChatForm__Description",aiChatForm__Content:"aiChatForm__Content",aiChatForm__Field:"aiChatForm__Field",aiChatForm__FieldLabel:"aiChatForm__FieldLabel",aiChatForm__FieldText:"aiChatForm__FieldText",aiChatForm__FieldEmail:"aiChatForm__FieldEmail",aiChatForm__FieldFile:"aiChatForm__FieldFile",aiChatForm__FieldTextArea:"aiChatForm__FieldTextArea",aiChatForm__FieldCheckbox:"aiChatForm__FieldCheckbox",aiChatForm__FieldCheckboxIndicator:"aiChatForm__FieldCheckboxIndicator",aiChatForm__FieldSelect:"aiChatForm__FieldSelect",aiChatForm__FieldSelect__Trigger:"aiChatForm__FieldSelect__Trigger",aiChatForm__FieldSelect__Value:"aiChatForm__FieldSelect__Value",aiChatForm__FieldSelect__Icon:"aiChatForm__FieldSelect__Icon",aiChatForm__FieldSelect__Content:"aiChatForm__FieldSelect__Content",aiChatForm__FieldSelect__Viewport:"aiChatForm__FieldSelect__Viewport",aiChatForm__FieldSelect__Item:"aiChatForm__FieldSelect__Item",aiChatForm__FieldSelect__ItemIndicator:"aiChatForm__FieldSelect__ItemIndicator",aiChatForm__FieldSelect__ItemText:"aiChatForm__FieldSelect__ItemText",aiChatForm__FieldCombobox__Control:"aiChatForm__FieldCombobox__Control",aiChatForm__FieldCombobox__Positioner:"aiChatForm__FieldCombobox__Positioner",aiChatForm__FieldCombobox__Input:"aiChatForm__FieldCombobox__Input",aiChatForm__FieldCombobox__Trigger:"aiChatForm__FieldCombobox__Trigger",aiChatForm__FieldCombobox__SelectedTags:"aiChatForm__FieldCombobox__SelectedTags",aiChatForm__FieldCombobox__Content:"aiChatForm__FieldCombobox__Content",aiChatForm__FieldCombobox__List:"aiChatForm__FieldCombobox__List",aiChatForm__FieldCombobox__ListEmpty:"aiChatForm__FieldCombobox__ListEmpty",aiChatForm__FieldCombobox__Item:"aiChatForm__FieldCombobox__Item",aiChatForm__FieldCombobox__ItemText:"aiChatForm__FieldCombobox__ItemText",aiChatForm__FieldCombobox__ItemIndicator:"aiChatForm__FieldCombobox__ItemIndicator",aiChatForm__FieldDescription:"aiChatForm__FieldDescription",aiChatForm__FieldError:"aiChatForm__FieldError",aiChatForm__Error:"aiChatForm__Error",aiChatForm__Footer:"aiChatForm__Footer",aiChatForm__Cancel:"aiChatForm__Cancel",aiChatForm__Submit:"aiChatForm__Submit",aiChatForm__Success:"aiChatForm__Success",aiChatForm__SuccessHeading:"aiChatForm__SuccessHeading",aiChatForm__SuccessMessage:"aiChatForm__SuccessMessage",aiChatForm__SuccessButton:"aiChatForm__SuccessButton",aiChatLink:"aiChatLink"},_={aiSearchWrapper:"aiSearchWrapper",aiSearchRoot:"aiSearchRoot",aiSearchContent:"aiSearchContent",aiSearchInputGroup:"aiSearchInputGroup",aiSearchInputIcon:"aiSearchInputIcon",aiSearchInput:"aiSearchInput",aiSearchLoading:"aiSearchLoading",aiAskAITrigger:"aiAskAITrigger",aiAskAITrigger__Icon:"aiAskAITrigger__Icon",aiAskAITrigger__Label:"aiAskAITrigger__Label",aiAskAITrigger__Query:"aiAskAITrigger__Query",aiAskAITrigger__Indicator:"aiAskAITrigger__Indicator",aiAskAITrigger__IndicatorText:"aiAskAITrigger__IndicatorText",aiSearchResults:"aiSearchResults",aiSearchResults__Loading:"aiSearchResults__Loading",aiSearchResults__Empty:"aiSearchResults__Empty",aiSearchResults__TabList:"aiSearchResults__TabList",aiSearchResults__Tab:"aiSearchResults__Tab",aiSearchResults__Content:"aiSearchResults__Content",aiSearchResults__ScrollArea:"aiSearchResults__ScrollArea",aiSearchResults__ScrollAreaViewport:"aiSearchResults__ScrollAreaViewport",aiSearchResults__List:"aiSearchResults__List",aiSearchResults__Item:"aiSearchResults__Item",aiSearchResults__ItemIcon:"aiSearchResults__ItemIcon",aiSearchResults__ItemBreadcrumbs:"aiSearchResults__ItemBreadcrumbs",aiSearchResults__ItemBreadcrumbIcon:"aiSearchResults__ItemBreadcrumbIcon",aiSearchResults__ItemTitle:"aiSearchResults__ItemTitle",aiSearchResults__ItemTag:"aiSearchResults__ItemTag",aiSearchResults__ItemDescription:"aiSearchResults__ItemDescription",aiSearchResults__ItemDescriptionPart:"aiSearchResults__ItemDescriptionPart",aiSearchResults__ItemIndicator:"aiSearchResults__ItemIndicator",aiSearchResults__ItemPreview:"aiSearchResults__ItemPreview",aiSearchResults__ItemPreview__Header:"aiSearchResults__ItemPreview__Header",aiSearchResults__ItemPreview__Heading:"aiSearchResults__ItemPreview__Heading",aiSearchResults__ItemPreview__Title:"aiSearchResults__ItemPreview__Title",aiSearchResults__ItemPreview__Title__LinkIcon:"aiSearchResults__ItemPreview__Title__LinkIcon",aiSearchResults__ItemPreview__Breadcrumbs:"aiSearchResults__ItemPreview__Breadcrumbs",aiSearchResults__ItemPreview__BreadcrumbIcon:"aiSearchResults__ItemPreview__BreadcrumbIcon",aiSearchResults__ItemPreview__Body:"aiSearchResults__ItemPreview__Body",aiSearchResults__ItemPreview__Outline:"aiSearchResults__ItemPreview__Outline",aiSearchResults__ItemPreview__Outline__Title:"aiSearchResults__ItemPreview__Outline__Title",aiSearchResults__ItemPreview__Outline__List:"aiSearchResults__ItemPreview__Outline__List",aiSearchResults__ItemPreview__Outline__Item:"aiSearchResults__ItemPreview__Outline__Item",aiSearchResults__ItemPreview__Outline__ItemIcon:"aiSearchResults__ItemPreview__Outline__ItemIcon",aiSearchResults__ItemPreview__Outline__ItemText:"aiSearchResults__ItemPreview__Outline__ItemText",aiSearchResults__ItemPreview__Outline__ItemLinkIcon:"aiSearchResults__ItemPreview__Outline__ItemLinkIcon",aiSearchResults__ScrollAreaScrollbar:"aiSearchResults__ScrollAreaScrollbar",aiSearchResults__ScrollAreaThumb:"aiSearchResults__ScrollAreaThumb",aiSearchResults__ScrollAreaCorner:"aiSearchResults__ScrollAreaCorner",aiSearchFooter:"aiSearchFooter",aiSearchTagline__Container:"aiSearchTagline__Container",aiSearchTagline__Text:"aiSearchTagline__Text",aiSearchTagline__Logo:"aiSearchTagline__Logo"},i={modal:"modal",modal__Overlay:"modal__Overlay",modal__Content:"modal__Content",modal__Close:"modal__Close"},o={chatButton__Text:"chatButton__Text",chatButton__Button:"chatButton__Button",chatButton__Container:"chatButton__Container",chatButton__AvatarImage:"chatButton__AvatarImage",chatButton__AvatarContent:"chatButton__AvatarContent",chatButton__CloseIcon:"chatButton__CloseIcon"},r={searchBar__Container:"searchBar__Container",searchBar__Button:"searchBar__Button",searchBar__ContentWrapper:"searchBar__ContentWrapper",searchBar__Text:"searchBar__Text",searchBar__Icon:"searchBar__Icon",searchBar__KbdWrapper:"searchBar__KbdWrapper",searchBar__CmdIcon:"searchBar__CmdIcon",searchBar__Ctrl:"searchBar__Ctrl",searchBar__KbdShortcutKey:"searchBar__KbdShortcutKey"},n={sidebarChat__Root:"sidebarChat__Root",sidebarChat__Resizer:"sidebarChat__Resizer",sidebarChat__CloseButton:"sidebarChat__CloseButton",sidebarChat__Header:"sidebarChat__Header"},s={chatBubble__Root:"chatBubble__Root",chatBubble__CloseButton:"chatBubble__CloseButton",chatBubble__Header:"chatBubble__Header"},h={dataSummary__Group:"dataSummary__Group",dataSummary__Toggle:"dataSummary__Toggle",dataSummary__ToggleText:"dataSummary__ToggleText",dataSummary__Collapsible:"dataSummary__Collapsible",dataSummary__List:"dataSummary__List",dataSummary__Item:"dataSummary__Item",dataSummary__Connector:"dataSummary__Connector",dataSummary__IconContainer:"dataSummary__IconContainer",dataSummary__Content:"dataSummary__Content",dataSummary__Details:"dataSummary__Details",dataSummary__Label:"dataSummary__Label"},C={aiChatHistory:"aiChatHistory",aiChatHistory__Header:"aiChatHistory__Header",aiChatHistory__BackButton:"aiChatHistory__BackButton",aiChatHistory__BackButtonIcon:"aiChatHistory__BackButtonIcon",aiChatHistory__Title:"aiChatHistory__Title",aiChatHistory__List:"aiChatHistory__List",aiChatHistory__Item:"aiChatHistory__Item",aiChatHistory__ItemTitle:"aiChatHistory__ItemTitle",aiChatHistory__ItemDate:"aiChatHistory__ItemDate",aiChatHistory__EmptyState:"aiChatHistory__EmptyState",aiChatHistory__LoadingState:"aiChatHistory__LoadingState",aiChatHistory__Footer:"aiChatHistory__Footer",aiChatHistory__NewConversationButton:"aiChatHistory__NewConversationButton"},l={...e,...t,..._,...i,...o,...r,...a,...n,...s,...h,...C};exports.ChatBubbleComponentIds=s;exports.DataSummaryComponentIds=h;exports.SearchBarComponentIds=r;exports.SidebarChatComponentIds=n;exports.aiChatComponentIds=t;exports.aiChatHistoryComponentIds=C;exports.aiSearchComponentIds=_;exports.chatButtonComponentIds=o;exports.componentIDs=l;exports.markDownComponentIds=e;exports.miscellanousComponentIds=a;exports.modalComponentIds=i;
@@ -128,7 +128,6 @@ export declare const aiChatComponentIds: {
128
128
  aiChatTagline__Container: "aiChatTagline__Container";
129
129
  aiChatTagline__Text: "aiChatTagline__Text";
130
130
  aiChatTagline__Logo: "aiChatTagline__Logo";
131
- aiChatTagline__BrandName: "aiChatTagline__BrandName";
132
131
  aiChatFeedbackModal: "aiChatFeedbackModal";
133
132
  aiChatFeedbackModal__Overlay: "aiChatFeedbackModal__Overlay";
134
133
  aiChatFeedbackModal__Content: "aiChatFeedbackModal__Content";
@@ -143,9 +142,7 @@ export declare const aiChatComponentIds: {
143
142
  aiChatImagePreviewModal__FileName: "aiChatImagePreviewModal__FileName";
144
143
  aiChatImagePreviewModal__Close: "aiChatImagePreviewModal__Close";
145
144
  aiChatFeedbackForm: "aiChatFeedbackForm";
146
- aiChatFeedbackItem: "aiChatFeedbackItem";
147
- aiChatFeedbackItem__Checkbox: "aiChatFeedbackItem__Checkbox";
148
- aiChatFeedbackItem__CheckboxIndicator: "aiChatFeedbackItem__CheckboxIndicator";
145
+ aiChatFeedbackForm__Field: "aiChatFeedbackForm__Field";
149
146
  aiChatFeedbackItem__Label: "aiChatFeedbackItem__Label";
150
147
  aiChatFeedbackItem__Description: "aiChatFeedbackItem__Description";
151
148
  aiChatFeedbackForm__SubmitButton: "aiChatFeedbackForm__SubmitButton";
@@ -250,7 +247,6 @@ export declare const aiSearchComponentIds: {
250
247
  aiSearchTagline__Container: "aiSearchTagline__Container";
251
248
  aiSearchTagline__Text: "aiSearchTagline__Text";
252
249
  aiSearchTagline__Logo: "aiSearchTagline__Logo";
253
- aiSearchTagline__BrandName: "aiSearchTagline__BrandName";
254
250
  };
255
251
  export declare const modalComponentIds: {
256
252
  modal: "modal";
@@ -427,7 +423,6 @@ export declare const componentIDs: {
427
423
  aiSearchTagline__Container: "aiSearchTagline__Container";
428
424
  aiSearchTagline__Text: "aiSearchTagline__Text";
429
425
  aiSearchTagline__Logo: "aiSearchTagline__Logo";
430
- aiSearchTagline__BrandName: "aiSearchTagline__BrandName";
431
426
  aiChatWrapper: "aiChatWrapper";
432
427
  aiChatRoot: "aiChatRoot";
433
428
  aiChatHeader: "aiChatHeader";
@@ -523,7 +518,6 @@ export declare const componentIDs: {
523
518
  aiChatTagline__Container: "aiChatTagline__Container";
524
519
  aiChatTagline__Text: "aiChatTagline__Text";
525
520
  aiChatTagline__Logo: "aiChatTagline__Logo";
526
- aiChatTagline__BrandName: "aiChatTagline__BrandName";
527
521
  aiChatFeedbackModal: "aiChatFeedbackModal";
528
522
  aiChatFeedbackModal__Overlay: "aiChatFeedbackModal__Overlay";
529
523
  aiChatFeedbackModal__Content: "aiChatFeedbackModal__Content";
@@ -538,9 +532,7 @@ export declare const componentIDs: {
538
532
  aiChatImagePreviewModal__FileName: "aiChatImagePreviewModal__FileName";
539
533
  aiChatImagePreviewModal__Close: "aiChatImagePreviewModal__Close";
540
534
  aiChatFeedbackForm: "aiChatFeedbackForm";
541
- aiChatFeedbackItem: "aiChatFeedbackItem";
542
- aiChatFeedbackItem__Checkbox: "aiChatFeedbackItem__Checkbox";
543
- aiChatFeedbackItem__CheckboxIndicator: "aiChatFeedbackItem__CheckboxIndicator";
535
+ aiChatFeedbackForm__Field: "aiChatFeedbackForm__Field";
544
536
  aiChatFeedbackItem__Label: "aiChatFeedbackItem__Label";
545
537
  aiChatFeedbackItem__Description: "aiChatFeedbackItem__Description";
546
538
  aiChatFeedbackForm__SubmitButton: "aiChatFeedbackForm__SubmitButton";
@@ -128,7 +128,6 @@ const a = {
128
128
  aiChatTagline__Container: "aiChatTagline__Container",
129
129
  aiChatTagline__Text: "aiChatTagline__Text",
130
130
  aiChatTagline__Logo: "aiChatTagline__Logo",
131
- aiChatTagline__BrandName: "aiChatTagline__BrandName",
132
131
  aiChatFeedbackModal: "aiChatFeedbackModal",
133
132
  aiChatFeedbackModal__Overlay: "aiChatFeedbackModal__Overlay",
134
133
  aiChatFeedbackModal__Content: "aiChatFeedbackModal__Content",
@@ -143,9 +142,7 @@ const a = {
143
142
  aiChatImagePreviewModal__FileName: "aiChatImagePreviewModal__FileName",
144
143
  aiChatImagePreviewModal__Close: "aiChatImagePreviewModal__Close",
145
144
  aiChatFeedbackForm: "aiChatFeedbackForm",
146
- aiChatFeedbackItem: "aiChatFeedbackItem",
147
- aiChatFeedbackItem__Checkbox: "aiChatFeedbackItem__Checkbox",
148
- aiChatFeedbackItem__CheckboxIndicator: "aiChatFeedbackItem__CheckboxIndicator",
145
+ aiChatFeedbackForm__Field: "aiChatFeedbackForm__Field",
149
146
  aiChatFeedbackItem__Label: "aiChatFeedbackItem__Label",
150
147
  aiChatFeedbackItem__Description: "aiChatFeedbackItem__Description",
151
148
  aiChatFeedbackForm__SubmitButton: "aiChatFeedbackForm__SubmitButton",
@@ -249,8 +246,7 @@ const a = {
249
246
  aiSearchFooter: "aiSearchFooter",
250
247
  aiSearchTagline__Container: "aiSearchTagline__Container",
251
248
  aiSearchTagline__Text: "aiSearchTagline__Text",
252
- aiSearchTagline__Logo: "aiSearchTagline__Logo",
253
- aiSearchTagline__BrandName: "aiSearchTagline__BrandName"
249
+ aiSearchTagline__Logo: "aiSearchTagline__Logo"
254
250
  }, i = {
255
251
  modal: "modal",
256
252
  modal__Overlay: "modal__Overlay",
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),b=require("react"),s=require("../styled/components/embedded-chat.cjs"),a=require("../styled/components/chat-history.cjs"),p=require("../styled/components/modal.cjs"),v=require("../styled/components/shadow.cjs"),I=require("../styled/components/message.cjs"),H=require("../primitives/providers/chat-history-provider.cjs"),g=require("../primitives/providers/config-provider.cjs"),A=require("../primitives/providers/root-provider.cjs"),w=require("../primitives/providers/widget-provider.cjs"),M=require("../primitives/components/embedded-chat/chat-provider.cjs"),f=require("../primitives/components/modal/modal-provider.cjs"),F=require("../primitives/utils/misc.cjs"),E=require("../primitives/atoms/portal-with-theme.cjs"),P=require("../primitives/atoms/error-boundary.cjs"),L=require("./modal.cjs"),B=require("../primitives/providers/image-preview-provider.cjs"),D=require("./widget-toggle.cjs"),k=require("../primitives/components/embedded-chat/file-upload-input.cjs"),i=require("../styled/components/embedded-chat/file-upload-input.cjs"),m=require("../styled/components/embedded-chat/image-preview-modal.cjs");function q(r){const{baseSettings:t,aiChatSettings:n}=r;return e.jsx(P.ErrorBoundary,{children:e.jsx(v.Shadow,{wrapperStyles:{height:"inherit",width:"inherit"},children:e.jsx(A.RootProvider,{config:{baseSettings:t,aiChatSettings:n},componentType:g.WebWidgetInteractionType.EmbeddedChat,children:e.jsx(T,{...r})})})})}function y(r){const{children:t,onToggleView:n,isHidden:o,shouldAutoFocusInput:d=!n}=r;return e.jsx(s.Provider,{isHidden:o,shouldAutoFocusInput:d,children:t})}function T(r){return e.jsx(y,{...r,children:e.jsx(S,{...r})})}function S(r){const{onToggleView:t,variant:n,header:o=W}=r,d=f.useModal(),l=w.useWidget(),x=d&&!l?L.ModalContent:b.Fragment;return e.jsx(B.ImagePreviewProvider,{children:e.jsx(x,{children:e.jsxs(s.Wrapper,{variant:n??(t?"no-shadow":"container-with-shadow"),"data-composite":F.dataAttr(!!r.onToggleView||d?.isOpen),children:[e.jsx(Z,{}),e.jsxs(s.Root,{children:[o&&e.jsx(o,{...r}),e.jsx(N,{}),e.jsx(U,{})]}),e.jsx(z,{}),e.jsx($,{}),e.jsx(J,{})]})})})}const W=r=>{const{onToggleView:t,askAILabel:n,searchLabel:o}=r,{aiChatSettings:d}=g.useInkeepConfig(),l=d.isChatHistoryButtonVisible,x=!!t||l;return e.jsx(s.Header,{"data-show-toolbar":F.dataAttr(x),children:x?e.jsxs(s.HeaderToolbar,{"data-show-widget-toggle":F.dataAttr(!!t),children:[e.jsx(s.HeaderToolbarWrapper,{children:l&&e.jsx(s.ChatHistoryTrigger,{})}),t&&e.jsx(D.WidgetToggle,{onToggleView:t,askAILabel:n,searchLabel:o,view:"chat"}),e.jsx(p.Close,{})]}):e.jsx(p.Close,{})})};function N(){const{isSessionLoading:r}=M.useChat();return e.jsx(s.Content,{children:e.jsxs(s.ContentScrollArea,{children:[e.jsx(s.ContentScrollAreaViewport,{children:r?e.jsx(s.MessagesSessionLoading,{}):e.jsx(_,{})}),e.jsx(s.ContentScrollAreaScrollbar,{children:e.jsx(s.ContentScrollAreaThumb,{})}),e.jsx(s.ContentScrollAreaCorner,{})]})})}function _(){const{aiChatSettings:{components:r}}=g.useInkeepConfig();return e.jsx(s.Messages,{children:({messages:t,isLoading:n,isStreaming:o})=>{const d=t.at(-1),l=(c,j)=>{const h=r?.[c];if(!h)return console.warn(`Component "${c}" not found in components config`),null;try{if(typeof h=="function"&&h.length<=1)return b.createElement(h,j);const u=h(j,document.createElement("div"),null);return b.isValidElement(u)||typeof u=="string"?u:null}catch(u){return console.error(`🔍 [renderComponent] Error rendering component "${c}":`,u),null}},x=c=>e.jsx(s.Markdown,{text:c});return e.jsxs(e.Fragment,{children:[e.jsx(V,{}),t.map(c=>{const j=d?.id===c.id;return e.jsxs(s.MessageWrapper,{message:c,children:[e.jsx(C,{}),e.jsxs(s.MessageContentWrapper,{children:[e.jsx(s.MessageContent,{children:r?.IkpMessage?e.jsx(s.DynamicComponent,{name:"IkpMessage",props:{message:c,renderComponent:l,renderMarkdown:x},componentDef:r.IkpMessage}):e.jsxs(e.Fragment,{children:[e.jsx(I.EmbeddedChatMessagePart,{isLast:j}),(!o||!j)&&e.jsx(O,{})]})}),e.jsx(R,{}),e.jsx(Q,{})]})]},c.id)}),n&&d?.parts.length&&e.jsxs(s.MessageWrapper,{message:{id:"___loader___",role:"assistant",parts:[{type:"text",text:"Thinking..."}]},children:[e.jsx(C,{}),e.jsx(s.MessageLoading,{})]})]})}})}function V(){return e.jsxs(s.IntroMessageWrapper,{children:[e.jsxs(s.MessageHeader,{children:[e.jsx(s.MessageAvatar,{children:e.jsx(s.MessageAvatarContent,{children:e.jsx(s.MessageAvatarImage,{})})}),e.jsx(s.MessageName,{})]}),e.jsxs(s.MessageContentWrapper,{children:[e.jsx(s.MessageContent,{children:e.jsx(I.EmbeddedChatMessagePart,{isLast:!1})}),e.jsxs(s.Disclaimer,{children:[e.jsx(s.DisclaimerLabel,{}),e.jsx(s.DisclaimerTrigger,{}),e.jsxs(s.DisclaimerContent,{children:[e.jsx(s.DisclaimerText,{}),e.jsx(s.DisclaimerArrow,{})]})]}),e.jsxs(s.ExampleQuestions,{children:[e.jsx(s.ExampleQuestionsLabel,{}),e.jsx(s.ExampleQuestionsList,{children:r=>r.map(t=>e.jsx(s.ExampleQuestion,{children:e.jsx(s.ExampleQuestionButton,{question:t})},typeof t=="object"?t.label:t))})]})]})]})}function C(){return e.jsxs(s.MessageHeader,{children:[e.jsx(s.MessageAvatar,{children:e.jsx(s.MessageAvatarContent,{children:e.jsx(s.MessageAvatarImage,{})})}),e.jsx(s.MessageName,{})]})}function $(){return e.jsx(E.PortalWithTheme,{children:e.jsx(m.EmbeddedChatImagePreviewModal,{children:e.jsx(m.EmbeddedChatImagePreviewModalOverlay,{children:e.jsxs(m.EmbeddedChatImagePreviewModalContent,{children:[e.jsx(m.EmbeddedChatImagePreviewModalClose,{}),e.jsx(m.EmbeddedChatImagePreviewModalImage,{}),e.jsx(m.EmbeddedChatImagePreviewModalFooter,{children:e.jsx(m.EmbeddedChatImagePreviewModalFileName,{})})]})})})})}function R(){return e.jsx(i.EmbeddedChatMessageFiles,{children:r=>r.map((t,n)=>{const o=t.url,d=t.mediaType??"",l=d.split("/").pop(),x=t.filename??(l?`untitled.${l}`:"untitled"),c=k.isImageMimeType(d);return e.jsxs(i.EmbeddedChatMessageFile,{url:o,name:x,mediaType:d,children:[c?e.jsx(i.EmbeddedChatFileThumbnail,{}):e.jsx(i.EmbeddedChatFileTypeIcon,{}),e.jsx(i.EmbeddedChatFileName,{})]},o||n)})})}function Q(){return e.jsxs(s.MessageToolbar,{children:[e.jsx(s.MessageCustomActions,{children:r=>r.map((t,n)=>e.jsx(s.MessageCustomAction,{action:t},`action-${n}`))}),e.jsx(s.MessageAction,{action:"copy"}),e.jsx(s.MessageAction,{action:"upvote"}),e.jsx(s.MessageAction,{action:"downvote"})]})}function O(){return e.jsxs(s.MessageSources,{children:[e.jsx(s.MessageSourcesHeader,{}),e.jsx(s.MessageSourcesList,{children:r=>r.map((t,n)=>e.jsxs(s.MessageSourceItem,{href:t.url,source:t,children:[e.jsx(s.MessageSourceItemBreadcrumbs,{children:t.breadcrumbs?.map(o=>e.jsxs(b.Fragment,{children:[o,e.jsx(s.MessageSourceItemBreadcrumbIcon,{})]},o))}),e.jsx(s.MessageSourceItemIcon,{}),e.jsx(s.MessageSourceItemTitle,{}),e.jsx(s.MessageSourceItemTag,{}),e.jsx(s.MessageSourceItemDescription,{children:o=>o.map((d,l)=>e.jsx(s.MessageSourceItemDescriptionPart,{part:d},`part-${l}`))}),e.jsx(s.MessageSourceItemIndicator,{})]},n))})]})}function U(){return e.jsxs(s.Footer,{children:[e.jsx(i.EmbeddedChatInputNotification,{children:e.jsxs(i.EmbeddedChatInputNotificationContent,{children:[e.jsxs(i.EmbeddedChatInputNotificationHeader,{children:[e.jsx(i.EmbeddedChatInputNotificationTitle,{}),e.jsx(i.EmbeddedChatInputNotificationClose,{})]}),e.jsx(i.EmbeddedChatInputNotificationMessage,{})]})}),e.jsx(G,{}),e.jsx(K,{})]})}function G(){return e.jsxs(s.InputFieldset,{children:[e.jsx(i.EmbeddedChatFileInput,{}),e.jsx(i.EmbeddedChatDropZone,{children:"Drop files here to add to chat"}),e.jsx(i.EmbeddedChatFileList,{children:r=>r.map((t,n)=>{const o=k.isImageMimeType(t.type);return e.jsxs(i.EmbeddedChatFileItem,{file:t,children:[o?e.jsxs(i.EmbeddedChatFilePreviewTrigger,{children:[e.jsx(i.EmbeddedChatFileThumbnail,{}),e.jsx(i.EmbeddedChatFileName,{})]}):e.jsxs(i.EmbeddedChatFileContent,{children:[e.jsx(i.EmbeddedChatFileTypeIcon,{}),e.jsx(i.EmbeddedChatFileName,{})]}),e.jsx(i.EmbeddedChatFileRemove,{})]},`${t.name}-${t.lastModified}-${n}`)})}),e.jsxs(s.InputGroup,{children:[e.jsx(i.EmbeddedChatFileUploadButton,{}),e.jsx(s.Input,{}),e.jsx(s.SendButton,{children:e.jsx(s.SendButtonIcon,{})})]})]})}function K(){return e.jsxs(s.ActionBar,{children:[e.jsxs(s.TaglineContainer,{children:[e.jsx(s.TaglineText,{}),e.jsx(s.TaglineLogo,{}),e.jsx(s.TaglineBrandName,{})]}),e.jsxs(s.Actions,{children:[e.jsx(s.HelpActions,{children:({pinned:r,unpinned:t})=>e.jsxs(e.Fragment,{children:[r.map(n=>e.jsx(s.HelpAction,{action:n},n.name)),t.length>0&&e.jsx(s.HelpActionsTrigger,{}),e.jsxs(s.HelpActionsMenu,{children:[e.jsx(s.HelpActionsMenuArrow,{}),t.map(n=>e.jsxs(s.HelpActionsMenuItem,{action:n,children:[e.jsx(s.HelpActionsMenuItemIcon,{action:n}),n.name]},n.name))]})]})}),e.jsxs(s.ChatAction,{action:"copy",children:[e.jsx(s.ChatActionLabel,{action:"copy"}),e.jsx(s.ChatActionFeedback,{action:"copy"})]}),e.jsx(s.ChatAction,{action:"clear"}),e.jsx(s.ChatAction,{action:"stop"})]})]})}function Z(){const{sessions:r}=H.useChatHistory(),{conversationId:t}=M.useChat();return e.jsxs(a.EmbeddedChatHistoryRoot,{children:[e.jsxs(a.EmbeddedChatHistoryHeader,{children:[e.jsxs(a.EmbeddedChatHistoryBackButton,{children:[e.jsx(a.EmbeddedChatHistoryBackButtonIcon,{iconKey:"backToChat"}),"Back to chat"]}),e.jsx(a.EmbeddedChatHistoryTitle,{}),e.jsx(p.Close,{})]}),e.jsxs(a.EmbeddedChatHistoryList,{children:[r.map(n=>e.jsxs(a.EmbeddedChatHistoryItem,{sessionId:n.id,"data-active":F.dataAttr(n.id===t),children:[e.jsx(a.EmbeddedChatHistoryItemTitle,{children:n.title}),e.jsx(a.EmbeddedChatHistoryItemDate,{children:a.formatSessionDate(n.updatedAt)})]},n.id)),e.jsx(a.EmbeddedChatHistoryEmptyState,{}),e.jsx(a.EmbeddedChatHistoryLoadingState,{})]}),e.jsx(a.EmbeddedChatHistoryFooter,{children:e.jsx(a.EmbeddedChatHistoryNewConversationButton,{})})]})}function z(){return e.jsx(E.PortalWithTheme,{children:e.jsx(s.FeedbackModal,{children:e.jsx(s.FeedbackModalOverlay,{children:e.jsxs(s.FeedbackModalContent,{children:[e.jsx(s.FeedbackModalHeader,{}),e.jsx(s.FeedbackModalClose,{}),e.jsx(s.FeedbackModalBody,{children:e.jsxs(s.FeedbackForm,{children:[e.jsxs(s.FeedbackItem,{name:"unrelated_response",children:[e.jsx(s.FeedbackItemCheckbox,{children:e.jsx(s.FeedbackItemCheckboxIndicator,{})}),e.jsx(s.FeedbackItemLabel,{}),e.jsx(s.FeedbackItemDescription,{})]}),e.jsxs(s.FeedbackItem,{name:"inaccurate_statement",children:[e.jsx(s.FeedbackItemCheckbox,{children:e.jsx(s.FeedbackItemCheckboxIndicator,{})}),e.jsx(s.FeedbackItemLabel,{}),e.jsx(s.FeedbackItemDescription,{})]}),e.jsxs(s.FeedbackItem,{name:"inaccurate_code_snippet",children:[e.jsx(s.FeedbackItemCheckbox,{children:e.jsx(s.FeedbackItemCheckboxIndicator,{})}),e.jsx(s.FeedbackItemLabel,{}),e.jsx(s.FeedbackItemDescription,{})]}),e.jsxs(s.FeedbackItem,{name:"irrelevant_citations",children:[e.jsx(s.FeedbackItemCheckbox,{children:e.jsx(s.FeedbackItemCheckboxIndicator,{})}),e.jsx(s.FeedbackItemLabel,{})]}),e.jsx(s.FeedbackSubmitButton,{})]})})]})})})})}function J(){return e.jsxs(s.FormWrapper,{children:[e.jsx(s.FormClose,{}),e.jsxs(s.Form,{children:[e.jsxs(s.FormHeader,{children:[e.jsx(s.FormHeading,{}),e.jsx(s.FormDescription,{})]}),e.jsx(s.FormContent,{children:r=>e.jsxs(e.Fragment,{children:[r.map((t,n)=>e.jsxs(s.FormField,{field:t,autoFocus:n===0,children:[e.jsx(s.FormFieldLabel,{}),t.inputType==="text"&&e.jsx(s.FormFieldText,{}),t.inputType==="email"&&e.jsx(s.FormFieldEmail,{}),t.inputType==="file"&&e.jsx(s.FormFieldFile,{}),t.inputType==="textarea"&&e.jsx(s.FormFieldTextArea,{}),t.inputType==="checkbox"&&e.jsx(s.FormFieldCheckbox,{children:e.jsx(s.FormFieldCheckboxIndicator,{})}),t.inputType==="select"&&e.jsxs(s.FormFieldSelect,{children:[e.jsxs(s.FormFieldSelectTrigger,{children:[e.jsx(s.FormFieldSelectValue,{}),e.jsx(s.FormFieldSelectIcon,{})]}),e.jsx(s.FormFieldSelectContent,{children:e.jsx(s.FormFieldSelectViewport,{children:t.items.map(o=>e.jsxs(s.FormFieldSelectItem,{value:o.value,children:[e.jsx(s.FormFieldSelectItemText,{children:o.label}),e.jsx(s.FormFieldSelectItemIndicator,{})]},o.value))})})]}),t.inputType==="combobox"&&e.jsxs(s.FormFieldCombobox,{children:[e.jsxs(s.FormFieldComboboxControl,{children:["multiple"in t&&t.multiple&&e.jsx(s.FormFieldComboboxSelectedTags,{}),e.jsx(s.FormFieldComboboxInput,{}),e.jsx(s.FormFieldComboboxTrigger,{})]}),e.jsx(s.FormFieldComboboxPositioner,{children:e.jsx(s.FormFieldComboboxContent,{children:e.jsx(s.FormFieldComboboxList,{children:e.jsx(s.FormFieldComboboxListItems,{children:o=>o.length===0?e.jsx(s.FormFieldComboboxListEmpty,{}):o.map(d=>e.jsxs(s.FormFieldComboboxItem,{item:d,children:[e.jsx(s.FormFieldComboboxItemText,{children:d.label}),e.jsx(s.FormFieldComboboxItemIndicator,{})]},d.value))})})})})]}),e.jsx(s.FormFieldDescription,{}),e.jsx(s.FormFieldError,{})]},t.name)),e.jsx(s.FormError,{})]})}),e.jsxs(s.FormFooter,{children:[e.jsx(s.FormCancel,{}),e.jsx(s.FormSubmit,{})]})]}),e.jsxs(s.FormSuccess,{children:[e.jsx(s.FormSuccessHeading,{}),e.jsx(s.FormSuccessMessage,{}),e.jsx(s.FormSuccessButton,{})]})]})}exports.InkeepEmbeddedChat=q;exports.InkeepEmbeddedChatImpl=T;exports.InkeepEmbeddedChatImplContent=S;exports.InkeepEmbeddedChatProvider=y;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),g=require("react"),s=require("../styled/components/embedded-chat.cjs"),a=require("../styled/components/chat-history.cjs"),C=require("../styled/components/modal.cjs"),H=require("../styled/components/shadow.cjs"),I=require("../styled/components/message.cjs"),A=require("../primitives/providers/chat-history-provider.cjs"),b=require("../primitives/providers/config-provider.cjs"),w=require("../primitives/providers/root-provider.cjs"),k=require("../primitives/providers/widget-provider.cjs"),M=require("../primitives/components/embedded-chat/chat-provider.cjs"),f=require("../primitives/components/modal/modal-provider.cjs"),p=require("../primitives/utils/misc.cjs"),E=require("../primitives/atoms/portal-with-theme.cjs"),P=require("../primitives/atoms/error-boundary.cjs"),B=require("./modal.cjs"),L=require("../primitives/providers/image-preview-provider.cjs"),q=require("./widget-toggle.cjs"),y=require("../primitives/components/embedded-chat/file-upload-input.cjs"),i=require("../styled/components/embedded-chat/file-upload-input.cjs"),m=require("../styled/components/embedded-chat/image-preview-modal.cjs");function D(r){const{baseSettings:t,aiChatSettings:n}=r;return e.jsx(P.ErrorBoundary,{children:e.jsx(H.Shadow,{wrapperStyles:{height:"inherit",width:"inherit"},children:e.jsx(w.RootProvider,{config:{baseSettings:t,aiChatSettings:n},componentType:b.WebWidgetInteractionType.EmbeddedChat,children:e.jsx(S,{...r})})})})}function T(r){const{children:t,onToggleView:n,isHidden:o,shouldAutoFocusInput:d=!n}=r;return e.jsx(s.Provider,{isHidden:o,shouldAutoFocusInput:d,children:t})}function S(r){return e.jsx(T,{...r,children:e.jsx(v,{...r})})}function v(r){const{onToggleView:t,variant:n,header:o=W}=r,d=f.useModal(),l=k.useWidget(),x=d&&!l?B.ModalContent:g.Fragment;return e.jsx(L.ImagePreviewProvider,{children:e.jsx(x,{children:e.jsxs(s.Wrapper,{variant:n??(t?"no-shadow":"container-with-shadow"),"data-composite":p.dataAttr(!!r.onToggleView||d?.isOpen),children:[e.jsx(Z,{}),e.jsxs(s.Root,{children:[o&&e.jsx(o,{...r}),e.jsx(N,{}),e.jsx(U,{})]}),e.jsx(z,{}),e.jsx(R,{}),e.jsx(J,{})]})})})}const W=r=>{const{onToggleView:t,askAILabel:n,searchLabel:o}=r,{aiChatSettings:d}=b.useInkeepConfig(),l=d.isChatHistoryButtonVisible,x=!!t||l;return e.jsx(s.Header,{"data-show-toolbar":p.dataAttr(x),children:x?e.jsxs(s.HeaderToolbar,{"data-show-widget-toggle":p.dataAttr(!!t),children:[e.jsx(s.HeaderToolbarWrapper,{children:l&&e.jsx(s.ChatHistoryTrigger,{})}),t&&e.jsx(q.WidgetToggle,{onToggleView:t,askAILabel:n,searchLabel:o,view:"chat"}),e.jsx(C.Close,{})]}):e.jsx(C.Close,{})})};function N(){const{isSessionLoading:r}=M.useChat();return e.jsx(s.Content,{children:e.jsxs(s.ContentScrollArea,{children:[e.jsx(s.ContentScrollAreaViewport,{children:r?e.jsx(s.MessagesSessionLoading,{}):e.jsx(V,{})}),e.jsx(s.ContentScrollAreaScrollbar,{children:e.jsx(s.ContentScrollAreaThumb,{})}),e.jsx(s.ContentScrollAreaCorner,{})]})})}function V(){const{aiChatSettings:{components:r}}=b.useInkeepConfig();return e.jsx(s.Messages,{children:({messages:t,isLoading:n,isStreaming:o})=>{const d=t.at(-1),l=(c,j)=>{const h=r?.[c];if(!h)return console.warn(`Component "${c}" not found in components config`),null;try{if(typeof h=="function"&&h.length<=1)return g.createElement(h,j);const u=h(j,document.createElement("div"),null);return g.isValidElement(u)||typeof u=="string"?u:null}catch(u){return console.error(`🔍 [renderComponent] Error rendering component "${c}":`,u),null}},x=c=>e.jsx(s.Markdown,{text:c});return e.jsxs(e.Fragment,{children:[e.jsx($,{}),t.map(c=>{const j=d?.id===c.id;return e.jsxs(s.MessageWrapper,{message:c,children:[e.jsx(F,{}),e.jsxs(s.MessageContentWrapper,{children:[e.jsx(s.MessageContent,{children:r?.IkpMessage?e.jsx(s.DynamicComponent,{name:"IkpMessage",props:{message:c,renderComponent:l,renderMarkdown:x},componentDef:r.IkpMessage}):e.jsxs(e.Fragment,{children:[e.jsx(I.EmbeddedChatMessagePart,{isLast:j}),(!o||!j)&&e.jsx(O,{})]})}),e.jsx(_,{}),e.jsx(Q,{})]})]},c.id)}),n&&d?.parts.length&&e.jsxs(s.MessageWrapper,{message:{id:"___loader___",role:"assistant",parts:[{type:"text",text:"Thinking..."}]},children:[e.jsx(F,{}),e.jsx(s.MessageLoading,{})]})]})}})}function $(){return e.jsxs(s.IntroMessageWrapper,{children:[e.jsxs(s.MessageHeader,{children:[e.jsx(s.MessageAvatar,{children:e.jsx(s.MessageAvatarContent,{children:e.jsx(s.MessageAvatarImage,{})})}),e.jsx(s.MessageName,{})]}),e.jsxs(s.MessageContentWrapper,{children:[e.jsx(s.MessageContent,{children:e.jsx(I.EmbeddedChatMessagePart,{isLast:!1})}),e.jsxs(s.Disclaimer,{children:[e.jsx(s.DisclaimerLabel,{}),e.jsx(s.DisclaimerTrigger,{}),e.jsxs(s.DisclaimerContent,{children:[e.jsx(s.DisclaimerText,{}),e.jsx(s.DisclaimerArrow,{})]})]}),e.jsxs(s.ExampleQuestions,{children:[e.jsx(s.ExampleQuestionsLabel,{}),e.jsx(s.ExampleQuestionsList,{children:r=>r.map(t=>e.jsx(s.ExampleQuestion,{children:e.jsx(s.ExampleQuestionButton,{question:t})},typeof t=="object"?t.label:t))})]})]})]})}function F(){return e.jsxs(s.MessageHeader,{children:[e.jsx(s.MessageAvatar,{children:e.jsx(s.MessageAvatarContent,{children:e.jsx(s.MessageAvatarImage,{})})}),e.jsx(s.MessageName,{})]})}function R(){return e.jsx(E.PortalWithTheme,{children:e.jsx(m.EmbeddedChatImagePreviewModal,{children:e.jsx(m.EmbeddedChatImagePreviewModalOverlay,{children:e.jsxs(m.EmbeddedChatImagePreviewModalContent,{children:[e.jsx(m.EmbeddedChatImagePreviewModalClose,{}),e.jsx(m.EmbeddedChatImagePreviewModalImage,{}),e.jsx(m.EmbeddedChatImagePreviewModalFooter,{children:e.jsx(m.EmbeddedChatImagePreviewModalFileName,{})})]})})})})}function _(){return e.jsx(i.EmbeddedChatMessageFiles,{children:r=>r.map((t,n)=>{const o=t.url,d=t.mediaType??"",l=d.split("/").pop(),x=t.filename??(l?`untitled.${l}`:"untitled"),c=y.isImageMimeType(d);return e.jsxs(i.EmbeddedChatMessageFile,{url:o,name:x,mediaType:d,children:[c?e.jsx(i.EmbeddedChatFileThumbnail,{}):e.jsx(i.EmbeddedChatFileTypeIcon,{}),e.jsx(i.EmbeddedChatFileName,{})]},o||n)})})}function Q(){return e.jsxs(s.MessageToolbar,{children:[e.jsx(s.MessageCustomActions,{children:r=>r.map((t,n)=>e.jsx(s.MessageCustomAction,{action:t},`action-${n}`))}),e.jsx(s.MessageAction,{action:"copy"}),e.jsx(s.MessageAction,{action:"upvote"}),e.jsx(s.MessageAction,{action:"downvote"})]})}function O(){return e.jsxs(s.MessageSources,{children:[e.jsx(s.MessageSourcesHeader,{}),e.jsx(s.MessageSourcesList,{children:r=>r.map((t,n)=>e.jsxs(s.MessageSourceItem,{href:t.url,source:t,children:[e.jsx(s.MessageSourceItemBreadcrumbs,{children:t.breadcrumbs?.map(o=>e.jsxs(g.Fragment,{children:[o,e.jsx(s.MessageSourceItemBreadcrumbIcon,{})]},o))}),e.jsx(s.MessageSourceItemIcon,{}),e.jsx(s.MessageSourceItemTitle,{}),e.jsx(s.MessageSourceItemTag,{}),e.jsx(s.MessageSourceItemDescription,{children:o=>o.map((d,l)=>e.jsx(s.MessageSourceItemDescriptionPart,{part:d},`part-${l}`))}),e.jsx(s.MessageSourceItemIndicator,{})]},n))})]})}function U(){return e.jsxs(s.Footer,{children:[e.jsx(i.EmbeddedChatInputNotification,{children:e.jsxs(i.EmbeddedChatInputNotificationContent,{children:[e.jsxs(i.EmbeddedChatInputNotificationHeader,{children:[e.jsx(i.EmbeddedChatInputNotificationTitle,{}),e.jsx(i.EmbeddedChatInputNotificationClose,{})]}),e.jsx(i.EmbeddedChatInputNotificationMessage,{})]})}),e.jsx(G,{}),e.jsx(K,{})]})}function G(){return e.jsxs(s.InputFieldset,{children:[e.jsx(i.EmbeddedChatFileInput,{}),e.jsx(i.EmbeddedChatDropZone,{children:"Drop files here to add to chat"}),e.jsx(i.EmbeddedChatFileList,{children:r=>r.map((t,n)=>{const o=y.isImageMimeType(t.type);return e.jsxs(i.EmbeddedChatFileItem,{file:t,children:[o?e.jsxs(i.EmbeddedChatFilePreviewTrigger,{children:[e.jsx(i.EmbeddedChatFileThumbnail,{}),e.jsx(i.EmbeddedChatFileName,{})]}):e.jsxs(i.EmbeddedChatFileContent,{children:[e.jsx(i.EmbeddedChatFileTypeIcon,{}),e.jsx(i.EmbeddedChatFileName,{})]}),e.jsx(i.EmbeddedChatFileRemove,{})]},`${t.name}-${t.lastModified}-${n}`)})}),e.jsxs(s.InputGroup,{children:[e.jsx(i.EmbeddedChatFileUploadButton,{}),e.jsx(s.Input,{}),e.jsx(s.SendButton,{children:e.jsx(s.SendButtonIcon,{})})]})]})}function K(){return e.jsxs(s.ActionBar,{children:[e.jsxs(s.TaglineContainer,{children:[e.jsx(s.TaglineText,{}),e.jsx(s.TaglineLogo,{})]}),e.jsxs(s.Actions,{children:[e.jsx(s.HelpActions,{children:({pinned:r,unpinned:t})=>e.jsxs(e.Fragment,{children:[r.map(n=>e.jsx(s.HelpAction,{action:n},n.name)),t.length>0&&e.jsx(s.HelpActionsTrigger,{}),e.jsxs(s.HelpActionsMenu,{children:[e.jsx(s.HelpActionsMenuArrow,{}),t.map(n=>e.jsxs(s.HelpActionsMenuItem,{action:n,children:[e.jsx(s.HelpActionsMenuItemIcon,{action:n}),n.name]},n.name))]})]})}),e.jsxs(s.ChatAction,{action:"copy",children:[e.jsx(s.ChatActionLabel,{action:"copy"}),e.jsx(s.ChatActionFeedback,{action:"copy"})]}),e.jsx(s.ChatAction,{action:"clear"}),e.jsx(s.ChatAction,{action:"stop"})]})]})}function Z(){const{sessions:r}=A.useChatHistory(),{conversationId:t}=M.useChat();return e.jsxs(a.EmbeddedChatHistoryRoot,{children:[e.jsxs(a.EmbeddedChatHistoryHeader,{children:[e.jsxs(a.EmbeddedChatHistoryBackButton,{children:[e.jsx(a.EmbeddedChatHistoryBackButtonIcon,{iconKey:"backToChat"}),"Back to chat"]}),e.jsx(a.EmbeddedChatHistoryTitle,{}),e.jsx(C.Close,{})]}),e.jsxs(a.EmbeddedChatHistoryList,{children:[r.map(n=>e.jsxs(a.EmbeddedChatHistoryItem,{sessionId:n.id,"data-active":p.dataAttr(n.id===t),children:[e.jsx(a.EmbeddedChatHistoryItemTitle,{children:n.title}),e.jsx(a.EmbeddedChatHistoryItemDate,{children:a.formatSessionDate(n.updatedAt)})]},n.id)),e.jsx(a.EmbeddedChatHistoryEmptyState,{}),e.jsx(a.EmbeddedChatHistoryLoadingState,{})]}),e.jsx(a.EmbeddedChatHistoryFooter,{children:e.jsx(a.EmbeddedChatHistoryNewConversationButton,{})})]})}function z(){return e.jsx(E.PortalWithTheme,{children:e.jsx(s.FeedbackModal,{children:e.jsx(s.FeedbackModalOverlay,{children:e.jsxs(s.FeedbackModalContent,{children:[e.jsx(s.FeedbackModalHeader,{}),e.jsx(s.FeedbackModalClose,{}),e.jsx(s.FeedbackModalBody,{children:e.jsxs(s.FeedbackForm,{children:[e.jsxs(s.FeedbackField,{children:[e.jsx(s.FeedbackItemLabel,{}),e.jsx(s.FeedbackItemDescription,{})]}),e.jsx(s.FeedbackSubmitButton,{})]})})]})})})})}function J(){return e.jsxs(s.FormWrapper,{children:[e.jsx(s.FormClose,{}),e.jsxs(s.Form,{children:[e.jsxs(s.FormHeader,{children:[e.jsx(s.FormHeading,{}),e.jsx(s.FormDescription,{})]}),e.jsx(s.FormContent,{children:r=>e.jsxs(e.Fragment,{children:[r.map((t,n)=>e.jsxs(s.FormField,{field:t,autoFocus:n===0,children:[e.jsx(s.FormFieldLabel,{}),t.inputType==="text"&&e.jsx(s.FormFieldText,{}),t.inputType==="email"&&e.jsx(s.FormFieldEmail,{}),t.inputType==="file"&&e.jsx(s.FormFieldFile,{}),t.inputType==="textarea"&&e.jsx(s.FormFieldTextArea,{}),t.inputType==="checkbox"&&e.jsx(s.FormFieldCheckbox,{children:e.jsx(s.FormFieldCheckboxIndicator,{})}),t.inputType==="select"&&e.jsxs(s.FormFieldSelect,{children:[e.jsxs(s.FormFieldSelectTrigger,{children:[e.jsx(s.FormFieldSelectValue,{}),e.jsx(s.FormFieldSelectIcon,{})]}),e.jsx(s.FormFieldSelectContent,{children:e.jsx(s.FormFieldSelectViewport,{children:t.items.map(o=>e.jsxs(s.FormFieldSelectItem,{value:o.value,children:[e.jsx(s.FormFieldSelectItemText,{children:o.label}),e.jsx(s.FormFieldSelectItemIndicator,{})]},o.value))})})]}),t.inputType==="combobox"&&e.jsxs(s.FormFieldCombobox,{children:[e.jsxs(s.FormFieldComboboxControl,{children:["multiple"in t&&t.multiple&&e.jsx(s.FormFieldComboboxSelectedTags,{}),e.jsx(s.FormFieldComboboxInput,{}),e.jsx(s.FormFieldComboboxTrigger,{})]}),e.jsx(s.FormFieldComboboxPositioner,{children:e.jsx(s.FormFieldComboboxContent,{children:e.jsx(s.FormFieldComboboxList,{children:e.jsx(s.FormFieldComboboxListItems,{children:o=>o.length===0?e.jsx(s.FormFieldComboboxListEmpty,{}):o.map(d=>e.jsxs(s.FormFieldComboboxItem,{item:d,children:[e.jsx(s.FormFieldComboboxItemText,{children:d.label}),e.jsx(s.FormFieldComboboxItemIndicator,{})]},d.value))})})})})]}),e.jsx(s.FormFieldDescription,{}),e.jsx(s.FormFieldError,{})]},t.name)),e.jsx(s.FormError,{})]})}),e.jsxs(s.FormFooter,{children:[e.jsx(s.FormCancel,{}),e.jsx(s.FormSubmit,{})]})]}),e.jsxs(s.FormSuccess,{children:[e.jsx(s.FormSuccessHeading,{}),e.jsx(s.FormSuccessMessage,{}),e.jsx(s.FormSuccessButton,{})]})]})}exports.InkeepEmbeddedChat=D;exports.InkeepEmbeddedChatImpl=S;exports.InkeepEmbeddedChatImplContent=v;exports.InkeepEmbeddedChatProvider=T;