@inkeep/cxkit-primitives 0.5.13 → 0.5.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/index.cjs +1 -0
- package/dist/_virtual/index.js +4 -0
- package/dist/_virtual/use-sync-external-store-shim.development.cjs +1 -0
- package/dist/_virtual/use-sync-external-store-shim.development.js +5 -0
- package/dist/_virtual/use-sync-external-store-shim.production.cjs +1 -0
- package/dist/_virtual/use-sync-external-store-shim.production.js +5 -0
- package/dist/atoms/cmdk/command-score.cjs +1 -0
- package/dist/atoms/cmdk/command-score.d.cts +1 -0
- package/dist/atoms/cmdk/command-score.d.ts +1 -0
- package/dist/atoms/cmdk/command-score.js +46 -0
- package/dist/atoms/cmdk/index.cjs +1 -0
- package/dist/atoms/cmdk/index.d.cts +426 -0
- package/dist/atoms/cmdk/index.d.ts +426 -0
- package/dist/atoms/cmdk/index.js +510 -0
- package/dist/atoms/dialog.cjs +1 -0
- package/dist/atoms/dialog.d.cts +29 -2
- package/dist/atoms/dialog.d.ts +29 -2
- package/dist/atoms/dialog.js +216 -0
- package/dist/components/embedded-chat.cjs +3 -3
- package/dist/components/embedded-chat.d.cts +1 -1
- package/dist/components/embedded-chat.d.ts +1 -1
- package/dist/components/embedded-chat.js +1015 -1015
- package/dist/components/embedded-search/use-inkeep-search.cjs +1 -1
- package/dist/components/embedded-search/use-inkeep-search.js +1 -3
- package/dist/components/embedded-search.cjs +1 -1
- package/dist/components/embedded-search.d.cts +42 -55
- package/dist/components/embedded-search.d.ts +42 -55
- package/dist/components/embedded-search.js +289 -242
- package/dist/components/modal.cjs +1 -1
- package/dist/components/modal.d.cts +1 -1
- package/dist/components/modal.d.ts +1 -1
- package/dist/components/modal.js +26 -26
- package/dist/node_modules/.pnpm/use-sync-external-store@1.4.0_react@19.0.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.cjs +9 -0
- package/dist/node_modules/.pnpm/use-sync-external-store@1.4.0_react@19.0.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +68 -0
- package/dist/node_modules/.pnpm/use-sync-external-store@1.4.0_react@19.0.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.cjs +9 -0
- package/dist/node_modules/.pnpm/use-sync-external-store@1.4.0_react@19.0.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +56 -0
- package/dist/node_modules/.pnpm/use-sync-external-store@1.4.0_react@19.0.0/node_modules/use-sync-external-store/shim/index.cjs +1 -0
- package/dist/node_modules/.pnpm/use-sync-external-store@1.4.0_react@19.0.0/node_modules/use-sync-external-store/shim/index.js +8 -0
- package/dist/providers/base-events-provider.cjs +1 -1
- package/dist/providers/base-events-provider.js +1 -1
- package/package.json +10 -5
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as i, Fragment as k } from "react/jsx-runtime";
|
|
3
|
+
import * as c from "react";
|
|
4
|
+
import { composeEventHandlers as d } from "@radix-ui/primitive";
|
|
5
|
+
import { useComposedRefs as _ } from "@radix-ui/react-compose-refs";
|
|
6
|
+
import { createContextScope as L } from "@radix-ui/react-context";
|
|
7
|
+
import { useId as C } from "@radix-ui/react-id";
|
|
8
|
+
import { useControllableState as G } from "@radix-ui/react-use-controllable-state";
|
|
9
|
+
import { DismissableLayer as j } from "@radix-ui/react-dismissable-layer";
|
|
10
|
+
import { FocusScope as H } from "@radix-ui/react-focus-scope";
|
|
11
|
+
import "@radix-ui/react-portal";
|
|
12
|
+
import { Presence as y } from "@radix-ui/react-presence";
|
|
13
|
+
import { Primitive as p } from "@radix-ui/react-primitive";
|
|
14
|
+
import { useFocusGuards as K } from "@radix-ui/react-focus-guards";
|
|
15
|
+
import { RemoveScroll as U } from "react-remove-scroll";
|
|
16
|
+
import { hideOthers as V } from "aria-hidden";
|
|
17
|
+
import { Slot as Y } from "@radix-ui/react-slot";
|
|
18
|
+
const O = "Dialog", [E, go] = L(O), [Z, l] = E(O), h = (o) => {
|
|
19
|
+
const { __scopeDialog: s, children: r, open: n, defaultOpen: t, onOpenChange: e, modal: u = !0 } = o, a = c.useRef(null), g = c.useRef(null), [D = !1, R] = G({
|
|
20
|
+
prop: n,
|
|
21
|
+
defaultProp: t,
|
|
22
|
+
onChange: e
|
|
23
|
+
});
|
|
24
|
+
return /* @__PURE__ */ i(
|
|
25
|
+
Z,
|
|
26
|
+
{
|
|
27
|
+
scope: s,
|
|
28
|
+
triggerRef: a,
|
|
29
|
+
contentRef: g,
|
|
30
|
+
contentId: C(),
|
|
31
|
+
titleId: C(),
|
|
32
|
+
descriptionId: C(),
|
|
33
|
+
open: D,
|
|
34
|
+
onOpenChange: R,
|
|
35
|
+
onOpenToggle: c.useCallback(() => R((S) => !S), [R]),
|
|
36
|
+
modal: u,
|
|
37
|
+
children: r
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
h.displayName = O;
|
|
42
|
+
const I = "DialogTrigger", q = c.forwardRef(
|
|
43
|
+
(o, s) => {
|
|
44
|
+
const { __scopeDialog: r, ...n } = o, t = l(I, r), e = _(s, t.triggerRef);
|
|
45
|
+
return /* @__PURE__ */ i(
|
|
46
|
+
p.button,
|
|
47
|
+
{
|
|
48
|
+
type: "button",
|
|
49
|
+
"aria-haspopup": "dialog",
|
|
50
|
+
"aria-expanded": t.open,
|
|
51
|
+
"aria-controls": t.contentId,
|
|
52
|
+
"data-state": P(t.open),
|
|
53
|
+
...n,
|
|
54
|
+
ref: e,
|
|
55
|
+
onClick: d(o.onClick, t.onOpenToggle)
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
q.displayName = I;
|
|
61
|
+
const z = "DialogPortal", [mo, v] = E(z, {
|
|
62
|
+
forceMount: void 0
|
|
63
|
+
}), m = "DialogOverlay", x = c.forwardRef(
|
|
64
|
+
(o, s) => {
|
|
65
|
+
const r = v(m, o.__scopeDialog), { forceMount: n = r.forceMount, ...t } = o, e = l(m, o.__scopeDialog);
|
|
66
|
+
return e.modal ? /* @__PURE__ */ i(y, { present: n || e.open, children: /* @__PURE__ */ i(B, { ...t, ref: s }) }) : null;
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
x.displayName = m;
|
|
70
|
+
const B = c.forwardRef(
|
|
71
|
+
(o, s) => {
|
|
72
|
+
const { __scopeDialog: r, ...n } = o, t = l(m, r);
|
|
73
|
+
return (
|
|
74
|
+
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
75
|
+
// ie. when `Overlay` and `Content` are siblings
|
|
76
|
+
/* @__PURE__ */ i(U, { as: Y, allowPinchZoom: !0, shards: [t.contentRef], children: /* @__PURE__ */ i(
|
|
77
|
+
p.div,
|
|
78
|
+
{
|
|
79
|
+
"data-state": P(t.open),
|
|
80
|
+
...n,
|
|
81
|
+
ref: s,
|
|
82
|
+
style: { pointerEvents: "auto", ...n.style }
|
|
83
|
+
}
|
|
84
|
+
) })
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
), f = "DialogContent", A = c.forwardRef(
|
|
88
|
+
(o, s) => {
|
|
89
|
+
const r = v(f, o.__scopeDialog), { forceMount: n = r.forceMount, ...t } = o, e = l(f, o.__scopeDialog);
|
|
90
|
+
return /* @__PURE__ */ i(y, { present: n || e.open, children: e.modal ? /* @__PURE__ */ i(J, { ...t, ref: s }) : /* @__PURE__ */ i(Q, { ...t, ref: s }) });
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
A.displayName = f;
|
|
94
|
+
const J = c.forwardRef(
|
|
95
|
+
(o, s) => {
|
|
96
|
+
const r = l(f, o.__scopeDialog), n = c.useRef(null), t = _(s, r.contentRef, n);
|
|
97
|
+
return c.useEffect(() => {
|
|
98
|
+
const e = n.current;
|
|
99
|
+
if (e) return V(e);
|
|
100
|
+
}, []), /* @__PURE__ */ i(
|
|
101
|
+
N,
|
|
102
|
+
{
|
|
103
|
+
...o,
|
|
104
|
+
ref: t,
|
|
105
|
+
trapFocus: r.open,
|
|
106
|
+
disableOutsidePointerEvents: !0,
|
|
107
|
+
onCloseAutoFocus: d(o.onCloseAutoFocus, (e) => {
|
|
108
|
+
e.preventDefault(), r.triggerRef.current?.focus();
|
|
109
|
+
}),
|
|
110
|
+
onPointerDownOutside: d(o.onPointerDownOutside, (e) => {
|
|
111
|
+
const u = e.detail.originalEvent, a = u.button === 0 && u.ctrlKey === !0;
|
|
112
|
+
(u.button === 2 || a) && e.preventDefault();
|
|
113
|
+
}),
|
|
114
|
+
onFocusOutside: d(
|
|
115
|
+
o.onFocusOutside,
|
|
116
|
+
(e) => e.preventDefault()
|
|
117
|
+
)
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
), Q = c.forwardRef(
|
|
122
|
+
(o, s) => {
|
|
123
|
+
const r = l(f, o.__scopeDialog), n = c.useRef(!1), t = c.useRef(!1);
|
|
124
|
+
return /* @__PURE__ */ i(
|
|
125
|
+
N,
|
|
126
|
+
{
|
|
127
|
+
...o,
|
|
128
|
+
ref: s,
|
|
129
|
+
trapFocus: !1,
|
|
130
|
+
disableOutsidePointerEvents: !1,
|
|
131
|
+
onCloseAutoFocus: (e) => {
|
|
132
|
+
o.onCloseAutoFocus?.(e), e.defaultPrevented || (n.current || r.triggerRef.current?.focus(), e.preventDefault()), n.current = !1, t.current = !1;
|
|
133
|
+
},
|
|
134
|
+
onInteractOutside: (e) => {
|
|
135
|
+
o.onInteractOutside?.(e), e.defaultPrevented || (n.current = !0, e.detail.originalEvent.type === "pointerdown" && (t.current = !0));
|
|
136
|
+
const u = e.target;
|
|
137
|
+
r.triggerRef.current?.contains(u) && e.preventDefault(), e.detail.originalEvent.type === "focusin" && t.current && e.preventDefault();
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
), N = c.forwardRef(
|
|
143
|
+
(o, s) => {
|
|
144
|
+
const { __scopeDialog: r, trapFocus: n, onOpenAutoFocus: t, onCloseAutoFocus: e, ...u } = o, a = l(f, r), g = c.useRef(null), D = _(s, g);
|
|
145
|
+
return K(), /* @__PURE__ */ i(k, { children: /* @__PURE__ */ i(
|
|
146
|
+
H,
|
|
147
|
+
{
|
|
148
|
+
asChild: !0,
|
|
149
|
+
loop: !0,
|
|
150
|
+
trapped: n,
|
|
151
|
+
onMountAutoFocus: t,
|
|
152
|
+
onUnmountAutoFocus: e,
|
|
153
|
+
children: /* @__PURE__ */ i(
|
|
154
|
+
j,
|
|
155
|
+
{
|
|
156
|
+
role: "dialog",
|
|
157
|
+
id: a.contentId,
|
|
158
|
+
"aria-describedby": a.descriptionId,
|
|
159
|
+
"aria-labelledby": a.titleId,
|
|
160
|
+
"data-state": P(a.open),
|
|
161
|
+
...u,
|
|
162
|
+
ref: D,
|
|
163
|
+
onDismiss: () => a.onOpenChange(!1)
|
|
164
|
+
}
|
|
165
|
+
)
|
|
166
|
+
}
|
|
167
|
+
) });
|
|
168
|
+
}
|
|
169
|
+
), T = "DialogTitle", F = c.forwardRef(
|
|
170
|
+
(o, s) => {
|
|
171
|
+
const { __scopeDialog: r, ...n } = o, t = l(T, r);
|
|
172
|
+
return /* @__PURE__ */ i(p.h2, { id: t.titleId, ...n, ref: s });
|
|
173
|
+
}
|
|
174
|
+
);
|
|
175
|
+
F.displayName = T;
|
|
176
|
+
const M = "DialogDescription", W = c.forwardRef(
|
|
177
|
+
(o, s) => {
|
|
178
|
+
const { __scopeDialog: r, ...n } = o, t = l(M, r);
|
|
179
|
+
return /* @__PURE__ */ i(p.p, { id: t.descriptionId, ...n, ref: s });
|
|
180
|
+
}
|
|
181
|
+
);
|
|
182
|
+
W.displayName = M;
|
|
183
|
+
const b = "DialogClose", w = c.forwardRef(
|
|
184
|
+
(o, s) => {
|
|
185
|
+
const { __scopeDialog: r, ...n } = o, t = l(b, r);
|
|
186
|
+
return /* @__PURE__ */ i(
|
|
187
|
+
p.button,
|
|
188
|
+
{
|
|
189
|
+
type: "button",
|
|
190
|
+
...n,
|
|
191
|
+
ref: s,
|
|
192
|
+
onClick: d(o.onClick, () => t.onOpenChange(!1))
|
|
193
|
+
}
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
);
|
|
197
|
+
w.displayName = b;
|
|
198
|
+
function P(o) {
|
|
199
|
+
return o ? "open" : "closed";
|
|
200
|
+
}
|
|
201
|
+
const Do = h, Ro = x, Co = A, _o = F, Oo = w;
|
|
202
|
+
export {
|
|
203
|
+
Oo as Close,
|
|
204
|
+
Co as Content,
|
|
205
|
+
h as Dialog,
|
|
206
|
+
w as DialogClose,
|
|
207
|
+
A as DialogContent,
|
|
208
|
+
W as DialogDescription,
|
|
209
|
+
x as DialogOverlay,
|
|
210
|
+
F as DialogTitle,
|
|
211
|
+
q as DialogTrigger,
|
|
212
|
+
Ro as Overlay,
|
|
213
|
+
Do as Root,
|
|
214
|
+
_o as Title,
|
|
215
|
+
go as createDialogScope
|
|
216
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),g=require("react"),ne=require("react-textarea-autosize"),_a=require("@radix-ui/react-avatar"),Aa=require("@radix-ui/react-checkbox"),ka=require("@radix-ui/react-popover"),Fa=require("@radix-ui/react-tooltip"),Ea=require("@radix-ui/react-hover-card"),Ia=require("@radix-ui/react-scroll-area"),Ma=require("@radix-ui/react-select"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),g=require("react"),ne=require("react-textarea-autosize"),_a=require("@radix-ui/react-avatar"),Aa=require("@radix-ui/react-checkbox"),ka=require("@radix-ui/react-popover"),Fa=require("@radix-ui/react-tooltip"),Ea=require("@radix-ui/react-hover-card"),Ia=require("@radix-ui/react-scroll-area"),Ma=require("@radix-ui/react-select"),_=require("../atoms/dialog.cjs"),Sa=require("../node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/hi2/index.cjs"),fa=require("../node_modules/.pnpm/react-icons@5.4.0_react@19.0.0/node_modules/react-icons/io5/index.cjs"),Ba=require("../atoms/avatars/ai.cjs"),xa=require("../atoms/avatars/user.cjs"),k=require("../atoms/icons/custom-icon.cjs"),f=require("../atoms/icons/built-in-icon-renderer.cjs"),Ta=require("../atoms/link.cjs"),$=require("../atoms/markdown/index.cjs"),H=require("../providers/attachment-item-provider.cjs"),F=require("../providers/attachments-bar-provider.cjs"),B=require("../providers/source-item-provider.cjs"),C=require("../providers/config-provider.cjs"),D=require("../providers/conversation-provider.cjs"),V=require("../providers/chat-events-provider.cjs"),re=require("../providers/feedback-provider.cjs"),q=require("../providers/message-attachments-provider.cjs"),P=require("../providers/message-provider.cjs"),be=require("../atoms/icons/checkbox-icon.cjs"),ie=require("../hooks/use-copy-to-clipboard.cjs"),U=require("../providers/feedback-item-provider.cjs"),ja=require("../utils/get-message-metadata.cjs"),h=require("../utils/misc.cjs"),i=require("./factory.cjs"),b=require("./embedded-chat/chat-provider.cjs"),ya=require("./tagline-logo-icon.cjs"),Ha=require("../hooks/use-settle-action.cjs"),wa=require("../hooks/use-container-size.cjs"),se=require("./embedded-chat/use-chat-action.cjs"),ae=require("../providers/help-menu-provider.cjs"),A=require("../providers/chat-form-provider.cjs"),x=require("../providers/form-field-provider.cjs"),La=require("react-hook-form"),Da=require("../utils/highlight-emphasis.cjs"),ge=require("./modal/modal-provider.cjs"),qa=require("@inkeep/cxkit-color-mode"),oe=require("../utils/compose-refs.cjs"),u=require("../utils/compose-event-handlers.cjs"),Ra=require("../hooks/use-scroll-to-bottom.cjs"),Wa=require("../atoms/api/analytics/conversation.cjs"),Oa=require("../utils/transform-source/index.cjs");function w(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const r=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,r.get?r:{enumerable:!0,get:()=>t[a]})}}return e.default=t,Object.freeze(e)}const de=w(_a),K=w(Aa),z=w(ka),T=w(Fa),G=w(Ea),R=w(Ia),I=w(Ma),Qa="__intro__",Na=i.ikp("div",{_id:"aiChatWrapper"}),Pe=g.forwardRef((t,e)=>{const{...a}=t,{isHidden:r,isMobile:s}=b.useChat(),[d,o]=wa.useContainerSize(),c=oe.useComposedRefs(e,d),m=o?.width?o.width>580:!0,l=ge.useModal();return n.jsx(Na,{ref:c,"data-widget-md":h.dataAttr(m),"data-hidden":h.dataAttr(r),"data-in-modal":h.dataAttr(!!l),"data-mobile":h.dataAttr(s),...a})}),$a=i.ikp("div",{_id:"aiChatConversationLoading"}),_e=t=>{const{isLoadingConversation:e}=b.useChat();return e?n.jsx($a,{children:n.jsx("span",{children:"Loading..."}),...t}):null},Va=i.ikp("div",{_id:"aiChatRoot"}),Ae=t=>{const{isLoadingConversation:e,isHidden:a}=b.useChat(),{form:r}=A.useChatForm();return e||r?null:n.jsx(Va,{"data-hidden":h.dataAttr(a),...t})},Ua=i.ikp("div",{_id:"aiChatHeader"}),ke=i.ikp("div",{_id:"aiChatHeader__Toolbar"}),Fe=i.ikp("div",{_id:"aiChatHeader__ToolbarHeaderWrapper"}),Ka=i.ikp("div",{_id:"aiChatHeader__ToolbarHeader"}),Ee=g.memo(t=>{const{aiChatSettings:e}=C.useInkeepConfig(),a=`Ask ${e.aiAssistantName||"AI"}`;return n.jsx(Ka,{...t,children:a})}),Ie=i.ikp("div",{_id:"aiChatContent"}),Me=i.ikp(R.Root,{_id:"aiChatContentScrollArea"}),za=i.ikp(R.Viewport,{_id:"aiChatContentScrollArea__Viewport"}),Se=g.forwardRef(({children:t,...e},a)=>{const{containerRef:r}=Ra.useScrollToBottom(),s=oe.useComposedRefs(a,r);return n.jsx(za,{ref:s,children:n.jsx("div",{"data-part":"grid",style:{display:"grid"},children:t}),...e})}),fe=i.ikp(R.ScrollAreaScrollbar,{_id:"aiChatContentScrollArea__Scrollbar"}),Be=i.ikp(R.ScrollAreaThumb,{_id:"aiChatContentScrollArea__Thumb"}),xe=i.ikp(R.Corner,{_id:"aiChatContentScrollArea__Corner"}),Ga=i.ikp("div",{_id:"aiChatMessages"}),Te=t=>{const e=b.useChat(),{children:a,...r}=t;return n.jsx(Ga,{children:h.maybeRender(a,e),...r})},Ya=i.ikp("div",{_id:"aiChatDisclaimer"}),je=g.memo(t=>{const{aiChatSettings:e}=C.useInkeepConfig();return e.disclaimerSettings?.isEnabled?n.jsx(G.Root,{openDelay:100,children:n.jsx(Ya,{...t})}):null}),Ja=i.ikp("span",{_id:"aiChatDisclaimerLabel"}),ye=g.memo(t=>{const{aiChatSettings:e}=C.useInkeepConfig(),a=e.disclaimerSettings;return n.jsx(Ja,{children:a?.label,...t})}),He=i.ikp(G.Trigger,{_id:"aiChatDisclaimerTrigger",children:n.jsx(k.CustomIcon,{iconKey:"info"})}),Xa=i.ikp(G.Content,{_id:"aiChatDisclaimerContent"}),we=t=>n.jsx(Xa,{side:"top",sideOffset:8,align:"end",alignOffset:-10,...t});i.ikp($.Markdown,{_id:"aiChatDisclaimerText"});const Le=g.memo(t=>{const{aiChatSettings:e}=C.useInkeepConfig(),a=e.aiAssistantName,s=e.disclaimerSettings?.tooltip||`Information provided by ${a||"this AI assistant"} is not guaranteed to be accurate or comprehensive.`;return n.jsx($.Markdown,{shouldOpenLinksInNewTab:!0,children:s,...t})}),De=i.ikp(G.Arrow,{_id:"aiChatDisclaimerArrow"}),Za=i.ikp("div",{_id:"aiChatQuickQuestions"}),qe=t=>{const{aiChatSettings:e}=C.useInkeepConfig(),{messages:a}=b.useChat();return!e.exampleQuestions?.length||a.length?null:n.jsx(Za,{...t})},en=i.ikp("h3",{_id:"aiChatQuickQuestionsLabel"}),Re=g.memo(t=>{const{aiChatSettings:e}=C.useInkeepConfig();return n.jsx(en,{children:e.exampleQuestionsLabel,...t})}),tn=i.ikp("div",{_id:"aiChatQuickQuestionsList"}),We=g.memo(t=>{const{aiChatSettings:e}=C.useInkeepConfig(),a=e.exampleQuestions,{children:r,...s}=t;return n.jsx(tn,{children:h.maybeRender(r,a),...s})}),an=i.ikp("div",{_id:"aiChatQuickQuestion"}),Oe=g.forwardRef((t,e)=>{const{aiChatSettings:a}=C.useInkeepConfig(),r=a.isFirstExampleQuestionHighlighted;return n.jsx(an,{ref:e,"data-highlight":h.dataAttr(r),...t})}),nn=i.ikp("button",{_id:"aiChatQuickQuestionButton"}),Qe=t=>{const{question:e,onClick:a,...r}=t,{handleSubmit:s}=b.useChat();return n.jsx(nn,{onClick:u.composeEventHandlers(a,()=>s(e)),children:e,...r})},rn=i.ikp("div",{_id:"aiChatWorkflows"}),Ne=t=>{const{aiChatSettings:e}=C.useInkeepConfig(),{messages:a}=b.useChat();return!e.workflows?.length||a.length?null:n.jsx(rn,{...t})},sn=i.ikp("h3",{_id:"aiChatWorkflowsLabel"}),$e=g.memo(t=>{const{aiChatSettings:e}=C.useInkeepConfig();return n.jsx(sn,{children:e.workflowsHeader,...t})}),on=i.ikp("div",{_id:"aiChatWorkflowsList"}),Ve=g.memo(t=>{const{aiChatSettings:e}=C.useInkeepConfig(),a=e.workflows,{children:r,...s}=t;return n.jsx(on,{children:h.maybeRender(r,a),...s})}),dn=i.ikp("button",{_id:"aiChatWorkflow"}),Ue=t=>{const{workflow:e,onClick:a,...r}=t,{handleWorkflow:s}=b.useChat();return n.jsx(dn,{onClick:u.composeEventHandlers(a,()=>s(e)),children:e.displayName,...r})},cn=i.ikp(Sa.HiMiniBolt,{_id:"aiChatWorkflow__Icon"}),Ke=t=>n.jsx(cn,{...t}),mn=i.ikp("div",{_id:"aiChatMessageWrapper"}),ce=t=>{const{message:e,...a}=t;return e.role==="system"?null:n.jsx(P.MessageProvider,{message:e,children:n.jsx(mn,{"data-role":e.role,...a})})},ze=g.memo(t=>{const{message:e,...a}=t,{aiChatSettings:r,baseSettings:s}=C.useInkeepConfig(),d=r.aiAssistantName,o=d?`Hi, I'm ${d}!`:"Hi!",c=r.chatSubjectName??s.organizationDisplayName,m=`${o}
|
|
2
2
|
|
|
3
3
|
I'm an AI assistant trained on documentation, help articles, and other content.`,l=c?`
|
|
4
4
|
|
|
5
5
|
Ask me anything about \`${c}\`.`:`
|
|
6
6
|
|
|
7
|
-
Let me know how I can help.`,v={content:r.introMessage??`${m}${l}`,id:Na,...e,role:"assistant",links:[]};return n.jsx(ce,{message:v,...a})}),hn=i.ikp("div",{_id:"aiChatMessageHeader"}),Ge=t=>{const{message:e}=P.useMessage();return n.jsx(hn,{"data-role":e.role,...t})},un=i.ikp("div",{_id:"aiChatMessageLoading"}),Ye=t=>{const{isLoading:e,isStreaming:a,messages:r}=b.useChat(),{message:s}=P.useMessage();return!(r.at(-1)?.id===s?.id)||s.role!=="assistant"||!e||a?null:n.jsx(un,{children:"Thinking...",...t})},Cn=i.ikp("div",{_id:"aiChatMessageAvatar"}),Je=t=>{const{message:e}=P.useMessage();return n.jsx(Cn,{"data-role":e.role,...t})},pn=i.ikp(de.Root,{_id:"aiChatMessageAvatarContent"}),Xe=t=>{const{message:e}=P.useMessage(),{baseSettings:a}=C.useInkeepConfig();return n.jsx(pn,{"data-username":h.dataAttr(e.role==="user"&&!!a.userProperties.name),"data-role":e.role,...t})},vn=i.ikp(de.Fallback,{_id:"aiChatMessageAvatarFallback"}),Ze=g.memo(t=>{const{baseSettings:e}=C.useInkeepConfig(),{message:a}=P.useMessage();return e.userProperties.name?n.jsx(vn,{"data-role":a.role,children:h.getInitials(e.userProperties.name),...t}):null}),pe=i.ikp(de.Image,{_id:"aiChatMessageAvatarImage"}),et=g.memo(t=>{const{onLoadingStatusChange:e,...a}=t,{aiChatSettings:r,baseSettings:{userProperties:s}}=C.useInkeepConfig(),{message:d}=P.useMessage(),{aiAssistantAvatar:o}=r??{},c=typeof o=="string"?o:o?.light,m=(typeof o=="string"?o:o?.dark)??c,l=Ra.useColorModeValue(c,m),[p,v]=g.useState(l);g.useEffect(()=>{v(l)},[l]);const E=y=>{y==="error"&&v(null)};return d.role==="user"?s.name?null:r.userAvatar?n.jsx(pe,{"data-type":"image","data-role":d.role,src:r.userAvatar,...t}):n.jsx(Ta.default,{"data-type":"icon","data-role":d.role,...t}):p?n.jsx(pe,{src:p,"data-type":"image","data-role":d.role,onLoadingStatusChange:u.composeEventHandlers(e,E),...a}):n.jsx(xa.default,{"data-type":"icon","data-role":d.role,...t})}),bn=i.ikp("span",{_id:"aiChatMessageName"}),tt=t=>{const{message:e}=P.useMessage();return n.jsx(bn,{"data-role":e.role,children:e.role==="user"?"You":"AI assistant",...t})},gn=i.ikp("div",{_id:"aiChatMessageContentWrapper"}),it=t=>{const{message:e}=P.useMessage();return n.jsx(gn,{"data-role":e.role,...t})},Pn=i.ikp("div",{_id:"aiChatMessageContent"}),at=t=>{const{message:e}=P.useMessage();return n.jsx(Pn,{"data-role":e.role,...t})},_n=i.ikp("div",{_id:"aiChatMessageAttachments"}),nt=t=>{const{message:e}=P.useMessage(),a=e.metadata?.attributes?.attachments;return e.role!=="user"||!a?.length?null:n.jsx(q.MessageAttachmentsProvider,{children:n.jsx(_n,{...t})})},An=i.ikp("div",{_id:"aiChatMessageAttachments__List"}),rt=t=>{const{children:e,...a}=t,{message:r}=P.useMessage(),s=r.metadata?.attributes?.attachments;return s?n.jsx(An,{children:h.maybeRender(e,s),...a}):null},kn=i.ikp("div",{_id:"aiChatMessageAttachments__Item"}),st=t=>{const{attachment:e,onClick:a,...r}=t,{selectItem:s,onOpen:d}=q.useMessageAttachments(),o=()=>{s(e),d()};return n.jsx(w.AttachmentItemProvider,{attachment:e,children:n.jsx(kn,{onClick:u.composeEventHandlers(a,o),...r})})},Fn=i.ikp(f.BuiltInIconRenderer,{_id:"aiChatMessageAttachments__ItemIcon"}),ot=t=>{const{attachment:e}=w.useAttachmentItem(),a=e.contentType?.attachmentIcon;return a?n.jsx(Fn,{iconSettings:a,...t}):null},En=i.ikp("span",{_id:"aiChatMessageAttachments__ItemTitle"}),dt=t=>{const{attachment:e}=w.useAttachmentItem();return n.jsx(En,{children:e.title,...t})},In=i.ikp(A.Root,{_id:"aiChatMessageAttachmentsPreview"}),ct=t=>{const{onOpenChange:e,...a}=t,{selectItem:r,isOpen:s,onClose:d,selectedItem:o}=q.useMessageAttachments(),c=m=>{m||(d(),r(null))};return n.jsx(In,{open:s&&o!==null,onOpenChange:u.composeEventHandlers(e,c),...a})},mt=i.ikp(A.Overlay,{_id:"aiChatMessageAttachmentsPreview__Overlay"}),lt=i.ikp(A.Content,{_id:"aiChatMessageAttachmentsPreview__Content","aria-describedby":void 0}),Mn=i.ikp(A.Title,{_id:"aiChatMessageAttachmentsPreview__Header"}),ht=t=>{const{selectedItem:e}=q.useMessageAttachments();return n.jsx(Mn,{children:e?.title||"Attachment",...t})},ut=i.ikp(A.Close,{_id:"aiChatMessageAttachmentsPreview__Close",children:n.jsx(k.CustomIcon,{iconKey:"close"})}),Sn=i.ikp("p",{_id:"aiChatMessageAttachmentsPreview__Body"}),Ct=t=>{const{selectedItem:e}=q.useMessageAttachments();return n.jsx(Sn,{children:e?.content,...t})},ve=i.ikp("div",{_id:"aiChatMessage"}),pt=t=>{const{aiChatSettings:e}=C.useInkeepConfig(),{componentStyles:a,...r}=t,{message:s}=P.useMessage(),{logEvent:d}=V.useChatEvents(),o=h.getMessageContent(s),{conversation:c}=D.useInkeepConversation();return s.role==="user"?n.jsx(ve,{"data-role":s.role,children:o,...r}):n.jsx(ve,{"data-role":s.role,...r,children:n.jsx($.Markdown,{children:o,componentStyles:a,shouldOpenLinksInNewTab:e.shouldOpenLinksInNewTab,onLinkClick:(m,l)=>{d({eventName:"assistant_message_inline_link_opened",properties:{title:l?.toString(),url:m}})},onCodeCopy:(m,l)=>{d({eventName:"assistant_code_block_copied",properties:{conversation:c,language:m,code:l}})}})})},fn=i.ikp("div",{_id:"aiChatMessageActions"}),vt=t=>{const{isLoading:e,messages:a}=b.useChat(),{message:r}=P.useMessage();return a.at(-1)?.id===r?.id&&e||r.role==="user"?null:n.jsx(fn,{...t})},Bn=i.ikp("div",{_id:"aiChatMessageToolActions"}),bt=t=>{const{children:e,...a}=t,{message:r}=P.useMessage(),{messageToolCalls:s}=b.useChat(),d=s[r.id]||[];return n.jsx(Bn,{children:h.maybeRender(e,d),...a})},gt=t=>{const{onClick:e,action:a,...r}=t,{handleAction:s}=se.useChatAction(a),d=()=>{s()},o=a.label||"Contact Support",c=n.jsxs(n.Fragment,{children:[a.icon&&n.jsx(f.BuiltInIconRenderer,{iconSettings:a.icon}),o]}),m=a.action.type,l=i.ikp(m==="open_link"?"a":"button",{_id:"aiChatMessageToolAction",children:c,"data-type":a.action.type,...m==="open_link"&&{href:a.action.url,target:"_blank",rel:"noopener"},onClick:u.composeEventHandlers(e,d)});return n.jsx(l,{...r})},xn=i.ikp("button",{_id:"aiChatMessageAction"}),Pt=t=>{const{action:e,onClick:a,className:r,...s}=t,{conversation:d}=D.useInkeepConversation(),{message:o}=P.useMessage(),{isStreaming:c,messages:m}=b.useChat(),[l,p]=ie.useCopyToClipboard(),{feedback:v,submitPositiveFeedback:E,setCurrentFeedback:y,currentFeedback:W}=re.useMessageFeedback(),{logEvent:X}=V.useChatEvents(),[O,Z]=wa.useSettleAction(),{baseSettings:{privacyPreferences:he}}=C.useInkeepConfig(),{optOutAllAnalytics:ee}=he,ue=m.at(-1)?.id===o?.id,te=o.role==="assistant";if(ue&&c||!te||{copy:!1,upvote:ee,downvote:ee}[e])return null;const H={copy(){p(h.getMessageContent(o)),X({eventName:"assistant_message_copied",properties:{conversation:d}})},upvote(){E(o.id).then(()=>{Z()})},downvote(){y(o.id)}},L={copy:"Copy Message",upvote:"Upvote Message",downvote:"Downvote Message"},M={copy:n.jsx(k.CustomIcon,{iconKey:l?"messageCopied":"messageCopy"}),upvote:n.jsx(k.CustomIcon,{iconKey:O?"messageCopied":"thumbsUp"}),downvote:n.jsx(k.CustomIcon,{iconKey:"thumbsDown"})},S={copy:{"data-copied":h.dataAttr(l)},upvote:{"data-upvoted":h.dataAttr(v[o.id]?.type==="positive")},downvote:{"data-downvoted":h.dataAttr(v[o.id]?.type==="negative"),"data-state":W===null?"closed":"open"}};return n.jsx(xn,{"data-action":e,...S[e],children:M[e],"aria-label":L[e],className:`${r} ${e}`,onClick:u.composeEventHandlers(a,H[e]),...s})},Tn=i.ikp("div",{_id:"aiChatMessageSources"}),_t=t=>{const{message:e}=P.useMessage();return e.role!=="assistant"||!e.links?.length?null:n.jsx(Tn,{...t})},jn=i.ikp("div",{_id:"aiChatMessageSources__Header"}),At=t=>n.jsx(jn,{children:"Sources",...t}),yn=i.ikp("div",{_id:"aiChatMessageSources__List"}),kt=t=>{const{message:e}=P.useMessage(),{children:a,...r}=t,{baseSettings:{transformSource:s,organizationDisplayName:d},aiChatSettings:{shouldOpenLinksInNewTab:o},searchSettings:{tabs:c}}=C.useInkeepConfig();if(e.role!=="assistant")return null;const m=e.links.map(l=>{const p=Qa.transformInkeepSource(l,"chatSourceItem",{organizationDisplayName:d,tabs:c,transformSource:s}),v=o||p.shouldOpenInNewTab;return{...p,isExternal:v}});return n.jsx(yn,{children:h.maybeRender(a,m),...r})},Hn=i.ikp(ja.LinkWithQueryParams,{_id:"aiChatMessageSourceItem"}),Ft=t=>{const{source:e,onClick:a,...r}=t,{logEvent:s}=V.useChatEvents(),{conversation:d}=D.useInkeepConversation(),o=()=>{s({eventName:"assistant_source_item_clicked",properties:{conversation:d,link:e}})};return n.jsx(B.SourceItemProvider,{source:e,children:n.jsx(Hn,{"data-type":e.type,appendToUrl:e.appendToUrl,isExternal:e.isExternal,"data-breadcrumbs":!!e.breadcrumbs?.length,onClick:u.composeEventHandlers(a,o),...r})})},wn=i.ikp("div",{_id:"aiChatMessageSourceItem__Breadcrumbs"}),Et=t=>{const{source:e}=B.useSourceItem();return e.breadcrumbs?.length?n.jsx(wn,{"data-type":e.type,...t}):null},Ln=i.ikp(k.CustomIcon,{_id:"aiChatMessageSourceItem__BreadcrumbIcon",iconKey:"breadcrumbSeparator"}),Dn=i.ikp(f.BuiltInIconRenderer,{_id:"aiChatMessageSourceItem__Icon"}),It=t=>{const{source:e}=B.useSourceItem();return n.jsx(Dn,{iconSettings:e.icon,"data-type":e.type,...t})},qn=i.ikp("span",{_id:"aiChatMessageSourceItem__Title"}),Mt=t=>{const{source:e}=B.useSourceItem();return n.jsx(qn,{"data-type":e.type,children:e.title,...t})},Rn=i.ikp("span",{_id:"aiChatMessageSourceItem__Tag"}),St=t=>{const{source:e}=B.useSourceItem();return n.jsx(Rn,{"data-type":e.type,...t})},Wn=i.ikp("span",{_id:"aiChatMessageSourceItem__Description"}),ft=t=>{const{source:e}=B.useSourceItem(),{children:a,...r}=t,s=g.useMemo(()=>e.description?qa.highlightEmphasis(e.description):[],[e.description]);return s.length?n.jsx(Wn,{"data-type":e.type,children:h.maybeRender(a,s),...r}):null},On=i.ikp("span",{_id:"aiChatMessageSourceItem__DescriptionPart"}),Bt=t=>{const{part:e,...a}=t,{source:r}=B.useSourceItem();return typeof e=="string"?e:n.jsx(On,{"data-type":r.type,children:e.content,"data-highlighted":h.dataAttr(e.highlighted),...a})},Qn=i.ikp(k.CustomIcon,{_id:"aiChatMessageSourceItem__Indicator"}),xt=t=>{const{source:e}=B.useSourceItem();return n.jsx(Qn,{iconKey:e.isExternal?"openLinkInNewTab":"openLinkInSameTab",...t})},Tt=i.ikp("div",{_id:"aiChatFooter"}),jt=i.ikp("div",{_id:"aiChatInput__Fieldset"}),yt=i.ikp("div",{_id:"aiChatInput__Group"}),Nn=i.ikp("textarea",{_id:"aiChatInput"}),Ht=g.forwardRef(({onChange:t,onKeyDown:e,...a},r)=>{const{handleInputChange:s,handleInputKeyDown:d,input:o,error:c,shouldAutoFocusInput:m,inputRef:l}=b.useChat(),{aiChatSettings:p}=C.useInkeepConfig(),v=oe.useComposedRefs(r,l),E=ge.useModal();return g.useEffect(()=>{requestAnimationFrame(()=>{m&&l?.current&&(l.current.focus(),l.current.selectionStart=l.current.value.length)})},[m,l,E?.isOpen]),n.jsx(Nn,{asChild:!0,ref:v,maxLength:99999,placeholder:p.placeholder,value:o,onChange:u.composeEventHandlers(t,s),onKeyDown:u.composeEventHandlers(e,d),disabled:!!c||p.isViewOnly,...a,children:n.jsx(ne,{})})}),$n=i.ikp("button",{_id:"aiChatInput__SendButton"}),wt=t=>{const{handleSubmit:e,isSubmitDisabled:a,error:r}=b.useChat(),{aiChatSettings:s}=C.useInkeepConfig(),{onClick:d,...o}=t;return n.jsx($n,{onClick:u.composeEventHandlers(d,()=>e()),"aria-label":"Send message",disabled:a||!!r||s.isViewOnly,...o})},Lt=i.ikp(k.CustomIcon,{_id:"aiChatInput__SendButtonIcon",iconKey:"chatSubmit"}),Vn=i.ikp("div",{_id:"aiChatAttachmentsBar"}),Dt=t=>{const{selectedWorkflow:e}=b.useChat();return!e||!e.supportedInputs?.length?null:n.jsx(F.AttachmentsBarProvider,{children:n.jsx(Vn,{...t})})},Un=i.ikp("div",{_id:"aiChatAttachmentsBar__List"}),qt=t=>{const{children:e,...a}=t,{messageAttachments:r}=b.useChat();return n.jsx(Un,{children:h.maybeRender(e,r),...a})},Kn=i.ikp("div",{_id:"aiChatAttachmentsBar__Attachment"}),Rt=t=>{const{attachment:e,...a}=t;return n.jsx(w.AttachmentItemProvider,{attachment:e,children:n.jsx(Kn,{...a})})},zn=i.ikp(f.BuiltInIconRenderer,{_id:"aiChatAttachmentsBar__AttachmentIcon"}),Wt=t=>{const{attachment:e}=w.useAttachmentItem(),a=e.contentType?.attachmentIcon;return a?n.jsx(zn,{iconSettings:a,...t}):null},Gn=i.ikp("span",{_id:"aiChatAttachmentsBar__AttachmentTitle"}),Ot=t=>{const{attachment:e}=w.useAttachmentItem();return n.jsx(Gn,{children:e.title,...t})},Yn=i.ikp("button",{_id:"aiChatAttachmentsBar__AttachmentDelete"}),Qt=t=>{const{onClick:e,...a}=t,{attachment:r}=w.useAttachmentItem(),{setMessageAttachments:s}=b.useChat(),d=()=>{s(o=>o.filter(c=>c.id!==r.id))};return n.jsx(Yn,{"aria-label":"Remove attachment",children:n.jsx(k.CustomIcon,{iconKey:"close"}),onClick:u.composeEventHandlers(e,d),...a})},Nt=i.ikp("div",{_id:"aiChatAttachmentsBar__Actions"}),$t=i.ikp(j.Tooltip,{_id:"aiChatAttachmentsBar__InfoTip",delayDuration:0}),Vt=i.ikp(j.Trigger,{_id:"aiChatAttachmentsBar__InfoTipIcon",children:n.jsx(k.CustomIcon,{iconKey:"info"})}),me=i.ikp(j.Arrow,{_id:"aiChatAttachmentsBar__InfoTipArrow"}),Ut=i.ikp(j.Content,{_id:"aiChatAttachmentsBar__InfoTipText",side:"bottom",sideOffset:3,align:"center",children:n.jsxs(n.Fragment,{children:[n.jsx(me,{}),"Attachments will be kept in context for the entire conversation."]})}),Jn=i.ikp("div",{_id:"aiChatAttachmentsBar__Inputs"}),Kt=t=>{const{children:e,...a}=t,{selectedWorkflow:r}=b.useChat();return r?.supportedInputs?n.jsx(Jn,{children:h.maybeRender(e,r.supportedInputs),...a}):null},Xn=i.ikp("button",{_id:"aiChatAttachmentsBar__Input"}),zt=t=>{const{input:e,onClick:a,...r}=t,{selectedWorkflow:s,messageAttachments:d,setMessageAttachments:o}=b.useChat(),{selectInput:c,onOpen:m}=F.useAttachmentsBar(),l=()=>{if(e.type==="FUNCTIONAL_MULTI_ATTACHMENT")return s?e.onInvoke(s,e,o,[...d]):void 0;c(e),m()};return n.jsx(Xn,{children:e.displayName,onClick:u.composeEventHandlers(a,l),...r})},Gt=i.ikp(Ba.IoAdd,{_id:"aiChatAttachmentsBar__InputIcon"}),Zn=i.ikp(A.Root,{_id:"aiChatAttachmentsBar__Modal"}),Yt=t=>{const{onOpenChange:e,...a}=t,{selectInput:r,isOpen:s,onClose:d,selectedInput:o}=F.useAttachmentsBar(),c=m=>{m||(d(),r(null))};return n.jsx(Zn,{open:s&&o!==null,onOpenChange:u.composeEventHandlers(e,c),...a})},Jt=i.ikp(A.Overlay,{_id:"aiChatAttachmentsBar__ModalOverlay"}),Xt=i.ikp(A.Content,{_id:"aiChatAttachmentsBar__ModalContent","aria-describedby":void 0}),Zt=i.ikp("div",{_id:"aiChatAttachmentsBar__ModalHeader"}),er=i.ikp(A.Title,{_id:"aiChatAttachmentsBar__ModalHeading"}),ei=t=>{const{selectedInput:e}=F.useAttachmentsBar(),a=`Add ${e?.displayName}`;return n.jsx(er,{children:a,...t})},tr=i.ikp("span",{_id:"aiChatAttachmentsBar__ModalDescription"}),ti=t=>{const{selectedInput:e}=F.useAttachmentsBar(),a=e?.workflowModalProps?.modalHelpText;return a?n.jsx(tr,{children:a,...t}):null},ir=i.ikp("div",{_id:"aiChatAttachmentsBar__ModalHelp"}),ii=t=>{const{children:e,...a}=t,{selectedInput:r}=F.useAttachmentsBar(),s=r?.workflowModalProps?.modalHelpElement;return s?n.jsx(ir,{asChild:!e,children:e||s,...a}):null},ai=i.ikp(A.Close,{_id:"aiChatAttachmentsBar__ModalClose",children:n.jsx(k.CustomIcon,{iconKey:"close"})}),ni=i.ikp("div",{_id:"aiChatAttachmentsBar__ModalBody"}),ar=i.ikp("form",{_id:"aiChatAttachmentsBar__Form"}),ri=t=>{const{onSubmit:e,...a}=t,{form:r}=F.useAttachmentsBar();return n.jsx(ar,{onSubmit:u.composeEventHandlers(e,r.onSubmit),...a})},si=i.ikp("div",{_id:"aiChatAttachmentsBar__FormTitle",role:"group"}),nr=i.ikp("label",{_id:"aiChatAttachmentsBar__FormTitleLabel"}),oi=t=>{const{form:e,selectedInput:a}=F.useAttachmentsBar();return n.jsx(nr,{htmlFor:`${a?.id}-title`,children:e.labels.title,...t})},rr=i.ikp("input",{_id:"aiChatAttachmentsBar__FormTitleInput"}),di=t=>{const{onChange:e,...a}=t,{form:r,selectedInput:s}=F.useAttachmentsBar();return n.jsx(rr,{name:"title",value:r.data.title,id:`${s?.id}-title`,"data-invalid":h.dataAttr(!!r.errors.title),"aria-invalid":!!r.errors.title,onChange:u.composeEventHandlers(e,r.onChange),...a})},sr=i.ikp("span",{_id:"aiChatAttachmentsBar__FormTitleError"}),ci=t=>{const{form:e}=F.useAttachmentsBar();return e.errors.title?n.jsx(sr,{"aria-live":"polite",children:e.errors.title,...t}):null},mi=i.ikp("div",{_id:"aiChatAttachmentsBar__FormTitle",role:"group"}),or=i.ikp("label",{_id:"aiChatAttachmentsBar__FormContentLabel"}),li=t=>{const{form:e,selectedInput:a}=F.useAttachmentsBar();return n.jsx(or,{htmlFor:`${a?.id}-content`,children:e.labels.content,...t})},dr=i.ikp("textarea",{_id:"aiChatAttachmentsBar__FormTitleInput"}),hi=t=>{const{onChange:e,...a}=t,{form:r,selectedInput:s}=F.useAttachmentsBar();return n.jsx(dr,{asChild:!0,rows:4,name:"content",value:r.data.content,id:`${s?.id}-content`,"data-invalid":h.dataAttr(!!r.errors.content),"aria-invalid":!!r.errors.content,onChange:u.composeEventHandlers(e,r.onChange),...a,children:n.jsx(ne,{maxRows:10})})},cr=i.ikp("span",{_id:"aiChatAttachmentsBar__FormContentError"}),ui=t=>{const{form:e}=F.useAttachmentsBar();return e.errors.content?n.jsx(cr,{"aria-live":"polite",children:e.errors.content,...t}):null},Ci=i.ikp("button",{_id:"aiChatAttachmentsBar__FormSubmitButton",children:"Upload",type:"submit"}),pi=i.ikp("div",{_id:"aiChatActionBar"}),vi=i.ikp("div",{_id:"aiChat__ChatActions"}),bi=i.ikp("div",{_id:"aiChatTagline__Container"}),gi=i.ikp("span",{_id:"aiChatTagline__Text",children:"Powered by"}),Pi=i.ikp(Ha.default,{_id:"aiChatTagline__Logo"}),_i=i.ikp("a",{_id:"aiChatTagline__BrandName",children:"inkeep",href:"https://www.inkeep.com/",target:"_blank",rel:"noopener noreferrer"}),mr=i.ikp("div",{_id:"aiChat__ChatAction"}),Y=t=>{const{action:e,onClick:a,className:r,...s}=t,{clear:d,stop:o,isLoading:c,messages:m,selectedWorkflow:l}=b.useChat(),{conversation:p}=D.useInkeepConversation(),{aiChatSettings:v,baseSettings:E}=C.useInkeepConfig(),{logEvent:y}=V.useChatEvents(),[W,X]=ie.useCopyToClipboard(),[O,Z]=ie.useCopyToClipboard();if({help:!1,copy:m.length===0||!v.isCopyChatButtonVisible||c,share:m.length===0||!v.isShareButtonVisible||!p.id||!!l||c,clear:m.length===0||v.isViewOnly||c,stop:!c}[e])return null;const te={help:()=>{},copy:()=>{const Q=m.map(H=>{const L=`**${H.role==="assistant"?"AI Assistant":"User"}**`,M=h.getMessageContent(H),S=ya.stringifyAttachments(H.metadata?.attributes?.attachments),N=S?`
|
|
7
|
+
Let me know how I can help.`,v={content:r.introMessage??`${m}${l}`,id:Qa,...e,role:"assistant",links:[]};return n.jsx(ce,{message:v,...a})}),ln=i.ikp("div",{_id:"aiChatMessageHeader"}),Ge=t=>{const{message:e}=P.useMessage();return n.jsx(ln,{"data-role":e.role,...t})},hn=i.ikp("div",{_id:"aiChatMessageLoading"}),Ye=t=>{const{isLoading:e,isStreaming:a,messages:r}=b.useChat(),{message:s}=P.useMessage();return!(r.at(-1)?.id===s?.id)||s.role!=="assistant"||!e||a?null:n.jsx(hn,{children:"Thinking...",...t})},un=i.ikp("div",{_id:"aiChatMessageAvatar"}),Je=t=>{const{message:e}=P.useMessage();return n.jsx(un,{"data-role":e.role,...t})},Cn=i.ikp(de.Root,{_id:"aiChatMessageAvatarContent"}),Xe=t=>{const{message:e}=P.useMessage(),{baseSettings:a}=C.useInkeepConfig();return n.jsx(Cn,{"data-username":h.dataAttr(e.role==="user"&&!!a.userProperties.name),"data-role":e.role,...t})},pn=i.ikp(de.Fallback,{_id:"aiChatMessageAvatarFallback"}),Ze=g.memo(t=>{const{baseSettings:e}=C.useInkeepConfig(),{message:a}=P.useMessage();return e.userProperties.name?n.jsx(pn,{"data-role":a.role,children:h.getInitials(e.userProperties.name),...t}):null}),pe=i.ikp(de.Image,{_id:"aiChatMessageAvatarImage"}),et=g.memo(t=>{const{onLoadingStatusChange:e,...a}=t,{aiChatSettings:r,baseSettings:{userProperties:s}}=C.useInkeepConfig(),{message:d}=P.useMessage(),{aiAssistantAvatar:o}=r??{},c=typeof o=="string"?o:o?.light,m=(typeof o=="string"?o:o?.dark)??c,l=qa.useColorModeValue(c,m),[p,v]=g.useState(l);g.useEffect(()=>{v(l)},[l]);const E=j=>{j==="error"&&v(null)};return d.role==="user"?s.name?null:r.userAvatar?n.jsx(pe,{"data-type":"image","data-role":d.role,src:r.userAvatar,...t}):n.jsx(xa.default,{"data-type":"icon","data-role":d.role,...t}):p?n.jsx(pe,{src:p,"data-type":"image","data-role":d.role,onLoadingStatusChange:u.composeEventHandlers(e,E),...a}):n.jsx(Ba.default,{"data-type":"icon","data-role":d.role,...t})}),vn=i.ikp("span",{_id:"aiChatMessageName"}),tt=t=>{const{message:e}=P.useMessage();return n.jsx(vn,{"data-role":e.role,children:e.role==="user"?"You":"AI assistant",...t})},bn=i.ikp("div",{_id:"aiChatMessageContentWrapper"}),it=t=>{const{message:e}=P.useMessage();return n.jsx(bn,{"data-role":e.role,...t})},gn=i.ikp("div",{_id:"aiChatMessageContent"}),at=t=>{const{message:e}=P.useMessage();return n.jsx(gn,{"data-role":e.role,...t})},Pn=i.ikp("div",{_id:"aiChatMessageAttachments"}),nt=t=>{const{message:e}=P.useMessage(),a=e.metadata?.attributes?.attachments;return e.role!=="user"||!a?.length?null:n.jsx(q.MessageAttachmentsProvider,{children:n.jsx(Pn,{...t})})},_n=i.ikp("div",{_id:"aiChatMessageAttachments__List"}),rt=t=>{const{children:e,...a}=t,{message:r}=P.useMessage(),s=r.metadata?.attributes?.attachments;return s?n.jsx(_n,{children:h.maybeRender(e,s),...a}):null},An=i.ikp("div",{_id:"aiChatMessageAttachments__Item"}),st=t=>{const{attachment:e,onClick:a,...r}=t,{selectItem:s,onOpen:d}=q.useMessageAttachments(),o=()=>{s(e),d()};return n.jsx(H.AttachmentItemProvider,{attachment:e,children:n.jsx(An,{onClick:u.composeEventHandlers(a,o),...r})})},kn=i.ikp(f.BuiltInIconRenderer,{_id:"aiChatMessageAttachments__ItemIcon"}),ot=t=>{const{attachment:e}=H.useAttachmentItem(),a=e.contentType?.attachmentIcon;return a?n.jsx(kn,{iconSettings:a,...t}):null},Fn=i.ikp("span",{_id:"aiChatMessageAttachments__ItemTitle"}),dt=t=>{const{attachment:e}=H.useAttachmentItem();return n.jsx(Fn,{children:e.title,...t})},En=i.ikp(_.Root,{_id:"aiChatMessageAttachmentsPreview"}),ct=t=>{const{onOpenChange:e,...a}=t,{selectItem:r,isOpen:s,onClose:d,selectedItem:o}=q.useMessageAttachments(),c=m=>{m||(d(),r(null))};return n.jsx(En,{open:s&&o!==null,onOpenChange:u.composeEventHandlers(e,c),...a})},mt=i.ikp(_.Overlay,{_id:"aiChatMessageAttachmentsPreview__Overlay"}),lt=i.ikp(_.Content,{_id:"aiChatMessageAttachmentsPreview__Content","aria-describedby":void 0}),In=i.ikp(_.Title,{_id:"aiChatMessageAttachmentsPreview__Header"}),ht=t=>{const{selectedItem:e}=q.useMessageAttachments();return n.jsx(In,{children:e?.title||"Attachment",...t})},ut=i.ikp(_.Close,{_id:"aiChatMessageAttachmentsPreview__Close",children:n.jsx(k.CustomIcon,{iconKey:"close"})}),Mn=i.ikp("p",{_id:"aiChatMessageAttachmentsPreview__Body"}),Ct=t=>{const{selectedItem:e}=q.useMessageAttachments();return n.jsx(Mn,{children:e?.content,...t})},ve=i.ikp("div",{_id:"aiChatMessage"}),pt=t=>{const{aiChatSettings:e}=C.useInkeepConfig(),{componentStyles:a,...r}=t,{message:s}=P.useMessage(),{logEvent:d}=V.useChatEvents(),o=h.getMessageContent(s),{conversation:c}=D.useInkeepConversation();return s.role==="user"?n.jsx(ve,{"data-role":s.role,children:o,...r}):n.jsx(ve,{"data-role":s.role,...r,children:n.jsx($.Markdown,{children:o,componentStyles:a,shouldOpenLinksInNewTab:e.shouldOpenLinksInNewTab,onLinkClick:(m,l)=>{d({eventName:"assistant_message_inline_link_opened",properties:{title:l?.toString(),url:m}})},onCodeCopy:(m,l)=>{d({eventName:"assistant_code_block_copied",properties:{conversation:c,language:m,code:l}})}})})},Sn=i.ikp("div",{_id:"aiChatMessageActions"}),vt=t=>{const{isLoading:e,messages:a}=b.useChat(),{message:r}=P.useMessage();return a.at(-1)?.id===r?.id&&e||r.role==="user"?null:n.jsx(Sn,{...t})},fn=i.ikp("div",{_id:"aiChatMessageToolActions"}),bt=t=>{const{children:e,...a}=t,{message:r}=P.useMessage(),{messageToolCalls:s}=b.useChat(),d=s[r.id]||[];return n.jsx(fn,{children:h.maybeRender(e,d),...a})},gt=t=>{const{onClick:e,action:a,...r}=t,{handleAction:s}=se.useChatAction(a),d=()=>{s()},o=a.label||"Contact Support",c=n.jsxs(n.Fragment,{children:[a.icon&&n.jsx(f.BuiltInIconRenderer,{iconSettings:a.icon}),o]}),m=a.action.type,l=i.ikp(m==="open_link"?"a":"button",{_id:"aiChatMessageToolAction",children:c,"data-type":a.action.type,...m==="open_link"&&{href:a.action.url,target:"_blank",rel:"noopener"},onClick:u.composeEventHandlers(e,d)});return n.jsx(l,{...r})},Bn=i.ikp("button",{_id:"aiChatMessageAction"}),Pt=t=>{const{action:e,onClick:a,className:r,...s}=t,{conversation:d}=D.useInkeepConversation(),{message:o}=P.useMessage(),{isStreaming:c,messages:m}=b.useChat(),[l,p]=ie.useCopyToClipboard(),{feedback:v,submitPositiveFeedback:E,setCurrentFeedback:j,currentFeedback:W}=re.useMessageFeedback(),{logEvent:X}=V.useChatEvents(),[O,Z]=Ha.useSettleAction(),{baseSettings:{privacyPreferences:he}}=C.useInkeepConfig(),{optOutAllAnalytics:ee}=he,ue=m.at(-1)?.id===o?.id,te=o.role==="assistant";if(ue&&c||!te||{copy:!1,upvote:ee,downvote:ee}[e])return null;const y={copy(){p(h.getMessageContent(o)),X({eventName:"assistant_message_copied",properties:{conversation:d}})},upvote(){E(o.id).then(()=>{Z()})},downvote(){j(o.id)}},L={copy:"Copy Message",upvote:"Upvote Message",downvote:"Downvote Message"},M={copy:n.jsx(k.CustomIcon,{iconKey:l?"messageCopied":"messageCopy"}),upvote:n.jsx(k.CustomIcon,{iconKey:O?"messageCopied":"thumbsUp"}),downvote:n.jsx(k.CustomIcon,{iconKey:"thumbsDown"})},S={copy:{"data-copied":h.dataAttr(l)},upvote:{"data-upvoted":h.dataAttr(v[o.id]?.type==="positive")},downvote:{"data-downvoted":h.dataAttr(v[o.id]?.type==="negative"),"data-state":W===null?"closed":"open"}};return n.jsx(Bn,{"data-action":e,...S[e],children:M[e],"aria-label":L[e],className:`${r} ${e}`,onClick:u.composeEventHandlers(a,y[e]),...s})},xn=i.ikp("div",{_id:"aiChatMessageSources"}),_t=t=>{const{message:e}=P.useMessage();return e.role!=="assistant"||!e.links?.length?null:n.jsx(xn,{...t})},Tn=i.ikp("div",{_id:"aiChatMessageSources__Header"}),At=t=>n.jsx(Tn,{children:"Sources",...t}),jn=i.ikp("div",{_id:"aiChatMessageSources__List"}),kt=t=>{const{message:e}=P.useMessage(),{children:a,...r}=t,{baseSettings:{transformSource:s,organizationDisplayName:d},aiChatSettings:{shouldOpenLinksInNewTab:o},searchSettings:{tabs:c}}=C.useInkeepConfig();if(e.role!=="assistant")return null;const m=e.links.map(l=>{const p=Oa.transformInkeepSource(l,"chatSourceItem",{organizationDisplayName:d,tabs:c,transformSource:s}),v=o||p.shouldOpenInNewTab;return{...p,isExternal:v}});return n.jsx(jn,{children:h.maybeRender(a,m),...r})},yn=i.ikp(Ta.LinkWithQueryParams,{_id:"aiChatMessageSourceItem"}),Ft=t=>{const{source:e,onClick:a,...r}=t,{logEvent:s}=V.useChatEvents(),{conversation:d}=D.useInkeepConversation(),o=()=>{s({eventName:"assistant_source_item_clicked",properties:{conversation:d,link:e}})};return n.jsx(B.SourceItemProvider,{source:e,children:n.jsx(yn,{"data-type":e.type,appendToUrl:e.appendToUrl,isExternal:e.isExternal,"data-breadcrumbs":!!e.breadcrumbs?.length,onClick:u.composeEventHandlers(a,o),...r})})},Hn=i.ikp("div",{_id:"aiChatMessageSourceItem__Breadcrumbs"}),Et=t=>{const{source:e}=B.useSourceItem();return e.breadcrumbs?.length?n.jsx(Hn,{"data-type":e.type,...t}):null},wn=i.ikp(k.CustomIcon,{_id:"aiChatMessageSourceItem__BreadcrumbIcon",iconKey:"breadcrumbSeparator"}),Ln=i.ikp(f.BuiltInIconRenderer,{_id:"aiChatMessageSourceItem__Icon"}),It=t=>{const{source:e}=B.useSourceItem();return n.jsx(Ln,{iconSettings:e.icon,"data-type":e.type,...t})},Dn=i.ikp("span",{_id:"aiChatMessageSourceItem__Title"}),Mt=t=>{const{source:e}=B.useSourceItem();return n.jsx(Dn,{"data-type":e.type,children:e.title,...t})},qn=i.ikp("span",{_id:"aiChatMessageSourceItem__Tag"}),St=t=>{const{source:e}=B.useSourceItem();return n.jsx(qn,{"data-type":e.type,...t})},Rn=i.ikp("span",{_id:"aiChatMessageSourceItem__Description"}),ft=t=>{const{source:e}=B.useSourceItem(),{children:a,...r}=t,s=g.useMemo(()=>e.description?Da.highlightEmphasis(e.description):[],[e.description]);return s.length?n.jsx(Rn,{"data-type":e.type,children:h.maybeRender(a,s),...r}):null},Wn=i.ikp("span",{_id:"aiChatMessageSourceItem__DescriptionPart"}),Bt=t=>{const{part:e,...a}=t,{source:r}=B.useSourceItem();return typeof e=="string"?e:n.jsx(Wn,{"data-type":r.type,children:e.content,"data-highlighted":h.dataAttr(e.highlighted),...a})},On=i.ikp(k.CustomIcon,{_id:"aiChatMessageSourceItem__Indicator"}),xt=t=>{const{source:e}=B.useSourceItem();return n.jsx(On,{iconKey:e.isExternal?"openLinkInNewTab":"openLinkInSameTab",...t})},Tt=i.ikp("div",{_id:"aiChatFooter"}),jt=i.ikp("div",{_id:"aiChatInput__Fieldset"}),yt=i.ikp("div",{_id:"aiChatInput__Group"}),Qn=i.ikp("textarea",{_id:"aiChatInput"}),Ht=g.forwardRef(({onChange:t,onKeyDown:e,...a},r)=>{const{handleInputChange:s,handleInputKeyDown:d,input:o,error:c,shouldAutoFocusInput:m,inputRef:l}=b.useChat(),{aiChatSettings:p}=C.useInkeepConfig(),v=oe.useComposedRefs(r,l),E=ge.useModal();return g.useEffect(()=>{requestAnimationFrame(()=>{m&&l?.current&&(l.current.focus(),l.current.selectionStart=l.current.value.length)})},[m,l,E?.isOpen]),n.jsx(Qn,{asChild:!0,ref:v,maxLength:99999,placeholder:p.placeholder,value:o,onChange:u.composeEventHandlers(t,s),onKeyDown:u.composeEventHandlers(e,d),disabled:!!c||p.isViewOnly,...a,children:n.jsx(ne,{})})}),Nn=i.ikp("button",{_id:"aiChatInput__SendButton"}),wt=t=>{const{handleSubmit:e,isSubmitDisabled:a,error:r}=b.useChat(),{aiChatSettings:s}=C.useInkeepConfig(),{onClick:d,...o}=t;return n.jsx(Nn,{onClick:u.composeEventHandlers(d,()=>e()),"aria-label":"Send message",disabled:a||!!r||s.isViewOnly,...o})},Lt=i.ikp(k.CustomIcon,{_id:"aiChatInput__SendButtonIcon",iconKey:"chatSubmit"}),$n=i.ikp("div",{_id:"aiChatAttachmentsBar"}),Dt=t=>{const{selectedWorkflow:e}=b.useChat();return!e||!e.supportedInputs?.length?null:n.jsx(F.AttachmentsBarProvider,{children:n.jsx($n,{...t})})},Vn=i.ikp("div",{_id:"aiChatAttachmentsBar__List"}),qt=t=>{const{children:e,...a}=t,{messageAttachments:r}=b.useChat();return n.jsx(Vn,{children:h.maybeRender(e,r),...a})},Un=i.ikp("div",{_id:"aiChatAttachmentsBar__Attachment"}),Rt=t=>{const{attachment:e,...a}=t;return n.jsx(H.AttachmentItemProvider,{attachment:e,children:n.jsx(Un,{...a})})},Kn=i.ikp(f.BuiltInIconRenderer,{_id:"aiChatAttachmentsBar__AttachmentIcon"}),Wt=t=>{const{attachment:e}=H.useAttachmentItem(),a=e.contentType?.attachmentIcon;return a?n.jsx(Kn,{iconSettings:a,...t}):null},zn=i.ikp("span",{_id:"aiChatAttachmentsBar__AttachmentTitle"}),Ot=t=>{const{attachment:e}=H.useAttachmentItem();return n.jsx(zn,{children:e.title,...t})},Gn=i.ikp("button",{_id:"aiChatAttachmentsBar__AttachmentDelete"}),Qt=t=>{const{onClick:e,...a}=t,{attachment:r}=H.useAttachmentItem(),{setMessageAttachments:s}=b.useChat(),d=()=>{s(o=>o.filter(c=>c.id!==r.id))};return n.jsx(Gn,{"aria-label":"Remove attachment",children:n.jsx(k.CustomIcon,{iconKey:"close"}),onClick:u.composeEventHandlers(e,d),...a})},Nt=i.ikp("div",{_id:"aiChatAttachmentsBar__Actions"}),$t=i.ikp(T.Tooltip,{_id:"aiChatAttachmentsBar__InfoTip",delayDuration:0}),Vt=i.ikp(T.Trigger,{_id:"aiChatAttachmentsBar__InfoTipIcon",children:n.jsx(k.CustomIcon,{iconKey:"info"})}),me=i.ikp(T.Arrow,{_id:"aiChatAttachmentsBar__InfoTipArrow"}),Ut=i.ikp(T.Content,{_id:"aiChatAttachmentsBar__InfoTipText",side:"bottom",sideOffset:3,align:"center",children:n.jsxs(n.Fragment,{children:[n.jsx(me,{}),"Attachments will be kept in context for the entire conversation."]})}),Yn=i.ikp("div",{_id:"aiChatAttachmentsBar__Inputs"}),Kt=t=>{const{children:e,...a}=t,{selectedWorkflow:r}=b.useChat();return r?.supportedInputs?n.jsx(Yn,{children:h.maybeRender(e,r.supportedInputs),...a}):null},Jn=i.ikp("button",{_id:"aiChatAttachmentsBar__Input"}),zt=t=>{const{input:e,onClick:a,...r}=t,{selectedWorkflow:s,messageAttachments:d,setMessageAttachments:o}=b.useChat(),{selectInput:c,onOpen:m}=F.useAttachmentsBar(),l=()=>{if(e.type==="FUNCTIONAL_MULTI_ATTACHMENT")return s?e.onInvoke(s,e,o,[...d]):void 0;c(e),m()};return n.jsx(Jn,{children:e.displayName,onClick:u.composeEventHandlers(a,l),...r})},Gt=i.ikp(fa.IoAdd,{_id:"aiChatAttachmentsBar__InputIcon"}),Xn=i.ikp(_.Root,{_id:"aiChatAttachmentsBar__Modal"}),Yt=t=>{const{onOpenChange:e,...a}=t,{selectInput:r,isOpen:s,onClose:d,selectedInput:o}=F.useAttachmentsBar(),c=m=>{m||(d(),r(null))};return n.jsx(Xn,{open:s&&o!==null,onOpenChange:u.composeEventHandlers(e,c),...a})},Jt=i.ikp(_.Overlay,{_id:"aiChatAttachmentsBar__ModalOverlay"}),Xt=i.ikp(_.Content,{_id:"aiChatAttachmentsBar__ModalContent","aria-describedby":void 0}),Zt=i.ikp("div",{_id:"aiChatAttachmentsBar__ModalHeader"}),Zn=i.ikp(_.Title,{_id:"aiChatAttachmentsBar__ModalHeading"}),ei=t=>{const{selectedInput:e}=F.useAttachmentsBar(),a=`Add ${e?.displayName}`;return n.jsx(Zn,{children:a,...t})},er=i.ikp("span",{_id:"aiChatAttachmentsBar__ModalDescription"}),ti=t=>{const{selectedInput:e}=F.useAttachmentsBar(),a=e?.workflowModalProps?.modalHelpText;return a?n.jsx(er,{children:a,...t}):null},tr=i.ikp("div",{_id:"aiChatAttachmentsBar__ModalHelp"}),ii=t=>{const{children:e,...a}=t,{selectedInput:r}=F.useAttachmentsBar(),s=r?.workflowModalProps?.modalHelpElement;return s?n.jsx(tr,{asChild:!e,children:e||s,...a}):null},ai=i.ikp(_.Close,{_id:"aiChatAttachmentsBar__ModalClose",children:n.jsx(k.CustomIcon,{iconKey:"close"})}),ni=i.ikp("div",{_id:"aiChatAttachmentsBar__ModalBody"}),ir=i.ikp("form",{_id:"aiChatAttachmentsBar__Form"}),ri=t=>{const{onSubmit:e,...a}=t,{form:r}=F.useAttachmentsBar();return n.jsx(ir,{onSubmit:u.composeEventHandlers(e,r.onSubmit),...a})},si=i.ikp("div",{_id:"aiChatAttachmentsBar__FormTitle",role:"group"}),ar=i.ikp("label",{_id:"aiChatAttachmentsBar__FormTitleLabel"}),oi=t=>{const{form:e,selectedInput:a}=F.useAttachmentsBar();return n.jsx(ar,{htmlFor:`${a?.id}-title`,children:e.labels.title,...t})},nr=i.ikp("input",{_id:"aiChatAttachmentsBar__FormTitleInput"}),di=t=>{const{onChange:e,...a}=t,{form:r,selectedInput:s}=F.useAttachmentsBar();return n.jsx(nr,{name:"title",value:r.data.title,id:`${s?.id}-title`,"data-invalid":h.dataAttr(!!r.errors.title),"aria-invalid":!!r.errors.title,onChange:u.composeEventHandlers(e,r.onChange),...a})},rr=i.ikp("span",{_id:"aiChatAttachmentsBar__FormTitleError"}),ci=t=>{const{form:e}=F.useAttachmentsBar();return e.errors.title?n.jsx(rr,{"aria-live":"polite",children:e.errors.title,...t}):null},mi=i.ikp("div",{_id:"aiChatAttachmentsBar__FormTitle",role:"group"}),sr=i.ikp("label",{_id:"aiChatAttachmentsBar__FormContentLabel"}),li=t=>{const{form:e,selectedInput:a}=F.useAttachmentsBar();return n.jsx(sr,{htmlFor:`${a?.id}-content`,children:e.labels.content,...t})},or=i.ikp("textarea",{_id:"aiChatAttachmentsBar__FormTitleInput"}),hi=t=>{const{onChange:e,...a}=t,{form:r,selectedInput:s}=F.useAttachmentsBar();return n.jsx(or,{asChild:!0,rows:4,name:"content",value:r.data.content,id:`${s?.id}-content`,"data-invalid":h.dataAttr(!!r.errors.content),"aria-invalid":!!r.errors.content,onChange:u.composeEventHandlers(e,r.onChange),...a,children:n.jsx(ne,{maxRows:10})})},dr=i.ikp("span",{_id:"aiChatAttachmentsBar__FormContentError"}),ui=t=>{const{form:e}=F.useAttachmentsBar();return e.errors.content?n.jsx(dr,{"aria-live":"polite",children:e.errors.content,...t}):null},Ci=i.ikp("button",{_id:"aiChatAttachmentsBar__FormSubmitButton",children:"Upload",type:"submit"}),pi=i.ikp("div",{_id:"aiChatActionBar"}),vi=i.ikp("div",{_id:"aiChat__ChatActions"}),bi=i.ikp("div",{_id:"aiChatTagline__Container"}),gi=i.ikp("span",{_id:"aiChatTagline__Text",children:"Powered by"}),Pi=i.ikp(ya.default,{_id:"aiChatTagline__Logo"}),_i=i.ikp("a",{_id:"aiChatTagline__BrandName",children:"inkeep",href:"https://www.inkeep.com/",target:"_blank",rel:"noopener noreferrer"}),cr=i.ikp("div",{_id:"aiChat__ChatAction"}),Y=t=>{const{action:e,onClick:a,className:r,...s}=t,{clear:d,stop:o,isLoading:c,messages:m,selectedWorkflow:l}=b.useChat(),{conversation:p}=D.useInkeepConversation(),{aiChatSettings:v,baseSettings:E}=C.useInkeepConfig(),{logEvent:j}=V.useChatEvents(),[W,X]=ie.useCopyToClipboard(),[O,Z]=ie.useCopyToClipboard();if({help:!1,copy:m.length===0||!v.isCopyChatButtonVisible||c,share:m.length===0||!v.isShareButtonVisible||!p.id||!!l||c,clear:m.length===0||v.isViewOnly||c,stop:!c}[e])return null;const te={help:()=>{},copy:()=>{const Q=m.map(y=>{const L=`**${y.role==="assistant"?"AI Assistant":"User"}**`,M=h.getMessageContent(y),S=ja.stringifyAttachments(y.metadata?.attributes?.attachments),N=S?`
|
|
8
8
|
|
|
9
9
|
**Attachments**
|
|
10
10
|
|
|
@@ -14,4 +14,4 @@ ${M}${N}`}).join(`
|
|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
-
`);X(Q)},share:async()=>{const Q={visibility:"public",tags:[],userProperties:{},messages:p.messages.map(S=>({...S,id:Date.now().toString()+S.id,conversationId:void 0}))},{apiKey:H,analyticsApiBaseUrl:L}=E,M=await Oa.logConversation("",Q,H,L);if(M){const N=`${v.shareChatUrlBasePath}?${D.SHARE_QUERY_PARAM}=${M?.id}`;Z(N),y({eventName:"chat_share_button_clicked",properties:{sharedConversationId:M?.id,originalConversationId:p.id,sharedChatUrl:N,conversation:M}})}},clear:d,stop:o},Ce={copy:W,share:O};return n.jsx(j.Tooltip,{delayDuration:0,open:Ce[e],children:n.jsx(mr,{"data-type":e,"data-copied":h.dataAttr(W||O),className:`${r} ${e}`,children:n.jsx(le,{action:e}),onClick:u.composeEventHandlers(a,te[e]),...s})})},lr=i.ikp(j.Trigger,{_id:"aiChat__ChatActionLabel"}),le=t=>{const{action:e,...a}=t,{aiChatSettings:r}=C.useInkeepConfig(),s=r.toolbarButtonLabels??{},d={help:s.getHelp??"Get Help",copy:s.copyChat??"Copy",share:s.share??"Share",clear:s.clear??"Clear",stop:s.stop??"Stop"};return n.jsx(lr,{children:d[e],...a})},hr=i.ikp(j.TooltipContent,{_id:"aiChat__ChatActionFeeback"}),Ai=t=>{const{action:e,children:a,...r}=t,s={copy:"Copied!",share:"Link copied!"};return n.jsxs(hr,{sideOffset:5,...r,children:[n.jsx(j.Arrow,{}),a||s[e]]})},ur=i.ikp(z.Root,{_id:"aiChatHelpActions"}),ki=t=>{const{children:e,...a}=t,{aiChatSettings:r}=C.useInkeepConfig(),{getHelpOptions:s}=r;if(!s||(s??[]).length===0)return null;const{_pinned:d,_unpinned:o}=s.reduce((p,v)=>{const E=v.isPinnedToToolbar?"_pinned":"_unpinned";return{...p,[E]:[...p[E],v]}},{_pinned:[],_unpinned:[]}),c=o.length===1?[...d,o[0]]:d,m=o.length===1?[]:o,l=ae.useHelpMenuState();return n.jsx(ae.HelpMenuProvider,{value:l,children:n.jsx(ur,{open:l.open,onOpenChange:l.setOpen,children:h.maybeRender(e,{pinned:c,unpinned:m}),...a})})},Cr=i.ikp(Y,{_id:"aiChatHelpAction"}),Fi=t=>{const{action:e,onClick:a,...r}=t,{handleAction:s,logHelpAction:d}=se.useChatAction(e),o=e.action.type,c=o==="open_link"?n.jsx("a",{href:e.action.url,target:"_blank",rel:"noreferrer",children:e.name}):e.name;return n.jsx(Cr,{action:"help","aria-label":e.name,"data-name":e.name,children:c,asChild:o==="open_link",onClick:u.composeEventHandlers(a,()=>{s(),d()}),...r})},pr=i.ikp(z.Trigger,{_id:"aiChatHelpActions__Trigger"}),Ei=g.memo(t=>{const{aiChatSettings:e}=C.useInkeepConfig();return n.jsx(Y,{action:"help",...t,asChild:!0,children:n.jsx(pr,{children:e.toolbarButtonLabels?.getHelp??"Get Help"})})}),vr=i.ikp(z.Content,{_id:"aiChatHelpActions__Menu"}),Ii=t=>n.jsx(vr,{side:"top",sideOffset:8,align:"center",alignOffset:-10,...t}),Mi=i.ikp(z.Arrow,{_id:"aiChatHelpActions__MenuArrow"}),Si=t=>{const{action:e,onClick:a,...r}=t,{handleAction:s,logHelpAction:d}=se.useChatAction(e),{setOpen:o}=ae.useHelpMenu(),c=()=>{s({onOpenForm:()=>o(!1)}),d()},m=e.action.type,l=i.ikp(m==="open_link"?"a":"button",{_id:"aiChatHelpActions__MenuItem",children:e.name,"aria-label":e.name,"data-name":e.name,"data-type":e.action.type,...m==="open_link"&&{href:e.action.url,target:"_blank",rel:"noopener"},onClick:u.composeEventHandlers(a,c)});return n.jsx(l,{...r})},br=i.ikp(f.BuiltInIconRenderer,{_id:"aiChatHelpActions_MenuItemIcon"}),fi=t=>{const{action:e,...a}=t;return e.icon?n.jsx(br,{iconSettings:e.icon,...a}):null},gr=i.ikp(A.Root,{_id:"aiChatFeedbackModal"}),Bi=t=>{const{onOpenChange:e,...a}=t,{currentFeedback:r,setCurrentFeedback:s}=re.useMessageFeedback();return n.jsx(gr,{open:r!==null,onOpenChange:u.composeEventHandlers(e,()=>s(null)),...a})},xi=i.ikp(A.Overlay,{_id:"aiChatFeedbackModal__Overlay"}),Ti=i.ikp(A.Content,{_id:"aiChatFeedbackModal__Content","aria-describedby":void 0}),ji=i.ikp(A.Title,{_id:"aiChatFeedbackModal__Header",children:"Help improve my answers!"}),yi=i.ikp(A.Close,{_id:"aiChatFeedbackModal__Close",children:n.jsx(k.CustomIcon,{iconKey:"close"})}),Hi=i.ikp("div",{_id:"aiChatFeedbackModal__Body"}),Pr=i.ikp("form",{_id:"aiChatFeedbackForm"}),wi=t=>{const{onSubmit:e,...a}=t,{submitNegativeFeedback:r,currentFeedback:s,setCurrentFeedback:d}=re.useMessageFeedback(),o=c=>{c.preventDefault();const m=c.target,l=new FormData(m),p=Object.fromEntries(l.entries());s&&(r(s,p),d(null))};return n.jsx(Pr,{onSubmit:u.composeEventHandlers(e,o),...a})},_r=i.ikp("div",{_id:"aiChatFeedbackItem"}),Li=t=>{const{name:e,...a}=t;return n.jsx(U.FeedbackItemProvider,{name:e,children:n.jsx(_r,{...a})})},Ar=i.ikp(K.Root,{_id:"aiChatFeedbackItem__Checkbox"}),Di=t=>{const{name:e,focusItem:a}=U.useFeedbackItem(),{onCheckedChange:r,...s}=t,d=o=>{o&&a?.current?.focus()};return n.jsx(Ar,{id:`feedback-${e}`,name:e,onCheckedChange:u.composeEventHandlers(r,d),...s})},qi=i.ikp(K.Indicator,{_id:"aiChatFeedbackItem__CheckboxIndicator",children:n.jsx(be.CheckboxIcon,{})}),kr=i.ikp("label",{_id:"aiChatFeedbackItem__Label"}),Ri=t=>{const{name:e}=U.useFeedbackItem(),a={unrelated_response:"Didn't answer my question",inaccurate_statement:"Inaccurate statement",inaccurate_code_snippet:"Inaccurate code snippet",irrelevant_citations:"Irrelevant citations"};return n.jsx(kr,{htmlFor:`feedback-${e}`,children:a[e],...t})},Fr=i.ikp("textarea",{_id:"aiChatFeedbackItem__Description",placeholder:"Please describe"}),Wi=t=>{const{name:e,focusItem:a}=U.useFeedbackItem();return n.jsx(Fr,{ref:a,name:`${e}:description`,...t})},Oi=i.ikp("button",{_id:"aiChatFeedbackForm__SubmitButton",children:"Submit",type:"submit"}),Er=i.ikp("div",{_id:"aiChatForm__Wrapper"}),Qi=t=>{const{form:e}=_.useChatForm();return e?n.jsx(Er,{...t}):null},Ir=i.ikp("form",{_id:"aiChatForm"}),Ni=t=>{const{onSubmit:e,...a}=t,{handleSubmit:r,isSuccess:s}=_.useChatForm();return s?null:n.jsx(Ir,{onSubmit:u.composeEventHandlers(e,r),...a})},Mr=i.ikp("button",{_id:"aiChatForm__Close",children:n.jsx(k.CustomIcon,{iconKey:"close"})}),$i=t=>{const{onClick:e,...a}=t,{closeForm:r}=_.useChatForm();return n.jsx(Mr,{onClick:u.composeEventHandlers(e,r),...a})},Vi=i.ikp("div",{_id:"aiChatForm__Header"}),Sr=i.ikp("h2",{_id:"aiChatForm__Heading"}),Ui=t=>{const{form:e}=_.useChatForm();return e?.heading?n.jsx(Sr,{children:e.heading,...t}):null},fr=i.ikp("span",{_id:"aiChatForm__Description"}),Ki=t=>{const{form:e}=_.useChatForm();return e?.description?n.jsx(fr,{children:e.description,...t}):null},Br=i.ikp("div",{_id:"aiChatForm__Content"}),zi=t=>{const{children:e,...a}=t,{fields:r=[]}=_.useChatForm();return n.jsx(Br,{children:h.maybeRender(e,r),...a})},xr=i.ikp("div",{_id:"aiChatForm__Field"}),Gi=t=>{const{field:e,autoFocus:a,...r}=t,{control:s,errors:d}=_.useChatForm();return n.jsx(Da.Controller,{name:e.name,control:s,rules:{required:e.isRequired?`${e.label} is required.`:void 0},render:({field:o})=>{const c=o.value!==void 0||e.inputType==="file";return n.jsx(x.FormFieldProvider,{"data-invalid":h.dataAttr(!!d[e.name]),field:e,fieldProps:o,autoFocus:a,children:c&&n.jsx(xr,{"data-input-type":e.inputType,"data-hidden":h.dataAttr(e.isHidden),...r})})}})},Tr=i.ikp("label",{_id:"aiChatForm__FieldLabel"}),Yi=t=>{const{field:e}=x.useFormField();return n.jsx(Tr,{"data-required":h.dataAttr(e.isRequired),htmlFor:e.name,children:e.label,...t})},jr=i.ikp("input",{_id:"aiChatForm__FieldText",type:"text"}),J=t=>{const{field:e,error:a,fieldProps:{onChange:r,onBlur:s,...d},autoFocus:o}=x.useFormField(),{onChange:c,onBlur:m,...l}=t;return n.jsx(jr,{id:e.name,autoFocus:o,placeholder:"placeholder"in e?e.placeholder:void 0,"data-invalid":h.dataAttr(!!a),onChange:u.composeEventHandlers(c,r),onBlur:u.composeEventHandlers(m,s),...d,...l})},Ji=i.ikp(J,{_id:"aiChatForm__FieldEmail",type:"email"}),yr=i.ikp("input",{_id:"aiChatForm__FieldFile",type:"file",multiple:!0}),Xi=t=>{const{field:e,error:a,fieldProps:{value:r,onChange:s,onBlur:d,...o},autoFocus:c}=x.useFormField(),{onChange:m,onBlur:l,...p}=t,v=E=>{const y=E.target.files;s(y)};return n.jsx(yr,{id:e.name,autoFocus:c,"data-value":r,"data-invalid":h.dataAttr(!!a),...p,...o,onChange:u.composeEventHandlers(m,v),onBlur:u.composeEventHandlers(l,d)})},Zi=i.ikp(J,{_id:"aiChatForm__FieldTextArea",type:"textarea",asChild:!0,children:n.jsx(ne,{maxRows:8})}),Hr=i.ikp(K.Root,{_id:"aiChatForm__FieldCheckbox"}),ea=t=>{const{field:e,error:a,fieldProps:r,autoFocus:s}=x.useFormField(),{onCheckedChange:d,...o}=t;return n.jsx(Hr,{id:e.name,name:e.name,autoFocus:s,"data-invalid":h.dataAttr(!!a),checked:r.value,onCheckedChange:u.composeEventHandlers(d,r.onChange),...o})},ta=i.ikp(K.Indicator,{_id:"aiChatForm__FieldCheckboxIndicator",children:n.jsx(be.CheckboxIcon,{})}),wr=i.ikp(I.Root,{_id:"aiChatForm__FieldSelect"}),ia=t=>{const{field:e,error:a,fieldProps:r}=x.useFormField(),{onValueChange:s,...d}=t;return n.jsx(wr,{name:e.name,"data-invalid":h.dataAttr(!!a),value:r.value,onValueChange:u.composeEventHandlers(s,r.onChange),...d})},aa=i.ikp(I.Trigger,{_id:"aiChatForm__FieldSelect__Trigger"}),Lr=i.ikp(I.Value,{_id:"aiChatForm__FieldSelect__Value"}),na=t=>{const{field:e}=x.useFormField();return n.jsx(Lr,{placeholder:"placeholder"in e?e.placeholder:void 0,...t})},ra=i.ikp(I.Icon,{_id:"aiChatForm__FieldSelect__Icon",asChild:!0,children:n.jsx(f.BuiltInIconRenderer,{iconSettings:{builtIn:"LuChevronDown"}})}),sa=i.ikp(I.Content,{_id:"aiChatForm__FieldSelect__Content",position:"popper"}),oa=i.ikp(I.Viewport,{_id:"aiChatForm__FieldSelect__Viewport"}),da=i.ikp(I.Item,{_id:"aiChatForm__FieldSelect__Item"}),ca=i.ikp(I.ItemText,{_id:"aiChatForm__FieldSelect__ItemText"}),ma=i.ikp(I.ItemIndicator,{_id:"aiChatForm__FieldSelect__ItemIndicator",asChild:!0,children:n.jsx(f.BuiltInIconRenderer,{iconSettings:{builtIn:"LuCheck"}})}),Dr=i.ikp("span",{_id:"aiChatForm__FieldError"}),la=t=>{const{error:e}=x.useFormField();return e?n.jsx(Dr,{children:e.message?.toString(),...t}):null},qr=i.ikp("span",{_id:"aiChatForm__Error"}),ha=t=>{const{formError:e}=_.useChatForm();return e?n.jsx(qr,{children:e.message,...t}):null},ua=i.ikp("div",{_id:"aiChatForm__Footer"}),Rr=i.ikp("button",{_id:"aiChatForm__Cancel",children:"Cancel"}),Ca=t=>{const{onClick:e,...a}=t,{closeForm:r}=_.useChatForm();return n.jsx(Rr,{onClick:u.composeEventHandlers(e,r),...a})},Wr=i.ikp("button",{_id:"aiChatForm__Submit",children:"Submit",type:"submit"}),pa=t=>{const{onClick:e,...a}=t,{isSubmitting:r}=_.useChatForm();return n.jsx(Wr,{disabled:r,...a})},Or=i.ikp("div",{_id:"aiChatForm__Success"}),va=t=>{const{isSuccess:e}=_.useChatForm();return e?n.jsx(Or,{...t}):null},Qr=i.ikp("h2",{_id:"aiChatForm__SuccessHeading"}),ba=t=>{const{form:e}=_.useChatForm();return n.jsx(Qr,{children:e?.successView.heading,...t})},Nr=i.ikp($.Markdown,{_id:"aiChatForm__SuccessMessage"}),ga=t=>{const{form:e}=_.useChatForm();return n.jsx(Nr,{children:e?.successView.message,...t})},$r=i.ikp("button",{_id:"aiChatForm__SuccessButton"}),Pa=t=>{const{onClick:e,...a}=t,{form:r,closeForm:s}=_.useChatForm(),d=r?.successView?.doneButton;if(!d)return null;const o=d.icon&&n.jsx(f.BuiltInIconRenderer,{iconSettings:d.icon}),c=d.label;return n.jsx($r,{onClick:u.composeEventHandlers(e,s),children:n.jsxs(n.Fragment,{children:[o,c]}),...a})};exports.Provider=b.ChatProvider;exports.ActionBar=pi;exports.Actions=vi;exports.AttachmentsBar=Dt;exports.AttachmentsBarActions=Nt;exports.AttachmentsBarAttachment=Rt;exports.AttachmentsBarAttachmentDelete=Qt;exports.AttachmentsBarAttachmentIcon=Wt;exports.AttachmentsBarAttachmentTitle=Ot;exports.AttachmentsBarForm=ri;exports.AttachmentsBarFormContent=mi;exports.AttachmentsBarFormContentError=ui;exports.AttachmentsBarFormContentInput=hi;exports.AttachmentsBarFormContentLabel=li;exports.AttachmentsBarFormSubmitButton=Ci;exports.AttachmentsBarFormTitle=si;exports.AttachmentsBarFormTitleError=ci;exports.AttachmentsBarFormTitleInput=di;exports.AttachmentsBarFormTitleLabel=oi;exports.AttachmentsBarInfoTip=$t;exports.AttachmentsBarInfoTipArrow=me;exports.AttachmentsBarInfoTipIcon=Vt;exports.AttachmentsBarInfoTipText=Ut;exports.AttachmentsBarInput=zt;exports.AttachmentsBarInputIcon=Gt;exports.AttachmentsBarInputs=Kt;exports.AttachmentsBarList=qt;exports.AttachmentsBarModal=Yt;exports.AttachmentsBarModalBody=ni;exports.AttachmentsBarModalClose=ai;exports.AttachmentsBarModalContent=Xt;exports.AttachmentsBarModalDescription=ti;exports.AttachmentsBarModalHeader=Zt;exports.AttachmentsBarModalHeading=ei;exports.AttachmentsBarModalHelp=ii;exports.AttachmentsBarModalOverlay=Jt;exports.ChatAction=Y;exports.ChatActionFeedback=Ai;exports.ChatActionLabel=le;exports.ChatHelpAction=Fi;exports.Content=Ie;exports.ContentScrollArea=Me;exports.ContentScrollAreaCorner=xe;exports.ContentScrollAreaScrollbar=fe;exports.ContentScrollAreaThumb=Be;exports.ContentScrollAreaViewport=Se;exports.ConversationLoading=_e;exports.Disclaimer=je;exports.DisclaimerArrow=De;exports.DisclaimerContent=we;exports.DisclaimerLabel=ye;exports.DisclaimerText=Le;exports.DisclaimerTrigger=He;exports.EmbeddedChatPrimitiveActionBar=pi;exports.EmbeddedChatPrimitiveActions=vi;exports.EmbeddedChatPrimitiveAttachmentsBar=Dt;exports.EmbeddedChatPrimitiveAttachmentsBarActions=Nt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachment=Rt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentDelete=Qt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentIcon=Wt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentTitle=Ot;exports.EmbeddedChatPrimitiveAttachmentsBarForm=ri;exports.EmbeddedChatPrimitiveAttachmentsBarFormContent=mi;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentError=ui;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentInput=hi;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentLabel=li;exports.EmbeddedChatPrimitiveAttachmentsBarFormSubmitButton=Ci;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitle=si;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleError=ci;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleInput=di;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleLabel=oi;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTip=$t;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipArrow=me;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipIcon=Vt;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipText=Ut;exports.EmbeddedChatPrimitiveAttachmentsBarInput=zt;exports.EmbeddedChatPrimitiveAttachmentsBarInputIcon=Gt;exports.EmbeddedChatPrimitiveAttachmentsBarInputs=Kt;exports.EmbeddedChatPrimitiveAttachmentsBarList=qt;exports.EmbeddedChatPrimitiveAttachmentsBarModal=Yt;exports.EmbeddedChatPrimitiveAttachmentsBarModalBody=ni;exports.EmbeddedChatPrimitiveAttachmentsBarModalClose=ai;exports.EmbeddedChatPrimitiveAttachmentsBarModalContent=Xt;exports.EmbeddedChatPrimitiveAttachmentsBarModalDescription=ti;exports.EmbeddedChatPrimitiveAttachmentsBarModalHeader=Zt;exports.EmbeddedChatPrimitiveAttachmentsBarModalHeading=ei;exports.EmbeddedChatPrimitiveAttachmentsBarModalHelp=ii;exports.EmbeddedChatPrimitiveAttachmentsBarModalOverlay=Jt;exports.EmbeddedChatPrimitiveChatAction=Y;exports.EmbeddedChatPrimitiveChatActionFeedback=Ai;exports.EmbeddedChatPrimitiveChatActionLabel=le;exports.EmbeddedChatPrimitiveChatHelpAction=Fi;exports.EmbeddedChatPrimitiveContent=Ie;exports.EmbeddedChatPrimitiveContentScrollArea=Me;exports.EmbeddedChatPrimitiveContentScrollAreaCorner=xe;exports.EmbeddedChatPrimitiveContentScrollAreaScrollbar=fe;exports.EmbeddedChatPrimitiveContentScrollAreaThumb=Be;exports.EmbeddedChatPrimitiveContentScrollAreaViewport=Se;exports.EmbeddedChatPrimitiveConversationLoading=_e;exports.EmbeddedChatPrimitiveDisclaimer=je;exports.EmbeddedChatPrimitiveDisclaimerArrow=De;exports.EmbeddedChatPrimitiveDisclaimerContent=we;exports.EmbeddedChatPrimitiveDisclaimerLabel=ye;exports.EmbeddedChatPrimitiveDisclaimerText=Le;exports.EmbeddedChatPrimitiveDisclaimerTrigger=He;exports.EmbeddedChatPrimitiveFeedbackForm=wi;exports.EmbeddedChatPrimitiveFeedbackItem=Li;exports.EmbeddedChatPrimitiveFeedbackItemCheckbox=Di;exports.EmbeddedChatPrimitiveFeedbackItemCheckboxIndicator=qi;exports.EmbeddedChatPrimitiveFeedbackItemDescription=Wi;exports.EmbeddedChatPrimitiveFeedbackItemLabel=Ri;exports.EmbeddedChatPrimitiveFeedbackModal=Bi;exports.EmbeddedChatPrimitiveFeedbackModalBody=Hi;exports.EmbeddedChatPrimitiveFeedbackModalClose=yi;exports.EmbeddedChatPrimitiveFeedbackModalContent=Ti;exports.EmbeddedChatPrimitiveFeedbackModalHeader=ji;exports.EmbeddedChatPrimitiveFeedbackModalOverlay=xi;exports.EmbeddedChatPrimitiveFeedbackSubmitButton=Oi;exports.EmbeddedChatPrimitiveFooter=Tt;exports.EmbeddedChatPrimitiveForm=Ni;exports.EmbeddedChatPrimitiveFormCancel=Ca;exports.EmbeddedChatPrimitiveFormClose=$i;exports.EmbeddedChatPrimitiveFormContent=zi;exports.EmbeddedChatPrimitiveFormDescription=Ki;exports.EmbeddedChatPrimitiveFormError=ha;exports.EmbeddedChatPrimitiveFormField=Gi;exports.EmbeddedChatPrimitiveFormFieldCheckbox=ea;exports.EmbeddedChatPrimitiveFormFieldCheckboxIndicator=ta;exports.EmbeddedChatPrimitiveFormFieldEmail=Ji;exports.EmbeddedChatPrimitiveFormFieldError=la;exports.EmbeddedChatPrimitiveFormFieldFile=Xi;exports.EmbeddedChatPrimitiveFormFieldLabel=Yi;exports.EmbeddedChatPrimitiveFormFieldSelect=ia;exports.EmbeddedChatPrimitiveFormFieldSelectContent=sa;exports.EmbeddedChatPrimitiveFormFieldSelectIcon=ra;exports.EmbeddedChatPrimitiveFormFieldSelectItem=da;exports.EmbeddedChatPrimitiveFormFieldSelectItemIndicator=ma;exports.EmbeddedChatPrimitiveFormFieldSelectItemText=ca;exports.EmbeddedChatPrimitiveFormFieldSelectTrigger=aa;exports.EmbeddedChatPrimitiveFormFieldSelectValue=na;exports.EmbeddedChatPrimitiveFormFieldSelectViewport=oa;exports.EmbeddedChatPrimitiveFormFieldText=J;exports.EmbeddedChatPrimitiveFormFieldTextArea=Zi;exports.EmbeddedChatPrimitiveFormFooter=ua;exports.EmbeddedChatPrimitiveFormHeader=Vi;exports.EmbeddedChatPrimitiveFormHeading=Ui;exports.EmbeddedChatPrimitiveFormSubmit=pa;exports.EmbeddedChatPrimitiveFormSuccess=va;exports.EmbeddedChatPrimitiveFormSuccessButton=Pa;exports.EmbeddedChatPrimitiveFormSuccessHeading=ba;exports.EmbeddedChatPrimitiveFormSuccessMessage=ga;exports.EmbeddedChatPrimitiveFormWrapper=Qi;exports.EmbeddedChatPrimitiveHeaderToolbar=ke;exports.EmbeddedChatPrimitiveHelpActions=ki;exports.EmbeddedChatPrimitiveHelpActionsMenu=Ii;exports.EmbeddedChatPrimitiveHelpActionsMenuArrow=Mi;exports.EmbeddedChatPrimitiveHelpActionsMenuItem=Si;exports.EmbeddedChatPrimitiveHelpActionsMenuItemIcon=fi;exports.EmbeddedChatPrimitiveHelpActionsTrigger=Ei;exports.EmbeddedChatPrimitiveInput=Ht;exports.EmbeddedChatPrimitiveInputFieldset=jt;exports.EmbeddedChatPrimitiveInputGroup=yt;exports.EmbeddedChatPrimitiveIntroMessageWrapper=ze;exports.EmbeddedChatPrimitiveMessage=pt;exports.EmbeddedChatPrimitiveMessageAction=Pt;exports.EmbeddedChatPrimitiveMessageActions=vt;exports.EmbeddedChatPrimitiveMessageAttachments=nt;exports.EmbeddedChatPrimitiveMessageAttachmentsItem=st;exports.EmbeddedChatPrimitiveMessageAttachmentsItemIcon=ot;exports.EmbeddedChatPrimitiveMessageAttachmentsItemTitle=dt;exports.EmbeddedChatPrimitiveMessageAttachmentsList=rt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreview=ct;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewBody=Ct;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewClose=ut;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewContent=lt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewHeader=ht;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewOverlay=mt;exports.EmbeddedChatPrimitiveMessageAvatar=Je;exports.EmbeddedChatPrimitiveMessageAvatarContent=Xe;exports.EmbeddedChatPrimitiveMessageAvatarFallback=Ze;exports.EmbeddedChatPrimitiveMessageAvatarImage=et;exports.EmbeddedChatPrimitiveMessageContent=at;exports.EmbeddedChatPrimitiveMessageContentWrapper=it;exports.EmbeddedChatPrimitiveMessageHeader=Ge;exports.EmbeddedChatPrimitiveMessageLoading=Ye;exports.EmbeddedChatPrimitiveMessageName=tt;exports.EmbeddedChatPrimitiveMessageSourceItem=Ft;exports.EmbeddedChatPrimitiveMessageSourceItemBreadcrumbs=Et;exports.EmbeddedChatPrimitiveMessageSourceItemDescription=ft;exports.EmbeddedChatPrimitiveMessageSourceItemDescriptionPart=Bt;exports.EmbeddedChatPrimitiveMessageSourceItemIcon=It;exports.EmbeddedChatPrimitiveMessageSourceItemIndicator=xt;exports.EmbeddedChatPrimitiveMessageSourceItemTag=St;exports.EmbeddedChatPrimitiveMessageSourceItemTitle=Mt;exports.EmbeddedChatPrimitiveMessageSources=_t;exports.EmbeddedChatPrimitiveMessageSourcesHeader=At;exports.EmbeddedChatPrimitiveMessageSourcesList=kt;exports.EmbeddedChatPrimitiveMessageToolAction=gt;exports.EmbeddedChatPrimitiveMessageToolActions=bt;exports.EmbeddedChatPrimitiveMessageWrapper=ce;exports.EmbeddedChatPrimitiveMessages=Te;exports.EmbeddedChatPrimitiveQuickQuestion=Oe;exports.EmbeddedChatPrimitiveQuickQuestionButton=Qe;exports.EmbeddedChatPrimitiveQuickQuestions=qe;exports.EmbeddedChatPrimitiveQuickQuestionsLabel=Re;exports.EmbeddedChatPrimitiveQuickQuestionsList=We;exports.EmbeddedChatPrimitiveRoot=Ae;exports.EmbeddedChatPrimitiveSendButton=wt;exports.EmbeddedChatPrimitiveSendButtonIcon=Lt;exports.EmbeddedChatPrimitiveTaglineBrandName=_i;exports.EmbeddedChatPrimitiveTaglineContainer=bi;exports.EmbeddedChatPrimitiveTaglineLogo=Pi;exports.EmbeddedChatPrimitiveTaglineText=gi;exports.EmbeddedChatPrimitiveToolbarHeader=Ee;exports.EmbeddedChatPrimitiveToolbarHeaderWrapper=Fe;exports.EmbeddedChatPrimitiveWorkflow=Ue;exports.EmbeddedChatPrimitiveWorkflowIcon=Ke;exports.EmbeddedChatPrimitiveWorkflows=Ne;exports.EmbeddedChatPrimitiveWorkflowsLabel=$e;exports.EmbeddedChatPrimitiveWorkflowsList=Ve;exports.EmbeddedChatPrimitiveWrapper=Pe;exports.FeedbackForm=wi;exports.FeedbackItem=Li;exports.FeedbackItemCheckbox=Di;exports.FeedbackItemCheckboxIndicator=qi;exports.FeedbackItemDescription=Wi;exports.FeedbackItemLabel=Ri;exports.FeedbackModal=Bi;exports.FeedbackModalBody=Hi;exports.FeedbackModalClose=yi;exports.FeedbackModalContent=Ti;exports.FeedbackModalHeader=ji;exports.FeedbackModalOverlay=xi;exports.FeedbackSubmitButton=Oi;exports.Footer=Tt;exports.Form=Ni;exports.FormCancel=Ca;exports.FormClose=$i;exports.FormContent=zi;exports.FormDescription=Ki;exports.FormError=ha;exports.FormField=Gi;exports.FormFieldCheckbox=ea;exports.FormFieldCheckboxIndicator=ta;exports.FormFieldEmail=Ji;exports.FormFieldError=la;exports.FormFieldFile=Xi;exports.FormFieldLabel=Yi;exports.FormFieldSelect=ia;exports.FormFieldSelectContent=sa;exports.FormFieldSelectIcon=ra;exports.FormFieldSelectItem=da;exports.FormFieldSelectItemIndicator=ma;exports.FormFieldSelectItemText=ca;exports.FormFieldSelectTrigger=aa;exports.FormFieldSelectValue=na;exports.FormFieldSelectViewport=oa;exports.FormFieldText=J;exports.FormFieldTextArea=Zi;exports.FormFooter=ua;exports.FormHeader=Vi;exports.FormHeading=Ui;exports.FormSubmit=pa;exports.FormSuccess=va;exports.FormSuccessButton=Pa;exports.FormSuccessHeading=ba;exports.FormSuccessMessage=ga;exports.FormWrapper=Qi;exports.Header=Ka;exports.HeaderToolbar=ke;exports.HeaderToolbarWrapper=Fe;exports.HelpActions=ki;exports.HelpActionsMenu=Ii;exports.HelpActionsMenuArrow=Mi;exports.HelpActionsMenuItem=Si;exports.HelpActionsMenuItemIcon=fi;exports.HelpActionsTrigger=Ei;exports.Input=Ht;exports.InputFieldset=jt;exports.InputGroup=yt;exports.IntroMessageWrapper=ze;exports.Message=pt;exports.MessageAction=Pt;exports.MessageActions=vt;exports.MessageAttachments=nt;exports.MessageAttachmentsItem=st;exports.MessageAttachmentsItemIcon=ot;exports.MessageAttachmentsItemTitle=dt;exports.MessageAttachmentsList=rt;exports.MessageAttachmentsPreview=ct;exports.MessageAttachmentsPreviewBody=Ct;exports.MessageAttachmentsPreviewClose=ut;exports.MessageAttachmentsPreviewContent=lt;exports.MessageAttachmentsPreviewHeader=ht;exports.MessageAttachmentsPreviewOverlay=mt;exports.MessageAvatar=Je;exports.MessageAvatarContent=Xe;exports.MessageAvatarFallback=Ze;exports.MessageAvatarImage=et;exports.MessageContent=at;exports.MessageContentWrapper=it;exports.MessageHeader=Ge;exports.MessageLoading=Ye;exports.MessageName=tt;exports.MessageSourceItem=Ft;exports.MessageSourceItemBreadcrumbIcon=Ln;exports.MessageSourceItemBreadcrumbs=Et;exports.MessageSourceItemDescription=ft;exports.MessageSourceItemDescriptionPart=Bt;exports.MessageSourceItemIcon=It;exports.MessageSourceItemIndicator=xt;exports.MessageSourceItemTag=St;exports.MessageSourceItemTitle=Mt;exports.MessageSources=_t;exports.MessageSourcesHeader=At;exports.MessageSourcesList=kt;exports.MessageToolAction=gt;exports.MessageToolActions=bt;exports.MessageWrapper=ce;exports.Messages=Te;exports.QuickQuestion=Oe;exports.QuickQuestionButton=Qe;exports.QuickQuestions=qe;exports.QuickQuestionsLabel=Re;exports.QuickQuestionsList=We;exports.Root=Ae;exports.SendButton=wt;exports.SendButtonIcon=Lt;exports.TaglineBrandName=_i;exports.TaglineContainer=bi;exports.TaglineLogo=Pi;exports.TaglineText=gi;exports.ToolbarHeader=Ee;exports.Workflow=Ue;exports.WorkflowIcon=Ke;exports.Workflows=Ne;exports.WorkflowsLabel=$e;exports.WorkflowsList=Ve;exports.Wrapper=Pe;
|
|
17
|
+
`);X(Q)},share:async()=>{const Q={visibility:"public",tags:[],userProperties:{},messages:p.messages.map(S=>({...S,id:Date.now().toString()+S.id,conversationId:void 0}))},{apiKey:y,analyticsApiBaseUrl:L}=E,M=await Wa.logConversation("",Q,y,L);if(M){const N=`${v.shareChatUrlBasePath}?${D.SHARE_QUERY_PARAM}=${M?.id}`;Z(N),j({eventName:"chat_share_button_clicked",properties:{sharedConversationId:M?.id,originalConversationId:p.id,sharedChatUrl:N,conversation:M}})}},clear:d,stop:o},Ce={copy:W,share:O};return n.jsx(T.Tooltip,{delayDuration:0,open:Ce[e],children:n.jsx(cr,{"data-type":e,"data-copied":h.dataAttr(W||O),className:`${r} ${e}`,children:n.jsx(le,{action:e}),onClick:u.composeEventHandlers(a,te[e]),...s})})},mr=i.ikp(T.Trigger,{_id:"aiChat__ChatActionLabel"}),le=t=>{const{action:e,...a}=t,{aiChatSettings:r}=C.useInkeepConfig(),s=r.toolbarButtonLabels??{},d={help:s.getHelp??"Get Help",copy:s.copyChat??"Copy",share:s.share??"Share",clear:s.clear??"Clear",stop:s.stop??"Stop"};return n.jsx(mr,{children:d[e],...a})},lr=i.ikp(T.TooltipContent,{_id:"aiChat__ChatActionFeeback"}),Ai=t=>{const{action:e,children:a,...r}=t,s={copy:"Copied!",share:"Link copied!"};return n.jsxs(lr,{sideOffset:5,...r,children:[n.jsx(T.Arrow,{}),a||s[e]]})},hr=i.ikp(z.Root,{_id:"aiChatHelpActions"}),ki=t=>{const{children:e,...a}=t,{aiChatSettings:r}=C.useInkeepConfig(),{getHelpOptions:s}=r;if(!s||(s??[]).length===0)return null;const{_pinned:d,_unpinned:o}=s.reduce((p,v)=>{const E=v.isPinnedToToolbar?"_pinned":"_unpinned";return{...p,[E]:[...p[E],v]}},{_pinned:[],_unpinned:[]}),c=o.length===1?[...d,o[0]]:d,m=o.length===1?[]:o,l=ae.useHelpMenuState();return n.jsx(ae.HelpMenuProvider,{value:l,children:n.jsx(hr,{open:l.open,onOpenChange:l.setOpen,children:h.maybeRender(e,{pinned:c,unpinned:m}),...a})})},ur=i.ikp(Y,{_id:"aiChatHelpAction"}),Fi=t=>{const{action:e,onClick:a,...r}=t,{handleAction:s,logHelpAction:d}=se.useChatAction(e),o=e.action.type,c=o==="open_link"?n.jsx("a",{href:e.action.url,target:"_blank",rel:"noreferrer",children:e.name}):e.name;return n.jsx(ur,{action:"help","aria-label":e.name,"data-name":e.name,children:c,asChild:o==="open_link",onClick:u.composeEventHandlers(a,()=>{s(),d()}),...r})},Cr=i.ikp(z.Trigger,{_id:"aiChatHelpActions__Trigger"}),Ei=g.memo(t=>{const{aiChatSettings:e}=C.useInkeepConfig();return n.jsx(Y,{action:"help",...t,asChild:!0,children:n.jsx(Cr,{children:e.toolbarButtonLabels?.getHelp??"Get Help"})})}),pr=i.ikp(z.Content,{_id:"aiChatHelpActions__Menu"}),Ii=t=>n.jsx(pr,{side:"top",sideOffset:8,align:"center",alignOffset:-10,...t}),Mi=i.ikp(z.Arrow,{_id:"aiChatHelpActions__MenuArrow"}),Si=t=>{const{action:e,onClick:a,...r}=t,{handleAction:s,logHelpAction:d}=se.useChatAction(e),{setOpen:o}=ae.useHelpMenu(),c=()=>{s({onOpenForm:()=>o(!1)}),d()},m=e.action.type,l=i.ikp(m==="open_link"?"a":"button",{_id:"aiChatHelpActions__MenuItem",children:e.name,"aria-label":e.name,"data-name":e.name,"data-type":e.action.type,...m==="open_link"&&{href:e.action.url,target:"_blank",rel:"noopener"},onClick:u.composeEventHandlers(a,c)});return n.jsx(l,{...r})},vr=i.ikp(f.BuiltInIconRenderer,{_id:"aiChatHelpActions_MenuItemIcon"}),fi=t=>{const{action:e,...a}=t;return e.icon?n.jsx(vr,{iconSettings:e.icon,...a}):null},br=i.ikp(_.Root,{_id:"aiChatFeedbackModal"}),Bi=t=>{const{onOpenChange:e,...a}=t,{currentFeedback:r,setCurrentFeedback:s}=re.useMessageFeedback();return n.jsx(br,{open:r!==null,onOpenChange:u.composeEventHandlers(e,()=>s(null)),...a})},xi=i.ikp(_.Overlay,{_id:"aiChatFeedbackModal__Overlay"}),Ti=i.ikp(_.Content,{_id:"aiChatFeedbackModal__Content","aria-describedby":void 0}),ji=i.ikp(_.Title,{_id:"aiChatFeedbackModal__Header",children:"Help improve my answers!"}),yi=i.ikp(_.Close,{_id:"aiChatFeedbackModal__Close",children:n.jsx(k.CustomIcon,{iconKey:"close"})}),Hi=i.ikp("div",{_id:"aiChatFeedbackModal__Body"}),gr=i.ikp("form",{_id:"aiChatFeedbackForm"}),wi=t=>{const{onSubmit:e,...a}=t,{submitNegativeFeedback:r,currentFeedback:s,setCurrentFeedback:d}=re.useMessageFeedback(),o=c=>{c.preventDefault();const m=c.target,l=new FormData(m),p=Object.fromEntries(l.entries());s&&(r(s,p),d(null))};return n.jsx(gr,{onSubmit:u.composeEventHandlers(e,o),...a})},Pr=i.ikp("div",{_id:"aiChatFeedbackItem"}),Li=t=>{const{name:e,...a}=t;return n.jsx(U.FeedbackItemProvider,{name:e,children:n.jsx(Pr,{...a})})},_r=i.ikp(K.Root,{_id:"aiChatFeedbackItem__Checkbox"}),Di=t=>{const{name:e,focusItem:a}=U.useFeedbackItem(),{onCheckedChange:r,...s}=t,d=o=>{o&&a?.current?.focus()};return n.jsx(_r,{id:`feedback-${e}`,name:e,onCheckedChange:u.composeEventHandlers(r,d),...s})},qi=i.ikp(K.Indicator,{_id:"aiChatFeedbackItem__CheckboxIndicator",children:n.jsx(be.CheckboxIcon,{})}),Ar=i.ikp("label",{_id:"aiChatFeedbackItem__Label"}),Ri=t=>{const{name:e}=U.useFeedbackItem(),a={unrelated_response:"Didn't answer my question",inaccurate_statement:"Inaccurate statement",inaccurate_code_snippet:"Inaccurate code snippet",irrelevant_citations:"Irrelevant citations"};return n.jsx(Ar,{htmlFor:`feedback-${e}`,children:a[e],...t})},kr=i.ikp("textarea",{_id:"aiChatFeedbackItem__Description",placeholder:"Please describe"}),Wi=t=>{const{name:e,focusItem:a}=U.useFeedbackItem();return n.jsx(kr,{ref:a,name:`${e}:description`,...t})},Oi=i.ikp("button",{_id:"aiChatFeedbackForm__SubmitButton",children:"Submit",type:"submit"}),Fr=i.ikp("div",{_id:"aiChatForm__Wrapper"}),Qi=t=>{const{form:e}=A.useChatForm();return e?n.jsx(Fr,{...t}):null},Er=i.ikp("form",{_id:"aiChatForm"}),Ni=t=>{const{onSubmit:e,...a}=t,{handleSubmit:r,isSuccess:s}=A.useChatForm();return s?null:n.jsx(Er,{onSubmit:u.composeEventHandlers(e,r),...a})},Ir=i.ikp("button",{_id:"aiChatForm__Close",children:n.jsx(k.CustomIcon,{iconKey:"close"})}),$i=t=>{const{onClick:e,...a}=t,{closeForm:r}=A.useChatForm();return n.jsx(Ir,{onClick:u.composeEventHandlers(e,r),...a})},Vi=i.ikp("div",{_id:"aiChatForm__Header"}),Mr=i.ikp("h2",{_id:"aiChatForm__Heading"}),Ui=t=>{const{form:e}=A.useChatForm();return e?.heading?n.jsx(Mr,{children:e.heading,...t}):null},Sr=i.ikp("span",{_id:"aiChatForm__Description"}),Ki=t=>{const{form:e}=A.useChatForm();return e?.description?n.jsx(Sr,{children:e.description,...t}):null},fr=i.ikp("div",{_id:"aiChatForm__Content"}),zi=t=>{const{children:e,...a}=t,{fields:r=[]}=A.useChatForm();return n.jsx(fr,{children:h.maybeRender(e,r),...a})},Br=i.ikp("div",{_id:"aiChatForm__Field"}),Gi=t=>{const{field:e,autoFocus:a,...r}=t,{control:s,errors:d}=A.useChatForm();return n.jsx(La.Controller,{name:e.name,control:s,rules:{required:e.isRequired?`${e.label} is required.`:void 0},render:({field:o})=>{const c=o.value!==void 0||e.inputType==="file";return n.jsx(x.FormFieldProvider,{"data-invalid":h.dataAttr(!!d[e.name]),field:e,fieldProps:o,autoFocus:a,children:c&&n.jsx(Br,{"data-input-type":e.inputType,"data-hidden":h.dataAttr(e.isHidden),...r})})}})},xr=i.ikp("label",{_id:"aiChatForm__FieldLabel"}),Yi=t=>{const{field:e}=x.useFormField();return n.jsx(xr,{"data-required":h.dataAttr(e.isRequired),htmlFor:e.name,children:e.label,...t})},Tr=i.ikp("input",{_id:"aiChatForm__FieldText",type:"text"}),J=t=>{const{field:e,error:a,fieldProps:{onChange:r,onBlur:s,...d},autoFocus:o}=x.useFormField(),{onChange:c,onBlur:m,...l}=t;return n.jsx(Tr,{id:e.name,autoFocus:o,placeholder:"placeholder"in e?e.placeholder:void 0,"data-invalid":h.dataAttr(!!a),onChange:u.composeEventHandlers(c,r),onBlur:u.composeEventHandlers(m,s),...d,...l})},Ji=i.ikp(J,{_id:"aiChatForm__FieldEmail",type:"email"}),jr=i.ikp("input",{_id:"aiChatForm__FieldFile",type:"file",multiple:!0}),Xi=t=>{const{field:e,error:a,fieldProps:{value:r,onChange:s,onBlur:d,...o},autoFocus:c}=x.useFormField(),{onChange:m,onBlur:l,...p}=t,v=E=>{const j=E.target.files;s(j)};return n.jsx(jr,{id:e.name,autoFocus:c,"data-value":r,"data-invalid":h.dataAttr(!!a),...p,...o,onChange:u.composeEventHandlers(m,v),onBlur:u.composeEventHandlers(l,d)})},Zi=i.ikp(J,{_id:"aiChatForm__FieldTextArea",type:"textarea",asChild:!0,children:n.jsx(ne,{maxRows:8})}),yr=i.ikp(K.Root,{_id:"aiChatForm__FieldCheckbox"}),ea=t=>{const{field:e,error:a,fieldProps:r,autoFocus:s}=x.useFormField(),{onCheckedChange:d,...o}=t;return n.jsx(yr,{id:e.name,name:e.name,autoFocus:s,"data-invalid":h.dataAttr(!!a),checked:r.value,onCheckedChange:u.composeEventHandlers(d,r.onChange),...o})},ta=i.ikp(K.Indicator,{_id:"aiChatForm__FieldCheckboxIndicator",children:n.jsx(be.CheckboxIcon,{})}),Hr=i.ikp(I.Root,{_id:"aiChatForm__FieldSelect"}),ia=t=>{const{field:e,error:a,fieldProps:r}=x.useFormField(),{onValueChange:s,...d}=t;return n.jsx(Hr,{name:e.name,"data-invalid":h.dataAttr(!!a),value:r.value,onValueChange:u.composeEventHandlers(s,r.onChange),...d})},aa=i.ikp(I.Trigger,{_id:"aiChatForm__FieldSelect__Trigger"}),wr=i.ikp(I.Value,{_id:"aiChatForm__FieldSelect__Value"}),na=t=>{const{field:e}=x.useFormField();return n.jsx(wr,{placeholder:"placeholder"in e?e.placeholder:void 0,...t})},ra=i.ikp(I.Icon,{_id:"aiChatForm__FieldSelect__Icon",asChild:!0,children:n.jsx(f.BuiltInIconRenderer,{iconSettings:{builtIn:"LuChevronDown"}})}),sa=i.ikp(I.Content,{_id:"aiChatForm__FieldSelect__Content",position:"popper"}),oa=i.ikp(I.Viewport,{_id:"aiChatForm__FieldSelect__Viewport"}),da=i.ikp(I.Item,{_id:"aiChatForm__FieldSelect__Item"}),ca=i.ikp(I.ItemText,{_id:"aiChatForm__FieldSelect__ItemText"}),ma=i.ikp(I.ItemIndicator,{_id:"aiChatForm__FieldSelect__ItemIndicator",asChild:!0,children:n.jsx(f.BuiltInIconRenderer,{iconSettings:{builtIn:"LuCheck"}})}),Lr=i.ikp("span",{_id:"aiChatForm__FieldError"}),la=t=>{const{error:e}=x.useFormField();return e?n.jsx(Lr,{children:e.message?.toString(),...t}):null},Dr=i.ikp("span",{_id:"aiChatForm__Error"}),ha=t=>{const{formError:e}=A.useChatForm();return e?n.jsx(Dr,{children:e.message,...t}):null},ua=i.ikp("div",{_id:"aiChatForm__Footer"}),qr=i.ikp("button",{_id:"aiChatForm__Cancel",children:"Cancel"}),Ca=t=>{const{onClick:e,...a}=t,{closeForm:r}=A.useChatForm();return n.jsx(qr,{onClick:u.composeEventHandlers(e,r),...a})},Rr=i.ikp("button",{_id:"aiChatForm__Submit",children:"Submit",type:"submit"}),pa=t=>{const{onClick:e,...a}=t,{isSubmitting:r}=A.useChatForm();return n.jsx(Rr,{disabled:r,...a})},Wr=i.ikp("div",{_id:"aiChatForm__Success"}),va=t=>{const{isSuccess:e}=A.useChatForm();return e?n.jsx(Wr,{...t}):null},Or=i.ikp("h2",{_id:"aiChatForm__SuccessHeading"}),ba=t=>{const{form:e}=A.useChatForm();return n.jsx(Or,{children:e?.successView.heading,...t})},Qr=i.ikp($.Markdown,{_id:"aiChatForm__SuccessMessage"}),ga=t=>{const{form:e}=A.useChatForm();return n.jsx(Qr,{children:e?.successView.message,...t})},Nr=i.ikp("button",{_id:"aiChatForm__SuccessButton"}),Pa=t=>{const{onClick:e,...a}=t,{form:r,closeForm:s}=A.useChatForm(),d=r?.successView?.doneButton;if(!d)return null;const o=d.icon&&n.jsx(f.BuiltInIconRenderer,{iconSettings:d.icon}),c=d.label;return n.jsx(Nr,{onClick:u.composeEventHandlers(e,s),children:n.jsxs(n.Fragment,{children:[o,c]}),...a})};exports.Provider=b.ChatProvider;exports.ActionBar=pi;exports.Actions=vi;exports.AttachmentsBar=Dt;exports.AttachmentsBarActions=Nt;exports.AttachmentsBarAttachment=Rt;exports.AttachmentsBarAttachmentDelete=Qt;exports.AttachmentsBarAttachmentIcon=Wt;exports.AttachmentsBarAttachmentTitle=Ot;exports.AttachmentsBarForm=ri;exports.AttachmentsBarFormContent=mi;exports.AttachmentsBarFormContentError=ui;exports.AttachmentsBarFormContentInput=hi;exports.AttachmentsBarFormContentLabel=li;exports.AttachmentsBarFormSubmitButton=Ci;exports.AttachmentsBarFormTitle=si;exports.AttachmentsBarFormTitleError=ci;exports.AttachmentsBarFormTitleInput=di;exports.AttachmentsBarFormTitleLabel=oi;exports.AttachmentsBarInfoTip=$t;exports.AttachmentsBarInfoTipArrow=me;exports.AttachmentsBarInfoTipIcon=Vt;exports.AttachmentsBarInfoTipText=Ut;exports.AttachmentsBarInput=zt;exports.AttachmentsBarInputIcon=Gt;exports.AttachmentsBarInputs=Kt;exports.AttachmentsBarList=qt;exports.AttachmentsBarModal=Yt;exports.AttachmentsBarModalBody=ni;exports.AttachmentsBarModalClose=ai;exports.AttachmentsBarModalContent=Xt;exports.AttachmentsBarModalDescription=ti;exports.AttachmentsBarModalHeader=Zt;exports.AttachmentsBarModalHeading=ei;exports.AttachmentsBarModalHelp=ii;exports.AttachmentsBarModalOverlay=Jt;exports.ChatAction=Y;exports.ChatActionFeedback=Ai;exports.ChatActionLabel=le;exports.ChatHelpAction=Fi;exports.Content=Ie;exports.ContentScrollArea=Me;exports.ContentScrollAreaCorner=xe;exports.ContentScrollAreaScrollbar=fe;exports.ContentScrollAreaThumb=Be;exports.ContentScrollAreaViewport=Se;exports.ConversationLoading=_e;exports.Disclaimer=je;exports.DisclaimerArrow=De;exports.DisclaimerContent=we;exports.DisclaimerLabel=ye;exports.DisclaimerText=Le;exports.DisclaimerTrigger=He;exports.EmbeddedChatPrimitiveActionBar=pi;exports.EmbeddedChatPrimitiveActions=vi;exports.EmbeddedChatPrimitiveAttachmentsBar=Dt;exports.EmbeddedChatPrimitiveAttachmentsBarActions=Nt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachment=Rt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentDelete=Qt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentIcon=Wt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentTitle=Ot;exports.EmbeddedChatPrimitiveAttachmentsBarForm=ri;exports.EmbeddedChatPrimitiveAttachmentsBarFormContent=mi;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentError=ui;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentInput=hi;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentLabel=li;exports.EmbeddedChatPrimitiveAttachmentsBarFormSubmitButton=Ci;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitle=si;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleError=ci;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleInput=di;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleLabel=oi;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTip=$t;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipArrow=me;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipIcon=Vt;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipText=Ut;exports.EmbeddedChatPrimitiveAttachmentsBarInput=zt;exports.EmbeddedChatPrimitiveAttachmentsBarInputIcon=Gt;exports.EmbeddedChatPrimitiveAttachmentsBarInputs=Kt;exports.EmbeddedChatPrimitiveAttachmentsBarList=qt;exports.EmbeddedChatPrimitiveAttachmentsBarModal=Yt;exports.EmbeddedChatPrimitiveAttachmentsBarModalBody=ni;exports.EmbeddedChatPrimitiveAttachmentsBarModalClose=ai;exports.EmbeddedChatPrimitiveAttachmentsBarModalContent=Xt;exports.EmbeddedChatPrimitiveAttachmentsBarModalDescription=ti;exports.EmbeddedChatPrimitiveAttachmentsBarModalHeader=Zt;exports.EmbeddedChatPrimitiveAttachmentsBarModalHeading=ei;exports.EmbeddedChatPrimitiveAttachmentsBarModalHelp=ii;exports.EmbeddedChatPrimitiveAttachmentsBarModalOverlay=Jt;exports.EmbeddedChatPrimitiveChatAction=Y;exports.EmbeddedChatPrimitiveChatActionFeedback=Ai;exports.EmbeddedChatPrimitiveChatActionLabel=le;exports.EmbeddedChatPrimitiveChatHelpAction=Fi;exports.EmbeddedChatPrimitiveContent=Ie;exports.EmbeddedChatPrimitiveContentScrollArea=Me;exports.EmbeddedChatPrimitiveContentScrollAreaCorner=xe;exports.EmbeddedChatPrimitiveContentScrollAreaScrollbar=fe;exports.EmbeddedChatPrimitiveContentScrollAreaThumb=Be;exports.EmbeddedChatPrimitiveContentScrollAreaViewport=Se;exports.EmbeddedChatPrimitiveConversationLoading=_e;exports.EmbeddedChatPrimitiveDisclaimer=je;exports.EmbeddedChatPrimitiveDisclaimerArrow=De;exports.EmbeddedChatPrimitiveDisclaimerContent=we;exports.EmbeddedChatPrimitiveDisclaimerLabel=ye;exports.EmbeddedChatPrimitiveDisclaimerText=Le;exports.EmbeddedChatPrimitiveDisclaimerTrigger=He;exports.EmbeddedChatPrimitiveFeedbackForm=wi;exports.EmbeddedChatPrimitiveFeedbackItem=Li;exports.EmbeddedChatPrimitiveFeedbackItemCheckbox=Di;exports.EmbeddedChatPrimitiveFeedbackItemCheckboxIndicator=qi;exports.EmbeddedChatPrimitiveFeedbackItemDescription=Wi;exports.EmbeddedChatPrimitiveFeedbackItemLabel=Ri;exports.EmbeddedChatPrimitiveFeedbackModal=Bi;exports.EmbeddedChatPrimitiveFeedbackModalBody=Hi;exports.EmbeddedChatPrimitiveFeedbackModalClose=yi;exports.EmbeddedChatPrimitiveFeedbackModalContent=Ti;exports.EmbeddedChatPrimitiveFeedbackModalHeader=ji;exports.EmbeddedChatPrimitiveFeedbackModalOverlay=xi;exports.EmbeddedChatPrimitiveFeedbackSubmitButton=Oi;exports.EmbeddedChatPrimitiveFooter=Tt;exports.EmbeddedChatPrimitiveForm=Ni;exports.EmbeddedChatPrimitiveFormCancel=Ca;exports.EmbeddedChatPrimitiveFormClose=$i;exports.EmbeddedChatPrimitiveFormContent=zi;exports.EmbeddedChatPrimitiveFormDescription=Ki;exports.EmbeddedChatPrimitiveFormError=ha;exports.EmbeddedChatPrimitiveFormField=Gi;exports.EmbeddedChatPrimitiveFormFieldCheckbox=ea;exports.EmbeddedChatPrimitiveFormFieldCheckboxIndicator=ta;exports.EmbeddedChatPrimitiveFormFieldEmail=Ji;exports.EmbeddedChatPrimitiveFormFieldError=la;exports.EmbeddedChatPrimitiveFormFieldFile=Xi;exports.EmbeddedChatPrimitiveFormFieldLabel=Yi;exports.EmbeddedChatPrimitiveFormFieldSelect=ia;exports.EmbeddedChatPrimitiveFormFieldSelectContent=sa;exports.EmbeddedChatPrimitiveFormFieldSelectIcon=ra;exports.EmbeddedChatPrimitiveFormFieldSelectItem=da;exports.EmbeddedChatPrimitiveFormFieldSelectItemIndicator=ma;exports.EmbeddedChatPrimitiveFormFieldSelectItemText=ca;exports.EmbeddedChatPrimitiveFormFieldSelectTrigger=aa;exports.EmbeddedChatPrimitiveFormFieldSelectValue=na;exports.EmbeddedChatPrimitiveFormFieldSelectViewport=oa;exports.EmbeddedChatPrimitiveFormFieldText=J;exports.EmbeddedChatPrimitiveFormFieldTextArea=Zi;exports.EmbeddedChatPrimitiveFormFooter=ua;exports.EmbeddedChatPrimitiveFormHeader=Vi;exports.EmbeddedChatPrimitiveFormHeading=Ui;exports.EmbeddedChatPrimitiveFormSubmit=pa;exports.EmbeddedChatPrimitiveFormSuccess=va;exports.EmbeddedChatPrimitiveFormSuccessButton=Pa;exports.EmbeddedChatPrimitiveFormSuccessHeading=ba;exports.EmbeddedChatPrimitiveFormSuccessMessage=ga;exports.EmbeddedChatPrimitiveFormWrapper=Qi;exports.EmbeddedChatPrimitiveHeaderToolbar=ke;exports.EmbeddedChatPrimitiveHelpActions=ki;exports.EmbeddedChatPrimitiveHelpActionsMenu=Ii;exports.EmbeddedChatPrimitiveHelpActionsMenuArrow=Mi;exports.EmbeddedChatPrimitiveHelpActionsMenuItem=Si;exports.EmbeddedChatPrimitiveHelpActionsMenuItemIcon=fi;exports.EmbeddedChatPrimitiveHelpActionsTrigger=Ei;exports.EmbeddedChatPrimitiveInput=Ht;exports.EmbeddedChatPrimitiveInputFieldset=jt;exports.EmbeddedChatPrimitiveInputGroup=yt;exports.EmbeddedChatPrimitiveIntroMessageWrapper=ze;exports.EmbeddedChatPrimitiveMessage=pt;exports.EmbeddedChatPrimitiveMessageAction=Pt;exports.EmbeddedChatPrimitiveMessageActions=vt;exports.EmbeddedChatPrimitiveMessageAttachments=nt;exports.EmbeddedChatPrimitiveMessageAttachmentsItem=st;exports.EmbeddedChatPrimitiveMessageAttachmentsItemIcon=ot;exports.EmbeddedChatPrimitiveMessageAttachmentsItemTitle=dt;exports.EmbeddedChatPrimitiveMessageAttachmentsList=rt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreview=ct;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewBody=Ct;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewClose=ut;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewContent=lt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewHeader=ht;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewOverlay=mt;exports.EmbeddedChatPrimitiveMessageAvatar=Je;exports.EmbeddedChatPrimitiveMessageAvatarContent=Xe;exports.EmbeddedChatPrimitiveMessageAvatarFallback=Ze;exports.EmbeddedChatPrimitiveMessageAvatarImage=et;exports.EmbeddedChatPrimitiveMessageContent=at;exports.EmbeddedChatPrimitiveMessageContentWrapper=it;exports.EmbeddedChatPrimitiveMessageHeader=Ge;exports.EmbeddedChatPrimitiveMessageLoading=Ye;exports.EmbeddedChatPrimitiveMessageName=tt;exports.EmbeddedChatPrimitiveMessageSourceItem=Ft;exports.EmbeddedChatPrimitiveMessageSourceItemBreadcrumbs=Et;exports.EmbeddedChatPrimitiveMessageSourceItemDescription=ft;exports.EmbeddedChatPrimitiveMessageSourceItemDescriptionPart=Bt;exports.EmbeddedChatPrimitiveMessageSourceItemIcon=It;exports.EmbeddedChatPrimitiveMessageSourceItemIndicator=xt;exports.EmbeddedChatPrimitiveMessageSourceItemTag=St;exports.EmbeddedChatPrimitiveMessageSourceItemTitle=Mt;exports.EmbeddedChatPrimitiveMessageSources=_t;exports.EmbeddedChatPrimitiveMessageSourcesHeader=At;exports.EmbeddedChatPrimitiveMessageSourcesList=kt;exports.EmbeddedChatPrimitiveMessageToolAction=gt;exports.EmbeddedChatPrimitiveMessageToolActions=bt;exports.EmbeddedChatPrimitiveMessageWrapper=ce;exports.EmbeddedChatPrimitiveMessages=Te;exports.EmbeddedChatPrimitiveQuickQuestion=Oe;exports.EmbeddedChatPrimitiveQuickQuestionButton=Qe;exports.EmbeddedChatPrimitiveQuickQuestions=qe;exports.EmbeddedChatPrimitiveQuickQuestionsLabel=Re;exports.EmbeddedChatPrimitiveQuickQuestionsList=We;exports.EmbeddedChatPrimitiveRoot=Ae;exports.EmbeddedChatPrimitiveSendButton=wt;exports.EmbeddedChatPrimitiveSendButtonIcon=Lt;exports.EmbeddedChatPrimitiveTaglineBrandName=_i;exports.EmbeddedChatPrimitiveTaglineContainer=bi;exports.EmbeddedChatPrimitiveTaglineLogo=Pi;exports.EmbeddedChatPrimitiveTaglineText=gi;exports.EmbeddedChatPrimitiveToolbarHeader=Ee;exports.EmbeddedChatPrimitiveToolbarHeaderWrapper=Fe;exports.EmbeddedChatPrimitiveWorkflow=Ue;exports.EmbeddedChatPrimitiveWorkflowIcon=Ke;exports.EmbeddedChatPrimitiveWorkflows=Ne;exports.EmbeddedChatPrimitiveWorkflowsLabel=$e;exports.EmbeddedChatPrimitiveWorkflowsList=Ve;exports.EmbeddedChatPrimitiveWrapper=Pe;exports.FeedbackForm=wi;exports.FeedbackItem=Li;exports.FeedbackItemCheckbox=Di;exports.FeedbackItemCheckboxIndicator=qi;exports.FeedbackItemDescription=Wi;exports.FeedbackItemLabel=Ri;exports.FeedbackModal=Bi;exports.FeedbackModalBody=Hi;exports.FeedbackModalClose=yi;exports.FeedbackModalContent=Ti;exports.FeedbackModalHeader=ji;exports.FeedbackModalOverlay=xi;exports.FeedbackSubmitButton=Oi;exports.Footer=Tt;exports.Form=Ni;exports.FormCancel=Ca;exports.FormClose=$i;exports.FormContent=zi;exports.FormDescription=Ki;exports.FormError=ha;exports.FormField=Gi;exports.FormFieldCheckbox=ea;exports.FormFieldCheckboxIndicator=ta;exports.FormFieldEmail=Ji;exports.FormFieldError=la;exports.FormFieldFile=Xi;exports.FormFieldLabel=Yi;exports.FormFieldSelect=ia;exports.FormFieldSelectContent=sa;exports.FormFieldSelectIcon=ra;exports.FormFieldSelectItem=da;exports.FormFieldSelectItemIndicator=ma;exports.FormFieldSelectItemText=ca;exports.FormFieldSelectTrigger=aa;exports.FormFieldSelectValue=na;exports.FormFieldSelectViewport=oa;exports.FormFieldText=J;exports.FormFieldTextArea=Zi;exports.FormFooter=ua;exports.FormHeader=Vi;exports.FormHeading=Ui;exports.FormSubmit=pa;exports.FormSuccess=va;exports.FormSuccessButton=Pa;exports.FormSuccessHeading=ba;exports.FormSuccessMessage=ga;exports.FormWrapper=Qi;exports.Header=Ua;exports.HeaderToolbar=ke;exports.HeaderToolbarWrapper=Fe;exports.HelpActions=ki;exports.HelpActionsMenu=Ii;exports.HelpActionsMenuArrow=Mi;exports.HelpActionsMenuItem=Si;exports.HelpActionsMenuItemIcon=fi;exports.HelpActionsTrigger=Ei;exports.Input=Ht;exports.InputFieldset=jt;exports.InputGroup=yt;exports.IntroMessageWrapper=ze;exports.Message=pt;exports.MessageAction=Pt;exports.MessageActions=vt;exports.MessageAttachments=nt;exports.MessageAttachmentsItem=st;exports.MessageAttachmentsItemIcon=ot;exports.MessageAttachmentsItemTitle=dt;exports.MessageAttachmentsList=rt;exports.MessageAttachmentsPreview=ct;exports.MessageAttachmentsPreviewBody=Ct;exports.MessageAttachmentsPreviewClose=ut;exports.MessageAttachmentsPreviewContent=lt;exports.MessageAttachmentsPreviewHeader=ht;exports.MessageAttachmentsPreviewOverlay=mt;exports.MessageAvatar=Je;exports.MessageAvatarContent=Xe;exports.MessageAvatarFallback=Ze;exports.MessageAvatarImage=et;exports.MessageContent=at;exports.MessageContentWrapper=it;exports.MessageHeader=Ge;exports.MessageLoading=Ye;exports.MessageName=tt;exports.MessageSourceItem=Ft;exports.MessageSourceItemBreadcrumbIcon=wn;exports.MessageSourceItemBreadcrumbs=Et;exports.MessageSourceItemDescription=ft;exports.MessageSourceItemDescriptionPart=Bt;exports.MessageSourceItemIcon=It;exports.MessageSourceItemIndicator=xt;exports.MessageSourceItemTag=St;exports.MessageSourceItemTitle=Mt;exports.MessageSources=_t;exports.MessageSourcesHeader=At;exports.MessageSourcesList=kt;exports.MessageToolAction=gt;exports.MessageToolActions=bt;exports.MessageWrapper=ce;exports.Messages=Te;exports.QuickQuestion=Oe;exports.QuickQuestionButton=Qe;exports.QuickQuestions=qe;exports.QuickQuestionsLabel=Re;exports.QuickQuestionsList=We;exports.Root=Ae;exports.SendButton=wt;exports.SendButtonIcon=Lt;exports.TaglineBrandName=_i;exports.TaglineContainer=bi;exports.TaglineLogo=Pi;exports.TaglineText=gi;exports.ToolbarHeader=Ee;exports.Workflow=Ue;exports.WorkflowIcon=Ke;exports.Workflows=Ne;exports.WorkflowsLabel=$e;exports.WorkflowsList=Ve;exports.Wrapper=Pe;
|
|
@@ -16,7 +16,7 @@ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
|
16
16
|
import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
|
|
17
17
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
18
18
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
19
|
-
import * as DialogPrimitive from '
|
|
19
|
+
import * as DialogPrimitive from '../atoms/dialog';
|
|
20
20
|
export declare const EmbeddedChatPrimitiveWrapper: ForwardRefExoticComponent<Omit< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
21
21
|
declare const PrimitiveConversationLoading: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
|
|
22
22
|
export declare const EmbeddedChatPrimitiveConversationLoading: (props: ComponentPropsWithRef<typeof PrimitiveConversationLoading>) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -16,7 +16,7 @@ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
|
16
16
|
import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
|
|
17
17
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
18
18
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
19
|
-
import * as DialogPrimitive from '
|
|
19
|
+
import * as DialogPrimitive from '../atoms/dialog';
|
|
20
20
|
export declare const EmbeddedChatPrimitiveWrapper: ForwardRefExoticComponent<Omit< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
21
21
|
declare const PrimitiveConversationLoading: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
|
|
22
22
|
export declare const EmbeddedChatPrimitiveConversationLoading: (props: ComponentPropsWithRef<typeof PrimitiveConversationLoading>) => import("react/jsx-runtime").JSX.Element | null;
|