@jrapps/my_tickets_chat_ui 0.3.1 → 0.3.3
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/cjs/components/SiteChatComponentNewErc/index.js +1 -1
- package/dist/cjs/components/SiteChatComponentNewErc/index.js.map +2 -2
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +2 -2
- package/dist/esm/chunks/{chunk-QGWQSJDB.js → chunk-54X5DYPJ.mjs} +1 -1
- package/dist/esm/chunks/{chunk-KT236RUF.js → chunk-FGUE3F3R.mjs} +2 -2
- package/dist/esm/chunks/chunk-FGUE3F3R.mjs.map +7 -0
- package/dist/esm/components/SiteChatComponentNew/{index.js → index.mjs} +2 -2
- package/dist/esm/components/SiteChatComponentNewErc/{index.js → index.mjs} +2 -2
- package/dist/esm/{index.js → index.mjs} +3 -3
- package/dist/types/components/SiteChatComponentNewErc/SiteChatComponentNewErc.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/esm/chunks/chunk-KT236RUF.js.map +0 -7
- /package/dist/esm/chunks/{chunk-QGWQSJDB.js.map → chunk-54X5DYPJ.mjs.map} +0 -0
- /package/dist/esm/components/SiteChatComponentNew/{index.js.map → index.mjs.map} +0 -0
- /package/dist/esm/components/SiteChatComponentNewErc/{index.js.map → index.mjs.map} +0 -0
- /package/dist/esm/{index.js.map → index.mjs.map} +0 -0
|
@@ -1259,7 +1259,7 @@ var SiteChatComponentNewErc = import_react5.default.forwardRef(({
|
|
|
1259
1259
|
};
|
|
1260
1260
|
if (isEditorReactComponent) {
|
|
1261
1261
|
const ercTheme = editorReactComponentThemeProps;
|
|
1262
|
-
const ercStyle =
|
|
1262
|
+
const ercStyle = buildThemeVars(theme);
|
|
1263
1263
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { ref, className: "cw-erc-root", style: ercStyle, children: [
|
|
1264
1264
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1265
1265
|
Header_default,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/components/SiteChatComponentNewErc/index.ts", "../../../../src/components/SiteChatComponentNewErc/SiteChatComponentNewErc.tsx", "../../../../src/components/SiteChatComponentNewErc/useSiteChatComponentNewErc.ts", "../../../../src/components/SiteChatComponentNewErc/utils/theme.ts", "../../../../src/components/SiteChatComponentNewErc/utils/systemMessages.ts", "../../../../src/components/SiteChatComponentNewErc/utils/format.ts", "../../../../src/components/SiteChatComponentNewErc/Header/Header.css", "../../../../src/components/SiteChatComponentNewErc/Header/Header.tsx", "../../../../src/components/SiteChatComponentNewErc/Footer/Footer.tsx", "../../../../src/components/SiteChatComponentNewErc/Footer/Footer.css", "../../../../src/components/SiteChatComponentNewErc/hooks/useAutoScroll.ts", "../../../../src/components/SiteChatComponentNewErc/hooks/useOfflineForm.ts", "../../../../src/components/SiteChatComponentNewErc/Messages/UserMessage.css", "../../../../src/components/SiteChatComponentNewErc/Messages/UserMessage.tsx", "../../../../src/components/SiteChatComponentNewErc/Shared/Avatar.css", "../../../../src/components/SiteChatComponentNewErc/Shared/Avatar.tsx", "../../../../src/components/SiteChatComponentNewErc/Shared/Button.css", "../../../../src/components/SiteChatComponentNewErc/Shared/Button.tsx", "../../../../src/components/SiteChatComponentNewErc/Messages/AgentMessage.css", "../../../../src/components/SiteChatComponentNewErc/Messages/AgentMessage.tsx", "../../../../src/components/SiteChatComponentNewErc/Messages/SystemMessage.css", "../../../../src/components/SiteChatComponentNewErc/Messages/SystemMessage.tsx", "../../../../src/components/SiteChatComponentNewErc/Messages/AttachmentMessage.css", "../../../../src/components/SiteChatComponentNewErc/Messages/AttachmentMessage.tsx", "../../../../src/components/SiteChatComponentNewErc/Messages/MessageRenderer.tsx", "../../../../src/components/SiteChatComponentNewErc/Messages/MessageList.css", "../../../../src/components/SiteChatComponentNewErc/Messages/MessageList.tsx", "../../../../src/components/SiteChatComponentNewErc/Messages/TypingIndicator.css", "../../../../src/components/SiteChatComponentNewErc/Messages/TypingIndicator.tsx", "../../../../src/components/SiteChatComponentNewErc/States/LoadingState.css", "../../../../src/components/SiteChatComponentNewErc/States/LoadingState.tsx", "../../../../src/components/SiteChatComponentNewErc/States/StartChatState.css", "../../../../src/components/SiteChatComponentNewErc/States/StartChatState.tsx", "../../../../src/components/SiteChatComponentNewErc/OfflineForm/OfflineForm.css", "../../../../src/components/SiteChatComponentNewErc/OfflineForm/OfflineForm.tsx", "../../../../src/components/SiteChatComponentNewErc/States/OfflineState.css", "../../../../src/components/SiteChatComponentNewErc/States/OfflineState.tsx", "../../../../src/components/SiteChatComponentNewErc/States/ChatEndedState.css", "../../../../src/components/SiteChatComponentNewErc/States/ChatEndedState.tsx", "../../../../src/components/SiteChatComponentNewErc/SiteChatComponentNewErc.css"],
|
|
4
|
-
"sourcesContent": ["export { SiteChatComponentNewErc } from './SiteChatComponentNewErc';\nexport type { ChatWidgetPropsErc, UseChatWidgetReturnErc } from './SiteChatComponentNewErc.types';\nexport { useSiteChatComponentNewErc } from './useSiteChatComponentNewErc';\n", "import React from 'react';\nimport { ChatWidgetPropsErc, EditorReactComponentThemeClassesProps } from './SiteChatComponentNewErc.types';\nimport { useSiteChatComponentNewErc } from './useSiteChatComponentNewErc';\nimport { buildThemeVars } from './utils';\nimport Header from './Header/Header';\nimport Footer from './Footer/Footer';\nimport { MessageList } from './Messages';\nimport { LoadingState, StartChatState, OfflineState, ChatEndedState } from './States';\nimport './SiteChatComponentNewErc.css';\n\nexport const SiteChatComponentNewErc = React.forwardRef<HTMLDivElement, ChatWidgetPropsErc>(({\n title,\n subtitle,\n image,\n theme,\n messages,\n offlineForm,\n defaultOpen = false,\n loading = false,\n chatEnded = false,\n width,\n height,\n onSend,\n onAttachment,\n onOfflineSubmit,\n onClose,\n isEditorReactComponent = false,\n editorReactComponentThemeProps,\n}, ref) => {\n const { open, openWidget, closeWidget } = useSiteChatComponentNewErc(defaultOpen);\n const themeVars = buildThemeVars(theme, width, height);\n\n const handleClose = () => {\n closeWidget();\n onClose?.();\n };\n\n /**\n * Derive what to render from data:\n * loading=true \u2192 spinner\n * offlineForm provided \u2192 offline form\n * no messages yet \u2192 Start Chat screen\n * messages present \u2192 conversation (+ optional ended banner)\n */\n const renderBody = (\n convClasses?: EditorReactComponentThemeClassesProps['conversation'],\n footerClasses?: EditorReactComponentThemeClassesProps['footer'],\n ) => {\n if (loading) {\n return <LoadingState />;\n }\n\n if (offlineForm) {\n return <OfflineState form={offlineForm} onSubmit={onOfflineSubmit} />;\n }\n\n if (messages.length === 0) {\n return (\n <StartChatState\n image={image}\n title={title}\n description={subtitle}\n onStart={() => onSend('__start_chat__')}\n />\n );\n }\n\n return (\n <>\n <MessageList messages={messages} ercClasses={convClasses} />\n {chatEnded ? <ChatEndedState /> : <Footer onSend={onSend} onAttachment={onAttachment} ercClasses={footerClasses} />}\n </>\n );\n };\n\n // \u2500\u2500\u2500 Editor React Component render \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n // No launcher button. The component always fills its Wix editor container.\n // Width/height are managed by the editor; theming comes from ercClasses (if\n // provided) or falls back to CSS custom properties from the `theme` prop.\n if (isEditorReactComponent) {\n const ercTheme = editorReactComponentThemeProps;\n const ercStyle = ercTheme ? undefined : (buildThemeVars(theme) as React.CSSProperties);\n return (\n <div ref={ref} className=\"cw-erc-root\" style={ercStyle}>\n <Header\n image={image}\n title={title}\n subtitle={subtitle}\n onClose={onClose ?? (() => {})}\n ercClasses={ercTheme?.header}\n />\n <div\n className={[\n 'cw-widget__body',\n ercTheme?.conversation.conversationClassName,\n ].filter(Boolean).join(' ')}\n >\n {renderBody(ercTheme?.conversation, ercTheme?.footer)}\n </div>\n </div>\n );\n }\n\n // \u2500\u2500\u2500 Custom Element / standalone render \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n return (\n <div ref={ref} className=\"cw-root\" style={themeVars as React.CSSProperties}>\n {/* Chat panel */}\n {open && (\n <div\n className=\"cw-widget\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label={`${title} chat widget`}\n >\n <Header\n image={image}\n title={title}\n subtitle={subtitle}\n onClose={handleClose}\n />\n <div className=\"cw-widget__body\">{renderBody()}</div>\n </div>\n )}\n\n {/* Launcher button \u2014 only visible when the panel is closed */}\n {!open && (\n <button\n className=\"cw-launcher\"\n onClick={openWidget}\n aria-label=\"Open chat\"\n aria-haspopup=\"dialog\"\n type=\"button\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"26\"\n height=\"26\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path d=\"M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z\" />\n </svg>\n </button>\n )}\n </div>\n );\n});\n\nSiteChatComponentNewErc.displayName = 'SiteChatComponentNewErc';\n\n\n", "import { useState, useCallback } from 'react';\nimport { UseChatWidgetReturnErc } from './SiteChatComponentNewErc.types';\n\nexport function useSiteChatComponentNewErc(defaultOpen = false): UseChatWidgetReturnErc {\n const [open, setOpen] = useState(defaultOpen);\n\n const openWidget = useCallback(() => setOpen(true), []);\n const closeWidget = useCallback(() => setOpen(false), []);\n\n return { open, openWidget, closeWidget };\n}\n", "import { ChatTheme } from '../SiteChatComponentNewErc.types';\n\n// \u2500\u2500\u2500 Fixed layout / typography constants \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n// These are intentionally not themeable \u2014 only colours and border widths change.\nconst FONT_FAMILY =\n \"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif\";\nconst FONT_SIZE = '14px';\nconst SHADOW = '0 4px 24px rgba(0,0,0,0.12)';\nconst WIDTH = '400px';\nconst HEIGHT = '600px';\nconst HEADER_HEIGHT = '64px';\n\n// \u2500\u2500\u2500 Default colour theme \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport const defaultTheme: ChatTheme = {\n primary: '#4f46e5',\n background: '#ffffff',\n surface: '#f9fafb',\n border: '#e5e7eb',\n userBubble: '#4f46e5',\n userText: '#ffffff',\n agentBubble: '#f3f4f6',\n agentText: '#111827',\n systemText: '#6b7280',\n inputBackground: '#ffffff',\n inputBorder: '#d1d5db',\n buttonRadius: 8,\n borderRadius: 12,\n};\n\n/**\n * Merges a partial user theme with the defaults and returns a style object\n * containing CSS custom properties. Layout/font values are always fixed.\n */\nexport function buildThemeVars(\n partial?: Partial<ChatTheme>,\n width?: number | string,\n height?: number | string,\n): Record<string, string> {\n const theme: ChatTheme = { ...defaultTheme, ...partial };\n\n return {\n // Colours\n '--cw-primary': theme.primary,\n '--cw-background': theme.background,\n '--cw-surface': theme.surface,\n '--cw-border': theme.border,\n '--cw-user-bubble': theme.userBubble,\n '--cw-user-text': theme.userText,\n '--cw-agent-bubble': theme.agentBubble,\n '--cw-agent-text': theme.agentText,\n '--cw-system-text': theme.systemText,\n '--cw-input-background': theme.inputBackground,\n '--cw-input-border': theme.inputBorder,\n // Border radii\n '--cw-button-radius': `${theme.buttonRadius}px`,\n '--cw-border-radius': `${theme.borderRadius}px`,\n // Fixed constants \u2014 not exposed as theme props\n '--cw-font-family': FONT_FAMILY,\n '--cw-font-size': FONT_SIZE,\n '--cw-shadow': SHADOW,\n '--cw-width': width !== undefined ? (typeof width === 'number' ? `${width}px` : width) : WIDTH,\n '--cw-height': height !== undefined ? (typeof height === 'number' ? `${height}px` : height) : HEIGHT,\n '--cw-header-height': HEADER_HEIGHT,\n };\n}\n", "import { SystemEventType } from '../SiteChatComponentNewErc.types';\n\nconst systemEventLabels: Record<SystemEventType, string> = {\n AGENT_JOINED: 'Agent joined',\n AGENT_LEFT: 'Agent left',\n USER_JOINED: 'You joined',\n USER_LEFT: 'You left',\n CHAT_ENDED: 'Chat ended',\n CHAT_REOPENED: 'Chat reopened',\n CHAT_TRANSFERRED: 'Chat transferred',\n WAITING_FOR_AGENT: 'Waiting for an agent',\n};\n\nexport function getSystemLabel(event: string): string {\n return systemEventLabels[event as SystemEventType] ?? event;\n}\n\nexport function isSystemEventType(value: string): value is SystemEventType {\n return value in systemEventLabels;\n}\n", "/**\n * Format a Unix timestamp (ms) into a human-readable time string, e.g. \"2:34 PM\".\n */\nexport function formatTime(timestamp: number): string {\n return new Date(timestamp).toLocaleTimeString([], {\n hour: '2-digit',\n minute: '2-digit',\n });\n}\n\n/**\n * Generate a simple unique id.\n */\nexport function generateId(): string {\n return `${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;\n}\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-759620f0\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-759620f0\";\n s.textContent = \".cw-header {\\n display: flex;\\n align-items: center;\\n justify-content: space-between;\\n padding: 0 16px;\\n height: var(--cw-header-height);\\n background-color: var(--cw-primary);\\n color: #ffffff;\\n flex-shrink: 0;\\n border-radius: var(--cw-border-radius) var(--cw-border-radius) 0 0;\\n}\\n\\n.cw-header__identity {\\n display: flex;\\n align-items: center;\\n gap: 12px;\\n min-width: 0;\\n}\\n\\n.cw-header__avatar {\\n width: 40px;\\n height: 40px;\\n border-radius: 50%;\\n object-fit: cover;\\n flex-shrink: 0;\\n border: 2px solid rgba(255, 255, 255, 0.4);\\n}\\n\\n.cw-header__text {\\n display: flex;\\n flex-direction: column;\\n min-width: 0;\\n}\\n\\n.cw-header__title {\\n font-size: 15px;\\n font-weight: 600;\\n white-space: nowrap;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n line-height: 1.3;\\n}\\n\\n.cw-header__subtitle {\\n font-size: 12px;\\n opacity: 0.85;\\n white-space: nowrap;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n line-height: 1.3;\\n}\\n\\n.cw-header__close {\\n background: none;\\n border: none;\\n cursor: pointer;\\n color: #ffffff;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n padding: 6px;\\n border-radius: 50%;\\n flex-shrink: 0;\\n transition: background-color 0.15s ease;\\n}\\n\\n.cw-header__close:hover {\\n background-color: rgba(255, 255, 255, 0.15);\\n}\\n\\n.cw-header__close:focus-visible {\\n outline: 2px solid #ffffff;\\n outline-offset: 2px;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { HeaderProps } from '../SiteChatComponentNewErc.types';\nimport './Header.css';\n\nconst Header: React.FC<HeaderProps> = ({ image, title, subtitle, onClose, ercClasses }) => {\n return (\n <header className={['cw-header', ercClasses?.headerClassName].filter(Boolean).join(' ')} role=\"banner\">\n <div className=\"cw-header__identity\">\n {image && (\n <img\n src={image}\n alt={`${title} avatar`}\n className={['cw-header__avatar', ercClasses?.imageClassName].filter(Boolean).join(' ')}\n />\n )}\n <div className=\"cw-header__text\">\n <span className={['cw-header__title', ercClasses?.titleClassName].filter(Boolean).join(' ')}>{title}</span>\n {subtitle && (\n <span className={['cw-header__subtitle', ercClasses?.subtitleClassName].filter(Boolean).join(' ')}>{subtitle}</span>\n )}\n </div>\n </div>\n <button\n className={['cw-header__close', ercClasses?.closeButtonClassName].filter(Boolean).join(' ')}\n onClick={onClose}\n aria-label=\"Close chat\"\n type=\"button\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n </button>\n </header>\n );\n};\n\nexport default Header;\n", "import React, { useRef, useState, useCallback } from 'react';\nimport { FooterProps } from '../SiteChatComponentNewErc.types';\nimport './Footer.css';\n\nconst Footer: React.FC<FooterProps> = ({ onSend, onAttachment, disabled, ercClasses }) => {\n const [text, setText] = useState('');\n const [stagedFiles, setStagedFiles] = useState<File[]>([]);\n const fileInputRef = useRef<HTMLInputElement | null>(null);\n const textareaRef = useRef<HTMLTextAreaElement | null>(null);\n\n const isEmpty = text.trim().length === 0 && stagedFiles.length === 0;\n\n const handleSend = useCallback(() => {\n if (!isEmpty && !disabled) {\n if (text.trim().length > 0) {\n onSend(text.trim());\n setText('');\n }\n stagedFiles.forEach((file) => onAttachment(file));\n setStagedFiles([]);\n if (textareaRef.current) {\n textareaRef.current.style.height = 'auto';\n textareaRef.current.focus();\n }\n }\n }, [isEmpty, disabled, onSend, text, stagedFiles, onAttachment]);\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent<HTMLTextAreaElement>) => {\n if (e.key === 'Enter' && !e.shiftKey) {\n e.preventDefault();\n handleSend();\n }\n },\n [handleSend],\n );\n\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLTextAreaElement>) => {\n setText(e.target.value);\n // Auto-grow textarea up to ~120px\n const el = e.target;\n el.style.height = 'auto';\n el.style.height = `${Math.min(el.scrollHeight, 120)}px`;\n },\n [],\n );\n\n const handleAttachmentClick = useCallback(() => {\n fileInputRef.current?.click();\n }, []);\n\n const handleFileChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const files = Array.from(e.target.files ?? []);\n if (files.length > 0) {\n setStagedFiles((prev) => [...prev, ...files]);\n }\n // Reset so same file can be re-selected\n if (fileInputRef.current) {\n fileInputRef.current.value = '';\n }\n },\n [],\n );\n\n const handleRemoveStagedFile = useCallback((index: number) => {\n setStagedFiles((prev) => prev.filter((_, i) => i !== index));\n }, []);\n\n return (\n <footer className={['cw-footer', ercClasses?.footerClassName].filter(Boolean).join(' ')} role=\"contentinfo\">\n {/* Staged file chips */}\n {stagedFiles.length > 0 && (\n <ul className=\"cw-footer__file-list\" aria-label=\"Files to send\">\n {stagedFiles.map((file, i) => (\n <li key={`${file.name}-${i}`} className=\"cw-footer__file-chip\">\n <span className=\"cw-footer__file-chip-name\" title={file.name}>\n {file.name}\n </span>\n <button\n className=\"cw-footer__file-chip-remove\"\n onClick={() => handleRemoveStagedFile(i)}\n aria-label={`Remove ${file.name}`}\n type=\"button\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\">\n <path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\" />\n </svg>\n </button>\n </li>\n ))}\n </ul>\n )}\n\n <div className=\"cw-footer__controls\">\n <button\n className={['cw-footer__attach-btn', ercClasses?.attachmentButtonClassName].filter(Boolean).join(' ')}\n onClick={handleAttachmentClick}\n aria-label=\"Attach file\"\n type=\"button\"\n disabled={disabled}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48\" />\n </svg>\n </button>\n\n <textarea\n ref={textareaRef}\n className={['cw-footer__input', ercClasses?.inputClassName].filter(Boolean).join(' ')}\n value={text}\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n placeholder=\"Type a message\u2026\"\n aria-label=\"Message input\"\n rows={1}\n disabled={disabled}\n />\n\n <button\n className={[\n 'cw-footer__send-btn',\n isEmpty || disabled ? 'cw-footer__send-btn--disabled' : '',\n ercClasses?.sendButtonClassName,\n ].filter(Boolean).join(' ')}\n onClick={handleSend}\n aria-label=\"Send message\"\n type=\"button\"\n disabled={isEmpty || disabled}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path d=\"M2.01 21L23 12 2.01 3 2 10l15 2-15 2z\" />\n </svg>\n </button>\n\n {/* Hidden file input */}\n <input\n ref={fileInputRef}\n type=\"file\"\n className=\"cw-footer__file-input\"\n onChange={handleFileChange}\n aria-hidden=\"true\"\n tabIndex={-1}\n multiple\n />\n </div>\n </footer>\n );\n};\n\nexport default Footer;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-c86a5c82\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-c86a5c82\";\n s.textContent = \".cw-footer {\\n display: flex;\\n flex-direction: column;\\n gap: 6px;\\n padding: 10px 12px;\\n background-color: var(--cw-background);\\n border-top: 1px solid var(--cw-border);\\n flex-shrink: 0;\\n}\\n\\n.cw-footer__controls {\\n display: flex;\\n align-items: flex-end;\\n gap: 8px;\\n}\\n\\n/* \u2500\u2500\u2500 Staged file chips \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\\n\\n.cw-footer__file-list {\\n list-style: none;\\n margin: 0;\\n padding: 0;\\n display: flex;\\n flex-wrap: wrap;\\n gap: 6px;\\n}\\n\\n.cw-footer__file-chip {\\n display: flex;\\n align-items: center;\\n gap: 4px;\\n background-color: color-mix(in srgb, var(--cw-primary) 12%, transparent);\\n border: 1px solid color-mix(in srgb, var(--cw-primary) 30%, transparent);\\n border-radius: 999px;\\n padding: 3px 8px 3px 10px;\\n font-size: 12px;\\n color: var(--cw-primary);\\n max-width: 200px;\\n}\\n\\n.cw-footer__file-chip-name {\\n overflow: hidden;\\n text-overflow: ellipsis;\\n white-space: nowrap;\\n}\\n\\n.cw-footer__file-chip-remove {\\n background: none;\\n border: none;\\n cursor: pointer;\\n padding: 2px;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n color: inherit;\\n border-radius: 50%;\\n flex-shrink: 0;\\n opacity: 0.7;\\n transition: opacity 0.15s ease, background-color 0.15s ease;\\n}\\n\\n.cw-footer__file-chip-remove:hover {\\n opacity: 1;\\n background-color: color-mix(in srgb, var(--cw-primary) 15%, transparent);\\n}\\n\\n.cw-footer__file-chip-remove:focus-visible {\\n outline: 2px solid var(--cw-primary);\\n outline-offset: 1px;\\n}\\n\\n.cw-footer__input {\\n flex: 1;\\n resize: none;\\n border: 1px solid var(--cw-input-border);\\n border-radius: var(--cw-button-radius);\\n background-color: var(--cw-input-background);\\n font-family: var(--cw-font-family);\\n font-size: var(--cw-font-size);\\n color: inherit;\\n padding: 8px 12px;\\n line-height: 1.5;\\n min-height: 38px;\\n max-height: 120px;\\n overflow-y: auto;\\n transition: border-color 0.15s ease;\\n}\\n\\n.cw-footer__input:focus {\\n outline: none;\\n border-color: var(--cw-primary);\\n box-shadow: 0 0 0 2px color-mix(in srgb, var(--cw-primary) 20%, transparent);\\n}\\n\\n.cw-footer__input:disabled {\\n opacity: 0.5;\\n cursor: not-allowed;\\n}\\n\\n.cw-footer__attach-btn,\\n.cw-footer__send-btn {\\n background: none;\\n border: none;\\n cursor: pointer;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n padding: 8px;\\n border-radius: 50%;\\n flex-shrink: 0;\\n transition: background-color 0.15s ease, color 0.15s ease;\\n color: var(--cw-primary);\\n margin-bottom: 1px;\\n}\\n\\n.cw-footer__attach-btn:hover,\\n.cw-footer__send-btn:not(.cw-footer__send-btn--disabled):hover {\\n background-color: color-mix(in srgb, var(--cw-primary) 10%, transparent);\\n}\\n\\n.cw-footer__attach-btn:focus-visible,\\n.cw-footer__send-btn:focus-visible {\\n outline: 2px solid var(--cw-primary);\\n outline-offset: 2px;\\n}\\n\\n.cw-footer__attach-btn:disabled {\\n opacity: 0.4;\\n cursor: not-allowed;\\n}\\n\\n.cw-footer__send-btn--disabled {\\n opacity: 0.35;\\n cursor: not-allowed;\\n}\\n\\n.cw-footer__file-input {\\n display: none;\\n}\\n\";\n document.head.appendChild(s);\n}", "import { useEffect, useRef, useState } from 'react';\n\n/**\n * Attaches a ref to a scrollable container. Automatically scrolls to the\n * bottom when new content is added, unless the user has manually scrolled up.\n */\nexport function useAutoScroll<T extends HTMLElement>(\n dependency: unknown,\n): React.MutableRefObject<T | null> {\n const ref = useRef<T | null>(null);\n const userScrolledUp = useRef(false);\n\n useEffect(() => {\n const el = ref.current;\n if (!el) return;\n\n const handleScroll = () => {\n const atBottom =\n el.scrollHeight - el.scrollTop - el.clientHeight < 64;\n userScrolledUp.current = !atBottom;\n };\n\n el.addEventListener('scroll', handleScroll, { passive: true });\n return () => el.removeEventListener('scroll', handleScroll);\n }, []);\n\n useEffect(() => {\n const el = ref.current;\n if (!el || userScrolledUp.current) return;\n\n el.scrollTo({ top: el.scrollHeight, behavior: 'smooth' });\n }, [dependency]);\n\n return ref;\n}\n\n/**\n * Expose a way for the consumer to force-scroll to bottom (e.g. when\n * the user clicks a \"scroll to bottom\" button).\n */\nexport function useAutoScrollWithControl<T extends HTMLElement>(\n dependency: unknown,\n): {\n ref: React.MutableRefObject<T | null>;\n scrollToBottom: () => void;\n isScrolledUp: boolean;\n} {\n const ref = useRef<T | null>(null);\n const userScrolledUp = useRef(false);\n const [isScrolledUp, setIsScrolledUp] = useState(false);\n\n useEffect(() => {\n const el = ref.current;\n if (!el) return;\n\n const handleScroll = () => {\n const atBottom =\n el.scrollHeight - el.scrollTop - el.clientHeight < 64;\n userScrolledUp.current = !atBottom;\n setIsScrolledUp(!atBottom);\n };\n\n el.addEventListener('scroll', handleScroll, { passive: true });\n return () => el.removeEventListener('scroll', handleScroll);\n }, []);\n\n useEffect(() => {\n const el = ref.current;\n if (!el || userScrolledUp.current) return;\n el.scrollTo({ top: el.scrollHeight, behavior: 'smooth' });\n }, [dependency]);\n\n const scrollToBottom = () => {\n const el = ref.current;\n if (!el) return;\n userScrolledUp.current = false;\n setIsScrolledUp(false);\n el.scrollTo({ top: el.scrollHeight, behavior: 'smooth' });\n };\n\n return { ref, scrollToBottom, isScrolledUp };\n}\n", "import { useState, useCallback } from 'react';\nimport { OfflineField, OfflineFormSchema } from '../SiteChatComponentNewErc.types';\n\ntype FieldValues = Record<string, unknown>;\ntype FieldErrors = Record<string, string>;\n\nfunction validateField(field: OfflineField, value: unknown): string {\n if (field.required) {\n if (field.type === 'checkbox' && !value) {\n return `${field.label} is required.`;\n }\n if (\n field.type !== 'checkbox' &&\n (value === undefined || value === null || String(value).trim() === '')\n ) {\n return `${field.label} is required.`;\n }\n }\n\n if (field.type === 'email') {\n const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n if (value && !emailRegex.test(String(value))) {\n return 'Please enter a valid email address.';\n }\n }\n\n if (field.type === 'phone') {\n const phoneRegex = /^\\+?[\\d\\s\\-().]{7,20}$/;\n if (value && !phoneRegex.test(String(value))) {\n return 'Please enter a valid phone number.';\n }\n }\n\n return '';\n}\n\nexport function useOfflineForm(schema: OfflineFormSchema) {\n const initialValues: FieldValues = {};\n for (const field of schema.fields) {\n initialValues[field.id] = field.type === 'checkbox' ? false : '';\n }\n\n const [values, setValues] = useState<FieldValues>(initialValues);\n const [errors, setErrors] = useState<FieldErrors>({});\n const [submitted, setSubmitted] = useState(false);\n\n const setValue = useCallback(\n (id: string, value: unknown) => {\n setValues((prev) => ({ ...prev, [id]: value }));\n\n if (submitted) {\n const field = schema.fields.find((f) => f.id === id);\n if (field) {\n const error = validateField(field, value);\n setErrors((prev) => ({ ...prev, [id]: error }));\n }\n }\n },\n [schema.fields, submitted],\n );\n\n const validate = useCallback((): boolean => {\n const newErrors: FieldErrors = {};\n let valid = true;\n\n for (const field of schema.fields) {\n const error = validateField(field, values[field.id]);\n newErrors[field.id] = error;\n if (error) valid = false;\n }\n\n setErrors(newErrors);\n return valid;\n }, [schema.fields, values]);\n\n const handleSubmit = useCallback(\n (onSubmit: (values: FieldValues) => void) => {\n setSubmitted(true);\n if (validate()) {\n onSubmit(values);\n }\n },\n [validate, values],\n );\n\n const reset = useCallback(() => {\n setValues(initialValues);\n setErrors({});\n setSubmitted(false);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return { values, errors, setValue, handleSubmit, reset };\n}\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-488069e4\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-488069e4\";\n s.textContent = \".cw-user-message {\\n display: flex;\\n flex-direction: column;\\n align-items: flex-end;\\n max-width: 75%;\\n align-self: flex-end;\\n gap: 3px;\\n}\\n\\n.cw-user-message__bubble {\\n background-color: var(--cw-user-bubble);\\n color: var(--cw-user-text);\\n padding: 10px 14px;\\n border-radius: 18px 18px 4px 18px;\\n font-size: var(--cw-font-size);\\n line-height: 1.5;\\n word-break: break-word;\\n white-space: pre-wrap;\\n}\\n\\n.cw-user-message__time {\\n font-size: 11px;\\n color: var(--cw-system-text);\\n padding-right: 2px;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { MessageProps } from '../SiteChatComponentNewErc.types';\nimport { formatTime } from '../utils';\nimport './UserMessage.css';\n\ninterface UserMessageProps {\n message: MessageProps;\n ercClassName?: string;\n}\n\nconst UserMessage: React.FC<UserMessageProps> = ({ message, ercClassName }) => {\n return (\n <div className={['cw-user-message', ercClassName].filter(Boolean).join(' ')} role=\"listitem\" aria-label=\"Your message\">\n <div className=\"cw-user-message__bubble\">{message.message}</div>\n {message.timestamp !== undefined && (\n <span className=\"cw-user-message__time\">\n {formatTime(message.timestamp)}\n </span>\n )}\n </div>\n );\n};\n\nexport default UserMessage;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-ad01373e\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-ad01373e\";\n s.textContent = \".cw-avatar {\\n border-radius: 50%;\\n flex-shrink: 0;\\n display: inline-flex;\\n align-items: center;\\n justify-content: center;\\n}\\n\\n.cw-avatar--image {\\n object-fit: cover;\\n}\\n\\n.cw-avatar--initials {\\n background-color: var(--cw-primary);\\n color: #ffffff;\\n font-weight: 600;\\n user-select: none;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport './Avatar.css';\n\ninterface AvatarProps {\n src?: string;\n name?: string;\n size?: number;\n}\n\nfunction getInitials(name: string): string {\n return name\n .split(' ')\n .slice(0, 2)\n .map((w) => w[0])\n .join('')\n .toUpperCase();\n}\n\nconst Avatar: React.FC<AvatarProps> = ({ src, name, size = 32 }) => {\n const style = {\n width: `${size}px`,\n height: `${size}px`,\n fontSize: `${Math.round(size * 0.38)}px`,\n };\n\n if (src) {\n return (\n <img\n src={src}\n alt={name ? `${name} avatar` : 'Agent avatar'}\n className=\"cw-avatar cw-avatar--image\"\n style={style}\n />\n );\n }\n\n return (\n <span\n className=\"cw-avatar cw-avatar--initials\"\n aria-label={name ? `${name} avatar` : 'Agent avatar'}\n style={style}\n >\n {name ? getInitials(name) : 'A'}\n </span>\n );\n};\n\nexport default Avatar;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-0aa71f6d\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-0aa71f6d\";\n s.textContent = \".cw-button {\\n display: inline-flex;\\n align-items: center;\\n justify-content: center;\\n gap: 8px;\\n padding: 10px 20px;\\n border: none;\\n border-radius: var(--cw-button-radius);\\n font-family: var(--cw-font-family);\\n font-size: var(--cw-font-size);\\n font-weight: 600;\\n cursor: pointer;\\n transition: opacity 0.15s ease, transform 0.1s ease;\\n white-space: nowrap;\\n}\\n\\n.cw-button:focus-visible {\\n outline: 2px solid var(--cw-primary);\\n outline-offset: 3px;\\n}\\n\\n.cw-button:active:not(:disabled) {\\n transform: scale(0.98);\\n}\\n\\n.cw-button:disabled {\\n opacity: 0.45;\\n cursor: not-allowed;\\n}\\n\\n.cw-button--primary {\\n background-color: var(--cw-primary);\\n color: #ffffff;\\n}\\n\\n.cw-button--primary:hover:not(:disabled) {\\n opacity: 0.88;\\n}\\n\\n.cw-button--secondary {\\n background-color: var(--cw-surface);\\n color: var(--cw-primary);\\n border: 1px solid var(--cw-border);\\n}\\n\\n.cw-button--secondary:hover:not(:disabled) {\\n background-color: var(--cw-border);\\n}\\n\\n.cw-button--full {\\n width: 100%;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport './Button.css';\n\ninterface ButtonProps {\n children: React.ReactNode;\n onClick?: () => void;\n variant?: 'primary' | 'secondary';\n disabled?: boolean;\n type?: 'button' | 'submit' | 'reset';\n fullWidth?: boolean;\n ariaLabel?: string;\n}\n\nconst Button: React.FC<ButtonProps> = ({\n children,\n onClick,\n variant = 'primary',\n disabled = false,\n type = 'button',\n fullWidth = false,\n ariaLabel,\n}) => {\n return (\n <button\n className={`cw-button cw-button--${variant}${fullWidth ? ' cw-button--full' : ''}`}\n onClick={onClick}\n disabled={disabled}\n type={type}\n aria-label={ariaLabel}\n >\n {children}\n </button>\n );\n};\n\nexport default Button;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-f5aad44b\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-f5aad44b\";\n s.textContent = \".cw-agent-message {\\n display: flex;\\n align-items: flex-end;\\n gap: 8px;\\n max-width: 75%;\\n align-self: flex-start;\\n}\\n\\n.cw-agent-message__content {\\n display: flex;\\n flex-direction: column;\\n gap: 3px;\\n}\\n\\n.cw-agent-message__name {\\n font-size: 11px;\\n font-weight: 600;\\n color: var(--cw-system-text);\\n padding-left: 2px;\\n}\\n\\n.cw-agent-message__bubble {\\n background-color: var(--cw-agent-bubble);\\n color: var(--cw-agent-text);\\n padding: 10px 14px;\\n border-radius: 18px 18px 18px 4px;\\n font-size: var(--cw-font-size);\\n line-height: 1.5;\\n word-break: break-word;\\n white-space: pre-wrap;\\n}\\n\\n.cw-agent-message__time {\\n font-size: 11px;\\n color: var(--cw-system-text);\\n padding-left: 2px;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { MessageProps } from '../SiteChatComponentNewErc.types';\nimport { formatTime } from '../utils';\nimport { Avatar } from '../Shared';\nimport './AgentMessage.css';\n\ninterface AgentMessageProps {\n message: MessageProps;\n ercClassName?: string;\n}\n\nconst AgentMessage: React.FC<AgentMessageProps> = ({ message, ercClassName }) => {\n return (\n <div\n className={['cw-agent-message', ercClassName].filter(Boolean).join(' ')}\n role=\"listitem\"\n aria-label={`Message from ${message.senderName ?? 'Agent'}`}\n >\n <Avatar name={message.senderName} size={32} />\n <div className=\"cw-agent-message__content\">\n {message.senderName && (\n <span className=\"cw-agent-message__name\">{message.senderName}</span>\n )}\n <div className=\"cw-agent-message__bubble\">{message.message}</div>\n {message.timestamp !== undefined && (\n <span className=\"cw-agent-message__time\">\n {formatTime(message.timestamp)}\n </span>\n )}\n </div>\n </div>\n );\n};\n\nexport default AgentMessage;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-631d733c\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-631d733c\";\n s.textContent = \".cw-system-message {\\n display: flex;\\n align-items: center;\\n gap: 10px;\\n align-self: stretch;\\n padding: 4px 8px;\\n}\\n\\n.cw-system-message__line {\\n flex: 1;\\n border-top: 1px dashed var(--cw-border);\\n}\\n\\n.cw-system-message__text {\\n font-size: 11px;\\n color: var(--cw-system-text);\\n white-space: nowrap;\\n flex-shrink: 0;\\n font-style: italic;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { MessageProps } from '../SiteChatComponentNewErc.types';\nimport { getSystemLabel } from '../utils';\nimport './SystemMessage.css';\n\ninterface SystemMessageProps {\n message: MessageProps;\n ercClassName?: string;\n}\n\nconst SystemMessage: React.FC<SystemMessageProps> = ({ message, ercClassName }) => {\n const label = message.message\n ? getSystemLabel(message.message)\n : message.message ?? '';\n\n return (\n <div\n className={['cw-system-message', ercClassName].filter(Boolean).join(' ')}\n role=\"listitem\"\n aria-label={`System notification: ${label}`}\n >\n <span className=\"cw-system-message__line\" aria-hidden=\"true\" />\n <span className=\"cw-system-message__text\">{label}</span>\n <span className=\"cw-system-message__line\" aria-hidden=\"true\" />\n </div>\n );\n};\n\nexport default SystemMessage;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-daabdc64\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-daabdc64\";\n s.textContent = \".cw-attachment-message {\\n display: flex;\\n flex-direction: column;\\n gap: 3px;\\n align-self: flex-start;\\n max-width: 80%;\\n}\\n\\n.cw-attachment-message--user {\\n align-self: flex-end;\\n align-items: flex-end;\\n}\\n\\n.cw-attachment-message__card {\\n display: flex;\\n align-items: center;\\n gap: 10px;\\n background-color: var(--cw-agent-bubble);\\n border: 1px solid var(--cw-border);\\n border-radius: 12px;\\n padding: 10px 14px;\\n}\\n\\n.cw-attachment-message--user .cw-attachment-message__card {\\n background-color: var(--cw-user-bubble);\\n border-color: transparent;\\n color: var(--cw-user-text);\\n}\\n\\n.cw-attachment-message__icon {\\n flex-shrink: 0;\\n opacity: 0.75;\\n display: flex;\\n align-items: center;\\n}\\n\\n.cw-attachment-message__info {\\n display: flex;\\n flex-direction: column;\\n min-width: 0;\\n flex: 1;\\n}\\n\\n.cw-attachment-message__name {\\n font-size: 13px;\\n font-weight: 600;\\n white-space: nowrap;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n}\\n\\n.cw-attachment-message__label {\\n font-size: 11px;\\n opacity: 0.65;\\n}\\n\\n.cw-attachment-message__open-btn {\\n background-color: var(--cw-primary);\\n color: #ffffff;\\n border: none;\\n border-radius: 6px;\\n padding: 5px 12px;\\n font-family: var(--cw-font-family);\\n font-size: 12px;\\n font-weight: 600;\\n cursor: pointer;\\n flex-shrink: 0;\\n transition: opacity 0.15s ease;\\n}\\n\\n.cw-attachment-message--user .cw-attachment-message__open-btn {\\n background-color: rgba(255, 255, 255, 0.25);\\n color: #ffffff;\\n}\\n\\n.cw-attachment-message__open-btn:hover {\\n opacity: 0.85;\\n}\\n\\n.cw-attachment-message__open-btn:focus-visible {\\n outline: 2px solid var(--cw-primary);\\n outline-offset: 2px;\\n}\\n\\n.cw-attachment-message__time {\\n font-size: 11px;\\n color: var(--cw-system-text);\\n padding-left: 2px;\\n}\\n\\n.cw-attachment-message__time--right {\\n padding-left: 0;\\n padding-right: 2px;\\n align-self: flex-end;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { MessageProps } from '../SiteChatComponentNewErc.types';\nimport { formatTime } from '../utils';\nimport './AttachmentMessage.css';\n\ninterface AttachmentMessageProps {\n message: MessageProps;\n}\n\nconst AttachmentMessage: React.FC<AttachmentMessageProps> = ({ message }) => {\n // Support both `item` (new) and `attachment` (legacy) field names\n const attachment = message.item ?? message.attachment;\n if (!attachment) return null;\n\n const handleOpen = () => {\n window.open(attachment.url, '_blank', 'noopener,noreferrer');\n };\n\n return (\n <div\n className={`cw-attachment-message${message.senderType === 'user' ? ' cw-attachment-message--user' : ''}`}\n role=\"listitem\"\n aria-label={`Attachment: ${attachment.name}`}\n >\n <div className=\"cw-attachment-message__card\">\n <div className=\"cw-attachment-message__icon\" aria-hidden=\"true\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z\" />\n <polyline points=\"14 2 14 8 20 8\" />\n </svg>\n </div>\n <div className=\"cw-attachment-message__info\">\n <span className=\"cw-attachment-message__name\">{attachment.name}</span>\n <span className=\"cw-attachment-message__label\">Attachment</span>\n </div>\n <button\n className=\"cw-attachment-message__open-btn\"\n onClick={handleOpen}\n aria-label={`Open attachment ${attachment.name}`}\n type=\"button\"\n >\n Open\n </button>\n </div>\n {message.timestamp !== undefined && (\n <span\n className={`cw-attachment-message__time${message.senderType === 'user' ? ' cw-attachment-message__time--right' : ''}`}\n >\n {formatTime(message.timestamp)}\n </span>\n )}\n </div>\n );\n};\n\nexport default AttachmentMessage;\n", "import React from 'react';\nimport { EditorReactComponentThemeClassesProps, MessageProps } from '../SiteChatComponentNewErc.types';\nimport UserMessage from './UserMessage';\nimport AgentMessage from './AgentMessage';\nimport SystemMessage from './SystemMessage';\nimport AttachmentMessage from './AttachmentMessage';\n\ninterface MessageRendererProps {\n message: MessageProps;\n ercClasses?: EditorReactComponentThemeClassesProps['conversation'];\n}\n\nconst MessageRenderer: React.FC<MessageRendererProps> = ({ message, ercClasses }) => {\n if (message.messageType === 'ATTACHMENT') {\n return <AttachmentMessage message={message} />;\n }\n\n switch (message.senderType) {\n case 'user':\n return <UserMessage message={message} ercClassName={ercClasses?.userMessageClassName} />;\n case 'agent':\n return <AgentMessage message={message} ercClassName={ercClasses?.agentMessageClassName} />;\n case 'system':\n return <SystemMessage message={message} ercClassName={ercClasses?.systemMessageClassName} />;\n default:\n return null;\n }\n};\n\nexport default MessageRenderer;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-0408335f\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-0408335f\";\n s.textContent = \".cw-message-list {\\n flex: 1;\\n display: flex;\\n flex-direction: column;\\n gap: 10px;\\n overflow-y: auto;\\n padding: 16px;\\n background-color: var(--cw-background);\\n scroll-behavior: smooth;\\n}\\n\\n/* Scrollbar styling */\\n.cw-message-list::-webkit-scrollbar {\\n width: 5px;\\n}\\n\\n.cw-message-list::-webkit-scrollbar-track {\\n background: transparent;\\n}\\n\\n.cw-message-list::-webkit-scrollbar-thumb {\\n background-color: var(--cw-border);\\n border-radius: 10px;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { EditorReactComponentThemeClassesProps, MessageProps } from '../SiteChatComponentNewErc.types';\nimport { useAutoScroll } from '../hooks';\nimport MessageRenderer from './MessageRenderer';\nimport './MessageList.css';\n\ninterface MessageListProps {\n messages: MessageProps[];\n ercClasses?: EditorReactComponentThemeClassesProps['conversation'];\n}\n\nconst MessageList: React.FC<MessageListProps> = ({ messages, ercClasses }) => {\n const scrollRef = useAutoScroll<HTMLDivElement>(messages);\n\n return (\n <div\n ref={scrollRef}\n className={['cw-message-list', ercClasses?.messageListClassName].filter(Boolean).join(' ')}\n role=\"list\"\n aria-label=\"Chat messages\"\n aria-live=\"polite\"\n aria-relevant=\"additions\"\n >\n {messages.map((msg, index) => (\n <MessageRenderer\n key={msg._id ?? `${msg.timestamp ?? index}-${index}`}\n message={msg}\n ercClasses={ercClasses}\n />\n ))}\n {/* TypingIndicator removed \u2014 no longer part of the public API */}\n </div>\n );\n};\n\nexport default MessageList;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-0a740655\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-0a740655\";\n s.textContent = \"@keyframes cw-bounce {\\n 0%, 60%, 100% {\\n transform: translateY(0);\\n }\\n 30% {\\n transform: translateY(-6px);\\n }\\n}\\n\\n.cw-typing-indicator {\\n align-self: flex-start;\\n}\\n\\n.cw-typing-indicator__bubble {\\n display: inline-flex;\\n align-items: center;\\n gap: 4px;\\n background-color: var(--cw-agent-bubble);\\n border-radius: 18px 18px 18px 4px;\\n padding: 10px 14px;\\n}\\n\\n.cw-typing-indicator__dot {\\n display: block;\\n width: 7px;\\n height: 7px;\\n border-radius: 50%;\\n background-color: var(--cw-system-text);\\n animation: cw-bounce 1.2s infinite ease-in-out;\\n}\\n\\n.cw-typing-indicator__dot:nth-child(2) {\\n animation-delay: 0.2s;\\n}\\n\\n.cw-typing-indicator__dot:nth-child(3) {\\n animation-delay: 0.4s;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport './TypingIndicator.css';\n\nconst TypingIndicator: React.FC = () => {\n return (\n <div\n className=\"cw-typing-indicator\"\n role=\"status\"\n aria-label=\"Agent is typing\"\n >\n <div className=\"cw-typing-indicator__bubble\">\n <span className=\"cw-typing-indicator__dot\" />\n <span className=\"cw-typing-indicator__dot\" />\n <span className=\"cw-typing-indicator__dot\" />\n </div>\n </div>\n );\n};\n\nexport default TypingIndicator;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-7bd88a9a\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-7bd88a9a\";\n s.textContent = \"@keyframes cw-spin {\\n to {\\n transform: rotate(360deg);\\n }\\n}\\n\\n.cw-loading-state {\\n flex: 1;\\n display: flex;\\n flex-direction: column;\\n align-items: center;\\n justify-content: center;\\n padding: 32px;\\n background-color: var(--cw-background);\\n text-align: center;\\n gap: 12px;\\n}\\n\\n.cw-loading-state__spinner {\\n width: 48px;\\n height: 48px;\\n}\\n\\n.cw-loading-state__spinner-ring {\\n width: 48px;\\n height: 48px;\\n border-radius: 50%;\\n border: 3px solid var(--cw-border);\\n border-top-color: var(--cw-primary);\\n animation: cw-spin 0.8s linear infinite;\\n}\\n\\n.cw-loading-state__title {\\n font-size: 16px;\\n font-weight: 600;\\n color: var(--cw-agent-text);\\n margin: 0;\\n}\\n\\n.cw-loading-state__subtitle {\\n font-size: 13px;\\n color: var(--cw-system-text);\\n margin: 0;\\n max-width: 240px;\\n line-height: 1.5;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport './LoadingState.css';\n\nconst LoadingState: React.FC = () => {\n return (\n <div\n className=\"cw-loading-state\"\n role=\"status\"\n aria-label=\"Connecting to chat\"\n >\n <div className=\"cw-loading-state__spinner\" aria-hidden=\"true\">\n <div className=\"cw-loading-state__spinner-ring\" />\n </div>\n <p className=\"cw-loading-state__title\">Connecting\u2026</p>\n <p className=\"cw-loading-state__subtitle\">\n Please wait while we connect you to an available agent.\n </p>\n </div>\n );\n};\n\nexport default LoadingState;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-f1f33df7\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-f1f33df7\";\n s.textContent = \".cw-start-chat-state {\\n flex: 1;\\n display: flex;\\n flex-direction: column;\\n align-items: center;\\n justify-content: center;\\n padding: 32px 24px;\\n background-color: var(--cw-background);\\n text-align: center;\\n gap: 14px;\\n}\\n\\n.cw-start-chat-state__image {\\n width: 80px;\\n height: 80px;\\n object-fit: contain;\\n border-radius: 50%;\\n margin-bottom: 4px;\\n}\\n\\n.cw-start-chat-state__title {\\n font-size: 20px;\\n font-weight: 700;\\n color: var(--cw-agent-text);\\n margin: 0;\\n}\\n\\n.cw-start-chat-state__description {\\n font-size: 14px;\\n color: var(--cw-system-text);\\n margin: 0;\\n max-width: 260px;\\n line-height: 1.6;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { Button } from '../Shared';\nimport './StartChatState.css';\n\ninterface StartChatStateProps {\n image?: string;\n title: string;\n description?: string;\n onStart: () => void;\n}\n\nconst StartChatState: React.FC<StartChatStateProps> = ({\n image,\n title,\n description,\n onStart,\n}) => {\n return (\n <div\n className=\"cw-start-chat-state\"\n role=\"main\"\n aria-label=\"Start a chat\"\n >\n {image && (\n <img\n src={image}\n alt=\"Support illustration\"\n className=\"cw-start-chat-state__image\"\n />\n )}\n <h2 className=\"cw-start-chat-state__title\">{title}</h2>\n {description && (\n <p className=\"cw-start-chat-state__description\">{description}</p>\n )}\n <Button onClick={onStart} ariaLabel=\"Start chat\">\n Start Chat\n </Button>\n </div>\n );\n};\n\nexport default StartChatState;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-a7711cdc\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-a7711cdc\";\n s.textContent = \".cw-offline-form {\\n display: flex;\\n flex-direction: column;\\n gap: 14px;\\n}\\n\\n.cw-offline-form__title {\\n font-size: 15px;\\n font-weight: 600;\\n color: var(--cw-agent-text);\\n margin: 0 0 4px;\\n}\\n\\n/* Field wrapper */\\n.cw-offline-form__field {\\n display: flex;\\n flex-direction: column;\\n gap: 5px;\\n}\\n\\n.cw-offline-form__field--checkbox {\\n gap: 4px;\\n}\\n\\n/* Label */\\n.cw-offline-form__label {\\n font-size: 13px;\\n font-weight: 500;\\n color: var(--cw-agent-text);\\n}\\n\\n.cw-offline-form__required {\\n color: #ef4444;\\n}\\n\\n/* Text input */\\n.cw-offline-form__input {\\n width: 100%;\\n padding: 8px 12px;\\n border: 1px solid var(--cw-input-border);\\n border-radius: var(--cw-button-radius);\\n background-color: var(--cw-input-background);\\n font-family: var(--cw-font-family);\\n font-size: var(--cw-font-size);\\n color: inherit;\\n box-sizing: border-box;\\n transition: border-color 0.15s ease;\\n}\\n\\n.cw-offline-form__input:focus {\\n outline: none;\\n border-color: var(--cw-primary);\\n box-shadow: 0 0 0 2px color-mix(in srgb, var(--cw-primary) 20%, transparent);\\n}\\n\\n.cw-offline-form__input--error {\\n border-color: #ef4444;\\n}\\n\\n/* Textarea */\\n.cw-offline-form__textarea {\\n width: 100%;\\n padding: 8px 12px;\\n border: 1px solid var(--cw-input-border);\\n border-radius: var(--cw-button-radius);\\n background-color: var(--cw-input-background);\\n font-family: var(--cw-font-family);\\n font-size: var(--cw-font-size);\\n color: inherit;\\n resize: vertical;\\n box-sizing: border-box;\\n transition: border-color 0.15s ease;\\n}\\n\\n.cw-offline-form__textarea:focus {\\n outline: none;\\n border-color: var(--cw-primary);\\n box-shadow: 0 0 0 2px color-mix(in srgb, var(--cw-primary) 20%, transparent);\\n}\\n\\n.cw-offline-form__textarea--error {\\n border-color: #ef4444;\\n}\\n\\n/* Select */\\n.cw-offline-form__select {\\n width: 100%;\\n padding: 8px 12px;\\n border: 1px solid var(--cw-input-border);\\n border-radius: var(--cw-button-radius);\\n background-color: var(--cw-input-background);\\n font-family: var(--cw-font-family);\\n font-size: var(--cw-font-size);\\n color: inherit;\\n box-sizing: border-box;\\n appearance: none;\\n background-image: url(\\\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E\\\");\\n background-repeat: no-repeat;\\n background-position: right 12px center;\\n padding-right: 32px;\\n cursor: pointer;\\n transition: border-color 0.15s ease;\\n}\\n\\n.cw-offline-form__select:focus {\\n outline: none;\\n border-color: var(--cw-primary);\\n box-shadow: 0 0 0 2px color-mix(in srgb, var(--cw-primary) 20%, transparent);\\n}\\n\\n.cw-offline-form__select--error {\\n border-color: #ef4444;\\n}\\n\\n/* Checkbox */\\n.cw-offline-form__checkbox-label {\\n display: flex;\\n align-items: flex-start;\\n gap: 8px;\\n cursor: pointer;\\n font-size: 13px;\\n color: var(--cw-agent-text);\\n}\\n\\n.cw-offline-form__checkbox {\\n width: 16px;\\n height: 16px;\\n accent-color: var(--cw-primary);\\n flex-shrink: 0;\\n margin-top: 1px;\\n cursor: pointer;\\n}\\n\\n.cw-offline-form__checkbox:focus-visible {\\n outline: 2px solid var(--cw-primary);\\n outline-offset: 2px;\\n}\\n\\n.cw-offline-form__checkbox-text {\\n line-height: 1.4;\\n}\\n\\n/* Error message */\\n.cw-offline-form__error {\\n font-size: 12px;\\n color: #ef4444;\\n font-weight: 500;\\n}\\n\\n/* Actions */\\n.cw-offline-form__actions {\\n margin-top: 4px;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { OfflineField, OfflineFormSchema } from '../SiteChatComponentNewErc.types';\nimport { useOfflineForm } from '../hooks';\nimport { Button } from '../Shared';\nimport './OfflineForm.css';\n\ninterface OfflineFormProps {\n schema: OfflineFormSchema;\n onSubmit: (values: Record<string, unknown>) => void;\n}\n\ninterface FieldRendererProps {\n field: OfflineField;\n value: unknown;\n error: string;\n onChange: (id: string, value: unknown) => void;\n}\n\nconst FieldRenderer: React.FC<FieldRendererProps> = ({\n field,\n value,\n error,\n onChange,\n}) => {\n const hasError = error.length > 0;\n const fieldId = `cw-offline-field-${field.id}`;\n const errorId = `${fieldId}-error`;\n\n const commonProps = {\n id: fieldId,\n className: `cw-offline-form__input${hasError ? ' cw-offline-form__input--error' : ''}`,\n 'aria-invalid': hasError,\n 'aria-describedby': hasError ? errorId : undefined,\n required: field.required,\n };\n\n if (field.type === 'textarea') {\n return (\n <div className=\"cw-offline-form__field\">\n <label htmlFor={fieldId} className=\"cw-offline-form__label\">\n {field.label}\n {field.required && (\n <span className=\"cw-offline-form__required\" aria-hidden=\"true\">\n {' '}*\n </span>\n )}\n </label>\n <textarea\n {...commonProps}\n value={String(value ?? '')}\n placeholder={field.placeholder}\n rows={3}\n onChange={(e) => onChange(field.id, e.target.value)}\n className={`cw-offline-form__textarea${hasError ? ' cw-offline-form__textarea--error' : ''}`}\n />\n {hasError && (\n <span id={errorId} className=\"cw-offline-form__error\" role=\"alert\">\n {error}\n </span>\n )}\n </div>\n );\n }\n\n if (field.type === 'select') {\n return (\n <div className=\"cw-offline-form__field\">\n <label htmlFor={fieldId} className=\"cw-offline-form__label\">\n {field.label}\n {field.required && (\n <span className=\"cw-offline-form__required\" aria-hidden=\"true\">\n {' '}*\n </span>\n )}\n </label>\n <select\n {...commonProps}\n value={String(value ?? '')}\n onChange={(e) => onChange(field.id, e.target.value)}\n className={`cw-offline-form__select${hasError ? ' cw-offline-form__select--error' : ''}`}\n >\n <option value=\"\">\n {field.placeholder ?? `Select ${field.label}`}\n </option>\n {field.options?.map((opt) => (\n <option key={opt.value} value={opt.value}>\n {opt.label}\n </option>\n ))}\n </select>\n {hasError && (\n <span id={errorId} className=\"cw-offline-form__error\" role=\"alert\">\n {error}\n </span>\n )}\n </div>\n );\n }\n\n if (field.type === 'checkbox') {\n return (\n <div className=\"cw-offline-form__field cw-offline-form__field--checkbox\">\n <label className=\"cw-offline-form__checkbox-label\" htmlFor={fieldId}>\n <input\n type=\"checkbox\"\n id={fieldId}\n checked={Boolean(value)}\n onChange={(e) => onChange(field.id, e.target.checked)}\n className=\"cw-offline-form__checkbox\"\n aria-invalid={hasError}\n aria-describedby={hasError ? errorId : undefined}\n required={field.required}\n />\n <span className=\"cw-offline-form__checkbox-text\">\n {field.label}\n {field.required && (\n <span className=\"cw-offline-form__required\" aria-hidden=\"true\">\n {' '}*\n </span>\n )}\n </span>\n </label>\n {hasError && (\n <span id={errorId} className=\"cw-offline-form__error\" role=\"alert\">\n {error}\n </span>\n )}\n </div>\n );\n }\n\n // text | email | phone\n return (\n <div className=\"cw-offline-form__field\">\n <label htmlFor={fieldId} className=\"cw-offline-form__label\">\n {field.label}\n {field.required && (\n <span className=\"cw-offline-form__required\" aria-hidden=\"true\">\n {' '}*\n </span>\n )}\n </label>\n <input\n {...commonProps}\n type={field.type}\n value={String(value ?? '')}\n placeholder={field.placeholder}\n onChange={(e) => onChange(field.id, e.target.value)}\n />\n {hasError && (\n <span id={errorId} className=\"cw-offline-form__error\" role=\"alert\">\n {error}\n </span>\n )}\n </div>\n );\n};\n\nconst OfflineForm: React.FC<OfflineFormProps> = ({ schema, onSubmit }) => {\n const { values, errors, setValue, handleSubmit } = useOfflineForm(schema);\n\n const onFormSubmit = (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault();\n handleSubmit(onSubmit);\n };\n\n return (\n <form\n className=\"cw-offline-form\"\n onSubmit={onFormSubmit}\n aria-label={schema.title}\n noValidate\n >\n <h3 className=\"cw-offline-form__title\">{schema.title}</h3>\n\n {schema.fields.map((field) => (\n <FieldRenderer\n key={field.id}\n field={field}\n value={values[field.id]}\n error={errors[field.id] ?? ''}\n onChange={setValue}\n />\n ))}\n\n <div className=\"cw-offline-form__actions\">\n <Button type=\"submit\" fullWidth>\n {schema.submitButtonText}\n </Button>\n </div>\n </form>\n );\n};\n\nexport default OfflineForm;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-03b10f90\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-03b10f90\";\n s.textContent = \".cw-offline-state {\\n flex: 1;\\n display: flex;\\n flex-direction: column;\\n background-color: var(--cw-background);\\n overflow-y: auto;\\n}\\n\\n.cw-offline-state__header {\\n display: flex;\\n flex-direction: column;\\n align-items: center;\\n text-align: center;\\n padding: 28px 24px 16px;\\n gap: 8px;\\n}\\n\\n.cw-offline-state__icon {\\n width: 56px;\\n height: 56px;\\n border-radius: 50%;\\n background-color: color-mix(in srgb, var(--cw-primary) 10%, transparent);\\n color: var(--cw-primary);\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n margin-bottom: 4px;\\n}\\n\\n.cw-offline-state__title {\\n font-size: 17px;\\n font-weight: 700;\\n color: var(--cw-agent-text);\\n margin: 0;\\n}\\n\\n.cw-offline-state__subtitle {\\n font-size: 13px;\\n color: var(--cw-system-text);\\n margin: 0;\\n line-height: 1.6;\\n max-width: 280px;\\n}\\n\\n.cw-offline-state__form-wrapper {\\n padding: 0 16px 16px;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { OfflineFormSchema } from '../SiteChatComponentNewErc.types';\nimport OfflineForm from '../OfflineForm/OfflineForm';\nimport './OfflineState.css';\n\ninterface OfflineStateProps {\n form?: OfflineFormSchema;\n onSubmit: (values: Record<string, unknown>) => void;\n}\n\nconst OfflineState: React.FC<OfflineStateProps> = ({ form, onSubmit }) => {\n return (\n <div\n className=\"cw-offline-state\"\n role=\"main\"\n aria-label=\"Business is offline\"\n >\n <div className=\"cw-offline-state__header\">\n <div className=\"cw-offline-state__icon\" aria-hidden=\"true\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"32\"\n height=\"32\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z\" />\n </svg>\n </div>\n <h2 className=\"cw-offline-state__title\">We're currently offline</h2>\n <p className=\"cw-offline-state__subtitle\">\n Please leave us a message and we'll get back to you as soon as possible.\n </p>\n </div>\n\n {form && (\n <div className=\"cw-offline-state__form-wrapper\">\n <OfflineForm schema={form} onSubmit={onSubmit} />\n </div>\n )}\n </div>\n );\n};\n\nexport default OfflineState;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-dba39629\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-dba39629\";\n s.textContent = \".cw-chat-ended-state {\\n flex: 1;\\n display: flex;\\n flex-direction: column;\\n align-items: center;\\n justify-content: center;\\n padding: 32px 24px;\\n background-color: var(--cw-background);\\n text-align: center;\\n gap: 12px;\\n}\\n\\n.cw-chat-ended-state__icon {\\n width: 56px;\\n height: 56px;\\n border-radius: 50%;\\n background-color: color-mix(in srgb, var(--cw-primary) 10%, transparent);\\n color: var(--cw-primary);\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n}\\n\\n.cw-chat-ended-state__title {\\n font-size: 17px;\\n font-weight: 700;\\n color: var(--cw-agent-text);\\n margin: 0;\\n}\\n\\n.cw-chat-ended-state__subtitle {\\n font-size: 13px;\\n color: var(--cw-system-text);\\n margin: 0;\\n max-width: 240px;\\n line-height: 1.6;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport './ChatEndedState.css';\n\nconst ChatEndedState: React.FC = () => {\n return (\n <div\n className=\"cw-chat-ended-state\"\n role=\"status\"\n aria-label=\"Chat has ended\"\n >\n <div className=\"cw-chat-ended-state__icon\" aria-hidden=\"true\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"32\"\n height=\"32\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <polyline points=\"20 6 9 17 4 12\" />\n </svg>\n </div>\n <p className=\"cw-chat-ended-state__title\">Chat Ended</p>\n <p className=\"cw-chat-ended-state__subtitle\">\n Your chat session has ended. Thank you for reaching out!\n </p>\n </div>\n );\n};\n\nexport default ChatEndedState;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-6b6fcb3b\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-6b6fcb3b\";\n s.textContent = \"/* \u2500\u2500\u2500 Root container \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\\n * Fixed to bottom-right by default so it works out-of-the-box.\\n * Override with your own positioning class if embedding differently.\\n * \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\\n.cw-root {\\n position: fixed;\\n bottom: max(24px, env(safe-area-inset-bottom));\\n right: max(24px, env(safe-area-inset-right));\\n display: flex;\\n flex-direction: column;\\n align-items: flex-end;\\n gap: 12px;\\n z-index: 9999;\\n /* Scope CSS vars and stacking context */\\n isolation: isolate;\\n font-family: var(--cw-font-family);\\n font-size: var(--cw-font-size);\\n}\\n\\n/* \u2500\u2500\u2500 Editor React Component root \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\\n * Fills the container provided by the Wix editor. No fixed positioning,\\n * no launcher button. Width & height are managed by the editor itself.\\n * \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\\n.cw-erc-root {\\n display: flex;\\n flex-direction: column;\\n width: 100%;\\n height: 100%;\\n background-color: var(--cw-background, #ffffff);\\n font-family: var(--cw-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif);\\n font-size: var(--cw-font-size, 14px);\\n overflow: hidden;\\n}\\n\\n/* Widget body fills remaining space between header and footer */\\n.cw-erc-root .cw-widget__body {\\n flex: 1;\\n display: flex;\\n flex-direction: column;\\n overflow: hidden;\\n}\\n\\n/* \u2500\u2500\u2500 Widget Panel \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\\n\\n.cw-widget {\\n display: flex;\\n flex-direction: column;\\n width: var(--cw-width);\\n height: var(--cw-height);\\n /* Clamp so it never overflows the viewport on small screens */\\n max-width: calc(100vw - 48px);\\n max-height: calc(100dvh - 96px);\\n background-color: var(--cw-background);\\n border-radius: var(--cw-border-radius);\\n box-shadow: var(--cw-shadow);\\n overflow: hidden;\\n /* Entry animation */\\n animation: cw-panel-in 0.22s ease;\\n transform-origin: bottom right;\\n}\\n\\n@keyframes cw-panel-in {\\n from {\\n opacity: 0;\\n transform: scale(0.92) translateY(10px);\\n }\\n to {\\n opacity: 1;\\n transform: scale(1) translateY(0);\\n }\\n}\\n\\n.cw-widget__body {\\n display: flex;\\n flex-direction: column;\\n flex: 1;\\n overflow: hidden;\\n}\\n\\n/* \u2500\u2500\u2500 Launcher Button \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\\n\\n.cw-launcher {\\n width: 56px;\\n height: 56px;\\n border-radius: 50%;\\n border: none;\\n background-color: var(--cw-primary);\\n color: #ffffff;\\n cursor: pointer;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);\\n flex-shrink: 0;\\n transition: transform 0.15s ease, box-shadow 0.15s ease;\\n}\\n\\n.cw-launcher:hover {\\n transform: scale(1.07);\\n box-shadow: 0 6px 20px rgba(0, 0, 0, 0.26);\\n}\\n\\n.cw-launcher:focus-visible {\\n outline: 3px solid var(--cw-primary);\\n outline-offset: 3px;\\n}\\n\\n.cw-launcher:active {\\n transform: scale(0.96);\\n}\\n\\n/* \u2500\u2500\u2500 Tablet (481px \u2013 768px): panel floats, slightly narrower margin \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\\n\\n@media (min-width: 481px) and (max-width: 768px) {\\n .cw-root {\\n bottom: max(16px, env(safe-area-inset-bottom));\\n right: max(16px, env(safe-area-inset-right));\\n }\\n\\n .cw-widget {\\n max-width: calc(100vw - 32px);\\n max-height: calc(100dvh - 80px);\\n }\\n}\\n\\n/* \u2500\u2500\u2500 Mobile (\u2264 480px): full-screen panel, launcher stays fixed \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\\n\\n@media (max-width: 480px) {\\n .cw-root {\\n bottom: 0;\\n right: 0;\\n gap: 0;\\n }\\n\\n .cw-root > .cw-launcher {\\n position: fixed;\\n bottom: max(20px, env(safe-area-inset-bottom));\\n right: max(20px, env(safe-area-inset-right));\\n }\\n\\n .cw-widget {\\n width: 100vw;\\n max-width: 100vw;\\n height: 100dvh;\\n max-height: 100dvh;\\n border-radius: 0;\\n transform-origin: bottom center;\\n }\\n}\\n\";\n document.head.appendChild(s);\n}"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAAkB;;;ACAlB,mBAAsC;AAG/B,SAAS,2BAA2B,cAAc,OAA+B;AACtF,QAAM,CAAC,MAAM,OAAO,QAAI,uBAAS,WAAW;AAE5C,QAAM,iBAAa,0BAAY,MAAM,QAAQ,IAAI,GAAG,CAAC,CAAC;AACtD,QAAM,kBAAc,0BAAY,MAAM,QAAQ,KAAK,GAAG,CAAC,CAAC;AAExD,SAAO,EAAE,MAAM,YAAY,YAAY;AACzC;;;ACNA,IAAM,cACJ;AACF,IAAM,YAAY;AAClB,IAAM,SAAS;AACf,IAAM,QAAQ;AACd,IAAM,SAAS;AACf,IAAM,gBAAgB;AAIf,IAAM,eAA0B;AAAA,EACrC,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,aAAa;AAAA,EACb,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,cAAc;AAAA,EACd,cAAc;AAChB;AAMO,SAAS,eACd,SACA,OACA,QACwB;AACxB,QAAM,QAAmB,EAAE,GAAG,cAAc,GAAG,QAAQ;AAEvD,SAAO;AAAA;AAAA,IAEL,gBAAgB,MAAM;AAAA,IACtB,mBAAmB,MAAM;AAAA,IACzB,gBAAgB,MAAM;AAAA,IACtB,eAAe,MAAM;AAAA,IACrB,oBAAoB,MAAM;AAAA,IAC1B,kBAAkB,MAAM;AAAA,IACxB,qBAAqB,MAAM;AAAA,IAC3B,mBAAmB,MAAM;AAAA,IACzB,oBAAoB,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8CAAC,SAAI,WAAU,mBAAmB,qBAAW,GAAE;AAAA;AAAA;AAAA,IACjD;AAAA,IAID,CAAC,QACA;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,SAAS;AAAA,QACT,cAAW;AAAA,QACX,iBAAc;AAAA,QACd,MAAK;AAAA,QAEL;AAAA,UAAC;AAAA;AAAA,YACC,OAAM;AAAA,YACN,OAAM;AAAA,YACN,QAAO;AAAA,YACP,SAAQ;AAAA,YACR,MAAK;AAAA,YACL,eAAY;AAAA,YAEZ,wDAAC,UAAK,GAAE,sEAAqE;AAAA;AAAA,QAC/E;AAAA;AAAA,IACF;AAAA,KAEJ;AAEJ,CAAC;AAED,wBAAwB,cAAc;",
|
|
4
|
+
"sourcesContent": ["export { SiteChatComponentNewErc } from './SiteChatComponentNewErc';\nexport type { ChatWidgetPropsErc, UseChatWidgetReturnErc } from './SiteChatComponentNewErc.types';\nexport { useSiteChatComponentNewErc } from './useSiteChatComponentNewErc';\n", "import React from 'react';\nimport { ChatWidgetPropsErc, EditorReactComponentThemeClassesProps } from './SiteChatComponentNewErc.types';\nimport { useSiteChatComponentNewErc } from './useSiteChatComponentNewErc';\nimport { buildThemeVars } from './utils';\nimport Header from './Header/Header';\nimport Footer from './Footer/Footer';\nimport { MessageList } from './Messages';\nimport { LoadingState, StartChatState, OfflineState, ChatEndedState } from './States';\nimport './SiteChatComponentNewErc.css';\n\nexport const SiteChatComponentNewErc = React.forwardRef<HTMLDivElement, ChatWidgetPropsErc>(({\n title,\n subtitle,\n image,\n theme,\n messages,\n offlineForm,\n defaultOpen = false,\n loading = false,\n chatEnded = false,\n width,\n height,\n onSend,\n onAttachment,\n onOfflineSubmit,\n onClose,\n isEditorReactComponent = false,\n editorReactComponentThemeProps,\n}, ref) => {\n const { open, openWidget, closeWidget } = useSiteChatComponentNewErc(defaultOpen);\n const themeVars = buildThemeVars(theme, width, height);\n\n const handleClose = () => {\n closeWidget();\n onClose?.();\n };\n\n /**\n * Derive what to render from data:\n * loading=true \u2192 spinner\n * offlineForm provided \u2192 offline form\n * no messages yet \u2192 Start Chat screen\n * messages present \u2192 conversation (+ optional ended banner)\n */\n const renderBody = (\n convClasses?: EditorReactComponentThemeClassesProps['conversation'],\n footerClasses?: EditorReactComponentThemeClassesProps['footer'],\n ) => {\n if (loading) {\n return <LoadingState />;\n }\n\n if (offlineForm) {\n return <OfflineState form={offlineForm} onSubmit={onOfflineSubmit} />;\n }\n\n if (messages.length === 0) {\n return (\n <StartChatState\n image={image}\n title={title}\n description={subtitle}\n onStart={() => onSend('__start_chat__')}\n />\n );\n }\n\n return (\n <>\n <MessageList messages={messages} ercClasses={convClasses} />\n {chatEnded ? <ChatEndedState /> : <Footer onSend={onSend} onAttachment={onAttachment} ercClasses={footerClasses} />}\n </>\n );\n };\n\n // \u2500\u2500\u2500 Editor React Component render \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n // No launcher button. The component always fills its Wix editor container.\n // Width/height are managed by the editor so we exclude them from the style.\n // CSS custom properties are always applied as a base; ERC class names from\n // editorReactComponentThemeProps layer on top via normal CSS specificity.\n if (isEditorReactComponent) {\n const ercTheme = editorReactComponentThemeProps;\n const ercStyle = buildThemeVars(theme) as React.CSSProperties;\n return (\n <div ref={ref} className=\"cw-erc-root\" style={ercStyle}>\n <Header\n image={image}\n title={title}\n subtitle={subtitle}\n onClose={onClose ?? (() => {})}\n ercClasses={ercTheme?.header}\n />\n <div\n className={[\n 'cw-widget__body',\n ercTheme?.conversation.conversationClassName,\n ].filter(Boolean).join(' ')}\n >\n {renderBody(ercTheme?.conversation, ercTheme?.footer)}\n </div>\n </div>\n );\n }\n\n // \u2500\u2500\u2500 Custom Element / standalone render \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n return (\n <div ref={ref} className=\"cw-root\" style={themeVars as React.CSSProperties}>\n {/* Chat panel */}\n {open && (\n <div\n className=\"cw-widget\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label={`${title} chat widget`}\n >\n <Header\n image={image}\n title={title}\n subtitle={subtitle}\n onClose={handleClose}\n />\n <div className=\"cw-widget__body\">{renderBody()}</div>\n </div>\n )}\n\n {/* Launcher button \u2014 only visible when the panel is closed */}\n {!open && (\n <button\n className=\"cw-launcher\"\n onClick={openWidget}\n aria-label=\"Open chat\"\n aria-haspopup=\"dialog\"\n type=\"button\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"26\"\n height=\"26\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path d=\"M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z\" />\n </svg>\n </button>\n )}\n </div>\n );\n});\n\nSiteChatComponentNewErc.displayName = 'SiteChatComponentNewErc';\n\n\n", "import { useState, useCallback } from 'react';\nimport { UseChatWidgetReturnErc } from './SiteChatComponentNewErc.types';\n\nexport function useSiteChatComponentNewErc(defaultOpen = false): UseChatWidgetReturnErc {\n const [open, setOpen] = useState(defaultOpen);\n\n const openWidget = useCallback(() => setOpen(true), []);\n const closeWidget = useCallback(() => setOpen(false), []);\n\n return { open, openWidget, closeWidget };\n}\n", "import { ChatTheme } from '../SiteChatComponentNewErc.types';\n\n// \u2500\u2500\u2500 Fixed layout / typography constants \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n// These are intentionally not themeable \u2014 only colours and border widths change.\nconst FONT_FAMILY =\n \"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif\";\nconst FONT_SIZE = '14px';\nconst SHADOW = '0 4px 24px rgba(0,0,0,0.12)';\nconst WIDTH = '400px';\nconst HEIGHT = '600px';\nconst HEADER_HEIGHT = '64px';\n\n// \u2500\u2500\u2500 Default colour theme \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport const defaultTheme: ChatTheme = {\n primary: '#4f46e5',\n background: '#ffffff',\n surface: '#f9fafb',\n border: '#e5e7eb',\n userBubble: '#4f46e5',\n userText: '#ffffff',\n agentBubble: '#f3f4f6',\n agentText: '#111827',\n systemText: '#6b7280',\n inputBackground: '#ffffff',\n inputBorder: '#d1d5db',\n buttonRadius: 8,\n borderRadius: 12,\n};\n\n/**\n * Merges a partial user theme with the defaults and returns a style object\n * containing CSS custom properties. Layout/font values are always fixed.\n */\nexport function buildThemeVars(\n partial?: Partial<ChatTheme>,\n width?: number | string,\n height?: number | string,\n): Record<string, string> {\n const theme: ChatTheme = { ...defaultTheme, ...partial };\n\n return {\n // Colours\n '--cw-primary': theme.primary,\n '--cw-background': theme.background,\n '--cw-surface': theme.surface,\n '--cw-border': theme.border,\n '--cw-user-bubble': theme.userBubble,\n '--cw-user-text': theme.userText,\n '--cw-agent-bubble': theme.agentBubble,\n '--cw-agent-text': theme.agentText,\n '--cw-system-text': theme.systemText,\n '--cw-input-background': theme.inputBackground,\n '--cw-input-border': theme.inputBorder,\n // Border radii\n '--cw-button-radius': `${theme.buttonRadius}px`,\n '--cw-border-radius': `${theme.borderRadius}px`,\n // Fixed constants \u2014 not exposed as theme props\n '--cw-font-family': FONT_FAMILY,\n '--cw-font-size': FONT_SIZE,\n '--cw-shadow': SHADOW,\n '--cw-width': width !== undefined ? (typeof width === 'number' ? `${width}px` : width) : WIDTH,\n '--cw-height': height !== undefined ? (typeof height === 'number' ? `${height}px` : height) : HEIGHT,\n '--cw-header-height': HEADER_HEIGHT,\n };\n}\n", "import { SystemEventType } from '../SiteChatComponentNewErc.types';\n\nconst systemEventLabels: Record<SystemEventType, string> = {\n AGENT_JOINED: 'Agent joined',\n AGENT_LEFT: 'Agent left',\n USER_JOINED: 'You joined',\n USER_LEFT: 'You left',\n CHAT_ENDED: 'Chat ended',\n CHAT_REOPENED: 'Chat reopened',\n CHAT_TRANSFERRED: 'Chat transferred',\n WAITING_FOR_AGENT: 'Waiting for an agent',\n};\n\nexport function getSystemLabel(event: string): string {\n return systemEventLabels[event as SystemEventType] ?? event;\n}\n\nexport function isSystemEventType(value: string): value is SystemEventType {\n return value in systemEventLabels;\n}\n", "/**\n * Format a Unix timestamp (ms) into a human-readable time string, e.g. \"2:34 PM\".\n */\nexport function formatTime(timestamp: number): string {\n return new Date(timestamp).toLocaleTimeString([], {\n hour: '2-digit',\n minute: '2-digit',\n });\n}\n\n/**\n * Generate a simple unique id.\n */\nexport function generateId(): string {\n return `${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;\n}\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-759620f0\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-759620f0\";\n s.textContent = \".cw-header {\\n display: flex;\\n align-items: center;\\n justify-content: space-between;\\n padding: 0 16px;\\n height: var(--cw-header-height);\\n background-color: var(--cw-primary);\\n color: #ffffff;\\n flex-shrink: 0;\\n border-radius: var(--cw-border-radius) var(--cw-border-radius) 0 0;\\n}\\n\\n.cw-header__identity {\\n display: flex;\\n align-items: center;\\n gap: 12px;\\n min-width: 0;\\n}\\n\\n.cw-header__avatar {\\n width: 40px;\\n height: 40px;\\n border-radius: 50%;\\n object-fit: cover;\\n flex-shrink: 0;\\n border: 2px solid rgba(255, 255, 255, 0.4);\\n}\\n\\n.cw-header__text {\\n display: flex;\\n flex-direction: column;\\n min-width: 0;\\n}\\n\\n.cw-header__title {\\n font-size: 15px;\\n font-weight: 600;\\n white-space: nowrap;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n line-height: 1.3;\\n}\\n\\n.cw-header__subtitle {\\n font-size: 12px;\\n opacity: 0.85;\\n white-space: nowrap;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n line-height: 1.3;\\n}\\n\\n.cw-header__close {\\n background: none;\\n border: none;\\n cursor: pointer;\\n color: #ffffff;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n padding: 6px;\\n border-radius: 50%;\\n flex-shrink: 0;\\n transition: background-color 0.15s ease;\\n}\\n\\n.cw-header__close:hover {\\n background-color: rgba(255, 255, 255, 0.15);\\n}\\n\\n.cw-header__close:focus-visible {\\n outline: 2px solid #ffffff;\\n outline-offset: 2px;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { HeaderProps } from '../SiteChatComponentNewErc.types';\nimport './Header.css';\n\nconst Header: React.FC<HeaderProps> = ({ image, title, subtitle, onClose, ercClasses }) => {\n return (\n <header className={['cw-header', ercClasses?.headerClassName].filter(Boolean).join(' ')} role=\"banner\">\n <div className=\"cw-header__identity\">\n {image && (\n <img\n src={image}\n alt={`${title} avatar`}\n className={['cw-header__avatar', ercClasses?.imageClassName].filter(Boolean).join(' ')}\n />\n )}\n <div className=\"cw-header__text\">\n <span className={['cw-header__title', ercClasses?.titleClassName].filter(Boolean).join(' ')}>{title}</span>\n {subtitle && (\n <span className={['cw-header__subtitle', ercClasses?.subtitleClassName].filter(Boolean).join(' ')}>{subtitle}</span>\n )}\n </div>\n </div>\n <button\n className={['cw-header__close', ercClasses?.closeButtonClassName].filter(Boolean).join(' ')}\n onClick={onClose}\n aria-label=\"Close chat\"\n type=\"button\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n </button>\n </header>\n );\n};\n\nexport default Header;\n", "import React, { useRef, useState, useCallback } from 'react';\nimport { FooterProps } from '../SiteChatComponentNewErc.types';\nimport './Footer.css';\n\nconst Footer: React.FC<FooterProps> = ({ onSend, onAttachment, disabled, ercClasses }) => {\n const [text, setText] = useState('');\n const [stagedFiles, setStagedFiles] = useState<File[]>([]);\n const fileInputRef = useRef<HTMLInputElement | null>(null);\n const textareaRef = useRef<HTMLTextAreaElement | null>(null);\n\n const isEmpty = text.trim().length === 0 && stagedFiles.length === 0;\n\n const handleSend = useCallback(() => {\n if (!isEmpty && !disabled) {\n if (text.trim().length > 0) {\n onSend(text.trim());\n setText('');\n }\n stagedFiles.forEach((file) => onAttachment(file));\n setStagedFiles([]);\n if (textareaRef.current) {\n textareaRef.current.style.height = 'auto';\n textareaRef.current.focus();\n }\n }\n }, [isEmpty, disabled, onSend, text, stagedFiles, onAttachment]);\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent<HTMLTextAreaElement>) => {\n if (e.key === 'Enter' && !e.shiftKey) {\n e.preventDefault();\n handleSend();\n }\n },\n [handleSend],\n );\n\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLTextAreaElement>) => {\n setText(e.target.value);\n // Auto-grow textarea up to ~120px\n const el = e.target;\n el.style.height = 'auto';\n el.style.height = `${Math.min(el.scrollHeight, 120)}px`;\n },\n [],\n );\n\n const handleAttachmentClick = useCallback(() => {\n fileInputRef.current?.click();\n }, []);\n\n const handleFileChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const files = Array.from(e.target.files ?? []);\n if (files.length > 0) {\n setStagedFiles((prev) => [...prev, ...files]);\n }\n // Reset so same file can be re-selected\n if (fileInputRef.current) {\n fileInputRef.current.value = '';\n }\n },\n [],\n );\n\n const handleRemoveStagedFile = useCallback((index: number) => {\n setStagedFiles((prev) => prev.filter((_, i) => i !== index));\n }, []);\n\n return (\n <footer className={['cw-footer', ercClasses?.footerClassName].filter(Boolean).join(' ')} role=\"contentinfo\">\n {/* Staged file chips */}\n {stagedFiles.length > 0 && (\n <ul className=\"cw-footer__file-list\" aria-label=\"Files to send\">\n {stagedFiles.map((file, i) => (\n <li key={`${file.name}-${i}`} className=\"cw-footer__file-chip\">\n <span className=\"cw-footer__file-chip-name\" title={file.name}>\n {file.name}\n </span>\n <button\n className=\"cw-footer__file-chip-remove\"\n onClick={() => handleRemoveStagedFile(i)}\n aria-label={`Remove ${file.name}`}\n type=\"button\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\">\n <path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\" />\n </svg>\n </button>\n </li>\n ))}\n </ul>\n )}\n\n <div className=\"cw-footer__controls\">\n <button\n className={['cw-footer__attach-btn', ercClasses?.attachmentButtonClassName].filter(Boolean).join(' ')}\n onClick={handleAttachmentClick}\n aria-label=\"Attach file\"\n type=\"button\"\n disabled={disabled}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48\" />\n </svg>\n </button>\n\n <textarea\n ref={textareaRef}\n className={['cw-footer__input', ercClasses?.inputClassName].filter(Boolean).join(' ')}\n value={text}\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n placeholder=\"Type a message\u2026\"\n aria-label=\"Message input\"\n rows={1}\n disabled={disabled}\n />\n\n <button\n className={[\n 'cw-footer__send-btn',\n isEmpty || disabled ? 'cw-footer__send-btn--disabled' : '',\n ercClasses?.sendButtonClassName,\n ].filter(Boolean).join(' ')}\n onClick={handleSend}\n aria-label=\"Send message\"\n type=\"button\"\n disabled={isEmpty || disabled}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path d=\"M2.01 21L23 12 2.01 3 2 10l15 2-15 2z\" />\n </svg>\n </button>\n\n {/* Hidden file input */}\n <input\n ref={fileInputRef}\n type=\"file\"\n className=\"cw-footer__file-input\"\n onChange={handleFileChange}\n aria-hidden=\"true\"\n tabIndex={-1}\n multiple\n />\n </div>\n </footer>\n );\n};\n\nexport default Footer;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-c86a5c82\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-c86a5c82\";\n s.textContent = \".cw-footer {\\n display: flex;\\n flex-direction: column;\\n gap: 6px;\\n padding: 10px 12px;\\n background-color: var(--cw-background);\\n border-top: 1px solid var(--cw-border);\\n flex-shrink: 0;\\n}\\n\\n.cw-footer__controls {\\n display: flex;\\n align-items: flex-end;\\n gap: 8px;\\n}\\n\\n/* \u2500\u2500\u2500 Staged file chips \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\\n\\n.cw-footer__file-list {\\n list-style: none;\\n margin: 0;\\n padding: 0;\\n display: flex;\\n flex-wrap: wrap;\\n gap: 6px;\\n}\\n\\n.cw-footer__file-chip {\\n display: flex;\\n align-items: center;\\n gap: 4px;\\n background-color: color-mix(in srgb, var(--cw-primary) 12%, transparent);\\n border: 1px solid color-mix(in srgb, var(--cw-primary) 30%, transparent);\\n border-radius: 999px;\\n padding: 3px 8px 3px 10px;\\n font-size: 12px;\\n color: var(--cw-primary);\\n max-width: 200px;\\n}\\n\\n.cw-footer__file-chip-name {\\n overflow: hidden;\\n text-overflow: ellipsis;\\n white-space: nowrap;\\n}\\n\\n.cw-footer__file-chip-remove {\\n background: none;\\n border: none;\\n cursor: pointer;\\n padding: 2px;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n color: inherit;\\n border-radius: 50%;\\n flex-shrink: 0;\\n opacity: 0.7;\\n transition: opacity 0.15s ease, background-color 0.15s ease;\\n}\\n\\n.cw-footer__file-chip-remove:hover {\\n opacity: 1;\\n background-color: color-mix(in srgb, var(--cw-primary) 15%, transparent);\\n}\\n\\n.cw-footer__file-chip-remove:focus-visible {\\n outline: 2px solid var(--cw-primary);\\n outline-offset: 1px;\\n}\\n\\n.cw-footer__input {\\n flex: 1;\\n resize: none;\\n border: 1px solid var(--cw-input-border);\\n border-radius: var(--cw-button-radius);\\n background-color: var(--cw-input-background);\\n font-family: var(--cw-font-family);\\n font-size: var(--cw-font-size);\\n color: inherit;\\n padding: 8px 12px;\\n line-height: 1.5;\\n min-height: 38px;\\n max-height: 120px;\\n overflow-y: auto;\\n transition: border-color 0.15s ease;\\n}\\n\\n.cw-footer__input:focus {\\n outline: none;\\n border-color: var(--cw-primary);\\n box-shadow: 0 0 0 2px color-mix(in srgb, var(--cw-primary) 20%, transparent);\\n}\\n\\n.cw-footer__input:disabled {\\n opacity: 0.5;\\n cursor: not-allowed;\\n}\\n\\n.cw-footer__attach-btn,\\n.cw-footer__send-btn {\\n background: none;\\n border: none;\\n cursor: pointer;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n padding: 8px;\\n border-radius: 50%;\\n flex-shrink: 0;\\n transition: background-color 0.15s ease, color 0.15s ease;\\n color: var(--cw-primary);\\n margin-bottom: 1px;\\n}\\n\\n.cw-footer__attach-btn:hover,\\n.cw-footer__send-btn:not(.cw-footer__send-btn--disabled):hover {\\n background-color: color-mix(in srgb, var(--cw-primary) 10%, transparent);\\n}\\n\\n.cw-footer__attach-btn:focus-visible,\\n.cw-footer__send-btn:focus-visible {\\n outline: 2px solid var(--cw-primary);\\n outline-offset: 2px;\\n}\\n\\n.cw-footer__attach-btn:disabled {\\n opacity: 0.4;\\n cursor: not-allowed;\\n}\\n\\n.cw-footer__send-btn--disabled {\\n opacity: 0.35;\\n cursor: not-allowed;\\n}\\n\\n.cw-footer__file-input {\\n display: none;\\n}\\n\";\n document.head.appendChild(s);\n}", "import { useEffect, useRef, useState } from 'react';\n\n/**\n * Attaches a ref to a scrollable container. Automatically scrolls to the\n * bottom when new content is added, unless the user has manually scrolled up.\n */\nexport function useAutoScroll<T extends HTMLElement>(\n dependency: unknown,\n): React.MutableRefObject<T | null> {\n const ref = useRef<T | null>(null);\n const userScrolledUp = useRef(false);\n\n useEffect(() => {\n const el = ref.current;\n if (!el) return;\n\n const handleScroll = () => {\n const atBottom =\n el.scrollHeight - el.scrollTop - el.clientHeight < 64;\n userScrolledUp.current = !atBottom;\n };\n\n el.addEventListener('scroll', handleScroll, { passive: true });\n return () => el.removeEventListener('scroll', handleScroll);\n }, []);\n\n useEffect(() => {\n const el = ref.current;\n if (!el || userScrolledUp.current) return;\n\n el.scrollTo({ top: el.scrollHeight, behavior: 'smooth' });\n }, [dependency]);\n\n return ref;\n}\n\n/**\n * Expose a way for the consumer to force-scroll to bottom (e.g. when\n * the user clicks a \"scroll to bottom\" button).\n */\nexport function useAutoScrollWithControl<T extends HTMLElement>(\n dependency: unknown,\n): {\n ref: React.MutableRefObject<T | null>;\n scrollToBottom: () => void;\n isScrolledUp: boolean;\n} {\n const ref = useRef<T | null>(null);\n const userScrolledUp = useRef(false);\n const [isScrolledUp, setIsScrolledUp] = useState(false);\n\n useEffect(() => {\n const el = ref.current;\n if (!el) return;\n\n const handleScroll = () => {\n const atBottom =\n el.scrollHeight - el.scrollTop - el.clientHeight < 64;\n userScrolledUp.current = !atBottom;\n setIsScrolledUp(!atBottom);\n };\n\n el.addEventListener('scroll', handleScroll, { passive: true });\n return () => el.removeEventListener('scroll', handleScroll);\n }, []);\n\n useEffect(() => {\n const el = ref.current;\n if (!el || userScrolledUp.current) return;\n el.scrollTo({ top: el.scrollHeight, behavior: 'smooth' });\n }, [dependency]);\n\n const scrollToBottom = () => {\n const el = ref.current;\n if (!el) return;\n userScrolledUp.current = false;\n setIsScrolledUp(false);\n el.scrollTo({ top: el.scrollHeight, behavior: 'smooth' });\n };\n\n return { ref, scrollToBottom, isScrolledUp };\n}\n", "import { useState, useCallback } from 'react';\nimport { OfflineField, OfflineFormSchema } from '../SiteChatComponentNewErc.types';\n\ntype FieldValues = Record<string, unknown>;\ntype FieldErrors = Record<string, string>;\n\nfunction validateField(field: OfflineField, value: unknown): string {\n if (field.required) {\n if (field.type === 'checkbox' && !value) {\n return `${field.label} is required.`;\n }\n if (\n field.type !== 'checkbox' &&\n (value === undefined || value === null || String(value).trim() === '')\n ) {\n return `${field.label} is required.`;\n }\n }\n\n if (field.type === 'email') {\n const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n if (value && !emailRegex.test(String(value))) {\n return 'Please enter a valid email address.';\n }\n }\n\n if (field.type === 'phone') {\n const phoneRegex = /^\\+?[\\d\\s\\-().]{7,20}$/;\n if (value && !phoneRegex.test(String(value))) {\n return 'Please enter a valid phone number.';\n }\n }\n\n return '';\n}\n\nexport function useOfflineForm(schema: OfflineFormSchema) {\n const initialValues: FieldValues = {};\n for (const field of schema.fields) {\n initialValues[field.id] = field.type === 'checkbox' ? false : '';\n }\n\n const [values, setValues] = useState<FieldValues>(initialValues);\n const [errors, setErrors] = useState<FieldErrors>({});\n const [submitted, setSubmitted] = useState(false);\n\n const setValue = useCallback(\n (id: string, value: unknown) => {\n setValues((prev) => ({ ...prev, [id]: value }));\n\n if (submitted) {\n const field = schema.fields.find((f) => f.id === id);\n if (field) {\n const error = validateField(field, value);\n setErrors((prev) => ({ ...prev, [id]: error }));\n }\n }\n },\n [schema.fields, submitted],\n );\n\n const validate = useCallback((): boolean => {\n const newErrors: FieldErrors = {};\n let valid = true;\n\n for (const field of schema.fields) {\n const error = validateField(field, values[field.id]);\n newErrors[field.id] = error;\n if (error) valid = false;\n }\n\n setErrors(newErrors);\n return valid;\n }, [schema.fields, values]);\n\n const handleSubmit = useCallback(\n (onSubmit: (values: FieldValues) => void) => {\n setSubmitted(true);\n if (validate()) {\n onSubmit(values);\n }\n },\n [validate, values],\n );\n\n const reset = useCallback(() => {\n setValues(initialValues);\n setErrors({});\n setSubmitted(false);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return { values, errors, setValue, handleSubmit, reset };\n}\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-488069e4\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-488069e4\";\n s.textContent = \".cw-user-message {\\n display: flex;\\n flex-direction: column;\\n align-items: flex-end;\\n max-width: 75%;\\n align-self: flex-end;\\n gap: 3px;\\n}\\n\\n.cw-user-message__bubble {\\n background-color: var(--cw-user-bubble);\\n color: var(--cw-user-text);\\n padding: 10px 14px;\\n border-radius: 18px 18px 4px 18px;\\n font-size: var(--cw-font-size);\\n line-height: 1.5;\\n word-break: break-word;\\n white-space: pre-wrap;\\n}\\n\\n.cw-user-message__time {\\n font-size: 11px;\\n color: var(--cw-system-text);\\n padding-right: 2px;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { MessageProps } from '../SiteChatComponentNewErc.types';\nimport { formatTime } from '../utils';\nimport './UserMessage.css';\n\ninterface UserMessageProps {\n message: MessageProps;\n ercClassName?: string;\n}\n\nconst UserMessage: React.FC<UserMessageProps> = ({ message, ercClassName }) => {\n return (\n <div className={['cw-user-message', ercClassName].filter(Boolean).join(' ')} role=\"listitem\" aria-label=\"Your message\">\n <div className=\"cw-user-message__bubble\">{message.message}</div>\n {message.timestamp !== undefined && (\n <span className=\"cw-user-message__time\">\n {formatTime(message.timestamp)}\n </span>\n )}\n </div>\n );\n};\n\nexport default UserMessage;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-ad01373e\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-ad01373e\";\n s.textContent = \".cw-avatar {\\n border-radius: 50%;\\n flex-shrink: 0;\\n display: inline-flex;\\n align-items: center;\\n justify-content: center;\\n}\\n\\n.cw-avatar--image {\\n object-fit: cover;\\n}\\n\\n.cw-avatar--initials {\\n background-color: var(--cw-primary);\\n color: #ffffff;\\n font-weight: 600;\\n user-select: none;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport './Avatar.css';\n\ninterface AvatarProps {\n src?: string;\n name?: string;\n size?: number;\n}\n\nfunction getInitials(name: string): string {\n return name\n .split(' ')\n .slice(0, 2)\n .map((w) => w[0])\n .join('')\n .toUpperCase();\n}\n\nconst Avatar: React.FC<AvatarProps> = ({ src, name, size = 32 }) => {\n const style = {\n width: `${size}px`,\n height: `${size}px`,\n fontSize: `${Math.round(size * 0.38)}px`,\n };\n\n if (src) {\n return (\n <img\n src={src}\n alt={name ? `${name} avatar` : 'Agent avatar'}\n className=\"cw-avatar cw-avatar--image\"\n style={style}\n />\n );\n }\n\n return (\n <span\n className=\"cw-avatar cw-avatar--initials\"\n aria-label={name ? `${name} avatar` : 'Agent avatar'}\n style={style}\n >\n {name ? getInitials(name) : 'A'}\n </span>\n );\n};\n\nexport default Avatar;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-0aa71f6d\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-0aa71f6d\";\n s.textContent = \".cw-button {\\n display: inline-flex;\\n align-items: center;\\n justify-content: center;\\n gap: 8px;\\n padding: 10px 20px;\\n border: none;\\n border-radius: var(--cw-button-radius);\\n font-family: var(--cw-font-family);\\n font-size: var(--cw-font-size);\\n font-weight: 600;\\n cursor: pointer;\\n transition: opacity 0.15s ease, transform 0.1s ease;\\n white-space: nowrap;\\n}\\n\\n.cw-button:focus-visible {\\n outline: 2px solid var(--cw-primary);\\n outline-offset: 3px;\\n}\\n\\n.cw-button:active:not(:disabled) {\\n transform: scale(0.98);\\n}\\n\\n.cw-button:disabled {\\n opacity: 0.45;\\n cursor: not-allowed;\\n}\\n\\n.cw-button--primary {\\n background-color: var(--cw-primary);\\n color: #ffffff;\\n}\\n\\n.cw-button--primary:hover:not(:disabled) {\\n opacity: 0.88;\\n}\\n\\n.cw-button--secondary {\\n background-color: var(--cw-surface);\\n color: var(--cw-primary);\\n border: 1px solid var(--cw-border);\\n}\\n\\n.cw-button--secondary:hover:not(:disabled) {\\n background-color: var(--cw-border);\\n}\\n\\n.cw-button--full {\\n width: 100%;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport './Button.css';\n\ninterface ButtonProps {\n children: React.ReactNode;\n onClick?: () => void;\n variant?: 'primary' | 'secondary';\n disabled?: boolean;\n type?: 'button' | 'submit' | 'reset';\n fullWidth?: boolean;\n ariaLabel?: string;\n}\n\nconst Button: React.FC<ButtonProps> = ({\n children,\n onClick,\n variant = 'primary',\n disabled = false,\n type = 'button',\n fullWidth = false,\n ariaLabel,\n}) => {\n return (\n <button\n className={`cw-button cw-button--${variant}${fullWidth ? ' cw-button--full' : ''}`}\n onClick={onClick}\n disabled={disabled}\n type={type}\n aria-label={ariaLabel}\n >\n {children}\n </button>\n );\n};\n\nexport default Button;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-f5aad44b\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-f5aad44b\";\n s.textContent = \".cw-agent-message {\\n display: flex;\\n align-items: flex-end;\\n gap: 8px;\\n max-width: 75%;\\n align-self: flex-start;\\n}\\n\\n.cw-agent-message__content {\\n display: flex;\\n flex-direction: column;\\n gap: 3px;\\n}\\n\\n.cw-agent-message__name {\\n font-size: 11px;\\n font-weight: 600;\\n color: var(--cw-system-text);\\n padding-left: 2px;\\n}\\n\\n.cw-agent-message__bubble {\\n background-color: var(--cw-agent-bubble);\\n color: var(--cw-agent-text);\\n padding: 10px 14px;\\n border-radius: 18px 18px 18px 4px;\\n font-size: var(--cw-font-size);\\n line-height: 1.5;\\n word-break: break-word;\\n white-space: pre-wrap;\\n}\\n\\n.cw-agent-message__time {\\n font-size: 11px;\\n color: var(--cw-system-text);\\n padding-left: 2px;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { MessageProps } from '../SiteChatComponentNewErc.types';\nimport { formatTime } from '../utils';\nimport { Avatar } from '../Shared';\nimport './AgentMessage.css';\n\ninterface AgentMessageProps {\n message: MessageProps;\n ercClassName?: string;\n}\n\nconst AgentMessage: React.FC<AgentMessageProps> = ({ message, ercClassName }) => {\n return (\n <div\n className={['cw-agent-message', ercClassName].filter(Boolean).join(' ')}\n role=\"listitem\"\n aria-label={`Message from ${message.senderName ?? 'Agent'}`}\n >\n <Avatar name={message.senderName} size={32} />\n <div className=\"cw-agent-message__content\">\n {message.senderName && (\n <span className=\"cw-agent-message__name\">{message.senderName}</span>\n )}\n <div className=\"cw-agent-message__bubble\">{message.message}</div>\n {message.timestamp !== undefined && (\n <span className=\"cw-agent-message__time\">\n {formatTime(message.timestamp)}\n </span>\n )}\n </div>\n </div>\n );\n};\n\nexport default AgentMessage;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-631d733c\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-631d733c\";\n s.textContent = \".cw-system-message {\\n display: flex;\\n align-items: center;\\n gap: 10px;\\n align-self: stretch;\\n padding: 4px 8px;\\n}\\n\\n.cw-system-message__line {\\n flex: 1;\\n border-top: 1px dashed var(--cw-border);\\n}\\n\\n.cw-system-message__text {\\n font-size: 11px;\\n color: var(--cw-system-text);\\n white-space: nowrap;\\n flex-shrink: 0;\\n font-style: italic;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { MessageProps } from '../SiteChatComponentNewErc.types';\nimport { getSystemLabel } from '../utils';\nimport './SystemMessage.css';\n\ninterface SystemMessageProps {\n message: MessageProps;\n ercClassName?: string;\n}\n\nconst SystemMessage: React.FC<SystemMessageProps> = ({ message, ercClassName }) => {\n const label = message.message\n ? getSystemLabel(message.message)\n : message.message ?? '';\n\n return (\n <div\n className={['cw-system-message', ercClassName].filter(Boolean).join(' ')}\n role=\"listitem\"\n aria-label={`System notification: ${label}`}\n >\n <span className=\"cw-system-message__line\" aria-hidden=\"true\" />\n <span className=\"cw-system-message__text\">{label}</span>\n <span className=\"cw-system-message__line\" aria-hidden=\"true\" />\n </div>\n );\n};\n\nexport default SystemMessage;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-daabdc64\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-daabdc64\";\n s.textContent = \".cw-attachment-message {\\n display: flex;\\n flex-direction: column;\\n gap: 3px;\\n align-self: flex-start;\\n max-width: 80%;\\n}\\n\\n.cw-attachment-message--user {\\n align-self: flex-end;\\n align-items: flex-end;\\n}\\n\\n.cw-attachment-message__card {\\n display: flex;\\n align-items: center;\\n gap: 10px;\\n background-color: var(--cw-agent-bubble);\\n border: 1px solid var(--cw-border);\\n border-radius: 12px;\\n padding: 10px 14px;\\n}\\n\\n.cw-attachment-message--user .cw-attachment-message__card {\\n background-color: var(--cw-user-bubble);\\n border-color: transparent;\\n color: var(--cw-user-text);\\n}\\n\\n.cw-attachment-message__icon {\\n flex-shrink: 0;\\n opacity: 0.75;\\n display: flex;\\n align-items: center;\\n}\\n\\n.cw-attachment-message__info {\\n display: flex;\\n flex-direction: column;\\n min-width: 0;\\n flex: 1;\\n}\\n\\n.cw-attachment-message__name {\\n font-size: 13px;\\n font-weight: 600;\\n white-space: nowrap;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n}\\n\\n.cw-attachment-message__label {\\n font-size: 11px;\\n opacity: 0.65;\\n}\\n\\n.cw-attachment-message__open-btn {\\n background-color: var(--cw-primary);\\n color: #ffffff;\\n border: none;\\n border-radius: 6px;\\n padding: 5px 12px;\\n font-family: var(--cw-font-family);\\n font-size: 12px;\\n font-weight: 600;\\n cursor: pointer;\\n flex-shrink: 0;\\n transition: opacity 0.15s ease;\\n}\\n\\n.cw-attachment-message--user .cw-attachment-message__open-btn {\\n background-color: rgba(255, 255, 255, 0.25);\\n color: #ffffff;\\n}\\n\\n.cw-attachment-message__open-btn:hover {\\n opacity: 0.85;\\n}\\n\\n.cw-attachment-message__open-btn:focus-visible {\\n outline: 2px solid var(--cw-primary);\\n outline-offset: 2px;\\n}\\n\\n.cw-attachment-message__time {\\n font-size: 11px;\\n color: var(--cw-system-text);\\n padding-left: 2px;\\n}\\n\\n.cw-attachment-message__time--right {\\n padding-left: 0;\\n padding-right: 2px;\\n align-self: flex-end;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { MessageProps } from '../SiteChatComponentNewErc.types';\nimport { formatTime } from '../utils';\nimport './AttachmentMessage.css';\n\ninterface AttachmentMessageProps {\n message: MessageProps;\n}\n\nconst AttachmentMessage: React.FC<AttachmentMessageProps> = ({ message }) => {\n // Support both `item` (new) and `attachment` (legacy) field names\n const attachment = message.item ?? message.attachment;\n if (!attachment) return null;\n\n const handleOpen = () => {\n window.open(attachment.url, '_blank', 'noopener,noreferrer');\n };\n\n return (\n <div\n className={`cw-attachment-message${message.senderType === 'user' ? ' cw-attachment-message--user' : ''}`}\n role=\"listitem\"\n aria-label={`Attachment: ${attachment.name}`}\n >\n <div className=\"cw-attachment-message__card\">\n <div className=\"cw-attachment-message__icon\" aria-hidden=\"true\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z\" />\n <polyline points=\"14 2 14 8 20 8\" />\n </svg>\n </div>\n <div className=\"cw-attachment-message__info\">\n <span className=\"cw-attachment-message__name\">{attachment.name}</span>\n <span className=\"cw-attachment-message__label\">Attachment</span>\n </div>\n <button\n className=\"cw-attachment-message__open-btn\"\n onClick={handleOpen}\n aria-label={`Open attachment ${attachment.name}`}\n type=\"button\"\n >\n Open\n </button>\n </div>\n {message.timestamp !== undefined && (\n <span\n className={`cw-attachment-message__time${message.senderType === 'user' ? ' cw-attachment-message__time--right' : ''}`}\n >\n {formatTime(message.timestamp)}\n </span>\n )}\n </div>\n );\n};\n\nexport default AttachmentMessage;\n", "import React from 'react';\nimport { EditorReactComponentThemeClassesProps, MessageProps } from '../SiteChatComponentNewErc.types';\nimport UserMessage from './UserMessage';\nimport AgentMessage from './AgentMessage';\nimport SystemMessage from './SystemMessage';\nimport AttachmentMessage from './AttachmentMessage';\n\ninterface MessageRendererProps {\n message: MessageProps;\n ercClasses?: EditorReactComponentThemeClassesProps['conversation'];\n}\n\nconst MessageRenderer: React.FC<MessageRendererProps> = ({ message, ercClasses }) => {\n if (message.messageType === 'ATTACHMENT') {\n return <AttachmentMessage message={message} />;\n }\n\n switch (message.senderType) {\n case 'user':\n return <UserMessage message={message} ercClassName={ercClasses?.userMessageClassName} />;\n case 'agent':\n return <AgentMessage message={message} ercClassName={ercClasses?.agentMessageClassName} />;\n case 'system':\n return <SystemMessage message={message} ercClassName={ercClasses?.systemMessageClassName} />;\n default:\n return null;\n }\n};\n\nexport default MessageRenderer;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-0408335f\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-0408335f\";\n s.textContent = \".cw-message-list {\\n flex: 1;\\n display: flex;\\n flex-direction: column;\\n gap: 10px;\\n overflow-y: auto;\\n padding: 16px;\\n background-color: var(--cw-background);\\n scroll-behavior: smooth;\\n}\\n\\n/* Scrollbar styling */\\n.cw-message-list::-webkit-scrollbar {\\n width: 5px;\\n}\\n\\n.cw-message-list::-webkit-scrollbar-track {\\n background: transparent;\\n}\\n\\n.cw-message-list::-webkit-scrollbar-thumb {\\n background-color: var(--cw-border);\\n border-radius: 10px;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { EditorReactComponentThemeClassesProps, MessageProps } from '../SiteChatComponentNewErc.types';\nimport { useAutoScroll } from '../hooks';\nimport MessageRenderer from './MessageRenderer';\nimport './MessageList.css';\n\ninterface MessageListProps {\n messages: MessageProps[];\n ercClasses?: EditorReactComponentThemeClassesProps['conversation'];\n}\n\nconst MessageList: React.FC<MessageListProps> = ({ messages, ercClasses }) => {\n const scrollRef = useAutoScroll<HTMLDivElement>(messages);\n\n return (\n <div\n ref={scrollRef}\n className={['cw-message-list', ercClasses?.messageListClassName].filter(Boolean).join(' ')}\n role=\"list\"\n aria-label=\"Chat messages\"\n aria-live=\"polite\"\n aria-relevant=\"additions\"\n >\n {messages.map((msg, index) => (\n <MessageRenderer\n key={msg._id ?? `${msg.timestamp ?? index}-${index}`}\n message={msg}\n ercClasses={ercClasses}\n />\n ))}\n {/* TypingIndicator removed \u2014 no longer part of the public API */}\n </div>\n );\n};\n\nexport default MessageList;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-0a740655\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-0a740655\";\n s.textContent = \"@keyframes cw-bounce {\\n 0%, 60%, 100% {\\n transform: translateY(0);\\n }\\n 30% {\\n transform: translateY(-6px);\\n }\\n}\\n\\n.cw-typing-indicator {\\n align-self: flex-start;\\n}\\n\\n.cw-typing-indicator__bubble {\\n display: inline-flex;\\n align-items: center;\\n gap: 4px;\\n background-color: var(--cw-agent-bubble);\\n border-radius: 18px 18px 18px 4px;\\n padding: 10px 14px;\\n}\\n\\n.cw-typing-indicator__dot {\\n display: block;\\n width: 7px;\\n height: 7px;\\n border-radius: 50%;\\n background-color: var(--cw-system-text);\\n animation: cw-bounce 1.2s infinite ease-in-out;\\n}\\n\\n.cw-typing-indicator__dot:nth-child(2) {\\n animation-delay: 0.2s;\\n}\\n\\n.cw-typing-indicator__dot:nth-child(3) {\\n animation-delay: 0.4s;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport './TypingIndicator.css';\n\nconst TypingIndicator: React.FC = () => {\n return (\n <div\n className=\"cw-typing-indicator\"\n role=\"status\"\n aria-label=\"Agent is typing\"\n >\n <div className=\"cw-typing-indicator__bubble\">\n <span className=\"cw-typing-indicator__dot\" />\n <span className=\"cw-typing-indicator__dot\" />\n <span className=\"cw-typing-indicator__dot\" />\n </div>\n </div>\n );\n};\n\nexport default TypingIndicator;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-7bd88a9a\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-7bd88a9a\";\n s.textContent = \"@keyframes cw-spin {\\n to {\\n transform: rotate(360deg);\\n }\\n}\\n\\n.cw-loading-state {\\n flex: 1;\\n display: flex;\\n flex-direction: column;\\n align-items: center;\\n justify-content: center;\\n padding: 32px;\\n background-color: var(--cw-background);\\n text-align: center;\\n gap: 12px;\\n}\\n\\n.cw-loading-state__spinner {\\n width: 48px;\\n height: 48px;\\n}\\n\\n.cw-loading-state__spinner-ring {\\n width: 48px;\\n height: 48px;\\n border-radius: 50%;\\n border: 3px solid var(--cw-border);\\n border-top-color: var(--cw-primary);\\n animation: cw-spin 0.8s linear infinite;\\n}\\n\\n.cw-loading-state__title {\\n font-size: 16px;\\n font-weight: 600;\\n color: var(--cw-agent-text);\\n margin: 0;\\n}\\n\\n.cw-loading-state__subtitle {\\n font-size: 13px;\\n color: var(--cw-system-text);\\n margin: 0;\\n max-width: 240px;\\n line-height: 1.5;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport './LoadingState.css';\n\nconst LoadingState: React.FC = () => {\n return (\n <div\n className=\"cw-loading-state\"\n role=\"status\"\n aria-label=\"Connecting to chat\"\n >\n <div className=\"cw-loading-state__spinner\" aria-hidden=\"true\">\n <div className=\"cw-loading-state__spinner-ring\" />\n </div>\n <p className=\"cw-loading-state__title\">Connecting\u2026</p>\n <p className=\"cw-loading-state__subtitle\">\n Please wait while we connect you to an available agent.\n </p>\n </div>\n );\n};\n\nexport default LoadingState;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-f1f33df7\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-f1f33df7\";\n s.textContent = \".cw-start-chat-state {\\n flex: 1;\\n display: flex;\\n flex-direction: column;\\n align-items: center;\\n justify-content: center;\\n padding: 32px 24px;\\n background-color: var(--cw-background);\\n text-align: center;\\n gap: 14px;\\n}\\n\\n.cw-start-chat-state__image {\\n width: 80px;\\n height: 80px;\\n object-fit: contain;\\n border-radius: 50%;\\n margin-bottom: 4px;\\n}\\n\\n.cw-start-chat-state__title {\\n font-size: 20px;\\n font-weight: 700;\\n color: var(--cw-agent-text);\\n margin: 0;\\n}\\n\\n.cw-start-chat-state__description {\\n font-size: 14px;\\n color: var(--cw-system-text);\\n margin: 0;\\n max-width: 260px;\\n line-height: 1.6;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { Button } from '../Shared';\nimport './StartChatState.css';\n\ninterface StartChatStateProps {\n image?: string;\n title: string;\n description?: string;\n onStart: () => void;\n}\n\nconst StartChatState: React.FC<StartChatStateProps> = ({\n image,\n title,\n description,\n onStart,\n}) => {\n return (\n <div\n className=\"cw-start-chat-state\"\n role=\"main\"\n aria-label=\"Start a chat\"\n >\n {image && (\n <img\n src={image}\n alt=\"Support illustration\"\n className=\"cw-start-chat-state__image\"\n />\n )}\n <h2 className=\"cw-start-chat-state__title\">{title}</h2>\n {description && (\n <p className=\"cw-start-chat-state__description\">{description}</p>\n )}\n <Button onClick={onStart} ariaLabel=\"Start chat\">\n Start Chat\n </Button>\n </div>\n );\n};\n\nexport default StartChatState;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-a7711cdc\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-a7711cdc\";\n s.textContent = \".cw-offline-form {\\n display: flex;\\n flex-direction: column;\\n gap: 14px;\\n}\\n\\n.cw-offline-form__title {\\n font-size: 15px;\\n font-weight: 600;\\n color: var(--cw-agent-text);\\n margin: 0 0 4px;\\n}\\n\\n/* Field wrapper */\\n.cw-offline-form__field {\\n display: flex;\\n flex-direction: column;\\n gap: 5px;\\n}\\n\\n.cw-offline-form__field--checkbox {\\n gap: 4px;\\n}\\n\\n/* Label */\\n.cw-offline-form__label {\\n font-size: 13px;\\n font-weight: 500;\\n color: var(--cw-agent-text);\\n}\\n\\n.cw-offline-form__required {\\n color: #ef4444;\\n}\\n\\n/* Text input */\\n.cw-offline-form__input {\\n width: 100%;\\n padding: 8px 12px;\\n border: 1px solid var(--cw-input-border);\\n border-radius: var(--cw-button-radius);\\n background-color: var(--cw-input-background);\\n font-family: var(--cw-font-family);\\n font-size: var(--cw-font-size);\\n color: inherit;\\n box-sizing: border-box;\\n transition: border-color 0.15s ease;\\n}\\n\\n.cw-offline-form__input:focus {\\n outline: none;\\n border-color: var(--cw-primary);\\n box-shadow: 0 0 0 2px color-mix(in srgb, var(--cw-primary) 20%, transparent);\\n}\\n\\n.cw-offline-form__input--error {\\n border-color: #ef4444;\\n}\\n\\n/* Textarea */\\n.cw-offline-form__textarea {\\n width: 100%;\\n padding: 8px 12px;\\n border: 1px solid var(--cw-input-border);\\n border-radius: var(--cw-button-radius);\\n background-color: var(--cw-input-background);\\n font-family: var(--cw-font-family);\\n font-size: var(--cw-font-size);\\n color: inherit;\\n resize: vertical;\\n box-sizing: border-box;\\n transition: border-color 0.15s ease;\\n}\\n\\n.cw-offline-form__textarea:focus {\\n outline: none;\\n border-color: var(--cw-primary);\\n box-shadow: 0 0 0 2px color-mix(in srgb, var(--cw-primary) 20%, transparent);\\n}\\n\\n.cw-offline-form__textarea--error {\\n border-color: #ef4444;\\n}\\n\\n/* Select */\\n.cw-offline-form__select {\\n width: 100%;\\n padding: 8px 12px;\\n border: 1px solid var(--cw-input-border);\\n border-radius: var(--cw-button-radius);\\n background-color: var(--cw-input-background);\\n font-family: var(--cw-font-family);\\n font-size: var(--cw-font-size);\\n color: inherit;\\n box-sizing: border-box;\\n appearance: none;\\n background-image: url(\\\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E\\\");\\n background-repeat: no-repeat;\\n background-position: right 12px center;\\n padding-right: 32px;\\n cursor: pointer;\\n transition: border-color 0.15s ease;\\n}\\n\\n.cw-offline-form__select:focus {\\n outline: none;\\n border-color: var(--cw-primary);\\n box-shadow: 0 0 0 2px color-mix(in srgb, var(--cw-primary) 20%, transparent);\\n}\\n\\n.cw-offline-form__select--error {\\n border-color: #ef4444;\\n}\\n\\n/* Checkbox */\\n.cw-offline-form__checkbox-label {\\n display: flex;\\n align-items: flex-start;\\n gap: 8px;\\n cursor: pointer;\\n font-size: 13px;\\n color: var(--cw-agent-text);\\n}\\n\\n.cw-offline-form__checkbox {\\n width: 16px;\\n height: 16px;\\n accent-color: var(--cw-primary);\\n flex-shrink: 0;\\n margin-top: 1px;\\n cursor: pointer;\\n}\\n\\n.cw-offline-form__checkbox:focus-visible {\\n outline: 2px solid var(--cw-primary);\\n outline-offset: 2px;\\n}\\n\\n.cw-offline-form__checkbox-text {\\n line-height: 1.4;\\n}\\n\\n/* Error message */\\n.cw-offline-form__error {\\n font-size: 12px;\\n color: #ef4444;\\n font-weight: 500;\\n}\\n\\n/* Actions */\\n.cw-offline-form__actions {\\n margin-top: 4px;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { OfflineField, OfflineFormSchema } from '../SiteChatComponentNewErc.types';\nimport { useOfflineForm } from '../hooks';\nimport { Button } from '../Shared';\nimport './OfflineForm.css';\n\ninterface OfflineFormProps {\n schema: OfflineFormSchema;\n onSubmit: (values: Record<string, unknown>) => void;\n}\n\ninterface FieldRendererProps {\n field: OfflineField;\n value: unknown;\n error: string;\n onChange: (id: string, value: unknown) => void;\n}\n\nconst FieldRenderer: React.FC<FieldRendererProps> = ({\n field,\n value,\n error,\n onChange,\n}) => {\n const hasError = error.length > 0;\n const fieldId = `cw-offline-field-${field.id}`;\n const errorId = `${fieldId}-error`;\n\n const commonProps = {\n id: fieldId,\n className: `cw-offline-form__input${hasError ? ' cw-offline-form__input--error' : ''}`,\n 'aria-invalid': hasError,\n 'aria-describedby': hasError ? errorId : undefined,\n required: field.required,\n };\n\n if (field.type === 'textarea') {\n return (\n <div className=\"cw-offline-form__field\">\n <label htmlFor={fieldId} className=\"cw-offline-form__label\">\n {field.label}\n {field.required && (\n <span className=\"cw-offline-form__required\" aria-hidden=\"true\">\n {' '}*\n </span>\n )}\n </label>\n <textarea\n {...commonProps}\n value={String(value ?? '')}\n placeholder={field.placeholder}\n rows={3}\n onChange={(e) => onChange(field.id, e.target.value)}\n className={`cw-offline-form__textarea${hasError ? ' cw-offline-form__textarea--error' : ''}`}\n />\n {hasError && (\n <span id={errorId} className=\"cw-offline-form__error\" role=\"alert\">\n {error}\n </span>\n )}\n </div>\n );\n }\n\n if (field.type === 'select') {\n return (\n <div className=\"cw-offline-form__field\">\n <label htmlFor={fieldId} className=\"cw-offline-form__label\">\n {field.label}\n {field.required && (\n <span className=\"cw-offline-form__required\" aria-hidden=\"true\">\n {' '}*\n </span>\n )}\n </label>\n <select\n {...commonProps}\n value={String(value ?? '')}\n onChange={(e) => onChange(field.id, e.target.value)}\n className={`cw-offline-form__select${hasError ? ' cw-offline-form__select--error' : ''}`}\n >\n <option value=\"\">\n {field.placeholder ?? `Select ${field.label}`}\n </option>\n {field.options?.map((opt) => (\n <option key={opt.value} value={opt.value}>\n {opt.label}\n </option>\n ))}\n </select>\n {hasError && (\n <span id={errorId} className=\"cw-offline-form__error\" role=\"alert\">\n {error}\n </span>\n )}\n </div>\n );\n }\n\n if (field.type === 'checkbox') {\n return (\n <div className=\"cw-offline-form__field cw-offline-form__field--checkbox\">\n <label className=\"cw-offline-form__checkbox-label\" htmlFor={fieldId}>\n <input\n type=\"checkbox\"\n id={fieldId}\n checked={Boolean(value)}\n onChange={(e) => onChange(field.id, e.target.checked)}\n className=\"cw-offline-form__checkbox\"\n aria-invalid={hasError}\n aria-describedby={hasError ? errorId : undefined}\n required={field.required}\n />\n <span className=\"cw-offline-form__checkbox-text\">\n {field.label}\n {field.required && (\n <span className=\"cw-offline-form__required\" aria-hidden=\"true\">\n {' '}*\n </span>\n )}\n </span>\n </label>\n {hasError && (\n <span id={errorId} className=\"cw-offline-form__error\" role=\"alert\">\n {error}\n </span>\n )}\n </div>\n );\n }\n\n // text | email | phone\n return (\n <div className=\"cw-offline-form__field\">\n <label htmlFor={fieldId} className=\"cw-offline-form__label\">\n {field.label}\n {field.required && (\n <span className=\"cw-offline-form__required\" aria-hidden=\"true\">\n {' '}*\n </span>\n )}\n </label>\n <input\n {...commonProps}\n type={field.type}\n value={String(value ?? '')}\n placeholder={field.placeholder}\n onChange={(e) => onChange(field.id, e.target.value)}\n />\n {hasError && (\n <span id={errorId} className=\"cw-offline-form__error\" role=\"alert\">\n {error}\n </span>\n )}\n </div>\n );\n};\n\nconst OfflineForm: React.FC<OfflineFormProps> = ({ schema, onSubmit }) => {\n const { values, errors, setValue, handleSubmit } = useOfflineForm(schema);\n\n const onFormSubmit = (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault();\n handleSubmit(onSubmit);\n };\n\n return (\n <form\n className=\"cw-offline-form\"\n onSubmit={onFormSubmit}\n aria-label={schema.title}\n noValidate\n >\n <h3 className=\"cw-offline-form__title\">{schema.title}</h3>\n\n {schema.fields.map((field) => (\n <FieldRenderer\n key={field.id}\n field={field}\n value={values[field.id]}\n error={errors[field.id] ?? ''}\n onChange={setValue}\n />\n ))}\n\n <div className=\"cw-offline-form__actions\">\n <Button type=\"submit\" fullWidth>\n {schema.submitButtonText}\n </Button>\n </div>\n </form>\n );\n};\n\nexport default OfflineForm;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-03b10f90\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-03b10f90\";\n s.textContent = \".cw-offline-state {\\n flex: 1;\\n display: flex;\\n flex-direction: column;\\n background-color: var(--cw-background);\\n overflow-y: auto;\\n}\\n\\n.cw-offline-state__header {\\n display: flex;\\n flex-direction: column;\\n align-items: center;\\n text-align: center;\\n padding: 28px 24px 16px;\\n gap: 8px;\\n}\\n\\n.cw-offline-state__icon {\\n width: 56px;\\n height: 56px;\\n border-radius: 50%;\\n background-color: color-mix(in srgb, var(--cw-primary) 10%, transparent);\\n color: var(--cw-primary);\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n margin-bottom: 4px;\\n}\\n\\n.cw-offline-state__title {\\n font-size: 17px;\\n font-weight: 700;\\n color: var(--cw-agent-text);\\n margin: 0;\\n}\\n\\n.cw-offline-state__subtitle {\\n font-size: 13px;\\n color: var(--cw-system-text);\\n margin: 0;\\n line-height: 1.6;\\n max-width: 280px;\\n}\\n\\n.cw-offline-state__form-wrapper {\\n padding: 0 16px 16px;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport { OfflineFormSchema } from '../SiteChatComponentNewErc.types';\nimport OfflineForm from '../OfflineForm/OfflineForm';\nimport './OfflineState.css';\n\ninterface OfflineStateProps {\n form?: OfflineFormSchema;\n onSubmit: (values: Record<string, unknown>) => void;\n}\n\nconst OfflineState: React.FC<OfflineStateProps> = ({ form, onSubmit }) => {\n return (\n <div\n className=\"cw-offline-state\"\n role=\"main\"\n aria-label=\"Business is offline\"\n >\n <div className=\"cw-offline-state__header\">\n <div className=\"cw-offline-state__icon\" aria-hidden=\"true\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"32\"\n height=\"32\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z\" />\n </svg>\n </div>\n <h2 className=\"cw-offline-state__title\">We're currently offline</h2>\n <p className=\"cw-offline-state__subtitle\">\n Please leave us a message and we'll get back to you as soon as possible.\n </p>\n </div>\n\n {form && (\n <div className=\"cw-offline-state__form-wrapper\">\n <OfflineForm schema={form} onSubmit={onSubmit} />\n </div>\n )}\n </div>\n );\n};\n\nexport default OfflineState;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-dba39629\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-dba39629\";\n s.textContent = \".cw-chat-ended-state {\\n flex: 1;\\n display: flex;\\n flex-direction: column;\\n align-items: center;\\n justify-content: center;\\n padding: 32px 24px;\\n background-color: var(--cw-background);\\n text-align: center;\\n gap: 12px;\\n}\\n\\n.cw-chat-ended-state__icon {\\n width: 56px;\\n height: 56px;\\n border-radius: 50%;\\n background-color: color-mix(in srgb, var(--cw-primary) 10%, transparent);\\n color: var(--cw-primary);\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n}\\n\\n.cw-chat-ended-state__title {\\n font-size: 17px;\\n font-weight: 700;\\n color: var(--cw-agent-text);\\n margin: 0;\\n}\\n\\n.cw-chat-ended-state__subtitle {\\n font-size: 13px;\\n color: var(--cw-system-text);\\n margin: 0;\\n max-width: 240px;\\n line-height: 1.6;\\n}\\n\";\n document.head.appendChild(s);\n}", "import React from 'react';\nimport './ChatEndedState.css';\n\nconst ChatEndedState: React.FC = () => {\n return (\n <div\n className=\"cw-chat-ended-state\"\n role=\"status\"\n aria-label=\"Chat has ended\"\n >\n <div className=\"cw-chat-ended-state__icon\" aria-hidden=\"true\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"32\"\n height=\"32\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <polyline points=\"20 6 9 17 4 12\" />\n </svg>\n </div>\n <p className=\"cw-chat-ended-state__title\">Chat Ended</p>\n <p className=\"cw-chat-ended-state__subtitle\">\n Your chat session has ended. Thank you for reaching out!\n </p>\n </div>\n );\n};\n\nexport default ChatEndedState;\n", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-6b6fcb3b\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-6b6fcb3b\";\n s.textContent = \"/* \u2500\u2500\u2500 Root container \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\\n * Fixed to bottom-right by default so it works out-of-the-box.\\n * Override with your own positioning class if embedding differently.\\n * \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\\n.cw-root {\\n position: fixed;\\n bottom: max(24px, env(safe-area-inset-bottom));\\n right: max(24px, env(safe-area-inset-right));\\n display: flex;\\n flex-direction: column;\\n align-items: flex-end;\\n gap: 12px;\\n z-index: 9999;\\n /* Scope CSS vars and stacking context */\\n isolation: isolate;\\n font-family: var(--cw-font-family);\\n font-size: var(--cw-font-size);\\n}\\n\\n/* \u2500\u2500\u2500 Editor React Component root \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\\n * Fills the container provided by the Wix editor. No fixed positioning,\\n * no launcher button. Width & height are managed by the editor itself.\\n * \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\\n.cw-erc-root {\\n display: flex;\\n flex-direction: column;\\n width: 100%;\\n height: 100%;\\n background-color: var(--cw-background, #ffffff);\\n font-family: var(--cw-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif);\\n font-size: var(--cw-font-size, 14px);\\n overflow: hidden;\\n}\\n\\n/* Widget body fills remaining space between header and footer */\\n.cw-erc-root .cw-widget__body {\\n flex: 1;\\n display: flex;\\n flex-direction: column;\\n overflow: hidden;\\n}\\n\\n/* \u2500\u2500\u2500 Widget Panel \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\\n\\n.cw-widget {\\n display: flex;\\n flex-direction: column;\\n width: var(--cw-width);\\n height: var(--cw-height);\\n /* Clamp so it never overflows the viewport on small screens */\\n max-width: calc(100vw - 48px);\\n max-height: calc(100dvh - 96px);\\n background-color: var(--cw-background);\\n border-radius: var(--cw-border-radius);\\n box-shadow: var(--cw-shadow);\\n overflow: hidden;\\n /* Entry animation */\\n animation: cw-panel-in 0.22s ease;\\n transform-origin: bottom right;\\n}\\n\\n@keyframes cw-panel-in {\\n from {\\n opacity: 0;\\n transform: scale(0.92) translateY(10px);\\n }\\n to {\\n opacity: 1;\\n transform: scale(1) translateY(0);\\n }\\n}\\n\\n.cw-widget__body {\\n display: flex;\\n flex-direction: column;\\n flex: 1;\\n overflow: hidden;\\n}\\n\\n/* \u2500\u2500\u2500 Launcher Button \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\\n\\n.cw-launcher {\\n width: 56px;\\n height: 56px;\\n border-radius: 50%;\\n border: none;\\n background-color: var(--cw-primary);\\n color: #ffffff;\\n cursor: pointer;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);\\n flex-shrink: 0;\\n transition: transform 0.15s ease, box-shadow 0.15s ease;\\n}\\n\\n.cw-launcher:hover {\\n transform: scale(1.07);\\n box-shadow: 0 6px 20px rgba(0, 0, 0, 0.26);\\n}\\n\\n.cw-launcher:focus-visible {\\n outline: 3px solid var(--cw-primary);\\n outline-offset: 3px;\\n}\\n\\n.cw-launcher:active {\\n transform: scale(0.96);\\n}\\n\\n/* \u2500\u2500\u2500 Tablet (481px \u2013 768px): panel floats, slightly narrower margin \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\\n\\n@media (min-width: 481px) and (max-width: 768px) {\\n .cw-root {\\n bottom: max(16px, env(safe-area-inset-bottom));\\n right: max(16px, env(safe-area-inset-right));\\n }\\n\\n .cw-widget {\\n max-width: calc(100vw - 32px);\\n max-height: calc(100dvh - 80px);\\n }\\n}\\n\\n/* \u2500\u2500\u2500 Mobile (\u2264 480px): full-screen panel, launcher stays fixed \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\\n\\n@media (max-width: 480px) {\\n .cw-root {\\n bottom: 0;\\n right: 0;\\n gap: 0;\\n }\\n\\n .cw-root > .cw-launcher {\\n position: fixed;\\n bottom: max(20px, env(safe-area-inset-bottom));\\n right: max(20px, env(safe-area-inset-right));\\n }\\n\\n .cw-widget {\\n width: 100vw;\\n max-width: 100vw;\\n height: 100dvh;\\n max-height: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ACA;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,SAAS;AAAA,QACT,cAAW;AAAA,QACX,iBAAc;AAAA,QACd,MAAK;AAAA,QAEL;AAAA,UAAC;AAAA;AAAA,YACC,OAAM;AAAA,YACN,OAAM;AAAA,YACN,QAAO;AAAA,YACP,SAAQ;AAAA,YACR,MAAK;AAAA,YACL,eAAY;AAAA,YAEZ,wDAAC,UAAK,GAAE,sEAAqE;AAAA;AAAA,QAC/E;AAAA;AAAA,IACF;AAAA,KAEJ;AAEJ,CAAC;AAED,wBAAwB,cAAc;",
|
|
6
6
|
"names": ["import_react", "import_react", "import_jsx_runtime", "import_react", "import_react", "import_jsx_runtime", "import_jsx_runtime", "import_jsx_runtime", "import_jsx_runtime", "import_jsx_runtime", "import_jsx_runtime", "import_jsx_runtime", "import_jsx_runtime", "import_jsx_runtime", "import_jsx_runtime", "import_jsx_runtime", "import_jsx_runtime", "import_jsx_runtime", "import_jsx_runtime", "import_jsx_runtime", "React"]
|
|
7
7
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -2524,7 +2524,7 @@ var SiteChatComponentNewErc = import_react10.default.forwardRef(({
|
|
|
2524
2524
|
};
|
|
2525
2525
|
if (isEditorReactComponent) {
|
|
2526
2526
|
const ercTheme = editorReactComponentThemeProps;
|
|
2527
|
-
const ercStyle =
|
|
2527
|
+
const ercStyle = buildThemeVars2(theme);
|
|
2528
2528
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { ref, className: "cw-erc-root", style: ercStyle, children: [
|
|
2529
2529
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2530
2530
|
Header_default2,
|