@inkeep/agents-ui 0.14.13 → 0.14.15
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/index.d.cts +14 -11
- package/dist/index.d.ts +14 -11
- package/dist/primitives/atoms/dialog.cjs +1 -1
- package/dist/primitives/atoms/dialog.js +129 -131
- package/dist/primitives/components/embedded-chat/use-stream-processor.cjs +1 -1
- package/dist/primitives/components/embedded-chat/use-stream-processor.js +35 -33
- package/dist/primitives/components/embedded-chat.cjs +4 -4
- package/dist/primitives/components/embedded-chat.js +262 -258
- package/dist/primitives/providers/base-events-provider.cjs +1 -1
- package/dist/primitives/providers/base-events-provider.js +1 -1
- package/dist/styled/components/data-summary-group.cjs +1 -1
- package/dist/styled/components/data-summary-group.js +35 -31
- package/dist/types/types.d.cts +3 -1
- package/dist/types/types.d.ts +3 -1
- package/package.json +2 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),u=require("react"),ua=require("react-dom/client"),Z=require("react-textarea-autosize"),Ca=require("@radix-ui/react-avatar"),pa=require("@radix-ui/react-checkbox"),va=require("@radix-ui/react-popover"),ba=require("@radix-ui/react-tooltip"),ga=require("@radix-ui/react-scroll-area"),T=require("../atoms/select.cjs"),_=require("../atoms/dialog.cjs"),Pa=require("../atoms/avatars/ai.cjs"),Aa=require("../atoms/avatars/user.cjs"),f=require("../atoms/icons/custom-icon.cjs"),y=require("../atoms/icons/built-in-icon-renderer.cjs"),_a=require("../atoms/link.cjs"),Q=require("../atoms/markdown/index.cjs"),D=require("../providers/attachment-item-provider.cjs"),S=require("../providers/attachments-bar-provider.cjs"),j=require("../providers/source-item-provider.cjs"),b=require("../providers/config-provider.cjs"),ee=require("../providers/feedback-provider.cjs"),q=require("../providers/message-attachments-provider.cjs"),E=require("../providers/message-provider.cjs"),le=require("../atoms/icons/checkbox-icon.cjs"),J=require("../hooks/use-copy-to-clipboard.cjs"),V=require("../providers/feedback-item-provider.cjs"),h=require("../utils/misc.cjs"),a=require("./factory.cjs"),P=require("./embedded-chat/chat-provider.cjs"),Ea=require("./tagline-logo-icon.cjs"),Fa=require("../hooks/use-settle-action.cjs"),ka=require("../hooks/use-container-size.cjs"),te=require("./embedded-chat/use-chat-action.cjs"),X=require("../providers/help-menu-provider.cjs"),F=require("../providers/chat-form-provider.cjs"),H=require("../providers/form-field-provider.cjs"),Ia=require("react-hook-form"),Ma=require("../utils/highlight-emphasis.cjs"),fa=require("./modal/modal-provider.cjs"),Sa=require("../../color-mode/index.cjs"),ie=require("../utils/compose-refs.cjs"),C=require("../utils/compose-event-handlers.cjs"),xa=require("../hooks/use-scroll-to-bottom.cjs"),Ba=require("../hooks/use-debounce.cjs"),ae=require("../providers/hover-popover-provider.cjs"),Ta=require("./modal/widget-auto-focus.cjs"),ne=require("../providers/base-events-provider.cjs"),ya=require("../atoms/shadow/context.cjs"),ja=require("../utils/get-source-icon.cjs"),he=require("../../types/message.cjs");function R(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const r=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,r.get?r:{enumerable:!0,get:()=>t[i]})}}return e.default=t,Object.freeze(e)}const Ha=R(ua),re=R(Ca),$=R(pa),w=R(va),L=R(ba),W=R(ga),wa="__intro__",La=a.ikp("div",{_id:"aiChatWrapper"}),ue=u.forwardRef((t,e)=>{const{...i}=t,{isHidden:r,isMobile:s}=P.useChat(),[o,d]=ka.useContainerSize(),c=ie.useComposedRefs(e,o),m=d?.width?d.width>580:!0,l=fa.useModal();return n.jsx(La,{ref:c,"data-widget-md":h.dataAttr(m),"data-hidden":h.dataAttr(r),"data-in-modal":h.dataAttr(!!l),"data-mobile":h.dataAttr(s),...i})}),Da=a.ikp("div",{_id:"aiChatRoot"}),Ce=t=>{const{isHidden:e}=P.useChat(),{form:i}=F.useChatForm();return i?null:n.jsx(Da,{"data-hidden":h.dataAttr(e),...t})},Ra=a.ikp("div",{_id:"aiChatHeader"}),pe=a.ikp("div",{_id:"aiChatHeader__Toolbar"}),ve=a.ikp("div",{_id:"aiChatHeader__ToolbarHeaderWrapper"}),Oa=a.ikp("div",{_id:"aiChatHeader__ToolbarHeader"}),be=u.memo(t=>{const{aiChatSettings:e}=b.useInkeepConfig(),i=`Ask ${e.aiAssistantName||"AI"}`;return n.jsx(Oa,{...t,children:i})}),ge=a.ikp("div",{_id:"aiChatContent"}),Pe=a.ikp(W.Root,{_id:"aiChatContentScrollArea"}),qa=a.ikp(W.Viewport,{_id:"aiChatContentScrollArea__Viewport"}),Ae=u.forwardRef(({children:t,...e},i)=>{const{containerRef:r}=xa.useScrollToBottom(),s=ie.useComposedRefs(i,r);return n.jsx(qa,{ref:s,children:n.jsx("div",{"data-part":"grid",style:{display:"grid"},children:t}),...e})}),_e=a.ikp(W.ScrollAreaScrollbar,{_id:"aiChatContentScrollArea__Scrollbar"}),Ee=a.ikp(W.ScrollAreaThumb,{_id:"aiChatContentScrollArea__Thumb"}),Fe=a.ikp(W.Corner,{_id:"aiChatContentScrollArea__Corner"}),Wa=a.ikp("div",{_id:"aiChatMessages"}),ke=t=>{const e=P.useChat(),{children:i,...r}=t;return n.jsx(Wa,{children:h.maybeRender(i,e),...r})},Na=a.ikp("div",{_id:"aiChatDisclaimer"}),Ie=u.memo(t=>{const{aiChatSettings:e}=b.useInkeepConfig(),[i,r]=u.useState(!1),s=Ba.useDebounce(i,100);return e.disclaimerSettings?.isEnabled?n.jsx(ae.HoverPopoverProvider,{open:i,setOpen:r,children:n.jsx(w.Root,{open:s,onOpenChange:r,children:n.jsx(Na,{...t})})}):null}),Qa=a.ikp("span",{_id:"aiChatDisclaimerLabel"}),Me=u.memo(t=>{const{aiChatSettings:e}=b.useInkeepConfig(),i=e.disclaimerSettings;return n.jsx(Qa,{children:i?.label,...t})}),Va=a.ikp(w.Trigger,{_id:"aiChatDisclaimerTrigger",children:n.jsx(f.CustomIcon,{iconKey:"info"})}),fe=u.memo(t=>{const{setOpen:e}=ae.useHoverPopover(),i=()=>e(!0),r=()=>e(!1);return n.jsx(Va,{onMouseEnter:i,onMouseLeave:r,...t})}),$a=a.ikp(w.Content,{_id:"aiChatDisclaimerContent"}),Se=t=>{const{setOpen:e}=ae.useHoverPopover(),i=()=>e(!0),r=()=>e(!1);return n.jsx($a,{onMouseEnter:i,onMouseLeave:r,side:"top",sideOffset:8,align:"end",alignOffset:-10,...t})},Ua=a.ikp(Q.Markdown,{_id:"aiChatDisclaimerText"}),xe=u.memo(t=>{const{aiChatSettings:e}=b.useInkeepConfig(),i=e.aiAssistantName,s=e.disclaimerSettings?.tooltip||`Information provided by ${i||"this AI assistant"} is not guaranteed to be accurate or comprehensive.`;return n.jsx(Ua,{shouldOpenLinksInNewTab:!0,children:s,...t})}),Be=a.ikp(w.Arrow,{_id:"aiChatDisclaimerArrow"}),Ka=a.ikp("div",{_id:"aiChatExampleQuestions"}),Te=t=>{const{aiChatSettings:e}=b.useInkeepConfig(),{messages:i}=P.useChat();return!e.exampleQuestions?.length||i.length?null:n.jsx(Ka,{...t})},za=a.ikp("h3",{_id:"aiChatExampleQuestionsLabel"}),ye=u.memo(t=>{const{aiChatSettings:e}=b.useInkeepConfig();return n.jsx(za,{children:e.exampleQuestionsLabel,...t})}),Ga=a.ikp("div",{_id:"aiChatExampleQuestionsList"}),je=u.memo(t=>{const{aiChatSettings:e}=b.useInkeepConfig(),i=e.exampleQuestions,{children:r,...s}=t;return n.jsx(Ga,{children:h.maybeRender(r,i),...s})}),Ya=a.ikp("div",{_id:"aiChatExampleQuestion"}),He=u.forwardRef((t,e)=>{const{aiChatSettings:i}=b.useInkeepConfig(),r=i.isFirstExampleQuestionHighlighted;return n.jsx(Ya,{ref:e,"data-highlight":h.dataAttr(r),...t})}),Ja=a.ikp("button",{_id:"aiChatExampleQuestionButton"}),we=t=>{const{question:e,onClick:i,...r}=t,{handleSubmit:s}=P.useChat();return n.jsx(Ja,{onClick:C.composeEventHandlers(i,()=>s(e)),children:e,...r})},Xa=a.ikp("div",{_id:"aiChatWorkflows"}),Le=t=>{const{aiChatSettings:e}=b.useInkeepConfig(),{messages:i}=P.useChat();return!e.workflows?.length||i.length?null:n.jsx(Xa,{...t})},Za=a.ikp("h3",{_id:"aiChatWorkflowsLabel"}),De=u.memo(t=>{const{aiChatSettings:e}=b.useInkeepConfig();return n.jsx(Za,{children:e.workflowsHeader,...t})}),en=a.ikp("div",{_id:"aiChatWorkflowsList"}),Re=u.memo(t=>{const{aiChatSettings:e}=b.useInkeepConfig(),i=e.workflows,{children:r,...s}=t;return n.jsx(en,{children:h.maybeRender(r,i),...s})}),tn=a.ikp("button",{_id:"aiChatWorkflow"}),Oe=t=>{const{workflow:e,onClick:i,...r}=t,s=o=>{};return n.jsx(tn,{onClick:C.composeEventHandlers(i,()=>s()),children:e.displayName,...r})},an=a.ikp("div",{_id:"aiChatMessageWrapper"}),se=t=>{const{message:e,...i}=t;return e.role==="system"?null:n.jsx(E.MessageProvider,{message:e,children:n.jsx(an,{"data-role":e.role,...i})})},qe=u.memo(t=>{const{message:e,...i}=t,{aiChatSettings:r,baseSettings:s}=b.useInkeepConfig(),o=r.aiAssistantName,d=o?`Hi, I'm ${o}!`:"Hi!",c=r.chatSubjectName??s.organizationDisplayName,m=c?`
|
|
2
2
|
|
|
3
3
|
Ask me anything about \`${c}\`.`:`
|
|
4
4
|
|
|
5
|
-
How can I help?`,v={parts:[{type:"text",text:r.introMessage??`${d}${m}`}],id:wa,...e,role:"assistant"};return n.jsx(re,{message:v,...i})}),nn=a.ikp("div",{_id:"aiChatMessageHeader"}),We=t=>{const{message:e}=F.useMessage();return n.jsx(nn,{"data-role":e.role,...t})},rn=a.ikp("div",{_id:"aiChatMessageLoading",children:"Thinking..."}),Ne=t=>n.jsx(rn,{...t}),sn=a.ikp("div",{_id:"aiChatMessageAvatar"}),Qe=t=>{const{message:e}=F.useMessage();return n.jsx(sn,{"data-role":e.role,...t})},on=a.ikp(ne.Root,{_id:"aiChatMessageAvatarContent"}),Ve=t=>{const{message:e}=F.useMessage(),{baseSettings:i}=b.useInkeepConfig();return n.jsx(on,{"data-username":h.dataAttr(e.role==="user"&&!!i.userProperties.name),"data-role":e.role,...t})},dn=a.ikp(ne.Fallback,{_id:"aiChatMessageAvatarFallback"}),$e=C.memo(t=>{const{baseSettings:e}=b.useInkeepConfig(),{message:i}=F.useMessage();return e.userProperties.name?n.jsx(dn,{"data-role":i.role,children:h.getInitials(e.userProperties.name),...t}):null}),me=a.ikp(ne.Image,{_id:"aiChatMessageAvatarImage"}),Ue=C.memo(t=>{const{onLoadingStatusChange:e,...i}=t,{aiChatSettings:r,baseSettings:{userProperties:s}}=b.useInkeepConfig(),{message:o}=F.useMessage(),{aiAssistantAvatar:d}=r??{},c=typeof d=="string"?d:d?.light,m=(typeof d=="string"?d:d?.dark)??c,l=Sa.useColorModeValue(c,m),[v,g]=C.useState(l);C.useEffect(()=>{g(l)},[l]);const p=A=>{A==="error"&&g(null)};return o.role==="user"?s.name?null:r.userAvatar?n.jsx(me,{"data-type":"image",alt:"User avatar","data-role":o.role,src:r.userAvatar,...t}):n.jsx(Aa.default,{"data-type":"icon","data-role":o.role,...t}):v?n.jsx(me,{src:v,alt:"AI assistant avatar","data-type":"image","data-role":o.role,onLoadingStatusChange:u.composeEventHandlers(e,p),...i}):n.jsx(Pa.default,{"data-type":"icon","data-role":o.role,...t})}),cn=a.ikp("span",{_id:"aiChatMessageName"}),Ke=t=>{const{message:e}=F.useMessage();return n.jsx(cn,{"data-role":e.role,children:e.role==="user"?"You":"AI assistant",...t})},mn=a.ikp("div",{_id:"aiChatMessageContentWrapper"}),ze=t=>{const{message:e}=F.useMessage(),{messageButtons:i}=P.useChat(),r=i[e.id]||[];return n.jsx(mn,{"data-role":e.role,"data-has-message-buttons":h.dataAttr(!!r.length),...t})},ln=a.ikp("div",{_id:"aiChatMessageContent"}),Ge=t=>{const{message:e}=F.useMessage();return n.jsx(ln,{"data-role":e.role,...t})},hn=a.ikp("div",{_id:"aiChatMessageAttachments"}),Ye=t=>{const{message:e}=F.useMessage(),i=[];return e.role!=="user"||!i?.length?null:n.jsx(R.MessageAttachmentsProvider,{children:n.jsx(hn,{...t})})},un=a.ikp("div",{_id:"aiChatMessageAttachments__List"}),Je=t=>{const{children:e,...i}=t,r=[];return r?n.jsx(un,{children:h.maybeRender(e,r),...i}):null},Cn=a.ikp("div",{_id:"aiChatMessageAttachments__Item"}),Xe=t=>{const{attachment:e,onClick:i,...r}=t,{selectItem:s,onOpen:o}=R.useMessageAttachments(),d=()=>{s(e),o()};return n.jsx(L.AttachmentItemProvider,{attachment:e,children:n.jsx(Cn,{onClick:u.composeEventHandlers(i,d),...r})})},pn=a.ikp(B.BuiltInIconRenderer,{_id:"aiChatMessageAttachments__ItemIcon"}),Ze=t=>{const{attachment:e}=L.useAttachmentItem(),i=e.contentType?.attachmentIcon;return i?n.jsx(pn,{iconSettings:i,...t}):null},vn=a.ikp("span",{_id:"aiChatMessageAttachments__ItemTitle"}),et=t=>{const{attachment:e}=L.useAttachmentItem();return n.jsx(vn,{children:e.title,...t})},bn=a.ikp(E.Root,{_id:"aiChatMessageAttachmentsPreview"}),tt=t=>{const{onOpenChange:e,...i}=t,{selectItem:r,isOpen:s,onClose:o,selectedItem:d}=R.useMessageAttachments(),c=m=>{m||(o(),r(null))};return n.jsx(bn,{open:s&&d!==null,onOpenChange:u.composeEventHandlers(e,c),...i})},it=a.ikp(E.Overlay,{_id:"aiChatMessageAttachmentsPreview__Overlay"}),at=a.ikp(E.Content,{_id:"aiChatMessageAttachmentsPreview__Content","aria-describedby":void 0}),gn=a.ikp(E.Title,{_id:"aiChatMessageAttachmentsPreview__Header"}),nt=t=>{const{selectedItem:e}=R.useMessageAttachments();return n.jsx(gn,{children:e?.title||"Attachment",...t})},rt=a.ikp(E.Close,{_id:"aiChatMessageAttachmentsPreview__Close",children:n.jsx(f.CustomIcon,{iconKey:"close"})}),Pn=a.ikp("p",{_id:"aiChatMessageAttachmentsPreview__Body"}),st=t=>{const{selectedItem:e}=R.useMessageAttachments();return n.jsx(Pn,{children:e?.content,...t})},ot=t=>{const{text:e,componentStyles:i,...r}=t,{aiChatSettings:s}=b.useInkeepConfig(),{shouldOpenLinksInNewTab:o}=s;return n.jsx(W.Markdown,{children:e,componentStyles:i,shouldOpenLinksInNewTab:o,...r})},dt=({name:t,props:e,componentDef:i})=>{const s=ya.useShadow()?.shadowHost,o=C.useRef(void 0),d=C.useRef(null),c=C.useRef(null),m=C.useRef(!1),[l,v]=C.useState(!1),[g,p]=C.useState(!1);return C.useEffect(()=>{o.current||(o.current=`dyn:${t}:${crypto.randomUUID()}`,v(!0))},[t]),C.useLayoutEffect(()=>{if(!i||!s||!l||!o.current)return;const A=o.current,I=document.createElement("div");return I.setAttribute("data-ikp-component",""),I.setAttribute("data-component",t),I.setAttribute("slot",A),d.current=I,m.current=!1,s.appendChild(I),p(!0),()=>{m.current=!0,p(!1),queueMicrotask(()=>{try{c.current&&(c.current.unmount(),c.current=null)}catch(_){console.debug("Ignoring unmount error:",_)}I.parentNode===s&&I.remove(),d.current=null})}},[i,s,l,t]),C.useEffect(()=>{const A=d.current;if(!A||m.current)return;const I=M=>{if(typeof M!="function"||M.length>1)return!1;try{if(typeof M=="function"&&M.constructor===Function){const w=M({});return C.isValidElement(w)}return!1}catch{return!0}};let _;if(I(i))try{const M=i;_=C.createElement(M,e||{})}catch(M){console.error("Error creating React element from component:",M);return}else if(typeof i=="function")_=i(e||{},A,null);else{console.error("Invalid component definition");return}if(C.isValidElement(_)||typeof _=="string"){if(m.current)return;c.current||(c.current=Ha.createRoot(A)),!m.current&&c.current&&c.current.render(_);return}c.current&&!m.current&&c.current.render(null)},[i,e,g]),n.jsx("slot",{name:o.current})},An=a.ikp("div",{_id:"aiChatMessagePart"}),_n=a.ikp("div",{_id:"aiChatMessageToolbar"}),ct=t=>{const{isLoading:e,messages:i}=P.useChat(),{message:r}=F.useMessage();return i.at(-1)?.id===r?.id&&e||r.role==="user"?null:n.jsx(_n,{...t})},En=a.ikp("div",{_id:"aiChatMessageAnnotationActions"}),mt=t=>{const{children:e,...i}=t,{message:r}=F.useMessage(),{messageButtons:s}=P.useChat(),o=s[r.id]||[];return n.jsx(En,{children:h.maybeRender(e,o),...i})},Fn=a.ikp("a",{_id:"aiChatMessageAnnotationAction"}),kn=a.ikp("button",{_id:"aiChatMessageAnnotationAction"}),lt=t=>{const{onClick:e,action:i,...r}=t,{handleAction:s}=ee.useChatAction(i),{logEvent:o}=ae.useBaseEvents(),{conversationId:d}=P.useChat(),c=()=>{s(),o({eventName:"user_escalation_indicated",properties:{escalationType:"contact_us",conversationId:d}})},m=i.label||"Contact Support",l=n.jsxs(n.Fragment,{children:[i.icon&&n.jsx(B.BuiltInIconRenderer,{iconSettings:i.icon}),m]});return i.action.type==="open_link"?n.jsx(Fn,{href:i.action.url,target:"_blank",rel:"noopener","data-type":i.action.type,onClick:u.composeEventHandlers(e,c),children:l,...r}):n.jsx(kn,{"data-type":i.action.type,onClick:u.composeEventHandlers(e,c),children:l,...r})},In=a.ikp("button",{_id:"aiChatMessageAction"}),ht=t=>{const{action:e,onClick:i,className:r,...s}=t,{conversationId:o}=P.useChat(),{baseSettings:{onFeedback:d}}=b.useInkeepConfig(),{message:c}=F.useMessage(),{isStreaming:m,messages:l}=P.useChat(),[v,g]=Y.useCopyToClipboard(),{feedback:p,submitPositiveFeedback:A,setCurrentFeedback:I,currentFeedback:_}=Z.useMessageFeedback(),{logEvent:M}=ae.useBaseEvents(),[w,de]=Fa.useSettleAction(),U=l.at(-1)?.id===c?.id,K=c.role==="assistant";if(U&&m||!K)return null;const q={copy(){g(h.getMessageContent(c)),M({eventName:"assistant_message_copied",properties:{conversationId:o}})},upvote(){A(c.id).then(()=>{de()})},downvote(){I(c.id)}},z={copy:"Copy Message",upvote:"Upvote Message",downvote:"Downvote Message"},G={copy:n.jsx(f.CustomIcon,{iconKey:v?"messageCopied":"messageCopy"}),upvote:n.jsx(f.CustomIcon,{iconKey:w?"messageCopied":"thumbsUp"}),downvote:n.jsx(f.CustomIcon,{iconKey:"thumbsDown"})},ha={copy:{"data-copied":h.dataAttr(v)},upvote:{"data-upvoted":h.dataAttr(p[c.id]?.type==="positive")},downvote:{"data-downvoted":h.dataAttr(p[c.id]?.type==="negative"),"data-state":_===null?"closed":"open"}};return{copy:!1,upvote:!d,downvote:!d}[e]?null:n.jsx(In,{"data-action":e,...ha[e],children:G[e],"aria-label":z[e],className:`${r} ${e}`,onClick:u.composeEventHandlers(i,q[e]),...s})},Mn=a.ikp("div",{_id:"aiChatMessageSources"}),ut=t=>{const{message:e}=F.useMessage();return e.role!=="assistant"||!e.parts.filter(r=>r.type==="data-artifact"&&r.data?.type?.toLowerCase()===he.CITATION_ARTIFACT_TYPE)?.length?null:n.jsx(Mn,{...t})},fn=a.ikp("div",{_id:"aiChatMessageSources__Header"}),Ct=t=>n.jsx(fn,{children:"Sources",...t}),Sn=a.ikp("div",{_id:"aiChatMessageSources__List"}),pt=t=>{const{message:e}=F.useMessage(),{children:i,...r}=t,{baseSettings:{transformSource:s,organizationDisplayName:o},aiChatSettings:{shouldOpenLinksInNewTab:d},searchSettings:{tabs:c}}=b.useInkeepConfig();if(e.role!=="assistant")return null;const m=e.parts.filter(g=>g.type==="data-artifact"&&g.data?.type?.toLowerCase()===he.CITATION_ARTIFACT_TYPE);if(!m?.length)return null;const l=new Map,v=m.filter(g=>{const p=g.data.artifactSummary.url;return!p||l.has(p)?!1:(l.set(p,!0),!0)}).map(g=>{const p=g.data,A={id:p?.artifactId,title:p?.artifactSummary?.title||p?.name,url:p?.artifactSummary?.url||"",description:"",breadcrumbs:[],type:p?.artifactSummary?.record_type,contentType:p?.artifactType,tag:p?.artifactType},_=(s??(w=>({...w,shouldOpenInNewTab:d,icon:ja.getIcon(w)})))(A,"chatSourceItem",{organizationDisplayName:o,tabs:c}),M=_.shouldOpenInNewTab!==void 0?_.shouldOpenInNewTab:d;return{..._,isExternal:M}});return n.jsx(Sn,{children:h.maybeRender(i,v),...r})},xn=a.ikp(_a.LinkWithQueryParams,{_id:"aiChatMessageSourceItem"}),vt=t=>{const{source:e,onClick:i,...r}=t,{logEvent:s}=ae.useBaseEvents(),{conversationId:o}=P.useChat(),d=()=>{s({eventName:"assistant_source_item_clicked",properties:{conversationId:o,link:e}})};return n.jsx(T.SourceItemProvider,{source:e,children:n.jsx(xn,{"data-type":e.type,appendToUrl:e.appendToUrl,isExternal:e.isExternal,"data-breadcrumbs":!!e.breadcrumbs?.length,onClick:u.composeEventHandlers(i,d),...r})})},Bn=a.ikp("div",{_id:"aiChatMessageSourceItem__Breadcrumbs"}),bt=t=>{const{source:e}=T.useSourceItem();return e.breadcrumbs?.length?n.jsx(Bn,{"data-type":e.type,...t}):null},Tn=a.ikp(f.CustomIcon,{_id:"aiChatMessageSourceItem__BreadcrumbIcon",iconKey:"breadcrumbSeparator"}),yn=a.ikp(B.BuiltInIconRenderer,{_id:"aiChatMessageSourceItem__Icon"}),gt=t=>{const{source:e}=T.useSourceItem();return n.jsx(yn,{iconSettings:e.icon,"data-type":e.type,...t})},jn=a.ikp("span",{_id:"aiChatMessageSourceItem__Title"}),Pt=t=>{const{source:e}=T.useSourceItem();return n.jsx(jn,{"data-type":e.type,children:e.title,...t})},Hn=a.ikp("span",{_id:"aiChatMessageSourceItem__Tag"}),At=t=>{const{source:e}=T.useSourceItem();return n.jsx(Hn,{"data-type":e.type,...t})},wn=a.ikp("span",{_id:"aiChatMessageSourceItem__Description"}),_t=t=>{const{source:e}=T.useSourceItem(),{children:i,...r}=t,s=C.useMemo(()=>e.description?Ma.highlightEmphasis(e.description):[],[e.description]);return s.length?n.jsx(wn,{"data-type":e.type,children:h.maybeRender(i,s),...r}):null},Ln=a.ikp("span",{_id:"aiChatMessageSourceItem__DescriptionPart"}),Et=t=>{const{part:e,...i}=t,{source:r}=T.useSourceItem();return typeof e=="string"?e:n.jsx(Ln,{"data-type":r.type,children:e.content,"data-highlighted":h.dataAttr(e.highlighted),...i})},Dn=a.ikp(f.CustomIcon,{_id:"aiChatMessageSourceItem__Indicator"}),Ft=t=>{const{source:e}=T.useSourceItem();return n.jsx(Dn,{iconKey:e.isExternal?"openLinkInNewTab":"openLinkInSameTab",...t})},kt=a.ikp("div",{_id:"aiChatFooter"}),It=a.ikp("div",{_id:"aiChatInput__Fieldset"}),Mt=a.ikp("div",{_id:"aiChatInput__Group"}),Rn=a.ikp("textarea",{_id:"aiChatInput"}),ft=C.forwardRef(({onChange:t,onKeyDown:e,...i},r)=>{const{handleInputChange:s,handleInputKeyDown:o,input:d,error:c,shouldAutoFocusInput:m,inputRef:l}=P.useChat(),{aiChatSettings:v}=b.useInkeepConfig(),g=te.useComposedRefs(r,l);return Ta.useWidgetAutoFocus("chat",l,m),n.jsx(Rn,{asChild:!0,ref:g,maxLength:99999,placeholder:v.placeholder,value:d,onChange:u.composeEventHandlers(t,s),onKeyDown:u.composeEventHandlers(e,o),disabled:!!c||v.isViewOnly,...i,children:n.jsx(X,{})})}),On=a.ikp("button",{_id:"aiChatInput__SendButton"}),St=t=>{const{handleSubmit:e,isSubmitDisabled:i,error:r}=P.useChat(),{aiChatSettings:s}=b.useInkeepConfig(),{onClick:o,...d}=t;return n.jsx(On,{onClick:u.composeEventHandlers(o,()=>e()),"aria-label":"Send message",disabled:i||!!r||s.isViewOnly,...d})},xt=a.ikp(f.CustomIcon,{_id:"aiChatInput__SendButtonIcon",iconKey:"chatSubmit"}),qn=a.ikp("div",{_id:"aiChatAttachmentsBar"}),Bt=t=>{const e={supportedInputs:[]};return!e||!e.supportedInputs?.length?null:n.jsx(S.AttachmentsBarProvider,{children:n.jsx(qn,{...t})})},Wn=a.ikp("div",{_id:"aiChatAttachmentsBar__List"}),Tt=t=>{const{children:e,...i}=t,r=[];return n.jsx(Wn,{children:h.maybeRender(e,r),...i})},Nn=a.ikp("div",{_id:"aiChatAttachmentsBar__Attachment"}),yt=t=>{const{attachment:e,...i}=t;return n.jsx(L.AttachmentItemProvider,{attachment:e,children:n.jsx(Nn,{...i})})},Qn=a.ikp(B.BuiltInIconRenderer,{_id:"aiChatAttachmentsBar__AttachmentIcon"}),jt=t=>{const{attachment:e}=L.useAttachmentItem(),i=e.contentType?.attachmentIcon;return i?n.jsx(Qn,{iconSettings:i,...t}):null},Vn=a.ikp("span",{_id:"aiChatAttachmentsBar__AttachmentTitle"}),Ht=t=>{const{attachment:e}=L.useAttachmentItem();return n.jsx(Vn,{children:e.title,...t})},$n=a.ikp("button",{_id:"aiChatAttachmentsBar__AttachmentDelete"}),wt=t=>{const{onClick:e,...i}=t,r=()=>{};return n.jsx($n,{"aria-label":"Remove attachment",children:n.jsx(f.CustomIcon,{iconKey:"close"}),onClick:u.composeEventHandlers(e,r),...i})},Lt=a.ikp("div",{_id:"aiChatAttachmentsBar__Actions"}),Dt=a.ikp(H.Tooltip,{_id:"aiChatAttachmentsBar__InfoTip",delayDuration:0}),Rt=a.ikp(H.Trigger,{_id:"aiChatAttachmentsBar__InfoTipIcon",children:n.jsx(f.CustomIcon,{iconKey:"info"})}),se=a.ikp(H.Arrow,{_id:"aiChatAttachmentsBar__InfoTipArrow"}),Ot=a.ikp(H.Content,{_id:"aiChatAttachmentsBar__InfoTipText",side:"bottom",sideOffset:3,align:"center",children:n.jsxs(n.Fragment,{children:[n.jsx(se,{}),"Attachments will be kept in context for the entire conversation."]})}),Un=a.ikp("div",{_id:"aiChatAttachmentsBar__Inputs"}),qt=t=>{const{children:e,...i}=t,r={supportedInputs:[]};return r?.supportedInputs?n.jsx(Un,{children:h.maybeRender(e,r.supportedInputs),...i}):null},Kn=a.ikp("button",{_id:"aiChatAttachmentsBar__Input"}),Wt=t=>{const{input:e,onClick:i,...r}=t,s={supportedInputs:[]},o=[],d=()=>{},{selectInput:c,onOpen:m}=S.useAttachmentsBar(),l=()=>{if(e.type==="FUNCTIONAL_MULTI_ATTACHMENT")return s?e.onInvoke(s,e,d,[...o]):void 0;c(e),m()};return n.jsx(Kn,{children:e.displayName,onClick:u.composeEventHandlers(i,l),...r})},zn=a.ikp(E.Root,{_id:"aiChatAttachmentsBar__Modal"}),Nt=t=>{const{onOpenChange:e,...i}=t,{selectInput:r,isOpen:s,onClose:o,selectedInput:d}=S.useAttachmentsBar(),c=m=>{m||(o(),r(null))};return n.jsx(zn,{open:s&&d!==null,onOpenChange:u.composeEventHandlers(e,c),...i})},Qt=a.ikp(E.Overlay,{_id:"aiChatAttachmentsBar__ModalOverlay"}),Vt=a.ikp(E.Content,{_id:"aiChatAttachmentsBar__ModalContent","aria-describedby":void 0}),$t=a.ikp("div",{_id:"aiChatAttachmentsBar__ModalHeader"}),Gn=a.ikp(E.Title,{_id:"aiChatAttachmentsBar__ModalHeading"}),Ut=t=>{const{selectedInput:e}=S.useAttachmentsBar(),i=`Add ${e?.displayName}`;return n.jsx(Gn,{children:i,...t})},Yn=a.ikp("span",{_id:"aiChatAttachmentsBar__ModalDescription"}),Kt=t=>{const{selectedInput:e}=S.useAttachmentsBar(),i=e?.workflowModalProps?.modalHelpText;return i?n.jsx(Yn,{children:i,...t}):null},Jn=a.ikp("div",{_id:"aiChatAttachmentsBar__ModalHelp"}),zt=t=>{const{children:e,...i}=t,{selectedInput:r}=S.useAttachmentsBar(),s=r?.workflowModalProps?.modalHelpElement;return s?n.jsx(Jn,{asChild:!e,children:e||s,...i}):null},Gt=a.ikp(E.Close,{_id:"aiChatAttachmentsBar__ModalClose",children:n.jsx(f.CustomIcon,{iconKey:"close"})}),Yt=a.ikp("div",{_id:"aiChatAttachmentsBar__ModalBody"}),Xn=a.ikp("form",{_id:"aiChatAttachmentsBar__Form"}),Jt=t=>{const{onSubmit:e,...i}=t,{form:r}=S.useAttachmentsBar();return n.jsx(Xn,{onSubmit:u.composeEventHandlers(e,r.onSubmit),...i})},Xt=a.ikp("div",{_id:"aiChatAttachmentsBar__FormTitle",role:"group"}),Zn=a.ikp("label",{_id:"aiChatAttachmentsBar__FormTitleLabel"}),Zt=t=>{const{form:e,selectedInput:i}=S.useAttachmentsBar();return n.jsx(Zn,{htmlFor:`${i?.id}-title`,children:e.labels.title,...t})},er=a.ikp("input",{_id:"aiChatAttachmentsBar__FormTitleInput"}),ei=t=>{const{onChange:e,...i}=t,{form:r,selectedInput:s}=S.useAttachmentsBar();return n.jsx(er,{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),...i})},tr=a.ikp("span",{_id:"aiChatAttachmentsBar__FormTitleError"}),ti=t=>{const{form:e}=S.useAttachmentsBar();return e.errors.title?n.jsx(tr,{"aria-live":"polite",children:e.errors.title,...t}):null},ii=a.ikp("div",{_id:"aiChatAttachmentsBar__FormTitle",role:"group"}),ir=a.ikp("label",{_id:"aiChatAttachmentsBar__FormContentLabel"}),ai=t=>{const{form:e,selectedInput:i}=S.useAttachmentsBar();return n.jsx(ir,{htmlFor:`${i?.id}-content`,children:e.labels.content,...t})},ar=a.ikp("textarea",{_id:"aiChatAttachmentsBar__FormTitleInput"}),ni=t=>{const{onChange:e,...i}=t,{form:r,selectedInput:s}=S.useAttachmentsBar();return n.jsx(ar,{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),...i,children:n.jsx(X,{maxRows:10})})},nr=a.ikp("span",{_id:"aiChatAttachmentsBar__FormContentError"}),ri=t=>{const{form:e}=S.useAttachmentsBar();return e.errors.content?n.jsx(nr,{"aria-live":"polite",children:e.errors.content,...t}):null},si=a.ikp("button",{_id:"aiChatAttachmentsBar__FormSubmitButton",children:"Upload",type:"submit"}),oi=a.ikp("div",{_id:"aiChatActionBar"}),di=a.ikp("div",{_id:"aiChat__ChatActions"}),ci=a.ikp("div",{_id:"aiChatTagline__Container"}),mi=a.ikp("span",{_id:"aiChatTagline__Text",children:"Powered by"}),li=a.ikp(Ea.default,{_id:"aiChatTagline__Logo"}),hi=a.ikp("a",{_id:"aiChatTagline__BrandName",children:"inkeep",href:"https://www.inkeep.com/",target:"_blank",rel:"noopener noreferrer"}),rr=a.ikp(H.Trigger,{_id:"aiChat__ChatAction"}),V=t=>{const{action:e,onClick:i,className:r,...s}=t,o={},{clear:d,stop:c,isLoading:m,isStreaming:l,messages:v}=P.useChat(),{conversationId:g}=P.useChat(),{aiChatSettings:p}=b.useInkeepConfig(),[A,I]=Y.useCopyToClipboard(),[_]=Y.useCopyToClipboard();if({help:!1,copy:v.length===0||!p.isCopyChatButtonVisible||m||l,share:v.length===0||!p.isShareButtonVisible||!g||!!o||m||l,clear:v.length===0||p.isViewOnly||m||l,stop:!m&&!l}[e])return null;const U={help:()=>{},copy:()=>{const ce=v.map(q=>{const z=`**${q.role==="assistant"?"AI Assistant":"User"}**`,G=h.getMessageContent(q);return`${z}
|
|
5
|
+
How can I help?`,v={parts:[{type:"text",text:r.introMessage??`${d}${m}`}],id:wa,...e,role:"assistant"};return n.jsx(se,{message:v,...i})}),nn=a.ikp("div",{_id:"aiChatMessageHeader"}),We=t=>{const{message:e}=E.useMessage();return n.jsx(nn,{"data-role":e.role,...t})},rn=a.ikp("div",{_id:"aiChatMessageLoading",children:"Thinking..."}),Ne=t=>n.jsx(rn,{...t}),sn=a.ikp("div",{_id:"aiChatMessageAvatar"}),Qe=t=>{const{message:e}=E.useMessage();return n.jsx(sn,{"data-role":e.role,...t})},on=a.ikp(re.Root,{_id:"aiChatMessageAvatarContent"}),Ve=t=>{const{message:e}=E.useMessage(),{baseSettings:i}=b.useInkeepConfig();return n.jsx(on,{"data-username":h.dataAttr(e.role==="user"&&!!i.userProperties.name),"data-role":e.role,...t})},dn=a.ikp(re.Fallback,{_id:"aiChatMessageAvatarFallback"}),$e=u.memo(t=>{const{baseSettings:e}=b.useInkeepConfig(),{message:i}=E.useMessage();return e.userProperties.name?n.jsx(dn,{"data-role":i.role,children:h.getInitials(e.userProperties.name),...t}):null}),me=a.ikp(re.Image,{_id:"aiChatMessageAvatarImage"}),Ue=u.memo(t=>{const{onLoadingStatusChange:e,...i}=t,{aiChatSettings:r,baseSettings:{userProperties:s}}=b.useInkeepConfig(),{message:o}=E.useMessage(),{aiAssistantAvatar:d}=r??{},c=typeof d=="string"?d:d?.light,m=(typeof d=="string"?d:d?.dark)??c,l=Sa.useColorModeValue(c,m),[v,g]=u.useState(l);u.useEffect(()=>{g(l)},[l]);const p=A=>{A==="error"&&g(null)};return o.role==="user"?s.name?null:r.userAvatar?n.jsx(me,{"data-type":"image",alt:"User avatar","data-role":o.role,src:r.userAvatar,...t}):n.jsx(Aa.default,{"data-type":"icon","data-role":o.role,...t}):v?n.jsx(me,{src:v,alt:"AI assistant avatar","data-type":"image","data-role":o.role,onLoadingStatusChange:C.composeEventHandlers(e,p),...i}):n.jsx(Pa.default,{"data-type":"icon","data-role":o.role,...t})}),cn=a.ikp("span",{_id:"aiChatMessageName"}),Ke=t=>{const{message:e}=E.useMessage();return n.jsx(cn,{"data-role":e.role,children:e.role==="user"?"You":"AI assistant",...t})},mn=a.ikp("div",{_id:"aiChatMessageContentWrapper"}),ze=t=>{const{message:e}=E.useMessage(),{messageButtons:i}=P.useChat(),r=i[e.id]||[];return n.jsx(mn,{"data-role":e.role,"data-has-message-buttons":h.dataAttr(!!r.length),...t})},ln=a.ikp("div",{_id:"aiChatMessageContent"}),Ge=t=>{const{message:e}=E.useMessage();return n.jsx(ln,{"data-role":e.role,...t})},hn=a.ikp("div",{_id:"aiChatMessageAttachments"}),Ye=t=>{const{message:e}=E.useMessage(),i=[];return e.role!=="user"||!i?.length?null:n.jsx(q.MessageAttachmentsProvider,{children:n.jsx(hn,{...t})})},un=a.ikp("div",{_id:"aiChatMessageAttachments__List"}),Je=t=>{const{children:e,...i}=t,r=[];return r?n.jsx(un,{children:h.maybeRender(e,r),...i}):null},Cn=a.ikp("div",{_id:"aiChatMessageAttachments__Item"}),Xe=t=>{const{attachment:e,onClick:i,...r}=t,{selectItem:s,onOpen:o}=q.useMessageAttachments(),d=()=>{s(e),o()};return n.jsx(D.AttachmentItemProvider,{attachment:e,children:n.jsx(Cn,{onClick:C.composeEventHandlers(i,d),...r})})},pn=a.ikp(y.BuiltInIconRenderer,{_id:"aiChatMessageAttachments__ItemIcon"}),Ze=t=>{const{attachment:e}=D.useAttachmentItem(),i=e.contentType?.attachmentIcon;return i?n.jsx(pn,{iconSettings:i,...t}):null},vn=a.ikp("span",{_id:"aiChatMessageAttachments__ItemTitle"}),et=t=>{const{attachment:e}=D.useAttachmentItem();return n.jsx(vn,{children:e.title,...t})},bn=a.ikp(_.Root,{_id:"aiChatMessageAttachmentsPreview"}),tt=t=>{const{onOpenChange:e,...i}=t,{selectItem:r,isOpen:s,onClose:o,selectedItem:d}=q.useMessageAttachments(),c=m=>{m||(o(),r(null))};return n.jsx(bn,{open:s&&d!==null,onOpenChange:C.composeEventHandlers(e,c),...i})},it=a.ikp(_.Overlay,{_id:"aiChatMessageAttachmentsPreview__Overlay"}),at=a.ikp(_.Content,{_id:"aiChatMessageAttachmentsPreview__Content","aria-describedby":void 0}),gn=a.ikp(_.Title,{_id:"aiChatMessageAttachmentsPreview__Header"}),nt=t=>{const{selectedItem:e}=q.useMessageAttachments();return n.jsx(gn,{children:e?.title||"Attachment",...t})},rt=a.ikp(_.Close,{_id:"aiChatMessageAttachmentsPreview__Close",children:n.jsx(f.CustomIcon,{iconKey:"close"})}),Pn=a.ikp("p",{_id:"aiChatMessageAttachmentsPreview__Body"}),st=t=>{const{selectedItem:e}=q.useMessageAttachments();return n.jsx(Pn,{children:e?.content,...t})},ot=t=>{const{text:e,componentStyles:i,...r}=t,{aiChatSettings:s}=b.useInkeepConfig(),{shouldOpenLinksInNewTab:o}=s;return n.jsx(Q.Markdown,{children:e,componentStyles:i,shouldOpenLinksInNewTab:o,...r})},dt=({name:t,props:e,componentDef:i})=>{const s=ya.useShadow()?.shadowHost,o=u.useRef(void 0),d=u.useRef(null),c=u.useRef(null),m=u.useRef(!1),[l,v]=u.useState(!1),[g,p]=u.useState(!1),A=u.useRef(i);u.useMemo(()=>{i!==A.current&&(typeof i=="function"&&typeof A.current=="function"?i.toString()!==A.current.toString()&&(A.current=i):A.current=i)},[i]);const B=A.current;return u.useEffect(()=>{o.current||(o.current=`dyn:${t}:${crypto.randomUUID()}`,v(!0))},[t]),u.useLayoutEffect(()=>{if(!B||!s||!l||!o.current)return;const k=o.current,I=document.createElement("div");return I.setAttribute("data-ikp-component",""),I.setAttribute("data-component",t),I.setAttribute("slot",k),d.current=I,m.current=!1,s.appendChild(I),p(!0),()=>{m.current=!0,p(!1),queueMicrotask(()=>{try{c.current&&(c.current.unmount(),c.current=null)}catch(M){console.debug("Ignoring unmount error:",M)}I.parentNode===s&&I.remove(),d.current=null})}},[B,s,l,t]),u.useEffect(()=>{const k=d.current;if(!k||m.current)return;const I=x=>{if(typeof x!="function"||x.length>1)return!1;try{if(typeof x=="function"&&x.constructor===Function){const O=x({});return u.isValidElement(O)}return!1}catch{return!0}};let M;if(I(B))try{const x=B;M=u.createElement(x,e||{})}catch(x){console.error("Error creating React element from component:",x);return}else if(typeof B=="function")M=B(e||{},k,null);else{console.error("Invalid component definition");return}if(u.isValidElement(M)||typeof M=="string"){if(m.current)return;c.current||(c.current=Ha.createRoot(k)),!m.current&&c.current&&c.current.render(M);return}c.current&&!m.current&&c.current.render(null)},[i,e,g]),n.jsx("slot",{name:o.current})},An=a.ikp("div",{_id:"aiChatMessagePart"}),_n=a.ikp("div",{_id:"aiChatMessageToolbar"}),ct=t=>{const{isLoading:e,messages:i}=P.useChat(),{message:r}=E.useMessage();return i.at(-1)?.id===r?.id&&e||r.role==="user"?null:n.jsx(_n,{...t})},En=a.ikp("div",{_id:"aiChatMessageAnnotationActions"}),mt=t=>{const{children:e,...i}=t,{message:r}=E.useMessage(),{messageButtons:s}=P.useChat(),o=s[r.id]||[];return n.jsx(En,{children:h.maybeRender(e,o),...i})},Fn=a.ikp("a",{_id:"aiChatMessageAnnotationAction"}),kn=a.ikp("button",{_id:"aiChatMessageAnnotationAction"}),lt=t=>{const{onClick:e,action:i,...r}=t,{handleAction:s}=te.useChatAction(i),{logEvent:o}=ne.useBaseEvents(),{conversationId:d}=P.useChat(),c=()=>{s(),o({eventName:"user_escalation_indicated",properties:{escalationType:"contact_us",conversationId:d}})},m=i.label||"Contact Support",l=n.jsxs(n.Fragment,{children:[i.icon&&n.jsx(y.BuiltInIconRenderer,{iconSettings:i.icon}),m]});return i.action.type==="open_link"?n.jsx(Fn,{href:i.action.url,target:"_blank",rel:"noopener","data-type":i.action.type,onClick:C.composeEventHandlers(e,c),children:l,...r}):n.jsx(kn,{"data-type":i.action.type,onClick:C.composeEventHandlers(e,c),children:l,...r})},In=a.ikp("button",{_id:"aiChatMessageAction"}),ht=t=>{const{action:e,onClick:i,className:r,...s}=t,{conversationId:o}=P.useChat(),{baseSettings:{onFeedback:d}}=b.useInkeepConfig(),{message:c}=E.useMessage(),{isStreaming:m,messages:l}=P.useChat(),[v,g]=J.useCopyToClipboard(),{feedback:p,submitPositiveFeedback:A,setCurrentFeedback:B,currentFeedback:k}=ee.useMessageFeedback(),{logEvent:I}=ne.useBaseEvents(),[M,x]=Fa.useSettleAction(),O=l.at(-1)?.id===c?.id,z=c.role==="assistant";if(O&&m||!z)return null;const N={copy(){g(h.getMessageContent(c)),I({eventName:"assistant_message_copied",properties:{conversationId:o}})},upvote(){A(c.id).then(()=>{x()})},downvote(){B(c.id)}},G={copy:"Copy Message",upvote:"Upvote Message",downvote:"Downvote Message"},Y={copy:n.jsx(f.CustomIcon,{iconKey:v?"messageCopied":"messageCopy"}),upvote:n.jsx(f.CustomIcon,{iconKey:M?"messageCopied":"thumbsUp"}),downvote:n.jsx(f.CustomIcon,{iconKey:"thumbsDown"})},ha={copy:{"data-copied":h.dataAttr(v)},upvote:{"data-upvoted":h.dataAttr(p[c.id]?.type==="positive")},downvote:{"data-downvoted":h.dataAttr(p[c.id]?.type==="negative"),"data-state":k===null?"closed":"open"}};return{copy:!1,upvote:!d,downvote:!d}[e]?null:n.jsx(In,{"data-action":e,...ha[e],children:Y[e],"aria-label":G[e],className:`${r} ${e}`,onClick:C.composeEventHandlers(i,N[e]),...s})},Mn=a.ikp("div",{_id:"aiChatMessageSources"}),ut=t=>{const{message:e}=E.useMessage();return e.role!=="assistant"||!e.parts.filter(r=>r.type==="data-artifact"&&r.data?.type?.toLowerCase()===he.CITATION_ARTIFACT_TYPE)?.length?null:n.jsx(Mn,{...t})},fn=a.ikp("div",{_id:"aiChatMessageSources__Header"}),Ct=t=>n.jsx(fn,{children:"Sources",...t}),Sn=a.ikp("div",{_id:"aiChatMessageSources__List"}),pt=t=>{const{message:e}=E.useMessage(),{children:i,...r}=t,{baseSettings:{transformSource:s,organizationDisplayName:o},aiChatSettings:{shouldOpenLinksInNewTab:d},searchSettings:{tabs:c}}=b.useInkeepConfig();if(e.role!=="assistant")return null;const m=e.parts.filter(g=>g.type==="data-artifact"&&g.data?.type?.toLowerCase()===he.CITATION_ARTIFACT_TYPE);if(!m?.length)return null;const l=new Map,v=m.filter(g=>{const p=g.data.artifactSummary.url;return!p||l.has(p)?!1:(l.set(p,!0),!0)}).map(g=>{const p=g.data,A={id:p?.artifactId,title:p?.artifactSummary?.title||p?.name,url:p?.artifactSummary?.url||"",description:"",breadcrumbs:[],type:p?.artifactSummary?.record_type,contentType:p?.artifactType,tag:p?.artifactType},k=(s??(M=>({...M,shouldOpenInNewTab:d,icon:ja.getIcon(M)})))(A,"chatSourceItem",{organizationDisplayName:o,tabs:c}),I=k.shouldOpenInNewTab!==void 0?k.shouldOpenInNewTab:d;return{...k,isExternal:I}});return n.jsx(Sn,{children:h.maybeRender(i,v),...r})},xn=a.ikp(_a.LinkWithQueryParams,{_id:"aiChatMessageSourceItem"}),vt=t=>{const{source:e,onClick:i,...r}=t,{logEvent:s}=ne.useBaseEvents(),{conversationId:o}=P.useChat(),d=()=>{s({eventName:"assistant_source_item_clicked",properties:{conversationId:o,link:e}})};return n.jsx(j.SourceItemProvider,{source:e,children:n.jsx(xn,{"data-type":e.type,appendToUrl:e.appendToUrl,isExternal:e.isExternal,"data-breadcrumbs":!!e.breadcrumbs?.length,onClick:C.composeEventHandlers(i,d),...r})})},Bn=a.ikp("div",{_id:"aiChatMessageSourceItem__Breadcrumbs"}),bt=t=>{const{source:e}=j.useSourceItem();return e.breadcrumbs?.length?n.jsx(Bn,{"data-type":e.type,...t}):null},Tn=a.ikp(f.CustomIcon,{_id:"aiChatMessageSourceItem__BreadcrumbIcon",iconKey:"breadcrumbSeparator"}),yn=a.ikp(y.BuiltInIconRenderer,{_id:"aiChatMessageSourceItem__Icon"}),gt=t=>{const{source:e}=j.useSourceItem();return n.jsx(yn,{iconSettings:e.icon,"data-type":e.type,...t})},jn=a.ikp("span",{_id:"aiChatMessageSourceItem__Title"}),Pt=t=>{const{source:e}=j.useSourceItem();return n.jsx(jn,{"data-type":e.type,children:e.title,...t})},Hn=a.ikp("span",{_id:"aiChatMessageSourceItem__Tag"}),At=t=>{const{source:e}=j.useSourceItem();return n.jsx(Hn,{"data-type":e.type,...t})},wn=a.ikp("span",{_id:"aiChatMessageSourceItem__Description"}),_t=t=>{const{source:e}=j.useSourceItem(),{children:i,...r}=t,s=u.useMemo(()=>e.description?Ma.highlightEmphasis(e.description):[],[e.description]);return s.length?n.jsx(wn,{"data-type":e.type,children:h.maybeRender(i,s),...r}):null},Ln=a.ikp("span",{_id:"aiChatMessageSourceItem__DescriptionPart"}),Et=t=>{const{part:e,...i}=t,{source:r}=j.useSourceItem();return typeof e=="string"?e:n.jsx(Ln,{"data-type":r.type,children:e.content,"data-highlighted":h.dataAttr(e.highlighted),...i})},Dn=a.ikp(f.CustomIcon,{_id:"aiChatMessageSourceItem__Indicator"}),Ft=t=>{const{source:e}=j.useSourceItem();return n.jsx(Dn,{iconKey:e.isExternal?"openLinkInNewTab":"openLinkInSameTab",...t})},kt=a.ikp("div",{_id:"aiChatFooter"}),It=a.ikp("div",{_id:"aiChatInput__Fieldset"}),Mt=a.ikp("div",{_id:"aiChatInput__Group"}),Rn=a.ikp("textarea",{_id:"aiChatInput"}),ft=u.forwardRef(({onChange:t,onKeyDown:e,...i},r)=>{const{handleInputChange:s,handleInputKeyDown:o,input:d,error:c,shouldAutoFocusInput:m,inputRef:l}=P.useChat(),{aiChatSettings:v}=b.useInkeepConfig(),g=ie.useComposedRefs(r,l);return Ta.useWidgetAutoFocus("chat",l,m),n.jsx(Rn,{asChild:!0,ref:g,maxLength:99999,placeholder:v.placeholder,value:d,onChange:C.composeEventHandlers(t,s),onKeyDown:C.composeEventHandlers(e,o),disabled:!!c||v.isViewOnly,...i,children:n.jsx(Z,{})})}),On=a.ikp("button",{_id:"aiChatInput__SendButton"}),St=t=>{const{handleSubmit:e,isSubmitDisabled:i,error:r}=P.useChat(),{aiChatSettings:s}=b.useInkeepConfig(),{onClick:o,...d}=t;return n.jsx(On,{onClick:C.composeEventHandlers(o,()=>e()),"aria-label":"Send message",disabled:i||!!r||s.isViewOnly,...d})},xt=a.ikp(f.CustomIcon,{_id:"aiChatInput__SendButtonIcon",iconKey:"chatSubmit"}),qn=a.ikp("div",{_id:"aiChatAttachmentsBar"}),Bt=t=>{const e={supportedInputs:[]};return!e||!e.supportedInputs?.length?null:n.jsx(S.AttachmentsBarProvider,{children:n.jsx(qn,{...t})})},Wn=a.ikp("div",{_id:"aiChatAttachmentsBar__List"}),Tt=t=>{const{children:e,...i}=t,r=[];return n.jsx(Wn,{children:h.maybeRender(e,r),...i})},Nn=a.ikp("div",{_id:"aiChatAttachmentsBar__Attachment"}),yt=t=>{const{attachment:e,...i}=t;return n.jsx(D.AttachmentItemProvider,{attachment:e,children:n.jsx(Nn,{...i})})},Qn=a.ikp(y.BuiltInIconRenderer,{_id:"aiChatAttachmentsBar__AttachmentIcon"}),jt=t=>{const{attachment:e}=D.useAttachmentItem(),i=e.contentType?.attachmentIcon;return i?n.jsx(Qn,{iconSettings:i,...t}):null},Vn=a.ikp("span",{_id:"aiChatAttachmentsBar__AttachmentTitle"}),Ht=t=>{const{attachment:e}=D.useAttachmentItem();return n.jsx(Vn,{children:e.title,...t})},$n=a.ikp("button",{_id:"aiChatAttachmentsBar__AttachmentDelete"}),wt=t=>{const{onClick:e,...i}=t,r=()=>{};return n.jsx($n,{"aria-label":"Remove attachment",children:n.jsx(f.CustomIcon,{iconKey:"close"}),onClick:C.composeEventHandlers(e,r),...i})},Lt=a.ikp("div",{_id:"aiChatAttachmentsBar__Actions"}),Dt=a.ikp(L.Tooltip,{_id:"aiChatAttachmentsBar__InfoTip",delayDuration:0}),Rt=a.ikp(L.Trigger,{_id:"aiChatAttachmentsBar__InfoTipIcon",children:n.jsx(f.CustomIcon,{iconKey:"info"})}),oe=a.ikp(L.Arrow,{_id:"aiChatAttachmentsBar__InfoTipArrow"}),Ot=a.ikp(L.Content,{_id:"aiChatAttachmentsBar__InfoTipText",side:"bottom",sideOffset:3,align:"center",children:n.jsxs(n.Fragment,{children:[n.jsx(oe,{}),"Attachments will be kept in context for the entire conversation."]})}),Un=a.ikp("div",{_id:"aiChatAttachmentsBar__Inputs"}),qt=t=>{const{children:e,...i}=t,r={supportedInputs:[]};return r?.supportedInputs?n.jsx(Un,{children:h.maybeRender(e,r.supportedInputs),...i}):null},Kn=a.ikp("button",{_id:"aiChatAttachmentsBar__Input"}),Wt=t=>{const{input:e,onClick:i,...r}=t,s={supportedInputs:[]},o=[],d=()=>{},{selectInput:c,onOpen:m}=S.useAttachmentsBar(),l=()=>{if(e.type==="FUNCTIONAL_MULTI_ATTACHMENT")return s?e.onInvoke(s,e,d,[...o]):void 0;c(e),m()};return n.jsx(Kn,{children:e.displayName,onClick:C.composeEventHandlers(i,l),...r})},zn=a.ikp(_.Root,{_id:"aiChatAttachmentsBar__Modal"}),Nt=t=>{const{onOpenChange:e,...i}=t,{selectInput:r,isOpen:s,onClose:o,selectedInput:d}=S.useAttachmentsBar(),c=m=>{m||(o(),r(null))};return n.jsx(zn,{open:s&&d!==null,onOpenChange:C.composeEventHandlers(e,c),...i})},Qt=a.ikp(_.Overlay,{_id:"aiChatAttachmentsBar__ModalOverlay"}),Vt=a.ikp(_.Content,{_id:"aiChatAttachmentsBar__ModalContent","aria-describedby":void 0}),$t=a.ikp("div",{_id:"aiChatAttachmentsBar__ModalHeader"}),Gn=a.ikp(_.Title,{_id:"aiChatAttachmentsBar__ModalHeading"}),Ut=t=>{const{selectedInput:e}=S.useAttachmentsBar(),i=`Add ${e?.displayName}`;return n.jsx(Gn,{children:i,...t})},Yn=a.ikp("span",{_id:"aiChatAttachmentsBar__ModalDescription"}),Kt=t=>{const{selectedInput:e}=S.useAttachmentsBar(),i=e?.workflowModalProps?.modalHelpText;return i?n.jsx(Yn,{children:i,...t}):null},Jn=a.ikp("div",{_id:"aiChatAttachmentsBar__ModalHelp"}),zt=t=>{const{children:e,...i}=t,{selectedInput:r}=S.useAttachmentsBar(),s=r?.workflowModalProps?.modalHelpElement;return s?n.jsx(Jn,{asChild:!e,children:e||s,...i}):null},Gt=a.ikp(_.Close,{_id:"aiChatAttachmentsBar__ModalClose",children:n.jsx(f.CustomIcon,{iconKey:"close"})}),Yt=a.ikp("div",{_id:"aiChatAttachmentsBar__ModalBody"}),Xn=a.ikp("form",{_id:"aiChatAttachmentsBar__Form"}),Jt=t=>{const{onSubmit:e,...i}=t,{form:r}=S.useAttachmentsBar();return n.jsx(Xn,{onSubmit:C.composeEventHandlers(e,r.onSubmit),...i})},Xt=a.ikp("div",{_id:"aiChatAttachmentsBar__FormTitle",role:"group"}),Zn=a.ikp("label",{_id:"aiChatAttachmentsBar__FormTitleLabel"}),Zt=t=>{const{form:e,selectedInput:i}=S.useAttachmentsBar();return n.jsx(Zn,{htmlFor:`${i?.id}-title`,children:e.labels.title,...t})},er=a.ikp("input",{_id:"aiChatAttachmentsBar__FormTitleInput"}),ei=t=>{const{onChange:e,...i}=t,{form:r,selectedInput:s}=S.useAttachmentsBar();return n.jsx(er,{name:"title",value:r.data.title,id:`${s?.id}-title`,"data-invalid":h.dataAttr(!!r.errors.title),"aria-invalid":!!r.errors.title,onChange:C.composeEventHandlers(e,r.onChange),...i})},tr=a.ikp("span",{_id:"aiChatAttachmentsBar__FormTitleError"}),ti=t=>{const{form:e}=S.useAttachmentsBar();return e.errors.title?n.jsx(tr,{"aria-live":"polite",children:e.errors.title,...t}):null},ii=a.ikp("div",{_id:"aiChatAttachmentsBar__FormTitle",role:"group"}),ir=a.ikp("label",{_id:"aiChatAttachmentsBar__FormContentLabel"}),ai=t=>{const{form:e,selectedInput:i}=S.useAttachmentsBar();return n.jsx(ir,{htmlFor:`${i?.id}-content`,children:e.labels.content,...t})},ar=a.ikp("textarea",{_id:"aiChatAttachmentsBar__FormTitleInput"}),ni=t=>{const{onChange:e,...i}=t,{form:r,selectedInput:s}=S.useAttachmentsBar();return n.jsx(ar,{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:C.composeEventHandlers(e,r.onChange),...i,children:n.jsx(Z,{maxRows:10})})},nr=a.ikp("span",{_id:"aiChatAttachmentsBar__FormContentError"}),ri=t=>{const{form:e}=S.useAttachmentsBar();return e.errors.content?n.jsx(nr,{"aria-live":"polite",children:e.errors.content,...t}):null},si=a.ikp("button",{_id:"aiChatAttachmentsBar__FormSubmitButton",children:"Upload",type:"submit"}),oi=a.ikp("div",{_id:"aiChatActionBar"}),di=a.ikp("div",{_id:"aiChat__ChatActions"}),ci=a.ikp("div",{_id:"aiChatTagline__Container"}),mi=a.ikp("span",{_id:"aiChatTagline__Text",children:"Powered by"}),li=a.ikp(Ea.default,{_id:"aiChatTagline__Logo"}),hi=a.ikp("a",{_id:"aiChatTagline__BrandName",children:"inkeep",href:"https://www.inkeep.com/",target:"_blank",rel:"noopener noreferrer"}),rr=a.ikp(L.Trigger,{_id:"aiChat__ChatAction"}),U=t=>{const{action:e,onClick:i,className:r,...s}=t,o={},{clear:d,stop:c,isLoading:m,isStreaming:l,messages:v}=P.useChat(),{conversationId:g}=P.useChat(),{aiChatSettings:p}=b.useInkeepConfig(),[A,B]=J.useCopyToClipboard(),[k]=J.useCopyToClipboard();if({help:!1,copy:v.length===0||!p.isCopyChatButtonVisible||m||l,share:v.length===0||!p.isShareButtonVisible||!g||!!o||m||l,clear:v.length===0||p.isViewOnly||m||l,stop:!m&&!l}[e])return null;const O={help:()=>{},copy:()=>{const ce=v.map(N=>{const G=`**${N.role==="assistant"?"AI Assistant":"User"}**`,Y=h.getMessageContent(N);return`${G}
|
|
6
6
|
|
|
7
|
-
${
|
|
7
|
+
${Y}`}).join(`
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
`);I(ce)},share:async()=>{},clear:d,stop:c},K={copy:A,share:_};return n.jsx(H.Tooltip,{delayDuration:0,open:K[e],children:n.jsx(rr,{"data-type":e,"data-copied":h.dataAttr(A||_),className:`${r} ${e}`,children:n.jsx(oe,{action:e}),onClick:u.composeEventHandlers(i,U[e]),...s})})},sr=a.ikp("span",{_id:"aiChat__ChatActionLabel"}),oe=t=>{const{action:e,...i}=t,{aiChatSettings:r}=b.useInkeepConfig(),s=r.toolbarButtonLabels??{},o={help:s.getHelp??"Get Help",copy:s.copyChat??"Copy",share:s.share??"Share",clear:s.clear??"Clear",stop:s.stop??"Stop"};return n.jsx(sr,{children:o[e],...i})},or=a.ikp(H.TooltipContent,{_id:"aiChat__ChatActionFeeback"}),ui=t=>{const{action:e,children:i,...r}=t,s={copy:"Copied!",share:"Link copied!"};return n.jsxs(or,{sideOffset:5,...r,children:[n.jsx(H.Arrow,{}),i||s[e]]})},dr=a.ikp(j.Root,{_id:"aiChatHelpActions"}),Ci=t=>{const{children:e,...i}=t,{aiChatSettings:r}=b.useInkeepConfig(),{getHelpOptions:s}=r;if(!s||(s??[]).length===0)return null;const{_pinned:o,_unpinned:d}=s.reduce((v,g)=>{const p=g.isPinnedToToolbar?"_pinned":"_unpinned";return{...v,[p]:[...v[p],g]}},{_pinned:[],_unpinned:[]}),c=d.length===1?[...o,d[0]]:o,m=d.length===1?[]:d,l=J.useHelpMenuState();return n.jsx(J.HelpMenuProvider,{value:l,children:n.jsx(dr,{open:l.open,onOpenChange:l.setOpen,children:h.maybeRender(e,{pinned:c,unpinned:m}),...i})})},cr=a.ikp(V,{_id:"aiChatHelpAction",action:"help"}),mr=a.ikp("a",{_id:"aiChatHelpAction",target:"_blank",rel:"noreferrer"}),pi=t=>{const{action:e,onClick:i,...r}=t,{handleAction:s,logHelpAction:o}=ee.useChatAction(e),d=e.action.type,c={"aria-label":e.name,"data-name":e.name,children:e.name,onClick:u.composeEventHandlers(i,()=>{s(),o()}),...r};return d==="open_link"?n.jsx(mr,{href:e.action.url,...c}):n.jsx(cr,{...c})},lr=a.ikp(j.Trigger,{_id:"aiChatHelpActions__Trigger"}),vi=C.memo(t=>{const{aiChatSettings:e}=b.useInkeepConfig();return n.jsx(V,{action:"help",...t,asChild:!0,children:n.jsx(lr,{children:e.toolbarButtonLabels?.getHelp??"Get Help"})})}),hr=a.ikp(j.Content,{_id:"aiChatHelpActions__Menu"}),bi=t=>n.jsx(hr,{side:"top",sideOffset:8,align:"center",alignOffset:-10,...t}),gi=a.ikp(j.Arrow,{_id:"aiChatHelpActions__MenuArrow"}),Pi=t=>{const{action:e,onClick:i,...r}=t,{handleAction:s,logHelpAction:o}=ee.useChatAction(e),{setOpen:d}=J.useHelpMenu(),c=()=>{s({onOpenForm:()=>d(!1)}),o()},m=e.action.type,l=a.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(i,c)});return n.jsx(l,{...r})},ur=a.ikp(B.BuiltInIconRenderer,{_id:"aiChatHelpActions_MenuItemIcon"}),Ai=t=>{const{action:e,...i}=t;return e.icon?n.jsx(ur,{iconSettings:e.icon,...i}):null},Cr=a.ikp(E.Root,{_id:"aiChatFeedbackModal"}),_i=t=>{const{onOpenChange:e,...i}=t,{currentFeedback:r,setCurrentFeedback:s}=Z.useMessageFeedback();return n.jsx(Cr,{open:r!==null,onOpenChange:u.composeEventHandlers(e,()=>s(null)),...i})},Ei=a.ikp(E.Overlay,{_id:"aiChatFeedbackModal__Overlay"}),Fi=a.ikp(E.Content,{_id:"aiChatFeedbackModal__Content","aria-describedby":void 0}),ki=a.ikp(E.Title,{_id:"aiChatFeedbackModal__Header",children:"Help improve my answers!"}),Ii=a.ikp(E.Close,{_id:"aiChatFeedbackModal__Close",children:n.jsx(f.CustomIcon,{iconKey:"close"})}),Mi=a.ikp("div",{_id:"aiChatFeedbackModal__Body"}),pr=a.ikp("form",{_id:"aiChatFeedbackForm"}),fi=t=>{const{onSubmit:e,...i}=t,{submitNegativeFeedback:r,currentFeedback:s,setCurrentFeedback:o}=Z.useMessageFeedback(),d=c=>{c.preventDefault();const m=c.target,l=new FormData(m),v=Object.fromEntries(l.entries());s&&(r(s,v),o(null))};return n.jsx(pr,{onSubmit:u.composeEventHandlers(e,d),...i})},vr=a.ikp("div",{_id:"aiChatFeedbackItem"}),Si=t=>{const{name:e,...i}=t;return n.jsx(N.FeedbackItemProvider,{name:e,children:n.jsx(vr,{...i})})},br=a.ikp(Q.Root,{_id:"aiChatFeedbackItem__Checkbox"}),xi=t=>{const{name:e,focusItem:i}=N.useFeedbackItem(),{onCheckedChange:r,...s}=t,o=d=>{d&&i?.current?.focus()};return n.jsx(br,{id:`feedback-${e}`,name:e,onCheckedChange:u.composeEventHandlers(r,o),...s})},Bi=a.ikp(Q.Indicator,{_id:"aiChatFeedbackItem__CheckboxIndicator",children:n.jsx(le.CheckboxIcon,{})}),gr=a.ikp("label",{_id:"aiChatFeedbackItem__Label"}),Ti=t=>{const{name:e}=N.useFeedbackItem(),i={unrelated_response:"Didn't answer my question",inaccurate_statement:"Inaccurate statement",inaccurate_code_snippet:"Inaccurate code snippet",irrelevant_citations:"Irrelevant citations"};return n.jsx(gr,{htmlFor:`feedback-${e}`,children:i[e],...t})},Pr=a.ikp("textarea",{_id:"aiChatFeedbackItem__Description",placeholder:"Please describe"}),yi=t=>{const{name:e,focusItem:i}=N.useFeedbackItem();return n.jsx(Pr,{ref:i,name:`${e}:description`,...t})},ji=a.ikp("button",{_id:"aiChatFeedbackForm__SubmitButton",children:"Submit",type:"submit"}),Ar=a.ikp("div",{_id:"aiChatForm__Wrapper"}),Hi=t=>{const{form:e}=k.useChatForm();return e?n.jsx(Ar,{...t}):null},_r=a.ikp("form",{_id:"aiChatForm"}),wi=t=>{const{onSubmit:e,...i}=t,{conversationId:r,messages:s}=P.useChat(),{handleSubmit:o,isSuccess:d}=k.useChatForm();return d?null:n.jsx(_r,{onSubmit:u.composeEventHandlers(e,c=>o(c,{id:r,messages:s})),...i})},Er=a.ikp("button",{_id:"aiChatForm__Close",children:n.jsx(f.CustomIcon,{iconKey:"close"})}),Li=t=>{const{onClick:e,...i}=t,{closeForm:r}=k.useChatForm();return n.jsx(Er,{onClick:u.composeEventHandlers(e,r),...i})},Di=a.ikp("div",{_id:"aiChatForm__Header"}),Fr=a.ikp("h2",{_id:"aiChatForm__Heading"}),Ri=t=>{const{form:e}=k.useChatForm();return e?.heading?n.jsx(Fr,{children:e.heading,...t}):null},kr=a.ikp(W.Markdown,{_id:"aiChatForm__Description"}),Oi=t=>{const{form:e}=k.useChatForm();return e?.description?n.jsx(kr,{children:e.description,...t}):null},Ir=a.ikp("div",{_id:"aiChatForm__Content"}),qi=t=>{const{children:e,...i}=t,{getFields:r}=k.useChatForm(),{conversationId:s}=P.useChat(),o=r(s)||[];return n.jsx(Ir,{children:h.maybeRender(e,o),...i})},Mr=a.ikp("div",{_id:"aiChatForm__Field"}),Wi=t=>{const{field:e,autoFocus:i,...r}=t,{control:s,errors:o}=k.useChatForm();return n.jsx(Ia.Controller,{name:e.name,control:s,rules:{required:e.isRequired?`${e.label} is required.`:void 0},render:({field:d})=>{const c=d.value!==void 0||e.inputType==="file";return n.jsx(y.FormFieldProvider,{"data-invalid":h.dataAttr(!!o[e.name]),field:e,fieldProps:d,autoFocus:i,children:c&&n.jsx(Mr,{"data-input-type":e.inputType,"data-hidden":h.dataAttr(e.isHidden),...r})})}})},fr=a.ikp("label",{_id:"aiChatForm__FieldLabel"}),Ni=t=>{const{field:e}=y.useFormField();return n.jsx(fr,{"data-required":h.dataAttr(e.isRequired),htmlFor:e.name,children:e.label,...t})},Sr=a.ikp("input",{_id:"aiChatForm__FieldText",type:"text"}),$=t=>{const{field:e,error:i,fieldProps:{onChange:r,onBlur:s,...o},autoFocus:d}=y.useFormField(),{onChange:c,onBlur:m,...l}=t;return n.jsx(Sr,{id:e.name,autoFocus:d,placeholder:"placeholder"in e?e.placeholder:void 0,"data-invalid":h.dataAttr(!!i),onChange:u.composeEventHandlers(c,r),onBlur:u.composeEventHandlers(m,s),...o,...l})},Qi=a.ikp($,{_id:"aiChatForm__FieldEmail",type:"email"}),xr=a.ikp("input",{_id:"aiChatForm__FieldFile",type:"file",multiple:!0}),Vi=t=>{const{field:e,error:i,fieldProps:{value:r,onChange:s,onBlur:o,...d},autoFocus:c}=y.useFormField(),{onChange:m,onBlur:l,...v}=t,g=p=>{const A=p.target.files;s(A)};return n.jsx(xr,{id:e.name,autoFocus:c,"data-value":r,"data-invalid":h.dataAttr(!!i),...v,...d,onChange:u.composeEventHandlers(m,g),onBlur:u.composeEventHandlers(l,o)})},$i=a.ikp($,{_id:"aiChatForm__FieldTextArea",type:"textarea",asChild:!0,children:n.jsx(X,{maxRows:8})}),Br=a.ikp(Q.Root,{_id:"aiChatForm__FieldCheckbox"}),Ui=t=>{const{field:e,error:i,fieldProps:r,autoFocus:s}=y.useFormField(),{onCheckedChange:o,...d}=t;return n.jsx(Br,{id:e.name,name:e.name,autoFocus:s,"data-invalid":h.dataAttr(!!i),checked:r.value,onCheckedChange:u.composeEventHandlers(o,r.onChange),...d})},Ki=a.ikp(Q.Indicator,{_id:"aiChatForm__FieldCheckboxIndicator",children:n.jsx(le.CheckboxIcon,{})}),Tr=a.ikp(x.Root,{_id:"aiChatForm__FieldSelect"}),zi=t=>{const{field:e,error:i,fieldProps:r}=y.useFormField(),{onValueChange:s,...o}=t;return n.jsx(Tr,{name:e.name,"data-invalid":h.dataAttr(!!i),value:r.value,onValueChange:u.composeEventHandlers(s,r.onChange),...o})},Gi=a.ikp(x.Trigger,{_id:"aiChatForm__FieldSelect__Trigger"}),yr=a.ikp(x.Value,{_id:"aiChatForm__FieldSelect__Value"}),Yi=t=>{const{field:e}=y.useFormField();return n.jsx(yr,{placeholder:"placeholder"in e?e.placeholder:void 0,...t})},Ji=a.ikp(x.Icon,{_id:"aiChatForm__FieldSelect__Icon",asChild:!0,children:n.jsx(B.BuiltInIconRenderer,{iconSettings:{builtIn:"LuChevronDown"}})}),Xi=a.ikp(x.Content,{_id:"aiChatForm__FieldSelect__Content",position:"popper"}),Zi=a.ikp(x.Viewport,{_id:"aiChatForm__FieldSelect__Viewport"}),ea=a.ikp(x.Item,{_id:"aiChatForm__FieldSelect__Item"}),ta=a.ikp(x.ItemText,{_id:"aiChatForm__FieldSelect__ItemText"}),ia=a.ikp(x.ItemIndicator,{_id:"aiChatForm__FieldSelect__ItemIndicator",asChild:!0,children:n.jsx(B.BuiltInIconRenderer,{iconSettings:{builtIn:"LuCheck"}})}),jr=a.ikp("span",{_id:"aiChatForm__FieldError"}),aa=t=>{const{error:e}=y.useFormField();return e?n.jsx(jr,{children:e.message?.toString(),...t}):null},Hr=a.ikp("span",{_id:"aiChatForm__Error"}),na=t=>{const{formError:e}=k.useChatForm();return e?n.jsx(Hr,{children:e.message,...t}):null},ra=a.ikp("div",{_id:"aiChatForm__Footer"}),wr=a.ikp("button",{_id:"aiChatForm__Cancel",children:"Cancel",type:"button"}),sa=t=>{const{onClick:e,...i}=t,{closeForm:r}=k.useChatForm();return n.jsx(wr,{onClick:u.composeEventHandlers(e,r),...i})},Lr=a.ikp("button",{_id:"aiChatForm__Submit",children:"Submit",type:"submit"}),oa=t=>{const{onClick:e,...i}=t,{isSubmitting:r,form:s}=k.useChatForm(),o=s?.buttons.submit.label||"Submit";return n.jsx(Lr,{disabled:r,...i,children:o})},Dr=a.ikp("div",{_id:"aiChatForm__Success"}),da=t=>{const{isSuccess:e}=k.useChatForm();return e?n.jsx(Dr,{...t}):null},Rr=a.ikp("h2",{_id:"aiChatForm__SuccessHeading"}),ca=t=>{const{form:e}=k.useChatForm();return n.jsx(Rr,{children:e?.successView?.heading,...t})},Or=a.ikp(W.Markdown,{_id:"aiChatForm__SuccessMessage"}),ma=t=>{const{form:e}=k.useChatForm();return n.jsx(Or,{children:e?.successView?.message,...t})},qr=a.ikp("button",{_id:"aiChatForm__SuccessButton"}),la=t=>{const{onClick:e,...i}=t,{form:r,closeForm:s}=k.useChatForm(),o=r?.successView?.doneButton;if(!o)return null;const d=o.icon&&n.jsx(B.BuiltInIconRenderer,{iconSettings:o.icon}),c=o.label;return n.jsx(qr,{onClick:u.composeEventHandlers(e,s),children:n.jsxs(n.Fragment,{children:[d,c]}),...i})};exports.Provider=P.ChatProvider;exports.ActionBar=oi;exports.Actions=di;exports.AttachmentsBar=Bt;exports.AttachmentsBarActions=Lt;exports.AttachmentsBarAttachment=yt;exports.AttachmentsBarAttachmentDelete=wt;exports.AttachmentsBarAttachmentIcon=jt;exports.AttachmentsBarAttachmentTitle=Ht;exports.AttachmentsBarForm=Jt;exports.AttachmentsBarFormContent=ii;exports.AttachmentsBarFormContentError=ri;exports.AttachmentsBarFormContentInput=ni;exports.AttachmentsBarFormContentLabel=ai;exports.AttachmentsBarFormSubmitButton=si;exports.AttachmentsBarFormTitle=Xt;exports.AttachmentsBarFormTitleError=ti;exports.AttachmentsBarFormTitleInput=ei;exports.AttachmentsBarFormTitleLabel=Zt;exports.AttachmentsBarInfoTip=Dt;exports.AttachmentsBarInfoTipArrow=se;exports.AttachmentsBarInfoTipIcon=Rt;exports.AttachmentsBarInfoTipText=Ot;exports.AttachmentsBarInput=Wt;exports.AttachmentsBarInputs=qt;exports.AttachmentsBarList=Tt;exports.AttachmentsBarModal=Nt;exports.AttachmentsBarModalBody=Yt;exports.AttachmentsBarModalClose=Gt;exports.AttachmentsBarModalContent=Vt;exports.AttachmentsBarModalDescription=Kt;exports.AttachmentsBarModalHeader=$t;exports.AttachmentsBarModalHeading=Ut;exports.AttachmentsBarModalHelp=zt;exports.AttachmentsBarModalOverlay=Qt;exports.ChatAction=V;exports.ChatActionFeedback=ui;exports.ChatActionLabel=oe;exports.ChatHelpAction=pi;exports.Content=ge;exports.ContentScrollArea=Pe;exports.ContentScrollAreaCorner=Fe;exports.ContentScrollAreaScrollbar=_e;exports.ContentScrollAreaThumb=Ee;exports.ContentScrollAreaViewport=Ae;exports.Disclaimer=Ie;exports.DisclaimerArrow=Be;exports.DisclaimerContent=Se;exports.DisclaimerLabel=Me;exports.DisclaimerText=xe;exports.DisclaimerTrigger=fe;exports.DynamicComponent=dt;exports.EmbeddedChatPrimitiveActionBar=oi;exports.EmbeddedChatPrimitiveActions=di;exports.EmbeddedChatPrimitiveAttachmentsBar=Bt;exports.EmbeddedChatPrimitiveAttachmentsBarActions=Lt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachment=yt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentDelete=wt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentIcon=jt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentTitle=Ht;exports.EmbeddedChatPrimitiveAttachmentsBarForm=Jt;exports.EmbeddedChatPrimitiveAttachmentsBarFormContent=ii;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentError=ri;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentInput=ni;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentLabel=ai;exports.EmbeddedChatPrimitiveAttachmentsBarFormSubmitButton=si;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitle=Xt;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleError=ti;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleInput=ei;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleLabel=Zt;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTip=Dt;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipArrow=se;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipIcon=Rt;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipText=Ot;exports.EmbeddedChatPrimitiveAttachmentsBarInput=Wt;exports.EmbeddedChatPrimitiveAttachmentsBarInputs=qt;exports.EmbeddedChatPrimitiveAttachmentsBarList=Tt;exports.EmbeddedChatPrimitiveAttachmentsBarModal=Nt;exports.EmbeddedChatPrimitiveAttachmentsBarModalBody=Yt;exports.EmbeddedChatPrimitiveAttachmentsBarModalClose=Gt;exports.EmbeddedChatPrimitiveAttachmentsBarModalContent=Vt;exports.EmbeddedChatPrimitiveAttachmentsBarModalDescription=Kt;exports.EmbeddedChatPrimitiveAttachmentsBarModalHeader=$t;exports.EmbeddedChatPrimitiveAttachmentsBarModalHeading=Ut;exports.EmbeddedChatPrimitiveAttachmentsBarModalHelp=zt;exports.EmbeddedChatPrimitiveAttachmentsBarModalOverlay=Qt;exports.EmbeddedChatPrimitiveChatAction=V;exports.EmbeddedChatPrimitiveChatActionFeedback=ui;exports.EmbeddedChatPrimitiveChatActionLabel=oe;exports.EmbeddedChatPrimitiveChatHelpAction=pi;exports.EmbeddedChatPrimitiveContent=ge;exports.EmbeddedChatPrimitiveContentScrollArea=Pe;exports.EmbeddedChatPrimitiveContentScrollAreaCorner=Fe;exports.EmbeddedChatPrimitiveContentScrollAreaScrollbar=_e;exports.EmbeddedChatPrimitiveContentScrollAreaThumb=Ee;exports.EmbeddedChatPrimitiveContentScrollAreaViewport=Ae;exports.EmbeddedChatPrimitiveDisclaimer=Ie;exports.EmbeddedChatPrimitiveDisclaimerArrow=Be;exports.EmbeddedChatPrimitiveDisclaimerContent=Se;exports.EmbeddedChatPrimitiveDisclaimerLabel=Me;exports.EmbeddedChatPrimitiveDisclaimerText=xe;exports.EmbeddedChatPrimitiveDisclaimerTrigger=fe;exports.EmbeddedChatPrimitiveDynamicComponent=dt;exports.EmbeddedChatPrimitiveExampleQuestion=He;exports.EmbeddedChatPrimitiveExampleQuestionButton=we;exports.EmbeddedChatPrimitiveExampleQuestions=Te;exports.EmbeddedChatPrimitiveExampleQuestionsLabel=ye;exports.EmbeddedChatPrimitiveExampleQuestionsList=je;exports.EmbeddedChatPrimitiveFeedbackForm=fi;exports.EmbeddedChatPrimitiveFeedbackItem=Si;exports.EmbeddedChatPrimitiveFeedbackItemCheckbox=xi;exports.EmbeddedChatPrimitiveFeedbackItemCheckboxIndicator=Bi;exports.EmbeddedChatPrimitiveFeedbackItemDescription=yi;exports.EmbeddedChatPrimitiveFeedbackItemLabel=Ti;exports.EmbeddedChatPrimitiveFeedbackModal=_i;exports.EmbeddedChatPrimitiveFeedbackModalBody=Mi;exports.EmbeddedChatPrimitiveFeedbackModalClose=Ii;exports.EmbeddedChatPrimitiveFeedbackModalContent=Fi;exports.EmbeddedChatPrimitiveFeedbackModalHeader=ki;exports.EmbeddedChatPrimitiveFeedbackModalOverlay=Ei;exports.EmbeddedChatPrimitiveFeedbackSubmitButton=ji;exports.EmbeddedChatPrimitiveFooter=kt;exports.EmbeddedChatPrimitiveForm=wi;exports.EmbeddedChatPrimitiveFormCancel=sa;exports.EmbeddedChatPrimitiveFormClose=Li;exports.EmbeddedChatPrimitiveFormContent=qi;exports.EmbeddedChatPrimitiveFormDescription=Oi;exports.EmbeddedChatPrimitiveFormError=na;exports.EmbeddedChatPrimitiveFormField=Wi;exports.EmbeddedChatPrimitiveFormFieldCheckbox=Ui;exports.EmbeddedChatPrimitiveFormFieldCheckboxIndicator=Ki;exports.EmbeddedChatPrimitiveFormFieldEmail=Qi;exports.EmbeddedChatPrimitiveFormFieldError=aa;exports.EmbeddedChatPrimitiveFormFieldFile=Vi;exports.EmbeddedChatPrimitiveFormFieldLabel=Ni;exports.EmbeddedChatPrimitiveFormFieldSelect=zi;exports.EmbeddedChatPrimitiveFormFieldSelectContent=Xi;exports.EmbeddedChatPrimitiveFormFieldSelectIcon=Ji;exports.EmbeddedChatPrimitiveFormFieldSelectItem=ea;exports.EmbeddedChatPrimitiveFormFieldSelectItemIndicator=ia;exports.EmbeddedChatPrimitiveFormFieldSelectItemText=ta;exports.EmbeddedChatPrimitiveFormFieldSelectTrigger=Gi;exports.EmbeddedChatPrimitiveFormFieldSelectValue=Yi;exports.EmbeddedChatPrimitiveFormFieldSelectViewport=Zi;exports.EmbeddedChatPrimitiveFormFieldText=$;exports.EmbeddedChatPrimitiveFormFieldTextArea=$i;exports.EmbeddedChatPrimitiveFormFooter=ra;exports.EmbeddedChatPrimitiveFormHeader=Di;exports.EmbeddedChatPrimitiveFormHeading=Ri;exports.EmbeddedChatPrimitiveFormSubmit=oa;exports.EmbeddedChatPrimitiveFormSuccess=da;exports.EmbeddedChatPrimitiveFormSuccessButton=la;exports.EmbeddedChatPrimitiveFormSuccessHeading=ca;exports.EmbeddedChatPrimitiveFormSuccessMessage=ma;exports.EmbeddedChatPrimitiveFormWrapper=Hi;exports.EmbeddedChatPrimitiveHeaderToolbar=pe;exports.EmbeddedChatPrimitiveHelpActions=Ci;exports.EmbeddedChatPrimitiveHelpActionsMenu=bi;exports.EmbeddedChatPrimitiveHelpActionsMenuArrow=gi;exports.EmbeddedChatPrimitiveHelpActionsMenuItem=Pi;exports.EmbeddedChatPrimitiveHelpActionsMenuItemIcon=Ai;exports.EmbeddedChatPrimitiveHelpActionsTrigger=vi;exports.EmbeddedChatPrimitiveInput=ft;exports.EmbeddedChatPrimitiveInputFieldset=It;exports.EmbeddedChatPrimitiveInputGroup=Mt;exports.EmbeddedChatPrimitiveIntroMessageWrapper=qe;exports.EmbeddedChatPrimitiveMarkdown=ot;exports.EmbeddedChatPrimitiveMessageAction=ht;exports.EmbeddedChatPrimitiveMessageAnnotationAction=lt;exports.EmbeddedChatPrimitiveMessageAnnotationActions=mt;exports.EmbeddedChatPrimitiveMessageAttachments=Ye;exports.EmbeddedChatPrimitiveMessageAttachmentsItem=Xe;exports.EmbeddedChatPrimitiveMessageAttachmentsItemIcon=Ze;exports.EmbeddedChatPrimitiveMessageAttachmentsItemTitle=et;exports.EmbeddedChatPrimitiveMessageAttachmentsList=Je;exports.EmbeddedChatPrimitiveMessageAttachmentsPreview=tt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewBody=st;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewClose=rt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewContent=at;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewHeader=nt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewOverlay=it;exports.EmbeddedChatPrimitiveMessageAvatar=Qe;exports.EmbeddedChatPrimitiveMessageAvatarContent=Ve;exports.EmbeddedChatPrimitiveMessageAvatarFallback=$e;exports.EmbeddedChatPrimitiveMessageAvatarImage=Ue;exports.EmbeddedChatPrimitiveMessageContent=Ge;exports.EmbeddedChatPrimitiveMessageContentWrapper=ze;exports.EmbeddedChatPrimitiveMessageHeader=We;exports.EmbeddedChatPrimitiveMessageLoading=Ne;exports.EmbeddedChatPrimitiveMessageName=Ke;exports.EmbeddedChatPrimitiveMessageSourceItem=vt;exports.EmbeddedChatPrimitiveMessageSourceItemBreadcrumbs=bt;exports.EmbeddedChatPrimitiveMessageSourceItemDescription=_t;exports.EmbeddedChatPrimitiveMessageSourceItemDescriptionPart=Et;exports.EmbeddedChatPrimitiveMessageSourceItemIcon=gt;exports.EmbeddedChatPrimitiveMessageSourceItemIndicator=Ft;exports.EmbeddedChatPrimitiveMessageSourceItemTag=At;exports.EmbeddedChatPrimitiveMessageSourceItemTitle=Pt;exports.EmbeddedChatPrimitiveMessageSources=ut;exports.EmbeddedChatPrimitiveMessageSourcesHeader=Ct;exports.EmbeddedChatPrimitiveMessageSourcesList=pt;exports.EmbeddedChatPrimitiveMessageToolbar=ct;exports.EmbeddedChatPrimitiveMessageWrapper=re;exports.EmbeddedChatPrimitiveMessages=ke;exports.EmbeddedChatPrimitiveRoot=Ce;exports.EmbeddedChatPrimitiveSendButton=St;exports.EmbeddedChatPrimitiveSendButtonIcon=xt;exports.EmbeddedChatPrimitiveTaglineBrandName=hi;exports.EmbeddedChatPrimitiveTaglineContainer=ci;exports.EmbeddedChatPrimitiveTaglineLogo=li;exports.EmbeddedChatPrimitiveTaglineText=mi;exports.EmbeddedChatPrimitiveToolbarHeader=be;exports.EmbeddedChatPrimitiveToolbarHeaderWrapper=ve;exports.EmbeddedChatPrimitiveWorkflow=Oe;exports.EmbeddedChatPrimitiveWorkflows=Le;exports.EmbeddedChatPrimitiveWorkflowsLabel=De;exports.EmbeddedChatPrimitiveWorkflowsList=Re;exports.EmbeddedChatPrimitiveWrapper=ue;exports.ExampleQuestion=He;exports.ExampleQuestionButton=we;exports.ExampleQuestions=Te;exports.ExampleQuestionsLabel=ye;exports.ExampleQuestionsList=je;exports.FeedbackForm=fi;exports.FeedbackItem=Si;exports.FeedbackItemCheckbox=xi;exports.FeedbackItemCheckboxIndicator=Bi;exports.FeedbackItemDescription=yi;exports.FeedbackItemLabel=Ti;exports.FeedbackModal=_i;exports.FeedbackModalBody=Mi;exports.FeedbackModalClose=Ii;exports.FeedbackModalContent=Fi;exports.FeedbackModalHeader=ki;exports.FeedbackModalOverlay=Ei;exports.FeedbackSubmitButton=ji;exports.Footer=kt;exports.Form=wi;exports.FormCancel=sa;exports.FormClose=Li;exports.FormContent=qi;exports.FormDescription=Oi;exports.FormError=na;exports.FormField=Wi;exports.FormFieldCheckbox=Ui;exports.FormFieldCheckboxIndicator=Ki;exports.FormFieldEmail=Qi;exports.FormFieldError=aa;exports.FormFieldFile=Vi;exports.FormFieldLabel=Ni;exports.FormFieldSelect=zi;exports.FormFieldSelectContent=Xi;exports.FormFieldSelectIcon=Ji;exports.FormFieldSelectItem=ea;exports.FormFieldSelectItemIndicator=ia;exports.FormFieldSelectItemText=ta;exports.FormFieldSelectTrigger=Gi;exports.FormFieldSelectValue=Yi;exports.FormFieldSelectViewport=Zi;exports.FormFieldText=$;exports.FormFieldTextArea=$i;exports.FormFooter=ra;exports.FormHeader=Di;exports.FormHeading=Ri;exports.FormSubmit=oa;exports.FormSuccess=da;exports.FormSuccessButton=la;exports.FormSuccessHeading=ca;exports.FormSuccessMessage=ma;exports.FormWrapper=Hi;exports.Header=Ra;exports.HeaderToolbar=pe;exports.HeaderToolbarWrapper=ve;exports.HelpActions=Ci;exports.HelpActionsMenu=bi;exports.HelpActionsMenuArrow=gi;exports.HelpActionsMenuItem=Pi;exports.HelpActionsMenuItemIcon=Ai;exports.HelpActionsTrigger=vi;exports.Input=ft;exports.InputFieldset=It;exports.InputGroup=Mt;exports.IntroMessageWrapper=qe;exports.Markdown=ot;exports.MessageAction=ht;exports.MessageAnnotationAction=lt;exports.MessageAnnotationActions=mt;exports.MessageAttachments=Ye;exports.MessageAttachmentsItem=Xe;exports.MessageAttachmentsItemIcon=Ze;exports.MessageAttachmentsItemTitle=et;exports.MessageAttachmentsList=Je;exports.MessageAttachmentsPreview=tt;exports.MessageAttachmentsPreviewBody=st;exports.MessageAttachmentsPreviewClose=rt;exports.MessageAttachmentsPreviewContent=at;exports.MessageAttachmentsPreviewHeader=nt;exports.MessageAttachmentsPreviewOverlay=it;exports.MessageAvatar=Qe;exports.MessageAvatarContent=Ve;exports.MessageAvatarFallback=$e;exports.MessageAvatarImage=Ue;exports.MessageContent=Ge;exports.MessageContentWrapper=ze;exports.MessageHeader=We;exports.MessageLoading=Ne;exports.MessageName=Ke;exports.MessageSourceItem=vt;exports.MessageSourceItemBreadcrumbIcon=Tn;exports.MessageSourceItemBreadcrumbs=bt;exports.MessageSourceItemDescription=_t;exports.MessageSourceItemDescriptionPart=Et;exports.MessageSourceItemIcon=gt;exports.MessageSourceItemIndicator=Ft;exports.MessageSourceItemTag=At;exports.MessageSourceItemTitle=Pt;exports.MessageSources=ut;exports.MessageSourcesHeader=Ct;exports.MessageSourcesList=pt;exports.MessageToolbar=ct;exports.MessageWrapper=re;exports.Messages=ke;exports.PrimitiveMessagePart=An;exports.Root=Ce;exports.SendButton=St;exports.SendButtonIcon=xt;exports.TaglineBrandName=hi;exports.TaglineContainer=ci;exports.TaglineLogo=li;exports.TaglineText=mi;exports.ToolbarHeader=be;exports.Workflow=Oe;exports.Workflows=Le;exports.WorkflowsLabel=De;exports.WorkflowsList=Re;exports.Wrapper=ue;
|
|
11
|
+
`);B(ce)},share:async()=>{},clear:d,stop:c},z={copy:A,share:k};return n.jsx(L.Tooltip,{delayDuration:0,open:z[e],children:n.jsx(rr,{"data-type":e,"data-copied":h.dataAttr(A||k),className:`${r} ${e}`,children:n.jsx(de,{action:e}),onClick:C.composeEventHandlers(i,O[e]),...s})})},sr=a.ikp("span",{_id:"aiChat__ChatActionLabel"}),de=t=>{const{action:e,...i}=t,{aiChatSettings:r}=b.useInkeepConfig(),s=r.toolbarButtonLabels??{},o={help:s.getHelp??"Get Help",copy:s.copyChat??"Copy",share:s.share??"Share",clear:s.clear??"Clear",stop:s.stop??"Stop"};return n.jsx(sr,{children:o[e],...i})},or=a.ikp(L.TooltipContent,{_id:"aiChat__ChatActionFeeback"}),ui=t=>{const{action:e,children:i,...r}=t,s={copy:"Copied!",share:"Link copied!"};return n.jsxs(or,{sideOffset:5,...r,children:[n.jsx(L.Arrow,{}),i||s[e]]})},dr=a.ikp(w.Root,{_id:"aiChatHelpActions"}),Ci=t=>{const{children:e,...i}=t,{aiChatSettings:r}=b.useInkeepConfig(),{getHelpOptions:s}=r;if(!s||(s??[]).length===0)return null;const{_pinned:o,_unpinned:d}=s.reduce((v,g)=>{const p=g.isPinnedToToolbar?"_pinned":"_unpinned";return{...v,[p]:[...v[p],g]}},{_pinned:[],_unpinned:[]}),c=d.length===1?[...o,d[0]]:o,m=d.length===1?[]:d,l=X.useHelpMenuState();return n.jsx(X.HelpMenuProvider,{value:l,children:n.jsx(dr,{open:l.open,onOpenChange:l.setOpen,children:h.maybeRender(e,{pinned:c,unpinned:m}),...i})})},cr=a.ikp(U,{_id:"aiChatHelpAction",action:"help"}),mr=a.ikp("a",{_id:"aiChatHelpAction",target:"_blank",rel:"noreferrer"}),pi=t=>{const{action:e,onClick:i,...r}=t,{handleAction:s,logHelpAction:o}=te.useChatAction(e),d=e.action.type,c={"aria-label":e.name,"data-name":e.name,children:e.name,onClick:C.composeEventHandlers(i,()=>{s(),o()}),...r};return d==="open_link"?n.jsx(mr,{href:e.action.url,...c}):n.jsx(cr,{...c})},lr=a.ikp(w.Trigger,{_id:"aiChatHelpActions__Trigger"}),vi=u.memo(t=>{const{aiChatSettings:e}=b.useInkeepConfig();return n.jsx(U,{action:"help",...t,asChild:!0,children:n.jsx(lr,{children:e.toolbarButtonLabels?.getHelp??"Get Help"})})}),hr=a.ikp(w.Content,{_id:"aiChatHelpActions__Menu"}),bi=t=>n.jsx(hr,{side:"top",sideOffset:8,align:"center",alignOffset:-10,...t}),gi=a.ikp(w.Arrow,{_id:"aiChatHelpActions__MenuArrow"}),Pi=t=>{const{action:e,onClick:i,...r}=t,{handleAction:s,logHelpAction:o}=te.useChatAction(e),{setOpen:d}=X.useHelpMenu(),c=()=>{s({onOpenForm:()=>d(!1)}),o()},m=e.action.type,l=a.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:C.composeEventHandlers(i,c)});return n.jsx(l,{...r})},ur=a.ikp(y.BuiltInIconRenderer,{_id:"aiChatHelpActions_MenuItemIcon"}),Ai=t=>{const{action:e,...i}=t;return e.icon?n.jsx(ur,{iconSettings:e.icon,...i}):null},Cr=a.ikp(_.Root,{_id:"aiChatFeedbackModal"}),_i=t=>{const{onOpenChange:e,...i}=t,{currentFeedback:r,setCurrentFeedback:s}=ee.useMessageFeedback();return n.jsx(Cr,{open:r!==null,onOpenChange:C.composeEventHandlers(e,()=>s(null)),...i})},Ei=a.ikp(_.Overlay,{_id:"aiChatFeedbackModal__Overlay"}),Fi=a.ikp(_.Content,{_id:"aiChatFeedbackModal__Content","aria-describedby":void 0}),ki=a.ikp(_.Title,{_id:"aiChatFeedbackModal__Header",children:"Help improve my answers!"}),Ii=a.ikp(_.Close,{_id:"aiChatFeedbackModal__Close",children:n.jsx(f.CustomIcon,{iconKey:"close"})}),Mi=a.ikp("div",{_id:"aiChatFeedbackModal__Body"}),pr=a.ikp("form",{_id:"aiChatFeedbackForm"}),fi=t=>{const{onSubmit:e,...i}=t,{submitNegativeFeedback:r,currentFeedback:s,setCurrentFeedback:o}=ee.useMessageFeedback(),d=c=>{c.preventDefault();const m=c.target,l=new FormData(m),v=Object.fromEntries(l.entries());s&&(r(s,v),o(null))};return n.jsx(pr,{onSubmit:C.composeEventHandlers(e,d),...i})},vr=a.ikp("div",{_id:"aiChatFeedbackItem"}),Si=t=>{const{name:e,...i}=t;return n.jsx(V.FeedbackItemProvider,{name:e,children:n.jsx(vr,{...i})})},br=a.ikp($.Root,{_id:"aiChatFeedbackItem__Checkbox"}),xi=t=>{const{name:e,focusItem:i}=V.useFeedbackItem(),{onCheckedChange:r,...s}=t,o=d=>{d&&i?.current?.focus()};return n.jsx(br,{id:`feedback-${e}`,name:e,onCheckedChange:C.composeEventHandlers(r,o),...s})},Bi=a.ikp($.Indicator,{_id:"aiChatFeedbackItem__CheckboxIndicator",children:n.jsx(le.CheckboxIcon,{})}),gr=a.ikp("label",{_id:"aiChatFeedbackItem__Label"}),Ti=t=>{const{name:e}=V.useFeedbackItem(),i={unrelated_response:"Didn't answer my question",inaccurate_statement:"Inaccurate statement",inaccurate_code_snippet:"Inaccurate code snippet",irrelevant_citations:"Irrelevant citations"};return n.jsx(gr,{htmlFor:`feedback-${e}`,children:i[e],...t})},Pr=a.ikp("textarea",{_id:"aiChatFeedbackItem__Description",placeholder:"Please describe"}),yi=t=>{const{name:e,focusItem:i}=V.useFeedbackItem();return n.jsx(Pr,{ref:i,name:`${e}:description`,...t})},ji=a.ikp("button",{_id:"aiChatFeedbackForm__SubmitButton",children:"Submit",type:"submit"}),Ar=a.ikp("div",{_id:"aiChatForm__Wrapper"}),Hi=t=>{const{form:e}=F.useChatForm();return e?n.jsx(Ar,{...t}):null},_r=a.ikp("form",{_id:"aiChatForm"}),wi=t=>{const{onSubmit:e,...i}=t,{conversationId:r,messages:s}=P.useChat(),{handleSubmit:o,isSuccess:d}=F.useChatForm();return d?null:n.jsx(_r,{onSubmit:C.composeEventHandlers(e,c=>o(c,{id:r,messages:s})),...i})},Er=a.ikp("button",{_id:"aiChatForm__Close",children:n.jsx(f.CustomIcon,{iconKey:"close"})}),Li=t=>{const{onClick:e,...i}=t,{closeForm:r}=F.useChatForm();return n.jsx(Er,{onClick:C.composeEventHandlers(e,r),...i})},Di=a.ikp("div",{_id:"aiChatForm__Header"}),Fr=a.ikp("h2",{_id:"aiChatForm__Heading"}),Ri=t=>{const{form:e}=F.useChatForm();return e?.heading?n.jsx(Fr,{children:e.heading,...t}):null},kr=a.ikp(Q.Markdown,{_id:"aiChatForm__Description"}),Oi=t=>{const{form:e}=F.useChatForm();return e?.description?n.jsx(kr,{children:e.description,...t}):null},Ir=a.ikp("div",{_id:"aiChatForm__Content"}),qi=t=>{const{children:e,...i}=t,{getFields:r}=F.useChatForm(),{conversationId:s}=P.useChat(),o=r(s)||[];return n.jsx(Ir,{children:h.maybeRender(e,o),...i})},Mr=a.ikp("div",{_id:"aiChatForm__Field"}),Wi=t=>{const{field:e,autoFocus:i,...r}=t,{control:s,errors:o}=F.useChatForm();return n.jsx(Ia.Controller,{name:e.name,control:s,rules:{required:e.isRequired?`${e.label} is required.`:void 0},render:({field:d})=>{const c=d.value!==void 0||e.inputType==="file";return n.jsx(H.FormFieldProvider,{"data-invalid":h.dataAttr(!!o[e.name]),field:e,fieldProps:d,autoFocus:i,children:c&&n.jsx(Mr,{"data-input-type":e.inputType,"data-hidden":h.dataAttr(e.isHidden),...r})})}})},fr=a.ikp("label",{_id:"aiChatForm__FieldLabel"}),Ni=t=>{const{field:e}=H.useFormField();return n.jsx(fr,{"data-required":h.dataAttr(e.isRequired),htmlFor:e.name,children:e.label,...t})},Sr=a.ikp("input",{_id:"aiChatForm__FieldText",type:"text"}),K=t=>{const{field:e,error:i,fieldProps:{onChange:r,onBlur:s,...o},autoFocus:d}=H.useFormField(),{onChange:c,onBlur:m,...l}=t;return n.jsx(Sr,{id:e.name,autoFocus:d,placeholder:"placeholder"in e?e.placeholder:void 0,"data-invalid":h.dataAttr(!!i),onChange:C.composeEventHandlers(c,r),onBlur:C.composeEventHandlers(m,s),...o,...l})},Qi=a.ikp(K,{_id:"aiChatForm__FieldEmail",type:"email"}),xr=a.ikp("input",{_id:"aiChatForm__FieldFile",type:"file",multiple:!0}),Vi=t=>{const{field:e,error:i,fieldProps:{value:r,onChange:s,onBlur:o,...d},autoFocus:c}=H.useFormField(),{onChange:m,onBlur:l,...v}=t,g=p=>{const A=p.target.files;s(A)};return n.jsx(xr,{id:e.name,autoFocus:c,"data-value":r,"data-invalid":h.dataAttr(!!i),...v,...d,onChange:C.composeEventHandlers(m,g),onBlur:C.composeEventHandlers(l,o)})},$i=a.ikp(K,{_id:"aiChatForm__FieldTextArea",type:"textarea",asChild:!0,children:n.jsx(Z,{maxRows:8})}),Br=a.ikp($.Root,{_id:"aiChatForm__FieldCheckbox"}),Ui=t=>{const{field:e,error:i,fieldProps:r,autoFocus:s}=H.useFormField(),{onCheckedChange:o,...d}=t;return n.jsx(Br,{id:e.name,name:e.name,autoFocus:s,"data-invalid":h.dataAttr(!!i),checked:r.value,onCheckedChange:C.composeEventHandlers(o,r.onChange),...d})},Ki=a.ikp($.Indicator,{_id:"aiChatForm__FieldCheckboxIndicator",children:n.jsx(le.CheckboxIcon,{})}),Tr=a.ikp(T.Root,{_id:"aiChatForm__FieldSelect"}),zi=t=>{const{field:e,error:i,fieldProps:r}=H.useFormField(),{onValueChange:s,...o}=t;return n.jsx(Tr,{name:e.name,"data-invalid":h.dataAttr(!!i),value:r.value,onValueChange:C.composeEventHandlers(s,r.onChange),...o})},Gi=a.ikp(T.Trigger,{_id:"aiChatForm__FieldSelect__Trigger"}),yr=a.ikp(T.Value,{_id:"aiChatForm__FieldSelect__Value"}),Yi=t=>{const{field:e}=H.useFormField();return n.jsx(yr,{placeholder:"placeholder"in e?e.placeholder:void 0,...t})},Ji=a.ikp(T.Icon,{_id:"aiChatForm__FieldSelect__Icon",asChild:!0,children:n.jsx(y.BuiltInIconRenderer,{iconSettings:{builtIn:"LuChevronDown"}})}),Xi=a.ikp(T.Content,{_id:"aiChatForm__FieldSelect__Content",position:"popper"}),Zi=a.ikp(T.Viewport,{_id:"aiChatForm__FieldSelect__Viewport"}),ea=a.ikp(T.Item,{_id:"aiChatForm__FieldSelect__Item"}),ta=a.ikp(T.ItemText,{_id:"aiChatForm__FieldSelect__ItemText"}),ia=a.ikp(T.ItemIndicator,{_id:"aiChatForm__FieldSelect__ItemIndicator",asChild:!0,children:n.jsx(y.BuiltInIconRenderer,{iconSettings:{builtIn:"LuCheck"}})}),jr=a.ikp("span",{_id:"aiChatForm__FieldError"}),aa=t=>{const{error:e}=H.useFormField();return e?n.jsx(jr,{children:e.message?.toString(),...t}):null},Hr=a.ikp("span",{_id:"aiChatForm__Error"}),na=t=>{const{formError:e}=F.useChatForm();return e?n.jsx(Hr,{children:e.message,...t}):null},ra=a.ikp("div",{_id:"aiChatForm__Footer"}),wr=a.ikp("button",{_id:"aiChatForm__Cancel",children:"Cancel",type:"button"}),sa=t=>{const{onClick:e,...i}=t,{closeForm:r}=F.useChatForm();return n.jsx(wr,{onClick:C.composeEventHandlers(e,r),...i})},Lr=a.ikp("button",{_id:"aiChatForm__Submit",children:"Submit",type:"submit"}),oa=t=>{const{onClick:e,...i}=t,{isSubmitting:r,form:s}=F.useChatForm(),o=s?.buttons.submit.label||"Submit";return n.jsx(Lr,{disabled:r,...i,children:o})},Dr=a.ikp("div",{_id:"aiChatForm__Success"}),da=t=>{const{isSuccess:e}=F.useChatForm();return e?n.jsx(Dr,{...t}):null},Rr=a.ikp("h2",{_id:"aiChatForm__SuccessHeading"}),ca=t=>{const{form:e}=F.useChatForm();return n.jsx(Rr,{children:e?.successView?.heading,...t})},Or=a.ikp(Q.Markdown,{_id:"aiChatForm__SuccessMessage"}),ma=t=>{const{form:e}=F.useChatForm();return n.jsx(Or,{children:e?.successView?.message,...t})},qr=a.ikp("button",{_id:"aiChatForm__SuccessButton"}),la=t=>{const{onClick:e,...i}=t,{form:r,closeForm:s}=F.useChatForm(),o=r?.successView?.doneButton;if(!o)return null;const d=o.icon&&n.jsx(y.BuiltInIconRenderer,{iconSettings:o.icon}),c=o.label;return n.jsx(qr,{onClick:C.composeEventHandlers(e,s),children:n.jsxs(n.Fragment,{children:[d,c]}),...i})};exports.Provider=P.ChatProvider;exports.ActionBar=oi;exports.Actions=di;exports.AttachmentsBar=Bt;exports.AttachmentsBarActions=Lt;exports.AttachmentsBarAttachment=yt;exports.AttachmentsBarAttachmentDelete=wt;exports.AttachmentsBarAttachmentIcon=jt;exports.AttachmentsBarAttachmentTitle=Ht;exports.AttachmentsBarForm=Jt;exports.AttachmentsBarFormContent=ii;exports.AttachmentsBarFormContentError=ri;exports.AttachmentsBarFormContentInput=ni;exports.AttachmentsBarFormContentLabel=ai;exports.AttachmentsBarFormSubmitButton=si;exports.AttachmentsBarFormTitle=Xt;exports.AttachmentsBarFormTitleError=ti;exports.AttachmentsBarFormTitleInput=ei;exports.AttachmentsBarFormTitleLabel=Zt;exports.AttachmentsBarInfoTip=Dt;exports.AttachmentsBarInfoTipArrow=oe;exports.AttachmentsBarInfoTipIcon=Rt;exports.AttachmentsBarInfoTipText=Ot;exports.AttachmentsBarInput=Wt;exports.AttachmentsBarInputs=qt;exports.AttachmentsBarList=Tt;exports.AttachmentsBarModal=Nt;exports.AttachmentsBarModalBody=Yt;exports.AttachmentsBarModalClose=Gt;exports.AttachmentsBarModalContent=Vt;exports.AttachmentsBarModalDescription=Kt;exports.AttachmentsBarModalHeader=$t;exports.AttachmentsBarModalHeading=Ut;exports.AttachmentsBarModalHelp=zt;exports.AttachmentsBarModalOverlay=Qt;exports.ChatAction=U;exports.ChatActionFeedback=ui;exports.ChatActionLabel=de;exports.ChatHelpAction=pi;exports.Content=ge;exports.ContentScrollArea=Pe;exports.ContentScrollAreaCorner=Fe;exports.ContentScrollAreaScrollbar=_e;exports.ContentScrollAreaThumb=Ee;exports.ContentScrollAreaViewport=Ae;exports.Disclaimer=Ie;exports.DisclaimerArrow=Be;exports.DisclaimerContent=Se;exports.DisclaimerLabel=Me;exports.DisclaimerText=xe;exports.DisclaimerTrigger=fe;exports.DynamicComponent=dt;exports.EmbeddedChatPrimitiveActionBar=oi;exports.EmbeddedChatPrimitiveActions=di;exports.EmbeddedChatPrimitiveAttachmentsBar=Bt;exports.EmbeddedChatPrimitiveAttachmentsBarActions=Lt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachment=yt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentDelete=wt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentIcon=jt;exports.EmbeddedChatPrimitiveAttachmentsBarAttachmentTitle=Ht;exports.EmbeddedChatPrimitiveAttachmentsBarForm=Jt;exports.EmbeddedChatPrimitiveAttachmentsBarFormContent=ii;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentError=ri;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentInput=ni;exports.EmbeddedChatPrimitiveAttachmentsBarFormContentLabel=ai;exports.EmbeddedChatPrimitiveAttachmentsBarFormSubmitButton=si;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitle=Xt;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleError=ti;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleInput=ei;exports.EmbeddedChatPrimitiveAttachmentsBarFormTitleLabel=Zt;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTip=Dt;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipArrow=oe;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipIcon=Rt;exports.EmbeddedChatPrimitiveAttachmentsBarInfoTipText=Ot;exports.EmbeddedChatPrimitiveAttachmentsBarInput=Wt;exports.EmbeddedChatPrimitiveAttachmentsBarInputs=qt;exports.EmbeddedChatPrimitiveAttachmentsBarList=Tt;exports.EmbeddedChatPrimitiveAttachmentsBarModal=Nt;exports.EmbeddedChatPrimitiveAttachmentsBarModalBody=Yt;exports.EmbeddedChatPrimitiveAttachmentsBarModalClose=Gt;exports.EmbeddedChatPrimitiveAttachmentsBarModalContent=Vt;exports.EmbeddedChatPrimitiveAttachmentsBarModalDescription=Kt;exports.EmbeddedChatPrimitiveAttachmentsBarModalHeader=$t;exports.EmbeddedChatPrimitiveAttachmentsBarModalHeading=Ut;exports.EmbeddedChatPrimitiveAttachmentsBarModalHelp=zt;exports.EmbeddedChatPrimitiveAttachmentsBarModalOverlay=Qt;exports.EmbeddedChatPrimitiveChatAction=U;exports.EmbeddedChatPrimitiveChatActionFeedback=ui;exports.EmbeddedChatPrimitiveChatActionLabel=de;exports.EmbeddedChatPrimitiveChatHelpAction=pi;exports.EmbeddedChatPrimitiveContent=ge;exports.EmbeddedChatPrimitiveContentScrollArea=Pe;exports.EmbeddedChatPrimitiveContentScrollAreaCorner=Fe;exports.EmbeddedChatPrimitiveContentScrollAreaScrollbar=_e;exports.EmbeddedChatPrimitiveContentScrollAreaThumb=Ee;exports.EmbeddedChatPrimitiveContentScrollAreaViewport=Ae;exports.EmbeddedChatPrimitiveDisclaimer=Ie;exports.EmbeddedChatPrimitiveDisclaimerArrow=Be;exports.EmbeddedChatPrimitiveDisclaimerContent=Se;exports.EmbeddedChatPrimitiveDisclaimerLabel=Me;exports.EmbeddedChatPrimitiveDisclaimerText=xe;exports.EmbeddedChatPrimitiveDisclaimerTrigger=fe;exports.EmbeddedChatPrimitiveDynamicComponent=dt;exports.EmbeddedChatPrimitiveExampleQuestion=He;exports.EmbeddedChatPrimitiveExampleQuestionButton=we;exports.EmbeddedChatPrimitiveExampleQuestions=Te;exports.EmbeddedChatPrimitiveExampleQuestionsLabel=ye;exports.EmbeddedChatPrimitiveExampleQuestionsList=je;exports.EmbeddedChatPrimitiveFeedbackForm=fi;exports.EmbeddedChatPrimitiveFeedbackItem=Si;exports.EmbeddedChatPrimitiveFeedbackItemCheckbox=xi;exports.EmbeddedChatPrimitiveFeedbackItemCheckboxIndicator=Bi;exports.EmbeddedChatPrimitiveFeedbackItemDescription=yi;exports.EmbeddedChatPrimitiveFeedbackItemLabel=Ti;exports.EmbeddedChatPrimitiveFeedbackModal=_i;exports.EmbeddedChatPrimitiveFeedbackModalBody=Mi;exports.EmbeddedChatPrimitiveFeedbackModalClose=Ii;exports.EmbeddedChatPrimitiveFeedbackModalContent=Fi;exports.EmbeddedChatPrimitiveFeedbackModalHeader=ki;exports.EmbeddedChatPrimitiveFeedbackModalOverlay=Ei;exports.EmbeddedChatPrimitiveFeedbackSubmitButton=ji;exports.EmbeddedChatPrimitiveFooter=kt;exports.EmbeddedChatPrimitiveForm=wi;exports.EmbeddedChatPrimitiveFormCancel=sa;exports.EmbeddedChatPrimitiveFormClose=Li;exports.EmbeddedChatPrimitiveFormContent=qi;exports.EmbeddedChatPrimitiveFormDescription=Oi;exports.EmbeddedChatPrimitiveFormError=na;exports.EmbeddedChatPrimitiveFormField=Wi;exports.EmbeddedChatPrimitiveFormFieldCheckbox=Ui;exports.EmbeddedChatPrimitiveFormFieldCheckboxIndicator=Ki;exports.EmbeddedChatPrimitiveFormFieldEmail=Qi;exports.EmbeddedChatPrimitiveFormFieldError=aa;exports.EmbeddedChatPrimitiveFormFieldFile=Vi;exports.EmbeddedChatPrimitiveFormFieldLabel=Ni;exports.EmbeddedChatPrimitiveFormFieldSelect=zi;exports.EmbeddedChatPrimitiveFormFieldSelectContent=Xi;exports.EmbeddedChatPrimitiveFormFieldSelectIcon=Ji;exports.EmbeddedChatPrimitiveFormFieldSelectItem=ea;exports.EmbeddedChatPrimitiveFormFieldSelectItemIndicator=ia;exports.EmbeddedChatPrimitiveFormFieldSelectItemText=ta;exports.EmbeddedChatPrimitiveFormFieldSelectTrigger=Gi;exports.EmbeddedChatPrimitiveFormFieldSelectValue=Yi;exports.EmbeddedChatPrimitiveFormFieldSelectViewport=Zi;exports.EmbeddedChatPrimitiveFormFieldText=K;exports.EmbeddedChatPrimitiveFormFieldTextArea=$i;exports.EmbeddedChatPrimitiveFormFooter=ra;exports.EmbeddedChatPrimitiveFormHeader=Di;exports.EmbeddedChatPrimitiveFormHeading=Ri;exports.EmbeddedChatPrimitiveFormSubmit=oa;exports.EmbeddedChatPrimitiveFormSuccess=da;exports.EmbeddedChatPrimitiveFormSuccessButton=la;exports.EmbeddedChatPrimitiveFormSuccessHeading=ca;exports.EmbeddedChatPrimitiveFormSuccessMessage=ma;exports.EmbeddedChatPrimitiveFormWrapper=Hi;exports.EmbeddedChatPrimitiveHeaderToolbar=pe;exports.EmbeddedChatPrimitiveHelpActions=Ci;exports.EmbeddedChatPrimitiveHelpActionsMenu=bi;exports.EmbeddedChatPrimitiveHelpActionsMenuArrow=gi;exports.EmbeddedChatPrimitiveHelpActionsMenuItem=Pi;exports.EmbeddedChatPrimitiveHelpActionsMenuItemIcon=Ai;exports.EmbeddedChatPrimitiveHelpActionsTrigger=vi;exports.EmbeddedChatPrimitiveInput=ft;exports.EmbeddedChatPrimitiveInputFieldset=It;exports.EmbeddedChatPrimitiveInputGroup=Mt;exports.EmbeddedChatPrimitiveIntroMessageWrapper=qe;exports.EmbeddedChatPrimitiveMarkdown=ot;exports.EmbeddedChatPrimitiveMessageAction=ht;exports.EmbeddedChatPrimitiveMessageAnnotationAction=lt;exports.EmbeddedChatPrimitiveMessageAnnotationActions=mt;exports.EmbeddedChatPrimitiveMessageAttachments=Ye;exports.EmbeddedChatPrimitiveMessageAttachmentsItem=Xe;exports.EmbeddedChatPrimitiveMessageAttachmentsItemIcon=Ze;exports.EmbeddedChatPrimitiveMessageAttachmentsItemTitle=et;exports.EmbeddedChatPrimitiveMessageAttachmentsList=Je;exports.EmbeddedChatPrimitiveMessageAttachmentsPreview=tt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewBody=st;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewClose=rt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewContent=at;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewHeader=nt;exports.EmbeddedChatPrimitiveMessageAttachmentsPreviewOverlay=it;exports.EmbeddedChatPrimitiveMessageAvatar=Qe;exports.EmbeddedChatPrimitiveMessageAvatarContent=Ve;exports.EmbeddedChatPrimitiveMessageAvatarFallback=$e;exports.EmbeddedChatPrimitiveMessageAvatarImage=Ue;exports.EmbeddedChatPrimitiveMessageContent=Ge;exports.EmbeddedChatPrimitiveMessageContentWrapper=ze;exports.EmbeddedChatPrimitiveMessageHeader=We;exports.EmbeddedChatPrimitiveMessageLoading=Ne;exports.EmbeddedChatPrimitiveMessageName=Ke;exports.EmbeddedChatPrimitiveMessageSourceItem=vt;exports.EmbeddedChatPrimitiveMessageSourceItemBreadcrumbs=bt;exports.EmbeddedChatPrimitiveMessageSourceItemDescription=_t;exports.EmbeddedChatPrimitiveMessageSourceItemDescriptionPart=Et;exports.EmbeddedChatPrimitiveMessageSourceItemIcon=gt;exports.EmbeddedChatPrimitiveMessageSourceItemIndicator=Ft;exports.EmbeddedChatPrimitiveMessageSourceItemTag=At;exports.EmbeddedChatPrimitiveMessageSourceItemTitle=Pt;exports.EmbeddedChatPrimitiveMessageSources=ut;exports.EmbeddedChatPrimitiveMessageSourcesHeader=Ct;exports.EmbeddedChatPrimitiveMessageSourcesList=pt;exports.EmbeddedChatPrimitiveMessageToolbar=ct;exports.EmbeddedChatPrimitiveMessageWrapper=se;exports.EmbeddedChatPrimitiveMessages=ke;exports.EmbeddedChatPrimitiveRoot=Ce;exports.EmbeddedChatPrimitiveSendButton=St;exports.EmbeddedChatPrimitiveSendButtonIcon=xt;exports.EmbeddedChatPrimitiveTaglineBrandName=hi;exports.EmbeddedChatPrimitiveTaglineContainer=ci;exports.EmbeddedChatPrimitiveTaglineLogo=li;exports.EmbeddedChatPrimitiveTaglineText=mi;exports.EmbeddedChatPrimitiveToolbarHeader=be;exports.EmbeddedChatPrimitiveToolbarHeaderWrapper=ve;exports.EmbeddedChatPrimitiveWorkflow=Oe;exports.EmbeddedChatPrimitiveWorkflows=Le;exports.EmbeddedChatPrimitiveWorkflowsLabel=De;exports.EmbeddedChatPrimitiveWorkflowsList=Re;exports.EmbeddedChatPrimitiveWrapper=ue;exports.ExampleQuestion=He;exports.ExampleQuestionButton=we;exports.ExampleQuestions=Te;exports.ExampleQuestionsLabel=ye;exports.ExampleQuestionsList=je;exports.FeedbackForm=fi;exports.FeedbackItem=Si;exports.FeedbackItemCheckbox=xi;exports.FeedbackItemCheckboxIndicator=Bi;exports.FeedbackItemDescription=yi;exports.FeedbackItemLabel=Ti;exports.FeedbackModal=_i;exports.FeedbackModalBody=Mi;exports.FeedbackModalClose=Ii;exports.FeedbackModalContent=Fi;exports.FeedbackModalHeader=ki;exports.FeedbackModalOverlay=Ei;exports.FeedbackSubmitButton=ji;exports.Footer=kt;exports.Form=wi;exports.FormCancel=sa;exports.FormClose=Li;exports.FormContent=qi;exports.FormDescription=Oi;exports.FormError=na;exports.FormField=Wi;exports.FormFieldCheckbox=Ui;exports.FormFieldCheckboxIndicator=Ki;exports.FormFieldEmail=Qi;exports.FormFieldError=aa;exports.FormFieldFile=Vi;exports.FormFieldLabel=Ni;exports.FormFieldSelect=zi;exports.FormFieldSelectContent=Xi;exports.FormFieldSelectIcon=Ji;exports.FormFieldSelectItem=ea;exports.FormFieldSelectItemIndicator=ia;exports.FormFieldSelectItemText=ta;exports.FormFieldSelectTrigger=Gi;exports.FormFieldSelectValue=Yi;exports.FormFieldSelectViewport=Zi;exports.FormFieldText=K;exports.FormFieldTextArea=$i;exports.FormFooter=ra;exports.FormHeader=Di;exports.FormHeading=Ri;exports.FormSubmit=oa;exports.FormSuccess=da;exports.FormSuccessButton=la;exports.FormSuccessHeading=ca;exports.FormSuccessMessage=ma;exports.FormWrapper=Hi;exports.Header=Ra;exports.HeaderToolbar=pe;exports.HeaderToolbarWrapper=ve;exports.HelpActions=Ci;exports.HelpActionsMenu=bi;exports.HelpActionsMenuArrow=gi;exports.HelpActionsMenuItem=Pi;exports.HelpActionsMenuItemIcon=Ai;exports.HelpActionsTrigger=vi;exports.Input=ft;exports.InputFieldset=It;exports.InputGroup=Mt;exports.IntroMessageWrapper=qe;exports.Markdown=ot;exports.MessageAction=ht;exports.MessageAnnotationAction=lt;exports.MessageAnnotationActions=mt;exports.MessageAttachments=Ye;exports.MessageAttachmentsItem=Xe;exports.MessageAttachmentsItemIcon=Ze;exports.MessageAttachmentsItemTitle=et;exports.MessageAttachmentsList=Je;exports.MessageAttachmentsPreview=tt;exports.MessageAttachmentsPreviewBody=st;exports.MessageAttachmentsPreviewClose=rt;exports.MessageAttachmentsPreviewContent=at;exports.MessageAttachmentsPreviewHeader=nt;exports.MessageAttachmentsPreviewOverlay=it;exports.MessageAvatar=Qe;exports.MessageAvatarContent=Ve;exports.MessageAvatarFallback=$e;exports.MessageAvatarImage=Ue;exports.MessageContent=Ge;exports.MessageContentWrapper=ze;exports.MessageHeader=We;exports.MessageLoading=Ne;exports.MessageName=Ke;exports.MessageSourceItem=vt;exports.MessageSourceItemBreadcrumbIcon=Tn;exports.MessageSourceItemBreadcrumbs=bt;exports.MessageSourceItemDescription=_t;exports.MessageSourceItemDescriptionPart=Et;exports.MessageSourceItemIcon=gt;exports.MessageSourceItemIndicator=Ft;exports.MessageSourceItemTag=At;exports.MessageSourceItemTitle=Pt;exports.MessageSources=ut;exports.MessageSourcesHeader=Ct;exports.MessageSourcesList=pt;exports.MessageToolbar=ct;exports.MessageWrapper=se;exports.Messages=ke;exports.PrimitiveMessagePart=An;exports.Root=Ce;exports.SendButton=St;exports.SendButtonIcon=xt;exports.TaglineBrandName=hi;exports.TaglineContainer=ci;exports.TaglineLogo=li;exports.TaglineText=mi;exports.ToolbarHeader=be;exports.Workflow=Oe;exports.Workflows=Le;exports.WorkflowsLabel=De;exports.WorkflowsList=Re;exports.Wrapper=ue;
|