@bcrumbs.net/bc-chat 1.0.67 → 1.0.69

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/build/index.d.ts CHANGED
@@ -79,7 +79,9 @@ interface ChatProps {
79
79
  replyMessageContent?: string;
80
80
  /** Called when the reply preview is dismissed */
81
81
  onCancelReplyMessage?: () => void;
82
+ /** When provided, renders a disabled/error state message at the bottom of the list */
83
+ errorMessage?: string;
82
84
  }
83
- declare const Chat: ({ config, messages, sendMessage, debug, minimize, onReachingUp, agentsIdsAvatarsMap, actionChips, noteMode, onNoteSend, onCloseNoteMode, searchPattern, notePlaceholder, searchMatchNo, onSearchMatchCount, onMessageReply, replyMessageTitle, replyMessageContent, onCancelReplyMessage, }: ChatProps) => react_jsx_runtime.JSX.Element;
85
+ declare const Chat: ({ config, messages, sendMessage, debug, minimize, onReachingUp, agentsIdsAvatarsMap, actionChips, noteMode, onNoteSend, onCloseNoteMode, searchPattern, notePlaceholder, searchMatchNo, onSearchMatchCount, onMessageReply, replyMessageTitle, replyMessageContent, onCancelReplyMessage, errorMessage, }: ChatProps) => react_jsx_runtime.JSX.Element;
84
86
 
85
87
  export { Chat as BCChat };
package/build/index.es.js CHANGED
@@ -67,7 +67,7 @@ import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import i,{useCal
67
67
  display: none;
68
68
  position: absolute;
69
69
  ${e=>e.isMyMessage&&!e.isRTL||!e.isMyMessage&&e.isRTL?"left: -40px;":"right: -40px;"}
70
- top: calc(50% - 12px);
70
+ top: calc(50% - 14px);
71
71
  border: none;
72
72
  transform: ${e=>e.isMyMessage&&!e.isRTL||!e.isMyMessage&&e.isRTL?"scaleX(-1)":"none"};
73
73
  background: transparent;
@@ -79,6 +79,7 @@ import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import i,{useCal
79
79
  line-height: var(--bc-chat-lineHeight-xs);
80
80
  flex-direction: ${e=>e.isRTL?"row-reverse":"row"};
81
81
  transition: background-color 0.2s ease, color 0.2s ease;
82
+ margin: 0;
82
83
 
83
84
  &:hover,
84
85
  &:focus-visible {
@@ -110,7 +111,7 @@ i {
110
111
  align-items: center;
111
112
  gap: 6px;
112
113
  ${e=>e.isMyMessage?"flex-direction: row;":"flex-direction: row-reverse;"}
113
- `,U=d.div`
114
+ `,V=d.div`
114
115
  width: 32px;
115
116
  height: 32px;
116
117
  border-radius: 6px;
@@ -119,11 +120,11 @@ i {
119
120
  align-items: center;
120
121
  justify-content: center;
121
122
  padding: 8px;
122
- `,K=d.div`
123
+ `,U=d.div`
123
124
  display: flex;
124
125
  flex-direction: column;
125
126
  gap: 4px;
126
- `,V=d.span`
127
+ `,K=d.span`
127
128
  font-size: var(--bc-chat-fontSize-xs);
128
129
  font-weight: var(--bc-chat-fontWeight-regular);
129
130
  line-height: var(--bc-chat-lineHeight-xs);
@@ -168,7 +169,7 @@ i {
168
169
  max-width: 60%;
169
170
  `,$=d.span`
170
171
  direction: ${e=>"arb"===e.language?"rtl":"ltr"};
171
- `,_={document:({message:t,config:i,onReply:o})=>{const a=i.isAgent===t.isAgent,[c,d]=r(""),g=s((()=>{try{const e=(t.content||"").split("/");return decodeURIComponent(e[e.length-1]||"file")}catch{return"file"}}),[t.content]);l((()=>{let e=!1;const n=t.content;if(n)return fetch(n,{method:"HEAD"}).then((n=>{const t=n.headers.get("content-length");if(!t)return;const i=Number(t);var o;Number.isFinite(i)&&(e||d((o=i)<1024?`${o} B`:o<1048576?`${(o/1024).toFixed(1)}KB`:o<1073741824?`${(o/1048576).toFixed(1)}MB`:`${(o/1073741824).toFixed(1)}GB`))})).catch((()=>{})),()=>{e=!0}}),[t.content]);const p=c?`${c} - ${j[i.language]?.download}`:j[i.language]?.download;return e(z,{isMyMessage:a,createdAt:t.createdAt,message:t,config:i,onReply:o,children:e(G,{href:t.content,target:"_blank",download:g,rel:"noopener noreferrer",isMyMessage:a,children:n(J,{isMyMessage:a,children:[e(U,{children:e(H,{})}),n(K,{children:[e(V,{children:g}),e(Q,{children:p})]})]})})})},image:({message:n,config:t,onReply:i})=>{const o=t.isAgent===n.isAgent;return e(z,{className:"bc-mediaMessage",isMyMessage:o,createdAt:n.createdAt,message:n,config:t,onReply:i,children:e("a",{href:n.content,target:"_blank",rel:"noreferrer",children:e("img",{src:n.content,alt:"message content",style:{width:"100%",height:"auto",borderRadius:"8px"}})})})},location:({message:t,config:i,onReply:o})=>{const a=i.isAgent===t.isAgent;return e(z,{isMyMessage:a,createdAt:t.createdAt,message:t,config:i,onReply:o,children:e(W,{href:"https://www.google.com/maps/?q="+t.content,target:"_blank",rel:"noopener noreferrer",children:n(Y,{children:[e(q,{color:"000000"}),e(O,{children:"Open location"})]})})})},text:N,video:P,audio:P,interactive:null,template:({message:t,config:i,onReply:o})=>{const a=s((()=>{try{return JSON.parse(t.content)}catch(e){return void console.log(e.message)}}),[t]),r=i.isAgent===t.isAgent;return n(z,{isMyMessage:r,createdAt:t.createdAt,message:t,config:i,onReply:o,children:[e("b",{children:"Template message:"})," ",a.name," ",a.language?.code?`/ ${a.language.code}`:null]})},note:({message:t})=>{const i=h(t.content);return n(X,{children:[e($,{language:i,children:t.content})," ",e(w,{createdAt:t.createdAt})]})},button:N};function ee(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}ee('/* Shared styles between agent and client messages */\n.bc-otherMessage,\n.bc-myMessage {\n margin: 24px;\n font-size: var(--bc-chat-body-4-size);\n line-height: var(--bc-chat-body-4-lineheight);\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n gap: 12px;\n}\n.bc-otherMessage div p,\n.bc-myMessage div p {\n padding: 0;\n margin: 0;\n}\n\n/* Styles for agent messages */\n.bc-otherMessage {\n justify-content: flex-start;\n}\n.bc-otherMessage:first-child {\n flex: 1 0 50%;\n}\n.bc-otherMessage > :nth-child(2) {\n flex: 0 1 auto;\n max-width: 85%;\n}\n\n/* Styles for other messages */\n.bc-note {\n text-align: center;\n gap: 5px;\n}\n\n.bc-myMessage {\n justify-content: flex-end;\n}\n.bc-myMessage > div:not(.bc-debugCon),\n.bc-myMessage .bc-locationMessage,\n.bc-myMessage audio {\n color: #fff;\n}\n.bc-myMessage svg path:nth-child(2) {\n fill: #fff;\n}\n\n.bc-mediaMessage {\n position: relative;\n max-width: 360px !important;\n}\n.bc-mediaMessage audio,\n.bc-mediaMessage video,\n.bc-mediaMessage img {\n max-width: 100%;\n}\n.bc-mediaMessage audio {\n -webkit-appearance: none;\n -webkit-border-radius: 0;\n border-radius: 0;\n}\n.bc-mediaMessage audio::-webkit-media-controls-panel {\n background-color: transparent;\n}\n.bc-mediaMessage audio::-webkit-media-controls-play-button {\n background-color: transparent;\n}\n.bc-mediaMessage audio::-webkit-media-controls-timeline {\n background-color: transparent;\n}\n.bc-mediaMessage audio::-webkit-media-controls-current-time-display, .bc-mediaMessage audio::-webkit-media-controls-time-remaining-display {\n color: inherit;\n}\n.bc-mediaMessage audio {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n height: 40px !important;\n width: 100% !important;\n max-width: 400px !important;\n position: static !important;\n -webkit-appearance: none !important;\n -webkit-border-radius: 0 !important;\n border-radius: 0 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls {\n display: flex !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-panel {\n display: flex !important;\n visibility: visible !important;\n background-color: #f0f0f0 !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-play-button {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-timeline {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-volume-slider {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-current-time-display, .bc-mediaMessage audio::-webkit-media-controls-time-remaining-display {\n display: block !important;\n visibility: visible !important;\n color: #000 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-mute-button {\n display: block !important;\n visibility: visible !important;\n}\n\n.bc-mediaMessage.audio {\n width: 320px;\n height: 64px !important;\n}\n\n/* Custom audio player */\n.bc-audioPlayer {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 250px;\n position: relative;\n height: 60px;\n}\n\n.bc-myMessage .bc-audioPlayer {\n justify-self: flex-end;\n}\n\n.bc-otherMessage .bc-audioPlayer {\n justify-self: flex-start;\n}\n\n.bc-audioPlayer audio {\n display: none !important;\n width: 0 !important;\n height: 0 !important;\n}\n\n.bc-audioPlayer__button {\n flex: 0 0 auto;\n width: 40px;\n height: 40px;\n border: none;\n border-radius: 50%;\n background: #ffffff;\n position: relative;\n cursor: pointer;\n}\n\n.bc-otherMessage .bc-audioPlayer__button {\n background: #16616C;\n}\n\n.bc-audioPlayer__button.play::before {\n content: "";\n position: absolute;\n left: 12px;\n top: 12px;\n width: 16px;\n height: 16px;\n background-repeat: no-repeat;\n background-position: center;\n background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M6.23541%202.19233C5.2355%201.62986%204%202.35243%204%203.49968V12.5C4%2013.6472%205.23546%2014.3698%206.23537%2013.8073L14.2356%209.30735C15.2551%208.73391%2015.2551%207.26609%2014.2357%206.69262L6.23541%202.19233Z%22%20fill%3D%22%2316616C%22%2F%3E%3C%2Fsvg%3E");\n}\n\n.bc-otherMessage .bc-audioPlayer__button.play::before {\n background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M6.23541%202.19233C5.2355%201.62986%204%202.35243%204%203.49968V12.5C4%2013.6472%205.23546%2014.3698%206.23537%2013.8073L14.2356%209.30735C15.2551%208.73391%2015.2551%207.26609%2014.2357%206.69262L6.23541%202.19233Z%22%20fill%3D%22%23ffffff%22%2F%3E%3C%2Fsvg%3E");\n}\n\n.bc-audioPlayer__button.pause::before,\n.bc-audioPlayer__button.pause::after {\n content: "";\n position: absolute;\n top: 14px;\n width: 3px;\n height: 12px;\n background: #16616C;\n}\n\n.bc-otherMessage .bc-audioPlayer__button.pause::before,\n.bc-otherMessage .bc-audioPlayer__button.pause::after {\n background: #ffffff;\n}\n\n.bc-audioPlayer__button.pause::before {\n left: 16px;\n}\n\n.bc-audioPlayer__button.pause::after {\n right: 16px;\n}\n\n.bc-audioPlayer__wave {\n position: relative;\n flex: 1 1 auto;\n height: 22px;\n cursor: pointer;\n}\n\n.bc-audioPlayer__wave--future,\n.bc-audioPlayer__wave--past {\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n height: 22px;\n display: grid;\n grid-auto-flow: column;\n grid-auto-columns: 2px;\n column-gap: 1px;\n align-items: end;\n width: 100%;\n pointer-events: none;\n}\n\n.bc-audioPlayer__wave--future span {\n display: block;\n width: 2px;\n background: rgba(255, 255, 255, 0.6);\n border-radius: 2px;\n}\n\n.bc-otherMessage .bc-audioPlayer__wave--future span {\n background: #16616C;\n opacity: 0.6;\n}\n\n.bc-audioPlayer__wave--past {\n overflow: hidden;\n white-space: nowrap;\n}\n\n.bc-audioPlayer__wave--past span {\n display: inline-block;\n width: 2px;\n margin-right: 3px;\n background: #ffffff;\n border-radius: 2px;\n}\n\n.bc-otherMessage .bc-audioPlayer__wave--past span {\n background: #16616C;\n}\n\n.bc-otherMessage:hover .bc-replyButton, .bc-otherMessage:active .bc-replyButton, .bc-myMessage:hover .bc-replyButton, .bc-myMessage:active .bc-replyButton {\n display: block;\n}\n\n.bc-audioPlayer__time {\n color: #ffffff;\n font-weight: 400;\n opacity: 0.95;\n position: absolute;\n top: 46px;\n left: 80px;\n font-size: 10px;\n}\n\n.bc-otherMessage .bc-audioPlayer__time {\n color: #16616C;\n}\n\n.bc-selectionContainer {\n display: flex;\n align-items: flex-start;\n flex-wrap: wrap;\n}\n\n.bc-selectionContainer:first-child {\n flex: 1 0 50%;\n}\n\n.status-icon {\n color: var(--bc-chat-my-message-text-color) !important;\n opacity: 0.7;\n}\n.status-icon.failed {\n color: var(--bc-chat-danger-color) !important;\n}\n.status-icon.failed .resend {\n color: var(--bc-chat-dark-gray-color) !important;\n cursor: pointer;\n margin: 0 10px;\n}');const ne=d.i`
172
+ `,_={document:({message:t,config:i,onReply:o})=>{const a=i.isAgent===t.isAgent,[c,d]=r(""),g=s((()=>{try{const e=(t.content||"").split("/");return decodeURIComponent(e[e.length-1]||"file")}catch{return"file"}}),[t.content]);l((()=>{let e=!1;const n=t.content;if(n)return fetch(n,{method:"HEAD"}).then((n=>{const t=n.headers.get("content-length");if(!t)return;const i=Number(t);var o;Number.isFinite(i)&&(e||d((o=i)<1024?`${o} B`:o<1048576?`${(o/1024).toFixed(1)}KB`:o<1073741824?`${(o/1048576).toFixed(1)}MB`:`${(o/1073741824).toFixed(1)}GB`))})).catch((()=>{})),()=>{e=!0}}),[t.content]);const p=c?`${c} - ${j[i.language]?.download}`:j[i.language]?.download;return e(z,{isMyMessage:a,createdAt:t.createdAt,message:t,config:i,onReply:o,children:e(G,{href:t.content,target:"_blank",download:g,rel:"noopener noreferrer",isMyMessage:a,children:n(J,{isMyMessage:a,children:[e(V,{children:e(H,{})}),n(U,{children:[e(K,{children:g}),e(Q,{children:p})]})]})})})},image:({message:n,config:t,onReply:i})=>{const o=t.isAgent===n.isAgent;return e(z,{className:"bc-mediaMessage",isMyMessage:o,createdAt:n.createdAt,message:n,config:t,onReply:i,children:e("a",{href:n.content,target:"_blank",rel:"noreferrer",children:e("img",{src:n.content,alt:"message content",style:{width:"100%",height:"auto",borderRadius:"8px"}})})})},location:({message:t,config:i,onReply:o})=>{const a=i.isAgent===t.isAgent;return e(z,{isMyMessage:a,createdAt:t.createdAt,message:t,config:i,onReply:o,children:e(W,{href:"https://www.google.com/maps/?q="+t.content,target:"_blank",rel:"noopener noreferrer",children:n(Y,{children:[e(q,{color:"000000"}),e(O,{children:"Open location"})]})})})},text:N,video:P,audio:P,interactive:null,template:({message:t,config:i,onReply:o})=>{const a=s((()=>{try{return JSON.parse(t.content)}catch(e){return void console.log(e.message)}}),[t]),r=i.isAgent===t.isAgent;return n(z,{isMyMessage:r,createdAt:t.createdAt,message:t,config:i,onReply:o,children:[e("b",{children:"Template message:"})," ",a.name," ",a.language?.code?`/ ${a.language.code}`:null]})},note:({message:t})=>{const i=h(t.content);return n(X,{children:[e($,{language:i,children:t.content})," ",e(w,{createdAt:t.createdAt})]})},button:N};function ee(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}ee('/* Shared styles between agent and client messages */\n.bc-otherMessage,\n.bc-myMessage {\n margin: 24px;\n font-size: var(--bc-chat-body-4-size);\n line-height: var(--bc-chat-body-4-lineheight);\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n gap: 12px;\n}\n.bc-otherMessage div p,\n.bc-myMessage div p {\n padding: 0;\n margin: 0;\n}\n\n/* Styles for agent messages */\n.bc-otherMessage {\n justify-content: flex-start;\n}\n.bc-otherMessage:first-child {\n flex: 1 0 50%;\n}\n.bc-otherMessage > :nth-child(2) {\n flex: 0 1 auto;\n max-width: 85%;\n}\n\n/* Styles for other messages */\n.bc-note {\n text-align: center;\n gap: 5px;\n}\n\n.bc-myMessage {\n justify-content: flex-end;\n}\n.bc-myMessage > div:not(.bc-debugCon),\n.bc-myMessage .bc-locationMessage,\n.bc-myMessage audio {\n color: #fff;\n}\n.bc-myMessage svg path:nth-child(2) {\n fill: #fff;\n}\n\n.bc-mediaMessage {\n position: relative;\n max-width: 360px !important;\n}\n.bc-mediaMessage audio,\n.bc-mediaMessage video,\n.bc-mediaMessage img {\n max-width: 100%;\n}\n.bc-mediaMessage audio {\n -webkit-appearance: none;\n -webkit-border-radius: 0;\n border-radius: 0;\n}\n.bc-mediaMessage audio::-webkit-media-controls-panel {\n background-color: transparent;\n}\n.bc-mediaMessage audio::-webkit-media-controls-play-button {\n background-color: transparent;\n}\n.bc-mediaMessage audio::-webkit-media-controls-timeline {\n background-color: transparent;\n}\n.bc-mediaMessage audio::-webkit-media-controls-current-time-display, .bc-mediaMessage audio::-webkit-media-controls-time-remaining-display {\n color: inherit;\n}\n.bc-mediaMessage audio {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n height: 40px !important;\n width: 100% !important;\n max-width: 400px !important;\n position: static !important;\n -webkit-appearance: none !important;\n -webkit-border-radius: 0 !important;\n border-radius: 0 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls {\n display: flex !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-panel {\n display: flex !important;\n visibility: visible !important;\n background-color: #f0f0f0 !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-play-button {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-timeline {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-volume-slider {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-current-time-display, .bc-mediaMessage audio::-webkit-media-controls-time-remaining-display {\n display: block !important;\n visibility: visible !important;\n color: #000 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-mute-button {\n display: block !important;\n visibility: visible !important;\n}\n\n.bc-mediaMessage.audio {\n width: 320px;\n height: 64px !important;\n}\n\n/* Custom audio player */\n.bc-audioPlayer {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 250px;\n position: relative;\n height: 60px;\n}\n\n.bc-myMessage .bc-audioPlayer {\n justify-self: flex-end;\n}\n\n.bc-otherMessage .bc-audioPlayer {\n justify-self: flex-start;\n}\n\n.bc-audioPlayer audio {\n display: none !important;\n width: 0 !important;\n height: 0 !important;\n}\n\n.bc-audioPlayer__button {\n flex: 0 0 auto;\n width: 40px;\n height: 40px;\n border: none;\n border-radius: 50%;\n background: #ffffff;\n position: relative;\n cursor: pointer;\n}\n\n.bc-otherMessage .bc-audioPlayer__button {\n background: #16616C;\n}\n\n.bc-audioPlayer__button.play::before {\n content: "";\n position: absolute;\n left: 12px;\n top: 12px;\n width: 16px;\n height: 16px;\n background-repeat: no-repeat;\n background-position: center;\n background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M6.23541%202.19233C5.2355%201.62986%204%202.35243%204%203.49968V12.5C4%2013.6472%205.23546%2014.3698%206.23537%2013.8073L14.2356%209.30735C15.2551%208.73391%2015.2551%207.26609%2014.2357%206.69262L6.23541%202.19233Z%22%20fill%3D%22%2316616C%22%2F%3E%3C%2Fsvg%3E");\n}\n\n.bc-otherMessage .bc-audioPlayer__button.play::before {\n background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M6.23541%202.19233C5.2355%201.62986%204%202.35243%204%203.49968V12.5C4%2013.6472%205.23546%2014.3698%206.23537%2013.8073L14.2356%209.30735C15.2551%208.73391%2015.2551%207.26609%2014.2357%206.69262L6.23541%202.19233Z%22%20fill%3D%22%23ffffff%22%2F%3E%3C%2Fsvg%3E");\n}\n\n.bc-audioPlayer__button.pause::before,\n.bc-audioPlayer__button.pause::after {\n content: "";\n position: absolute;\n top: 14px;\n width: 3px;\n height: 12px;\n background: #16616C;\n}\n\n.bc-otherMessage .bc-audioPlayer__button.pause::before,\n.bc-otherMessage .bc-audioPlayer__button.pause::after {\n background: #ffffff;\n}\n\n.bc-audioPlayer__button.pause::before {\n left: 16px;\n}\n\n.bc-audioPlayer__button.pause::after {\n right: 16px;\n}\n\n.bc-audioPlayer__wave {\n position: relative;\n flex: 1 1 auto;\n height: 22px;\n cursor: pointer;\n}\n\n.bc-audioPlayer__wave--future,\n.bc-audioPlayer__wave--past {\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n height: 22px;\n display: grid;\n grid-auto-flow: column;\n grid-auto-columns: 2px;\n column-gap: 1px;\n align-items: end;\n width: 100%;\n pointer-events: none;\n}\n\n.bc-audioPlayer__wave--future span {\n display: block;\n width: 2px;\n background: rgba(255, 255, 255, 0.6);\n border-radius: 2px;\n}\n\n.bc-otherMessage .bc-audioPlayer__wave--future span {\n background: #16616C;\n opacity: 0.6;\n}\n\n.bc-audioPlayer__wave--past {\n overflow: hidden;\n white-space: nowrap;\n}\n\n.bc-audioPlayer__wave--past span {\n display: inline-block;\n width: 2px;\n margin-right: 3px;\n background: #ffffff;\n border-radius: 2px;\n}\n\n.bc-otherMessage .bc-audioPlayer__wave--past span {\n background: #16616C;\n}\n\n.bc-otherMessage:hover .bc-replyButton, .bc-otherMessage:active .bc-replyButton, .bc-myMessage:hover .bc-replyButton, .bc-myMessage:active .bc-replyButton {\n display: block;\n}\n\n.bc-audioPlayer__time {\n color: #ffffff;\n font-weight: 400;\n opacity: 0.95;\n position: absolute;\n top: 46px;\n left: 80px;\n font-size: 10px;\n}\n\n.bc-otherMessage .bc-audioPlayer__time {\n color: #16616C;\n}\n\n.bc-selectionContainer {\n display: flex;\n align-items: flex-start;\n flex-wrap: wrap;\n}\n\n.bc-selectionContainer:first-child {\n flex: 1 0 50%;\n}\n\n.status-icon {\n color: var(--bc-chat-my-message-text-color) !important;\n opacity: 0.7;\n}\n.status-icon.failed {\n color: var(--bc-chat-danger-color) !important;\n}\n.status-icon.failed .resend {\n color: var(--bc-chat-dark-gray-color) !important;\n cursor: pointer;\n margin: 0 10px;\n}');const ne=d.i`
172
173
  background-image: url(${e=>e.avatar||f});
173
174
  width: 30px;
174
175
  height: 30px;
@@ -182,7 +183,7 @@ i {
182
183
  display: flex;
183
184
  align-items: center;
184
185
  justify-content: center;
185
- border-bottom: solid 1px #ddd;
186
+ border-bottom: solid 1px var(--bc-border-neutral-secondary);
186
187
  margin: 30px auto 40px;
187
188
  .seperator-content {
188
189
  ${e=>`background-color: ${e.backgroundColor};`}
@@ -215,7 +216,24 @@ i {
215
216
  align-items: center;
216
217
  justify-content: center;
217
218
 
218
- `,le=({sendMessage:t,debug:i,config:o,messages:s,onReachingUp:d,agentsIdsAvatarsMap:g,searchPattern:p,searchMatchNo:h,onSearchMatchCount:u,onMessageReply:m})=>{const b=a(null),C=a(0),[f,x]=r(null),[v,w]=r(!0);return l((()=>{const e=document.getElementById(y);if(!e)return;C.current=e.scrollHeight;const n=()=>{0===e.scrollTop&&d?.();const n=e.scrollHeight-e.scrollTop-e.clientHeight<=4;w(n)};return e.addEventListener("scroll",n),()=>{e.removeEventListener("scroll",n)}}),[d]),c((()=>{const e=b.current;if(!e)return;const n=C.current;if(e.scrollHeight-e.scrollTop<=e.clientHeight+200){const n=e.scrollHeight;e.style.scrollBehavior="smooth",e.style.overscrollBehavior="contain",e.scroll(0,n),w(!0)}else{const t=e.scrollHeight-n;e.style.scrollBehavior="auto",e.scrollTop=e.scrollTop+t;const i=4,o=e.scrollHeight-e.scrollTop-e.clientHeight<=i;w(o)}C.current=e.scrollHeight}),[s]),l((()=>{if(!p||!p.trim())return x(null),void u?.(0);const e=p.toLowerCase(),n=[];for(const t of s){const i=t&&t.content,o=t&&t.messageId;o&&i&&(String(i).toLowerCase().includes(e)&&n.push(o))}if(u?.(n.length),0===n.length)return void x(null);const t=n[Math.min(Math.max((h??1)-1,0),n.length-1)];x(t);const i=b.current,o=t?document.getElementById(t):null;i&&o&&(i.style.scrollBehavior="smooth",o.scrollIntoView())}),[p,h,s,u]),n(re,{ref:b,id:y,config:o,children:[s?.map(((n,a)=>"seperator"===n.type?e(ae,{data:n,config:o}):e("div",{children:e(ie,{message:n,index:a,sendMessage:t,messageActionsEnabled:s.length-1===a,debug:i,config:o,agentsIdsAvatarsMap:g,highlighted:f===n.messageId,searchPattern:p,onMessageReply:m})},n.messageId?n.messageId:"message"+a))),!v&&e(se,{"aria-label":"Scroll to latest message",onClick:()=>{const e=b.current;if(!e)return;const n=e.scrollHeight;e.style.scrollBehavior="smooth",e.style.overscrollBehavior="contain",e.scroll(0,n),w(!0)},children:e("svg",{width:"14",height:"8",viewBox:"0 0 14 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M1.60372 0.555285C1.7256 0.716659 2.08951 1.1984 2.30624 1.47611C2.74031 2.03233 3.33342 2.77142 3.97323 3.50831C4.61627 4.24893 5.29178 4.97022 5.89189 5.50046C6.19281 5.76634 6.45714 5.96837 6.67527 6.09987C6.88042 6.22355 7.00161 6.24927 7.00161 6.24927C7.00161 6.24927 7.11923 6.22355 7.32437 6.09988C7.5425 5.96838 7.80684 5.76635 8.10775 5.50047C8.70786 4.97022 9.38337 4.24892 10.0264 3.5083C10.6662 2.7714 11.2593 2.0323 11.6934 1.47608C11.9101 1.19837 12.2735 0.717304 12.3954 0.555928C12.6411 0.222405 13.1111 0.150469 13.4446 0.396102C13.7781 0.641734 13.8494 1.11123 13.6037 1.44476L13.6018 1.4473C13.474 1.61655 13.0971 2.11556 12.8759 2.39892C12.4321 2.9677 11.8216 3.72861 11.1591 4.49171C10.4997 5.25109 9.77408 6.02979 9.10096 6.62454C8.76526 6.92116 8.42497 7.18788 8.0988 7.3845C7.79322 7.56872 7.40633 7.75 6.99982 7.75C6.59331 7.75 6.20642 7.56871 5.90084 7.3845C5.57468 7.18787 5.23439 6.92116 4.89869 6.62454C4.22557 6.02979 3.4999 5.2511 2.84058 4.49173C2.17803 3.72863 1.5676 2.96774 1.12372 2.39896C0.902432 2.11541 0.525506 1.61637 0.397929 1.44747L0.396279 1.44528C0.150645 1.11176 0.22154 0.641787 0.555062 0.396152C0.888572 0.150526 1.35808 0.221792 1.60372 0.555285Z",fill:"white"})})})]},y)},ce="text";async function de(e,n,t){const i=new m("https://bcuserres.blob.core.windows.net?sp=rc&st=2024-12-31T17:52:49Z&se=2026-01-01T01:52:49Z&spr=https&sv=2022-11-02&sr=c&sig=ZM%2Fdd4vGMglDs%2F9GtJ8y510iYCcXpUO%2Bj5CvVAq8QDg%3D",new b).getContainerClient("anonymous"),o=new Date,a=`${o.getFullYear()}-${String(o.getMonth()+1).padStart(2,"0")}`,r=i.getBlockBlobClient(`${a}/${u()}`);try{await r.uploadBrowserData(e,{onProgress:t=>{const i=Math.round(t.loadedBytes/e.size*100);n(i)},blockSize:4194304,concurrency:20,blobHTTPHeaders:{blobContentType:e.type}});t(r.url.split("?")[0])}catch(e){t(void 0,"Error uploading file:"+e.message)}}const ge=d.span`
219
+ `,le=d.div`
220
+ width: 100%;
221
+ display: flex;
222
+ justify-content: center;
223
+ padding-bottom: 40px;
224
+ `,ce=d.span`
225
+ width: 18px;
226
+ height: 18px;
227
+ display: inline-flex;
228
+ align-items: center;
229
+ justify-content: center;
230
+ margin:0 6px;
231
+ `,de=d.p`
232
+ margin: 0;
233
+ font-size: var(--bc-chat-body-4-size);
234
+ line-height: var(--bc-chat-body-4-lineheight);
235
+ color: inherit;
236
+ `,ge=()=>e("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.95833 16.6667C4.70114 16.6667 1.25 13.2155 1.25 8.95833C1.25 4.70114 4.70114 1.25 8.95833 1.25C13.2155 1.25 16.6667 4.70114 16.6667 8.95833C16.6667 13.2155 13.2155 16.6667 8.95833 16.6667ZM0 8.95833C0 13.9059 4.01078 17.9167 8.95833 17.9167C13.9059 17.9167 17.9167 13.9059 17.9167 8.95833C17.9167 4.01078 13.9059 0 8.95833 0C4.01078 0 0 4.01078 0 8.95833ZM8.53419 8.75097C8.47632 8.75004 8.40939 8.75001 8.32682 8.75001C7.98164 8.75001 7.70182 8.47019 7.70182 8.12501C7.70182 7.77984 7.98164 7.50001 8.32682 7.50001L8.35553 7.50001C8.52646 7.49994 8.71128 7.49987 8.8673 7.52084C9.05007 7.54541 9.28356 7.60861 9.48006 7.80511C9.67656 8.00161 9.73975 8.2351 9.76433 8.41787C9.7853 8.57388 9.78523 8.75871 9.78516 8.92964V8.92964L9.78516 8.95835V13.125C9.78516 13.4702 9.50533 13.75 9.16016 13.75C8.81498 13.75 8.53516 13.4702 8.53516 13.125V8.95835C8.53516 8.87578 8.53513 8.80885 8.53419 8.75097ZM8.95182 4.79167C8.49159 4.79167 8.11849 5.16476 8.11849 5.625C8.11849 6.08524 8.49159 6.45833 8.95182 6.45833H8.95931C9.41955 6.45833 9.79264 6.08524 9.79264 5.625C9.79264 5.16476 9.41955 4.79167 8.95931 4.79167H8.95182Z",fill:"#6C737F"})}),pe=({sendMessage:i,debug:o,config:s,messages:d,onReachingUp:g,agentsIdsAvatarsMap:p,searchPattern:h,searchMatchNo:u,onSearchMatchCount:m,onMessageReply:b,errorMessage:C})=>{const f=a(null),x=a(0),[v,w]=r(null),[M,A]=r(!0),L=C?.trim();return l((()=>{const e=document.getElementById(y);if(!e)return;x.current=e.scrollHeight;const n=()=>{0===e.scrollTop&&g?.();const n=e.scrollHeight-e.scrollTop-e.clientHeight<=4;A(n)};return e.addEventListener("scroll",n),()=>{e.removeEventListener("scroll",n)}}),[g]),c((()=>{const e=f.current;if(!e)return;const n=x.current;if(e.scrollHeight-e.scrollTop<=e.clientHeight+200){const n=e.scrollHeight;e.style.scrollBehavior="smooth",e.style.overscrollBehavior="contain",e.scroll(0,n),A(!0)}else{const t=e.scrollHeight-n;e.style.scrollBehavior="auto",e.scrollTop=e.scrollTop+t;const i=4,o=e.scrollHeight-e.scrollTop-e.clientHeight<=i;A(o)}x.current=e.scrollHeight}),[d,L]),l((()=>{if(!h||!h.trim())return w(null),void m?.(0);const e=h.toLowerCase(),n=[];for(const t of d){const i=t&&t.content,o=t&&t.messageId;o&&i&&(String(i).toLowerCase().includes(e)&&n.push(o))}if(m?.(n.length),0===n.length)return void w(null);const t=n[Math.min(Math.max((u??1)-1,0),n.length-1)];w(t);const i=f.current,o=t?document.getElementById(t):null;i&&o&&(i.style.scrollBehavior="smooth",o.scrollIntoView())}),[h,u,d,m]),n(re,{ref:f,id:y,config:s,children:[d?.map(((n,t)=>"seperator"===n.type?e(ae,{data:n,config:s}):e("div",{children:e(ie,{message:n,index:t,sendMessage:i,messageActionsEnabled:d.length-1===t,debug:o,config:s,agentsIdsAvatarsMap:p,highlighted:v===n.messageId,searchPattern:h,onMessageReply:b})},n.messageId?n.messageId:"message"+t))),L&&n(t,{children:[e(ae,{data:{type:"seperator"},config:s}),n(le,{role:"alert","aria-live":"assertive","data-testid":"chat-error-message",children:[e(ce,{children:e(ge,{})}),e(de,{children:L})]})]}),!M&&e(se,{"aria-label":"Scroll to latest message",onClick:()=>{const e=f.current;if(!e)return;const n=e.scrollHeight;e.style.scrollBehavior="smooth",e.style.overscrollBehavior="contain",e.scroll(0,n),A(!0)},children:e("svg",{width:"14",height:"8",viewBox:"0 0 14 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M1.60372 0.555285C1.7256 0.716659 2.08951 1.1984 2.30624 1.47611C2.74031 2.03233 3.33342 2.77142 3.97323 3.50831C4.61627 4.24893 5.29178 4.97022 5.89189 5.50046C6.19281 5.76634 6.45714 5.96837 6.67527 6.09987C6.88042 6.22355 7.00161 6.24927 7.00161 6.24927C7.00161 6.24927 7.11923 6.22355 7.32437 6.09988C7.5425 5.96838 7.80684 5.76635 8.10775 5.50047C8.70786 4.97022 9.38337 4.24892 10.0264 3.5083C10.6662 2.7714 11.2593 2.0323 11.6934 1.47608C11.9101 1.19837 12.2735 0.717304 12.3954 0.555928C12.6411 0.222405 13.1111 0.150469 13.4446 0.396102C13.7781 0.641734 13.8494 1.11123 13.6037 1.44476L13.6018 1.4473C13.474 1.61655 13.0971 2.11556 12.8759 2.39892C12.4321 2.9677 11.8216 3.72861 11.1591 4.49171C10.4997 5.25109 9.77408 6.02979 9.10096 6.62454C8.76526 6.92116 8.42497 7.18788 8.0988 7.3845C7.79322 7.56872 7.40633 7.75 6.99982 7.75C6.59331 7.75 6.20642 7.56871 5.90084 7.3845C5.57468 7.18787 5.23439 6.92116 4.89869 6.62454C4.22557 6.02979 3.4999 5.2511 2.84058 4.49173C2.17803 3.72863 1.5676 2.96774 1.12372 2.39896C0.902432 2.11541 0.525506 1.61637 0.397929 1.44747L0.396279 1.44528C0.150645 1.11176 0.22154 0.641787 0.555062 0.396152C0.888572 0.150526 1.35808 0.221792 1.60372 0.555285Z",fill:"white"})})})]},y)},he="text";async function ue(e,n,t){const i=new m("https://bcuserres.blob.core.windows.net?sp=rc&st=2024-12-31T17:52:49Z&se=2026-01-01T01:52:49Z&spr=https&sv=2022-11-02&sr=c&sig=ZM%2Fdd4vGMglDs%2F9GtJ8y510iYCcXpUO%2Bj5CvVAq8QDg%3D",new b).getContainerClient("anonymous"),o=new Date,a=`${o.getFullYear()}-${String(o.getMonth()+1).padStart(2,"0")}`,r=i.getBlockBlobClient(`${a}/${u()}`);try{await r.uploadBrowserData(e,{onProgress:t=>{const i=Math.round(t.loadedBytes/e.size*100);n(i)},blockSize:4194304,concurrency:20,blobHTTPHeaders:{blobContentType:e.type}});t(r.url.split("?")[0])}catch(e){t(void 0,"Error uploading file:"+e.message)}}const me=d.span`
219
237
  cursor: pointer;
220
238
  width: 20px;
221
239
  height: 20px;
@@ -225,7 +243,7 @@ i {
225
243
  justify-content: center;
226
244
 
227
245
  ${e=>e.isRTL&&"\n svg {\n transform: scaleX(-1);\n }\n "}
228
- `,pe=d.div`
246
+ `,be=d.div`
229
247
  display: flex;
230
248
  align-items: center;
231
249
  justify-content: space-between;
@@ -235,14 +253,14 @@ i {
235
253
  font-weight: 500;
236
254
  cursor: pointer;
237
255
  direction: ${e=>e.isRTL?"rtl":"ltr"};
238
- `,he=()=>e("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M10.8165 10.197L3.28454 11.453C3.19795 11.4674 3.11669 11.5044 3.04893 11.5602C2.98117 11.6161 2.9293 11.6887 2.89854 11.771L0.301545 18.728C0.0535447 19.368 0.722545 19.978 1.33654 19.671L19.3365 10.671C19.4612 10.6087 19.5661 10.513 19.6394 10.3944C19.7127 10.2759 19.7515 10.1393 19.7515 9.99996C19.7515 9.86061 19.7127 9.72401 19.6394 9.60549C19.5661 9.48697 19.4612 9.39122 19.3365 9.32896L1.33654 0.328962C0.722545 0.0219617 0.0535447 0.632962 0.301545 1.27196L2.89954 8.22896C2.93016 8.31138 2.98196 8.38426 3.04973 8.44027C3.1175 8.49627 3.19884 8.53342 3.28554 8.54796L10.8175 9.80296C10.8639 9.81108 10.9059 9.83529 10.9362 9.87132C10.9664 9.90735 10.983 9.9529 10.983 9.99996C10.983 10.047 10.9664 10.0926 10.9362 10.1286C10.9059 10.1646 10.8639 10.1888 10.8175 10.197H10.8165Z",fill:"#16616C"})}),ue=()=>e("svg",{width:"16",height:"18",viewBox:"0 0 20 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.3548 0.250249C10.7253 0.251243 11.0486 0.256214 11.3268 0.28107C11.6959 0.31408 12.0399 0.38555 12.3742 0.55897C12.5063 0.6275 12.6326 0.70664 12.7519 0.79561C13.0537 1.02075 13.2681 1.29917 13.4588 1.61688C13.6385 1.91618 13.8209 2.29263 14.0359 2.7361L14.5274 3.75H19C19.4142 3.75 19.75 4.08579 19.75 4.5C19.75 4.91422 19.4142 5.25 19 5.25H18.2051L17.6265 14.6101C17.5493 15.858 17.4881 16.8482 17.3627 17.6392C17.234 18.4504 17.028 19.126 16.616 19.7169C16.239 20.2574 15.7537 20.7137 15.1909 21.0565C14.5758 21.4313 13.8888 21.5952 13.0712 21.6736C12.274 21.75 11.2818 21.75 10.0316 21.75H9.9539L9.54609 21.7499C8.48365 21.7491 7.61989 21.7415 6.91041 21.6735C6.09186 21.5949 5.40416 21.4307 4.78854 21.0553C4.22537 20.7118 3.73991 20.2547 3.36311 19.7133C2.95121 19.1214 2.74587 18.4449 2.61816 17.6325C2.49362 16.8404 2.43377 15.8488 2.35833 14.5991L1.79393 5.25H1C0.58579 5.25 0.25 4.91422 0.25 4.5C0.25 4.08579 0.58579 3.75 1 3.75H5.57232L5.99135 2.83074L6.11352 2.56332C6.27199 2.21814 6.41408 1.91891 6.55567 1.67073C6.74349 1.34153 6.95704 1.05248 7.26255 0.81811C7.38312 0.72561 7.51116 0.64326 7.64533 0.57192C7.98531 0.39114 8.3369 0.31672 8.7143 0.28236C9.07 0.25 9.4986 0.25 10.0039 0.25L10.3548 0.250249ZM16.7022 5.25H3.29666L3.85327 14.47C3.93157 15.767 3.9879 16.6868 4.09996 17.3996C4.21012 18.1003 4.36439 18.5261 4.59431 18.8565C4.85213 19.2269 5.18428 19.5396 5.56961 19.7747C5.91325 19.9842 6.34758 20.1126 7.05365 20.1803C7.77186 20.2492 8.6934 20.25 9.9928 20.25C11.2905 20.25 12.2107 20.2492 12.928 20.1805C13.6332 20.1128 14.0671 19.9848 14.4105 19.7755C14.7956 19.5409 15.1277 19.2288 15.3856 18.8589C15.6156 18.5291 15.7702 18.1039 15.8812 17.4042C15.9941 16.6925 16.0517 15.7741 16.1317 14.4788L16.7022 5.25ZM10.451 1.75071L9.65985 1.75051C9.31502 1.75191 9.06007 1.75709 8.8503 1.77618C8.5849 1.80035 8.4499 1.84298 8.3496 1.89633C8.2886 1.92876 8.2304 1.96619 8.1756 2.00823C8.0854 2.07739 7.99063 2.18253 7.85853 2.41407C7.71937 2.65798 7.56941 2.98523 7.34281 3.48234L7.2208 3.75H12.8604L12.6999 3.41888C12.4674 2.93926 12.3137 2.62382 12.1727 2.38884C12.0389 2.16588 11.9443 2.06458 11.8551 1.99801C11.8009 1.95756 11.7434 1.92159 11.6834 1.89044C11.5845 1.83916 11.4522 1.79827 11.1932 1.77511C10.9982 1.75767 10.7635 1.75233 10.451 1.75071Z",fill:"currentColor"})}),me=()=>e("svg",{width:"18",height:"18",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M12.8536 2.85355C13.0488 2.65829 13.0488 2.34171 12.8536 2.14645C12.6583 1.95118 12.3417 1.95118 12.1464 2.14645L7.5 6.79289L2.85355 2.14645C2.65829 1.95118 2.34171 1.95118 2.14645 2.14645C1.95118 2.34171 1.95118 2.65829 2.14645 2.85355L6.79289 7.5L2.14645 12.1464C1.95118 12.3417 1.95118 12.6583 2.14645 12.8536C2.34171 13.0488 2.65829 13.0488 2.85355 12.8536L7.5 8.20711L12.1464 12.8536C12.3417 13.0488 12.6583 13.0488 12.8536 12.8536C13.0488 12.6583 13.0488 12.3417 12.8536 12.1464L8.20711 7.5L12.8536 2.85355Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}),be=({file:t,isFileSelected:i,cancelFileUpload:o,config:a})=>{const r=C.SupportedImageFormats.indexOf(t.extension)>=0,s=C.SupportedAudioFormats.indexOf(t.extension)>=0;return n("div",{className:"bc-uploadFileDetails "+("AR"===a?.language?"bc-RTL":""),style:{border:i?"green dashed 1px":""},id:"uploadFileDetails",children:[e("div",{className:"bc-uploadedFile",style:{maxWidth:s?300:"auto",pointerEvents:s?"auto":"none"},children:r?e("img",{src:t.fileUrl,alt:"",className:"bc-imageFile"}):s?e("audio",{src:t.fileUrl,controls:!0,style:{height:28}}):e("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAAPq0lEQVR4nO2caXQUVRbHc2bmw8wXP82MJiyByKiDEHCYccN9QXFFEURxZlRcZkBRXHAXN0TZ3FAIKqABEQggSxKWRBwdBR0cUMCQQEhn6e5s3Z1OSIcl/e6c11WVfvXqvlevqjvCHOqe8zt+qeqU95f/va9aMCPDK6+88sorr7zyyiuvvPLKK6+8Os4rVnrKRbGSrCmx0sy5sZKsPEq7iZ557Zt65rXZ0jsvStnIkq1RnODt1uLek1uKsse0FvX73bH+9z7uqq3k9yfHSjO3xEqzQKMHxEo02rvoCe2be8JBE70StG0y07qpN7RuNBPdmA3RDUlaEvSBSHH20UhRn+LQht7nH+s+HBcF3/T8Tawkc2dHl4ykkHYFIbyMNipjEyJjo1VGgmKNcHGfeKSo79yqLdm/zjiRq720xyRMhrt0YDLE6TCERLroC+GivhtOaCkdpZnfpCsdrS7TEdFlGISK+qyDKRm/yDgRq6M00+8mHW3dkI4IpSiREirl1YwTsTpKshrt0nHw50pHkSYjIaQwh4TW9xmdcaJVrEuIg1GllI5s1+kIJ8iBcGHftnBhzsCME1JISYrp2Ji+dISpDJ3m9TlVrWtP+23GiSXkOExHUQ4dWxrrczbB8oxfZpwwQo7TdIQMIYWn0n/Oblp/6hB3nJFk9RlDAt3CwCHVPMuT1K4YkBtYPtj+W4lYSY/G7k9HH/fpKDSEnArNlPUG/aDJYJ3BH6DRYK1Gw9rTkqzRqF9zuongZ5QzTARWU/7YhZ+yitI/QR3LyjMT1LIUDIAanhUDwLd8wC5fQe5IZ0JKs6H9i/4cZ8LBLWbatgyA1s/NRD8fqFGq0VJCydXYr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RFmfCgcVZGvlZUEn5uAfsp3zUA/ZRFvWECspCSi8oX6Cx90NK70Qjjgf2LsrZUZHf7yRUhllM7/7BVVmzgyuz8ln8tvR0QK8kBb3y63RqllOyk3yapJpnaXZ+FWVJH43FSQ4kyMnfv/jU/P0fa+wz+OjYsv/jfjMr8vv3txXhlVdeeeWVV1555ZVXXnnllVdeeeWVV1555VXG/2f9D+lROV6EKZDWAAAAAElFTkSuQmCC",alt:"",className:"bc-documentFile"})}),e("div",{className:"bc-uploadFileName",children:e("span",{children:t.fileName})}),e("div",{className:"bc-uploadFileCancel",children:e("span",{onClick:()=>{try{s&&t.blob&&t.fileUrl.startsWith("blob:")&&URL.revokeObjectURL(t.fileUrl)}catch{}o()},children:e(ue,{})})})]})},Ce=({text:n,setText:t,config:i,send:r,placeholder:s})=>{const c=a(null),d="AR"===i?.language,g=o((()=>{const e=c.current;e.style.height="20px";const n=e.scrollHeight;n!==e.offsetHeight&&(e.style.height=n+"px")}),[]);return l((()=>{n||(g(),c.current.focus())}),[g,n]),e("textarea",{ref:c,value:n,className:"bc-messageInputTextArea",id:"textInput",placeholder:s,maxLength:1024,dir:d?"rtl":"ltr",onKeyDown:e=>{if("Enter"===e.key&&(e.shiftKey||e.ctrlKey||e.altKey)){e.preventDefault();const i=c.current.selectionStart,o=n.slice(0,i)+"\n"+n.slice(i);return t(o),void g()}"Enter"===e.key&&(e.preventDefault(),r(),g())},onChange:e=>{t(e.target.value),g()}})},fe=({config:t,send:i,file:o,isFileSelected:a,text:r,setText:s,cancelFileUpload:l,noteMode:c,onCloseNoteMode:d,notePlaceholder:g})=>{const p="AR"===t?.language;return n("div",{className:"bc-messageInput "+(p?"bc-RTL":""),children:[c?e(pe,{onClick:d,isRTL:p,children:e(me,{})}):null,o?e(be,{file:o,isFileSelected:a,cancelFileUpload:l,config:t}):e(Ce,{text:r,setText:s,config:t,send:i,placeholder:c?g||j[t.language]?.notePlaceholder:t.inputPlaceholder||j[t.language]?.placeholder}),e(ge,{onClick:()=>i(),isRTL:p,children:r||o?e(he,{}):null})]})},xe=(e,n)=>`\n &:hover {\n background-image: ${e.replaceAll("%23a3a3a3",n.activeColor)};\n }\n background-image: ${n.isActive?e.replaceAll("%23a3a3a3",n.activeColor):e};\n`,ye="\ndisplay: flex;\njustify-content: center;\nalign-items: center;\ngap: 4px;\nborder-radius: 8px;\nborder: 1px solid #D2D6DB;\nbackground: #FFF;\ntransition: background-color 0.2s ease, border-color 0.2s ease;\ncursor: pointer;\nfont-size: 14px;\n&:hover {\n background: #f7f7f7;\n border-color: #dcdcdc;\n}\n&:active {\n background: #f0f0f0;\n}\n";d.button`
239
- ${ye}
256
+ `,Ce=()=>e("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M10.8165 10.197L3.28454 11.453C3.19795 11.4674 3.11669 11.5044 3.04893 11.5602C2.98117 11.6161 2.9293 11.6887 2.89854 11.771L0.301545 18.728C0.0535447 19.368 0.722545 19.978 1.33654 19.671L19.3365 10.671C19.4612 10.6087 19.5661 10.513 19.6394 10.3944C19.7127 10.2759 19.7515 10.1393 19.7515 9.99996C19.7515 9.86061 19.7127 9.72401 19.6394 9.60549C19.5661 9.48697 19.4612 9.39122 19.3365 9.32896L1.33654 0.328962C0.722545 0.0219617 0.0535447 0.632962 0.301545 1.27196L2.89954 8.22896C2.93016 8.31138 2.98196 8.38426 3.04973 8.44027C3.1175 8.49627 3.19884 8.53342 3.28554 8.54796L10.8175 9.80296C10.8639 9.81108 10.9059 9.83529 10.9362 9.87132C10.9664 9.90735 10.983 9.9529 10.983 9.99996C10.983 10.047 10.9664 10.0926 10.9362 10.1286C10.9059 10.1646 10.8639 10.1888 10.8175 10.197H10.8165Z",fill:"#16616C"})}),fe=()=>e("svg",{width:"16",height:"18",viewBox:"0 0 20 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.3548 0.250249C10.7253 0.251243 11.0486 0.256214 11.3268 0.28107C11.6959 0.31408 12.0399 0.38555 12.3742 0.55897C12.5063 0.6275 12.6326 0.70664 12.7519 0.79561C13.0537 1.02075 13.2681 1.29917 13.4588 1.61688C13.6385 1.91618 13.8209 2.29263 14.0359 2.7361L14.5274 3.75H19C19.4142 3.75 19.75 4.08579 19.75 4.5C19.75 4.91422 19.4142 5.25 19 5.25H18.2051L17.6265 14.6101C17.5493 15.858 17.4881 16.8482 17.3627 17.6392C17.234 18.4504 17.028 19.126 16.616 19.7169C16.239 20.2574 15.7537 20.7137 15.1909 21.0565C14.5758 21.4313 13.8888 21.5952 13.0712 21.6736C12.274 21.75 11.2818 21.75 10.0316 21.75H9.9539L9.54609 21.7499C8.48365 21.7491 7.61989 21.7415 6.91041 21.6735C6.09186 21.5949 5.40416 21.4307 4.78854 21.0553C4.22537 20.7118 3.73991 20.2547 3.36311 19.7133C2.95121 19.1214 2.74587 18.4449 2.61816 17.6325C2.49362 16.8404 2.43377 15.8488 2.35833 14.5991L1.79393 5.25H1C0.58579 5.25 0.25 4.91422 0.25 4.5C0.25 4.08579 0.58579 3.75 1 3.75H5.57232L5.99135 2.83074L6.11352 2.56332C6.27199 2.21814 6.41408 1.91891 6.55567 1.67073C6.74349 1.34153 6.95704 1.05248 7.26255 0.81811C7.38312 0.72561 7.51116 0.64326 7.64533 0.57192C7.98531 0.39114 8.3369 0.31672 8.7143 0.28236C9.07 0.25 9.4986 0.25 10.0039 0.25L10.3548 0.250249ZM16.7022 5.25H3.29666L3.85327 14.47C3.93157 15.767 3.9879 16.6868 4.09996 17.3996C4.21012 18.1003 4.36439 18.5261 4.59431 18.8565C4.85213 19.2269 5.18428 19.5396 5.56961 19.7747C5.91325 19.9842 6.34758 20.1126 7.05365 20.1803C7.77186 20.2492 8.6934 20.25 9.9928 20.25C11.2905 20.25 12.2107 20.2492 12.928 20.1805C13.6332 20.1128 14.0671 19.9848 14.4105 19.7755C14.7956 19.5409 15.1277 19.2288 15.3856 18.8589C15.6156 18.5291 15.7702 18.1039 15.8812 17.4042C15.9941 16.6925 16.0517 15.7741 16.1317 14.4788L16.7022 5.25ZM10.451 1.75071L9.65985 1.75051C9.31502 1.75191 9.06007 1.75709 8.8503 1.77618C8.5849 1.80035 8.4499 1.84298 8.3496 1.89633C8.2886 1.92876 8.2304 1.96619 8.1756 2.00823C8.0854 2.07739 7.99063 2.18253 7.85853 2.41407C7.71937 2.65798 7.56941 2.98523 7.34281 3.48234L7.2208 3.75H12.8604L12.6999 3.41888C12.4674 2.93926 12.3137 2.62382 12.1727 2.38884C12.0389 2.16588 11.9443 2.06458 11.8551 1.99801C11.8009 1.95756 11.7434 1.92159 11.6834 1.89044C11.5845 1.83916 11.4522 1.79827 11.1932 1.77511C10.9982 1.75767 10.7635 1.75233 10.451 1.75071Z",fill:"currentColor"})}),xe=()=>e("svg",{width:"18",height:"18",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M12.8536 2.85355C13.0488 2.65829 13.0488 2.34171 12.8536 2.14645C12.6583 1.95118 12.3417 1.95118 12.1464 2.14645L7.5 6.79289L2.85355 2.14645C2.65829 1.95118 2.34171 1.95118 2.14645 2.14645C1.95118 2.34171 1.95118 2.65829 2.14645 2.85355L6.79289 7.5L2.14645 12.1464C1.95118 12.3417 1.95118 12.6583 2.14645 12.8536C2.34171 13.0488 2.65829 13.0488 2.85355 12.8536L7.5 8.20711L12.1464 12.8536C12.3417 13.0488 12.6583 13.0488 12.8536 12.8536C13.0488 12.6583 13.0488 12.3417 12.8536 12.1464L8.20711 7.5L12.8536 2.85355Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}),ye=({file:t,isFileSelected:i,cancelFileUpload:o,config:a})=>{const r=C.SupportedImageFormats.indexOf(t.extension)>=0,s=C.SupportedAudioFormats.indexOf(t.extension)>=0;return n("div",{className:"bc-uploadFileDetails "+("AR"===a?.language?"bc-RTL":""),style:{border:i?"green dashed 1px":""},id:"uploadFileDetails",children:[e("div",{className:"bc-uploadedFile",style:{maxWidth:s?300:"auto",pointerEvents:s?"auto":"none"},children:r?e("img",{src:t.fileUrl,alt:"",className:"bc-imageFile"}):s?e("audio",{src:t.fileUrl,controls:!0,style:{height:28}}):e("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAAPq0lEQVR4nO2caXQUVRbHc2bmw8wXP82MJiyByKiDEHCYccN9QXFFEURxZlRcZkBRXHAXN0TZ3FAIKqABEQggSxKWRBwdBR0cUMCQQEhn6e5s3Z1OSIcl/e6c11WVfvXqvlevqjvCHOqe8zt+qeqU95f/va9aMCPDK6+88sorr7zyyiuvvPLKK6+8Os4rVnrKRbGSrCmx0sy5sZKsPEq7iZ557Zt65rXZ0jsvStnIkq1RnODt1uLek1uKsse0FvX73bH+9z7uqq3k9yfHSjO3xEqzQKMHxEo02rvoCe2be8JBE70StG0y07qpN7RuNBPdmA3RDUlaEvSBSHH20UhRn+LQht7nH+s+HBcF3/T8Tawkc2dHl4ykkHYFIbyMNipjEyJjo1VGgmKNcHGfeKSo79yqLdm/zjiRq720xyRMhrt0YDLE6TCERLroC+GivhtOaCkdpZnfpCsdrS7TEdFlGISK+qyDKRm/yDgRq6M00+8mHW3dkI4IpSiREirl1YwTsTpKshrt0nHw50pHkSYjIaQwh4TW9xmdcaJVrEuIg1GllI5s1+kIJ8iBcGHftnBhzsCME1JISYrp2Ji+dISpDJ3m9TlVrWtP+23GiSXkOExHUQ4dWxrrczbB8oxfZpwwQo7TdIQMIYWn0n/Oblp/6hB3nJFk9RlDAt3CwCHVPMuT1K4YkBtYPtj+W4lYSY/G7k9HH/fpKDSEnArNlPUG/aDJYJ3BH6DRYK1Gw9rTkqzRqF9zuongZ5QzTARWU/7YhZ+yitI/QR3LyjMT1LIUDIAanhUDwLd8wC5fQe5IZ0JKs6H9i/4cZ8LBLWbatgyA1s/NRD8fq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J9kgm9JJlRRFmfCgcVZGvlZUEn5uAfsp3zUA/ZRFvWECspCSi8oX6Cx90NK70Qjjgf2LsrZUZHf7yRUhllM7/7BVVmzgyuz8ln8tvR0QK8kBb3y63RqllOyk3yapJpnaXZ+FWVJH43FSQ4kyMnfv/jU/P0fa+wz+OjYsv/jfjMr8vv3txXhlVdeeeWVV1555ZVXXnnllVdeeeWVV1555VXG/2f9D+lROV6EKZDWAAAAAElFTkSuQmCC",alt:"",className:"bc-documentFile"})}),e("div",{className:"bc-uploadFileName",children:e("span",{children:t.fileName})}),e("div",{className:"bc-uploadFileCancel",children:e("span",{onClick:()=>{try{s&&t.blob&&t.fileUrl.startsWith("blob:")&&URL.revokeObjectURL(t.fileUrl)}catch{}o()},children:e(fe,{})})})]})},ve=({text:n,setText:t,config:i,send:r,placeholder:s})=>{const c=a(null),d="AR"===i?.language,g=o((()=>{const e=c.current;e.style.height="20px";const n=e.scrollHeight;n!==e.offsetHeight&&(e.style.height=n+"px")}),[]);return l((()=>{n||(g(),c.current.focus())}),[g,n]),e("textarea",{ref:c,value:n,className:"bc-messageInputTextArea",id:"textInput",placeholder:s,maxLength:1024,dir:d?"rtl":"ltr",onKeyDown:e=>{if("Enter"===e.key&&(e.shiftKey||e.ctrlKey||e.altKey)){e.preventDefault();const i=c.current.selectionStart,o=n.slice(0,i)+"\n"+n.slice(i);return t(o),void g()}"Enter"===e.key&&(e.preventDefault(),r(),g())},onChange:e=>{t(e.target.value),g()}})},we=({config:t,send:i,file:o,isFileSelected:a,text:r,setText:s,cancelFileUpload:l,noteMode:c,onCloseNoteMode:d,notePlaceholder:g})=>{const p="AR"===t?.language;return n("div",{className:"bc-messageInput "+(p?"bc-RTL":""),children:[c?e(be,{onClick:d,isRTL:p,children:e(xe,{})}):null,o?e(ye,{file:o,isFileSelected:a,cancelFileUpload:l,config:t}):e(ve,{text:r,setText:s,config:t,send:i,placeholder:c?g||j[t.language]?.notePlaceholder:t.inputPlaceholder||j[t.language]?.placeholder}),e(me,{onClick:()=>i(),isRTL:p,children:r||o?e(Ce,{}):null})]})},Me=(e,n)=>`\n &:hover {\n background-image: ${e.replaceAll("%23a3a3a3",n.activeColor)};\n }\n background-image: ${n.isActive?e.replaceAll("%23a3a3a3",n.activeColor):e};\n`,Ae="\ndisplay: flex;\njustify-content: center;\nalign-items: center;\ngap: 4px;\nborder-radius: 8px;\nborder: 1px solid #D2D6DB;\nbackground: #FFF;\ntransition: background-color 0.2s ease, border-color 0.2s ease;\ncursor: pointer;\nfont-size: 14px;\n&:hover {\n background: #f7f7f7;\n border-color: #dcdcdc;\n}\n&:active {\n background: #f0f0f0;\n}\n";d.button`
257
+ ${Ae}
240
258
  height: 32px;
241
259
  min-height: 32px;
242
260
  max-height: 32px;
243
261
  padding: 0 12px;
244
- `;const ve=d.label`
245
- ${ye}
262
+ `;const Le=d.label`
263
+ ${Ae}
246
264
  width: 32px;
247
265
  height: 32px;
248
266
  min-width: 32px;
@@ -250,30 +268,30 @@ i {
250
268
  min-height: 32px;
251
269
  max-height: 32px;
252
270
  padding: 0;
253
- `,we=d.i`
254
- ${e=>xe('url("data:image/svg+xml,%3Csvg%20width%3D%2216%22%20height%3D%2218%22%20viewBox%3D%220%200%2016%2018%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M14.667%207.54199C15.012%207.54217%2015.292%207.82192%2015.292%208.16699C15.2918%2011.9834%2012.3594%2015.1146%208.625%2015.4316V16.708H10.5C10.8451%2016.708%2011.1248%2016.988%2011.125%2017.333C11.125%2017.6782%2010.8452%2017.958%2010.5%2017.958H5.5C5.15482%2017.958%204.875%2017.6782%204.875%2017.333C4.87518%2016.988%205.15493%2016.708%205.5%2016.708H7.375V15.4316C3.64062%2015.1146%200.708174%2011.9834%200.708008%208.16699C0.708008%207.82192%200.98798%207.54217%201.33301%207.54199C1.67819%207.54199%201.95801%207.82181%201.95801%208.16699C1.95818%2011.5036%204.66339%2014.208%208%2014.208C11.3366%2014.208%2014.0418%2011.5036%2014.042%208.16699C14.042%207.82181%2014.3218%207.54199%2014.667%207.54199ZM8%200.0419922C10.6463%200.0419922%2012.7918%202.18679%2012.792%204.83301V8.16699C12.7918%2010.8132%2010.6463%2012.958%208%2012.958C5.35374%2012.958%203.20818%2010.8132%203.20801%208.16699V4.83301C3.20818%202.18679%205.35374%200.0419924%208%200.0419922ZM8%201.29199C6.0441%201.29199%204.45818%202.87715%204.45801%204.83301V8.16699C4.45818%2010.1229%206.0441%2011.708%208%2011.708C9.74256%2011.708%2011.1899%2010.4496%2011.4854%208.79199H9.66699C9.32192%208.79199%209.04217%208.51202%209.04199%208.16699C9.04199%207.82181%209.32181%207.54199%209.66699%207.54199H11.542V5.45801H9.66699C9.32181%205.45801%209.04199%205.17819%209.04199%204.83301C9.04217%204.48798%209.32192%204.20801%209.66699%204.20801H11.4854C11.1899%202.55035%209.74256%201.29199%208%201.29199Z%22%20fill%3D%22%23161616%22%2F%3E%3C%2Fsvg%3E");',e)}
255
- `,Me=d.div`
271
+ `,ke=d.i`
272
+ ${e=>Me('url("data:image/svg+xml,%3Csvg%20width%3D%2216%22%20height%3D%2218%22%20viewBox%3D%220%200%2016%2018%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M14.667%207.54199C15.012%207.54217%2015.292%207.82192%2015.292%208.16699C15.2918%2011.9834%2012.3594%2015.1146%208.625%2015.4316V16.708H10.5C10.8451%2016.708%2011.1248%2016.988%2011.125%2017.333C11.125%2017.6782%2010.8452%2017.958%2010.5%2017.958H5.5C5.15482%2017.958%204.875%2017.6782%204.875%2017.333C4.87518%2016.988%205.15493%2016.708%205.5%2016.708H7.375V15.4316C3.64062%2015.1146%200.708174%2011.9834%200.708008%208.16699C0.708008%207.82192%200.98798%207.54217%201.33301%207.54199C1.67819%207.54199%201.95801%207.82181%201.95801%208.16699C1.95818%2011.5036%204.66339%2014.208%208%2014.208C11.3366%2014.208%2014.0418%2011.5036%2014.042%208.16699C14.042%207.82181%2014.3218%207.54199%2014.667%207.54199ZM8%200.0419922C10.6463%200.0419922%2012.7918%202.18679%2012.792%204.83301V8.16699C12.7918%2010.8132%2010.6463%2012.958%208%2012.958C5.35374%2012.958%203.20818%2010.8132%203.20801%208.16699V4.83301C3.20818%202.18679%205.35374%200.0419924%208%200.0419922ZM8%201.29199C6.0441%201.29199%204.45818%202.87715%204.45801%204.83301V8.16699C4.45818%2010.1229%206.0441%2011.708%208%2011.708C9.74256%2011.708%2011.1899%2010.4496%2011.4854%208.79199H9.66699C9.32192%208.79199%209.04217%208.51202%209.04199%208.16699C9.04199%207.82181%209.32181%207.54199%209.66699%207.54199H11.542V5.45801H9.66699C9.32181%205.45801%209.04199%205.17819%209.04199%204.83301C9.04217%204.48798%209.32192%204.20801%209.66699%204.20801H11.4854C11.1899%202.55035%209.74256%201.29199%208%201.29199Z%22%20fill%3D%22%23161616%22%2F%3E%3C%2Fsvg%3E");',e)}
273
+ `,Ie=d.div`
256
274
  ${e=>e.isRecording&&`\n &:before {\n transform: scale(${1+e.audioLevel/255});\n opacity: ${.6+e.audioLevel/255*.4};\n }\n `}
257
- `,Ae=d.span`
275
+ `,Ee=d.span`
258
276
  display: inline-flex;
259
277
  align-items: center;
260
278
  justify-content: center;
261
279
 
262
280
  ${e=>e.isRTL&&"\n svg {\n transform: scaleX(-1);\n }\n "}
263
- `,Le=({isRTL:n})=>e(Ae,{isRTL:n,children:e("svg",{width:"18",height:"18",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M1.20308 1.04312C1.00481 0.954998 0.772341 1.0048 0.627577 1.16641C0.482813 1.32802 0.458794 1.56455 0.568117 1.75196L3.92115 7.50002L0.568117 13.2481C0.458794 13.4355 0.482813 13.672 0.627577 13.8336C0.772341 13.9952 1.00481 14.045 1.20308 13.9569L14.7031 7.95693C14.8836 7.87668 15 7.69762 15 7.50002C15 7.30243 14.8836 7.12337 14.7031 7.04312L1.20308 1.04312ZM4.84553 7.10002L2.21234 2.586L13.2689 7.50002L2.21234 12.414L4.84552 7.90002H9C9.22092 7.90002 9.4 7.72094 9.4 7.50002C9.4 7.27911 9.22092 7.10002 9 7.10002H4.84553Z",fill:"#666",fillRule:"evenodd",clipRule:"evenodd"})})}),ke=()=>e("svg",{width:"18",height:"18",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M12.8536 2.85355C13.0488 2.65829 13.0488 2.34171 12.8536 2.14645C12.6583 1.95118 12.3417 1.95118 12.1464 2.14645L7.5 6.79289L2.85355 2.14645C2.65829 1.95118 2.34171 1.95118 2.14645 2.14645C1.95118 2.34171 1.95118 2.65829 2.14645 2.85355L6.79289 7.5L2.14645 12.1464C1.95118 12.3417 1.95118 12.6583 2.14645 12.8536C2.34171 13.0488 2.65829 13.0488 2.85355 12.8536L7.5 8.20711L12.1464 12.8536C12.3417 13.0488 12.6583 13.0488 12.8536 12.8536C13.0488 12.6583 13.0488 12.3417 12.8536 12.1464L8.20711 7.5L12.8536 2.85355Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}),Ie={sampleRate:48e3,channelCount:1,sampleSize:128,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0,googEchoCancellation:!0,googAutoGainControl:!0,googNoiseSuppression:!0,googHighpassFilter:!0,googTypingNoiseDetection:!0,googAudioMirroring:!1},Ee=d.div`
281
+ `,Re=({isRTL:n})=>e(Ee,{isRTL:n,children:e("svg",{width:"18",height:"18",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M1.20308 1.04312C1.00481 0.954998 0.772341 1.0048 0.627577 1.16641C0.482813 1.32802 0.458794 1.56455 0.568117 1.75196L3.92115 7.50002L0.568117 13.2481C0.458794 13.4355 0.482813 13.672 0.627577 13.8336C0.772341 13.9952 1.00481 14.045 1.20308 13.9569L14.7031 7.95693C14.8836 7.87668 15 7.69762 15 7.50002C15 7.30243 14.8836 7.12337 14.7031 7.04312L1.20308 1.04312ZM4.84553 7.10002L2.21234 2.586L13.2689 7.50002L2.21234 12.414L4.84552 7.90002H9C9.22092 7.90002 9.4 7.72094 9.4 7.50002C9.4 7.27911 9.22092 7.10002 9 7.10002H4.84553Z",fill:"#666",fillRule:"evenodd",clipRule:"evenodd"})})}),Fe=()=>e("svg",{width:"18",height:"18",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M12.8536 2.85355C13.0488 2.65829 13.0488 2.34171 12.8536 2.14645C12.6583 1.95118 12.3417 1.95118 12.1464 2.14645L7.5 6.79289L2.85355 2.14645C2.65829 1.95118 2.34171 1.95118 2.14645 2.14645C1.95118 2.34171 1.95118 2.65829 2.14645 2.85355L6.79289 7.5L2.14645 12.1464C1.95118 12.3417 1.95118 12.6583 2.14645 12.8536C2.34171 13.0488 2.65829 13.0488 2.85355 12.8536L7.5 8.20711L12.1464 12.8536C12.3417 13.0488 12.6583 13.0488 12.8536 12.8536C13.0488 12.6583 13.0488 12.3417 12.8536 12.1464L8.20711 7.5L12.8536 2.85355Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}),De={sampleRate:48e3,channelCount:1,sampleSize:128,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0,googEchoCancellation:!0,googAutoGainControl:!0,googNoiseSuppression:!0,googHighpassFilter:!0,googTypingNoiseDetection:!0,googAudioMirroring:!1},Se=d.div`
264
282
  display: flex;
265
283
  align-items: center;
266
284
  gap: 5px;
267
285
  direction: ${e=>e.isRTL?"rtl":"ltr"};
268
- `,Re=({setProgress:i,setError:s,setFile:c,onActiveChange:d,config:g})=>{const p="AR"===g?.language,[h,u]=r(!1),[m,b]=r(0),C=a(null),f=a(null),x=a(null),y=a(null),v=a(null),w=a(null);l((()=>{const e=document.createElement("script");return e.src="https://unpkg.com/mic-recorder-to-mp3",e.async=!0,e.onload=()=>console.log("Voice recording library loaded successfully"),e.onerror=()=>{console.error("Failed to load voice recording library"),s("Failed to load voice recording library. Please refresh the page.")},document.body.appendChild(e),()=>{document.body.contains(e)&&document.body.removeChild(e)}}),[s]);const M=o((e=>{try{if(!e.active)return void navigator.mediaDevices.getUserMedia({audio:Ie}).then((e=>{f.current=e,M(e)})).catch((e=>{console.error("Failed to get fresh stream:",e)}));x.current=new(window.AudioContext||window.webkitAudioContext),"suspended"===x.current.state&&x.current.resume().then((()=>{}));const n=x.current.createMediaStreamSource(e);y.current=x.current.createAnalyser(),y.current.fftSize=256,y.current.smoothingTimeConstant=.8,y.current.minDecibels=-90,y.current.maxDecibels=-10,n.connect(y.current);const t=y.current.frequencyBinCount;v.current=new Uint8Array(t);const i=()=>{if(!y.current)return;y.current.getByteFrequencyData(v.current);let e=0;for(let n=0;n<t;n++)e+=v.current[n]*v.current[n];const n=Math.sqrt(e/t),o=Math.min(255,2*n);b(o),w.current=requestAnimationFrame(i)};i()}catch(e){console.error("Audio level monitoring error:",e)}}),[]),A=o((()=>{w.current&&(cancelAnimationFrame(w.current),w.current=null),x.current&&(x.current.close(),x.current=null),b(0)}),[]),L=o((()=>{f.current&&(f.current.getTracks().forEach((e=>{e.stop()})),f.current=null)}),[]);l((()=>()=>{C.current&&h&&C.current.stop(),L(),A()}),[h,A,L]);const k=o((()=>{if(!C.current){if("function"!=typeof MicRecorder)return void s("Please wait a little until voice library is loaded");C.current=new MicRecorder({bitRate:128,sampleRate:48e3})}s(void 0),h?C.current.stop().getMp3().then((([e,n])=>{if(u(!1),A(),L(),d&&d(!0),n.size<1e3)return void s("Recording seems too short. Please try again.");if(!n||0===n.size)return void s("Invalid audio recording. Please try again.");const t=(new Date).toISOString().replace(/[:.]/g,"-"),i=new File([n],`recording-${t}.mp3`,{type:"audio/mpeg"}),o=URL.createObjectURL(i);c({fileUrl:o,fileName:`recording-${t}.mp3`,extension:"mp3",blob:i}),d&&d(!1)})).catch((e=>{u(!1),A(),L(),s(`Recording failed: ${e.message}`),d&&d(!1)})):navigator.mediaDevices.getUserMedia({audio:Ie}).then((e=>{f.current=e,C.current.start().then((()=>{u(!0),d&&d(!0),setTimeout((()=>{x.current&&"suspended"===x.current.state?x.current.resume().then((()=>{M(e)})).catch((n=>{console.error("Failed to resume audio context:",n),M(e)})):M(e)}),100)})).catch((n=>{s(`Failed to start recording: ${n.message}`),e.getTracks().forEach((e=>e.stop())),d&&d(!1)}))})).catch((e=>{"NotAllowedError"===e.name?s("Microphone access denied. Please allow microphone access and try again."):"NotFoundError"===e.name?s("No microphone found. Please connect a microphone and try again."):s(`Microphone error: ${e.message}`),d&&d(!1)}))}),[h,s,c,M,A,L,d]),I=o((()=>{C.current&&h&&C.current.stop(),u(!1),A(),L(),s(void 0),d&&d(!1)}),[h,A,L,s,d]);return n(Ee,{isRTL:p&&h,children:[h?e(ve,{onClick:I,children:e(ke,{})}):null,e(ve,{onClick:k,id:"voiceRecorderIcon",className:"mic-container",children:h?n(t,{children:[e(Le,{isRTL:p}),e(Me,{className:"circle "+(h?"active":""),isRecording:h,audioLevel:m})]}):e(we,{activeColor:"var(--bc-chat-dark-gray-color)"})})]})};const Fe=d.i`
269
- ${e=>xe('url("data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M10%2019.084C15.0163%2019.0838%2019.0838%2015.0163%2019.084%2010C19.0838%204.98367%2015.0163%200.917168%2010%200.916992C4.98367%200.917168%200.917168%204.98367%200.916992%2010C0.917168%2015.0163%204.98367%2019.0838%2010%2019.084ZM10%2017.584C5.8121%2017.5838%202.41717%2014.1879%202.41699%2010C2.41717%205.8121%205.8121%202.41717%2010%202.41699C14.1879%202.41717%2017.5838%205.8121%2017.584%2010C17.5838%2014.1879%2014.1879%2017.5838%2010%2017.584ZM6.6748%208.5C7.22679%208.49964%207.6748%208.05206%207.6748%207.5C7.6748%206.94794%207.22679%206.50036%206.6748%206.5H6.66699C6.11471%206.5%205.66699%206.94771%205.66699%207.5C5.66699%208.05229%206.11471%208.5%206.66699%208.5H6.6748ZM13.334%208.5C13.886%208.49965%2014.334%208.05207%2014.334%207.5C14.334%206.94793%2013.886%206.50035%2013.334%206.5H13.3262C12.7739%206.50001%2012.3262%206.94772%2012.3262%207.5C12.3262%208.05228%2012.7739%208.49999%2013.3262%208.5H13.334ZM10%2014.917C11.6088%2014.9169%2013.038%2014.1426%2013.9336%2012.9502C14.1819%2012.6191%2014.115%2012.1491%2013.7842%2011.9004C13.453%2011.6517%2012.9832%2011.7188%2012.7344%2012.0498C12.1099%2012.8813%2011.117%2013.4169%2010%2013.417C8.88307%2013.4169%207.89111%2012.8811%207.2666%2012.0498C7.01792%2011.7187%206.54798%2011.6519%206.2168%2011.9004C5.88563%2012.1491%205.81871%2012.619%206.06738%2012.9502C6.96298%2014.1425%208.39126%2014.9169%2010%2014.917Z%22%20fill%3D%22%23161616%22%2F%3E%3C%2Fsvg%3E");',e)}
270
- `,De=d.span`
286
+ `,Be=({setProgress:i,setError:s,setFile:c,onActiveChange:d,config:g})=>{const p="AR"===g?.language,[h,u]=r(!1),[m,b]=r(0),C=a(null),f=a(null),x=a(null),y=a(null),v=a(null),w=a(null);l((()=>{const e=document.createElement("script");return e.src="https://unpkg.com/mic-recorder-to-mp3",e.async=!0,e.onload=()=>console.log("Voice recording library loaded successfully"),e.onerror=()=>{console.error("Failed to load voice recording library"),s("Failed to load voice recording library. Please refresh the page.")},document.body.appendChild(e),()=>{document.body.contains(e)&&document.body.removeChild(e)}}),[s]);const M=o((e=>{try{if(!e.active)return void navigator.mediaDevices.getUserMedia({audio:De}).then((e=>{f.current=e,M(e)})).catch((e=>{console.error("Failed to get fresh stream:",e)}));x.current=new(window.AudioContext||window.webkitAudioContext),"suspended"===x.current.state&&x.current.resume().then((()=>{}));const n=x.current.createMediaStreamSource(e);y.current=x.current.createAnalyser(),y.current.fftSize=256,y.current.smoothingTimeConstant=.8,y.current.minDecibels=-90,y.current.maxDecibels=-10,n.connect(y.current);const t=y.current.frequencyBinCount;v.current=new Uint8Array(t);const i=()=>{if(!y.current)return;y.current.getByteFrequencyData(v.current);let e=0;for(let n=0;n<t;n++)e+=v.current[n]*v.current[n];const n=Math.sqrt(e/t),o=Math.min(255,2*n);b(o),w.current=requestAnimationFrame(i)};i()}catch(e){console.error("Audio level monitoring error:",e)}}),[]),A=o((()=>{w.current&&(cancelAnimationFrame(w.current),w.current=null),x.current&&(x.current.close(),x.current=null),b(0)}),[]),L=o((()=>{f.current&&(f.current.getTracks().forEach((e=>{e.stop()})),f.current=null)}),[]);l((()=>()=>{C.current&&h&&C.current.stop(),L(),A()}),[h,A,L]);const k=o((()=>{if(!C.current){if("function"!=typeof MicRecorder)return void s("Please wait a little until voice library is loaded");C.current=new MicRecorder({bitRate:128,sampleRate:48e3})}s(void 0),h?C.current.stop().getMp3().then((([e,n])=>{if(u(!1),A(),L(),d&&d(!0),n.size<1e3)return void s("Recording seems too short. Please try again.");if(!n||0===n.size)return void s("Invalid audio recording. Please try again.");const t=(new Date).toISOString().replace(/[:.]/g,"-"),i=new File([n],`recording-${t}.mp3`,{type:"audio/mpeg"}),o=URL.createObjectURL(i);c({fileUrl:o,fileName:`recording-${t}.mp3`,extension:"mp3",blob:i}),d&&d(!1)})).catch((e=>{u(!1),A(),L(),s(`Recording failed: ${e.message}`),d&&d(!1)})):navigator.mediaDevices.getUserMedia({audio:De}).then((e=>{f.current=e,C.current.start().then((()=>{u(!0),d&&d(!0),setTimeout((()=>{x.current&&"suspended"===x.current.state?x.current.resume().then((()=>{M(e)})).catch((n=>{console.error("Failed to resume audio context:",n),M(e)})):M(e)}),100)})).catch((n=>{s(`Failed to start recording: ${n.message}`),e.getTracks().forEach((e=>e.stop())),d&&d(!1)}))})).catch((e=>{"NotAllowedError"===e.name?s("Microphone access denied. Please allow microphone access and try again."):"NotFoundError"===e.name?s("No microphone found. Please connect a microphone and try again."):s(`Microphone error: ${e.message}`),d&&d(!1)}))}),[h,s,c,M,A,L,d]),I=o((()=>{C.current&&h&&C.current.stop(),u(!1),A(),L(),s(void 0),d&&d(!1)}),[h,A,L,s,d]);return n(Se,{isRTL:p&&h,children:[h?e(Le,{onClick:I,children:e(Fe,{})}):null,e(Le,{onClick:k,id:"voiceRecorderIcon",className:"mic-container",children:h?n(t,{children:[e(Re,{isRTL:p}),e(Ie,{className:"circle "+(h?"active":""),isRecording:h,audioLevel:m})]}):e(ke,{activeColor:"var(--bc-chat-dark-gray-color)"})})]})};const ze=d.i`
287
+ ${e=>Me('url("data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M10%2019.084C15.0163%2019.0838%2019.0838%2015.0163%2019.084%2010C19.0838%204.98367%2015.0163%200.917168%2010%200.916992C4.98367%200.917168%200.917168%204.98367%200.916992%2010C0.917168%2015.0163%204.98367%2019.0838%2010%2019.084ZM10%2017.584C5.8121%2017.5838%202.41717%2014.1879%202.41699%2010C2.41717%205.8121%205.8121%202.41717%2010%202.41699C14.1879%202.41717%2017.5838%205.8121%2017.584%2010C17.5838%2014.1879%2014.1879%2017.5838%2010%2017.584ZM6.6748%208.5C7.22679%208.49964%207.6748%208.05206%207.6748%207.5C7.6748%206.94794%207.22679%206.50036%206.6748%206.5H6.66699C6.11471%206.5%205.66699%206.94771%205.66699%207.5C5.66699%208.05229%206.11471%208.5%206.66699%208.5H6.6748ZM13.334%208.5C13.886%208.49965%2014.334%208.05207%2014.334%207.5C14.334%206.94793%2013.886%206.50035%2013.334%206.5H13.3262C12.7739%206.50001%2012.3262%206.94772%2012.3262%207.5C12.3262%208.05228%2012.7739%208.49999%2013.3262%208.5H13.334ZM10%2014.917C11.6088%2014.9169%2013.038%2014.1426%2013.9336%2012.9502C14.1819%2012.6191%2014.115%2012.1491%2013.7842%2011.9004C13.453%2011.6517%2012.9832%2011.7188%2012.7344%2012.0498C12.1099%2012.8813%2011.117%2013.4169%2010%2013.417C8.88307%2013.4169%207.89111%2012.8811%207.2666%2012.0498C7.01792%2011.7187%206.54798%2011.6519%206.2168%2011.9004C5.88563%2012.1491%205.81871%2012.619%206.06738%2012.9502C6.96298%2014.1425%208.39126%2014.9169%2010%2014.917Z%22%20fill%3D%22%23161616%22%2F%3E%3C%2Fsvg%3E");',e)}
288
+ `,Ne=d.span`
271
289
  margin: 8px;
272
290
  cursor: pointer;
273
291
  font-size: var(--bc-chat-fontSize-xl);
274
- `,Se=({onClick:n})=>e("div",{id:"emojiIcon",children:e(ve,{children:e(Fe,{onClick:n,activeColor:"var(--bc-chat-dark-gray-color)"})})}),Be=({text:n,setText:t,onClick:i})=>{const r=function(e){const n=a(null);return l((()=>{const t=t=>{n.current&&!n.current.contains(t.target)&&e()};return document.addEventListener("mousedown",t),document.addEventListener("touchstart",t),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("touchstart",t)}}),[e]),n}(i),s=o((e=>{t(n+e)}),[t,n]),c=x.map(((n,t)=>e(De,{className:"emoji",onClick:e=>s(e.target.innerText),children:n},"emoji"+t)));return e("div",{ref:r,children:e("div",{className:"bc-emojiPicker",id:"emojiPicker",children:c})})},ze=d.i`
275
- ${e=>xe('url("data:image/svg+xml,%3Csvg%20width%3D%2214%22%20height%3D%2218%22%20viewBox%3D%220%200%2014%2018%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M4.91667%202.12488C2.96066%202.12488%201.375%203.71054%201.375%205.66655L1.375%2010.2499C1.375%2013.3565%203.8934%2015.8749%207%2015.8749C10.1066%2015.8749%2012.625%2013.3565%2012.625%2010.2499V8.99993C12.625%208.65475%2012.9048%208.37493%2013.25%208.37493C13.5952%208.37493%2013.875%208.65475%2013.875%208.99993V10.2499C13.875%2014.0469%2010.797%2017.1249%207%2017.1249C3.20304%2017.1249%200.125%2014.0469%200.125%2010.2499L0.125%205.66655C0.125%203.02018%202.2703%200.874878%204.91667%200.874878C7.56303%200.874878%209.70833%203.02018%209.70833%205.66654V10.2499C9.70833%2011.7456%208.49577%2012.9582%207%2012.9582C5.50423%2012.9582%204.29167%2011.7456%204.29167%2010.2499L4.29167%206.91654C4.29167%206.57137%204.57149%206.29154%204.91667%206.29154C5.26184%206.29154%205.54167%206.57137%205.54167%206.91654L5.54167%2010.2499C5.54167%2011.0553%206.19458%2011.7082%207%2011.7082C7.80542%2011.7082%208.45833%2011.0553%208.45833%2010.2499V5.66654C8.45833%203.71054%206.87267%202.12488%204.91667%202.12488Z%22%20fill%3D%22%23161616%22%2F%3E%3C%2Fsvg%3E");',e)}
276
- `,Ne=({setProgress:t,setFile:i,setError:a})=>{const r=o((e=>{i(void 0),a(void 0);const n=Array.from(e.target.files);if(e.target.value="",n.length<1)return;const o=n[0],{name:r,size:s}=o,l=r.substring(r.lastIndexOf(".")+1).toLowerCase();return C.SupportedFormats.indexOf(l)<0?a("File type is not valid."):s>C.MaxFileSize?a("Maximum limit is 20 MBs"):void de(o,t,((e,n)=>{e?i({fileUrl:e,fileName:r,extension:l}):n&&a(n)}))}),[t,i,a]);return n("div",{id:"attachIcon",children:[e(ve,{htmlFor:"fileInput",children:e(ze,{activeColor:"var(--bc-chat-dark-gray-color)"})}),e("input",{type:"file",className:"bc-fileUpload",id:"fileInput",onChange:r})]})},Ze=d.div`
292
+ `,Ze=({onClick:n})=>e("div",{id:"emojiIcon",children:e(Le,{children:e(ze,{onClick:n,activeColor:"var(--bc-chat-dark-gray-color)"})})}),Te=({text:n,setText:t,onClick:i})=>{const r=function(e){const n=a(null);return l((()=>{const t=t=>{n.current&&!n.current.contains(t.target)&&e()};return document.addEventListener("mousedown",t),document.addEventListener("touchstart",t),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("touchstart",t)}}),[e]),n}(i),s=o((e=>{t(n+e)}),[t,n]),c=x.map(((n,t)=>e(Ne,{className:"emoji",onClick:e=>s(e.target.innerText),children:n},"emoji"+t)));return e("div",{ref:r,children:e("div",{className:"bc-emojiPicker",id:"emojiPicker",children:c})})},Pe=d.i`
293
+ ${e=>Me('url("data:image/svg+xml,%3Csvg%20width%3D%2214%22%20height%3D%2218%22%20viewBox%3D%220%200%2014%2018%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M4.91667%202.12488C2.96066%202.12488%201.375%203.71054%201.375%205.66655L1.375%2010.2499C1.375%2013.3565%203.8934%2015.8749%207%2015.8749C10.1066%2015.8749%2012.625%2013.3565%2012.625%2010.2499V8.99993C12.625%208.65475%2012.9048%208.37493%2013.25%208.37493C13.5952%208.37493%2013.875%208.65475%2013.875%208.99993V10.2499C13.875%2014.0469%2010.797%2017.1249%207%2017.1249C3.20304%2017.1249%200.125%2014.0469%200.125%2010.2499L0.125%205.66655C0.125%203.02018%202.2703%200.874878%204.91667%200.874878C7.56303%200.874878%209.70833%203.02018%209.70833%205.66654V10.2499C9.70833%2011.7456%208.49577%2012.9582%207%2012.9582C5.50423%2012.9582%204.29167%2011.7456%204.29167%2010.2499L4.29167%206.91654C4.29167%206.57137%204.57149%206.29154%204.91667%206.29154C5.26184%206.29154%205.54167%206.57137%205.54167%206.91654L5.54167%2010.2499C5.54167%2011.0553%206.19458%2011.7082%207%2011.7082C7.80542%2011.7082%208.45833%2011.0553%208.45833%2010.2499V5.66654C8.45833%203.71054%206.87267%202.12488%204.91667%202.12488Z%22%20fill%3D%22%23161616%22%2F%3E%3C%2Fsvg%3E");',e)}
294
+ `,je=({setProgress:t,setFile:i,setError:a})=>{const r=o((e=>{i(void 0),a(void 0);const n=Array.from(e.target.files);if(e.target.value="",n.length<1)return;const o=n[0],{name:r,size:s}=o,l=r.substring(r.lastIndexOf(".")+1).toLowerCase();return C.SupportedFormats.indexOf(l)<0?a("File type is not valid."):s>C.MaxFileSize?a("Maximum limit is 20 MBs"):void ue(o,t,((e,n)=>{e?i({fileUrl:e,fileName:r,extension:l}):n&&a(n)}))}),[t,i,a]);return n("div",{id:"attachIcon",children:[e(Le,{htmlFor:"fileInput",children:e(Pe,{activeColor:"var(--bc-chat-dark-gray-color)"})}),e("input",{type:"file",className:"bc-fileUpload",id:"fileInput",onChange:r})]})},He=d.div`
277
295
  padding: 0px 0px 0px 10px;
278
296
  margin: 0px;
279
297
  width: fit-content;
@@ -292,7 +310,7 @@ i {
292
310
  cursor: pointer;
293
311
  display: block;
294
312
  }
295
- `,Te=({setView:i,setFile:o,setProgress:a,setError:s,text:l,setText:c,send:d,config:g})=>{const[p,h]=r(!1),[u,m]=r(!1);return n("div",{className:"bc-inputActions",id:"bc-inputActions",children:[n(Ze,{id:"iconsContainer",isRTL:"AR"===g?.language,children:[u?null:n(t,{children:[e(Ne,{setFile:o,setProgress:a,setError:s}),e(Se,{onClick:()=>h(!0)})]}),e(Re,{setFile:o,setError:s,setProgress:a,onActiveChange:e=>{m(e),e&&h(!1)},config:g})]}),p?e(Be,{text:l,setText:c,onClick:()=>h(!1)}):null]})};ee('.bc-trademark {\n height: 40px;\n width: 100%;\n box-shadow: 0 0 30px 0 rgba(0, 0, 0, 0.1);\n background-color: #fff;\n overflow-y: hidden;\n border-bottom-left-radius: 15px;\n border-bottom-right-radius: 15px;\n padding: 15px 0;\n}\n\n.bc-messageInput {\n min-height: 30px;\n max-height: 100%;\n background-color: #fff;\n overflow-y: hidden;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n.bc-messageInput .bc-messageInputTextArea {\n color: var(--bc-chat-dark-gray-color);\n display: block;\n min-height: 36px;\n background-color: #fff;\n box-sizing: border-box;\n font-size: var(--bc-chat-fontSize-md);\n padding: 10px 0;\n resize: none;\n overflow: auto;\n border-width: 0;\n width: calc(100% - 20px);\n word-wrap: break-word;\n border: none;\n overflow: hidden;\n outline: none;\n -webkit-box-shadow: none;\n -moz-box-shadow: none;\n box-shadow: none;\n}\n.bc-messageInput.bc-RTL {\n direction: rtl;\n}\n\n.bc-inputActions {\n display: flex;\n align-items: center;\n position: relative;\n width: fit-content;\n height: 36px;\n margin-left: auto;\n}\n.bc-inputActions .bc-fileUpload {\n display: none;\n}\n.bc-inputActions i {\n display: block;\n margin: 0 5px;\n}\n.bc-inputActions.bc-RTL {\n direction: rtl;\n}\n\n.bc-ActionChips {\n display: flex;\n gap: 10px;\n}\n\n.bc-BottomBar {\n width: 100%;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n padding-top: 8px;\n}\n.bc-BottomBar.bc-RTL {\n direction: rtl;\n}\n\n.bc-CommandsArea {\n margin-left: auto;\n display: flex;\n align-items: center;\n}\n.bc-CommandsArea.bc-RTL {\n margin-left: 0;\n margin-right: auto;\n direction: rtl;\n}\n\n.bc-emojiPicker {\n position: absolute;\n bottom: 40px;\n right: 0;\n width: 200px;\n background: #ffffff 0% 0% no-repeat padding-box;\n box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.1019607843);\n border-radius: 10px;\n opacity: 1;\n padding: 10px;\n z-index: 10;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n}\n[dir=rtl] .bc-emojiPicker, .bc-RTL .bc-emojiPicker {\n right: auto;\n left: 0;\n}\n\n.bc-uploadFileDetails {\n background-color: transparent;\n display: flex;\n align-items: center;\n width: calc(100% - 60px);\n height: 40px;\n padding: 4px 10px;\n}\n.bc-uploadFileDetails.bc-RTL {\n direction: rtl;\n}\n.bc-uploadFileDetails audio {\n width: 260px;\n}\n.bc-uploadFileDetails .bc-uploadedFile {\n max-width: 32px;\n max-height: 32px;\n pointer-events: none;\n}\n.bc-uploadFileDetails .bc-uploadedFile .bc-imageFile {\n max-width: 100%;\n max-height: 100%;\n pointer-events: none;\n}\n.bc-uploadFileDetails .bc-uploadedFile .bc-documentFile {\n max-width: 100%;\n max-height: 100%;\n margin-top: 4px;\n min-width: 25px;\n min-height: 25px;\n pointer-events: none;\n}\n.bc-uploadFileDetails .bc-uploadFileName {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n pointer-events: none;\n}\n.bc-uploadFileDetails .bc-uploadFileName span {\n padding: 10px;\n pointer-events: none;\n}\n.bc-uploadFileDetails .bc-uploadFileCancel {\n cursor: pointer;\n margin-bottom: -6px;\n margin-left: 6px;\n color: var(--bc-chat-danger-color);\n}\n[dir=rtl] .bc-uploadFileDetails .bc-uploadFileCancel, .bc-RTL .bc-uploadFileDetails .bc-uploadFileCancel {\n margin-left: 0;\n margin-right: 6px;\n}\n\n.mic-container {\n position: relative;\n}\n.mic-container svg {\n z-index: 5;\n}\n.mic-container i {\n transition: 0.9s;\n z-index: 10;\n position: relative;\n}\n.mic-container .circle {\n z-index: 4;\n top: 3px;\n left: 3px;\n position: absolute;\n background-color: transparent;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 1;\n transition: 0.5s;\n}\n.mic-container .circle:before {\n content: "";\n width: 36px;\n height: 36px;\n border-radius: 50%;\n opacity: 0.5;\n z-index: 3;\n position: absolute;\n}\n.mic-container .circle.active {\n background-color: #A8E6A3;\n}\n.mic-container .circle.active:before {\n background: #A8E6A3;\n}\n\n@keyframes bounce {\n 0% {\n transform: scale(1);\n }\n 25% {\n transform: scale(1.4);\n }\n 75% {\n transform: scale(1);\n }\n 100% {\n transform: scale(1.3);\n }\n}');const Pe=d.div`
313
+ `,Ge=({setView:i,setFile:o,setProgress:a,setError:s,text:l,setText:c,send:d,config:g})=>{const[p,h]=r(!1),[u,m]=r(!1);return n("div",{className:"bc-inputActions",id:"bc-inputActions",children:[n(He,{id:"iconsContainer",isRTL:"AR"===g?.language,children:[u?null:n(t,{children:[e(je,{setFile:o,setProgress:a,setError:s}),e(Ze,{onClick:()=>h(!0)})]}),e(Be,{setFile:o,setError:s,setProgress:a,onActiveChange:e=>{m(e),e&&h(!1)},config:g})]}),p?e(Te,{text:l,setText:c,onClick:()=>h(!1)}):null]})};ee('.bc-trademark {\n height: 40px;\n width: 100%;\n box-shadow: 0 0 30px 0 rgba(0, 0, 0, 0.1);\n background-color: #fff;\n overflow-y: hidden;\n border-bottom-left-radius: 15px;\n border-bottom-right-radius: 15px;\n padding: 15px 0;\n}\n\n.bc-messageInput {\n min-height: 30px;\n max-height: 100%;\n background-color: #fff;\n overflow-y: hidden;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n.bc-messageInput .bc-messageInputTextArea {\n color: var(--bc-chat-dark-gray-color);\n display: block;\n min-height: 36px;\n background-color: #fff;\n box-sizing: border-box;\n font-family: var(--bc-chat-font-stack);\n font-size: var(--bc-chat-fontSize-md);\n padding: 10px 0;\n resize: none;\n overflow: auto;\n border-width: 0;\n width: calc(100% - 20px);\n word-wrap: break-word;\n border: none;\n overflow: hidden;\n outline: none;\n -webkit-box-shadow: none;\n -moz-box-shadow: none;\n box-shadow: none;\n}\n.bc-messageInput.bc-RTL {\n direction: rtl;\n}\n\n.bc-inputActions {\n display: flex;\n align-items: center;\n position: relative;\n width: fit-content;\n height: 36px;\n margin-left: auto;\n}\n.bc-inputActions .bc-fileUpload {\n display: none;\n}\n.bc-inputActions i {\n display: block;\n margin: 0 5px;\n}\n.bc-inputActions.bc-RTL {\n direction: rtl;\n}\n\n.bc-ActionChips {\n display: flex;\n gap: 10px;\n}\n\n.bc-BottomBar {\n width: 100%;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n padding-top: 8px;\n}\n.bc-BottomBar.bc-RTL {\n direction: rtl;\n}\n\n.bc-CommandsArea {\n margin-left: auto;\n display: flex;\n align-items: center;\n}\n.bc-CommandsArea.bc-RTL {\n margin-left: 0;\n margin-right: auto;\n direction: rtl;\n}\n\n.bc-emojiPicker {\n position: absolute;\n bottom: 40px;\n right: 0;\n width: 200px;\n background: #ffffff 0% 0% no-repeat padding-box;\n box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.1019607843);\n border-radius: 10px;\n opacity: 1;\n padding: 10px;\n z-index: 10;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n}\n[dir=rtl] .bc-emojiPicker, .bc-RTL .bc-emojiPicker {\n right: auto;\n left: 0;\n}\n\n.bc-uploadFileDetails {\n background-color: transparent;\n display: flex;\n align-items: center;\n width: calc(100% - 60px);\n height: 40px;\n padding: 4px 10px;\n}\n.bc-uploadFileDetails.bc-RTL {\n direction: rtl;\n}\n.bc-uploadFileDetails audio {\n width: 260px;\n}\n.bc-uploadFileDetails .bc-uploadedFile {\n max-width: 32px;\n max-height: 32px;\n pointer-events: none;\n}\n.bc-uploadFileDetails .bc-uploadedFile .bc-imageFile {\n max-width: 100%;\n max-height: 100%;\n pointer-events: none;\n}\n.bc-uploadFileDetails .bc-uploadedFile .bc-documentFile {\n max-width: 100%;\n max-height: 100%;\n margin-top: 4px;\n min-width: 25px;\n min-height: 25px;\n pointer-events: none;\n}\n.bc-uploadFileDetails .bc-uploadFileName {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n pointer-events: none;\n}\n.bc-uploadFileDetails .bc-uploadFileName span {\n padding: 10px;\n pointer-events: none;\n}\n.bc-uploadFileDetails .bc-uploadFileCancel {\n cursor: pointer;\n margin-bottom: -6px;\n margin-left: 6px;\n color: var(--bc-chat-danger-color);\n}\n[dir=rtl] .bc-uploadFileDetails .bc-uploadFileCancel, .bc-RTL .bc-uploadFileDetails .bc-uploadFileCancel {\n margin-left: 0;\n margin-right: 6px;\n}\n\n.mic-container {\n position: relative;\n}\n.mic-container svg {\n z-index: 5;\n}\n.mic-container i {\n transition: 0.9s;\n z-index: 10;\n position: relative;\n}\n.mic-container .circle {\n z-index: 4;\n top: 3px;\n left: 3px;\n position: absolute;\n background-color: transparent;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 1;\n transition: 0.5s;\n}\n.mic-container .circle:before {\n content: "";\n width: 36px;\n height: 36px;\n border-radius: 50%;\n opacity: 0.5;\n z-index: 3;\n position: absolute;\n}\n.mic-container .circle.active {\n background-color: #A8E6A3;\n}\n.mic-container .circle.active:before {\n background: #A8E6A3;\n}\n\n@keyframes bounce {\n 0% {\n transform: scale(1);\n }\n 25% {\n transform: scale(1.4);\n }\n 75% {\n transform: scale(1);\n }\n 100% {\n transform: scale(1.3);\n }\n}');const Je=d.div`
296
314
  display: flex;
297
315
  padding: 8px 16px 16px 16px;
298
316
  flex-direction: column;
@@ -316,7 +334,7 @@ i {
316
334
  margin-top: 6px;
317
335
  text-align: center;
318
336
  }
319
- `,je=d.div`
337
+ `,Ve=d.div`
320
338
  width: 100%;
321
339
  padding: 8px 12px;
322
340
  display: flex;
@@ -326,14 +344,14 @@ i {
326
344
  gap: 4px;
327
345
  flex: 1 0 0;
328
346
  border-bottom: 1px solid var(--bc-border-neutral-secondary, #E5E7EB);
329
- `,He=d.div`
347
+ `,Ue=d.div`
330
348
  display: flex;
331
349
  align-items: center;
332
350
  justify-content: space-between;
333
351
  gap: 8px;
334
352
  direction: ${({isRTL:e})=>e?"rtl":"ltr"};
335
353
 
336
- `,Ge=d.span`
354
+ `,Ke=d.span`
337
355
  font-weight: 500;
338
356
  font-size: var(--bc-chat-fontSize-sm);
339
357
  line-height: var(--bc-chat-lineHeight-sm);
@@ -341,14 +359,14 @@ i {
341
359
  text-overflow: ellipsis;
342
360
  white-space: nowrap;
343
361
  color: var(--bc-text-primary, #16616C);
344
- `,Je=d.span`
362
+ `,Qe=d.span`
345
363
  color: #4b5563;
346
364
  font-size: var(--bc-chat-fontSize-xs);
347
365
  line-height: var(--bc-chat-lineHeight-xs);
348
366
  overflow: hidden;
349
367
  text-overflow: ellipsis;
350
368
  white-space: nowrap;
351
- `,Ue=d.button`
369
+ `,We=d.button`
352
370
  border: none;
353
371
  background: transparent;
354
372
  display: inline-flex;
@@ -367,26 +385,26 @@ i {
367
385
  color: #111827;
368
386
  outline: none;
369
387
  }
370
- `,Ke=()=>e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M8 6.58579L11.2929 3.29289C11.6834 2.90237 12.3166 2.90237 12.7071 3.29289C13.0976 3.68342 13.0976 4.31658 12.7071 4.70711L9.41421 8L12.7071 11.2929C13.0976 11.6834 13.0976 12.3166 12.7071 12.7071C12.3166 13.0976 11.6834 13.0976 11.2929 12.7071L8 9.41421L4.70711 12.7071C4.31658 13.0976 3.68342 13.0976 3.29289 12.7071C2.90237 12.3166 2.90237 11.6834 3.29289 11.2929L6.58579 8L3.29289 4.70711C2.90237 4.31658 2.90237 3.68342 3.29289 3.29289C3.68342 2.90237 4.31658 2.90237 4.70711 3.29289L8 6.58579Z",fill:"currentColor"})}),Ve=({config:t,sendMessage:i,setView:a,actionChips:l,noteMode:c,onNoteSend:d,onCloseNoteMode:g,notePlaceholder:p,replyMessageTitle:h,replyMessageContent:u,onCancelReplyMessage:m})=>{const b="AR"===t?.language,[f,x]=r(),[y,v]=r(),[w,M]=r(),[A,L]=r(0),k=s((()=>Boolean(h||u)),[h,u]),I=s((()=>h||("AR"===t?.language?"الرد على رسالة":"TR"===t?.language?"Bir mesaja yanıt veriliyor":"Replying to message")),[t?.language,h]),E=s((()=>"AR"===t?.language?"إلغاء":"TR"===t?.language?"İptal":"Cancel"),[t?.language]),R=o((e=>{if(c){const e=(f||"").trim();return d&&d(e),void x("")}const n=e=>{const{fileUrl:n,extension:t}=e;i(C.SupportedImageFormats.indexOf(t)>=0?"image":C.SupportedAudioFormats.indexOf(t)>=0?"audio":"document",n)};e?e.blob&&e.fileUrl.startsWith("blob:")?de(e.blob,L,((t,i)=>{if(t){try{URL.revokeObjectURL(e.fileUrl)}catch{}n({...e,fileUrl:t,blob:void 0})}else i&&M(i)})):n(e):y?y.blob&&y.fileUrl.startsWith("blob:")?de(y.blob,L,((e,t)=>{if(e){try{URL.revokeObjectURL(y.fileUrl)}catch{}n({...y,fileUrl:e,blob:void 0}),v(void 0)}else t&&M(t)})):(n(y),v(void 0)):(i(ce,f),x(""))}),[y,f,i,c,d]);return n(Pe,{isRTL:b,children:[k?n(je,{isRTL:b,children:[n(He,{isRTL:b,children:[I?e(Ge,{children:I}):null,m?e(Ue,{type:"button",onClick:m,"aria-label":E,title:E,children:e(Ke,{})}):null]}),u?e(Je,{children:u}):null]}):null,e("div",{className:"bc-InputArea",children:e(fe,{config:t,send:R,text:f,setText:x,file:c?void 0:y,isFileSelected:!!y,cancelFileUpload:()=>v(void 0),noteMode:c,onCloseNoteMode:()=>{x(""),g?.()},notePlaceholder:p})}),n("div",{className:"bc-BottomBar "+(b?"bc-RTL":""),children:[void 0!==l?l:null,e("div",{className:"bc-CommandsArea "+(b?"bc-RTL":""),children:c?null:e(Te,{setView:a,setFile:v,setProgress:L,setError:M,setText:x,text:f,send:R,config:t})})]}),w?e("div",{className:"bc-uploadFileError",children:w}):null]})},Qe="bc-chat-header-banner",We=390,Ye=d.div`
371
- ${e=>e.bannerWidth>We?"height: 60px;":"height: 90px;"}
388
+ `,Ye=()=>e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M8 6.58579L11.2929 3.29289C11.6834 2.90237 12.3166 2.90237 12.7071 3.29289C13.0976 3.68342 13.0976 4.31658 12.7071 4.70711L9.41421 8L12.7071 11.2929C13.0976 11.6834 13.0976 12.3166 12.7071 12.7071C12.3166 13.0976 11.6834 13.0976 11.2929 12.7071L8 9.41421L4.70711 12.7071C4.31658 13.0976 3.68342 13.0976 3.29289 12.7071C2.90237 12.3166 2.90237 11.6834 3.29289 11.2929L6.58579 8L3.29289 4.70711C2.90237 4.31658 2.90237 3.68342 3.29289 3.29289C3.68342 2.90237 4.31658 2.90237 4.70711 3.29289L8 6.58579Z",fill:"currentColor"})}),Oe=({config:t,sendMessage:i,setView:a,actionChips:l,noteMode:c,onNoteSend:d,onCloseNoteMode:g,notePlaceholder:p,replyMessageTitle:h,replyMessageContent:u,onCancelReplyMessage:m})=>{const b="AR"===t?.language,[f,x]=r(),[y,v]=r(),[w,M]=r(),[A,L]=r(0),k=s((()=>Boolean(h||u)),[h,u]),I=s((()=>h||("AR"===t?.language?"الرد على رسالة":"TR"===t?.language?"Bir mesaja yanıt veriliyor":"Replying to message")),[t?.language,h]),E=s((()=>"AR"===t?.language?"إلغاء":"TR"===t?.language?"İptal":"Cancel"),[t?.language]),R=o((e=>{if(c){const e=(f||"").trim();return d&&d(e),void x("")}const n=e=>{const{fileUrl:n,extension:t}=e;i(C.SupportedImageFormats.indexOf(t)>=0?"image":C.SupportedAudioFormats.indexOf(t)>=0?"audio":"document",n)};e?e.blob&&e.fileUrl.startsWith("blob:")?ue(e.blob,L,((t,i)=>{if(t){try{URL.revokeObjectURL(e.fileUrl)}catch{}n({...e,fileUrl:t,blob:void 0})}else i&&M(i)})):n(e):y?y.blob&&y.fileUrl.startsWith("blob:")?ue(y.blob,L,((e,t)=>{if(e){try{URL.revokeObjectURL(y.fileUrl)}catch{}n({...y,fileUrl:e,blob:void 0}),v(void 0)}else t&&M(t)})):(n(y),v(void 0)):(i(he,f),x(""))}),[y,f,i,c,d]);return n(Je,{isRTL:b,children:[k?n(Ve,{isRTL:b,children:[n(Ue,{isRTL:b,children:[I?e(Ke,{children:I}):null,m?e(We,{type:"button",onClick:m,"aria-label":E,title:E,children:e(Ye,{})}):null]}),u?e(Qe,{children:u}):null]}):null,e("div",{className:"bc-InputArea",children:e(we,{config:t,send:R,text:f,setText:x,file:c?void 0:y,isFileSelected:!!y,cancelFileUpload:()=>v(void 0),noteMode:c,onCloseNoteMode:()=>{x(""),g?.()},notePlaceholder:p})}),n("div",{className:"bc-BottomBar "+(b?"bc-RTL":""),children:[void 0!==l?l:null,e("div",{className:"bc-CommandsArea "+(b?"bc-RTL":""),children:c?null:e(Ge,{setView:a,setFile:v,setProgress:L,setError:M,setText:x,text:f,send:R,config:t})})]}),w?e("div",{className:"bc-uploadFileError",children:w}):null]})},qe="bc-chat-header-banner",Xe=390,$e=d.div`
389
+ ${e=>e.bannerWidth>Xe?"height: 60px;":"height: 90px;"}
372
390
  display: block;
373
391
  width: 100%;
374
392
  background-color: transparent;
375
393
  z-index: 10;
376
394
  border-top-left-radius: 15px;
377
395
  border-top-right-radius: 15px;
378
- `,Oe=d.div`
396
+ `,_e=d.div`
379
397
  width: 100%;
380
398
  display: flex;
381
399
  align-items: center;
382
400
  background-image: ${e=>`linear-gradient(103deg, ${e.startColor},${e.endColor})`};
383
- ${e=>e.bannerWidth<=We?'\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMzkwIiBoZWlnaHQ9Ijg4LjM1NCIgdmlld0JveD0iMCAwIDM5MCA4OC4zNTQiPgogIDxkZWZzPgogICAgPGxpbmVhckdyYWRpZW50IGlkPSJsaW5lYXItZ3JhZGllbnQiIHgyPSIxIiB5Mj0iMSIgZ3JhZGllbnRVbml0cz0ib2JqZWN0Qm91bmRpbmdCb3giPgogICAgICA8c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiM2NjJkOTEiLz4KICAgICAgPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZWUyYTdiIi8+CiAgICA8L2xpbmVhckdyYWRpZW50PgogIDwvZGVmcz4KICA8cGF0aCBpZD0iUGF0aF84NzgiIGRhdGEtbmFtZT0iUGF0aCA4NzgiIGQ9Ik0xMCwwSDM4MGExMCwxMCwwLDAsMSwxMCwxMFY3MHMtNzUuMDYtNy44ODYtMTk5LjYxNywxMS44NjJTMCw3MCwwLDcwVjEwQTEwLDEwLDAsMCwxLDEwLDAiIGZpbGw9InVybCgjbGluZWFyLWdyYWRpZW50KSIvPgo8L3N2Zz4K");\n mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMzkwIiBoZWlnaHQ9Ijg4LjM1NCIgdmlld0JveD0iMCAwIDM5MCA4OC4zNTQiPgogIDxkZWZzPgogICAgPGxpbmVhckdyYWRpZW50IGlkPSJsaW5lYXItZ3JhZGllbnQiIHgyPSIxIiB5Mj0iMSIgZ3JhZGllbnRVbml0cz0ib2JqZWN0Qm91bmRpbmdCb3giPgogICAgICA8c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiM2NjJkOTEiLz4KICAgICAgPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZWUyYTdiIi8+CiAgICA8L2xpbmVhckdyYWRpZW50PgogIDwvZGVmcz4KICA8cGF0aCBpZD0iUGF0aF84NzgiIGRhdGEtbmFtZT0iUGF0aCA4NzgiIGQ9Ik0xMCwwSDM4MGExMCwxMCwwLDAsMSwxMCwxMFY3MHMtNzUuMDYtNy44ODYtMTk5LjYxNywxMS44NjJTMCw3MCwwLDcwVjEwQTEwLDEwLDAsMCwxLDEwLDAiIGZpbGw9InVybCgjbGluZWFyLWdyYWRpZW50KSIvPgo8L3N2Zz4K");\n mask-repeat: no-repeat;\n mask-size: auto;\n -webkit-mask-size: auto;\n -webkit-mask-repeat: no-repeat;\n height: 90px;\n ':"height: 60px;"}
384
- `,qe=d.div`
401
+ ${e=>e.bannerWidth<=Xe?'\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hs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Ii8+CiAgICA8L2xpbmVhckdyYWRpZW50PgogIDwvZGVmcz4KICA8cGF0aCBpZD0iUGF0aF84NzgiIGRhdGEtbmFtZT0iUGF0aCA4NzgiIGQ9Ik0xMCwwSDM4MGExMCwxMCwwLDAsMSwxMCwxMFY3MHMtNzUuMDYtNy44ODYtMTk5LjYxNywxMS44NjJTMCw3MCwwLDcwVjEwQTEwLDEwLDAsMCwxLDEwLDAiIGZpbGw9InVybCgjbGluZWFyLWdyYWRpZW50KSIvPgo8L3N2Zz4K");\n mask-repeat: no-repeat;\n mask-size: auto;\n -webkit-mask-size: auto;\n -webkit-mask-repeat: no-repeat;\n height: 90px;\n ':"height: 60px;"}
402
+ `,en=d.div`
385
403
  width: 100%;
386
404
  height: 100%;
387
405
  display: flex;
388
- `,Xe=d.div`
389
- ${e=>e.bannerWidth>We?"padding-bottom: 0 !important;":""}
406
+ `,nn=d.div`
407
+ ${e=>e.bannerWidth>Xe?"padding-bottom: 0 !important;":""}
390
408
  display: flex;
391
409
  gap: 10px;
392
410
  align-items: center;
@@ -407,8 +425,8 @@ i {
407
425
  color: #fff;
408
426
  font-style: normal;
409
427
  }
410
- `,$e=d.div`
411
- ${e=>e.bannerWidth>We?"padding-bottom: 0 !important;":""}
428
+ `,tn=d.div`
429
+ ${e=>e.bannerWidth>Xe?"padding-bottom: 0 !important;":""}
412
430
  display: flex;
413
431
  flex-direction: row-reverse;
414
432
  gap: 10px;
@@ -423,9 +441,9 @@ i {
423
441
  cursor: pointer;
424
442
  display: block;
425
443
  }
426
- `,_e=d.i`
444
+ `,on=d.i`
427
445
  background-image: url("data:image/svg+xml;base64,PHN2ZyBpZD0ibWluaW1pemUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxLjgxNyIgdmlld0JveD0iMCAwIDE2IDEuODE3Ij4KICA8ZGVmcz4KICAgIDxjbGlwUGF0aCBpZD0iY2xpcC1wYXRoIj4KICAgICAgPHJlY3QgaWQ9IlJlY3RhbmdsZV82OCIgZGF0YS1uYW1lPSJSZWN0YW5nbGUgNjgiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxLjgxNyIgZmlsbD0iIzAwMCIvPgogICAgPC9jbGlwUGF0aD4KICA8L2RlZnM+CiAgPGcgaWQ9Ikdyb3VwXzMwMSIgZGF0YS1uYW1lPSJHcm91cCAzMDEiIGNsaXAtcGF0aD0idXJsKCNjbGlwLXBhdGgpIj4KICAgIDxwYXRoIGlkPSJQYXRoXzgwNCIgZGF0YS1uYW1lPSJQYXRoIDgwNCIgZD0iTTE1LjM5NCwyLjIxMUguNjA2QS42MDYuNjA2LDAsMSwxLC42MDYsMUgxNS4zOTRhLjYwNi42MDYsMCwwLDEsMCwxLjIxMSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCAtMC4zOTQpIiBmaWxsPSIjZmZmIi8+CiAgPC9nPgo8L3N2Zz4K");
428
- `,en=({config:t,minimize:i})=>{const[o,a]=r();return l((()=>{new ResizeObserver((()=>{const e=document.getElementById(Qe)?.offsetWidth;e&&e>50&&e!==o&&a(e)})).observe(document.getElementById(Qe))}),[]),e(Ye,{bannerWidth:o,className:"bc-header",children:e(Oe,{className:"bc-banner",id:Qe,startColor:"#065A60",endColor:"#006466",bannerWidth:o,children:n(qe,{className:"bc-bannerContents",children:[n(Xe,{className:"bc-companyInfo",bannerWidth:o,logo:t.brandLogo||f,children:[e("i",{}),e("span",{children:t.brandName||"BreadCrumbs"})]}),e($e,{className:"bc-bannerActions",bannerWidth:o,children:i?e(_e,{className:"bc-flow-minimize",onClick:()=>i()}):null})]})})})},nn=d.div`
446
+ `,an=({config:t,minimize:i})=>{const[o,a]=r();return l((()=>{new ResizeObserver((()=>{const e=document.getElementById(qe)?.offsetWidth;e&&e>50&&e!==o&&a(e)})).observe(document.getElementById(qe))}),[]),e($e,{bannerWidth:o,className:"bc-header",children:e(_e,{className:"bc-banner",id:qe,startColor:"#065A60",endColor:"#006466",bannerWidth:o,children:n(en,{className:"bc-bannerContents",children:[n(nn,{className:"bc-companyInfo",bannerWidth:o,logo:t.brandLogo||f,children:[e("i",{}),e("span",{children:t.brandName||"BreadCrumbs"})]}),e(tn,{className:"bc-bannerActions",bannerWidth:o,children:i?e(on,{className:"bc-flow-minimize",onClick:()=>i()}):null})]})})})},rn=d.div`
429
447
  width: 100%;
430
448
  text-align: center;
431
449
  i {
@@ -456,7 +474,7 @@ i {
456
474
  border-radius: 0px 0px 10px 10px;
457
475
  opacity: 1;
458
476
  }
459
- `,tn=i.forwardRef((({forRate:t},i)=>n(nn,{className:""+(t?"bc-ratingPositioning":""),children:[e("i",{}),e("span",{children:"Powered by Bread Crumbs"})]})));ee('@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");\n:root {\n --bc-chat-font-stack: "Poppins", "Montserrat", sans-serif;\n --bc-chat-fontSize-xs: 10px;\n --bc-chat-fontSize-sm: 12px;\n --bc-chat-fontSize-md: 16px;\n --bc-chat-fontSize-lg: 18px;\n --bc-chat-fontSize-xl: 22px;\n --bc-chat-fontSize-xxl: 26px;\n --bc-chat-body-4-size: 12px;\n --bc-chat-body-4-lineheight: 20px;\n --bc-text-secondary: #6C737F;\n --bc-chat-fontWeight-light: 100;\n --bc-chat-fontWeight-regular: 400;\n --bc-chat-fontWeight-medium: 500;\n --bc-chat-fontWeight-bold: 700;\n --bc-chat-lineHeight-xs: 18px;\n --bc-chat-lineHeight-sm: 22px;\n --bc-chat-lineHeight-md: 28px;\n --bc-chat-light-gray-color: #9b9b9b;\n --bc-chat-dark-gray-color: #4d4d4d;\n --bc-chat-other-message-border-color: #E5E7EB;\n --bc-chat-other-message-background-start-color: #E5E7EB;\n --bc-chat-other-message-background-end-color: #E5E7EB;\n --bc-chat-other-message-text-color: #161616;\n --bc-chat-my-message-border-color: #258694;\n --bc-chat-my-message-background-start-color: #258694;\n --bc-chat-my-message-background-end-color: #258694;\n --bc-chat-message-highlight-color: #EBC10466;\n --bc-chat-my-message-text-color: #fff;\n --bc-chat-danger-color: #B42318;\n --bc-chat-success-color: #58aa18;\n --bc-chat-white-color: #fff;\n --bc-chat-radius: 5px;\n --bc-background-primary-50: #F3FBFC;\n --bc-border-primary: #16616C;\n --bc-border-neutral-secondary: #E5E7EB;\n}');const on=d.div`
477
+ `,sn=i.forwardRef((({forRate:t},i)=>n(rn,{className:""+(t?"bc-ratingPositioning":""),children:[e("i",{}),e("span",{children:"Powered by Bread Crumbs"})]})));ee('@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");\n:root {\n --bc-chat-font-stack: "Poppins", "Montserrat", sans-serif;\n --bc-chat-fontSize-xs: 10px;\n --bc-chat-fontSize-sm: 12px;\n --bc-chat-fontSize-md: 16px;\n --bc-chat-fontSize-lg: 18px;\n --bc-chat-fontSize-xl: 22px;\n --bc-chat-fontSize-xxl: 26px;\n --bc-chat-body-4-size: 12px;\n --bc-chat-body-4-lineheight: 20px;\n --bc-text-secondary: #6C737F;\n --bc-chat-fontWeight-light: 100;\n --bc-chat-fontWeight-regular: 400;\n --bc-chat-fontWeight-medium: 500;\n --bc-chat-fontWeight-bold: 700;\n --bc-chat-lineHeight-xs: 18px;\n --bc-chat-lineHeight-sm: 22px;\n --bc-chat-lineHeight-md: 28px;\n --bc-chat-light-gray-color: #9b9b9b;\n --bc-chat-dark-gray-color: #4d4d4d;\n --bc-chat-other-message-border-color: #E5E7EB;\n --bc-chat-other-message-background-start-color: #E5E7EB;\n --bc-chat-other-message-background-end-color: #E5E7EB;\n --bc-chat-other-message-text-color: #161616;\n --bc-chat-my-message-border-color: #258694;\n --bc-chat-my-message-background-start-color: #258694;\n --bc-chat-my-message-background-end-color: #258694;\n --bc-chat-message-highlight-color: #EBC10466;\n --bc-chat-my-message-text-color: #fff;\n --bc-chat-danger-color: #B42318;\n --bc-chat-success-color: #58aa18;\n --bc-chat-white-color: #fff;\n --bc-chat-radius: 5px;\n --bc-background-primary-50: #F3FBFC;\n --bc-border-primary: #16616C;\n --bc-border-neutral-secondary: #E5E7EB;\n}');const ln=d.div`
460
478
  position: relative;
461
479
  height: 100%;
462
480
  display: flex;
@@ -475,13 +493,5 @@ i {
475
493
  font-style: normal;
476
494
  line-height: var(--bc-chat-lineHeight-xs);
477
495
  color: var(--bc-chat-dark-gray-color);
478
- p,
479
- input,
480
- textarea {
481
- font-family: inherit;
482
- font-size: inherit;
483
- line-height: inherit;
484
- font-weight: inherit;
485
- }
486
- `,an=({config:t={language:"EN",backgroundColor:"#F3F4F6"},messages:i=[],sendMessage:o,debug:a,minimize:s,onReachingUp:l,agentsIdsAvatarsMap:c,actionChips:d,noteMode:g,onNoteSend:p,onCloseNoteMode:h,searchPattern:u,notePlaceholder:m,searchMatchNo:b=1,onSearchMatchCount:C,onMessageReply:f,replyMessageTitle:x,replyMessageContent:y,onCancelReplyMessage:v})=>{const[w,M]=r("MESSAGE_LIST"),A="interactive"===(i&&i.length>0&&i[i.length-1].type);return n(on,{className:"bc-chat",children:[t.hideHeader?null:e(en,{config:t,minimize:s}),"MESSAGE_LIST"===w?e(le,{messages:i,sendMessage:o,debug:a,config:t,onReachingUp:l,agentsIdsAvatarsMap:c,searchPattern:u,searchMatchNo:b,onSearchMatchCount:C,onMessageReply:f},"message-list"):null,A?e(tn,{forRate:!0}):t.inputDisabled?null:e(Ve,{sendMessage:o,setView:M,config:t,actionChips:d,noteMode:g,onCloseNoteMode:h,onNoteSend:p,notePlaceholder:m,replyMessageTitle:x,replyMessageContent:y,onCancelReplyMessage:v},"message-input")]})};export{an as BCChat};
496
+ `,cn=({config:t={language:"EN",backgroundColor:"#F3F4F6"},messages:i=[],sendMessage:o,debug:a,minimize:s,onReachingUp:l,agentsIdsAvatarsMap:c,actionChips:d,noteMode:g,onNoteSend:p,onCloseNoteMode:h,searchPattern:u,notePlaceholder:m,searchMatchNo:b=1,onSearchMatchCount:C,onMessageReply:f,replyMessageTitle:x,replyMessageContent:y,onCancelReplyMessage:v,errorMessage:w})=>{const[M,A]=r("MESSAGE_LIST"),L="interactive"===(i&&i.length>0&&i[i.length-1].type);return n(ln,{className:"bc-chat",children:[t.hideHeader?null:e(an,{config:t,minimize:s}),"MESSAGE_LIST"===M?e(pe,{messages:i,sendMessage:o,debug:a,config:t,onReachingUp:l,agentsIdsAvatarsMap:c,searchPattern:u,searchMatchNo:b,onSearchMatchCount:C,onMessageReply:f,errorMessage:w},"message-list"):null,L?e(sn,{forRate:!0}):t.inputDisabled?null:e(Oe,{sendMessage:o,setView:A,config:t,actionChips:d,noteMode:g,onCloseNoteMode:h,onNoteSend:p,notePlaceholder:m,replyMessageTitle:x,replyMessageContent:y,onCancelReplyMessage:v},"message-input")]})};export{cn as BCChat};
487
497
  //# sourceMappingURL=index.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":["../node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n"],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;upEAAA,SAASA,GAAYC,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKF,GAA2B,oBAAbG,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,GAnBY,CAqB1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.es.js","sources":["../node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n"],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;upEAAA,SAASA,GAAYC,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKF,GAA2B,oBAAbG,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,GAnBY,CAqB1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/build/index.js CHANGED
@@ -67,7 +67,7 @@
67
67
  display: none;
68
68
  position: absolute;
69
69
  ${e=>e.isMyMessage&&!e.isRTL||!e.isMyMessage&&e.isRTL?"left: -40px;":"right: -40px;"}
70
- top: calc(50% - 12px);
70
+ top: calc(50% - 14px);
71
71
  border: none;
72
72
  transform: ${e=>e.isMyMessage&&!e.isRTL||!e.isMyMessage&&e.isRTL?"scaleX(-1)":"none"};
73
73
  background: transparent;
@@ -79,6 +79,7 @@
79
79
  line-height: var(--bc-chat-lineHeight-xs);
80
80
  flex-direction: ${e=>e.isRTL?"row-reverse":"row"};
81
81
  transition: background-color 0.2s ease, color 0.2s ease;
82
+ margin: 0;
82
83
 
83
84
  &:hover,
84
85
  &:focus-visible {
@@ -132,19 +133,19 @@ i {
132
133
  opacity: 0.7;
133
134
  font-weight: var(--bc-chat-fontWeight-regular);
134
135
  line-height: var(--bc-chat-lineHeight-sm);
135
- `;const U=d.default.a`
136
+ `;const V=d.default.a`
136
137
  font-size: var(--bc-chat-fontSize-sm);
137
138
  color: inherit;
138
139
  text-decoration: none;
139
140
  &:hover {
140
141
  opacity: 0.8;
141
142
  }
142
- `,K=d.default.div`
143
+ `,U=d.default.div`
143
144
  display: flex;
144
145
  flex-direction: row;
145
146
  align-items: center;
146
147
  gap: 5px;
147
- `,V=d.default.span`
148
+ `,K=d.default.span`
148
149
  color: inherit;
149
150
  `;const Q=d.default.i`
150
151
  background-image: ${e=>`url("data:image/svg+xml,%3Csvg%20width%3D%2215%22%20height%3D%2215%22%20viewBox%3D%220%200%2015%2015%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M9.62129%201.13607C9.81656%200.940808%2010.1331%200.940809%2010.3284%201.13607L11.3891%202.19673L12.8033%203.61094L13.8639%204.6716C14.0592%204.86687%2014.0592%205.18345%2013.8639%205.37871C13.6687%205.57397%2013.3521%205.57397%2013.1568%205.37871L12.5038%204.7257L8.86727%209.57443L9.97485%2010.682C10.1701%2010.8773%2010.1701%2011.1939%209.97485%2011.3891C9.77959%2011.5844%209.463%2011.5844%209.26774%2011.3891L7.85353%209.97491L6.79287%208.91425L3.5225%2012.1846C3.32724%2012.3799%203.01065%2012.3799%202.81539%2012.1846C2.62013%2011.9894%202.62013%2011.6728%202.81539%2011.4775L6.08576%208.20714L5.0251%207.14648L3.61089%205.73226C3.41563%205.537%203.41562%205.22042%203.61089%205.02516C3.80615%204.8299%204.12273%204.8299%204.31799%205.02516L5.42557%206.13274L10.2743%202.49619L9.62129%201.84318C9.42603%201.64792%209.42603%201.33133%209.62129%201.13607Z%22%20fill%3D%22currentColor%22%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M9.62129%201.13607C9.81656%200.940808%2010.1331%200.940809%2010.3284%201.13607L11.3891%202.19673L12.8033%203.61094L13.8639%204.6716C14.0592%204.86687%2014.0592%205.18345%2013.8639%205.37871C13.6687%205.57397%2013.3521%205.57397%2013.1568%205.37871L12.5038%204.7257L8.86727%209.57443L9.97485%2010.682C10.1701%2010.8773%2010.1701%2011.1939%209.97485%2011.3891C9.77959%2011.5844%209.463%2011.5844%209.26774%2011.3891L7.85353%209.97491L6.79287%208.91425L3.5225%2012.1846C3.32724%2012.3799%203.01065%2012.3799%202.81539%2012.1846C2.62013%2011.9894%202.62013%2011.6728%202.81539%2011.4775L6.08576%208.20714L5.0251%207.14648L3.61089%205.73226C3.41563%205.537%203.41562%205.22042%203.61089%205.02516C3.80615%204.8299%204.12273%204.8299%204.31799%205.02516L5.42557%206.13274L10.2743%202.49619L9.62129%201.84318C9.42603%201.64792%209.42603%201.33133%209.62129%201.13607Z%22%20fill%3D%22%23${e.color}%22%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E")`};
@@ -168,7 +169,7 @@ i {
168
169
  max-width: 60%;
169
170
  `,Y=d.default.span`
170
171
  direction: ${e=>"arb"===e.language?"rtl":"ltr"};
171
- `,O={document:({message:t,config:i,onReply:a})=>{const o=i.isAgent===t.isAgent,[r,s]=n.useState(""),l=n.useMemo((()=>{try{const e=(t.content||"").split("/");return decodeURIComponent(e[e.length-1]||"file")}catch{return"file"}}),[t.content]);n.useEffect((()=>{let e=!1;const n=t.content;if(n)return fetch(n,{method:"HEAD"}).then((n=>{const t=n.headers.get("content-length");if(!t)return;const i=Number(t);var a;Number.isFinite(i)&&(e||s((a=i)<1024?`${a} B`:a<1048576?`${(a/1024).toFixed(1)}KB`:a<1073741824?`${(a/1048576).toFixed(1)}MB`:`${(a/1073741824).toFixed(1)}GB`))})).catch((()=>{})),()=>{e=!0}}),[t.content]);const c=r?`${r} - ${z[i.language]?.download}`:z[i.language]?.download;return e.jsx(R,{isMyMessage:o,createdAt:t.createdAt,message:t,config:i,onReply:a,children:e.jsx(Z,{href:t.content,target:"_blank",download:l,rel:"noopener noreferrer",isMyMessage:o,children:e.jsxs(T,{isMyMessage:o,children:[e.jsx(P,{children:e.jsx(N,{})}),e.jsxs(H,{children:[e.jsx(G,{children:l}),e.jsx(J,{children:c})]})]})})})},image:({message:n,config:t,onReply:i})=>{const a=t.isAgent===n.isAgent;return e.jsx(R,{className:"bc-mediaMessage",isMyMessage:a,createdAt:n.createdAt,message:n,config:t,onReply:i,children:e.jsx("a",{href:n.content,target:"_blank",rel:"noreferrer",children:e.jsx("img",{src:n.content,alt:"message content",style:{width:"100%",height:"auto",borderRadius:"8px"}})})})},location:({message:n,config:t,onReply:i})=>{const a=t.isAgent===n.isAgent;return e.jsx(R,{isMyMessage:a,createdAt:n.createdAt,message:n,config:t,onReply:i,children:e.jsx(U,{href:"https://www.google.com/maps/?q="+n.content,target:"_blank",rel:"noopener noreferrer",children:e.jsxs(K,{children:[e.jsx(Q,{color:"000000"}),e.jsx(V,{children:"Open location"})]})})})},text:S,video:B,audio:B,interactive:null,template:({message:t,config:i,onReply:a})=>{const o=n.useMemo((()=>{try{return JSON.parse(t.content)}catch(e){return void console.log(e.message)}}),[t]),r=i.isAgent===t.isAgent;return e.jsxs(R,{isMyMessage:r,createdAt:t.createdAt,message:t,config:i,onReply:a,children:[e.jsx("b",{children:"Template message:"})," ",o.name," ",o.language?.code?`/ ${o.language.code}`:null]})},note:({message:n})=>{const t=o.franc(n.content);return e.jsxs(W,{children:[e.jsx(Y,{language:t,children:n.content})," ",e.jsx(f,{createdAt:n.createdAt})]})},button:S};function q(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===t&&i.firstChild?i.insertBefore(a,i.firstChild):i.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}q('/* Shared styles between agent and client messages */\n.bc-otherMessage,\n.bc-myMessage {\n margin: 24px;\n font-size: var(--bc-chat-body-4-size);\n line-height: var(--bc-chat-body-4-lineheight);\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n gap: 12px;\n}\n.bc-otherMessage div p,\n.bc-myMessage div p {\n padding: 0;\n margin: 0;\n}\n\n/* Styles for agent messages */\n.bc-otherMessage {\n justify-content: flex-start;\n}\n.bc-otherMessage:first-child {\n flex: 1 0 50%;\n}\n.bc-otherMessage > :nth-child(2) {\n flex: 0 1 auto;\n max-width: 85%;\n}\n\n/* Styles for other messages */\n.bc-note {\n text-align: center;\n gap: 5px;\n}\n\n.bc-myMessage {\n justify-content: flex-end;\n}\n.bc-myMessage > div:not(.bc-debugCon),\n.bc-myMessage .bc-locationMessage,\n.bc-myMessage audio {\n color: #fff;\n}\n.bc-myMessage svg path:nth-child(2) {\n fill: #fff;\n}\n\n.bc-mediaMessage {\n position: relative;\n max-width: 360px !important;\n}\n.bc-mediaMessage audio,\n.bc-mediaMessage video,\n.bc-mediaMessage img {\n max-width: 100%;\n}\n.bc-mediaMessage audio {\n -webkit-appearance: none;\n -webkit-border-radius: 0;\n border-radius: 0;\n}\n.bc-mediaMessage audio::-webkit-media-controls-panel {\n background-color: transparent;\n}\n.bc-mediaMessage audio::-webkit-media-controls-play-button {\n background-color: transparent;\n}\n.bc-mediaMessage audio::-webkit-media-controls-timeline {\n background-color: transparent;\n}\n.bc-mediaMessage audio::-webkit-media-controls-current-time-display, .bc-mediaMessage audio::-webkit-media-controls-time-remaining-display {\n color: inherit;\n}\n.bc-mediaMessage audio {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n height: 40px !important;\n width: 100% !important;\n max-width: 400px !important;\n position: static !important;\n -webkit-appearance: none !important;\n -webkit-border-radius: 0 !important;\n border-radius: 0 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls {\n display: flex !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-panel {\n display: flex !important;\n visibility: visible !important;\n background-color: #f0f0f0 !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-play-button {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-timeline {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-volume-slider {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-current-time-display, .bc-mediaMessage audio::-webkit-media-controls-time-remaining-display {\n display: block !important;\n visibility: visible !important;\n color: #000 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-mute-button {\n display: block !important;\n visibility: visible !important;\n}\n\n.bc-mediaMessage.audio {\n width: 320px;\n height: 64px !important;\n}\n\n/* Custom audio player */\n.bc-audioPlayer {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 250px;\n position: relative;\n height: 60px;\n}\n\n.bc-myMessage .bc-audioPlayer {\n justify-self: flex-end;\n}\n\n.bc-otherMessage .bc-audioPlayer {\n justify-self: flex-start;\n}\n\n.bc-audioPlayer audio {\n display: none !important;\n width: 0 !important;\n height: 0 !important;\n}\n\n.bc-audioPlayer__button {\n flex: 0 0 auto;\n width: 40px;\n height: 40px;\n border: none;\n border-radius: 50%;\n background: #ffffff;\n position: relative;\n cursor: pointer;\n}\n\n.bc-otherMessage .bc-audioPlayer__button {\n background: #16616C;\n}\n\n.bc-audioPlayer__button.play::before {\n content: "";\n position: absolute;\n left: 12px;\n top: 12px;\n width: 16px;\n height: 16px;\n background-repeat: no-repeat;\n background-position: center;\n background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M6.23541%202.19233C5.2355%201.62986%204%202.35243%204%203.49968V12.5C4%2013.6472%205.23546%2014.3698%206.23537%2013.8073L14.2356%209.30735C15.2551%208.73391%2015.2551%207.26609%2014.2357%206.69262L6.23541%202.19233Z%22%20fill%3D%22%2316616C%22%2F%3E%3C%2Fsvg%3E");\n}\n\n.bc-otherMessage .bc-audioPlayer__button.play::before {\n background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M6.23541%202.19233C5.2355%201.62986%204%202.35243%204%203.49968V12.5C4%2013.6472%205.23546%2014.3698%206.23537%2013.8073L14.2356%209.30735C15.2551%208.73391%2015.2551%207.26609%2014.2357%206.69262L6.23541%202.19233Z%22%20fill%3D%22%23ffffff%22%2F%3E%3C%2Fsvg%3E");\n}\n\n.bc-audioPlayer__button.pause::before,\n.bc-audioPlayer__button.pause::after {\n content: "";\n position: absolute;\n top: 14px;\n width: 3px;\n height: 12px;\n background: #16616C;\n}\n\n.bc-otherMessage .bc-audioPlayer__button.pause::before,\n.bc-otherMessage .bc-audioPlayer__button.pause::after {\n background: #ffffff;\n}\n\n.bc-audioPlayer__button.pause::before {\n left: 16px;\n}\n\n.bc-audioPlayer__button.pause::after {\n right: 16px;\n}\n\n.bc-audioPlayer__wave {\n position: relative;\n flex: 1 1 auto;\n height: 22px;\n cursor: pointer;\n}\n\n.bc-audioPlayer__wave--future,\n.bc-audioPlayer__wave--past {\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n height: 22px;\n display: grid;\n grid-auto-flow: column;\n grid-auto-columns: 2px;\n column-gap: 1px;\n align-items: end;\n width: 100%;\n pointer-events: none;\n}\n\n.bc-audioPlayer__wave--future span {\n display: block;\n width: 2px;\n background: rgba(255, 255, 255, 0.6);\n border-radius: 2px;\n}\n\n.bc-otherMessage .bc-audioPlayer__wave--future span {\n background: #16616C;\n opacity: 0.6;\n}\n\n.bc-audioPlayer__wave--past {\n overflow: hidden;\n white-space: nowrap;\n}\n\n.bc-audioPlayer__wave--past span {\n display: inline-block;\n width: 2px;\n margin-right: 3px;\n background: #ffffff;\n border-radius: 2px;\n}\n\n.bc-otherMessage .bc-audioPlayer__wave--past span {\n background: #16616C;\n}\n\n.bc-otherMessage:hover .bc-replyButton, .bc-otherMessage:active .bc-replyButton, .bc-myMessage:hover .bc-replyButton, .bc-myMessage:active .bc-replyButton {\n display: block;\n}\n\n.bc-audioPlayer__time {\n color: #ffffff;\n font-weight: 400;\n opacity: 0.95;\n position: absolute;\n top: 46px;\n left: 80px;\n font-size: 10px;\n}\n\n.bc-otherMessage .bc-audioPlayer__time {\n color: #16616C;\n}\n\n.bc-selectionContainer {\n display: flex;\n align-items: flex-start;\n flex-wrap: wrap;\n}\n\n.bc-selectionContainer:first-child {\n flex: 1 0 50%;\n}\n\n.status-icon {\n color: var(--bc-chat-my-message-text-color) !important;\n opacity: 0.7;\n}\n.status-icon.failed {\n color: var(--bc-chat-danger-color) !important;\n}\n.status-icon.failed .resend {\n color: var(--bc-chat-dark-gray-color) !important;\n cursor: pointer;\n margin: 0 10px;\n}');const X=d.default.i`
172
+ `,O={document:({message:t,config:i,onReply:a})=>{const o=i.isAgent===t.isAgent,[r,s]=n.useState(""),l=n.useMemo((()=>{try{const e=(t.content||"").split("/");return decodeURIComponent(e[e.length-1]||"file")}catch{return"file"}}),[t.content]);n.useEffect((()=>{let e=!1;const n=t.content;if(n)return fetch(n,{method:"HEAD"}).then((n=>{const t=n.headers.get("content-length");if(!t)return;const i=Number(t);var a;Number.isFinite(i)&&(e||s((a=i)<1024?`${a} B`:a<1048576?`${(a/1024).toFixed(1)}KB`:a<1073741824?`${(a/1048576).toFixed(1)}MB`:`${(a/1073741824).toFixed(1)}GB`))})).catch((()=>{})),()=>{e=!0}}),[t.content]);const c=r?`${r} - ${z[i.language]?.download}`:z[i.language]?.download;return e.jsx(R,{isMyMessage:o,createdAt:t.createdAt,message:t,config:i,onReply:a,children:e.jsx(Z,{href:t.content,target:"_blank",download:l,rel:"noopener noreferrer",isMyMessage:o,children:e.jsxs(T,{isMyMessage:o,children:[e.jsx(P,{children:e.jsx(N,{})}),e.jsxs(H,{children:[e.jsx(G,{children:l}),e.jsx(J,{children:c})]})]})})})},image:({message:n,config:t,onReply:i})=>{const a=t.isAgent===n.isAgent;return e.jsx(R,{className:"bc-mediaMessage",isMyMessage:a,createdAt:n.createdAt,message:n,config:t,onReply:i,children:e.jsx("a",{href:n.content,target:"_blank",rel:"noreferrer",children:e.jsx("img",{src:n.content,alt:"message content",style:{width:"100%",height:"auto",borderRadius:"8px"}})})})},location:({message:n,config:t,onReply:i})=>{const a=t.isAgent===n.isAgent;return e.jsx(R,{isMyMessage:a,createdAt:n.createdAt,message:n,config:t,onReply:i,children:e.jsx(V,{href:"https://www.google.com/maps/?q="+n.content,target:"_blank",rel:"noopener noreferrer",children:e.jsxs(U,{children:[e.jsx(Q,{color:"000000"}),e.jsx(K,{children:"Open location"})]})})})},text:S,video:B,audio:B,interactive:null,template:({message:t,config:i,onReply:a})=>{const o=n.useMemo((()=>{try{return JSON.parse(t.content)}catch(e){return void console.log(e.message)}}),[t]),r=i.isAgent===t.isAgent;return e.jsxs(R,{isMyMessage:r,createdAt:t.createdAt,message:t,config:i,onReply:a,children:[e.jsx("b",{children:"Template message:"})," ",o.name," ",o.language?.code?`/ ${o.language.code}`:null]})},note:({message:n})=>{const t=o.franc(n.content);return e.jsxs(W,{children:[e.jsx(Y,{language:t,children:n.content})," ",e.jsx(f,{createdAt:n.createdAt})]})},button:S};function q(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===t&&i.firstChild?i.insertBefore(a,i.firstChild):i.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}q('/* Shared styles between agent and client messages */\n.bc-otherMessage,\n.bc-myMessage {\n margin: 24px;\n font-size: var(--bc-chat-body-4-size);\n line-height: var(--bc-chat-body-4-lineheight);\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n gap: 12px;\n}\n.bc-otherMessage div p,\n.bc-myMessage div p {\n padding: 0;\n margin: 0;\n}\n\n/* Styles for agent messages */\n.bc-otherMessage {\n justify-content: flex-start;\n}\n.bc-otherMessage:first-child {\n flex: 1 0 50%;\n}\n.bc-otherMessage > :nth-child(2) {\n flex: 0 1 auto;\n max-width: 85%;\n}\n\n/* Styles for other messages */\n.bc-note {\n text-align: center;\n gap: 5px;\n}\n\n.bc-myMessage {\n justify-content: flex-end;\n}\n.bc-myMessage > div:not(.bc-debugCon),\n.bc-myMessage .bc-locationMessage,\n.bc-myMessage audio {\n color: #fff;\n}\n.bc-myMessage svg path:nth-child(2) {\n fill: #fff;\n}\n\n.bc-mediaMessage {\n position: relative;\n max-width: 360px !important;\n}\n.bc-mediaMessage audio,\n.bc-mediaMessage video,\n.bc-mediaMessage img {\n max-width: 100%;\n}\n.bc-mediaMessage audio {\n -webkit-appearance: none;\n -webkit-border-radius: 0;\n border-radius: 0;\n}\n.bc-mediaMessage audio::-webkit-media-controls-panel {\n background-color: transparent;\n}\n.bc-mediaMessage audio::-webkit-media-controls-play-button {\n background-color: transparent;\n}\n.bc-mediaMessage audio::-webkit-media-controls-timeline {\n background-color: transparent;\n}\n.bc-mediaMessage audio::-webkit-media-controls-current-time-display, .bc-mediaMessage audio::-webkit-media-controls-time-remaining-display {\n color: inherit;\n}\n.bc-mediaMessage audio {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n height: 40px !important;\n width: 100% !important;\n max-width: 400px !important;\n position: static !important;\n -webkit-appearance: none !important;\n -webkit-border-radius: 0 !important;\n border-radius: 0 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls {\n display: flex !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-panel {\n display: flex !important;\n visibility: visible !important;\n background-color: #f0f0f0 !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-play-button {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-timeline {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-volume-slider {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-current-time-display, .bc-mediaMessage audio::-webkit-media-controls-time-remaining-display {\n display: block !important;\n visibility: visible !important;\n color: #000 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-mute-button {\n display: block !important;\n visibility: visible !important;\n}\n\n.bc-mediaMessage.audio {\n width: 320px;\n height: 64px !important;\n}\n\n/* Custom audio player */\n.bc-audioPlayer {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 250px;\n position: relative;\n height: 60px;\n}\n\n.bc-myMessage .bc-audioPlayer {\n justify-self: flex-end;\n}\n\n.bc-otherMessage .bc-audioPlayer {\n justify-self: flex-start;\n}\n\n.bc-audioPlayer audio {\n display: none !important;\n width: 0 !important;\n height: 0 !important;\n}\n\n.bc-audioPlayer__button {\n flex: 0 0 auto;\n width: 40px;\n height: 40px;\n border: none;\n border-radius: 50%;\n background: #ffffff;\n position: relative;\n cursor: pointer;\n}\n\n.bc-otherMessage .bc-audioPlayer__button {\n background: #16616C;\n}\n\n.bc-audioPlayer__button.play::before {\n content: "";\n position: absolute;\n left: 12px;\n top: 12px;\n width: 16px;\n height: 16px;\n background-repeat: no-repeat;\n background-position: center;\n background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M6.23541%202.19233C5.2355%201.62986%204%202.35243%204%203.49968V12.5C4%2013.6472%205.23546%2014.3698%206.23537%2013.8073L14.2356%209.30735C15.2551%208.73391%2015.2551%207.26609%2014.2357%206.69262L6.23541%202.19233Z%22%20fill%3D%22%2316616C%22%2F%3E%3C%2Fsvg%3E");\n}\n\n.bc-otherMessage .bc-audioPlayer__button.play::before {\n background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M6.23541%202.19233C5.2355%201.62986%204%202.35243%204%203.49968V12.5C4%2013.6472%205.23546%2014.3698%206.23537%2013.8073L14.2356%209.30735C15.2551%208.73391%2015.2551%207.26609%2014.2357%206.69262L6.23541%202.19233Z%22%20fill%3D%22%23ffffff%22%2F%3E%3C%2Fsvg%3E");\n}\n\n.bc-audioPlayer__button.pause::before,\n.bc-audioPlayer__button.pause::after {\n content: "";\n position: absolute;\n top: 14px;\n width: 3px;\n height: 12px;\n background: #16616C;\n}\n\n.bc-otherMessage .bc-audioPlayer__button.pause::before,\n.bc-otherMessage .bc-audioPlayer__button.pause::after {\n background: #ffffff;\n}\n\n.bc-audioPlayer__button.pause::before {\n left: 16px;\n}\n\n.bc-audioPlayer__button.pause::after {\n right: 16px;\n}\n\n.bc-audioPlayer__wave {\n position: relative;\n flex: 1 1 auto;\n height: 22px;\n cursor: pointer;\n}\n\n.bc-audioPlayer__wave--future,\n.bc-audioPlayer__wave--past {\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n height: 22px;\n display: grid;\n grid-auto-flow: column;\n grid-auto-columns: 2px;\n column-gap: 1px;\n align-items: end;\n width: 100%;\n pointer-events: none;\n}\n\n.bc-audioPlayer__wave--future span {\n display: block;\n width: 2px;\n background: rgba(255, 255, 255, 0.6);\n border-radius: 2px;\n}\n\n.bc-otherMessage .bc-audioPlayer__wave--future span {\n background: #16616C;\n opacity: 0.6;\n}\n\n.bc-audioPlayer__wave--past {\n overflow: hidden;\n white-space: nowrap;\n}\n\n.bc-audioPlayer__wave--past span {\n display: inline-block;\n width: 2px;\n margin-right: 3px;\n background: #ffffff;\n border-radius: 2px;\n}\n\n.bc-otherMessage .bc-audioPlayer__wave--past span {\n background: #16616C;\n}\n\n.bc-otherMessage:hover .bc-replyButton, .bc-otherMessage:active .bc-replyButton, .bc-myMessage:hover .bc-replyButton, .bc-myMessage:active .bc-replyButton {\n display: block;\n}\n\n.bc-audioPlayer__time {\n color: #ffffff;\n font-weight: 400;\n opacity: 0.95;\n position: absolute;\n top: 46px;\n left: 80px;\n font-size: 10px;\n}\n\n.bc-otherMessage .bc-audioPlayer__time {\n color: #16616C;\n}\n\n.bc-selectionContainer {\n display: flex;\n align-items: flex-start;\n flex-wrap: wrap;\n}\n\n.bc-selectionContainer:first-child {\n flex: 1 0 50%;\n}\n\n.status-icon {\n color: var(--bc-chat-my-message-text-color) !important;\n opacity: 0.7;\n}\n.status-icon.failed {\n color: var(--bc-chat-danger-color) !important;\n}\n.status-icon.failed .resend {\n color: var(--bc-chat-dark-gray-color) !important;\n cursor: pointer;\n margin: 0 10px;\n}');const X=d.default.i`
172
173
  background-image: url(${e=>e.avatar||h});
173
174
  width: 30px;
174
175
  height: 30px;
@@ -182,7 +183,7 @@ i {
182
183
  display: flex;
183
184
  align-items: center;
184
185
  justify-content: center;
185
- border-bottom: solid 1px #ddd;
186
+ border-bottom: solid 1px var(--bc-border-neutral-secondary);
186
187
  margin: 30px auto 40px;
187
188
  .seperator-content {
188
189
  ${e=>`background-color: ${e.backgroundColor};`}
@@ -215,7 +216,24 @@ i {
215
216
  align-items: center;
216
217
  justify-content: center;
217
218
 
218
- `,ae=({sendMessage:t,debug:i,config:a,messages:o,onReachingUp:r,agentsIdsAvatarsMap:s,searchPattern:l,searchMatchNo:c,onSearchMatchCount:d,onMessageReply:g})=>{const p=n.useRef(null),u=n.useRef(0),[h,m]=n.useState(null),[x,f]=n.useState(!0);return n.useEffect((()=>{const e=document.getElementById(b);if(!e)return;u.current=e.scrollHeight;const n=()=>{0===e.scrollTop&&r?.();const n=e.scrollHeight-e.scrollTop-e.clientHeight<=4;f(n)};return e.addEventListener("scroll",n),()=>{e.removeEventListener("scroll",n)}}),[r]),n.useLayoutEffect((()=>{const e=p.current;if(!e)return;const n=u.current;if(e.scrollHeight-e.scrollTop<=e.clientHeight+200){const n=e.scrollHeight;e.style.scrollBehavior="smooth",e.style.overscrollBehavior="contain",e.scroll(0,n),f(!0)}else{const t=e.scrollHeight-n;e.style.scrollBehavior="auto",e.scrollTop=e.scrollTop+t;const i=4,a=e.scrollHeight-e.scrollTop-e.clientHeight<=i;f(a)}u.current=e.scrollHeight}),[o]),n.useEffect((()=>{if(!l||!l.trim())return m(null),void d?.(0);const e=l.toLowerCase(),n=[];for(const t of o){const i=t&&t.content,a=t&&t.messageId;a&&i&&(String(i).toLowerCase().includes(e)&&n.push(a))}if(d?.(n.length),0===n.length)return void m(null);const t=n[Math.min(Math.max((c??1)-1,0),n.length-1)];m(t);const i=p.current,a=t?document.getElementById(t):null;i&&a&&(i.style.scrollBehavior="smooth",a.scrollIntoView())}),[l,c,o,d]),e.jsxs(te,{ref:p,id:b,config:a,children:[o?.map(((n,r)=>"seperator"===n.type?e.jsx(ne,{data:n,config:a}):e.jsx("div",{children:e.jsx(_,{message:n,index:r,sendMessage:t,messageActionsEnabled:o.length-1===r,debug:i,config:a,agentsIdsAvatarsMap:s,highlighted:h===n.messageId,searchPattern:l,onMessageReply:g})},n.messageId?n.messageId:"message"+r))),!x&&e.jsx(ie,{"aria-label":"Scroll to latest message",onClick:()=>{const e=p.current;if(!e)return;const n=e.scrollHeight;e.style.scrollBehavior="smooth",e.style.overscrollBehavior="contain",e.scroll(0,n),f(!0)},children:e.jsx("svg",{width:"14",height:"8",viewBox:"0 0 14 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M1.60372 0.555285C1.7256 0.716659 2.08951 1.1984 2.30624 1.47611C2.74031 2.03233 3.33342 2.77142 3.97323 3.50831C4.61627 4.24893 5.29178 4.97022 5.89189 5.50046C6.19281 5.76634 6.45714 5.96837 6.67527 6.09987C6.88042 6.22355 7.00161 6.24927 7.00161 6.24927C7.00161 6.24927 7.11923 6.22355 7.32437 6.09988C7.5425 5.96838 7.80684 5.76635 8.10775 5.50047C8.70786 4.97022 9.38337 4.24892 10.0264 3.5083C10.6662 2.7714 11.2593 2.0323 11.6934 1.47608C11.9101 1.19837 12.2735 0.717304 12.3954 0.555928C12.6411 0.222405 13.1111 0.150469 13.4446 0.396102C13.7781 0.641734 13.8494 1.11123 13.6037 1.44476L13.6018 1.4473C13.474 1.61655 13.0971 2.11556 12.8759 2.39892C12.4321 2.9677 11.8216 3.72861 11.1591 4.49171C10.4997 5.25109 9.77408 6.02979 9.10096 6.62454C8.76526 6.92116 8.42497 7.18788 8.0988 7.3845C7.79322 7.56872 7.40633 7.75 6.99982 7.75C6.59331 7.75 6.20642 7.56871 5.90084 7.3845C5.57468 7.18787 5.23439 6.92116 4.89869 6.62454C4.22557 6.02979 3.4999 5.2511 2.84058 4.49173C2.17803 3.72863 1.5676 2.96774 1.12372 2.39896C0.902432 2.11541 0.525506 1.61637 0.397929 1.44747L0.396279 1.44528C0.150645 1.11176 0.22154 0.641787 0.555062 0.396152C0.888572 0.150526 1.35808 0.221792 1.60372 0.555285Z",fill:"white"})})})]},b)},oe="text";async function re(e,n,t){const i=new s.BlobServiceClient("https://bcuserres.blob.core.windows.net?sp=rc&st=2024-12-31T17:52:49Z&se=2026-01-01T01:52:49Z&spr=https&sv=2022-11-02&sr=c&sig=ZM%2Fdd4vGMglDs%2F9GtJ8y510iYCcXpUO%2Bj5CvVAq8QDg%3D",new s.AnonymousCredential).getContainerClient("anonymous"),a=new Date,o=`${a.getFullYear()}-${String(a.getMonth()+1).padStart(2,"0")}`,l=i.getBlockBlobClient(`${o}/${r.v4()}`);try{await l.uploadBrowserData(e,{onProgress:t=>{const i=Math.round(t.loadedBytes/e.size*100);n(i)},blockSize:4194304,concurrency:20,blobHTTPHeaders:{blobContentType:e.type}});t(l.url.split("?")[0])}catch(e){t(void 0,"Error uploading file:"+e.message)}}const se=d.default.span`
219
+ `,ae=d.default.div`
220
+ width: 100%;
221
+ display: flex;
222
+ justify-content: center;
223
+ padding-bottom: 40px;
224
+ `,oe=d.default.span`
225
+ width: 18px;
226
+ height: 18px;
227
+ display: inline-flex;
228
+ align-items: center;
229
+ justify-content: center;
230
+ margin:0 6px;
231
+ `,re=d.default.p`
232
+ margin: 0;
233
+ font-size: var(--bc-chat-body-4-size);
234
+ line-height: var(--bc-chat-body-4-lineheight);
235
+ color: inherit;
236
+ `,se=()=>e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.95833 16.6667C4.70114 16.6667 1.25 13.2155 1.25 8.95833C1.25 4.70114 4.70114 1.25 8.95833 1.25C13.2155 1.25 16.6667 4.70114 16.6667 8.95833C16.6667 13.2155 13.2155 16.6667 8.95833 16.6667ZM0 8.95833C0 13.9059 4.01078 17.9167 8.95833 17.9167C13.9059 17.9167 17.9167 13.9059 17.9167 8.95833C17.9167 4.01078 13.9059 0 8.95833 0C4.01078 0 0 4.01078 0 8.95833ZM8.53419 8.75097C8.47632 8.75004 8.40939 8.75001 8.32682 8.75001C7.98164 8.75001 7.70182 8.47019 7.70182 8.12501C7.70182 7.77984 7.98164 7.50001 8.32682 7.50001L8.35553 7.50001C8.52646 7.49994 8.71128 7.49987 8.8673 7.52084C9.05007 7.54541 9.28356 7.60861 9.48006 7.80511C9.67656 8.00161 9.73975 8.2351 9.76433 8.41787C9.7853 8.57388 9.78523 8.75871 9.78516 8.92964V8.92964L9.78516 8.95835V13.125C9.78516 13.4702 9.50533 13.75 9.16016 13.75C8.81498 13.75 8.53516 13.4702 8.53516 13.125V8.95835C8.53516 8.87578 8.53513 8.80885 8.53419 8.75097ZM8.95182 4.79167C8.49159 4.79167 8.11849 5.16476 8.11849 5.625C8.11849 6.08524 8.49159 6.45833 8.95182 6.45833H8.95931C9.41955 6.45833 9.79264 6.08524 9.79264 5.625C9.79264 5.16476 9.41955 4.79167 8.95931 4.79167H8.95182Z",fill:"#6C737F"})}),le=({sendMessage:t,debug:i,config:a,messages:o,onReachingUp:r,agentsIdsAvatarsMap:s,searchPattern:l,searchMatchNo:c,onSearchMatchCount:d,onMessageReply:g,errorMessage:p})=>{const u=n.useRef(null),h=n.useRef(0),[m,x]=n.useState(null),[f,C]=n.useState(!0),y=p?.trim();return n.useEffect((()=>{const e=document.getElementById(b);if(!e)return;h.current=e.scrollHeight;const n=()=>{0===e.scrollTop&&r?.();const n=e.scrollHeight-e.scrollTop-e.clientHeight<=4;C(n)};return e.addEventListener("scroll",n),()=>{e.removeEventListener("scroll",n)}}),[r]),n.useLayoutEffect((()=>{const e=u.current;if(!e)return;const n=h.current;if(e.scrollHeight-e.scrollTop<=e.clientHeight+200){const n=e.scrollHeight;e.style.scrollBehavior="smooth",e.style.overscrollBehavior="contain",e.scroll(0,n),C(!0)}else{const t=e.scrollHeight-n;e.style.scrollBehavior="auto",e.scrollTop=e.scrollTop+t;const i=4,a=e.scrollHeight-e.scrollTop-e.clientHeight<=i;C(a)}h.current=e.scrollHeight}),[o,y]),n.useEffect((()=>{if(!l||!l.trim())return x(null),void d?.(0);const e=l.toLowerCase(),n=[];for(const t of o){const i=t&&t.content,a=t&&t.messageId;a&&i&&(String(i).toLowerCase().includes(e)&&n.push(a))}if(d?.(n.length),0===n.length)return void x(null);const t=n[Math.min(Math.max((c??1)-1,0),n.length-1)];x(t);const i=u.current,a=t?document.getElementById(t):null;i&&a&&(i.style.scrollBehavior="smooth",a.scrollIntoView())}),[l,c,o,d]),e.jsxs(te,{ref:u,id:b,config:a,children:[o?.map(((n,r)=>"seperator"===n.type?e.jsx(ne,{data:n,config:a}):e.jsx("div",{children:e.jsx(_,{message:n,index:r,sendMessage:t,messageActionsEnabled:o.length-1===r,debug:i,config:a,agentsIdsAvatarsMap:s,highlighted:m===n.messageId,searchPattern:l,onMessageReply:g})},n.messageId?n.messageId:"message"+r))),y&&e.jsxs(e.Fragment,{children:[e.jsx(ne,{data:{type:"seperator"},config:a}),e.jsxs(ae,{role:"alert","aria-live":"assertive","data-testid":"chat-error-message",children:[e.jsx(oe,{children:e.jsx(se,{})}),e.jsx(re,{children:y})]})]}),!f&&e.jsx(ie,{"aria-label":"Scroll to latest message",onClick:()=>{const e=u.current;if(!e)return;const n=e.scrollHeight;e.style.scrollBehavior="smooth",e.style.overscrollBehavior="contain",e.scroll(0,n),C(!0)},children:e.jsx("svg",{width:"14",height:"8",viewBox:"0 0 14 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M1.60372 0.555285C1.7256 0.716659 2.08951 1.1984 2.30624 1.47611C2.74031 2.03233 3.33342 2.77142 3.97323 3.50831C4.61627 4.24893 5.29178 4.97022 5.89189 5.50046C6.19281 5.76634 6.45714 5.96837 6.67527 6.09987C6.88042 6.22355 7.00161 6.24927 7.00161 6.24927C7.00161 6.24927 7.11923 6.22355 7.32437 6.09988C7.5425 5.96838 7.80684 5.76635 8.10775 5.50047C8.70786 4.97022 9.38337 4.24892 10.0264 3.5083C10.6662 2.7714 11.2593 2.0323 11.6934 1.47608C11.9101 1.19837 12.2735 0.717304 12.3954 0.555928C12.6411 0.222405 13.1111 0.150469 13.4446 0.396102C13.7781 0.641734 13.8494 1.11123 13.6037 1.44476L13.6018 1.4473C13.474 1.61655 13.0971 2.11556 12.8759 2.39892C12.4321 2.9677 11.8216 3.72861 11.1591 4.49171C10.4997 5.25109 9.77408 6.02979 9.10096 6.62454C8.76526 6.92116 8.42497 7.18788 8.0988 7.3845C7.79322 7.56872 7.40633 7.75 6.99982 7.75C6.59331 7.75 6.20642 7.56871 5.90084 7.3845C5.57468 7.18787 5.23439 6.92116 4.89869 6.62454C4.22557 6.02979 3.4999 5.2511 2.84058 4.49173C2.17803 3.72863 1.5676 2.96774 1.12372 2.39896C0.902432 2.11541 0.525506 1.61637 0.397929 1.44747L0.396279 1.44528C0.150645 1.11176 0.22154 0.641787 0.555062 0.396152C0.888572 0.150526 1.35808 0.221792 1.60372 0.555285Z",fill:"white"})})})]},b)},ce="text";async function de(e,n,t){const i=new s.BlobServiceClient("https://bcuserres.blob.core.windows.net?sp=rc&st=2024-12-31T17:52:49Z&se=2026-01-01T01:52:49Z&spr=https&sv=2022-11-02&sr=c&sig=ZM%2Fdd4vGMglDs%2F9GtJ8y510iYCcXpUO%2Bj5CvVAq8QDg%3D",new s.AnonymousCredential).getContainerClient("anonymous"),a=new Date,o=`${a.getFullYear()}-${String(a.getMonth()+1).padStart(2,"0")}`,l=i.getBlockBlobClient(`${o}/${r.v4()}`);try{await l.uploadBrowserData(e,{onProgress:t=>{const i=Math.round(t.loadedBytes/e.size*100);n(i)},blockSize:4194304,concurrency:20,blobHTTPHeaders:{blobContentType:e.type}});t(l.url.split("?")[0])}catch(e){t(void 0,"Error uploading file:"+e.message)}}const ge=d.default.span`
219
237
  cursor: pointer;
220
238
  width: 20px;
221
239
  height: 20px;
@@ -225,7 +243,7 @@ i {
225
243
  justify-content: center;
226
244
 
227
245
  ${e=>e.isRTL&&"\n svg {\n transform: scaleX(-1);\n }\n "}
228
- `,le=d.default.div`
246
+ `,pe=d.default.div`
229
247
  display: flex;
230
248
  align-items: center;
231
249
  justify-content: space-between;
@@ -235,14 +253,14 @@ i {
235
253
  font-weight: 500;
236
254
  cursor: pointer;
237
255
  direction: ${e=>e.isRTL?"rtl":"ltr"};
238
- `,ce=()=>e.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M10.8165 10.197L3.28454 11.453C3.19795 11.4674 3.11669 11.5044 3.04893 11.5602C2.98117 11.6161 2.9293 11.6887 2.89854 11.771L0.301545 18.728C0.0535447 19.368 0.722545 19.978 1.33654 19.671L19.3365 10.671C19.4612 10.6087 19.5661 10.513 19.6394 10.3944C19.7127 10.2759 19.7515 10.1393 19.7515 9.99996C19.7515 9.86061 19.7127 9.72401 19.6394 9.60549C19.5661 9.48697 19.4612 9.39122 19.3365 9.32896L1.33654 0.328962C0.722545 0.0219617 0.0535447 0.632962 0.301545 1.27196L2.89954 8.22896C2.93016 8.31138 2.98196 8.38426 3.04973 8.44027C3.1175 8.49627 3.19884 8.53342 3.28554 8.54796L10.8175 9.80296C10.8639 9.81108 10.9059 9.83529 10.9362 9.87132C10.9664 9.90735 10.983 9.9529 10.983 9.99996C10.983 10.047 10.9664 10.0926 10.9362 10.1286C10.9059 10.1646 10.8639 10.1888 10.8175 10.197H10.8165Z",fill:"#16616C"})}),de=()=>e.jsx("svg",{width:"16",height:"18",viewBox:"0 0 20 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.3548 0.250249C10.7253 0.251243 11.0486 0.256214 11.3268 0.28107C11.6959 0.31408 12.0399 0.38555 12.3742 0.55897C12.5063 0.6275 12.6326 0.70664 12.7519 0.79561C13.0537 1.02075 13.2681 1.29917 13.4588 1.61688C13.6385 1.91618 13.8209 2.29263 14.0359 2.7361L14.5274 3.75H19C19.4142 3.75 19.75 4.08579 19.75 4.5C19.75 4.91422 19.4142 5.25 19 5.25H18.2051L17.6265 14.6101C17.5493 15.858 17.4881 16.8482 17.3627 17.6392C17.234 18.4504 17.028 19.126 16.616 19.7169C16.239 20.2574 15.7537 20.7137 15.1909 21.0565C14.5758 21.4313 13.8888 21.5952 13.0712 21.6736C12.274 21.75 11.2818 21.75 10.0316 21.75H9.9539L9.54609 21.7499C8.48365 21.7491 7.61989 21.7415 6.91041 21.6735C6.09186 21.5949 5.40416 21.4307 4.78854 21.0553C4.22537 20.7118 3.73991 20.2547 3.36311 19.7133C2.95121 19.1214 2.74587 18.4449 2.61816 17.6325C2.49362 16.8404 2.43377 15.8488 2.35833 14.5991L1.79393 5.25H1C0.58579 5.25 0.25 4.91422 0.25 4.5C0.25 4.08579 0.58579 3.75 1 3.75H5.57232L5.99135 2.83074L6.11352 2.56332C6.27199 2.21814 6.41408 1.91891 6.55567 1.67073C6.74349 1.34153 6.95704 1.05248 7.26255 0.81811C7.38312 0.72561 7.51116 0.64326 7.64533 0.57192C7.98531 0.39114 8.3369 0.31672 8.7143 0.28236C9.07 0.25 9.4986 0.25 10.0039 0.25L10.3548 0.250249ZM16.7022 5.25H3.29666L3.85327 14.47C3.93157 15.767 3.9879 16.6868 4.09996 17.3996C4.21012 18.1003 4.36439 18.5261 4.59431 18.8565C4.85213 19.2269 5.18428 19.5396 5.56961 19.7747C5.91325 19.9842 6.34758 20.1126 7.05365 20.1803C7.77186 20.2492 8.6934 20.25 9.9928 20.25C11.2905 20.25 12.2107 20.2492 12.928 20.1805C13.6332 20.1128 14.0671 19.9848 14.4105 19.7755C14.7956 19.5409 15.1277 19.2288 15.3856 18.8589C15.6156 18.5291 15.7702 18.1039 15.8812 17.4042C15.9941 16.6925 16.0517 15.7741 16.1317 14.4788L16.7022 5.25ZM10.451 1.75071L9.65985 1.75051C9.31502 1.75191 9.06007 1.75709 8.8503 1.77618C8.5849 1.80035 8.4499 1.84298 8.3496 1.89633C8.2886 1.92876 8.2304 1.96619 8.1756 2.00823C8.0854 2.07739 7.99063 2.18253 7.85853 2.41407C7.71937 2.65798 7.56941 2.98523 7.34281 3.48234L7.2208 3.75H12.8604L12.6999 3.41888C12.4674 2.93926 12.3137 2.62382 12.1727 2.38884C12.0389 2.16588 11.9443 2.06458 11.8551 1.99801C11.8009 1.95756 11.7434 1.92159 11.6834 1.89044C11.5845 1.83916 11.4522 1.79827 11.1932 1.77511C10.9982 1.75767 10.7635 1.75233 10.451 1.75071Z",fill:"currentColor"})}),ge=()=>e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M12.8536 2.85355C13.0488 2.65829 13.0488 2.34171 12.8536 2.14645C12.6583 1.95118 12.3417 1.95118 12.1464 2.14645L7.5 6.79289L2.85355 2.14645C2.65829 1.95118 2.34171 1.95118 2.14645 2.14645C1.95118 2.34171 1.95118 2.65829 2.14645 2.85355L6.79289 7.5L2.14645 12.1464C1.95118 12.3417 1.95118 12.6583 2.14645 12.8536C2.34171 13.0488 2.65829 13.0488 2.85355 12.8536L7.5 8.20711L12.1464 12.8536C12.3417 13.0488 12.6583 13.0488 12.8536 12.8536C13.0488 12.6583 13.0488 12.3417 12.8536 12.1464L8.20711 7.5L12.8536 2.85355Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}),pe=({file:n,isFileSelected:t,cancelFileUpload:i,config:a})=>{const o=u.SupportedImageFormats.indexOf(n.extension)>=0,r=u.SupportedAudioFormats.indexOf(n.extension)>=0,s="AR"===a?.language;return e.jsxs("div",{className:"bc-uploadFileDetails "+(s?"bc-RTL":""),style:{border:t?"green dashed 1px":""},id:"uploadFileDetails",children:[e.jsx("div",{className:"bc-uploadedFile",style:{maxWidth:r?300:"auto",pointerEvents:r?"auto":"none"},children:o?e.jsx("img",{src:n.fileUrl,alt:"",className:"bc-imageFile"}):r?e.jsx("audio",{src:n.fileUrl,controls:!0,style:{height:28}}):e.jsx("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAAPq0lEQVR4nO2caXQUVRbHc2bmw8wXP82MJiyByKiDEHCYccN9QXFFEURxZlRcZkBRXHAXN0TZ3FAIKqABEQggSxKWRBwdBR0cUMCQQEhn6e5s3Z1OSIcl/e6c11WVfvXqvlevqjvCHOqe8zt+qeqU95f/va9aMCPDK6+88sorr7zyyiuvvPLKK6+8Os4rVnrKRbGSrCmx0sy5sZKsPEq7iZ557Zt65rXZ0jsvStnIkq1RnODt1uLek1uKsse0FvX73bH+9z7uqq3k9yfHSjO3xEqzQKMHxEo02rvoCe2be8JBE70StG0y07qpN7RuNBPdmA3RDUlaEvSBSHH20UhRn+LQht7nH+s+HBcF3/T8Tawkc2dHl4ykkHYFIbyMNipjEyJjo1VGgmKNcHGfeKSo79yqLdm/zjiRq720xyRMhrt0YDLE6TCERLroC+GivhtOaCkdpZnfpCsdrS7TEdFlGISK+qyDKRm/yDgRq6M00+8mHW3dkI4IpSiREirl1YwTsTpKshrt0nHw50pHkSYjIaQwh4TW9xmdcaJVrEuIg1GllI5s1+kIJ8iBcGHftnBhzsCME1JISYrp2Ji+dISpDJ3m9TlVrWtP+23GiSXkOExHUQ4dWxrrczbB8oxfZpwwQo7TdIQMIYWn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RkJ0680Q3XqTzgiIbr0Rot8Y3ADRrynX61wH0a+v1bkGol8PT/Lvq3WGQfQrnS+v1LkCWij/ulzji8sgssXgEo3PKRdDS+lFEElwIYQpmylDIbyJcr7OeRDaaHAuhDacA6ENZ/+s1K89C8oX5kDZB71pOoK09xlYNRf1OylQkLmzdtkpQMUcC2o+pZwC1Ut1PjkFfJ9kgm9JJlRRFmfCgcVZGvlZUEn5uAfsp3zUA/ZRFvWECspCSi8oX6Cx90NK70Qjjgf2LsrZUZHf7yRUhllM7/7BVVmzgyuz8ln8tvR0QK8kBb3y63RqllOyk3yapJpnaXZ+FWVJH43FSQ4kyMnfv/jU/P0fa+wz+OjYsv/jfjMr8vv3txXhlVdeeeWVV1555ZVXXnnllVdeeeWVV1555VXG/2f9D+lROV6EKZDWAAAAAElFTkSuQmCC",alt:"",className:"bc-documentFile"})}),e.jsx("div",{className:"bc-uploadFileName",children:e.jsx("span",{children:n.fileName})}),e.jsx("div",{className:"bc-uploadFileCancel",children:e.jsx("span",{onClick:()=>{try{r&&n.blob&&n.fileUrl.startsWith("blob:")&&URL.revokeObjectURL(n.fileUrl)}catch{}i()},children:e.jsx(de,{})})})]})},ue=({text:t,setText:i,config:a,send:o,placeholder:r})=>{const s=n.useRef(null),l="AR"===a?.language,c=n.useCallback((()=>{const e=s.current;e.style.height="20px";const n=e.scrollHeight;n!==e.offsetHeight&&(e.style.height=n+"px")}),[]);return n.useEffect((()=>{t||(c(),s.current.focus())}),[c,t]),e.jsx("textarea",{ref:s,value:t,className:"bc-messageInputTextArea",id:"textInput",placeholder:r,maxLength:1024,dir:l?"rtl":"ltr",onKeyDown:e=>{if("Enter"===e.key&&(e.shiftKey||e.ctrlKey||e.altKey)){e.preventDefault();const n=s.current.selectionStart,a=t.slice(0,n)+"\n"+t.slice(n);return i(a),void c()}"Enter"===e.key&&(e.preventDefault(),o(),c())},onChange:e=>{i(e.target.value),c()}})},he=({config:n,send:t,file:i,isFileSelected:a,text:o,setText:r,cancelFileUpload:s,noteMode:l,onCloseNoteMode:c,notePlaceholder:d})=>{const g="AR"===n?.language;return e.jsxs("div",{className:"bc-messageInput "+(g?"bc-RTL":""),children:[l?e.jsx(le,{onClick:c,isRTL:g,children:e.jsx(ge,{})}):null,i?e.jsx(pe,{file:i,isFileSelected:a,cancelFileUpload:s,config:n}):e.jsx(ue,{text:o,setText:r,config:n,send:t,placeholder:l?d||z[n.language]?.notePlaceholder:n.inputPlaceholder||z[n.language]?.placeholder}),e.jsx(se,{onClick:()=>t(),isRTL:g,children:o||i?e.jsx(ce,{}):null})]})},me=(e,n)=>`\n &:hover {\n background-image: ${e.replaceAll("%23a3a3a3",n.activeColor)};\n }\n background-image: ${n.isActive?e.replaceAll("%23a3a3a3",n.activeColor):e};\n`,be="\ndisplay: flex;\njustify-content: center;\nalign-items: center;\ngap: 4px;\nborder-radius: 8px;\nborder: 1px solid #D2D6DB;\nbackground: #FFF;\ntransition: background-color 0.2s ease, border-color 0.2s ease;\ncursor: pointer;\nfont-size: 14px;\n&:hover {\n background: #f7f7f7;\n border-color: #dcdcdc;\n}\n&:active {\n background: #f0f0f0;\n}\n";d.default.button`
239
- ${be}
256
+ `,ue=()=>e.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M10.8165 10.197L3.28454 11.453C3.19795 11.4674 3.11669 11.5044 3.04893 11.5602C2.98117 11.6161 2.9293 11.6887 2.89854 11.771L0.301545 18.728C0.0535447 19.368 0.722545 19.978 1.33654 19.671L19.3365 10.671C19.4612 10.6087 19.5661 10.513 19.6394 10.3944C19.7127 10.2759 19.7515 10.1393 19.7515 9.99996C19.7515 9.86061 19.7127 9.72401 19.6394 9.60549C19.5661 9.48697 19.4612 9.39122 19.3365 9.32896L1.33654 0.328962C0.722545 0.0219617 0.0535447 0.632962 0.301545 1.27196L2.89954 8.22896C2.93016 8.31138 2.98196 8.38426 3.04973 8.44027C3.1175 8.49627 3.19884 8.53342 3.28554 8.54796L10.8175 9.80296C10.8639 9.81108 10.9059 9.83529 10.9362 9.87132C10.9664 9.90735 10.983 9.9529 10.983 9.99996C10.983 10.047 10.9664 10.0926 10.9362 10.1286C10.9059 10.1646 10.8639 10.1888 10.8175 10.197H10.8165Z",fill:"#16616C"})}),he=()=>e.jsx("svg",{width:"16",height:"18",viewBox:"0 0 20 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.3548 0.250249C10.7253 0.251243 11.0486 0.256214 11.3268 0.28107C11.6959 0.31408 12.0399 0.38555 12.3742 0.55897C12.5063 0.6275 12.6326 0.70664 12.7519 0.79561C13.0537 1.02075 13.2681 1.29917 13.4588 1.61688C13.6385 1.91618 13.8209 2.29263 14.0359 2.7361L14.5274 3.75H19C19.4142 3.75 19.75 4.08579 19.75 4.5C19.75 4.91422 19.4142 5.25 19 5.25H18.2051L17.6265 14.6101C17.5493 15.858 17.4881 16.8482 17.3627 17.6392C17.234 18.4504 17.028 19.126 16.616 19.7169C16.239 20.2574 15.7537 20.7137 15.1909 21.0565C14.5758 21.4313 13.8888 21.5952 13.0712 21.6736C12.274 21.75 11.2818 21.75 10.0316 21.75H9.9539L9.54609 21.7499C8.48365 21.7491 7.61989 21.7415 6.91041 21.6735C6.09186 21.5949 5.40416 21.4307 4.78854 21.0553C4.22537 20.7118 3.73991 20.2547 3.36311 19.7133C2.95121 19.1214 2.74587 18.4449 2.61816 17.6325C2.49362 16.8404 2.43377 15.8488 2.35833 14.5991L1.79393 5.25H1C0.58579 5.25 0.25 4.91422 0.25 4.5C0.25 4.08579 0.58579 3.75 1 3.75H5.57232L5.99135 2.83074L6.11352 2.56332C6.27199 2.21814 6.41408 1.91891 6.55567 1.67073C6.74349 1.34153 6.95704 1.05248 7.26255 0.81811C7.38312 0.72561 7.51116 0.64326 7.64533 0.57192C7.98531 0.39114 8.3369 0.31672 8.7143 0.28236C9.07 0.25 9.4986 0.25 10.0039 0.25L10.3548 0.250249ZM16.7022 5.25H3.29666L3.85327 14.47C3.93157 15.767 3.9879 16.6868 4.09996 17.3996C4.21012 18.1003 4.36439 18.5261 4.59431 18.8565C4.85213 19.2269 5.18428 19.5396 5.56961 19.7747C5.91325 19.9842 6.34758 20.1126 7.05365 20.1803C7.77186 20.2492 8.6934 20.25 9.9928 20.25C11.2905 20.25 12.2107 20.2492 12.928 20.1805C13.6332 20.1128 14.0671 19.9848 14.4105 19.7755C14.7956 19.5409 15.1277 19.2288 15.3856 18.8589C15.6156 18.5291 15.7702 18.1039 15.8812 17.4042C15.9941 16.6925 16.0517 15.7741 16.1317 14.4788L16.7022 5.25ZM10.451 1.75071L9.65985 1.75051C9.31502 1.75191 9.06007 1.75709 8.8503 1.77618C8.5849 1.80035 8.4499 1.84298 8.3496 1.89633C8.2886 1.92876 8.2304 1.96619 8.1756 2.00823C8.0854 2.07739 7.99063 2.18253 7.85853 2.41407C7.71937 2.65798 7.56941 2.98523 7.34281 3.48234L7.2208 3.75H12.8604L12.6999 3.41888C12.4674 2.93926 12.3137 2.62382 12.1727 2.38884C12.0389 2.16588 11.9443 2.06458 11.8551 1.99801C11.8009 1.95756 11.7434 1.92159 11.6834 1.89044C11.5845 1.83916 11.4522 1.79827 11.1932 1.77511C10.9982 1.75767 10.7635 1.75233 10.451 1.75071Z",fill:"currentColor"})}),me=()=>e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M12.8536 2.85355C13.0488 2.65829 13.0488 2.34171 12.8536 2.14645C12.6583 1.95118 12.3417 1.95118 12.1464 2.14645L7.5 6.79289L2.85355 2.14645C2.65829 1.95118 2.34171 1.95118 2.14645 2.14645C1.95118 2.34171 1.95118 2.65829 2.14645 2.85355L6.79289 7.5L2.14645 12.1464C1.95118 12.3417 1.95118 12.6583 2.14645 12.8536C2.34171 13.0488 2.65829 13.0488 2.85355 12.8536L7.5 8.20711L12.1464 12.8536C12.3417 13.0488 12.6583 13.0488 12.8536 12.8536C13.0488 12.6583 13.0488 12.3417 12.8536 12.1464L8.20711 7.5L12.8536 2.85355Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}),be=({file:n,isFileSelected:t,cancelFileUpload:i,config:a})=>{const o=u.SupportedImageFormats.indexOf(n.extension)>=0,r=u.SupportedAudioFormats.indexOf(n.extension)>=0,s="AR"===a?.language;return e.jsxs("div",{className:"bc-uploadFileDetails "+(s?"bc-RTL":""),style:{border:t?"green dashed 1px":""},id:"uploadFileDetails",children:[e.jsx("div",{className:"bc-uploadedFile",style:{maxWidth:r?300:"auto",pointerEvents:r?"auto":"none"},children:o?e.jsx("img",{src:n.fileUrl,alt:"",className:"bc-imageFile"}):r?e.jsx("audio",{src:n.fileUrl,controls:!0,style:{height:28}}):e.jsx("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAAPq0lEQVR4nO2caXQUVRbHc2bmw8wXP82MJiyByKiDEHCYccN9QXFFEURxZlRcZkBRXHAXN0TZ3FAIKqABEQggSxKWRBwdBR0cUMCQQEhn6e5s3Z1OSIcl/e6c11WVfvXqvlevqjvCHOqe8zt+qeqU95f/va9aMCPDK6+88sorr7zyyiuvvPLKK6+8Os4rVnrKRbGSrCmx0sy5sZKsPEq7iZ557Zt65rXZ0jsvStnIkq1RnODt1uLek1uKsse0FvX73bH+9z7uqq3k9yfHSjO3xEqzQKMHxEo02rvoCe2be8JBE70StG0y07qpN7RuNBPdmA3RDUlaEvSBSHH20UhRn+LQht7nH+s+HBcF3/T8Tawkc2dHl4ykkHYFIbyMNipjEyJjo1VGgmKNcHGfeKSo79yqLdm/zjiRq720xyRMhrt0YDLE6TCERLroC+GivhtOaCkdpZnfpCsdrS7TEdFlGISK+qyDKRm/yDgRq6M00+8mHW3dkI4IpSiREirl1YwTsTpKshrt0nHw50pHk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JLiyx9zaFVnQ8eMEbY+gpyu7caXyVp5iOr6Xp0NdBpsKVkSqEhTFfHcuHPziQihbkA0VH/WbYxECUzJ+5S/IrK9ddjL4V2ZD5MvhEN12K0S3jdYZpXMLRLdSRkJ0680Q3XqTzgiIbr0Rot8Y3ADRrynX61wH0a+v1bkGol8PT/Lvq3WGQfQrnS+v1LkCWij/ulzji8sgssXgEo3PKRdDS+lFEElwIYQpmylDIbyJcr7OeRDaaHAuhDacA6ENZ/+s1K89C8oX5kDZB71pOoK09xlYNRf1OylQkLmzdtkpQMUcC2o+pZwC1Ut1PjkFfJ9kgm9JJlRRFmfCgcVZGvlZUEn5uAfsp3zUA/ZRFvWECspCSi8oX6Cx90NK70Qjjgf2LsrZUZHf7yRUhllM7/7BVVmzgyuz8ln8tvR0QK8kBb3y63RqllOyk3yapJpnaXZ+FWVJH43FSQ4kyMnfv/jU/P0fa+wz+OjYsv/jfjMr8vv3txXhlVdeeeWVV1555ZVXXnnllVdeeeWVV1555VXG/2f9D+lROV6EKZDWAAAAAElFTkSuQmCC",alt:"",className:"bc-documentFile"})}),e.jsx("div",{className:"bc-uploadFileName",children:e.jsx("span",{children:n.fileName})}),e.jsx("div",{className:"bc-uploadFileCancel",children:e.jsx("span",{onClick:()=>{try{r&&n.blob&&n.fileUrl.startsWith("blob:")&&URL.revokeObjectURL(n.fileUrl)}catch{}i()},children:e.jsx(he,{})})})]})},xe=({text:t,setText:i,config:a,send:o,placeholder:r})=>{const s=n.useRef(null),l="AR"===a?.language,c=n.useCallback((()=>{const e=s.current;e.style.height="20px";const n=e.scrollHeight;n!==e.offsetHeight&&(e.style.height=n+"px")}),[]);return n.useEffect((()=>{t||(c(),s.current.focus())}),[c,t]),e.jsx("textarea",{ref:s,value:t,className:"bc-messageInputTextArea",id:"textInput",placeholder:r,maxLength:1024,dir:l?"rtl":"ltr",onKeyDown:e=>{if("Enter"===e.key&&(e.shiftKey||e.ctrlKey||e.altKey)){e.preventDefault();const n=s.current.selectionStart,a=t.slice(0,n)+"\n"+t.slice(n);return i(a),void c()}"Enter"===e.key&&(e.preventDefault(),o(),c())},onChange:e=>{i(e.target.value),c()}})},fe=({config:n,send:t,file:i,isFileSelected:a,text:o,setText:r,cancelFileUpload:s,noteMode:l,onCloseNoteMode:c,notePlaceholder:d})=>{const g="AR"===n?.language;return e.jsxs("div",{className:"bc-messageInput "+(g?"bc-RTL":""),children:[l?e.jsx(pe,{onClick:c,isRTL:g,children:e.jsx(me,{})}):null,i?e.jsx(be,{file:i,isFileSelected:a,cancelFileUpload:s,config:n}):e.jsx(xe,{text:o,setText:r,config:n,send:t,placeholder:l?d||z[n.language]?.notePlaceholder:n.inputPlaceholder||z[n.language]?.placeholder}),e.jsx(ge,{onClick:()=>t(),isRTL:g,children:o||i?e.jsx(ue,{}):null})]})},Ce=(e,n)=>`\n &:hover {\n background-image: ${e.replaceAll("%23a3a3a3",n.activeColor)};\n }\n background-image: ${n.isActive?e.replaceAll("%23a3a3a3",n.activeColor):e};\n`,ye="\ndisplay: flex;\njustify-content: center;\nalign-items: center;\ngap: 4px;\nborder-radius: 8px;\nborder: 1px solid #D2D6DB;\nbackground: #FFF;\ntransition: background-color 0.2s ease, border-color 0.2s ease;\ncursor: pointer;\nfont-size: 14px;\n&:hover {\n background: #f7f7f7;\n border-color: #dcdcdc;\n}\n&:active {\n background: #f0f0f0;\n}\n";d.default.button`
257
+ ${ye}
240
258
  height: 32px;
241
259
  min-height: 32px;
242
260
  max-height: 32px;
243
261
  padding: 0 12px;
244
- `;const xe=d.default.label`
245
- ${be}
262
+ `;const ve=d.default.label`
263
+ ${ye}
246
264
  width: 32px;
247
265
  height: 32px;
248
266
  min-width: 32px;
@@ -250,30 +268,30 @@ i {
250
268
  min-height: 32px;
251
269
  max-height: 32px;
252
270
  padding: 0;
253
- `,fe=d.default.i`
254
- ${e=>me('url("data:image/svg+xml,%3Csvg%20width%3D%2216%22%20height%3D%2218%22%20viewBox%3D%220%200%2016%2018%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M14.667%207.54199C15.012%207.54217%2015.292%207.82192%2015.292%208.16699C15.2918%2011.9834%2012.3594%2015.1146%208.625%2015.4316V16.708H10.5C10.8451%2016.708%2011.1248%2016.988%2011.125%2017.333C11.125%2017.6782%2010.8452%2017.958%2010.5%2017.958H5.5C5.15482%2017.958%204.875%2017.6782%204.875%2017.333C4.87518%2016.988%205.15493%2016.708%205.5%2016.708H7.375V15.4316C3.64062%2015.1146%200.708174%2011.9834%200.708008%208.16699C0.708008%207.82192%200.98798%207.54217%201.33301%207.54199C1.67819%207.54199%201.95801%207.82181%201.95801%208.16699C1.95818%2011.5036%204.66339%2014.208%208%2014.208C11.3366%2014.208%2014.0418%2011.5036%2014.042%208.16699C14.042%207.82181%2014.3218%207.54199%2014.667%207.54199ZM8%200.0419922C10.6463%200.0419922%2012.7918%202.18679%2012.792%204.83301V8.16699C12.7918%2010.8132%2010.6463%2012.958%208%2012.958C5.35374%2012.958%203.20818%2010.8132%203.20801%208.16699V4.83301C3.20818%202.18679%205.35374%200.0419924%208%200.0419922ZM8%201.29199C6.0441%201.29199%204.45818%202.87715%204.45801%204.83301V8.16699C4.45818%2010.1229%206.0441%2011.708%208%2011.708C9.74256%2011.708%2011.1899%2010.4496%2011.4854%208.79199H9.66699C9.32192%208.79199%209.04217%208.51202%209.04199%208.16699C9.04199%207.82181%209.32181%207.54199%209.66699%207.54199H11.542V5.45801H9.66699C9.32181%205.45801%209.04199%205.17819%209.04199%204.83301C9.04217%204.48798%209.32192%204.20801%209.66699%204.20801H11.4854C11.1899%202.55035%209.74256%201.29199%208%201.29199Z%22%20fill%3D%22%23161616%22%2F%3E%3C%2Fsvg%3E");',e)}
255
- `,Ce=d.default.div`
271
+ `,we=d.default.i`
272
+ ${e=>Ce('url("data:image/svg+xml,%3Csvg%20width%3D%2216%22%20height%3D%2218%22%20viewBox%3D%220%200%2016%2018%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M14.667%207.54199C15.012%207.54217%2015.292%207.82192%2015.292%208.16699C15.2918%2011.9834%2012.3594%2015.1146%208.625%2015.4316V16.708H10.5C10.8451%2016.708%2011.1248%2016.988%2011.125%2017.333C11.125%2017.6782%2010.8452%2017.958%2010.5%2017.958H5.5C5.15482%2017.958%204.875%2017.6782%204.875%2017.333C4.87518%2016.988%205.15493%2016.708%205.5%2016.708H7.375V15.4316C3.64062%2015.1146%200.708174%2011.9834%200.708008%208.16699C0.708008%207.82192%200.98798%207.54217%201.33301%207.54199C1.67819%207.54199%201.95801%207.82181%201.95801%208.16699C1.95818%2011.5036%204.66339%2014.208%208%2014.208C11.3366%2014.208%2014.0418%2011.5036%2014.042%208.16699C14.042%207.82181%2014.3218%207.54199%2014.667%207.54199ZM8%200.0419922C10.6463%200.0419922%2012.7918%202.18679%2012.792%204.83301V8.16699C12.7918%2010.8132%2010.6463%2012.958%208%2012.958C5.35374%2012.958%203.20818%2010.8132%203.20801%208.16699V4.83301C3.20818%202.18679%205.35374%200.0419924%208%200.0419922ZM8%201.29199C6.0441%201.29199%204.45818%202.87715%204.45801%204.83301V8.16699C4.45818%2010.1229%206.0441%2011.708%208%2011.708C9.74256%2011.708%2011.1899%2010.4496%2011.4854%208.79199H9.66699C9.32192%208.79199%209.04217%208.51202%209.04199%208.16699C9.04199%207.82181%209.32181%207.54199%209.66699%207.54199H11.542V5.45801H9.66699C9.32181%205.45801%209.04199%205.17819%209.04199%204.83301C9.04217%204.48798%209.32192%204.20801%209.66699%204.20801H11.4854C11.1899%202.55035%209.74256%201.29199%208%201.29199Z%22%20fill%3D%22%23161616%22%2F%3E%3C%2Fsvg%3E");',e)}
273
+ `,Me=d.default.div`
256
274
  ${e=>e.isRecording&&`\n &:before {\n transform: scale(${1+e.audioLevel/255});\n opacity: ${.6+e.audioLevel/255*.4};\n }\n `}
257
- `,ye=d.default.span`
275
+ `,Ae=d.default.span`
258
276
  display: inline-flex;
259
277
  align-items: center;
260
278
  justify-content: center;
261
279
 
262
280
  ${e=>e.isRTL&&"\n svg {\n transform: scaleX(-1);\n }\n "}
263
- `,ve=({isRTL:n})=>e.jsx(ye,{isRTL:n,children:e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M1.20308 1.04312C1.00481 0.954998 0.772341 1.0048 0.627577 1.16641C0.482813 1.32802 0.458794 1.56455 0.568117 1.75196L3.92115 7.50002L0.568117 13.2481C0.458794 13.4355 0.482813 13.672 0.627577 13.8336C0.772341 13.9952 1.00481 14.045 1.20308 13.9569L14.7031 7.95693C14.8836 7.87668 15 7.69762 15 7.50002C15 7.30243 14.8836 7.12337 14.7031 7.04312L1.20308 1.04312ZM4.84553 7.10002L2.21234 2.586L13.2689 7.50002L2.21234 12.414L4.84552 7.90002H9C9.22092 7.90002 9.4 7.72094 9.4 7.50002C9.4 7.27911 9.22092 7.10002 9 7.10002H4.84553Z",fill:"#666",fillRule:"evenodd",clipRule:"evenodd"})})}),we=()=>e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M12.8536 2.85355C13.0488 2.65829 13.0488 2.34171 12.8536 2.14645C12.6583 1.95118 12.3417 1.95118 12.1464 2.14645L7.5 6.79289L2.85355 2.14645C2.65829 1.95118 2.34171 1.95118 2.14645 2.14645C1.95118 2.34171 1.95118 2.65829 2.14645 2.85355L6.79289 7.5L2.14645 12.1464C1.95118 12.3417 1.95118 12.6583 2.14645 12.8536C2.34171 13.0488 2.65829 13.0488 2.85355 12.8536L7.5 8.20711L12.1464 12.8536C12.3417 13.0488 12.6583 13.0488 12.8536 12.8536C13.0488 12.6583 13.0488 12.3417 12.8536 12.1464L8.20711 7.5L12.8536 2.85355Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}),Me={sampleRate:48e3,channelCount:1,sampleSize:128,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0,googEchoCancellation:!0,googAutoGainControl:!0,googNoiseSuppression:!0,googHighpassFilter:!0,googTypingNoiseDetection:!0,googAudioMirroring:!1},Ae=d.default.div`
281
+ `,ke=({isRTL:n})=>e.jsx(Ae,{isRTL:n,children:e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M1.20308 1.04312C1.00481 0.954998 0.772341 1.0048 0.627577 1.16641C0.482813 1.32802 0.458794 1.56455 0.568117 1.75196L3.92115 7.50002L0.568117 13.2481C0.458794 13.4355 0.482813 13.672 0.627577 13.8336C0.772341 13.9952 1.00481 14.045 1.20308 13.9569L14.7031 7.95693C14.8836 7.87668 15 7.69762 15 7.50002C15 7.30243 14.8836 7.12337 14.7031 7.04312L1.20308 1.04312ZM4.84553 7.10002L2.21234 2.586L13.2689 7.50002L2.21234 12.414L4.84552 7.90002H9C9.22092 7.90002 9.4 7.72094 9.4 7.50002C9.4 7.27911 9.22092 7.10002 9 7.10002H4.84553Z",fill:"#666",fillRule:"evenodd",clipRule:"evenodd"})})}),Le=()=>e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M12.8536 2.85355C13.0488 2.65829 13.0488 2.34171 12.8536 2.14645C12.6583 1.95118 12.3417 1.95118 12.1464 2.14645L7.5 6.79289L2.85355 2.14645C2.65829 1.95118 2.34171 1.95118 2.14645 2.14645C1.95118 2.34171 1.95118 2.65829 2.14645 2.85355L6.79289 7.5L2.14645 12.1464C1.95118 12.3417 1.95118 12.6583 2.14645 12.8536C2.34171 13.0488 2.65829 13.0488 2.85355 12.8536L7.5 8.20711L12.1464 12.8536C12.3417 13.0488 12.6583 13.0488 12.8536 12.8536C13.0488 12.6583 13.0488 12.3417 12.8536 12.1464L8.20711 7.5L12.8536 2.85355Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}),je={sampleRate:48e3,channelCount:1,sampleSize:128,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0,googEchoCancellation:!0,googAutoGainControl:!0,googNoiseSuppression:!0,googHighpassFilter:!0,googTypingNoiseDetection:!0,googAudioMirroring:!1},Ie=d.default.div`
264
282
  display: flex;
265
283
  align-items: center;
266
284
  gap: 5px;
267
285
  direction: ${e=>e.isRTL?"rtl":"ltr"};
268
- `,ke=({setProgress:t,setError:i,setFile:a,onActiveChange:o,config:r})=>{const s="AR"===r?.language,[l,c]=n.useState(!1),[d,g]=n.useState(0),p=n.useRef(null),u=n.useRef(null),h=n.useRef(null),m=n.useRef(null),b=n.useRef(null),x=n.useRef(null);n.useEffect((()=>{const e=document.createElement("script");return e.src="https://unpkg.com/mic-recorder-to-mp3",e.async=!0,e.onload=()=>console.log("Voice recording library loaded successfully"),e.onerror=()=>{console.error("Failed to load voice recording library"),i("Failed to load voice recording library. Please refresh the page.")},document.body.appendChild(e),()=>{document.body.contains(e)&&document.body.removeChild(e)}}),[i]);const f=n.useCallback((e=>{try{if(!e.active)return void navigator.mediaDevices.getUserMedia({audio:Me}).then((e=>{u.current=e,f(e)})).catch((e=>{console.error("Failed to get fresh stream:",e)}));h.current=new(window.AudioContext||window.webkitAudioContext),"suspended"===h.current.state&&h.current.resume().then((()=>{}));const n=h.current.createMediaStreamSource(e);m.current=h.current.createAnalyser(),m.current.fftSize=256,m.current.smoothingTimeConstant=.8,m.current.minDecibels=-90,m.current.maxDecibels=-10,n.connect(m.current);const t=m.current.frequencyBinCount;b.current=new Uint8Array(t);const i=()=>{if(!m.current)return;m.current.getByteFrequencyData(b.current);let e=0;for(let n=0;n<t;n++)e+=b.current[n]*b.current[n];const n=Math.sqrt(e/t),a=Math.min(255,2*n);g(a),x.current=requestAnimationFrame(i)};i()}catch(e){console.error("Audio level monitoring error:",e)}}),[]),C=n.useCallback((()=>{x.current&&(cancelAnimationFrame(x.current),x.current=null),h.current&&(h.current.close(),h.current=null),g(0)}),[]),y=n.useCallback((()=>{u.current&&(u.current.getTracks().forEach((e=>{e.stop()})),u.current=null)}),[]);n.useEffect((()=>()=>{p.current&&l&&p.current.stop(),y(),C()}),[l,C,y]);const v=n.useCallback((()=>{if(!p.current){if("function"!=typeof MicRecorder)return void i("Please wait a little until voice library is loaded");p.current=new MicRecorder({bitRate:128,sampleRate:48e3})}i(void 0),l?p.current.stop().getMp3().then((([e,n])=>{if(c(!1),C(),y(),o&&o(!0),n.size<1e3)return void i("Recording seems too short. Please try again.");if(!n||0===n.size)return void i("Invalid audio recording. Please try again.");const t=(new Date).toISOString().replace(/[:.]/g,"-"),r=new File([n],`recording-${t}.mp3`,{type:"audio/mpeg"}),s=URL.createObjectURL(r);a({fileUrl:s,fileName:`recording-${t}.mp3`,extension:"mp3",blob:r}),o&&o(!1)})).catch((e=>{c(!1),C(),y(),i(`Recording failed: ${e.message}`),o&&o(!1)})):navigator.mediaDevices.getUserMedia({audio:Me}).then((e=>{u.current=e,p.current.start().then((()=>{c(!0),o&&o(!0),setTimeout((()=>{h.current&&"suspended"===h.current.state?h.current.resume().then((()=>{f(e)})).catch((n=>{console.error("Failed to resume audio context:",n),f(e)})):f(e)}),100)})).catch((n=>{i(`Failed to start recording: ${n.message}`),e.getTracks().forEach((e=>e.stop())),o&&o(!1)}))})).catch((e=>{"NotAllowedError"===e.name?i("Microphone access denied. Please allow microphone access and try again."):"NotFoundError"===e.name?i("No microphone found. Please connect a microphone and try again."):i(`Microphone error: ${e.message}`),o&&o(!1)}))}),[l,i,a,f,C,y,o]),w=n.useCallback((()=>{p.current&&l&&p.current.stop(),c(!1),C(),y(),i(void 0),o&&o(!1)}),[l,C,y,i,o]);return e.jsxs(Ae,{isRTL:s&&l,children:[l?e.jsx(xe,{onClick:w,children:e.jsx(we,{})}):null,e.jsx(xe,{onClick:v,id:"voiceRecorderIcon",className:"mic-container",children:l?e.jsxs(e.Fragment,{children:[e.jsx(ve,{isRTL:s}),e.jsx(Ce,{className:"circle "+(l?"active":""),isRecording:l,audioLevel:d})]}):e.jsx(fe,{activeColor:"var(--bc-chat-dark-gray-color)"})})]})};const Le=d.default.i`
269
- ${e=>me('url("data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M10%2019.084C15.0163%2019.0838%2019.0838%2015.0163%2019.084%2010C19.0838%204.98367%2015.0163%200.917168%2010%200.916992C4.98367%200.917168%200.917168%204.98367%200.916992%2010C0.917168%2015.0163%204.98367%2019.0838%2010%2019.084ZM10%2017.584C5.8121%2017.5838%202.41717%2014.1879%202.41699%2010C2.41717%205.8121%205.8121%202.41717%2010%202.41699C14.1879%202.41717%2017.5838%205.8121%2017.584%2010C17.5838%2014.1879%2014.1879%2017.5838%2010%2017.584ZM6.6748%208.5C7.22679%208.49964%207.6748%208.05206%207.6748%207.5C7.6748%206.94794%207.22679%206.50036%206.6748%206.5H6.66699C6.11471%206.5%205.66699%206.94771%205.66699%207.5C5.66699%208.05229%206.11471%208.5%206.66699%208.5H6.6748ZM13.334%208.5C13.886%208.49965%2014.334%208.05207%2014.334%207.5C14.334%206.94793%2013.886%206.50035%2013.334%206.5H13.3262C12.7739%206.50001%2012.3262%206.94772%2012.3262%207.5C12.3262%208.05228%2012.7739%208.49999%2013.3262%208.5H13.334ZM10%2014.917C11.6088%2014.9169%2013.038%2014.1426%2013.9336%2012.9502C14.1819%2012.6191%2014.115%2012.1491%2013.7842%2011.9004C13.453%2011.6517%2012.9832%2011.7188%2012.7344%2012.0498C12.1099%2012.8813%2011.117%2013.4169%2010%2013.417C8.88307%2013.4169%207.89111%2012.8811%207.2666%2012.0498C7.01792%2011.7187%206.54798%2011.6519%206.2168%2011.9004C5.88563%2012.1491%205.81871%2012.619%206.06738%2012.9502C6.96298%2014.1425%208.39126%2014.9169%2010%2014.917Z%22%20fill%3D%22%23161616%22%2F%3E%3C%2Fsvg%3E");',e)}
270
- `,je=d.default.span`
286
+ `,Ee=({setProgress:t,setError:i,setFile:a,onActiveChange:o,config:r})=>{const s="AR"===r?.language,[l,c]=n.useState(!1),[d,g]=n.useState(0),p=n.useRef(null),u=n.useRef(null),h=n.useRef(null),m=n.useRef(null),b=n.useRef(null),x=n.useRef(null);n.useEffect((()=>{const e=document.createElement("script");return e.src="https://unpkg.com/mic-recorder-to-mp3",e.async=!0,e.onload=()=>console.log("Voice recording library loaded successfully"),e.onerror=()=>{console.error("Failed to load voice recording library"),i("Failed to load voice recording library. Please refresh the page.")},document.body.appendChild(e),()=>{document.body.contains(e)&&document.body.removeChild(e)}}),[i]);const f=n.useCallback((e=>{try{if(!e.active)return void navigator.mediaDevices.getUserMedia({audio:je}).then((e=>{u.current=e,f(e)})).catch((e=>{console.error("Failed to get fresh stream:",e)}));h.current=new(window.AudioContext||window.webkitAudioContext),"suspended"===h.current.state&&h.current.resume().then((()=>{}));const n=h.current.createMediaStreamSource(e);m.current=h.current.createAnalyser(),m.current.fftSize=256,m.current.smoothingTimeConstant=.8,m.current.minDecibels=-90,m.current.maxDecibels=-10,n.connect(m.current);const t=m.current.frequencyBinCount;b.current=new Uint8Array(t);const i=()=>{if(!m.current)return;m.current.getByteFrequencyData(b.current);let e=0;for(let n=0;n<t;n++)e+=b.current[n]*b.current[n];const n=Math.sqrt(e/t),a=Math.min(255,2*n);g(a),x.current=requestAnimationFrame(i)};i()}catch(e){console.error("Audio level monitoring error:",e)}}),[]),C=n.useCallback((()=>{x.current&&(cancelAnimationFrame(x.current),x.current=null),h.current&&(h.current.close(),h.current=null),g(0)}),[]),y=n.useCallback((()=>{u.current&&(u.current.getTracks().forEach((e=>{e.stop()})),u.current=null)}),[]);n.useEffect((()=>()=>{p.current&&l&&p.current.stop(),y(),C()}),[l,C,y]);const v=n.useCallback((()=>{if(!p.current){if("function"!=typeof MicRecorder)return void i("Please wait a little until voice library is loaded");p.current=new MicRecorder({bitRate:128,sampleRate:48e3})}i(void 0),l?p.current.stop().getMp3().then((([e,n])=>{if(c(!1),C(),y(),o&&o(!0),n.size<1e3)return void i("Recording seems too short. Please try again.");if(!n||0===n.size)return void i("Invalid audio recording. Please try again.");const t=(new Date).toISOString().replace(/[:.]/g,"-"),r=new File([n],`recording-${t}.mp3`,{type:"audio/mpeg"}),s=URL.createObjectURL(r);a({fileUrl:s,fileName:`recording-${t}.mp3`,extension:"mp3",blob:r}),o&&o(!1)})).catch((e=>{c(!1),C(),y(),i(`Recording failed: ${e.message}`),o&&o(!1)})):navigator.mediaDevices.getUserMedia({audio:je}).then((e=>{u.current=e,p.current.start().then((()=>{c(!0),o&&o(!0),setTimeout((()=>{h.current&&"suspended"===h.current.state?h.current.resume().then((()=>{f(e)})).catch((n=>{console.error("Failed to resume audio context:",n),f(e)})):f(e)}),100)})).catch((n=>{i(`Failed to start recording: ${n.message}`),e.getTracks().forEach((e=>e.stop())),o&&o(!1)}))})).catch((e=>{"NotAllowedError"===e.name?i("Microphone access denied. Please allow microphone access and try again."):"NotFoundError"===e.name?i("No microphone found. Please connect a microphone and try again."):i(`Microphone error: ${e.message}`),o&&o(!1)}))}),[l,i,a,f,C,y,o]),w=n.useCallback((()=>{p.current&&l&&p.current.stop(),c(!1),C(),y(),i(void 0),o&&o(!1)}),[l,C,y,i,o]);return e.jsxs(Ie,{isRTL:s&&l,children:[l?e.jsx(ve,{onClick:w,children:e.jsx(Le,{})}):null,e.jsx(ve,{onClick:v,id:"voiceRecorderIcon",className:"mic-container",children:l?e.jsxs(e.Fragment,{children:[e.jsx(ke,{isRTL:s}),e.jsx(Me,{className:"circle "+(l?"active":""),isRecording:l,audioLevel:d})]}):e.jsx(we,{activeColor:"var(--bc-chat-dark-gray-color)"})})]})};const Re=d.default.i`
287
+ ${e=>Ce('url("data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M10%2019.084C15.0163%2019.0838%2019.0838%2015.0163%2019.084%2010C19.0838%204.98367%2015.0163%200.917168%2010%200.916992C4.98367%200.917168%200.917168%204.98367%200.916992%2010C0.917168%2015.0163%204.98367%2019.0838%2010%2019.084ZM10%2017.584C5.8121%2017.5838%202.41717%2014.1879%202.41699%2010C2.41717%205.8121%205.8121%202.41717%2010%202.41699C14.1879%202.41717%2017.5838%205.8121%2017.584%2010C17.5838%2014.1879%2014.1879%2017.5838%2010%2017.584ZM6.6748%208.5C7.22679%208.49964%207.6748%208.05206%207.6748%207.5C7.6748%206.94794%207.22679%206.50036%206.6748%206.5H6.66699C6.11471%206.5%205.66699%206.94771%205.66699%207.5C5.66699%208.05229%206.11471%208.5%206.66699%208.5H6.6748ZM13.334%208.5C13.886%208.49965%2014.334%208.05207%2014.334%207.5C14.334%206.94793%2013.886%206.50035%2013.334%206.5H13.3262C12.7739%206.50001%2012.3262%206.94772%2012.3262%207.5C12.3262%208.05228%2012.7739%208.49999%2013.3262%208.5H13.334ZM10%2014.917C11.6088%2014.9169%2013.038%2014.1426%2013.9336%2012.9502C14.1819%2012.6191%2014.115%2012.1491%2013.7842%2011.9004C13.453%2011.6517%2012.9832%2011.7188%2012.7344%2012.0498C12.1099%2012.8813%2011.117%2013.4169%2010%2013.417C8.88307%2013.4169%207.89111%2012.8811%207.2666%2012.0498C7.01792%2011.7187%206.54798%2011.6519%206.2168%2011.9004C5.88563%2012.1491%205.81871%2012.619%206.06738%2012.9502C6.96298%2014.1425%208.39126%2014.9169%2010%2014.917Z%22%20fill%3D%22%23161616%22%2F%3E%3C%2Fsvg%3E");',e)}
288
+ `,Se=d.default.span`
271
289
  margin: 8px;
272
290
  cursor: pointer;
273
291
  font-size: var(--bc-chat-fontSize-xl);
274
- `,Ie=({onClick:n})=>e.jsx("div",{id:"emojiIcon",children:e.jsx(xe,{children:e.jsx(Le,{onClick:n,activeColor:"var(--bc-chat-dark-gray-color)"})})}),Ee=({text:t,setText:i,onClick:a})=>{const o=function(e){const t=n.useRef(null);return n.useEffect((()=>{const n=n=>{t.current&&!t.current.contains(n.target)&&e()};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}}),[e]),t}(a),r=n.useCallback((e=>{i(t+e)}),[i,t]),s=m.map(((n,t)=>e.jsx(je,{className:"emoji",onClick:e=>r(e.target.innerText),children:n},"emoji"+t)));return e.jsx("div",{ref:o,children:e.jsx("div",{className:"bc-emojiPicker",id:"emojiPicker",children:s})})},Re=d.default.i`
275
- ${e=>me('url("data:image/svg+xml,%3Csvg%20width%3D%2214%22%20height%3D%2218%22%20viewBox%3D%220%200%2014%2018%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M4.91667%202.12488C2.96066%202.12488%201.375%203.71054%201.375%205.66655L1.375%2010.2499C1.375%2013.3565%203.8934%2015.8749%207%2015.8749C10.1066%2015.8749%2012.625%2013.3565%2012.625%2010.2499V8.99993C12.625%208.65475%2012.9048%208.37493%2013.25%208.37493C13.5952%208.37493%2013.875%208.65475%2013.875%208.99993V10.2499C13.875%2014.0469%2010.797%2017.1249%207%2017.1249C3.20304%2017.1249%200.125%2014.0469%200.125%2010.2499L0.125%205.66655C0.125%203.02018%202.2703%200.874878%204.91667%200.874878C7.56303%200.874878%209.70833%203.02018%209.70833%205.66654V10.2499C9.70833%2011.7456%208.49577%2012.9582%207%2012.9582C5.50423%2012.9582%204.29167%2011.7456%204.29167%2010.2499L4.29167%206.91654C4.29167%206.57137%204.57149%206.29154%204.91667%206.29154C5.26184%206.29154%205.54167%206.57137%205.54167%206.91654L5.54167%2010.2499C5.54167%2011.0553%206.19458%2011.7082%207%2011.7082C7.80542%2011.7082%208.45833%2011.0553%208.45833%2010.2499V5.66654C8.45833%203.71054%206.87267%202.12488%204.91667%202.12488Z%22%20fill%3D%22%23161616%22%2F%3E%3C%2Fsvg%3E");',e)}
276
- `,Se=({setProgress:t,setFile:i,setError:a})=>{const o=n.useCallback((e=>{i(void 0),a(void 0);const n=Array.from(e.target.files);if(e.target.value="",n.length<1)return;const o=n[0],{name:r,size:s}=o,l=r.substring(r.lastIndexOf(".")+1).toLowerCase();return u.SupportedFormats.indexOf(l)<0?a("File type is not valid."):s>u.MaxFileSize?a("Maximum limit is 20 MBs"):void re(o,t,((e,n)=>{e?i({fileUrl:e,fileName:r,extension:l}):n&&a(n)}))}),[t,i,a]);return e.jsxs("div",{id:"attachIcon",children:[e.jsx(xe,{htmlFor:"fileInput",children:e.jsx(Re,{activeColor:"var(--bc-chat-dark-gray-color)"})}),e.jsx("input",{type:"file",className:"bc-fileUpload",id:"fileInput",onChange:o})]})},Fe=d.default.div`
292
+ `,Fe=({onClick:n})=>e.jsx("div",{id:"emojiIcon",children:e.jsx(ve,{children:e.jsx(Re,{onClick:n,activeColor:"var(--bc-chat-dark-gray-color)"})})}),De=({text:t,setText:i,onClick:a})=>{const o=function(e){const t=n.useRef(null);return n.useEffect((()=>{const n=n=>{t.current&&!t.current.contains(n.target)&&e()};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}}),[e]),t}(a),r=n.useCallback((e=>{i(t+e)}),[i,t]),s=m.map(((n,t)=>e.jsx(Se,{className:"emoji",onClick:e=>r(e.target.innerText),children:n},"emoji"+t)));return e.jsx("div",{ref:o,children:e.jsx("div",{className:"bc-emojiPicker",id:"emojiPicker",children:s})})},Be=d.default.i`
293
+ ${e=>Ce('url("data:image/svg+xml,%3Csvg%20width%3D%2214%22%20height%3D%2218%22%20viewBox%3D%220%200%2014%2018%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M4.91667%202.12488C2.96066%202.12488%201.375%203.71054%201.375%205.66655L1.375%2010.2499C1.375%2013.3565%203.8934%2015.8749%207%2015.8749C10.1066%2015.8749%2012.625%2013.3565%2012.625%2010.2499V8.99993C12.625%208.65475%2012.9048%208.37493%2013.25%208.37493C13.5952%208.37493%2013.875%208.65475%2013.875%208.99993V10.2499C13.875%2014.0469%2010.797%2017.1249%207%2017.1249C3.20304%2017.1249%200.125%2014.0469%200.125%2010.2499L0.125%205.66655C0.125%203.02018%202.2703%200.874878%204.91667%200.874878C7.56303%200.874878%209.70833%203.02018%209.70833%205.66654V10.2499C9.70833%2011.7456%208.49577%2012.9582%207%2012.9582C5.50423%2012.9582%204.29167%2011.7456%204.29167%2010.2499L4.29167%206.91654C4.29167%206.57137%204.57149%206.29154%204.91667%206.29154C5.26184%206.29154%205.54167%206.57137%205.54167%206.91654L5.54167%2010.2499C5.54167%2011.0553%206.19458%2011.7082%207%2011.7082C7.80542%2011.7082%208.45833%2011.0553%208.45833%2010.2499V5.66654C8.45833%203.71054%206.87267%202.12488%204.91667%202.12488Z%22%20fill%3D%22%23161616%22%2F%3E%3C%2Fsvg%3E");',e)}
294
+ `,ze=({setProgress:t,setFile:i,setError:a})=>{const o=n.useCallback((e=>{i(void 0),a(void 0);const n=Array.from(e.target.files);if(e.target.value="",n.length<1)return;const o=n[0],{name:r,size:s}=o,l=r.substring(r.lastIndexOf(".")+1).toLowerCase();return u.SupportedFormats.indexOf(l)<0?a("File type is not valid."):s>u.MaxFileSize?a("Maximum limit is 20 MBs"):void de(o,t,((e,n)=>{e?i({fileUrl:e,fileName:r,extension:l}):n&&a(n)}))}),[t,i,a]);return e.jsxs("div",{id:"attachIcon",children:[e.jsx(ve,{htmlFor:"fileInput",children:e.jsx(Be,{activeColor:"var(--bc-chat-dark-gray-color)"})}),e.jsx("input",{type:"file",className:"bc-fileUpload",id:"fileInput",onChange:o})]})},Ne=d.default.div`
277
295
  padding: 0px 0px 0px 10px;
278
296
  margin: 0px;
279
297
  width: fit-content;
@@ -292,7 +310,7 @@ i {
292
310
  cursor: pointer;
293
311
  display: block;
294
312
  }
295
- `,De=({setView:t,setFile:i,setProgress:a,setError:o,text:r,setText:s,send:l,config:c})=>{const[d,g]=n.useState(!1),[p,u]=n.useState(!1),h="AR"===c?.language;return e.jsxs("div",{className:"bc-inputActions",id:"bc-inputActions",children:[e.jsxs(Fe,{id:"iconsContainer",isRTL:h,children:[p?null:e.jsxs(e.Fragment,{children:[e.jsx(Se,{setFile:i,setProgress:a,setError:o}),e.jsx(Ie,{onClick:()=>g(!0)})]}),e.jsx(ke,{setFile:i,setError:o,setProgress:a,onActiveChange:e=>{u(e),e&&g(!1)},config:c})]}),d?e.jsx(Ee,{text:r,setText:s,onClick:()=>g(!1)}):null]})};q('.bc-trademark {\n height: 40px;\n width: 100%;\n box-shadow: 0 0 30px 0 rgba(0, 0, 0, 0.1);\n background-color: #fff;\n overflow-y: hidden;\n border-bottom-left-radius: 15px;\n border-bottom-right-radius: 15px;\n padding: 15px 0;\n}\n\n.bc-messageInput {\n min-height: 30px;\n max-height: 100%;\n background-color: #fff;\n overflow-y: hidden;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n.bc-messageInput .bc-messageInputTextArea {\n color: var(--bc-chat-dark-gray-color);\n display: block;\n min-height: 36px;\n background-color: #fff;\n box-sizing: border-box;\n font-size: var(--bc-chat-fontSize-md);\n padding: 10px 0;\n resize: none;\n overflow: auto;\n border-width: 0;\n width: calc(100% - 20px);\n word-wrap: break-word;\n border: none;\n overflow: hidden;\n outline: none;\n -webkit-box-shadow: none;\n -moz-box-shadow: none;\n box-shadow: none;\n}\n.bc-messageInput.bc-RTL {\n direction: rtl;\n}\n\n.bc-inputActions {\n display: flex;\n align-items: center;\n position: relative;\n width: fit-content;\n height: 36px;\n margin-left: auto;\n}\n.bc-inputActions .bc-fileUpload {\n display: none;\n}\n.bc-inputActions i {\n display: block;\n margin: 0 5px;\n}\n.bc-inputActions.bc-RTL {\n direction: rtl;\n}\n\n.bc-ActionChips {\n display: flex;\n gap: 10px;\n}\n\n.bc-BottomBar {\n width: 100%;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n padding-top: 8px;\n}\n.bc-BottomBar.bc-RTL {\n direction: rtl;\n}\n\n.bc-CommandsArea {\n margin-left: auto;\n display: flex;\n align-items: center;\n}\n.bc-CommandsArea.bc-RTL {\n margin-left: 0;\n margin-right: auto;\n direction: rtl;\n}\n\n.bc-emojiPicker {\n position: absolute;\n bottom: 40px;\n right: 0;\n width: 200px;\n background: #ffffff 0% 0% no-repeat padding-box;\n box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.1019607843);\n border-radius: 10px;\n opacity: 1;\n padding: 10px;\n z-index: 10;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n}\n[dir=rtl] .bc-emojiPicker, .bc-RTL .bc-emojiPicker {\n right: auto;\n left: 0;\n}\n\n.bc-uploadFileDetails {\n background-color: transparent;\n display: flex;\n align-items: center;\n width: calc(100% - 60px);\n height: 40px;\n padding: 4px 10px;\n}\n.bc-uploadFileDetails.bc-RTL {\n direction: rtl;\n}\n.bc-uploadFileDetails audio {\n width: 260px;\n}\n.bc-uploadFileDetails .bc-uploadedFile {\n max-width: 32px;\n max-height: 32px;\n pointer-events: none;\n}\n.bc-uploadFileDetails .bc-uploadedFile .bc-imageFile {\n max-width: 100%;\n max-height: 100%;\n pointer-events: none;\n}\n.bc-uploadFileDetails .bc-uploadedFile .bc-documentFile {\n max-width: 100%;\n max-height: 100%;\n margin-top: 4px;\n min-width: 25px;\n min-height: 25px;\n pointer-events: none;\n}\n.bc-uploadFileDetails .bc-uploadFileName {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n pointer-events: none;\n}\n.bc-uploadFileDetails .bc-uploadFileName span {\n padding: 10px;\n pointer-events: none;\n}\n.bc-uploadFileDetails .bc-uploadFileCancel {\n cursor: pointer;\n margin-bottom: -6px;\n margin-left: 6px;\n color: var(--bc-chat-danger-color);\n}\n[dir=rtl] .bc-uploadFileDetails .bc-uploadFileCancel, .bc-RTL .bc-uploadFileDetails .bc-uploadFileCancel {\n margin-left: 0;\n margin-right: 6px;\n}\n\n.mic-container {\n position: relative;\n}\n.mic-container svg {\n z-index: 5;\n}\n.mic-container i {\n transition: 0.9s;\n z-index: 10;\n position: relative;\n}\n.mic-container .circle {\n z-index: 4;\n top: 3px;\n left: 3px;\n position: absolute;\n background-color: transparent;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 1;\n transition: 0.5s;\n}\n.mic-container .circle:before {\n content: "";\n width: 36px;\n height: 36px;\n border-radius: 50%;\n opacity: 0.5;\n z-index: 3;\n position: absolute;\n}\n.mic-container .circle.active {\n background-color: #A8E6A3;\n}\n.mic-container .circle.active:before {\n background: #A8E6A3;\n}\n\n@keyframes bounce {\n 0% {\n transform: scale(1);\n }\n 25% {\n transform: scale(1.4);\n }\n 75% {\n transform: scale(1);\n }\n 100% {\n transform: scale(1.3);\n }\n}');const Be=d.default.div`
313
+ `,Ze=({setView:t,setFile:i,setProgress:a,setError:o,text:r,setText:s,send:l,config:c})=>{const[d,g]=n.useState(!1),[p,u]=n.useState(!1),h="AR"===c?.language;return e.jsxs("div",{className:"bc-inputActions",id:"bc-inputActions",children:[e.jsxs(Ne,{id:"iconsContainer",isRTL:h,children:[p?null:e.jsxs(e.Fragment,{children:[e.jsx(ze,{setFile:i,setProgress:a,setError:o}),e.jsx(Fe,{onClick:()=>g(!0)})]}),e.jsx(Ee,{setFile:i,setError:o,setProgress:a,onActiveChange:e=>{u(e),e&&g(!1)},config:c})]}),d?e.jsx(De,{text:r,setText:s,onClick:()=>g(!1)}):null]})};q('.bc-trademark {\n height: 40px;\n width: 100%;\n box-shadow: 0 0 30px 0 rgba(0, 0, 0, 0.1);\n background-color: #fff;\n overflow-y: hidden;\n border-bottom-left-radius: 15px;\n border-bottom-right-radius: 15px;\n padding: 15px 0;\n}\n\n.bc-messageInput {\n min-height: 30px;\n max-height: 100%;\n background-color: #fff;\n overflow-y: hidden;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n.bc-messageInput .bc-messageInputTextArea {\n color: var(--bc-chat-dark-gray-color);\n display: block;\n min-height: 36px;\n background-color: #fff;\n box-sizing: border-box;\n font-family: var(--bc-chat-font-stack);\n font-size: var(--bc-chat-fontSize-md);\n padding: 10px 0;\n resize: none;\n overflow: auto;\n border-width: 0;\n width: calc(100% - 20px);\n word-wrap: break-word;\n border: none;\n overflow: hidden;\n outline: none;\n -webkit-box-shadow: none;\n -moz-box-shadow: none;\n box-shadow: none;\n}\n.bc-messageInput.bc-RTL {\n direction: rtl;\n}\n\n.bc-inputActions {\n display: flex;\n align-items: center;\n position: relative;\n width: fit-content;\n height: 36px;\n margin-left: auto;\n}\n.bc-inputActions .bc-fileUpload {\n display: none;\n}\n.bc-inputActions i {\n display: block;\n margin: 0 5px;\n}\n.bc-inputActions.bc-RTL {\n direction: rtl;\n}\n\n.bc-ActionChips {\n display: flex;\n gap: 10px;\n}\n\n.bc-BottomBar {\n width: 100%;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n padding-top: 8px;\n}\n.bc-BottomBar.bc-RTL {\n direction: rtl;\n}\n\n.bc-CommandsArea {\n margin-left: auto;\n display: flex;\n align-items: center;\n}\n.bc-CommandsArea.bc-RTL {\n margin-left: 0;\n margin-right: auto;\n direction: rtl;\n}\n\n.bc-emojiPicker {\n position: absolute;\n bottom: 40px;\n right: 0;\n width: 200px;\n background: #ffffff 0% 0% no-repeat padding-box;\n box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.1019607843);\n border-radius: 10px;\n opacity: 1;\n padding: 10px;\n z-index: 10;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n}\n[dir=rtl] .bc-emojiPicker, .bc-RTL .bc-emojiPicker {\n right: auto;\n left: 0;\n}\n\n.bc-uploadFileDetails {\n background-color: transparent;\n display: flex;\n align-items: center;\n width: calc(100% - 60px);\n height: 40px;\n padding: 4px 10px;\n}\n.bc-uploadFileDetails.bc-RTL {\n direction: rtl;\n}\n.bc-uploadFileDetails audio {\n width: 260px;\n}\n.bc-uploadFileDetails .bc-uploadedFile {\n max-width: 32px;\n max-height: 32px;\n pointer-events: none;\n}\n.bc-uploadFileDetails .bc-uploadedFile .bc-imageFile {\n max-width: 100%;\n max-height: 100%;\n pointer-events: none;\n}\n.bc-uploadFileDetails .bc-uploadedFile .bc-documentFile {\n max-width: 100%;\n max-height: 100%;\n margin-top: 4px;\n min-width: 25px;\n min-height: 25px;\n pointer-events: none;\n}\n.bc-uploadFileDetails .bc-uploadFileName {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n pointer-events: none;\n}\n.bc-uploadFileDetails .bc-uploadFileName span {\n padding: 10px;\n pointer-events: none;\n}\n.bc-uploadFileDetails .bc-uploadFileCancel {\n cursor: pointer;\n margin-bottom: -6px;\n margin-left: 6px;\n color: var(--bc-chat-danger-color);\n}\n[dir=rtl] .bc-uploadFileDetails .bc-uploadFileCancel, .bc-RTL .bc-uploadFileDetails .bc-uploadFileCancel {\n margin-left: 0;\n margin-right: 6px;\n}\n\n.mic-container {\n position: relative;\n}\n.mic-container svg {\n z-index: 5;\n}\n.mic-container i {\n transition: 0.9s;\n z-index: 10;\n position: relative;\n}\n.mic-container .circle {\n z-index: 4;\n top: 3px;\n left: 3px;\n position: absolute;\n background-color: transparent;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 1;\n transition: 0.5s;\n}\n.mic-container .circle:before {\n content: "";\n width: 36px;\n height: 36px;\n border-radius: 50%;\n opacity: 0.5;\n z-index: 3;\n position: absolute;\n}\n.mic-container .circle.active {\n background-color: #A8E6A3;\n}\n.mic-container .circle.active:before {\n background: #A8E6A3;\n}\n\n@keyframes bounce {\n 0% {\n transform: scale(1);\n }\n 25% {\n transform: scale(1.4);\n }\n 75% {\n transform: scale(1);\n }\n 100% {\n transform: scale(1.3);\n }\n}');const Te=d.default.div`
296
314
  display: flex;
297
315
  padding: 8px 16px 16px 16px;
298
316
  flex-direction: column;
@@ -316,7 +334,7 @@ i {
316
334
  margin-top: 6px;
317
335
  text-align: center;
318
336
  }
319
- `,ze=d.default.div`
337
+ `,Pe=d.default.div`
320
338
  width: 100%;
321
339
  padding: 8px 12px;
322
340
  display: flex;
@@ -326,14 +344,14 @@ i {
326
344
  gap: 4px;
327
345
  flex: 1 0 0;
328
346
  border-bottom: 1px solid var(--bc-border-neutral-secondary, #E5E7EB);
329
- `,Ne=d.default.div`
347
+ `,He=d.default.div`
330
348
  display: flex;
331
349
  align-items: center;
332
350
  justify-content: space-between;
333
351
  gap: 8px;
334
352
  direction: ${({isRTL:e})=>e?"rtl":"ltr"};
335
353
 
336
- `,Ze=d.default.span`
354
+ `,Ge=d.default.span`
337
355
  font-weight: 500;
338
356
  font-size: var(--bc-chat-fontSize-sm);
339
357
  line-height: var(--bc-chat-lineHeight-sm);
@@ -341,14 +359,14 @@ i {
341
359
  text-overflow: ellipsis;
342
360
  white-space: nowrap;
343
361
  color: var(--bc-text-primary, #16616C);
344
- `,Te=d.default.span`
362
+ `,Je=d.default.span`
345
363
  color: #4b5563;
346
364
  font-size: var(--bc-chat-fontSize-xs);
347
365
  line-height: var(--bc-chat-lineHeight-xs);
348
366
  overflow: hidden;
349
367
  text-overflow: ellipsis;
350
368
  white-space: nowrap;
351
- `,Pe=d.default.button`
369
+ `,Ve=d.default.button`
352
370
  border: none;
353
371
  background: transparent;
354
372
  display: inline-flex;
@@ -367,26 +385,26 @@ i {
367
385
  color: #111827;
368
386
  outline: none;
369
387
  }
370
- `,He=()=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M8 6.58579L11.2929 3.29289C11.6834 2.90237 12.3166 2.90237 12.7071 3.29289C13.0976 3.68342 13.0976 4.31658 12.7071 4.70711L9.41421 8L12.7071 11.2929C13.0976 11.6834 13.0976 12.3166 12.7071 12.7071C12.3166 13.0976 11.6834 13.0976 11.2929 12.7071L8 9.41421L4.70711 12.7071C4.31658 13.0976 3.68342 13.0976 3.29289 12.7071C2.90237 12.3166 2.90237 11.6834 3.29289 11.2929L6.58579 8L3.29289 4.70711C2.90237 4.31658 2.90237 3.68342 3.29289 3.29289C3.68342 2.90237 4.31658 2.90237 4.70711 3.29289L8 6.58579Z",fill:"currentColor"})}),Ge=({config:t,sendMessage:i,setView:a,actionChips:o,noteMode:r,onNoteSend:s,onCloseNoteMode:l,notePlaceholder:c,replyMessageTitle:d,replyMessageContent:g,onCancelReplyMessage:p})=>{const h="AR"===t?.language,[m,b]=n.useState(),[x,f]=n.useState(),[C,y]=n.useState(),[v,w]=n.useState(0),M=n.useMemo((()=>Boolean(d||g)),[d,g]),A=n.useMemo((()=>d||("AR"===t?.language?"الرد على رسالة":"TR"===t?.language?"Bir mesaja yanıt veriliyor":"Replying to message")),[t?.language,d]),k=n.useMemo((()=>"AR"===t?.language?"إلغاء":"TR"===t?.language?"İptal":"Cancel"),[t?.language]),L=n.useCallback((e=>{if(r){const e=(m||"").trim();return s&&s(e),void b("")}const n=e=>{const{fileUrl:n,extension:t}=e;i(u.SupportedImageFormats.indexOf(t)>=0?"image":u.SupportedAudioFormats.indexOf(t)>=0?"audio":"document",n)};e?e.blob&&e.fileUrl.startsWith("blob:")?re(e.blob,w,((t,i)=>{if(t){try{URL.revokeObjectURL(e.fileUrl)}catch{}n({...e,fileUrl:t,blob:void 0})}else i&&y(i)})):n(e):x?x.blob&&x.fileUrl.startsWith("blob:")?re(x.blob,w,((e,t)=>{if(e){try{URL.revokeObjectURL(x.fileUrl)}catch{}n({...x,fileUrl:e,blob:void 0}),f(void 0)}else t&&y(t)})):(n(x),f(void 0)):(i(oe,m),b(""))}),[x,m,i,r,s]);return e.jsxs(Be,{isRTL:h,children:[M?e.jsxs(ze,{isRTL:h,children:[e.jsxs(Ne,{isRTL:h,children:[A?e.jsx(Ze,{children:A}):null,p?e.jsx(Pe,{type:"button",onClick:p,"aria-label":k,title:k,children:e.jsx(He,{})}):null]}),g?e.jsx(Te,{children:g}):null]}):null,e.jsx("div",{className:"bc-InputArea",children:e.jsx(he,{config:t,send:L,text:m,setText:b,file:r?void 0:x,isFileSelected:!!x,cancelFileUpload:()=>f(void 0),noteMode:r,onCloseNoteMode:()=>{b(""),l?.()},notePlaceholder:c})}),e.jsxs("div",{className:"bc-BottomBar "+(h?"bc-RTL":""),children:[void 0!==o?o:null,e.jsx("div",{className:"bc-CommandsArea "+(h?"bc-RTL":""),children:r?null:e.jsx(De,{setView:a,setFile:f,setProgress:w,setError:y,setText:b,text:m,send:L,config:t})})]}),C?e.jsx("div",{className:"bc-uploadFileError",children:C}):null]})},Je="bc-chat-header-banner",Ue=390,Ke=d.default.div`
371
- ${e=>e.bannerWidth>Ue?"height: 60px;":"height: 90px;"}
388
+ `,Ue=()=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M8 6.58579L11.2929 3.29289C11.6834 2.90237 12.3166 2.90237 12.7071 3.29289C13.0976 3.68342 13.0976 4.31658 12.7071 4.70711L9.41421 8L12.7071 11.2929C13.0976 11.6834 13.0976 12.3166 12.7071 12.7071C12.3166 13.0976 11.6834 13.0976 11.2929 12.7071L8 9.41421L4.70711 12.7071C4.31658 13.0976 3.68342 13.0976 3.29289 12.7071C2.90237 12.3166 2.90237 11.6834 3.29289 11.2929L6.58579 8L3.29289 4.70711C2.90237 4.31658 2.90237 3.68342 3.29289 3.29289C3.68342 2.90237 4.31658 2.90237 4.70711 3.29289L8 6.58579Z",fill:"currentColor"})}),Ke=({config:t,sendMessage:i,setView:a,actionChips:o,noteMode:r,onNoteSend:s,onCloseNoteMode:l,notePlaceholder:c,replyMessageTitle:d,replyMessageContent:g,onCancelReplyMessage:p})=>{const h="AR"===t?.language,[m,b]=n.useState(),[x,f]=n.useState(),[C,y]=n.useState(),[v,w]=n.useState(0),M=n.useMemo((()=>Boolean(d||g)),[d,g]),A=n.useMemo((()=>d||("AR"===t?.language?"الرد على رسالة":"TR"===t?.language?"Bir mesaja yanıt veriliyor":"Replying to message")),[t?.language,d]),k=n.useMemo((()=>"AR"===t?.language?"إلغاء":"TR"===t?.language?"İptal":"Cancel"),[t?.language]),L=n.useCallback((e=>{if(r){const e=(m||"").trim();return s&&s(e),void b("")}const n=e=>{const{fileUrl:n,extension:t}=e;i(u.SupportedImageFormats.indexOf(t)>=0?"image":u.SupportedAudioFormats.indexOf(t)>=0?"audio":"document",n)};e?e.blob&&e.fileUrl.startsWith("blob:")?de(e.blob,w,((t,i)=>{if(t){try{URL.revokeObjectURL(e.fileUrl)}catch{}n({...e,fileUrl:t,blob:void 0})}else i&&y(i)})):n(e):x?x.blob&&x.fileUrl.startsWith("blob:")?de(x.blob,w,((e,t)=>{if(e){try{URL.revokeObjectURL(x.fileUrl)}catch{}n({...x,fileUrl:e,blob:void 0}),f(void 0)}else t&&y(t)})):(n(x),f(void 0)):(i(ce,m),b(""))}),[x,m,i,r,s]);return e.jsxs(Te,{isRTL:h,children:[M?e.jsxs(Pe,{isRTL:h,children:[e.jsxs(He,{isRTL:h,children:[A?e.jsx(Ge,{children:A}):null,p?e.jsx(Ve,{type:"button",onClick:p,"aria-label":k,title:k,children:e.jsx(Ue,{})}):null]}),g?e.jsx(Je,{children:g}):null]}):null,e.jsx("div",{className:"bc-InputArea",children:e.jsx(fe,{config:t,send:L,text:m,setText:b,file:r?void 0:x,isFileSelected:!!x,cancelFileUpload:()=>f(void 0),noteMode:r,onCloseNoteMode:()=>{b(""),l?.()},notePlaceholder:c})}),e.jsxs("div",{className:"bc-BottomBar "+(h?"bc-RTL":""),children:[void 0!==o?o:null,e.jsx("div",{className:"bc-CommandsArea "+(h?"bc-RTL":""),children:r?null:e.jsx(Ze,{setView:a,setFile:f,setProgress:w,setError:y,setText:b,text:m,send:L,config:t})})]}),C?e.jsx("div",{className:"bc-uploadFileError",children:C}):null]})},Qe="bc-chat-header-banner",We=390,Ye=d.default.div`
389
+ ${e=>e.bannerWidth>We?"height: 60px;":"height: 90px;"}
372
390
  display: block;
373
391
  width: 100%;
374
392
  background-color: transparent;
375
393
  z-index: 10;
376
394
  border-top-left-radius: 15px;
377
395
  border-top-right-radius: 15px;
378
- `,Ve=d.default.div`
396
+ `,Oe=d.default.div`
379
397
  width: 100%;
380
398
  display: flex;
381
399
  align-items: center;
382
400
  background-image: ${e=>`linear-gradient(103deg, ${e.startColor},${e.endColor})`};
383
- ${e=>e.bannerWidth<=Ue?'\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMzkwIiBoZWlnaHQ9Ijg4LjM1NCIgdmlld0JveD0iMCAwIDM5MCA4OC4zNTQiPgogIDxkZWZzPgogICAgPGxpbmVhckdyYWRpZW50IGlkPSJsaW5lYXItZ3JhZGllbnQiIHgyPSIxIiB5Mj0iMSIgZ3JhZGllbnRVbml0cz0ib2JqZWN0Qm91bmRpbmdCb3giPgogICAgICA8c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiM2NjJkOTEiLz4KICAgICAgPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZWUyYTdiIi8+CiAgICA8L2xpbmVhckdyYWRpZW50PgogIDwvZGVmcz4KICA8cGF0aCBpZD0iUGF0aF84NzgiIGRhdGEtbmFtZT0iUGF0aCA4NzgiIGQ9Ik0xMCwwSDM4MGExMCwxMCwwLDAsMSwxMCwxMFY3MHMtNzUuMDYtNy44ODYtMTk5LjYxNywxMS44NjJTMCw3MCwwLDcwVjEwQTEwLDEwLDAsMCwxLDEwLDAiIGZpbGw9InVybCgjbGluZWFyLWdyYWRpZW50KSIvPgo8L3N2Zz4K");\n mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMzkwIiBoZWlnaHQ9Ijg4LjM1NCIgdmlld0JveD0iMCAwIDM5MCA4OC4zNTQiPgogIDxkZWZzPgogICAgPGxpbmVhckdyYWRpZW50IGlkPSJsaW5lYXItZ3JhZGllbnQiIHgyPSIxIiB5Mj0iMSIgZ3JhZGllbnRVbml0cz0ib2JqZWN0Qm91bmRpbmdCb3giPgogICAgICA8c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiM2NjJkOTEiLz4KICAgICAgPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZWUyYTdiIi8+CiAgICA8L2xpbmVhckdyYWRpZW50PgogIDwvZGVmcz4KICA8cGF0aCBpZD0iUGF0aF84NzgiIGRhdGEtbmFtZT0iUGF0aCA4NzgiIGQ9Ik0xMCwwSDM4MGExMCwxMCwwLDAsMSwxMCwxMFY3MHMtNzUuMDYtNy44ODYtMTk5LjYxNywxMS44NjJTMCw3MCwwLDcwVjEwQTEwLDEwLDAsMCwxLDEwLDAiIGZpbGw9InVybCgjbGluZWFyLWdyYWRpZW50KSIvPgo8L3N2Zz4K");\n mask-repeat: no-repeat;\n mask-size: auto;\n -webkit-mask-size: auto;\n -webkit-mask-repeat: no-repeat;\n height: 90px;\n ':"height: 60px;"}
384
- `,Qe=d.default.div`
401
+ ${e=>e.bannerWidth<=We?'\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjA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z4KICAgICAgPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZWUyYTdiIi8+CiAgICA8L2xpbmVhckdyYWRpZW50PgogIDwvZGVmcz4KICA8cGF0aCBpZD0iUGF0aF84NzgiIGRhdGEtbmFtZT0iUGF0aCA4NzgiIGQ9Ik0xMCwwSDM4MGExMCwxMCwwLDAsMSwxMCwxMFY3MHMtNzUuMDYtNy44ODYtMTk5LjYxNywxMS44NjJTMCw3MCwwLDcwVjEwQTEwLDEwLDAsMCwxLDEwLDAiIGZpbGw9InVybCgjbGluZWFyLWdyYWRpZW50KSIvPgo8L3N2Zz4K");\n mask-repeat: no-repeat;\n mask-size: auto;\n -webkit-mask-size: auto;\n -webkit-mask-repeat: no-repeat;\n height: 90px;\n ':"height: 60px;"}
402
+ `,qe=d.default.div`
385
403
  width: 100%;
386
404
  height: 100%;
387
405
  display: flex;
388
- `,We=d.default.div`
389
- ${e=>e.bannerWidth>Ue?"padding-bottom: 0 !important;":""}
406
+ `,Xe=d.default.div`
407
+ ${e=>e.bannerWidth>We?"padding-bottom: 0 !important;":""}
390
408
  display: flex;
391
409
  gap: 10px;
392
410
  align-items: center;
@@ -407,8 +425,8 @@ i {
407
425
  color: #fff;
408
426
  font-style: normal;
409
427
  }
410
- `,Ye=d.default.div`
411
- ${e=>e.bannerWidth>Ue?"padding-bottom: 0 !important;":""}
428
+ `,$e=d.default.div`
429
+ ${e=>e.bannerWidth>We?"padding-bottom: 0 !important;":""}
412
430
  display: flex;
413
431
  flex-direction: row-reverse;
414
432
  gap: 10px;
@@ -423,9 +441,9 @@ i {
423
441
  cursor: pointer;
424
442
  display: block;
425
443
  }
426
- `,Oe=d.default.i`
444
+ `,_e=d.default.i`
427
445
  background-image: url("data:image/svg+xml;base64,PHN2ZyBpZD0ibWluaW1pemUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxLjgxNyIgdmlld0JveD0iMCAwIDE2IDEuODE3Ij4KICA8ZGVmcz4KICAgIDxjbGlwUGF0aCBpZD0iY2xpcC1wYXRoIj4KICAgICAgPHJlY3QgaWQ9IlJlY3RhbmdsZV82OCIgZGF0YS1uYW1lPSJSZWN0YW5nbGUgNjgiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxLjgxNyIgZmlsbD0iIzAwMCIvPgogICAgPC9jbGlwUGF0aD4KICA8L2RlZnM+CiAgPGcgaWQ9Ikdyb3VwXzMwMSIgZGF0YS1uYW1lPSJHcm91cCAzMDEiIGNsaXAtcGF0aD0idXJsKCNjbGlwLXBhdGgpIj4KICAgIDxwYXRoIGlkPSJQYXRoXzgwNCIgZGF0YS1uYW1lPSJQYXRoIDgwNCIgZD0iTTE1LjM5NCwyLjIxMUguNjA2QS42MDYuNjA2LDAsMSwxLC42MDYsMUgxNS4zOTRhLjYwNi42MDYsMCwwLDEsMCwxLjIxMSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCAtMC4zOTQpIiBmaWxsPSIjZmZmIi8+CiAgPC9nPgo8L3N2Zz4K");
428
- `,qe=({config:t,minimize:i})=>{const[a,o]=n.useState();return n.useEffect((()=>{new ResizeObserver((()=>{const e=document.getElementById(Je)?.offsetWidth;e&&e>50&&e!==a&&o(e)})).observe(document.getElementById(Je))}),[]),e.jsx(Ke,{bannerWidth:a,className:"bc-header",children:e.jsx(Ve,{className:"bc-banner",id:Je,startColor:"#065A60",endColor:"#006466",bannerWidth:a,children:e.jsxs(Qe,{className:"bc-bannerContents",children:[e.jsxs(We,{className:"bc-companyInfo",bannerWidth:a,logo:t.brandLogo||h,children:[e.jsx("i",{}),e.jsx("span",{children:t.brandName||"BreadCrumbs"})]}),e.jsx(Ye,{className:"bc-bannerActions",bannerWidth:a,children:i?e.jsx(Oe,{className:"bc-flow-minimize",onClick:()=>i()}):null})]})})})},Xe=d.default.div`
446
+ `,en=({config:t,minimize:i})=>{const[a,o]=n.useState();return n.useEffect((()=>{new ResizeObserver((()=>{const e=document.getElementById(Qe)?.offsetWidth;e&&e>50&&e!==a&&o(e)})).observe(document.getElementById(Qe))}),[]),e.jsx(Ye,{bannerWidth:a,className:"bc-header",children:e.jsx(Oe,{className:"bc-banner",id:Qe,startColor:"#065A60",endColor:"#006466",bannerWidth:a,children:e.jsxs(qe,{className:"bc-bannerContents",children:[e.jsxs(Xe,{className:"bc-companyInfo",bannerWidth:a,logo:t.brandLogo||h,children:[e.jsx("i",{}),e.jsx("span",{children:t.brandName||"BreadCrumbs"})]}),e.jsx($e,{className:"bc-bannerActions",bannerWidth:a,children:i?e.jsx(_e,{className:"bc-flow-minimize",onClick:()=>i()}):null})]})})})},nn=d.default.div`
429
447
  width: 100%;
430
448
  text-align: center;
431
449
  i {
@@ -456,7 +474,7 @@ i {
456
474
  border-radius: 0px 0px 10px 10px;
457
475
  opacity: 1;
458
476
  }
459
- `,$e=c.default.forwardRef((({forRate:n},t)=>e.jsxs(Xe,{className:""+(n?"bc-ratingPositioning":""),children:[e.jsx("i",{}),e.jsx("span",{children:"Powered by Bread Crumbs"})]})));q('@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");\n:root {\n --bc-chat-font-stack: "Poppins", "Montserrat", sans-serif;\n --bc-chat-fontSize-xs: 10px;\n --bc-chat-fontSize-sm: 12px;\n --bc-chat-fontSize-md: 16px;\n --bc-chat-fontSize-lg: 18px;\n --bc-chat-fontSize-xl: 22px;\n --bc-chat-fontSize-xxl: 26px;\n --bc-chat-body-4-size: 12px;\n --bc-chat-body-4-lineheight: 20px;\n --bc-text-secondary: #6C737F;\n --bc-chat-fontWeight-light: 100;\n --bc-chat-fontWeight-regular: 400;\n --bc-chat-fontWeight-medium: 500;\n --bc-chat-fontWeight-bold: 700;\n --bc-chat-lineHeight-xs: 18px;\n --bc-chat-lineHeight-sm: 22px;\n --bc-chat-lineHeight-md: 28px;\n --bc-chat-light-gray-color: #9b9b9b;\n --bc-chat-dark-gray-color: #4d4d4d;\n --bc-chat-other-message-border-color: #E5E7EB;\n --bc-chat-other-message-background-start-color: #E5E7EB;\n --bc-chat-other-message-background-end-color: #E5E7EB;\n --bc-chat-other-message-text-color: #161616;\n --bc-chat-my-message-border-color: #258694;\n --bc-chat-my-message-background-start-color: #258694;\n --bc-chat-my-message-background-end-color: #258694;\n --bc-chat-message-highlight-color: #EBC10466;\n --bc-chat-my-message-text-color: #fff;\n --bc-chat-danger-color: #B42318;\n --bc-chat-success-color: #58aa18;\n --bc-chat-white-color: #fff;\n --bc-chat-radius: 5px;\n --bc-background-primary-50: #F3FBFC;\n --bc-border-primary: #16616C;\n --bc-border-neutral-secondary: #E5E7EB;\n}');const _e=d.default.div`
477
+ `,tn=c.default.forwardRef((({forRate:n},t)=>e.jsxs(nn,{className:""+(n?"bc-ratingPositioning":""),children:[e.jsx("i",{}),e.jsx("span",{children:"Powered by Bread Crumbs"})]})));q('@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");\n:root {\n --bc-chat-font-stack: "Poppins", "Montserrat", sans-serif;\n --bc-chat-fontSize-xs: 10px;\n --bc-chat-fontSize-sm: 12px;\n --bc-chat-fontSize-md: 16px;\n --bc-chat-fontSize-lg: 18px;\n --bc-chat-fontSize-xl: 22px;\n --bc-chat-fontSize-xxl: 26px;\n --bc-chat-body-4-size: 12px;\n --bc-chat-body-4-lineheight: 20px;\n --bc-text-secondary: #6C737F;\n --bc-chat-fontWeight-light: 100;\n --bc-chat-fontWeight-regular: 400;\n --bc-chat-fontWeight-medium: 500;\n --bc-chat-fontWeight-bold: 700;\n --bc-chat-lineHeight-xs: 18px;\n --bc-chat-lineHeight-sm: 22px;\n --bc-chat-lineHeight-md: 28px;\n --bc-chat-light-gray-color: #9b9b9b;\n --bc-chat-dark-gray-color: #4d4d4d;\n --bc-chat-other-message-border-color: #E5E7EB;\n --bc-chat-other-message-background-start-color: #E5E7EB;\n --bc-chat-other-message-background-end-color: #E5E7EB;\n --bc-chat-other-message-text-color: #161616;\n --bc-chat-my-message-border-color: #258694;\n --bc-chat-my-message-background-start-color: #258694;\n --bc-chat-my-message-background-end-color: #258694;\n --bc-chat-message-highlight-color: #EBC10466;\n --bc-chat-my-message-text-color: #fff;\n --bc-chat-danger-color: #B42318;\n --bc-chat-success-color: #58aa18;\n --bc-chat-white-color: #fff;\n --bc-chat-radius: 5px;\n --bc-background-primary-50: #F3FBFC;\n --bc-border-primary: #16616C;\n --bc-border-neutral-secondary: #E5E7EB;\n}');const an=d.default.div`
460
478
  position: relative;
461
479
  height: 100%;
462
480
  display: flex;
@@ -475,13 +493,5 @@ i {
475
493
  font-style: normal;
476
494
  line-height: var(--bc-chat-lineHeight-xs);
477
495
  color: var(--bc-chat-dark-gray-color);
478
- p,
479
- input,
480
- textarea {
481
- font-family: inherit;
482
- font-size: inherit;
483
- line-height: inherit;
484
- font-weight: inherit;
485
- }
486
- `;exports.BCChat=({config:t={language:"EN",backgroundColor:"#F3F4F6"},messages:i=[],sendMessage:a,debug:o,minimize:r,onReachingUp:s,agentsIdsAvatarsMap:l,actionChips:c,noteMode:d,onNoteSend:g,onCloseNoteMode:p,searchPattern:u,notePlaceholder:h,searchMatchNo:m=1,onSearchMatchCount:b,onMessageReply:x,replyMessageTitle:f,replyMessageContent:C,onCancelReplyMessage:y})=>{const[v,w]=n.useState("MESSAGE_LIST"),M="interactive"===(i&&i.length>0&&i[i.length-1].type);return e.jsxs(_e,{className:"bc-chat",children:[t.hideHeader?null:e.jsx(qe,{config:t,minimize:r}),"MESSAGE_LIST"===v?e.jsx(ae,{messages:i,sendMessage:a,debug:o,config:t,onReachingUp:s,agentsIdsAvatarsMap:l,searchPattern:u,searchMatchNo:m,onSearchMatchCount:b,onMessageReply:x},"message-list"):null,M?e.jsx($e,{forRate:!0}):t.inputDisabled?null:e.jsx(Ge,{sendMessage:a,setView:w,config:t,actionChips:c,noteMode:d,onCloseNoteMode:p,onNoteSend:g,notePlaceholder:h,replyMessageTitle:f,replyMessageContent:C,onCancelReplyMessage:y},"message-input")]})};
496
+ `;exports.BCChat=({config:t={language:"EN",backgroundColor:"#F3F4F6"},messages:i=[],sendMessage:a,debug:o,minimize:r,onReachingUp:s,agentsIdsAvatarsMap:l,actionChips:c,noteMode:d,onNoteSend:g,onCloseNoteMode:p,searchPattern:u,notePlaceholder:h,searchMatchNo:m=1,onSearchMatchCount:b,onMessageReply:x,replyMessageTitle:f,replyMessageContent:C,onCancelReplyMessage:y,errorMessage:v})=>{const[w,M]=n.useState("MESSAGE_LIST"),A="interactive"===(i&&i.length>0&&i[i.length-1].type);return e.jsxs(an,{className:"bc-chat",children:[t.hideHeader?null:e.jsx(en,{config:t,minimize:r}),"MESSAGE_LIST"===w?e.jsx(le,{messages:i,sendMessage:a,debug:o,config:t,onReachingUp:s,agentsIdsAvatarsMap:l,searchPattern:u,searchMatchNo:m,onSearchMatchCount:b,onMessageReply:x,errorMessage:v},"message-list"):null,A?e.jsx(tn,{forRate:!0}):t.inputDisabled?null:e.jsx(Ke,{sendMessage:a,setView:M,config:t,actionChips:c,noteMode:d,onCloseNoteMode:p,onNoteSend:g,notePlaceholder:h,replyMessageTitle:f,replyMessageContent:C,onCancelReplyMessage:y},"message-input")]})};
487
497
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n"],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yxEAAA,SAASA,EAAYC,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKF,GAA2B,oBAAbG,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,GAnBY,CAqB1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n"],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yxEAAA,SAASA,EAAYC,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKF,GAA2B,oBAAbG,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,GAnBY,CAqB1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bcrumbs.net/bc-chat",
3
- "version": "1.0.67",
3
+ "version": "1.0.69",
4
4
  "main": "build/index.js",
5
5
  "module": "build/index.es.js",
6
6
  "jsnext:main": "build/index.es.js",