@bcrumbs.net/bc-chat 1.0.30 → 1.0.32

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
@@ -26,17 +26,22 @@ type ChatConfig = {
26
26
  language?: Lang;
27
27
  hideHeader?: boolean;
28
28
  };
29
+ type UtilMessage = {
30
+ type: 'seperator';
31
+ content?: string;
32
+ };
29
33
  type ChatMessage = Partial<MessageDto> & {
30
34
  status?: MessageStatus;
31
35
  };
32
36
 
33
37
  interface ChatProps {
34
38
  config?: ChatConfig;
35
- messages?: ChatMessage[];
39
+ messages?: (ChatMessage | UtilMessage)[];
36
40
  sendMessage: (type: MessageType, messageContent: string) => void;
41
+ onReachingUp?: () => void;
37
42
  minimize?: () => void;
38
43
  debug?: boolean;
39
44
  }
40
- declare const Chat: ({ config, messages, sendMessage, debug, minimize, }: ChatProps) => react_jsx_runtime.JSX.Element;
45
+ declare const Chat: ({ config, messages, sendMessage, debug, minimize, onReachingUp }: ChatProps) => react_jsx_runtime.JSX.Element;
41
46
 
42
47
  export { Chat as BCChat };
package/build/index.es.js CHANGED
@@ -1,7 +1,7 @@
1
- import{jsx as e,jsxs as n}from"react/jsx-runtime";import t,{useMemo as i,useEffect as a,useRef as o,useCallback as r,useState as c}from"react";import s from"@emotion/styled";import l from"react-markdown";import{franc as d}from"franc-min";import{v4 as g}from"uuid";import{BlobServiceClient as p,AnonymousCredential as h}from"@azure/storage-blob";const b={MaxFileSize:52428800,SupportedFormats:["png","jpg","jpeg","gif","bmp","pdf","doc","xls","xlsx","docx","ppt","pptx","avi","m4a","m4v","mov","mp4","wav","wma","wmv"],SupportedImageFormats:["png","jpg","jpeg","gif","bmp","webp"],SupportedAudioFormats:["mp3","acc","m4a","ogg","amr"]},m="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEEAAABBCAYAAACO98lFAAAACXBIWXMAAAsSAAALEgHS3X78AAAFa0lEQVR42u2bX0xTVxzH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wCwIXAQNxrtvu5V+KCpct558UjvQmeSqcn/Xe5YR5N4qrHGtea5+51cdpvpKmJOXynxf8aE2oUOZz2Ied1sPOM5lc9VsIV1qlWE/P+YJzigrBJW8ppM48mUd/VNGcQjlEvDjmvE67AJ9t3B1zigqCTawhV2DIWQH1XExyj3tjyj4E27Lp9Gswjrp/vyCnjvaqfinMnJERP+LxkM1qufMsJVpaxACydP2HbyjzUaEqgfTGTSME7/H/iylAv4QLTN0I+8fWyq1OcypJMIsXh14zY0tFEjDXet6Pxvv1xbiFLWgr3eBB3JtmI65WnKLD/za0xaxeiuSwVK/NwrHgT57SYaZaxAMyjvlkBfF1u4k2Svr/dLEhVSlAIVr+d0y5TF+KYYeu8lZ9d6uKIAFo93YJJ7oK6Q2PfNaKSpJNrcLSyDpcc7TjtuhmT+mxS6fHhK5XIkPHD6wu4sdd2XrD3Fjwm7Gw/iWOGrYQgWq01oFprgI9l0D3kgD80DEfQj+DUBFTJqVBKU5GTqkKRUhdVH+gLuLGz/aSgxVnBIQxNTUYEAfxbbY70C89mrZ5u7LWdF7w6nZDAODQ1ifctDThjvybIemw4hH1tjdhp/SUh5fmEfp9Qb29Bk+sWduSURa1SRzIfy+CyqzPmOuZTh+APjRCnQTBMvqhtIojdvRdR0N+K9StzUKTIgnZFJq9LTJfsHSODaB2y48KwF0/DFtE/h1JliUKgECgECoFCoBAi2D8QCAe+XuY7HAAAAABJRU5ErkJggg==",x=["🤓","🙃","😕","â˜šī¸","😲","đŸ˜ŗ","😠","😇","😀","😁","😂","đŸ¤Ŗ","😃","😄","😅","😆","😉","😊","😏","đŸ˜Ŗ","đŸ˜Ĩ","😮","😴","😌","😋","😎","😍","🙂","🤗","🤔","😐","😑","đŸ˜ļ","🙄"];function u(e){return e.isAgent?"linear-gradient(104deg,var(--bc-chat-agent-message-background-start-color),var(--bc-chat-agent-message-background-end-color))":"linear-gradient(104deg,var(--bc-chat-client-message-background-start-color),var(--bc-chat-client-message-background-end-color))"}function C(e){return e.isAgent?"var(--bc-chat-agent-message-border-color)":"var(--bc-chat-client-message-border-color)"}function f(e){return e.isAgent?"var(--bc-chat-agent-message-text-color)":"var(--bc-chat-client-message-text-color)"}const w=({message:n})=>e("div",{className:"bc-mediaMessage"+("audio"===n.type?" audio":""),style:{padding:0},children:e("video",{src:n.content,controls:!0})}),v=s.div`
2
- background-image: ${e=>u(e)};
3
- color: ${e=>f(e)};
4
- border-color: ${e=>C(e)};
1
+ import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import i,{useMemo as a,useEffect as o,useRef as r,useCallback as c,useState as s}from"react";import l from"@emotion/styled";import d from"react-markdown";import{franc as g}from"franc-min";import{v4 as p}from"uuid";import{BlobServiceClient as h,AnonymousCredential as b}from"@azure/storage-blob";const m={MaxFileSize:52428800,SupportedFormats:["png","jpg","jpeg","gif","bmp","pdf","doc","xls","xlsx","docx","ppt","pptx","avi","m4a","m4v","mov","mp4","wav","wma","wmv"],SupportedImageFormats:["png","jpg","jpeg","gif","bmp","webp"],SupportedAudioFormats:["mp3","acc","m4a","ogg","amr"]},u="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEEAAABBCAYAAACO98lFAAAACXBIWXMAAAsSAAALEgHS3X78AAAFa0lEQVR42u2bX0xTVxzHvzqqVOqQrtJC2gmF4ooMWNg6FEJE3NhClpnG8aBzsTHugbgsLltiJg/6NI3J5pLFLbpIIjEjLuriiH9qnESlI6BQWcGsSEvT2lK8q0CvFChme1hwXs5tKfTWXfT83s6fe3Lz6fn9zvl9f7eL9L/u/xvPuS0GNQqBQqAQKAQKYaYlzfdBk0qPtzRFnL7L7ttoGLzz/EBQSlNRrMzj9HUzA9QdaEygECgECoFCoBAoBAqBQqAQKASaRQph6UlLUCJToCjtZcgkydCmqh6PPQyPo39kEP7QCDoeeGCbCD5bEN5dkQljlgFl6sKo854c97EMfvf2osl1K+FAEgqhPEWBuvyNRModi2XIFDDmVcCYV4FLjnZ8Zf8NQ1OTCysmmFR6HK2smxeAm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d6uKIAFo93YJJ7oK6Q2PfNaKSpJNrcLSyDpcc7TjtuhmT+mxS6fHhK5XIkPHD6wu4sdd2XrD3Fjwm7Gw/iWOGrYQgWq01oFprgI9l0D3kgD80DEfQj+DUBFTJqVBKU5GTqkKRUhdVH+gLuLGz/aSgxVnBIQxNTUYEAfxbbY70C89mrZ5u7LWdF7w6nZDAODQ1ifctDThjvybIemw4hH1tjdhp/SUh5fmEfp9Qb29Bk+sWduSURa1SRzIfy+CyqzPmOuZTh+APjRCnQTBMvqhtIojdvRdR0N+K9StzUKTIgnZFJq9LTJfsHSODaB2y48KwF0/DFtE/h1JliUKgECgECoFCoBAi2D8QCAe+XuY7HAAAAABJRU5ErkJggg==",x=["🤓","🙃","😕","â˜šī¸","😲","đŸ˜ŗ","😠","😇","😀","😁","😂","đŸ¤Ŗ","😃","😄","😅","😆","😉","😊","😏","đŸ˜Ŗ","đŸ˜Ĩ","😮","😴","😌","😋","😎","😍","🙂","🤗","🤔","😐","😑","đŸ˜ļ","🙄"];function C(e){return e.isAgent?"linear-gradient(104deg,var(--bc-chat-agent-message-background-start-color),var(--bc-chat-agent-message-background-end-color))":"linear-gradient(104deg,var(--bc-chat-client-message-background-start-color),var(--bc-chat-client-message-background-end-color))"}function f(e){return e.isAgent?"var(--bc-chat-agent-message-border-color)":"var(--bc-chat-client-message-border-color)"}function w(e){return e.isAgent?"var(--bc-chat-agent-message-text-color)":"var(--bc-chat-client-message-text-color)"}const v=({message:n})=>e("div",{className:"bc-mediaMessage"+("audio"===n.type?" audio":""),style:{padding:0},children:e("video",{src:n.content,controls:!0})}),A=l.div`
2
+ background-image: ${e=>C(e)};
3
+ color: ${e=>w(e)};
4
+ border-color: ${e=>f(e)};
5
5
  border-width: 1px;
6
6
  border-style: solid;
7
7
  :hover {
@@ -11,25 +11,25 @@ import{jsx as e,jsxs as n}from"react/jsx-runtime";import t,{useMemo as i,useEffe
11
11
  -ms-filter: brightness(80%);
12
12
  filter: brightness(80%);
13
13
  }
14
- `;const A=s.i`
14
+ `;const I=l.i`
15
15
  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%22M8.51194%203.00541C9.18829%202.54594%2010.0435%202.53694%2010.6788%202.95419C10.8231%203.04893%2010.9771%203.1993%2011.389%203.61119C11.8009%204.02307%2011.9513%204.17714%2012.046%204.32141C12.4633%204.95675%2012.4543%205.81192%2011.9948%206.48827C11.8899%206.64264%2011.7276%206.80811%2011.3006%207.23511L10.6819%207.85383C10.4867%208.04909%2010.4867%208.36567%2010.6819%208.56093C10.8772%208.7562%2011.1938%208.7562%2011.389%208.56093L12.0077%207.94221L12.0507%207.89929C12.4203%207.52976%2012.6568%207.2933%2012.822%207.0502C13.4972%206.05623%2013.5321%204.76252%2012.8819%203.77248C12.7233%203.53102%2012.4922%203.30001%2012.1408%202.94871L12.0961%202.90408L12.0515%202.85942C11.7002%202.508%2011.4692%202.27689%2011.2277%202.11832C10.2377%201.46813%208.94398%201.50299%207.95001%202.17822C7.70691%202.34336%207.47044%202.57991%207.1009%202.94955L7.058%202.99247L6.43928%203.61119C6.24401%203.80645%206.24401%204.12303%206.43928%204.31829C6.63454%204.51355%206.95112%204.51355%207.14638%204.31829L7.7651%203.69957C8.1921%203.27257%208.35757%203.11027%208.51194%203.00541ZM4.31796%207.14672C4.51322%206.95146%204.51322%206.63487%204.31796%206.43961C4.12269%206.24435%203.80611%206.24435%203.61085%206.43961L2.99213%207.05833L2.94922%207.10124C2.57957%207.47077%202.34303%207.70724%202.17788%207.95035C1.50265%208.94432%201.4678%2010.238%202.11799%2011.2281C2.27656%2011.4695%202.50766%2011.7005%202.8591%2012.0518L2.90374%2012.0965L2.94837%2012.1411C3.29967%2012.4925%203.53068%2012.7237%203.77214%2012.8822C4.76219%2013.5324%206.05589%2013.4976%207.04986%2012.8223C7.29296%2012.6572%207.52943%2012.4206%207.89896%2012.051L7.89897%2012.051L7.94188%2012.0081L8.5606%2011.3894C8.75586%2011.1941%208.75586%2010.8775%208.5606%2010.6823C8.36533%2010.487%208.04875%2010.487%207.85349%2010.6823L7.23477%2011.301C6.80777%2011.728%206.6423%2011.8903%206.48794%2011.9951C5.81158%2012.4546%204.95642%2012.4636%204.32107%2012.0464C4.17681%2011.9516%204.02274%2011.8012%203.61085%2011.3894C3.19896%2010.9775%203.0486%2010.8234%202.95385%2010.6791C2.53661%2010.0438%202.54561%209.18863%203.00507%208.51227C3.10993%208.35791%203.27224%208.19244%203.69924%207.76544L4.31796%207.14672ZM9.62172%206.08558C9.81698%205.89032%209.81698%205.57373%209.62172%205.37847C9.42646%205.18321%209.10988%205.18321%208.91461%205.37847L5.37908%208.91401C5.18382%209.10927%205.18382%209.42585%205.37908%209.62111C5.57434%209.81637%205.89092%209.81637%206.08619%209.62111L9.62172%206.08558Z%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")`};
16
16
  width: 24px;
17
17
  background-position: center;
18
18
  background-size: contain;
19
19
  background-repeat: no-repeat;
20
- `,I=s.a`
20
+ `,k=l.a`
21
21
  display: flex;
22
22
  flex-direction: row;
23
23
  align-item: center;
24
24
  text-decoration: auto;
25
25
  gap: 5px;
26
- color: ${e=>`${f(e)}`};
26
+ color: ${e=>`${w(e)}`};
27
27
  font-size: var(--bc-chat-fontSize-sm);
28
- `,M=s.a`
28
+ `,y=l.a`
29
29
  font-size: var(--bc-chat-fontSize-sm);
30
- background-image: ${e=>u(e)};
31
- color: ${e=>f(e)};
32
- border-color: ${e=>C(e)};
30
+ background-image: ${e=>C(e)};
31
+ color: ${e=>w(e)};
32
+ border-color: ${e=>f(e)};
33
33
  border-width: 1px;
34
34
  border-style: solid;
35
35
  :hover {
@@ -39,21 +39,21 @@ import{jsx as e,jsxs as n}from"react/jsx-runtime";import t,{useMemo as i,useEffe
39
39
  -ms-filter: brightness(80%);
40
40
  filter: brightness(80%);
41
41
  }
42
- `,k=s.div`
42
+ `,L=l.div`
43
43
  display: flex;
44
44
  flex-direction: row;
45
45
  align-items: center;
46
46
  gap: 5px;
47
- `,y=s.span`
47
+ `,M=l.span`
48
48
  color: ${e=>e.color};
49
- `;const L=s.i`
49
+ `;const E=l.i`
50
50
  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")`};
51
51
  background-position: center;
52
52
  background-size: contain;
53
53
  background-repeat: no-repeat;
54
54
  width: 15px;
55
55
  height: 15px;
56
- `,E={document:({message:t})=>{let i=t.content.split("/"),a=i[i.length-1];return e(v,{className:"bc-fileMessage",...t,children:n(I,{href:t.content,target:"_blank",download:a,rel:"noopener noreferrer",...t,children:[e(A,{color:(o=t,o.isAgent,"000000")}),e("span",{children:a})]})});var o},image:({message:n})=>e("div",{className:"bc-mediaMessage",style:{backgroundImage:u(n),color:f(n),borderColor:C(n),borderWidth:"1px",borderStyle:"solid",padding:0},children:e("a",{href:n.content,target:"_blank",rel:"noreferrer",children:e("img",{src:n.content,alt:"message content"})})}),location:({message:t})=>{return e(M,{href:"https://www.google.com/maps/?q="+t.content,target:"_blank",rel:"noopener noreferrer",className:"bc-locationMessage",isAgent:t.isAgent,children:n(k,{children:[e(L,{color:(i=t,i.isAgent,"000000")}),e(y,{color:f(t),children:"Open location"})]})});var i},text:({message:n})=>{const t=d(n.content);return e("div",{style:{backgroundImage:u(n),color:f(n),borderColor:C(n),borderWidth:"1px",borderStyle:"solid",direction:"arb"===t?"rtl":"ltr"},children:(n.content&&n.content.indexOf("\n")>-1?n.content.split("\n"):[n.content]).map(((t,i)=>e(l,{children:t},`${n.messageId}-${i}`)))})},video:w,audio:w,interactive:null,template:({message:t})=>{const a=i((()=>{try{return JSON.parse(t.content)}catch(e){return void console.log(e.message)}}),[t]);return n("div",{style:{backgroundImage:u(t),color:f(t),borderColor:C(t),borderWidth:"1px",borderStyle:"solid"},children:[e("b",{children:"Template message:"})," ",a.name," ",a.language?.code?`/ ${a.language.code}`:null]})},note:({message:n})=>e("div",{children:n.content})},S=s.div`
56
+ `,S={document:({message:t})=>{let i=t.content.split("/"),a=i[i.length-1];return e(A,{className:"bc-fileMessage",...t,children:n(k,{href:t.content,target:"_blank",download:a,rel:"noopener noreferrer",...t,children:[e(I,{color:(o=t,o.isAgent,"000000")}),e("span",{children:a})]})});var o},image:({message:n})=>e("div",{className:"bc-mediaMessage",style:{backgroundImage:C(n),color:w(n),borderColor:f(n),borderWidth:"1px",borderStyle:"solid",padding:0},children:e("a",{href:n.content,target:"_blank",rel:"noreferrer",children:e("img",{src:n.content,alt:"message content"})})}),location:({message:t})=>{return e(y,{href:"https://www.google.com/maps/?q="+t.content,target:"_blank",rel:"noopener noreferrer",className:"bc-locationMessage",isAgent:t.isAgent,children:n(L,{children:[e(E,{color:(i=t,i.isAgent,"000000")}),e(M,{color:w(t),children:"Open location"})]})});var i},text:({message:n})=>{const t=g(n.content);return e("div",{style:{backgroundImage:C(n),color:w(n),borderColor:f(n),borderWidth:"1px",borderStyle:"solid",direction:"arb"===t?"rtl":"ltr"},children:(n.content&&n.content.indexOf("\n")>-1?n.content.split("\n"):[n.content]).map(((t,i)=>e(d,{children:t},`${n.messageId}-${i}`)))})},video:v,audio:v,interactive:null,template:({message:t})=>{const i=a((()=>{try{return JSON.parse(t.content)}catch(e){return void console.log(e.message)}}),[t]);return n("div",{style:{backgroundImage:C(t),color:w(t),borderColor:f(t),borderWidth:"1px",borderStyle:"solid"},children:[e("b",{children:"Template message:"})," ",i.name," ",i.language?.code?`/ ${i.language.code}`:null]})},note:({message:n})=>e("div",{children:n.content})},z=l.div`
57
57
  display: flex;
58
58
  flex-direction: column;
59
59
  gap: 5px;
@@ -62,8 +62,8 @@ import{jsx as e,jsxs as n}from"react/jsx-runtime";import t,{useMemo as i,useEffe
62
62
  margin: ${e=>e.isAgent?"0 40px 0 20px":"0 20px 0 40px"};
63
63
  text-align: ${e=>e.isAgent?"left":"right"};
64
64
  }
65
- `;function z({message:t}){const{debug:i,conversationId:a,traceId:o,spanId:r,isAgent:c}=t;return i?e(S,{isAgent:c,className:"bc-debugCon",children:n("div",{children:[n("div",{className:"bc-response-debug",children:["Trace id: ",e("span",{children:o})]}),n("div",{className:"bc-response-debug",children:["Span id: ",e("span",{children:r})]}),n("div",{className:"bc-response-debug",children:["Conversation id: ",e("span",{children:a})]})]})}):null}const D=()=>n("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("path",{d:"M1.5 12.5L5.57574 16.5757C5.81005 16.8101 6.18995 16.8101 6.42426 16.5757L9 14",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),e("path",{d:"M16 7L12 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),e("path",{d:"M7 12L11.5757 16.5757C11.8101 16.8101 12.1899 16.8101 12.4243 16.5757L22 7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),B={delivered:D,failed:()=>e("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M8.4449 0.608765C8.0183 -0.107015 6.9817 -0.107015 6.55509 0.608766L0.161178 11.3368C-0.275824 12.07 0.252503 13 1.10608 13H13.8939C14.7475 13 15.2758 12.07 14.8388 11.3368L8.4449 0.608765ZM7.4141 1.12073C7.45288 1.05566 7.54712 1.05566 7.5859 1.12073L13.9798 11.8488C14.0196 11.9154 13.9715 12 13.8939 12H1.10608C1.02849 12 0.980454 11.9154 1.02018 11.8488L7.4141 1.12073ZM6.8269 4.48611C6.81221 4.10423 7.11783 3.78663 7.5 3.78663C7.88217 3.78663 8.18778 4.10423 8.1731 4.48612L8.01921 8.48701C8.00848 8.766 7.7792 8.98664 7.5 8.98664C7.2208 8.98664 6.99151 8.766 6.98078 8.48701L6.8269 4.48611ZM8.24989 10.476C8.24989 10.8902 7.9141 11.226 7.49989 11.226C7.08567 11.226 6.74989 10.8902 6.74989 10.476C6.74989 10.0618 7.08567 9.72599 7.49989 9.72599C7.9141 9.72599 8.24989 10.0618 8.24989 10.476Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}),read:D,sent:()=>e("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M5 13L9 17L19 7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),pending:()=>e("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M7.50009 0.877014C3.84241 0.877014 0.877258 3.84216 0.877258 7.49984C0.877258 11.1575 3.8424 14.1227 7.50009 14.1227C11.1578 14.1227 14.1229 11.1575 14.1229 7.49984C14.1229 3.84216 11.1577 0.877014 7.50009 0.877014ZM1.82726 7.49984C1.82726 4.36683 4.36708 1.82701 7.50009 1.82701C10.6331 1.82701 13.1729 4.36683 13.1729 7.49984C13.1729 10.6328 10.6331 13.1727 7.50009 13.1727C4.36708 13.1727 1.82726 10.6328 1.82726 7.49984ZM8 4.50001C8 4.22387 7.77614 4.00001 7.5 4.00001C7.22386 4.00001 7 4.22387 7 4.50001V7.50001C7 7.63262 7.05268 7.7598 7.14645 7.85357L9.14645 9.85357C9.34171 10.0488 9.65829 10.0488 9.85355 9.85357C10.0488 9.65831 10.0488 9.34172 9.85355 9.14646L8 7.29291V4.50001Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})},F=({message:n})=>{if(!n.status)return null;const t=B[n.status];return e("div",{className:`status-icon ${n.status||""}`,children:e(t,{})})};function N(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))}}N(".bc-agentMessage,\n.bc-clientMessage {\n margin: 10px 15px;\n font-size: var(--bc-chat-fontSize-sm); }\n .bc-agentMessage div p,\n .bc-clientMessage div p {\n padding: 0;\n margin: 0; }\n\n.bc-note {\n text-align: center;\n gap: 5px; }\n .bc-note > div {\n background-color: #f9f9f9 !important;\n /* Light background */\n display: inline-block;\n padding: 8px;\n border-radius: 5px;\n overflow: hidden;\n word-break: break-word;\n text-decoration: none;\n background-color: transparent;\n border: 1px solid #999;\n max-width: 60%; }\n\n.status-icon.read {\n color: var(--bc-chat-success-color); }\n\n.status-icon.failed {\n color: var(--bc-chat-danger-color); }\n .status-icon.failed .resend {\n color: var(--bc-chat-dark-gray-color);\n cursor: pointer;\n margin: 0 10px; }\n\n.bc-agentMessage > div:not(.bc-debugCon),\n.bc-clientMessage > div:not(.bc-debugCon) {\n display: inline-block;\n padding: 8px;\n border-radius: 5px;\n overflow: hidden;\n word-break: break-word;\n text-decoration: none;\n background-color: transparent; }\n\n.bc-agentMessage .bc-fileMessage,\n.bc-clientMessage .bc-fileMessage {\n display: inline-block;\n padding: 8px 20px;\n border-radius: 5px;\n overflow: hidden;\n word-break: break-word;\n text-decoration: none;\n background-color: transparent;\n cursor: pointer; }\n .bc-agentMessage .bc-fileMessage img,\n .bc-clientMessage .bc-fileMessage img {\n vertical-align: middle;\n margin-right: 10px;\n width: 15px;\n height: 16px; }\n\n.bc-agentMessage .bc-locationMessage,\n.bc-clientMessage .bc-locationMessage {\n display: inline-block;\n padding: 8px 20px;\n border-radius: 5px;\n overflow: hidden;\n word-break: break-word;\n text-decoration: none;\n background-color: transparent;\n cursor: pointer; }\n .bc-agentMessage .bc-locationMessage img,\n .bc-clientMessage .bc-locationMessage img {\n vertical-align: middle;\n margin-right: 10px;\n width: 30px; }\n\n.bc-agentMessage {\n text-align: left;\n display: flex;\n align-items: flex-end;\n flex-wrap: wrap;\n gap: 5px; }\n .bc-agentMessage .bc-fileMessage,\n .bc-agentMessage .bc-locationMessage {\n color: var(--bc-chat-dark-gray-color);\n cursor: pointer; }\n .bc-agentMessage .bc-fileMessage img,\n .bc-agentMessage .bc-locationMessage img {\n vertical-align: middle;\n margin-right: 10px;\n width: 30px; }\n .bc-agentMessage > div:not(.bc-debugCon),\n .bc-agentMessage .bc-fileMessage,\n .bc-agentMessage .bc-locationMessage,\n .bc-agentMessage audio {\n border-bottom-left-radius: 0; }\n\n.bc-agentMessage:first-child {\n flex: 1 0 50%; }\n\n.bc-agentMessage > :nth-child(2) {\n flex: 0 1 auto;\n max-width: 85%; }\n\n.bc-clientMessage {\n padding-left: 20px;\n text-align: right; }\n .bc-clientMessage > div:not(.bc-debugCon),\n .bc-clientMessage .bc-fileMessage,\n .bc-clientMessage .bc-locationMessage,\n .bc-clientMessage audio {\n color: #fff;\n border-bottom-right-radius: 0; }\n .bc-clientMessage svg path:nth-child(2) {\n fill: #fff; }\n\n.bc-mediaMessage video,\n.bc-mediaMessage img {\n width: 300px;\n margin-bottom: -5px; }\n\n.bc-mediaMessage.audio video {\n height: 40px; }\n\n.bc-response-debug {\n background-color: transparent;\n color: #f5a623;\n padding: 0; }\n .bc-response-debug span {\n text-decoration: underline; }\n\n.bc-selectionContainer {\n display: flex;\n align-items: flex-start;\n flex-wrap: wrap; }\n\n.bc-selectionContainer:first-child {\n flex: 1 0 50%; }\n\n.bc-debug-panel {\n border-radius: 10px;\n box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.15);\n border: solid 1px #ffffff;\n background-color: #ffffff;\n color: var(--bc-chat-dark-gray-color);\n display: table;\n width: calc(100% - 40px);\n margin: 10px -40px 10px 0;\n text-align: left;\n padding: 8px;\n max-width: 310px; }\n\n.bc-exception-debug {\n color: #f5a623;\n position: relative; }\n .bc-exception-debug .bc-exception-icon {\n width: 30px;\n position: absolute;\n top: 3px;\n left: 10px; }\n .bc-exception-debug span {\n margin-left: 40px; }\n\n.bc-parameters-debug span {\n text-decoration: underline; }\n\n.bc-parameters-debug .bc-parameters-title {\n width: 100%;\n border-bottom: solid 1px #f3f3f3;\n text-align: left;\n font-weight: bold;\n margin-bottom: 6px; }\n\n.bc-debugCon {\n width: 100%; }\n");const Z=s.i`
66
- background-image: url(${e=>e.brandLogo||m});
65
+ `;function D({message:t}){const{debug:i,conversationId:a,traceId:o,spanId:r,isAgent:c}=t;return i?e(z,{isAgent:c,className:"bc-debugCon",children:n("div",{children:[n("div",{className:"bc-response-debug",children:["Trace id: ",e("span",{children:o})]}),n("div",{className:"bc-response-debug",children:["Span id: ",e("span",{children:r})]}),n("div",{className:"bc-response-debug",children:["Conversation id: ",e("span",{children:a})]})]})}):null}const B=()=>n("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("path",{d:"M1.5 12.5L5.57574 16.5757C5.81005 16.8101 6.18995 16.8101 6.42426 16.5757L9 14",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),e("path",{d:"M16 7L12 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),e("path",{d:"M7 12L11.5757 16.5757C11.8101 16.8101 12.1899 16.8101 12.4243 16.5757L22 7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),N={delivered:B,failed:()=>e("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M8.4449 0.608765C8.0183 -0.107015 6.9817 -0.107015 6.55509 0.608766L0.161178 11.3368C-0.275824 12.07 0.252503 13 1.10608 13H13.8939C14.7475 13 15.2758 12.07 14.8388 11.3368L8.4449 0.608765ZM7.4141 1.12073C7.45288 1.05566 7.54712 1.05566 7.5859 1.12073L13.9798 11.8488C14.0196 11.9154 13.9715 12 13.8939 12H1.10608C1.02849 12 0.980454 11.9154 1.02018 11.8488L7.4141 1.12073ZM6.8269 4.48611C6.81221 4.10423 7.11783 3.78663 7.5 3.78663C7.88217 3.78663 8.18778 4.10423 8.1731 4.48612L8.01921 8.48701C8.00848 8.766 7.7792 8.98664 7.5 8.98664C7.2208 8.98664 6.99151 8.766 6.98078 8.48701L6.8269 4.48611ZM8.24989 10.476C8.24989 10.8902 7.9141 11.226 7.49989 11.226C7.08567 11.226 6.74989 10.8902 6.74989 10.476C6.74989 10.0618 7.08567 9.72599 7.49989 9.72599C7.9141 9.72599 8.24989 10.0618 8.24989 10.476Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}),read:B,sent:()=>e("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M5 13L9 17L19 7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),pending:()=>e("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M7.50009 0.877014C3.84241 0.877014 0.877258 3.84216 0.877258 7.49984C0.877258 11.1575 3.8424 14.1227 7.50009 14.1227C11.1578 14.1227 14.1229 11.1575 14.1229 7.49984C14.1229 3.84216 11.1577 0.877014 7.50009 0.877014ZM1.82726 7.49984C1.82726 4.36683 4.36708 1.82701 7.50009 1.82701C10.6331 1.82701 13.1729 4.36683 13.1729 7.49984C13.1729 10.6328 10.6331 13.1727 7.50009 13.1727C4.36708 13.1727 1.82726 10.6328 1.82726 7.49984ZM8 4.50001C8 4.22387 7.77614 4.00001 7.5 4.00001C7.22386 4.00001 7 4.22387 7 4.50001V7.50001C7 7.63262 7.05268 7.7598 7.14645 7.85357L9.14645 9.85357C9.34171 10.0488 9.65829 10.0488 9.85355 9.85357C10.0488 9.65831 10.0488 9.34172 9.85355 9.14646L8 7.29291V4.50001Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})},F=({message:n})=>{if(!n.status)return null;const t=N[n.status];return e("div",{className:`status-icon ${n.status||""}`,children:e(t,{})})};function Z(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))}}Z(".bc-agentMessage,\n.bc-clientMessage {\n margin: 10px 15px;\n font-size: var(--bc-chat-fontSize-sm); }\n .bc-agentMessage div p,\n .bc-clientMessage div p {\n padding: 0;\n margin: 0; }\n\n.bc-note {\n text-align: center;\n gap: 5px; }\n .bc-note > div {\n background-color: #f9f9f9 !important;\n /* Light background */\n display: inline-block;\n padding: 8px;\n border-radius: 5px;\n overflow: hidden;\n word-break: break-word;\n text-decoration: none;\n background-color: transparent;\n border: 1px solid #999;\n max-width: 60%; }\n\n.status-icon.read {\n color: var(--bc-chat-success-color); }\n\n.status-icon.failed {\n color: var(--bc-chat-danger-color); }\n .status-icon.failed .resend {\n color: var(--bc-chat-dark-gray-color);\n cursor: pointer;\n margin: 0 10px; }\n\n.bc-agentMessage > div:not(.bc-debugCon),\n.bc-clientMessage > div:not(.bc-debugCon) {\n display: inline-block;\n padding: 8px;\n border-radius: 5px;\n overflow: hidden;\n word-break: break-word;\n text-decoration: none;\n background-color: transparent; }\n\n.bc-agentMessage .bc-fileMessage,\n.bc-clientMessage .bc-fileMessage {\n display: inline-block;\n padding: 8px 20px;\n border-radius: 5px;\n overflow: hidden;\n word-break: break-word;\n text-decoration: none;\n background-color: transparent;\n cursor: pointer; }\n .bc-agentMessage .bc-fileMessage img,\n .bc-clientMessage .bc-fileMessage img {\n vertical-align: middle;\n margin-right: 10px;\n width: 15px;\n height: 16px; }\n\n.bc-agentMessage .bc-locationMessage,\n.bc-clientMessage .bc-locationMessage {\n display: inline-block;\n padding: 8px 20px;\n border-radius: 5px;\n overflow: hidden;\n word-break: break-word;\n text-decoration: none;\n background-color: transparent;\n cursor: pointer; }\n .bc-agentMessage .bc-locationMessage img,\n .bc-clientMessage .bc-locationMessage img {\n vertical-align: middle;\n margin-right: 10px;\n width: 30px; }\n\n.bc-agentMessage {\n text-align: left;\n display: flex;\n align-items: flex-end;\n flex-wrap: wrap;\n gap: 5px; }\n .bc-agentMessage .bc-fileMessage,\n .bc-agentMessage .bc-locationMessage {\n color: var(--bc-chat-dark-gray-color);\n cursor: pointer; }\n .bc-agentMessage .bc-fileMessage img,\n .bc-agentMessage .bc-locationMessage img {\n vertical-align: middle;\n margin-right: 10px;\n width: 30px; }\n .bc-agentMessage > div:not(.bc-debugCon),\n .bc-agentMessage .bc-fileMessage,\n .bc-agentMessage .bc-locationMessage,\n .bc-agentMessage audio {\n border-bottom-left-radius: 0; }\n\n.bc-agentMessage:first-child {\n flex: 1 0 50%; }\n\n.bc-agentMessage > :nth-child(2) {\n flex: 0 1 auto;\n max-width: 85%; }\n\n.bc-clientMessage {\n padding-left: 20px;\n text-align: right; }\n .bc-clientMessage > div:not(.bc-debugCon),\n .bc-clientMessage .bc-fileMessage,\n .bc-clientMessage .bc-locationMessage,\n .bc-clientMessage audio {\n color: #fff;\n border-bottom-right-radius: 0; }\n .bc-clientMessage svg path:nth-child(2) {\n fill: #fff; }\n\n.bc-mediaMessage video,\n.bc-mediaMessage img {\n width: 300px;\n margin-bottom: -5px; }\n\n.bc-mediaMessage.audio video {\n height: 40px; }\n\n.bc-response-debug {\n background-color: transparent;\n color: #f5a623;\n padding: 0; }\n .bc-response-debug span {\n text-decoration: underline; }\n\n.bc-selectionContainer {\n display: flex;\n align-items: flex-start;\n flex-wrap: wrap; }\n\n.bc-selectionContainer:first-child {\n flex: 1 0 50%; }\n\n.bc-debug-panel {\n border-radius: 10px;\n box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.15);\n border: solid 1px #ffffff;\n background-color: #ffffff;\n color: var(--bc-chat-dark-gray-color);\n display: table;\n width: calc(100% - 40px);\n margin: 10px -40px 10px 0;\n text-align: left;\n padding: 8px;\n max-width: 310px; }\n\n.bc-exception-debug {\n color: #f5a623;\n position: relative; }\n .bc-exception-debug .bc-exception-icon {\n width: 30px;\n position: absolute;\n top: 3px;\n left: 10px; }\n .bc-exception-debug span {\n margin-left: 40px; }\n\n.bc-parameters-debug span {\n text-decoration: underline; }\n\n.bc-parameters-debug .bc-parameters-title {\n width: 100%;\n border-bottom: solid 1px #f3f3f3;\n text-align: left;\n font-weight: bold;\n margin-bottom: 6px; }\n\n.bc-debugCon {\n width: 100%; }\n");const R=l.i`
66
+ background-image: url(${e=>e.brandLogo||u});
67
67
  width: 30px;
68
68
  height: 30px;
69
69
  background-position: center;
@@ -72,7 +72,7 @@ import{jsx as e,jsxs as n}from"react/jsx-runtime";import t,{useMemo as i,useEffe
72
72
  border-radius: 50%;
73
73
  background-repeat: no-repeat;
74
74
 
75
- `;function R(e,n){return"note"===e?"bc-note":n?"bc-agentMessage":"bc-clientMessage"}const G=t=>{const{type:i,isAgent:a}=t.message,o=E[i]??null;return o?n("div",{className:R(i,a),children:[a&&"note"!==i?e(Z,{brandLogo:t.config?.brandLogo}):null,e(o,{message:t.message}),a&&"note"!==i?e(F,{message:t.message}):null,e(z,{message:t.message})]}):null},j=s.div`
75
+ `;function G(e,n){return"note"===e?"bc-note":n?"bc-agentMessage":"bc-clientMessage"}const j=t=>{const{type:i,isAgent:a}=t.message,o=S[i]??null;return o?n("div",{className:G(i,a),children:[a&&"note"!==i?e(R,{brandLogo:t.config?.brandLogo}):null,e(o,{message:t.message}),a&&"note"!==i?e(F,{message:t.message}):null,e(D,{message:t.message})]}):null},J=l.div`
76
76
  width: 100%;
77
77
  display: flex;
78
78
  align-items: center;
@@ -85,7 +85,22 @@ import{jsx as e,jsxs as n}from"react/jsx-runtime";import t,{useMemo as i,useEffe
85
85
  align-items: center;
86
86
  ${e=>e.centered?"":e.isAgent?"margin-left: 34px;":"margin-right: 8px;"}
87
87
  }
88
- `,J=({message:n})=>e("div",{children:e(j,{isAgent:n.isAgent,centered:"note"===n.type,children:e("div",{className:"date-seperator-content",children:new Date(n.createdAt).toLocaleString("en-US")})})}),K="bc-message-list-content",P=s.div`
88
+ `,K=({message:n})=>e("div",{children:e(J,{isAgent:n.isAgent,centered:"note"===n.type,children:e("div",{className:"date-seperator-content",children:new Date(n.createdAt).toLocaleString("en-US")})})}),P=l.div`
89
+ width: 90%;
90
+ display: flex;
91
+ align-items: center;
92
+ justify-content: center;
93
+ border-bottom: solid 1px #ddd;
94
+ margin: 30px auto 40px;
95
+ .seperator-content {
96
+ ${e=>`background-color: ${e.backgroundColor};`}
97
+ display: flex;
98
+ justify-content: center;
99
+ align-items: center;
100
+ margin-bottom: -10px;
101
+ padding:0 16px;
102
+ }
103
+ `,Q=({data:n,config:t})=>e("div",{children:e(P,{backgroundColor:t.backgroundColor,children:e("div",{className:"seperator-content",children:n.content})})}),H="bc-message-list-content",W=l.div`
89
104
  height: 100%;
90
105
  width: 100%;
91
106
  overflow-y: auto;
@@ -93,22 +108,22 @@ import{jsx as e,jsxs as n}from"react/jsx-runtime";import t,{useMemo as i,useEffe
93
108
  background-size: 100% 100%;
94
109
  background-image: ${e=>`url(${e.config.backgroundImage})`};
95
110
  ${e=>e.config.backgroundColor&&`background-color: ${e.config.backgroundColor};`}
96
- `,Q=({sendMessage:t,debug:i,config:o,messages:r})=>(a((()=>{const e=document.getElementById(K);if(!e)return;const n=e.scrollHeight;e.style.scrollBehavior="smooth",e.style.overscrollBehavior="contain",e.scroll(0,n)}),[r]),e(P,{id:K,config:o,children:r?.map(((a,c)=>n("div",{children:[e(G,{message:a,index:c,sendMessage:t,messageActionsEnabled:r.length-1===c,debug:i,config:o}),e(J,{message:a})]},a.messageId?a.messageId:"message"+c)))},K)),H="text";var W={EN:{share_my_location:"Share My Location",share_my_current_location:"Share My Current Location",placeholder:"Type a Message",see_your_location:"See Your Location",location_permission:"Please give location permission"},TR:{share_my_location:"Konumumu paylaş",share_my_current_location:"GÃŧncel konumumu paylaş",placeholder:"MesajÄąnÄązÄą yazÄąn",see_your_location:"Konumunuzu GÃļrÃŧntÃŧleyin",location_permission:"LÃŧtfen konum paylaÅŸÄąmÄą için izin verin"},DE:{share_my_location:"Standortfreigabe",share_my_current_location:"Meinen aktuellen Standort teilen",placeholder:"Geben Sie eine Nachricht ein",see_your_location:"Sehen Sie Ihren Standort",location_permission:"Bitte geben Sie Ihren Standort frei"}};const Y=s.span`
111
+ `,U=({sendMessage:t,debug:i,config:a,messages:r,onReachingUp:c})=>(o((()=>{const e=document.getElementById(H);if(!e)return;const n=e.scrollHeight;e.style.scrollBehavior="smooth",e.style.overscrollBehavior="contain",e.scroll(0,n);const t=()=>{0===e.scrollTop&&c?.()};return e.addEventListener("scroll",t),()=>{e.removeEventListener("scroll",t)}}),[r,c]),e(W,{id:H,config:a,children:r?.map(((o,c)=>"seperator"===o.type?e(Q,{data:o,config:a}):n("div",{children:[e(j,{message:o,index:c,sendMessage:t,messageActionsEnabled:r.length-1===c,debug:i,config:a}),e(K,{message:o})]},o.messageId?o.messageId:"message"+c)))},H)),Y="text";var T={EN:{share_my_location:"Share My Location",share_my_current_location:"Share My Current Location",placeholder:"Type a Message",see_your_location:"See Your Location",location_permission:"Please give location permission"},TR:{share_my_location:"Konumumu paylaş",share_my_current_location:"GÃŧncel konumumu paylaş",placeholder:"MesajÄąnÄązÄą yazÄąn",see_your_location:"Konumunuzu GÃļrÃŧntÃŧleyin",location_permission:"LÃŧtfen konum paylaÅŸÄąmÄą için izin verin"},DE:{share_my_location:"Standortfreigabe",share_my_current_location:"Meinen aktuellen Standort teilen",placeholder:"Geben Sie eine Nachricht ein",see_your_location:"Sehen Sie Ihren Standort",location_permission:"Bitte geben Sie Ihren Standort frei"}};const V=l.span`
97
112
  cursor: pointer;
98
113
  width: 20px;
99
114
  height: 20px;
100
115
  margin: 5px;
101
- `,U=()=>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:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}),T=()=>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"})}),V=({file:t,isFileSelected:i,cancelFileUpload:a})=>n("div",{className:"bc-uploadFileDetails",style:{border:i?"green dashed 1px":""},id:"uploadFileDetails",children:[e("div",{className:"bc-uploadedFile",children:b.SupportedImageFormats.indexOf(t.extension)>=0?e("img",{src:t.fileUrl,alt:"",className:"bc-imageFile"}):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/NRD8fqFGq0VJCydXYrBFJMEhj0y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GvlZUEn5uAfsp3zUA/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:a,children:e(T,{})})})]}),O=({text:n,setText:t,config:i,send:c})=>{const s=o(null),l=r((()=>{const e=s.current;e.style.height="20px";const n=e.scrollHeight;n!==e.offsetHeight&&(e.style.height=n+"px")}),[]);return a((()=>{n||(l(),s.current.focus())}),[l,n]),e("textarea",{ref:s,value:n,className:"bc-messageInputTextArea",id:"textInput",placeholder:i.inputPlaceholder||W[i.language]?.placeholder,maxLength:1024,onKeyDown:e=>{if("Enter"===e.key&&(e.shiftKey||e.ctrlKey||e.altKey)){e.preventDefault();const i=s.current.selectionStart,a=n.slice(0,i)+"\n"+n.slice(i);return t(a),void l()}"Enter"===e.key&&(e.preventDefault(),c(),l())},onChange:e=>{t(e.target.value),l()}})},q=({config:t,send:i,file:a,isFileSelected:o,text:r,setText:c,cancelFileUpload:s})=>n("div",{className:"bc-messageInput",children:[a?e(V,{file:a,isFileSelected:o,cancelFileUpload:s}):e(O,{text:r,setText:c,config:t,send:i}),e(Y,{onClick:()=>i(),children:r||a?e(U,{}):null})]});async function X(e,n,t){const i=new p("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 h).getContainerClient("anonymous"),a=new Date,o=`${a.getFullYear()}-${String(a.getMonth()+1).padStart(2,"0")}`,r=i.getBlockBlobClient(`${o}/${g()}`);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 $=(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`,_=s.i`
102
- ${e=>$("url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' x='0px' y='0px' width='50' height='50' viewBox='0 0 48 48'%3E%3Cpath d='M 19.5 3 C 17.585045 3 16 4.5850452 16 6.5 L 16 23.253906 A 1.50015 1.50015 0 0 0 16 23.740234 L 16 32.5 C 16 34.414955 17.585045 36 19.5 36 L 30.5 36 C 32.414955 36 34 34.414955 34 32.5 L 34 23.746094 A 1.50015 1.50015 0 0 0 34 23.259766 L 34 6.5 C 34 4.5850452 32.414955 3 30.5 3 L 19.5 3 z M 19.5 6 L 30.5 6 C 30.795045 6 31 6.2049548 31 6.5 L 31 22 L 19 22 L 19 6.5 C 19 6.2049548 19.204955 6 19.5 6 z M 11.476562 21.978516 A 1.50015 1.50015 0 0 0 10 23.5 L 10 32.5 C 10 37.728774 14.271226 42 19.5 42 L 23.5 42 L 23.5 46 A 1.50015 1.50015 0 1 0 26.5 46 L 26.5 42 L 30.5 42 C 35.728774 42 40 37.728774 40 32.5 L 40 23.5 A 1.50015 1.50015 0 1 0 37 23.5 L 37 32.5 C 37 36.107226 34.107226 39 30.5 39 L 19.5 39 C 15.892774 39 13 36.107226 13 32.5 L 13 23.5 A 1.50015 1.50015 0 0 0 11.476562 21.978516 z M 19 25 L 31 25 L 31 32.5 C 31 32.795045 30.795045 33 30.5 33 L 19.5 33 C 19.204955 33 19 32.795045 19 32.5 L 19 25 z M 25 27 A 2 2 0 0 0 25 31 A 2 2 0 0 0 25 27 z' fill='%23a3a3a3'%3E%3C/path%3E%3C/svg%3E%0A\");",e)}
103
- `,ee=()=>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"})});let ne;const te=({setProgress:t,setFile:i,setError:o,send:s})=>{const[l,d]=c(!1);a((()=>{const e=document.createElement("script");return e.src="https://cdn.bcrumbs.net/bc-assets/scripts/mic-recorder-to-mp3.js",e.async=!0,e.onload=()=>console.log("Script Loaded"),document.body.appendChild(e),()=>{document.body.removeChild(e)}}),[]);const g=r((()=>{if(!ne){if("function"!=typeof MicRecorder)return void o("Please wait a little until voice library is loaded");ne=new MicRecorder({bitRate:128})}o(void 0),l?ne.stop().getMp3().then((([e,n])=>{d(!1);X(new File([n],"recording.mp3",{type:"audio/mpeg"}),t,((e,n)=>{e?s({fileUrl:e,fileName:"recording",extension:"mp3"}):n&&o(n)}))})).catch((e=>o(e.message))):navigator.mediaDevices.getUserMedia({audio:!0}).then((()=>{ne.start().then((()=>{d(!0)})).catch((e=>o(e.message)))})).catch((e=>o(e.message)))}),[l,o,t,s]);return n("div",{id:"voiceRecorderIcon",className:"mic-container",children:[l?e("i",{onClick:g,children:e(ee,{})}):e(_,{onClick:g,activeColor:"var(--bc-chat-dark-gray-color)"}),e("div",{className:"circle "+(l?"active":"")})]})};const ie=s.i`
104
- ${e=>$("url(\"data:image/svg+xml,%3Csvg id='Component_25_5' data-name='Component 25 – 5' xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 15.999 16'%3E%3Cpath id='Path_805' data-name='Path 805' d='M8,16a8,8,0,1,1,8-8,8.009,8.009,0,0,1-8,8M8,1.211A6.789,6.789,0,1,0,14.788,8,6.8,6.8,0,0,0,8,1.211' fill='%23a3a3a3'/%3E%3Cpath id='Path_806' data-name='Path 806' d='M10.908,19.478a4.716,4.716,0,0,1-3.359-1.392.605.605,0,0,1,.856-.856,3.537,3.537,0,0,0,5,0,.605.605,0,1,1,.856.856,4.716,4.716,0,0,1-3.359,1.392' transform='translate(-2.908 -6.728)' fill='%23a3a3a3'/%3E%3Cpath id='Path_807' data-name='Path 807' d='M7.306,10.925A1.635,1.635,0,1,1,8.942,9.289a1.638,1.638,0,0,1-1.635,1.635m0-2.06a.424.424,0,1,0,.424.424.425.425,0,0,0-.424-.424' transform='translate(-2.237 -3.02)' fill='%23a3a3a3'/%3E%3Cpath id='Path_808' data-name='Path 808' d='M16.986,10.925a1.635,1.635,0,1,1,1.635-1.635,1.638,1.638,0,0,1-1.635,1.635m0-2.06a.424.424,0,1,0,.424.424.425.425,0,0,0-.424-.424' transform='translate(-6.056 -3.02)' fill='%23a3a3a3'/%3E%3C/svg%3E%0A\");",e)}
105
- `,ae=s.span`
116
+ `,O=()=>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:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}),q=()=>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"})}),X=({file:t,isFileSelected:i,cancelFileUpload:a})=>n("div",{className:"bc-uploadFileDetails",style:{border:i?"green dashed 1px":""},id:"uploadFileDetails",children:[e("div",{className:"bc-uploadedFile",children:m.SupportedImageFormats.indexOf(t.extension)>=0?e("img",{src:t.fileUrl,alt:"",className:"bc-imageFile"}):e("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAAPq0lEQVR4nO2caXQUVRbHc2bmw8wXP82MJiyByKiDEHCYccN9QXFFEURxZlRcZkBRXHAXN0TZ3FAIKqABEQggSxKWRBwdBR0cUMCQQEhn6e5s3Z1OSIcl/e6c11WVfvXqvlevqjvCHOqe8zt+qeqU95f/va9aMCPDK6+88sorr7zy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m3yuQzBBMjGXYUKmIMtcdtR1kw4Xo2oHL4NPh4oMNhXMaLKIQAR8e44LMDkyMZeKhLBfsVvTYb/MXZysXKfjapcy2FQIRJiaezbCXziwa+zksGIusRHiaJk7eSu3ScfOVGRcIZDBjShTKkQiZM3/swCZJP1zTWKSiYljCenc97xgXImWueyom0o6RjD/cUkmgxPiSoZIBNf8bQZDbNCvswjCxCTTcuRbZIe0bBtDZOPK/BW7u6Nut6Vju6oMdkTZiLAI+JMinCCTHEYMk5bm4nOt/89Ff0Fm6Eg5drpClnmZyjJPIR07nO4Nm52BjSiTDJEIVQl2cjAx2s8/tPUSKF/Qt9kiJLiyx9zaFVnQ8eMEbY+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("div",{className:"bc-uploadFileName",children:e("span",{children:t.fileName})}),e("div",{className:"bc-uploadFileCancel",children:e("span",{onClick:a,children:e(q,{})})})]}),$=({text:n,setText:t,config:i,send:a})=>{const s=r(null),l=c((()=>{const e=s.current;e.style.height="20px";const n=e.scrollHeight;n!==e.offsetHeight&&(e.style.height=n+"px")}),[]);return o((()=>{n||(l(),s.current.focus())}),[l,n]),e("textarea",{ref:s,value:n,className:"bc-messageInputTextArea",id:"textInput",placeholder:i.inputPlaceholder||T[i.language]?.placeholder,maxLength:1024,onKeyDown:e=>{if("Enter"===e.key&&(e.shiftKey||e.ctrlKey||e.altKey)){e.preventDefault();const i=s.current.selectionStart,a=n.slice(0,i)+"\n"+n.slice(i);return t(a),void l()}"Enter"===e.key&&(e.preventDefault(),a(),l())},onChange:e=>{t(e.target.value),l()}})},_=({config:t,send:i,file:a,isFileSelected:o,text:r,setText:c,cancelFileUpload:s})=>n("div",{className:"bc-messageInput",children:[a?e(X,{file:a,isFileSelected:o,cancelFileUpload:s}):e($,{text:r,setText:c,config:t,send:i}),e(V,{onClick:()=>i(),children:r||a?e(O,{}):null})]});async function ee(e,n,t){const i=new h("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"),a=new Date,o=`${a.getFullYear()}-${String(a.getMonth()+1).padStart(2,"0")}`,r=i.getBlockBlobClient(`${o}/${p()}`);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 ne=(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`,te=l.i`
117
+ ${e=>ne("url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' x='0px' y='0px' width='50' height='50' viewBox='0 0 48 48'%3E%3Cpath d='M 19.5 3 C 17.585045 3 16 4.5850452 16 6.5 L 16 23.253906 A 1.50015 1.50015 0 0 0 16 23.740234 L 16 32.5 C 16 34.414955 17.585045 36 19.5 36 L 30.5 36 C 32.414955 36 34 34.414955 34 32.5 L 34 23.746094 A 1.50015 1.50015 0 0 0 34 23.259766 L 34 6.5 C 34 4.5850452 32.414955 3 30.5 3 L 19.5 3 z M 19.5 6 L 30.5 6 C 30.795045 6 31 6.2049548 31 6.5 L 31 22 L 19 22 L 19 6.5 C 19 6.2049548 19.204955 6 19.5 6 z M 11.476562 21.978516 A 1.50015 1.50015 0 0 0 10 23.5 L 10 32.5 C 10 37.728774 14.271226 42 19.5 42 L 23.5 42 L 23.5 46 A 1.50015 1.50015 0 1 0 26.5 46 L 26.5 42 L 30.5 42 C 35.728774 42 40 37.728774 40 32.5 L 40 23.5 A 1.50015 1.50015 0 1 0 37 23.5 L 37 32.5 C 37 36.107226 34.107226 39 30.5 39 L 19.5 39 C 15.892774 39 13 36.107226 13 32.5 L 13 23.5 A 1.50015 1.50015 0 0 0 11.476562 21.978516 z M 19 25 L 31 25 L 31 32.5 C 31 32.795045 30.795045 33 30.5 33 L 19.5 33 C 19.204955 33 19 32.795045 19 32.5 L 19 25 z M 25 27 A 2 2 0 0 0 25 31 A 2 2 0 0 0 25 27 z' fill='%23a3a3a3'%3E%3C/path%3E%3C/svg%3E%0A\");",e)}
118
+ `,ie=()=>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"})}),ae=()=>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"})});let oe;const re=({setProgress:i,setFile:a,setError:r,send:l})=>{const[d,g]=s(!1);o((()=>{const e=document.createElement("script");return e.src="https://cdn.bcrumbs.net/bc-assets/scripts/mic-recorder-to-mp3.js",e.async=!0,e.onload=()=>console.log("Script Loaded"),document.body.appendChild(e),()=>{document.body.removeChild(e)}}),[]);const p=c((()=>{if(!oe){if("function"!=typeof MicRecorder)return void r("Please wait a little until voice library is loaded");oe=new MicRecorder({bitRate:128})}r(void 0),d?oe.stop().getMp3().then((([e,n])=>{g(!1);ee(new File([n],"recording.mp3",{type:"audio/mpeg"}),i,((e,n)=>{e?l({fileUrl:e,fileName:"recording",extension:"mp3"}):n&&r(n)}))})).catch((e=>r(e.message))):navigator.mediaDevices.getUserMedia({audio:!0}).then((()=>{oe.start().then((()=>{g(!0)})).catch((e=>r(e.message)))})).catch((e=>r(e.message)))}),[d,r,i,l]);return n(t,{children:[d?e("i",{onClick:()=>{oe?.stop(),g(!1)},children:e(ae,{})}):null,n("div",{id:"voiceRecorderIcon",className:"mic-container",children:[d?e("i",{onClick:p,children:e(ie,{})}):e(te,{onClick:p,activeColor:"var(--bc-chat-dark-gray-color)"}),e("div",{className:"circle "+(d?"active":"")})]})]})};const ce=l.i`
119
+ ${e=>ne("url(\"data:image/svg+xml,%3Csvg id='Component_25_5' data-name='Component 25 – 5' xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 15.999 16'%3E%3Cpath id='Path_805' data-name='Path 805' d='M8,16a8,8,0,1,1,8-8,8.009,8.009,0,0,1-8,8M8,1.211A6.789,6.789,0,1,0,14.788,8,6.8,6.8,0,0,0,8,1.211' fill='%23a3a3a3'/%3E%3Cpath id='Path_806' data-name='Path 806' d='M10.908,19.478a4.716,4.716,0,0,1-3.359-1.392.605.605,0,0,1,.856-.856,3.537,3.537,0,0,0,5,0,.605.605,0,1,1,.856.856,4.716,4.716,0,0,1-3.359,1.392' transform='translate(-2.908 -6.728)' fill='%23a3a3a3'/%3E%3Cpath id='Path_807' data-name='Path 807' d='M7.306,10.925A1.635,1.635,0,1,1,8.942,9.289a1.638,1.638,0,0,1-1.635,1.635m0-2.06a.424.424,0,1,0,.424.424.425.425,0,0,0-.424-.424' transform='translate(-2.237 -3.02)' fill='%23a3a3a3'/%3E%3Cpath id='Path_808' data-name='Path 808' d='M16.986,10.925a1.635,1.635,0,1,1,1.635-1.635,1.638,1.638,0,0,1-1.635,1.635m0-2.06a.424.424,0,1,0,.424.424.425.425,0,0,0-.424-.424' transform='translate(-6.056 -3.02)' fill='%23a3a3a3'/%3E%3C/svg%3E%0A\");",e)}
120
+ `,se=l.span`
106
121
  margin: 8px;
107
122
  cursor: pointer;
108
123
  font-size: var(--bc-chat-fontSize-xl);
109
- `,oe=({onClick:n})=>e("div",{id:"emojiIcon",children:e(ie,{onClick:n,activeColor:"var(--bc-chat-dark-gray-color)"})}),re=({text:n,setText:t,onClick:i})=>{const c=function(e){const n=o(null);return a((()=>{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=r((e=>{t(n+e)}),[t,n]),l=x.map(((n,t)=>e(ae,{className:"emoji",onClick:e=>s(e.target.innerText),children:n},"emoji"+t)));return e("div",{ref:c,children:e("div",{className:"bc-emojiPicker",id:"emojiPicker",children:l})})},ce=s.i`
110
- ${e=>$("url(\"data:image/svg+xml,%3Csvg id='attach' xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 15.317 16'%3E%3Cpath id='Path_690' data-name='Path 690' d='M-431.392,1429.762a4.112,4.112,0,0,1-2.928-1.213,4.145,4.145,0,0,1,0-5.854l8.066-8.065a2.94,2.94,0,0,1,2.094-.867,2.94,2.94,0,0,1,2.094.867,2.941,2.941,0,0,1,.867,2.094,2.94,2.94,0,0,1-.867,2.094l-8.065,8.066a1.826,1.826,0,0,1-2.523,0,1.773,1.773,0,0,1-.522-1.261,1.773,1.773,0,0,1,.523-1.262l8.065-8.065a.606.606,0,0,1,.857,0,.6.6,0,0,1,0,.856l-8.065,8.066a.566.566,0,0,0-.168.4.569.569,0,0,0,.168.4.585.585,0,0,0,.809,0l8.066-8.066a1.738,1.738,0,0,0,.512-1.238,1.739,1.739,0,0,0-.512-1.238,1.792,1.792,0,0,0-2.475,0l-8.066,8.065a2.933,2.933,0,0,0,0,4.141,2.933,2.933,0,0,0,4.141,0l8.075-8.075a.6.6,0,0,1,.857,0,.6.6,0,0,1,0,.856l-8.075,8.075A4.111,4.111,0,0,1-431.392,1429.762Z' transform='translate(435.53 -1413.762)' fill='%23a3a3a3'/%3E%3C/svg%3E%0A\");",e)}
111
- `,se=({setProgress:t,setFile:i,setError:a})=>{const o=r((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:c}=o,s=r.substring(r.lastIndexOf(".")+1).toLowerCase();return b.SupportedFormats.indexOf(s)<0?a("File type is not valid."):c>b.MaxFileSize?a("Maximum limit is 20 MBs"):void X(o,t,((e,n)=>{e?i({fileUrl:e,fileName:r,extension:s}):n&&a(n)}))}),[t,i,a]);return n("div",{id:"attachIcon",children:[e("label",{htmlFor:"fileInput",children:e(ce,{activeColor:"var(--bc-chat-dark-gray-color)"})}),e("input",{type:"file",className:"bc-fileUpload",id:"fileInput",onChange:o})]})},le=s.div`
124
+ `,le=({onClick:n})=>e("div",{id:"emojiIcon",children:e(ce,{onClick:n,activeColor:"var(--bc-chat-dark-gray-color)"})}),de=({text:n,setText:t,onClick:i})=>{const a=function(e){const n=r(null);return o((()=>{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=c((e=>{t(n+e)}),[t,n]),l=x.map(((n,t)=>e(se,{className:"emoji",onClick:e=>s(e.target.innerText),children:n},"emoji"+t)));return e("div",{ref:a,children:e("div",{className:"bc-emojiPicker",id:"emojiPicker",children:l})})},ge=l.i`
125
+ ${e=>ne("url(\"data:image/svg+xml,%3Csvg id='attach' xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 15.317 16'%3E%3Cpath id='Path_690' data-name='Path 690' d='M-431.392,1429.762a4.112,4.112,0,0,1-2.928-1.213,4.145,4.145,0,0,1,0-5.854l8.066-8.065a2.94,2.94,0,0,1,2.094-.867,2.94,2.94,0,0,1,2.094.867,2.941,2.941,0,0,1,.867,2.094,2.94,2.94,0,0,1-.867,2.094l-8.065,8.066a1.826,1.826,0,0,1-2.523,0,1.773,1.773,0,0,1-.522-1.261,1.773,1.773,0,0,1,.523-1.262l8.065-8.065a.606.606,0,0,1,.857,0,.6.6,0,0,1,0,.856l-8.065,8.066a.566.566,0,0,0-.168.4.569.569,0,0,0,.168.4.585.585,0,0,0,.809,0l8.066-8.066a1.738,1.738,0,0,0,.512-1.238,1.739,1.739,0,0,0-.512-1.238,1.792,1.792,0,0,0-2.475,0l-8.066,8.065a2.933,2.933,0,0,0,0,4.141,2.933,2.933,0,0,0,4.141,0l8.075-8.075a.6.6,0,0,1,.857,0,.6.6,0,0,1,0,.856l-8.075,8.075A4.111,4.111,0,0,1-431.392,1429.762Z' transform='translate(435.53 -1413.762)' fill='%23a3a3a3'/%3E%3C/svg%3E%0A\");",e)}
126
+ `,pe=({setProgress:t,setFile:i,setError:a})=>{const o=c((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:c}=o,s=r.substring(r.lastIndexOf(".")+1).toLowerCase();return m.SupportedFormats.indexOf(s)<0?a("File type is not valid."):c>m.MaxFileSize?a("Maximum limit is 20 MBs"):void ee(o,t,((e,n)=>{e?i({fileUrl:e,fileName:r,extension:s}):n&&a(n)}))}),[t,i,a]);return n("div",{id:"attachIcon",children:[e("label",{htmlFor:"fileInput",children:e(ge,{activeColor:"var(--bc-chat-dark-gray-color)"})}),e("input",{type:"file",className:"bc-fileUpload",id:"fileInput",onChange:o})]})},he=l.div`
112
127
  padding: 0px 0px 0px 10px;
113
128
  margin: 0px;
114
129
  width: fit-content;
@@ -123,7 +138,7 @@ import{jsx as e,jsxs as n}from"react/jsx-runtime";import t,{useMemo as i,useEffe
123
138
  cursor: pointer;
124
139
  display: block;
125
140
  }
126
- `,de=({setView:t,setFile:i,setProgress:a,setError:o,text:r,setText:s,send:l})=>{const[d,g]=c(!1);return n("div",{className:"bc-inputActions",id:"bc-inputActions",children:[n(le,{id:"iconsContainer",children:[e(se,{setFile:i,setProgress:a,setError:o}),e(oe,{onClick:()=>g(!0)}),e(te,{setFile:i,setError:o,setProgress:a,send:l})]}),d?e(re,{text:r,setText:s,onClick:()=>g(!1)}):null]})};N('.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.bc-messageInput {\n min-height: 30px;\n max-height: 100%;\n border: 1px solid #d9d9d9;\n background-color: #fff;\n overflow-y: hidden;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 20px; }\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 16px;\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-inputActions {\n display: flex;\n align-items: center;\n position: relative;\n width: 100%;\n height: 38px; }\n .bc-inputActions .bc-fileUpload {\n display: none; }\n .bc-inputActions i {\n display: block;\n margin: 0 5px; }\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 #0000001a;\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.bc-uploadFileDetails {\n background-color: transparent;\n display: flex;\n align-items: center;\n max-width: calc(100% - 40px);\n width: calc(100% - 40px);\n height: 32px;\n border-radius: 20px;\n padding: 2px 10px; }\n .bc-uploadFileDetails .bc-uploadedFile {\n max-width: 32px;\n max-height: 32px;\n pointer-events: none; }\n .bc-uploadFileDetails .bc-uploadedFile .bc-imageFile {\n max-width: 100%;\n max-height: 100%;\n pointer-events: none; }\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 .bc-uploadFileDetails .bc-uploadFileName {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n pointer-events: none; }\n .bc-uploadFileDetails .bc-uploadFileName span {\n padding: 10px;\n pointer-events: none; }\n .bc-uploadFileDetails .bc-uploadFileCancel {\n cursor: pointer;\n margin-bottom: -6px; }\n\n.mic-container {\n position: relative; }\n .mic-container i {\n transition: 0.9s;\n z-index: 10;\n position: relative; }\n .mic-container .circle {\n z-index: 4;\n top: -2px;\n left: 2px;\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 .mic-container .circle:before {\n content: "";\n width: 30px;\n height: 30px;\n border-radius: 50%;\n opacity: 0.5;\n z-index: 3;\n position: absolute; }\n .mic-container .circle.active {\n background-color: #A8E6A3; }\n .mic-container .circle.active:before {\n background: #A8E6A3;\n animation: bounce 0.8s ease-in-out infinite 0.5s; }\n\n@keyframes bounce {\n 0% {\n transform: scale(1); }\n 25% {\n transform: scale(1.4); }\n 75% {\n transform: scale(1); }\n 100% {\n transform: scale(1.3); } }\n');const ge=s.div`
141
+ `,be=({setView:t,setFile:i,setProgress:a,setError:o,text:r,setText:c,send:l})=>{const[d,g]=s(!1);return n("div",{className:"bc-inputActions",id:"bc-inputActions",children:[n(he,{id:"iconsContainer",children:[e(pe,{setFile:i,setProgress:a,setError:o}),e(le,{onClick:()=>g(!0)}),e(re,{setFile:i,setError:o,setProgress:a,send:l})]}),d?e(de,{text:r,setText:c,onClick:()=>g(!1)}):null]})};Z('.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.bc-messageInput {\n min-height: 30px;\n max-height: 100%;\n border: 1px solid #d9d9d9;\n background-color: #fff;\n overflow-y: hidden;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 20px; }\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 16px;\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-inputActions {\n display: flex;\n align-items: center;\n position: relative;\n width: 100%;\n height: 38px; }\n .bc-inputActions .bc-fileUpload {\n display: none; }\n .bc-inputActions i {\n display: block;\n margin: 0 5px; }\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 #0000001a;\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.bc-uploadFileDetails {\n background-color: transparent;\n display: flex;\n align-items: center;\n max-width: calc(100% - 40px);\n width: calc(100% - 40px);\n height: 32px;\n border-radius: 20px;\n padding: 2px 10px; }\n .bc-uploadFileDetails .bc-uploadedFile {\n max-width: 32px;\n max-height: 32px;\n pointer-events: none; }\n .bc-uploadFileDetails .bc-uploadedFile .bc-imageFile {\n max-width: 100%;\n max-height: 100%;\n pointer-events: none; }\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 .bc-uploadFileDetails .bc-uploadFileName {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n pointer-events: none; }\n .bc-uploadFileDetails .bc-uploadFileName span {\n padding: 10px;\n pointer-events: none; }\n .bc-uploadFileDetails .bc-uploadFileCancel {\n cursor: pointer;\n margin-bottom: -6px; }\n\n.mic-container {\n position: relative; }\n .mic-container i {\n transition: 0.9s;\n z-index: 10;\n position: relative; }\n .mic-container .circle {\n z-index: 4;\n top: -2px;\n left: 2px;\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 .mic-container .circle:before {\n content: "";\n width: 30px;\n height: 30px;\n border-radius: 50%;\n opacity: 0.5;\n z-index: 3;\n position: absolute; }\n .mic-container .circle.active {\n background-color: #A8E6A3; }\n .mic-container .circle.active:before {\n background: #A8E6A3;\n animation: bounce 0.8s ease-in-out infinite 0.5s; }\n\n@keyframes bounce {\n 0% {\n transform: scale(1); }\n 25% {\n transform: scale(1.4); }\n 75% {\n transform: scale(1); }\n 100% {\n transform: scale(1.3); } }\n');const me=l.div`
127
142
  width: calc(100% - 40px);
128
143
  background-color: #d9d9d94d;
129
144
  padding: 10px 20px;
@@ -135,35 +150,32 @@ import{jsx as e,jsxs as n}from"react/jsx-runtime";import t,{useMemo as i,useEffe
135
150
  .bc-InputArea {
136
151
  flex: 1; /* Take up the remaining space */
137
152
  }
138
- .bc-CommandsArea {
139
- width: 90px;
140
- }
141
153
  .bc-uploadFileError {
142
154
  width: 100%;
143
155
  color: red;
144
156
  margin-top: 6px;
145
157
  text-align: center;
146
158
  }
147
- `,pe=({config:t,sendMessage:i,setView:a})=>{const[o,s]=c(),[l,d]=c(),[g,p]=c(),[h,m]=c(0),x=r((e=>{if(e){const{fileUrl:n,extension:t}=e;i(b.SupportedImageFormats.indexOf(t)>=0?"image":b.SupportedAudioFormats.indexOf(t)>=0?"audio":"document",n)}else if(l){const{fileUrl:e,extension:n}=l;i(b.SupportedImageFormats.indexOf(n)>=0?"image":b.SupportedAudioFormats.indexOf(n)>=0?"audio":"document",e),d(void 0)}else i(H,o),s("")}),[l,o,i]);return n(ge,{children:[e("div",{className:"bc-InputArea",children:e(q,{config:t,send:x,text:o,setText:s,file:l,isFileSelected:!!l,cancelFileUpload:()=>d(void 0)})}),e("div",{className:"bc-CommandsArea",children:e(de,{setView:a,setFile:d,setProgress:m,setError:p,setText:s,text:o,send:x})}),g?e("div",{className:"bc-uploadFileError",children:g}):null]})},he="bc-chat-header-banner",be=390,me=s.div`
148
- ${e=>e.bannerWidth>be?"height: 60px;":"height: 90px;"}
159
+ `,ue=({config:t,sendMessage:i,setView:a})=>{const[o,r]=s(),[l,d]=s(),[g,p]=s(),[h,b]=s(0),u=c((e=>{if(e){const{fileUrl:n,extension:t}=e;i(m.SupportedImageFormats.indexOf(t)>=0?"image":m.SupportedAudioFormats.indexOf(t)>=0?"audio":"document",n)}else if(l){const{fileUrl:e,extension:n}=l;i(m.SupportedImageFormats.indexOf(n)>=0?"image":m.SupportedAudioFormats.indexOf(n)>=0?"audio":"document",e),d(void 0)}else i(Y,o),r("")}),[l,o,i]);return n(me,{children:[e("div",{className:"bc-InputArea",children:e(_,{config:t,send:u,text:o,setText:r,file:l,isFileSelected:!!l,cancelFileUpload:()=>d(void 0)})}),e("div",{className:"bc-CommandsArea",children:e(be,{setView:a,setFile:d,setProgress:b,setError:p,setText:r,text:o,send:u})}),g?e("div",{className:"bc-uploadFileError",children:g}):null]})},xe="bc-chat-header-banner",Ce=390,fe=l.div`
160
+ ${e=>e.bannerWidth>Ce?"height: 60px;":"height: 90px;"}
149
161
  display: block;
150
162
  width: 100%;
151
163
  background-color: transparent;
152
164
  z-index: 10;
153
165
  border-top-left-radius: 15px;
154
166
  border-top-right-radius: 15px;
155
- `,xe=s.div`
167
+ `,we=l.div`
156
168
  width: 100%;
157
169
  display: flex;
158
170
  align-items: center;
159
171
  background-image: ${e=>`linear-gradient(103deg, ${e.startColor},${e.endColor})`};
160
- ${e=>e.bannerWidth<=be?'\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczL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G9yPSIjZWUyYTdiIi8+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;"}
161
- `,ue=s.div`
172
+ ${e=>e.bannerWidth<=Ce?'\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;"}
173
+ `,ve=l.div`
162
174
  width: 100%;
163
175
  height: 100%;
164
176
  display: flex;
165
- `,Ce=s.div`
166
- ${e=>e.bannerWidth>be?"padding-bottom: 0 !important;":""}
177
+ `,Ae=l.div`
178
+ ${e=>e.bannerWidth>Ce?"padding-bottom: 0 !important;":""}
167
179
  display: flex;
168
180
  gap: 10px;
169
181
  align-items: center;
@@ -184,8 +196,8 @@ import{jsx as e,jsxs as n}from"react/jsx-runtime";import t,{useMemo as i,useEffe
184
196
  color: #fff;
185
197
  font-style: normal;
186
198
  }
187
- `,fe=s.div`
188
- ${e=>e.bannerWidth>be?"padding-bottom: 0 !important;":""}
199
+ `,Ie=l.div`
200
+ ${e=>e.bannerWidth>Ce?"padding-bottom: 0 !important;":""}
189
201
  display: flex;
190
202
  flex-direction: row-reverse;
191
203
  gap: 10px;
@@ -200,9 +212,9 @@ import{jsx as e,jsxs as n}from"react/jsx-runtime";import t,{useMemo as i,useEffe
200
212
  cursor: pointer;
201
213
  display: block;
202
214
  }
203
- `,we=s.i`
215
+ `,ke=l.i`
204
216
  background-image: url("data:image/svg+xml;base64,PHN2ZyBpZD0ibWluaW1pemUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxLjgxNyIgdmlld0JveD0iMCAwIDE2IDEuODE3Ij4KICA8ZGVmcz4KICAgIDxjbGlwUGF0aCBpZD0iY2xpcC1wYXRoIj4KICAgICAgPHJlY3QgaWQ9IlJlY3RhbmdsZV82OCIgZGF0YS1uYW1lPSJSZWN0YW5nbGUgNjgiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxLjgxNyIgZmlsbD0iIzAwMCIvPgogICAgPC9jbGlwUGF0aD4KICA8L2RlZnM+CiAgPGcgaWQ9Ikdyb3VwXzMwMSIgZGF0YS1uYW1lPSJHcm91cCAzMDEiIGNsaXAtcGF0aD0idXJsKCNjbGlwLXBhdGgpIj4KICAgIDxwYXRoIGlkPSJQYXRoXzgwNCIgZGF0YS1uYW1lPSJQYXRoIDgwNCIgZD0iTTE1LjM5NCwyLjIxMUguNjA2QS42MDYuNjA2LDAsMSwxLC42MDYsMUgxNS4zOTRhLjYwNi42MDYsMCwwLDEsMCwxLjIxMSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCAtMC4zOTQpIiBmaWxsPSIjZmZmIi8+CiAgPC9nPgo8L3N2Zz4K");
205
- `,ve=({config:t,minimize:i})=>{const[o,r]=c();return a((()=>{new ResizeObserver((()=>{const e=document.getElementById(he)?.offsetWidth;e&&e>50&&e!==o&&r(e)})).observe(document.getElementById(he))}),[]),e(me,{bannerWidth:o,className:"bc-header",children:e(xe,{className:"bc-banner",id:he,startColor:"#065A60",endColor:"#006466",bannerWidth:o,children:n(ue,{className:"bc-bannerContents",children:[n(Ce,{className:"bc-companyInfo",bannerWidth:o,logo:t.brandLogo||m,children:[e("i",{}),e("span",{children:t.brandName||"BreadCrumbs"})]}),e(fe,{className:"bc-bannerActions",bannerWidth:o,children:i?e(we,{className:"bc-flow-minimize",onClick:()=>i()}):null})]})})})},Ae=s.div`
217
+ `,ye=({config:t,minimize:i})=>{const[a,r]=s();return o((()=>{new ResizeObserver((()=>{const e=document.getElementById(xe)?.offsetWidth;e&&e>50&&e!==a&&r(e)})).observe(document.getElementById(xe))}),[]),e(fe,{bannerWidth:a,className:"bc-header",children:e(we,{className:"bc-banner",id:xe,startColor:"#065A60",endColor:"#006466",bannerWidth:a,children:n(ve,{className:"bc-bannerContents",children:[n(Ae,{className:"bc-companyInfo",bannerWidth:a,logo:t.brandLogo||u,children:[e("i",{}),e("span",{children:t.brandName||"BreadCrumbs"})]}),e(Ie,{className:"bc-bannerActions",bannerWidth:a,children:i?e(ke,{className:"bc-flow-minimize",onClick:()=>i()}):null})]})})})},Le=l.div`
206
218
  width: 100%;
207
219
  text-align: center;
208
220
  i {
@@ -210,7 +222,7 @@ import{jsx as e,jsxs as n}from"react/jsx-runtime";import t,{useMemo as i,useEffe
210
222
  position: relative;
211
223
  width: 20px;
212
224
  height: 20px;
213
- background-image: url(${m});
225
+ background-image: url(${u});
214
226
  background-repeat: no-repeat;
215
227
  background-size: 20px 20px;
216
228
  background-position: center;
@@ -233,7 +245,7 @@ import{jsx as e,jsxs as n}from"react/jsx-runtime";import t,{useMemo as i,useEffe
233
245
  border-radius: 0px 0px 10px 10px;
234
246
  opacity: 1;
235
247
  }
236
- `,Ie=t.forwardRef((({forRate:t},i)=>n(Ae,{className:""+(t?"bc-ratingPositioning":""),children:[e("i",{}),e("span",{children:"Powered by Bread Crumbs"})]})));N('@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..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: "Montserrat", sans-serif;\n --bc-chat-fontSize-xs: 10px;\n --bc-chat-fontSize-sm: 12px;\n --bc-chat-fontSize-md: 14px;\n --bc-chat-fontSize-lg: 18px;\n --bc-chat-fontSize-xl: 22px;\n --bc-chat-fontSize-xxl: 26px;\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-agent-message-border-color: #95D5B2;\n --bc-chat-agent-message-background-start-color: #fff;\n --bc-chat-agent-message-background-end-color: #fff;\n --bc-chat-agent-message-text-color: #000;\n --bc-chat-client-message-border-color: #95D5B2;\n --bc-chat-client-message-background-start-color: #95D5B2;\n --bc-chat-client-message-background-end-color: #95D5B2;\n --bc-chat-client-message-text-color: #000;\n --bc-chat-danger-color: #d6312e;\n --bc-chat-success-color: #58aa18;\n --bc-chat-white-color: #fff;\n --bc-chat-radius: 5px; }\n');const Me=s.div`
248
+ `,Me=i.forwardRef((({forRate:t},i)=>n(Le,{className:""+(t?"bc-ratingPositioning":""),children:[e("i",{}),e("span",{children:"Powered by Bread Crumbs"})]})));Z('@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..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: "Montserrat", sans-serif;\n --bc-chat-fontSize-xs: 10px;\n --bc-chat-fontSize-sm: 12px;\n --bc-chat-fontSize-md: 14px;\n --bc-chat-fontSize-lg: 18px;\n --bc-chat-fontSize-xl: 22px;\n --bc-chat-fontSize-xxl: 26px;\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-agent-message-border-color: #95D5B2;\n --bc-chat-agent-message-background-start-color: #fff;\n --bc-chat-agent-message-background-end-color: #fff;\n --bc-chat-agent-message-text-color: #000;\n --bc-chat-client-message-border-color: #95D5B2;\n --bc-chat-client-message-background-start-color: #95D5B2;\n --bc-chat-client-message-background-end-color: #95D5B2;\n --bc-chat-client-message-text-color: #000;\n --bc-chat-danger-color: #d6312e;\n --bc-chat-success-color: #58aa18;\n --bc-chat-white-color: #fff;\n --bc-chat-radius: 5px; }\n');const Ee=l.div`
237
249
  height: 100%;
238
250
  display: flex;
239
251
  flex-direction: column;
@@ -259,5 +271,5 @@ import{jsx as e,jsxs as n}from"react/jsx-runtime";import t,{useMemo as i,useEffe
259
271
  line-height: inherit;
260
272
  font-weight: inherit;
261
273
  }
262
- `,ke=({config:t={language:"EN",backgroundColor:"#dedede"},messages:i=[],sendMessage:a,debug:o,minimize:r})=>{const[s,l]=c("MESSAGE_LIST"),d="interactive"===(i&&i.length>0&&i[i.length-1].type);return n(Me,{className:"bc-chat",children:[t.hideHeader?null:e(ve,{config:t,minimize:r}),"MESSAGE_LIST"===s?e(Q,{messages:i,sendMessage:a,debug:o,config:t},"message-list"):null,d?e(Ie,{forRate:!0}):t.inputDisabled?null:e(pe,{sendMessage:a,setView:l,config:t},"message-input")]})};export{ke as BCChat};
274
+ `,Se=({config:t={language:"EN",backgroundColor:"#dedede"},messages:i=[],sendMessage:a,debug:o,minimize:r,onReachingUp:c})=>{const[l,d]=s("MESSAGE_LIST"),g="interactive"===(i&&i.length>0&&i[i.length-1].type);return n(Ee,{className:"bc-chat",children:[t.hideHeader?null:e(ye,{config:t,minimize:r}),"MESSAGE_LIST"===l?e(U,{messages:i,sendMessage:a,debug:o,config:t,onReachingUp:c},"message-list"):null,g?e(Me,{forRate:!0}):t.inputDisabled?null:e(ue,{sendMessage:a,setView:d,config:t},"message-input")]})};export{Se as BCChat};
263
275
  //# 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8qGAAA,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.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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8qGAAA,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/build/index.js CHANGED
@@ -1,7 +1,7 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react"),t=require("@emotion/styled"),i=require("react-markdown"),a=require("franc-min"),o=require("uuid"),r=require("@azure/storage-blob");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=s(n),l=s(t),d=s(i);const g={MaxFileSize:52428800,SupportedFormats:["png","jpg","jpeg","gif","bmp","pdf","doc","xls","xlsx","docx","ppt","pptx","avi","m4a","m4v","mov","mp4","wav","wma","wmv"],SupportedImageFormats:["png","jpg","jpeg","gif","bmp","webp"],SupportedAudioFormats:["mp3","acc","m4a","ogg","amr"]},p="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEEAAABBCAYAAACO98lFAAAACXBIWXMAAAsSAAALEgHS3X78AAAFa0lEQVR42u2bX0xTVxzHvzqqVOqQrtJC2gmF4ooMWNg6FEJE3NhClpnG8aBzsTHugbgsLltiJg/6NI3J5pLFLbpIIjEjL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Zz2Ied1sPOM5lc9VsIV1qlWE/P+YJzigrBJW8ppM48mUd/VNGcQjlEvDjmvE67AJ9t3B1zigqCTawhV2DIWQH1XExyj3tjyj4E27Lp9Gswjrp/vyCnjvaqfinMnJERP+LxkM1qufMsJVpaxACydP2HbyjzUaEqgfTGTSME7/H/iylAv4QLTN0I+8fWyq1OcypJMIsXh14zY0tFEjDXet6Pxvv1xbiFLWgr3eBB3JtmI65WnKLD/za0xaxeiuSwVK/NwrHgT57SYaZaxAMyjvlkBfF1u4k2Svr/dLEhVSlAIVr+d0y5TF+KYYeu8lZ9d6uKIAFo93YJJ7oK6Q2PfNaKSpJNrcLSyDpcc7TjtuhmT+mxS6fHhK5XIkPHD6wu4sdd2XrD3Fjwm7Gw/iWOGrYQgWq01oFprgI9l0D3kgD80DEfQj+DUBFTJqVBKU5GTqkKRUhdVH+gLuLGz/aSgxVnBIQxNTUYEAfxbbY70C89mrZ5u7LWdF7w6nZDAODQ1ifctDThjvybIemw4hH1tjdhp/SUh5fmEfp9Qb29Bk+sWduSURa1SRzIfy+CyqzPmOuZTh+APjRCnQTBMvqhtIojdvRdR0N+K9StzUKTIgnZFJq9LTJfsHSODaB2y48KwF0/DFtE/h1JliUKgECgECoFCoBAi2D8QCAe+XuY7HAAAAABJRU5ErkJggg==",h=["🤓","🙃","😕","â˜šī¸","😲","đŸ˜ŗ","😠","😇","😀","😁","😂","đŸ¤Ŗ","😃","😄","😅","😆","😉","😊","😏","đŸ˜Ŗ","đŸ˜Ĩ","😮","😴","😌","😋","😎","😍","🙂","🤗","🤔","😐","😑","đŸ˜ļ","🙄"];function b(e){return e.isAgent?"linear-gradient(104deg,var(--bc-chat-agent-message-background-start-color),var(--bc-chat-agent-message-background-end-color))":"linear-gradient(104deg,var(--bc-chat-client-message-background-start-color),var(--bc-chat-client-message-background-end-color))"}function x(e){return e.isAgent?"var(--bc-chat-agent-message-border-color)":"var(--bc-chat-client-message-border-color)"}function m(e){return e.isAgent?"var(--bc-chat-agent-message-text-color)":"var(--bc-chat-client-message-text-color)"}const u=({message:n})=>e.jsx("div",{className:"bc-mediaMessage"+("audio"===n.type?" audio":""),style:{padding:0},children:e.jsx("video",{src:n.content,controls:!0})}),f=l.default.div`
2
- background-image: ${e=>b(e)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react"),t=require("@emotion/styled"),i=require("react-markdown"),a=require("franc-min"),o=require("uuid"),r=require("@azure/storage-blob");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=s(n),l=s(t),d=s(i);const g={MaxFileSize:52428800,SupportedFormats:["png","jpg","jpeg","gif","bmp","pdf","doc","xls","xlsx","docx","ppt","pptx","avi","m4a","m4v","mov","mp4","wav","wma","wmv"],SupportedImageFormats:["png","jpg","jpeg","gif","bmp","webp"],SupportedAudioFormats:["mp3","acc","m4a","ogg","amr"]},p="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEEAAABBCAYAAACO98lFAAAACXBIWXMAAAsSAAALEgHS3X78AAAFa0lEQVR42u2bX0xTVxzHvzqqVOqQrtJC2gmF4ooMWNg6FEJE3NhClpnG8aBzsTHugbgsLltiJg/6NI3J5pLFLbpIIjEjLuriiH9qnESlI6BQWcGsSEvT2lK8q0CvFChme1hwXs5tKfTWXfT83s6fe3Lz6fn9zvl9f7eL9L/u/xvPuS0GNQqBQqAQKAQKYaYlzfdBk0qPtzRFnL7L7ttoGLzz/EBQSlNRrMzj9HUzA9QdaEygECgECoFCoBAoBAqBQqAQKASaRQph6UlLUCJToCjtZcgkydCmqh6PPQyPo39kEP7QCDoeeGCbCD5bEN5dkQljlgFl6sKo854c97EMfvf2osl1K+FAEgqhPEWBuvyNRModi2XIFDDmVcCYV4FLjnZ8Zf8NQ1OTCysmmFR6HK2smxeAmVatNaC56lPUKrIXzk74Jv8dVGsNEcfZcAh3A25OX4pECp1cE/EZmUSKfaXbUGi/hnp7i7gh7Mku5QXAhkMwOztw8Z4NNx4yEZ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q01oFprgI9l0D3kgD80DEfQj+DUBFTJqVBKU5GTqkKRUhdVH+gLuLGz/aSgxVnBIQxNTUYEAfxbbY70C89mrZ5u7LWdF7w6nZDAODQ1ifctDThjvybIemw4hH1tjdhp/SUh5fmEfp9Qb29Bk+sWduSURa1SRzIfy+CyqzPmOuZTh+APjRCnQTBMvqhtIojdvRdR0N+K9StzUKTIgnZFJq9LTJfsHSODaB2y48KwF0/DFtE/h1JliUKgECgECoFCoBAi2D8QCAe+XuY7HAAAAABJRU5ErkJggg==",h=["🤓","🙃","😕","â˜šī¸","😲","đŸ˜ŗ","😠","😇","😀","😁","😂","đŸ¤Ŗ","😃","😄","😅","😆","😉","😊","😏","đŸ˜Ŗ","đŸ˜Ĩ","😮","😴","😌","😋","😎","😍","🙂","🤗","🤔","😐","😑","đŸ˜ļ","🙄"];function x(e){return e.isAgent?"linear-gradient(104deg,var(--bc-chat-agent-message-background-start-color),var(--bc-chat-agent-message-background-end-color))":"linear-gradient(104deg,var(--bc-chat-client-message-background-start-color),var(--bc-chat-client-message-background-end-color))"}function b(e){return e.isAgent?"var(--bc-chat-agent-message-border-color)":"var(--bc-chat-client-message-border-color)"}function m(e){return e.isAgent?"var(--bc-chat-agent-message-text-color)":"var(--bc-chat-client-message-text-color)"}const u=({message:n})=>e.jsx("div",{className:"bc-mediaMessage"+("audio"===n.type?" audio":""),style:{padding:0},children:e.jsx("video",{src:n.content,controls:!0})}),f=l.default.div`
2
+ background-image: ${e=>x(e)};
3
3
  color: ${e=>m(e)};
4
- border-color: ${e=>x(e)};
4
+ border-color: ${e=>b(e)};
5
5
  border-width: 1px;
6
6
  border-style: solid;
7
7
  :hover {
@@ -27,9 +27,9 @@
27
27
  font-size: var(--bc-chat-fontSize-sm);
28
28
  `,v=l.default.a`
29
29
  font-size: var(--bc-chat-fontSize-sm);
30
- background-image: ${e=>b(e)};
30
+ background-image: ${e=>x(e)};
31
31
  color: ${e=>m(e)};
32
- border-color: ${e=>x(e)};
32
+ border-color: ${e=>b(e)};
33
33
  border-width: 1px;
34
34
  border-style: solid;
35
35
  :hover {
@@ -44,16 +44,16 @@
44
44
  flex-direction: row;
45
45
  align-items: center;
46
46
  gap: 5px;
47
- `,I=l.default.span`
47
+ `,k=l.default.span`
48
48
  color: ${e=>e.color};
49
- `;const k=l.default.i`
49
+ `;const y=l.default.i`
50
50
  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")`};
51
51
  background-position: center;
52
52
  background-size: contain;
53
53
  background-repeat: no-repeat;
54
54
  width: 15px;
55
55
  height: 15px;
56
- `,M={document:({message:n})=>{let t=n.content.split("/"),i=t[t.length-1];return e.jsx(f,{className:"bc-fileMessage",...n,children:e.jsxs(w,{href:n.content,target:"_blank",download:i,rel:"noopener noreferrer",...n,children:[e.jsx(C,{color:(a=n,a.isAgent,"000000")}),e.jsx("span",{children:i})]})});var a},image:({message:n})=>e.jsx("div",{className:"bc-mediaMessage",style:{backgroundImage:b(n),color:m(n),borderColor:x(n),borderWidth:"1px",borderStyle:"solid",padding:0},children:e.jsx("a",{href:n.content,target:"_blank",rel:"noreferrer",children:e.jsx("img",{src:n.content,alt:"message content"})})}),location:({message:n})=>{return e.jsx(v,{href:"https://www.google.com/maps/?q="+n.content,target:"_blank",rel:"noopener noreferrer",className:"bc-locationMessage",isAgent:n.isAgent,children:e.jsxs(A,{children:[e.jsx(k,{color:(t=n,t.isAgent,"000000")}),e.jsx(I,{color:m(n),children:"Open location"})]})});var t},text:({message:n})=>{const t=a.franc(n.content);return e.jsx("div",{style:{backgroundImage:b(n),color:m(n),borderColor:x(n),borderWidth:"1px",borderStyle:"solid",direction:"arb"===t?"rtl":"ltr"},children:(n.content&&n.content.indexOf("\n")>-1?n.content.split("\n"):[n.content]).map(((t,i)=>e.jsx(d.default,{children:t},`${n.messageId}-${i}`)))})},video:u,audio:u,interactive:null,template:({message:t})=>{const i=n.useMemo((()=>{try{return JSON.parse(t.content)}catch(e){return void console.log(e.message)}}),[t]);return e.jsxs("div",{style:{backgroundImage:b(t),color:m(t),borderColor:x(t),borderWidth:"1px",borderStyle:"solid"},children:[e.jsx("b",{children:"Template message:"})," ",i.name," ",i.language?.code?`/ ${i.language.code}`:null]})},note:({message:n})=>e.jsx("div",{children:n.content})},y=l.default.div`
56
+ `,I={document:({message:n})=>{let t=n.content.split("/"),i=t[t.length-1];return e.jsx(f,{className:"bc-fileMessage",...n,children:e.jsxs(w,{href:n.content,target:"_blank",download:i,rel:"noopener noreferrer",...n,children:[e.jsx(C,{color:(a=n,a.isAgent,"000000")}),e.jsx("span",{children:i})]})});var a},image:({message:n})=>e.jsx("div",{className:"bc-mediaMessage",style:{backgroundImage:x(n),color:m(n),borderColor:b(n),borderWidth:"1px",borderStyle:"solid",padding:0},children:e.jsx("a",{href:n.content,target:"_blank",rel:"noreferrer",children:e.jsx("img",{src:n.content,alt:"message content"})})}),location:({message:n})=>{return e.jsx(v,{href:"https://www.google.com/maps/?q="+n.content,target:"_blank",rel:"noopener noreferrer",className:"bc-locationMessage",isAgent:n.isAgent,children:e.jsxs(A,{children:[e.jsx(y,{color:(t=n,t.isAgent,"000000")}),e.jsx(k,{color:m(n),children:"Open location"})]})});var t},text:({message:n})=>{const t=a.franc(n.content);return e.jsx("div",{style:{backgroundImage:x(n),color:m(n),borderColor:b(n),borderWidth:"1px",borderStyle:"solid",direction:"arb"===t?"rtl":"ltr"},children:(n.content&&n.content.indexOf("\n")>-1?n.content.split("\n"):[n.content]).map(((t,i)=>e.jsx(d.default,{children:t},`${n.messageId}-${i}`)))})},video:u,audio:u,interactive:null,template:({message:t})=>{const i=n.useMemo((()=>{try{return JSON.parse(t.content)}catch(e){return void console.log(e.message)}}),[t]);return e.jsxs("div",{style:{backgroundImage:x(t),color:m(t),borderColor:b(t),borderWidth:"1px",borderStyle:"solid"},children:[e.jsx("b",{children:"Template message:"})," ",i.name," ",i.language?.code?`/ ${i.language.code}`:null]})},note:({message:n})=>e.jsx("div",{children:n.content})},M=l.default.div`
57
57
  display: flex;
58
58
  flex-direction: column;
59
59
  gap: 5px;
@@ -62,7 +62,7 @@
62
62
  margin: ${e=>e.isAgent?"0 40px 0 20px":"0 20px 0 40px"};
63
63
  text-align: ${e=>e.isAgent?"left":"right"};
64
64
  }
65
- `;function L({message:n}){const{debug:t,conversationId:i,traceId:a,spanId:o,isAgent:r}=n;return t?e.jsx(y,{isAgent:r,className:"bc-debugCon",children:e.jsxs("div",{children:[e.jsxs("div",{className:"bc-response-debug",children:["Trace id: ",e.jsx("span",{children:a})]}),e.jsxs("div",{className:"bc-response-debug",children:["Span id: ",e.jsx("span",{children:o})]}),e.jsxs("div",{className:"bc-response-debug",children:["Conversation id: ",e.jsx("span",{children:i})]})]})}):null}const j=()=>e.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M1.5 12.5L5.57574 16.5757C5.81005 16.8101 6.18995 16.8101 6.42426 16.5757L9 14",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),e.jsx("path",{d:"M16 7L12 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),e.jsx("path",{d:"M7 12L11.5757 16.5757C11.8101 16.8101 12.1899 16.8101 12.4243 16.5757L22 7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),E={delivered:j,failed:()=>e.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M8.4449 0.608765C8.0183 -0.107015 6.9817 -0.107015 6.55509 0.608766L0.161178 11.3368C-0.275824 12.07 0.252503 13 1.10608 13H13.8939C14.7475 13 15.2758 12.07 14.8388 11.3368L8.4449 0.608765ZM7.4141 1.12073C7.45288 1.05566 7.54712 1.05566 7.5859 1.12073L13.9798 11.8488C14.0196 11.9154 13.9715 12 13.8939 12H1.10608C1.02849 12 0.980454 11.9154 1.02018 11.8488L7.4141 1.12073ZM6.8269 4.48611C6.81221 4.10423 7.11783 3.78663 7.5 3.78663C7.88217 3.78663 8.18778 4.10423 8.1731 4.48612L8.01921 8.48701C8.00848 8.766 7.7792 8.98664 7.5 8.98664C7.2208 8.98664 6.99151 8.766 6.98078 8.48701L6.8269 4.48611ZM8.24989 10.476C8.24989 10.8902 7.9141 11.226 7.49989 11.226C7.08567 11.226 6.74989 10.8902 6.74989 10.476C6.74989 10.0618 7.08567 9.72599 7.49989 9.72599C7.9141 9.72599 8.24989 10.0618 8.24989 10.476Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}),read:j,sent:()=>e.jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M5 13L9 17L19 7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),pending:()=>e.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M7.50009 0.877014C3.84241 0.877014 0.877258 3.84216 0.877258 7.49984C0.877258 11.1575 3.8424 14.1227 7.50009 14.1227C11.1578 14.1227 14.1229 11.1575 14.1229 7.49984C14.1229 3.84216 11.1577 0.877014 7.50009 0.877014ZM1.82726 7.49984C1.82726 4.36683 4.36708 1.82701 7.50009 1.82701C10.6331 1.82701 13.1729 4.36683 13.1729 7.49984C13.1729 10.6328 10.6331 13.1727 7.50009 13.1727C4.36708 13.1727 1.82726 10.6328 1.82726 7.49984ZM8 4.50001C8 4.22387 7.77614 4.00001 7.5 4.00001C7.22386 4.00001 7 4.22387 7 4.50001V7.50001C7 7.63262 7.05268 7.7598 7.14645 7.85357L9.14645 9.85357C9.34171 10.0488 9.65829 10.0488 9.85355 9.85357C10.0488 9.65831 10.0488 9.34172 9.85355 9.14646L8 7.29291V4.50001Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})},S=({message:n})=>{if(!n.status)return null;const t=E[n.status];return e.jsx("div",{className:`status-icon ${n.status||""}`,children:e.jsx(t,{})})};function z(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))}}z(".bc-agentMessage,\n.bc-clientMessage {\n margin: 10px 15px;\n font-size: var(--bc-chat-fontSize-sm); }\n .bc-agentMessage div p,\n .bc-clientMessage div p {\n padding: 0;\n margin: 0; }\n\n.bc-note {\n text-align: center;\n gap: 5px; }\n .bc-note > div {\n background-color: #f9f9f9 !important;\n /* Light background */\n display: inline-block;\n padding: 8px;\n border-radius: 5px;\n overflow: hidden;\n word-break: break-word;\n text-decoration: none;\n background-color: transparent;\n border: 1px solid #999;\n max-width: 60%; }\n\n.status-icon.read {\n color: var(--bc-chat-success-color); }\n\n.status-icon.failed {\n color: var(--bc-chat-danger-color); }\n .status-icon.failed .resend {\n color: var(--bc-chat-dark-gray-color);\n cursor: pointer;\n margin: 0 10px; }\n\n.bc-agentMessage > div:not(.bc-debugCon),\n.bc-clientMessage > div:not(.bc-debugCon) {\n display: inline-block;\n padding: 8px;\n border-radius: 5px;\n overflow: hidden;\n word-break: break-word;\n text-decoration: none;\n background-color: transparent; }\n\n.bc-agentMessage .bc-fileMessage,\n.bc-clientMessage .bc-fileMessage {\n display: inline-block;\n padding: 8px 20px;\n border-radius: 5px;\n overflow: hidden;\n word-break: break-word;\n text-decoration: none;\n background-color: transparent;\n cursor: pointer; }\n .bc-agentMessage .bc-fileMessage img,\n .bc-clientMessage .bc-fileMessage img {\n vertical-align: middle;\n margin-right: 10px;\n width: 15px;\n height: 16px; }\n\n.bc-agentMessage .bc-locationMessage,\n.bc-clientMessage .bc-locationMessage {\n display: inline-block;\n padding: 8px 20px;\n border-radius: 5px;\n overflow: hidden;\n word-break: break-word;\n text-decoration: none;\n background-color: transparent;\n cursor: pointer; }\n .bc-agentMessage .bc-locationMessage img,\n .bc-clientMessage .bc-locationMessage img {\n vertical-align: middle;\n margin-right: 10px;\n width: 30px; }\n\n.bc-agentMessage {\n text-align: left;\n display: flex;\n align-items: flex-end;\n flex-wrap: wrap;\n gap: 5px; }\n .bc-agentMessage .bc-fileMessage,\n .bc-agentMessage .bc-locationMessage {\n color: var(--bc-chat-dark-gray-color);\n cursor: pointer; }\n .bc-agentMessage .bc-fileMessage img,\n .bc-agentMessage .bc-locationMessage img {\n vertical-align: middle;\n margin-right: 10px;\n width: 30px; }\n .bc-agentMessage > div:not(.bc-debugCon),\n .bc-agentMessage .bc-fileMessage,\n .bc-agentMessage .bc-locationMessage,\n .bc-agentMessage audio {\n border-bottom-left-radius: 0; }\n\n.bc-agentMessage:first-child {\n flex: 1 0 50%; }\n\n.bc-agentMessage > :nth-child(2) {\n flex: 0 1 auto;\n max-width: 85%; }\n\n.bc-clientMessage {\n padding-left: 20px;\n text-align: right; }\n .bc-clientMessage > div:not(.bc-debugCon),\n .bc-clientMessage .bc-fileMessage,\n .bc-clientMessage .bc-locationMessage,\n .bc-clientMessage audio {\n color: #fff;\n border-bottom-right-radius: 0; }\n .bc-clientMessage svg path:nth-child(2) {\n fill: #fff; }\n\n.bc-mediaMessage video,\n.bc-mediaMessage img {\n width: 300px;\n margin-bottom: -5px; }\n\n.bc-mediaMessage.audio video {\n height: 40px; }\n\n.bc-response-debug {\n background-color: transparent;\n color: #f5a623;\n padding: 0; }\n .bc-response-debug span {\n text-decoration: underline; }\n\n.bc-selectionContainer {\n display: flex;\n align-items: flex-start;\n flex-wrap: wrap; }\n\n.bc-selectionContainer:first-child {\n flex: 1 0 50%; }\n\n.bc-debug-panel {\n border-radius: 10px;\n box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.15);\n border: solid 1px #ffffff;\n background-color: #ffffff;\n color: var(--bc-chat-dark-gray-color);\n display: table;\n width: calc(100% - 40px);\n margin: 10px -40px 10px 0;\n text-align: left;\n padding: 8px;\n max-width: 310px; }\n\n.bc-exception-debug {\n color: #f5a623;\n position: relative; }\n .bc-exception-debug .bc-exception-icon {\n width: 30px;\n position: absolute;\n top: 3px;\n left: 10px; }\n .bc-exception-debug span {\n margin-left: 40px; }\n\n.bc-parameters-debug span {\n text-decoration: underline; }\n\n.bc-parameters-debug .bc-parameters-title {\n width: 100%;\n border-bottom: solid 1px #f3f3f3;\n text-align: left;\n font-weight: bold;\n margin-bottom: 6px; }\n\n.bc-debugCon {\n width: 100%; }\n");const D=l.default.i`
65
+ `;function L({message:n}){const{debug:t,conversationId:i,traceId:a,spanId:o,isAgent:r}=n;return t?e.jsx(M,{isAgent:r,className:"bc-debugCon",children:e.jsxs("div",{children:[e.jsxs("div",{className:"bc-response-debug",children:["Trace id: ",e.jsx("span",{children:a})]}),e.jsxs("div",{className:"bc-response-debug",children:["Span id: ",e.jsx("span",{children:o})]}),e.jsxs("div",{className:"bc-response-debug",children:["Conversation id: ",e.jsx("span",{children:i})]})]})}):null}const j=()=>e.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M1.5 12.5L5.57574 16.5757C5.81005 16.8101 6.18995 16.8101 6.42426 16.5757L9 14",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),e.jsx("path",{d:"M16 7L12 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),e.jsx("path",{d:"M7 12L11.5757 16.5757C11.8101 16.8101 12.1899 16.8101 12.4243 16.5757L22 7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),E={delivered:j,failed:()=>e.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M8.4449 0.608765C8.0183 -0.107015 6.9817 -0.107015 6.55509 0.608766L0.161178 11.3368C-0.275824 12.07 0.252503 13 1.10608 13H13.8939C14.7475 13 15.2758 12.07 14.8388 11.3368L8.4449 0.608765ZM7.4141 1.12073C7.45288 1.05566 7.54712 1.05566 7.5859 1.12073L13.9798 11.8488C14.0196 11.9154 13.9715 12 13.8939 12H1.10608C1.02849 12 0.980454 11.9154 1.02018 11.8488L7.4141 1.12073ZM6.8269 4.48611C6.81221 4.10423 7.11783 3.78663 7.5 3.78663C7.88217 3.78663 8.18778 4.10423 8.1731 4.48612L8.01921 8.48701C8.00848 8.766 7.7792 8.98664 7.5 8.98664C7.2208 8.98664 6.99151 8.766 6.98078 8.48701L6.8269 4.48611ZM8.24989 10.476C8.24989 10.8902 7.9141 11.226 7.49989 11.226C7.08567 11.226 6.74989 10.8902 6.74989 10.476C6.74989 10.0618 7.08567 9.72599 7.49989 9.72599C7.9141 9.72599 8.24989 10.0618 8.24989 10.476Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}),read:j,sent:()=>e.jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M5 13L9 17L19 7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),pending:()=>e.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M7.50009 0.877014C3.84241 0.877014 0.877258 3.84216 0.877258 7.49984C0.877258 11.1575 3.8424 14.1227 7.50009 14.1227C11.1578 14.1227 14.1229 11.1575 14.1229 7.49984C14.1229 3.84216 11.1577 0.877014 7.50009 0.877014ZM1.82726 7.49984C1.82726 4.36683 4.36708 1.82701 7.50009 1.82701C10.6331 1.82701 13.1729 4.36683 13.1729 7.49984C13.1729 10.6328 10.6331 13.1727 7.50009 13.1727C4.36708 13.1727 1.82726 10.6328 1.82726 7.49984ZM8 4.50001C8 4.22387 7.77614 4.00001 7.5 4.00001C7.22386 4.00001 7 4.22387 7 4.50001V7.50001C7 7.63262 7.05268 7.7598 7.14645 7.85357L9.14645 9.85357C9.34171 10.0488 9.65829 10.0488 9.85355 9.85357C10.0488 9.65831 10.0488 9.34172 9.85355 9.14646L8 7.29291V4.50001Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})},S=({message:n})=>{if(!n.status)return null;const t=E[n.status];return e.jsx("div",{className:`status-icon ${n.status||""}`,children:e.jsx(t,{})})};function z(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))}}z(".bc-agentMessage,\n.bc-clientMessage {\n margin: 10px 15px;\n font-size: var(--bc-chat-fontSize-sm); }\n .bc-agentMessage div p,\n .bc-clientMessage div p {\n padding: 0;\n margin: 0; }\n\n.bc-note {\n text-align: center;\n gap: 5px; }\n .bc-note > div {\n background-color: #f9f9f9 !important;\n /* Light background */\n display: inline-block;\n padding: 8px;\n border-radius: 5px;\n overflow: hidden;\n word-break: break-word;\n text-decoration: none;\n background-color: transparent;\n border: 1px solid #999;\n max-width: 60%; }\n\n.status-icon.read {\n color: var(--bc-chat-success-color); }\n\n.status-icon.failed {\n color: var(--bc-chat-danger-color); }\n .status-icon.failed .resend {\n color: var(--bc-chat-dark-gray-color);\n cursor: pointer;\n margin: 0 10px; }\n\n.bc-agentMessage > div:not(.bc-debugCon),\n.bc-clientMessage > div:not(.bc-debugCon) {\n display: inline-block;\n padding: 8px;\n border-radius: 5px;\n overflow: hidden;\n word-break: break-word;\n text-decoration: none;\n background-color: transparent; }\n\n.bc-agentMessage .bc-fileMessage,\n.bc-clientMessage .bc-fileMessage {\n display: inline-block;\n padding: 8px 20px;\n border-radius: 5px;\n overflow: hidden;\n word-break: break-word;\n text-decoration: none;\n background-color: transparent;\n cursor: pointer; }\n .bc-agentMessage .bc-fileMessage img,\n .bc-clientMessage .bc-fileMessage img {\n vertical-align: middle;\n margin-right: 10px;\n width: 15px;\n height: 16px; }\n\n.bc-agentMessage .bc-locationMessage,\n.bc-clientMessage .bc-locationMessage {\n display: inline-block;\n padding: 8px 20px;\n border-radius: 5px;\n overflow: hidden;\n word-break: break-word;\n text-decoration: none;\n background-color: transparent;\n cursor: pointer; }\n .bc-agentMessage .bc-locationMessage img,\n .bc-clientMessage .bc-locationMessage img {\n vertical-align: middle;\n margin-right: 10px;\n width: 30px; }\n\n.bc-agentMessage {\n text-align: left;\n display: flex;\n align-items: flex-end;\n flex-wrap: wrap;\n gap: 5px; }\n .bc-agentMessage .bc-fileMessage,\n .bc-agentMessage .bc-locationMessage {\n color: var(--bc-chat-dark-gray-color);\n cursor: pointer; }\n .bc-agentMessage .bc-fileMessage img,\n .bc-agentMessage .bc-locationMessage img {\n vertical-align: middle;\n margin-right: 10px;\n width: 30px; }\n .bc-agentMessage > div:not(.bc-debugCon),\n .bc-agentMessage .bc-fileMessage,\n .bc-agentMessage .bc-locationMessage,\n .bc-agentMessage audio {\n border-bottom-left-radius: 0; }\n\n.bc-agentMessage:first-child {\n flex: 1 0 50%; }\n\n.bc-agentMessage > :nth-child(2) {\n flex: 0 1 auto;\n max-width: 85%; }\n\n.bc-clientMessage {\n padding-left: 20px;\n text-align: right; }\n .bc-clientMessage > div:not(.bc-debugCon),\n .bc-clientMessage .bc-fileMessage,\n .bc-clientMessage .bc-locationMessage,\n .bc-clientMessage audio {\n color: #fff;\n border-bottom-right-radius: 0; }\n .bc-clientMessage svg path:nth-child(2) {\n fill: #fff; }\n\n.bc-mediaMessage video,\n.bc-mediaMessage img {\n width: 300px;\n margin-bottom: -5px; }\n\n.bc-mediaMessage.audio video {\n height: 40px; }\n\n.bc-response-debug {\n background-color: transparent;\n color: #f5a623;\n padding: 0; }\n .bc-response-debug span {\n text-decoration: underline; }\n\n.bc-selectionContainer {\n display: flex;\n align-items: flex-start;\n flex-wrap: wrap; }\n\n.bc-selectionContainer:first-child {\n flex: 1 0 50%; }\n\n.bc-debug-panel {\n border-radius: 10px;\n box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.15);\n border: solid 1px #ffffff;\n background-color: #ffffff;\n color: var(--bc-chat-dark-gray-color);\n display: table;\n width: calc(100% - 40px);\n margin: 10px -40px 10px 0;\n text-align: left;\n padding: 8px;\n max-width: 310px; }\n\n.bc-exception-debug {\n color: #f5a623;\n position: relative; }\n .bc-exception-debug .bc-exception-icon {\n width: 30px;\n position: absolute;\n top: 3px;\n left: 10px; }\n .bc-exception-debug span {\n margin-left: 40px; }\n\n.bc-parameters-debug span {\n text-decoration: underline; }\n\n.bc-parameters-debug .bc-parameters-title {\n width: 100%;\n border-bottom: solid 1px #f3f3f3;\n text-align: left;\n font-weight: bold;\n margin-bottom: 6px; }\n\n.bc-debugCon {\n width: 100%; }\n");const D=l.default.i`
66
66
  background-image: url(${e=>e.brandLogo||p});
67
67
  width: 30px;
68
68
  height: 30px;
@@ -72,7 +72,7 @@
72
72
  border-radius: 50%;
73
73
  background-repeat: no-repeat;
74
74
 
75
- `;function B(e,n){return"note"===e?"bc-note":n?"bc-agentMessage":"bc-clientMessage"}const F=n=>{const{type:t,isAgent:i}=n.message,a=M[t]??null;return a?e.jsxs("div",{className:B(t,i),children:[i&&"note"!==t?e.jsx(D,{brandLogo:n.config?.brandLogo}):null,e.jsx(a,{message:n.message}),i&&"note"!==t?e.jsx(S,{message:n.message}):null,e.jsx(L,{message:n.message})]}):null},N=l.default.div`
75
+ `;function B(e,n){return"note"===e?"bc-note":n?"bc-agentMessage":"bc-clientMessage"}const F=n=>{const{type:t,isAgent:i}=n.message,a=I[t]??null;return a?e.jsxs("div",{className:B(t,i),children:[i&&"note"!==t?e.jsx(D,{brandLogo:n.config?.brandLogo}):null,e.jsx(a,{message:n.message}),i&&"note"!==t?e.jsx(S,{message:n.message}):null,e.jsx(L,{message:n.message})]}):null},N=l.default.div`
76
76
  width: 100%;
77
77
  display: flex;
78
78
  align-items: center;
@@ -85,7 +85,22 @@
85
85
  align-items: center;
86
86
  ${e=>e.centered?"":e.isAgent?"margin-left: 34px;":"margin-right: 8px;"}
87
87
  }
88
- `,Z=({message:n})=>e.jsx("div",{children:e.jsx(N,{isAgent:n.isAgent,centered:"note"===n.type,children:e.jsx("div",{className:"date-seperator-content",children:new Date(n.createdAt).toLocaleString("en-US")})})}),R="bc-message-list-content",G=l.default.div`
88
+ `,Z=({message:n})=>e.jsx("div",{children:e.jsx(N,{isAgent:n.isAgent,centered:"note"===n.type,children:e.jsx("div",{className:"date-seperator-content",children:new Date(n.createdAt).toLocaleString("en-US")})})}),R=l.default.div`
89
+ width: 90%;
90
+ display: flex;
91
+ align-items: center;
92
+ justify-content: center;
93
+ border-bottom: solid 1px #ddd;
94
+ margin: 30px auto 40px;
95
+ .seperator-content {
96
+ ${e=>`background-color: ${e.backgroundColor};`}
97
+ display: flex;
98
+ justify-content: center;
99
+ align-items: center;
100
+ margin-bottom: -10px;
101
+ padding:0 16px;
102
+ }
103
+ `,G=({data:n,config:t})=>e.jsx("div",{children:e.jsx(R,{backgroundColor:t.backgroundColor,children:e.jsx("div",{className:"seperator-content",children:n.content})})}),J="bc-message-list-content",K=l.default.div`
89
104
  height: 100%;
90
105
  width: 100%;
91
106
  overflow-y: auto;
@@ -93,22 +108,22 @@
93
108
  background-size: 100% 100%;
94
109
  background-image: ${e=>`url(${e.config.backgroundImage})`};
95
110
  ${e=>e.config.backgroundColor&&`background-color: ${e.config.backgroundColor};`}
96
- `,J=({sendMessage:t,debug:i,config:a,messages:o})=>(n.useEffect((()=>{const e=document.getElementById(R);if(!e)return;const n=e.scrollHeight;e.style.scrollBehavior="smooth",e.style.overscrollBehavior="contain",e.scroll(0,n)}),[o]),e.jsx(G,{id:R,config:a,children:o?.map(((n,r)=>e.jsxs("div",{children:[e.jsx(F,{message:n,index:r,sendMessage:t,messageActionsEnabled:o.length-1===r,debug:i,config:a}),e.jsx(Z,{message:n})]},n.messageId?n.messageId:"message"+r)))},R)),K="text";var P={EN:{share_my_location:"Share My Location",share_my_current_location:"Share My Current Location",placeholder:"Type a Message",see_your_location:"See Your Location",location_permission:"Please give location permission"},TR:{share_my_location:"Konumumu paylaş",share_my_current_location:"GÃŧncel konumumu paylaş",placeholder:"MesajÄąnÄązÄą yazÄąn",see_your_location:"Konumunuzu GÃļrÃŧntÃŧleyin",location_permission:"LÃŧtfen konum paylaÅŸÄąmÄą için izin verin"},DE:{share_my_location:"Standortfreigabe",share_my_current_location:"Meinen aktuellen Standort teilen",placeholder:"Geben Sie eine Nachricht ein",see_your_location:"Sehen Sie Ihren Standort",location_permission:"Bitte geben Sie Ihren Standort frei"}};const Q=l.default.span`
111
+ `,P=({sendMessage:t,debug:i,config:a,messages:o,onReachingUp:r})=>(n.useEffect((()=>{const e=document.getElementById(J);if(!e)return;const n=e.scrollHeight;e.style.scrollBehavior="smooth",e.style.overscrollBehavior="contain",e.scroll(0,n);const t=()=>{0===e.scrollTop&&r?.()};return e.addEventListener("scroll",t),()=>{e.removeEventListener("scroll",t)}}),[o,r]),e.jsx(K,{id:J,config:a,children:o?.map(((n,r)=>"seperator"===n.type?e.jsx(G,{data:n,config:a}):e.jsxs("div",{children:[e.jsx(F,{message:n,index:r,sendMessage:t,messageActionsEnabled:o.length-1===r,debug:i,config:a}),e.jsx(Z,{message:n})]},n.messageId?n.messageId:"message"+r)))},J)),Q="text";var H={EN:{share_my_location:"Share My Location",share_my_current_location:"Share My Current Location",placeholder:"Type a Message",see_your_location:"See Your Location",location_permission:"Please give location permission"},TR:{share_my_location:"Konumumu paylaş",share_my_current_location:"GÃŧncel konumumu paylaş",placeholder:"MesajÄąnÄązÄą yazÄąn",see_your_location:"Konumunuzu GÃļrÃŧntÃŧleyin",location_permission:"LÃŧtfen konum paylaÅŸÄąmÄą için izin verin"},DE:{share_my_location:"Standortfreigabe",share_my_current_location:"Meinen aktuellen Standort teilen",placeholder:"Geben Sie eine Nachricht ein",see_your_location:"Sehen Sie Ihren Standort",location_permission:"Bitte geben Sie Ihren Standort frei"}};const W=l.default.span`
97
112
  cursor: pointer;
98
113
  width: 20px;
99
114
  height: 20px;
100
115
  margin: 5px;
101
- `,H=()=>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:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}),W=()=>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"})}),Y=({file:n,isFileSelected:t,cancelFileUpload:i})=>e.jsxs("div",{className:"bc-uploadFileDetails",style:{border:t?"green dashed 1px":""},id:"uploadFileDetails",children:[e.jsx("div",{className:"bc-uploadedFile",children:g.SupportedImageFormats.indexOf(n.extension)>=0?e.jsx("img",{src:n.fileUrl,alt:"",className:"bc-imageFile"}):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+dISpDJ3m9TlVr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UzJ+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:i,children:e.jsx(W,{})})})]}),U=({text:t,setText:i,config:a,send:o})=>{const r=n.useRef(null),s=n.useCallback((()=>{const e=r.current;e.style.height="20px";const n=e.scrollHeight;n!==e.offsetHeight&&(e.style.height=n+"px")}),[]);return n.useEffect((()=>{t||(s(),r.current.focus())}),[s,t]),e.jsx("textarea",{ref:r,value:t,className:"bc-messageInputTextArea",id:"textInput",placeholder:a.inputPlaceholder||P[a.language]?.placeholder,maxLength:1024,onKeyDown:e=>{if("Enter"===e.key&&(e.shiftKey||e.ctrlKey||e.altKey)){e.preventDefault();const n=r.current.selectionStart,a=t.slice(0,n)+"\n"+t.slice(n);return i(a),void s()}"Enter"===e.key&&(e.preventDefault(),o(),s())},onChange:e=>{i(e.target.value),s()}})},T=({config:n,send:t,file:i,isFileSelected:a,text:o,setText:r,cancelFileUpload:s})=>e.jsxs("div",{className:"bc-messageInput",children:[i?e.jsx(Y,{file:i,isFileSelected:a,cancelFileUpload:s}):e.jsx(U,{text:o,setText:r,config:n,send:t}),e.jsx(Q,{onClick:()=>t(),children:o||i?e.jsx(H,{}):null})]});async function V(e,n,t){const i=new r.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 r.AnonymousCredential).getContainerClient("anonymous"),a=new Date,s=`${a.getFullYear()}-${String(a.getMonth()+1).padStart(2,"0")}`,c=i.getBlockBlobClient(`${s}/${o.v4()}`);try{await c.uploadBrowserData(e,{onProgress:t=>{const i=Math.round(t.loadedBytes/e.size*100);n(i)},blockSize:4194304,concurrency:20,blobHTTPHeaders:{blobContentType:e.type}});t(c.url.split("?")[0])}catch(e){t(void 0,"Error uploading file:"+e.message)}}const O=(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`,q=l.default.i`
102
- ${e=>O("url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' x='0px' y='0px' width='50' height='50' viewBox='0 0 48 48'%3E%3Cpath d='M 19.5 3 C 17.585045 3 16 4.5850452 16 6.5 L 16 23.253906 A 1.50015 1.50015 0 0 0 16 23.740234 L 16 32.5 C 16 34.414955 17.585045 36 19.5 36 L 30.5 36 C 32.414955 36 34 34.414955 34 32.5 L 34 23.746094 A 1.50015 1.50015 0 0 0 34 23.259766 L 34 6.5 C 34 4.5850452 32.414955 3 30.5 3 L 19.5 3 z M 19.5 6 L 30.5 6 C 30.795045 6 31 6.2049548 31 6.5 L 31 22 L 19 22 L 19 6.5 C 19 6.2049548 19.204955 6 19.5 6 z M 11.476562 21.978516 A 1.50015 1.50015 0 0 0 10 23.5 L 10 32.5 C 10 37.728774 14.271226 42 19.5 42 L 23.5 42 L 23.5 46 A 1.50015 1.50015 0 1 0 26.5 46 L 26.5 42 L 30.5 42 C 35.728774 42 40 37.728774 40 32.5 L 40 23.5 A 1.50015 1.50015 0 1 0 37 23.5 L 37 32.5 C 37 36.107226 34.107226 39 30.5 39 L 19.5 39 C 15.892774 39 13 36.107226 13 32.5 L 13 23.5 A 1.50015 1.50015 0 0 0 11.476562 21.978516 z M 19 25 L 31 25 L 31 32.5 C 31 32.795045 30.795045 33 30.5 33 L 19.5 33 C 19.204955 33 19 32.795045 19 32.5 L 19 25 z M 25 27 A 2 2 0 0 0 25 31 A 2 2 0 0 0 25 27 z' fill='%23a3a3a3'%3E%3C/path%3E%3C/svg%3E%0A\");",e)}
103
- `,X=()=>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"})});let $;const _=({setProgress:t,setFile:i,setError:a,send:o})=>{const[r,s]=n.useState(!1);n.useEffect((()=>{const e=document.createElement("script");return e.src="https://cdn.bcrumbs.net/bc-assets/scripts/mic-recorder-to-mp3.js",e.async=!0,e.onload=()=>console.log("Script Loaded"),document.body.appendChild(e),()=>{document.body.removeChild(e)}}),[]);const c=n.useCallback((()=>{if(!$){if("function"!=typeof MicRecorder)return void a("Please wait a little until voice library is loaded");$=new MicRecorder({bitRate:128})}a(void 0),r?$.stop().getMp3().then((([e,n])=>{s(!1);V(new File([n],"recording.mp3",{type:"audio/mpeg"}),t,((e,n)=>{e?o({fileUrl:e,fileName:"recording",extension:"mp3"}):n&&a(n)}))})).catch((e=>a(e.message))):navigator.mediaDevices.getUserMedia({audio:!0}).then((()=>{$.start().then((()=>{s(!0)})).catch((e=>a(e.message)))})).catch((e=>a(e.message)))}),[r,a,t,o]);return e.jsxs("div",{id:"voiceRecorderIcon",className:"mic-container",children:[r?e.jsx("i",{onClick:c,children:e.jsx(X,{})}):e.jsx(q,{onClick:c,activeColor:"var(--bc-chat-dark-gray-color)"}),e.jsx("div",{className:"circle "+(r?"active":"")})]})};const ee=l.default.i`
104
- ${e=>O("url(\"data:image/svg+xml,%3Csvg id='Component_25_5' data-name='Component 25 – 5' xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 15.999 16'%3E%3Cpath id='Path_805' data-name='Path 805' d='M8,16a8,8,0,1,1,8-8,8.009,8.009,0,0,1-8,8M8,1.211A6.789,6.789,0,1,0,14.788,8,6.8,6.8,0,0,0,8,1.211' fill='%23a3a3a3'/%3E%3Cpath id='Path_806' data-name='Path 806' d='M10.908,19.478a4.716,4.716,0,0,1-3.359-1.392.605.605,0,0,1,.856-.856,3.537,3.537,0,0,0,5,0,.605.605,0,1,1,.856.856,4.716,4.716,0,0,1-3.359,1.392' transform='translate(-2.908 -6.728)' fill='%23a3a3a3'/%3E%3Cpath id='Path_807' data-name='Path 807' d='M7.306,10.925A1.635,1.635,0,1,1,8.942,9.289a1.638,1.638,0,0,1-1.635,1.635m0-2.06a.424.424,0,1,0,.424.424.425.425,0,0,0-.424-.424' transform='translate(-2.237 -3.02)' fill='%23a3a3a3'/%3E%3Cpath id='Path_808' data-name='Path 808' d='M16.986,10.925a1.635,1.635,0,1,1,1.635-1.635,1.638,1.638,0,0,1-1.635,1.635m0-2.06a.424.424,0,1,0,.424.424.425.425,0,0,0-.424-.424' transform='translate(-6.056 -3.02)' fill='%23a3a3a3'/%3E%3C/svg%3E%0A\");",e)}
105
- `,ne=l.default.span`
116
+ `,U=()=>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:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}),Y=()=>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"})}),T=({file:n,isFileSelected:t,cancelFileUpload:i})=>e.jsxs("div",{className:"bc-uploadFileDetails",style:{border:t?"green dashed 1px":""},id:"uploadFileDetails",children:[e.jsx("div",{className:"bc-uploadedFile",children:g.SupportedImageFormats.indexOf(n.extension)>=0?e.jsx("img",{src:n.fileUrl,alt:"",className:"bc-imageFile"}):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+23GiSXkOExHUQ4dWxrrczbB8oxfZpwwQo7TdIQMIYWn0n/Oblp/6hB3nJFk9RlDAt3CwCHVPMuT1K4YkBtYPtj+W4lYSY/G7k9HH/fpKDSEnArNlPUG/aDJYJ3BH6DRYK1Gw9rTkqzRqF9zuongZ5QzTARWU/7YhZ+yitI/QR3LyjMT1LIUDIAanhUDwLd8wC5fQe5IZ0JKs6H9i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kpQMUcC2o+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:i,children:e.jsx(Y,{})})})]}),V=({text:t,setText:i,config:a,send:o})=>{const r=n.useRef(null),s=n.useCallback((()=>{const e=r.current;e.style.height="20px";const n=e.scrollHeight;n!==e.offsetHeight&&(e.style.height=n+"px")}),[]);return n.useEffect((()=>{t||(s(),r.current.focus())}),[s,t]),e.jsx("textarea",{ref:r,value:t,className:"bc-messageInputTextArea",id:"textInput",placeholder:a.inputPlaceholder||H[a.language]?.placeholder,maxLength:1024,onKeyDown:e=>{if("Enter"===e.key&&(e.shiftKey||e.ctrlKey||e.altKey)){e.preventDefault();const n=r.current.selectionStart,a=t.slice(0,n)+"\n"+t.slice(n);return i(a),void s()}"Enter"===e.key&&(e.preventDefault(),o(),s())},onChange:e=>{i(e.target.value),s()}})},O=({config:n,send:t,file:i,isFileSelected:a,text:o,setText:r,cancelFileUpload:s})=>e.jsxs("div",{className:"bc-messageInput",children:[i?e.jsx(T,{file:i,isFileSelected:a,cancelFileUpload:s}):e.jsx(V,{text:o,setText:r,config:n,send:t}),e.jsx(W,{onClick:()=>t(),children:o||i?e.jsx(U,{}):null})]});async function q(e,n,t){const i=new r.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 r.AnonymousCredential).getContainerClient("anonymous"),a=new Date,s=`${a.getFullYear()}-${String(a.getMonth()+1).padStart(2,"0")}`,c=i.getBlockBlobClient(`${s}/${o.v4()}`);try{await c.uploadBrowserData(e,{onProgress:t=>{const i=Math.round(t.loadedBytes/e.size*100);n(i)},blockSize:4194304,concurrency:20,blobHTTPHeaders:{blobContentType:e.type}});t(c.url.split("?")[0])}catch(e){t(void 0,"Error uploading file:"+e.message)}}const X=(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`,$=l.default.i`
117
+ ${e=>X("url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' x='0px' y='0px' width='50' height='50' viewBox='0 0 48 48'%3E%3Cpath d='M 19.5 3 C 17.585045 3 16 4.5850452 16 6.5 L 16 23.253906 A 1.50015 1.50015 0 0 0 16 23.740234 L 16 32.5 C 16 34.414955 17.585045 36 19.5 36 L 30.5 36 C 32.414955 36 34 34.414955 34 32.5 L 34 23.746094 A 1.50015 1.50015 0 0 0 34 23.259766 L 34 6.5 C 34 4.5850452 32.414955 3 30.5 3 L 19.5 3 z M 19.5 6 L 30.5 6 C 30.795045 6 31 6.2049548 31 6.5 L 31 22 L 19 22 L 19 6.5 C 19 6.2049548 19.204955 6 19.5 6 z M 11.476562 21.978516 A 1.50015 1.50015 0 0 0 10 23.5 L 10 32.5 C 10 37.728774 14.271226 42 19.5 42 L 23.5 42 L 23.5 46 A 1.50015 1.50015 0 1 0 26.5 46 L 26.5 42 L 30.5 42 C 35.728774 42 40 37.728774 40 32.5 L 40 23.5 A 1.50015 1.50015 0 1 0 37 23.5 L 37 32.5 C 37 36.107226 34.107226 39 30.5 39 L 19.5 39 C 15.892774 39 13 36.107226 13 32.5 L 13 23.5 A 1.50015 1.50015 0 0 0 11.476562 21.978516 z M 19 25 L 31 25 L 31 32.5 C 31 32.795045 30.795045 33 30.5 33 L 19.5 33 C 19.204955 33 19 32.795045 19 32.5 L 19 25 z M 25 27 A 2 2 0 0 0 25 31 A 2 2 0 0 0 25 27 z' fill='%23a3a3a3'%3E%3C/path%3E%3C/svg%3E%0A\");",e)}
118
+ `,_=()=>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"})}),ee=()=>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"})});let ne;const te=({setProgress:t,setFile:i,setError:a,send:o})=>{const[r,s]=n.useState(!1);n.useEffect((()=>{const e=document.createElement("script");return e.src="https://cdn.bcrumbs.net/bc-assets/scripts/mic-recorder-to-mp3.js",e.async=!0,e.onload=()=>console.log("Script Loaded"),document.body.appendChild(e),()=>{document.body.removeChild(e)}}),[]);const c=n.useCallback((()=>{if(!ne){if("function"!=typeof MicRecorder)return void a("Please wait a little until voice library is loaded");ne=new MicRecorder({bitRate:128})}a(void 0),r?ne.stop().getMp3().then((([e,n])=>{s(!1);q(new File([n],"recording.mp3",{type:"audio/mpeg"}),t,((e,n)=>{e?o({fileUrl:e,fileName:"recording",extension:"mp3"}):n&&a(n)}))})).catch((e=>a(e.message))):navigator.mediaDevices.getUserMedia({audio:!0}).then((()=>{ne.start().then((()=>{s(!0)})).catch((e=>a(e.message)))})).catch((e=>a(e.message)))}),[r,a,t,o]);return e.jsxs(e.Fragment,{children:[r?e.jsx("i",{onClick:()=>{ne?.stop(),s(!1)},children:e.jsx(ee,{})}):null,e.jsxs("div",{id:"voiceRecorderIcon",className:"mic-container",children:[r?e.jsx("i",{onClick:c,children:e.jsx(_,{})}):e.jsx($,{onClick:c,activeColor:"var(--bc-chat-dark-gray-color)"}),e.jsx("div",{className:"circle "+(r?"active":"")})]})]})};const ie=l.default.i`
119
+ ${e=>X("url(\"data:image/svg+xml,%3Csvg id='Component_25_5' data-name='Component 25 – 5' xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 15.999 16'%3E%3Cpath id='Path_805' data-name='Path 805' d='M8,16a8,8,0,1,1,8-8,8.009,8.009,0,0,1-8,8M8,1.211A6.789,6.789,0,1,0,14.788,8,6.8,6.8,0,0,0,8,1.211' fill='%23a3a3a3'/%3E%3Cpath id='Path_806' data-name='Path 806' d='M10.908,19.478a4.716,4.716,0,0,1-3.359-1.392.605.605,0,0,1,.856-.856,3.537,3.537,0,0,0,5,0,.605.605,0,1,1,.856.856,4.716,4.716,0,0,1-3.359,1.392' transform='translate(-2.908 -6.728)' fill='%23a3a3a3'/%3E%3Cpath id='Path_807' data-name='Path 807' d='M7.306,10.925A1.635,1.635,0,1,1,8.942,9.289a1.638,1.638,0,0,1-1.635,1.635m0-2.06a.424.424,0,1,0,.424.424.425.425,0,0,0-.424-.424' transform='translate(-2.237 -3.02)' fill='%23a3a3a3'/%3E%3Cpath id='Path_808' data-name='Path 808' d='M16.986,10.925a1.635,1.635,0,1,1,1.635-1.635,1.638,1.638,0,0,1-1.635,1.635m0-2.06a.424.424,0,1,0,.424.424.425.425,0,0,0-.424-.424' transform='translate(-6.056 -3.02)' fill='%23a3a3a3'/%3E%3C/svg%3E%0A\");",e)}
120
+ `,ae=l.default.span`
106
121
  margin: 8px;
107
122
  cursor: pointer;
108
123
  font-size: var(--bc-chat-fontSize-xl);
109
- `,te=({onClick:n})=>e.jsx("div",{id:"emojiIcon",children:e.jsx(ee,{onClick:n,activeColor:"var(--bc-chat-dark-gray-color)"})}),ie=({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=h.map(((n,t)=>e.jsx(ne,{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})})},ae=l.default.i`
110
- ${e=>O("url(\"data:image/svg+xml,%3Csvg id='attach' xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 15.317 16'%3E%3Cpath id='Path_690' data-name='Path 690' d='M-431.392,1429.762a4.112,4.112,0,0,1-2.928-1.213,4.145,4.145,0,0,1,0-5.854l8.066-8.065a2.94,2.94,0,0,1,2.094-.867,2.94,2.94,0,0,1,2.094.867,2.941,2.941,0,0,1,.867,2.094,2.94,2.94,0,0,1-.867,2.094l-8.065,8.066a1.826,1.826,0,0,1-2.523,0,1.773,1.773,0,0,1-.522-1.261,1.773,1.773,0,0,1,.523-1.262l8.065-8.065a.606.606,0,0,1,.857,0,.6.6,0,0,1,0,.856l-8.065,8.066a.566.566,0,0,0-.168.4.569.569,0,0,0,.168.4.585.585,0,0,0,.809,0l8.066-8.066a1.738,1.738,0,0,0,.512-1.238,1.739,1.739,0,0,0-.512-1.238,1.792,1.792,0,0,0-2.475,0l-8.066,8.065a2.933,2.933,0,0,0,0,4.141,2.933,2.933,0,0,0,4.141,0l8.075-8.075a.6.6,0,0,1,.857,0,.6.6,0,0,1,0,.856l-8.075,8.075A4.111,4.111,0,0,1-431.392,1429.762Z' transform='translate(435.53 -1413.762)' fill='%23a3a3a3'/%3E%3C/svg%3E%0A\");",e)}
111
- `,oe=({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,c=r.substring(r.lastIndexOf(".")+1).toLowerCase();return g.SupportedFormats.indexOf(c)<0?a("File type is not valid."):s>g.MaxFileSize?a("Maximum limit is 20 MBs"):void V(o,t,((e,n)=>{e?i({fileUrl:e,fileName:r,extension:c}):n&&a(n)}))}),[t,i,a]);return e.jsxs("div",{id:"attachIcon",children:[e.jsx("label",{htmlFor:"fileInput",children:e.jsx(ae,{activeColor:"var(--bc-chat-dark-gray-color)"})}),e.jsx("input",{type:"file",className:"bc-fileUpload",id:"fileInput",onChange:o})]})},re=l.default.div`
124
+ `,oe=({onClick:n})=>e.jsx("div",{id:"emojiIcon",children:e.jsx(ie,{onClick:n,activeColor:"var(--bc-chat-dark-gray-color)"})}),re=({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=h.map(((n,t)=>e.jsx(ae,{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})})},se=l.default.i`
125
+ ${e=>X("url(\"data:image/svg+xml,%3Csvg id='attach' xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 15.317 16'%3E%3Cpath id='Path_690' data-name='Path 690' d='M-431.392,1429.762a4.112,4.112,0,0,1-2.928-1.213,4.145,4.145,0,0,1,0-5.854l8.066-8.065a2.94,2.94,0,0,1,2.094-.867,2.94,2.94,0,0,1,2.094.867,2.941,2.941,0,0,1,.867,2.094,2.94,2.94,0,0,1-.867,2.094l-8.065,8.066a1.826,1.826,0,0,1-2.523,0,1.773,1.773,0,0,1-.522-1.261,1.773,1.773,0,0,1,.523-1.262l8.065-8.065a.606.606,0,0,1,.857,0,.6.6,0,0,1,0,.856l-8.065,8.066a.566.566,0,0,0-.168.4.569.569,0,0,0,.168.4.585.585,0,0,0,.809,0l8.066-8.066a1.738,1.738,0,0,0,.512-1.238,1.739,1.739,0,0,0-.512-1.238,1.792,1.792,0,0,0-2.475,0l-8.066,8.065a2.933,2.933,0,0,0,0,4.141,2.933,2.933,0,0,0,4.141,0l8.075-8.075a.6.6,0,0,1,.857,0,.6.6,0,0,1,0,.856l-8.075,8.075A4.111,4.111,0,0,1-431.392,1429.762Z' transform='translate(435.53 -1413.762)' fill='%23a3a3a3'/%3E%3C/svg%3E%0A\");",e)}
126
+ `,ce=({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,c=r.substring(r.lastIndexOf(".")+1).toLowerCase();return g.SupportedFormats.indexOf(c)<0?a("File type is not valid."):s>g.MaxFileSize?a("Maximum limit is 20 MBs"):void q(o,t,((e,n)=>{e?i({fileUrl:e,fileName:r,extension:c}):n&&a(n)}))}),[t,i,a]);return e.jsxs("div",{id:"attachIcon",children:[e.jsx("label",{htmlFor:"fileInput",children:e.jsx(se,{activeColor:"var(--bc-chat-dark-gray-color)"})}),e.jsx("input",{type:"file",className:"bc-fileUpload",id:"fileInput",onChange:o})]})},le=l.default.div`
112
127
  padding: 0px 0px 0px 10px;
113
128
  margin: 0px;
114
129
  width: fit-content;
@@ -123,7 +138,7 @@
123
138
  cursor: pointer;
124
139
  display: block;
125
140
  }
126
- `,se=({setView:t,setFile:i,setProgress:a,setError:o,text:r,setText:s,send:c})=>{const[l,d]=n.useState(!1);return e.jsxs("div",{className:"bc-inputActions",id:"bc-inputActions",children:[e.jsxs(re,{id:"iconsContainer",children:[e.jsx(oe,{setFile:i,setProgress:a,setError:o}),e.jsx(te,{onClick:()=>d(!0)}),e.jsx(_,{setFile:i,setError:o,setProgress:a,send:c})]}),l?e.jsx(ie,{text:r,setText:s,onClick:()=>d(!1)}):null]})};z('.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.bc-messageInput {\n min-height: 30px;\n max-height: 100%;\n border: 1px solid #d9d9d9;\n background-color: #fff;\n overflow-y: hidden;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 20px; }\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 16px;\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-inputActions {\n display: flex;\n align-items: center;\n position: relative;\n width: 100%;\n height: 38px; }\n .bc-inputActions .bc-fileUpload {\n display: none; }\n .bc-inputActions i {\n display: block;\n margin: 0 5px; }\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 #0000001a;\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.bc-uploadFileDetails {\n background-color: transparent;\n display: flex;\n align-items: center;\n max-width: calc(100% - 40px);\n width: calc(100% - 40px);\n height: 32px;\n border-radius: 20px;\n padding: 2px 10px; }\n .bc-uploadFileDetails .bc-uploadedFile {\n max-width: 32px;\n max-height: 32px;\n pointer-events: none; }\n .bc-uploadFileDetails .bc-uploadedFile .bc-imageFile {\n max-width: 100%;\n max-height: 100%;\n pointer-events: none; }\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 .bc-uploadFileDetails .bc-uploadFileName {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n pointer-events: none; }\n .bc-uploadFileDetails .bc-uploadFileName span {\n padding: 10px;\n pointer-events: none; }\n .bc-uploadFileDetails .bc-uploadFileCancel {\n cursor: pointer;\n margin-bottom: -6px; }\n\n.mic-container {\n position: relative; }\n .mic-container i {\n transition: 0.9s;\n z-index: 10;\n position: relative; }\n .mic-container .circle {\n z-index: 4;\n top: -2px;\n left: 2px;\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 .mic-container .circle:before {\n content: "";\n width: 30px;\n height: 30px;\n border-radius: 50%;\n opacity: 0.5;\n z-index: 3;\n position: absolute; }\n .mic-container .circle.active {\n background-color: #A8E6A3; }\n .mic-container .circle.active:before {\n background: #A8E6A3;\n animation: bounce 0.8s ease-in-out infinite 0.5s; }\n\n@keyframes bounce {\n 0% {\n transform: scale(1); }\n 25% {\n transform: scale(1.4); }\n 75% {\n transform: scale(1); }\n 100% {\n transform: scale(1.3); } }\n');const ce=l.default.div`
141
+ `,de=({setView:t,setFile:i,setProgress:a,setError:o,text:r,setText:s,send:c})=>{const[l,d]=n.useState(!1);return e.jsxs("div",{className:"bc-inputActions",id:"bc-inputActions",children:[e.jsxs(le,{id:"iconsContainer",children:[e.jsx(ce,{setFile:i,setProgress:a,setError:o}),e.jsx(oe,{onClick:()=>d(!0)}),e.jsx(te,{setFile:i,setError:o,setProgress:a,send:c})]}),l?e.jsx(re,{text:r,setText:s,onClick:()=>d(!1)}):null]})};z('.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.bc-messageInput {\n min-height: 30px;\n max-height: 100%;\n border: 1px solid #d9d9d9;\n background-color: #fff;\n overflow-y: hidden;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 20px; }\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 16px;\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-inputActions {\n display: flex;\n align-items: center;\n position: relative;\n width: 100%;\n height: 38px; }\n .bc-inputActions .bc-fileUpload {\n display: none; }\n .bc-inputActions i {\n display: block;\n margin: 0 5px; }\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 #0000001a;\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.bc-uploadFileDetails {\n background-color: transparent;\n display: flex;\n align-items: center;\n max-width: calc(100% - 40px);\n width: calc(100% - 40px);\n height: 32px;\n border-radius: 20px;\n padding: 2px 10px; }\n .bc-uploadFileDetails .bc-uploadedFile {\n max-width: 32px;\n max-height: 32px;\n pointer-events: none; }\n .bc-uploadFileDetails .bc-uploadedFile .bc-imageFile {\n max-width: 100%;\n max-height: 100%;\n pointer-events: none; }\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 .bc-uploadFileDetails .bc-uploadFileName {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n pointer-events: none; }\n .bc-uploadFileDetails .bc-uploadFileName span {\n padding: 10px;\n pointer-events: none; }\n .bc-uploadFileDetails .bc-uploadFileCancel {\n cursor: pointer;\n margin-bottom: -6px; }\n\n.mic-container {\n position: relative; }\n .mic-container i {\n transition: 0.9s;\n z-index: 10;\n position: relative; }\n .mic-container .circle {\n z-index: 4;\n top: -2px;\n left: 2px;\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 .mic-container .circle:before {\n content: "";\n width: 30px;\n height: 30px;\n border-radius: 50%;\n opacity: 0.5;\n z-index: 3;\n position: absolute; }\n .mic-container .circle.active {\n background-color: #A8E6A3; }\n .mic-container .circle.active:before {\n background: #A8E6A3;\n animation: bounce 0.8s ease-in-out infinite 0.5s; }\n\n@keyframes bounce {\n 0% {\n transform: scale(1); }\n 25% {\n transform: scale(1.4); }\n 75% {\n transform: scale(1); }\n 100% {\n transform: scale(1.3); } }\n');const ge=l.default.div`
127
142
  width: calc(100% - 40px);
128
143
  background-color: #d9d9d94d;
129
144
  padding: 10px 20px;
@@ -135,35 +150,32 @@
135
150
  .bc-InputArea {
136
151
  flex: 1; /* Take up the remaining space */
137
152
  }
138
- .bc-CommandsArea {
139
- width: 90px;
140
- }
141
153
  .bc-uploadFileError {
142
154
  width: 100%;
143
155
  color: red;
144
156
  margin-top: 6px;
145
157
  text-align: center;
146
158
  }
147
- `,le=({config:t,sendMessage:i,setView:a})=>{const[o,r]=n.useState(),[s,c]=n.useState(),[l,d]=n.useState(),[p,h]=n.useState(0),b=n.useCallback((e=>{if(e){const{fileUrl:n,extension:t}=e;i(g.SupportedImageFormats.indexOf(t)>=0?"image":g.SupportedAudioFormats.indexOf(t)>=0?"audio":"document",n)}else if(s){const{fileUrl:e,extension:n}=s;i(g.SupportedImageFormats.indexOf(n)>=0?"image":g.SupportedAudioFormats.indexOf(n)>=0?"audio":"document",e),c(void 0)}else i(K,o),r("")}),[s,o,i]);return e.jsxs(ce,{children:[e.jsx("div",{className:"bc-InputArea",children:e.jsx(T,{config:t,send:b,text:o,setText:r,file:s,isFileSelected:!!s,cancelFileUpload:()=>c(void 0)})}),e.jsx("div",{className:"bc-CommandsArea",children:e.jsx(se,{setView:a,setFile:c,setProgress:h,setError:d,setText:r,text:o,send:b})}),l?e.jsx("div",{className:"bc-uploadFileError",children:l}):null]})},de="bc-chat-header-banner",ge=390,pe=l.default.div`
148
- ${e=>e.bannerWidth>ge?"height: 60px;":"height: 90px;"}
159
+ `,pe=({config:t,sendMessage:i,setView:a})=>{const[o,r]=n.useState(),[s,c]=n.useState(),[l,d]=n.useState(),[p,h]=n.useState(0),x=n.useCallback((e=>{if(e){const{fileUrl:n,extension:t}=e;i(g.SupportedImageFormats.indexOf(t)>=0?"image":g.SupportedAudioFormats.indexOf(t)>=0?"audio":"document",n)}else if(s){const{fileUrl:e,extension:n}=s;i(g.SupportedImageFormats.indexOf(n)>=0?"image":g.SupportedAudioFormats.indexOf(n)>=0?"audio":"document",e),c(void 0)}else i(Q,o),r("")}),[s,o,i]);return e.jsxs(ge,{children:[e.jsx("div",{className:"bc-InputArea",children:e.jsx(O,{config:t,send:x,text:o,setText:r,file:s,isFileSelected:!!s,cancelFileUpload:()=>c(void 0)})}),e.jsx("div",{className:"bc-CommandsArea",children:e.jsx(de,{setView:a,setFile:c,setProgress:h,setError:d,setText:r,text:o,send:x})}),l?e.jsx("div",{className:"bc-uploadFileError",children:l}):null]})},he="bc-chat-header-banner",xe=390,be=l.default.div`
160
+ ${e=>e.bannerWidth>xe?"height: 60px;":"height: 90px;"}
149
161
  display: block;
150
162
  width: 100%;
151
163
  background-color: transparent;
152
164
  z-index: 10;
153
165
  border-top-left-radius: 15px;
154
166
  border-top-right-radius: 15px;
155
- `,he=l.default.div`
167
+ `,me=l.default.div`
156
168
  width: 100%;
157
169
  display: flex;
158
170
  align-items: center;
159
171
  background-image: ${e=>`linear-gradient(103deg, ${e.startColor},${e.endColor})`};
160
- ${e=>e.bannerWidth<=ge?'\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMzkwIiBoZWlnaHQ9Ijg4LjM1NCIgdmlld0JveD0iMCAwIDM5MCA4OC4zNTQiPgogIDxkZWZzPgogICAgPGxpbmVhckdyYWRpZW50IGlkPSJsaW5lYXItZ3JhZGllbnQiIHgyPSIxIiB5Mj0iMSIgZ3JhZGllbnRVbml0cz0ib2JqZWN0Qm91bmRpbmdCb3giPgogICAgICA8c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiM2NjJkOTEiLz4KIC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2Zz4K");\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;"}
161
- `,be=l.default.div`
172
+ ${e=>e.bannerWidth<=xe?'\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;"}
173
+ `,ue=l.default.div`
162
174
  width: 100%;
163
175
  height: 100%;
164
176
  display: flex;
165
- `,xe=l.default.div`
166
- ${e=>e.bannerWidth>ge?"padding-bottom: 0 !important;":""}
177
+ `,fe=l.default.div`
178
+ ${e=>e.bannerWidth>xe?"padding-bottom: 0 !important;":""}
167
179
  display: flex;
168
180
  gap: 10px;
169
181
  align-items: center;
@@ -184,8 +196,8 @@
184
196
  color: #fff;
185
197
  font-style: normal;
186
198
  }
187
- `,me=l.default.div`
188
- ${e=>e.bannerWidth>ge?"padding-bottom: 0 !important;":""}
199
+ `,Ce=l.default.div`
200
+ ${e=>e.bannerWidth>xe?"padding-bottom: 0 !important;":""}
189
201
  display: flex;
190
202
  flex-direction: row-reverse;
191
203
  gap: 10px;
@@ -200,9 +212,9 @@
200
212
  cursor: pointer;
201
213
  display: block;
202
214
  }
203
- `,ue=l.default.i`
215
+ `,we=l.default.i`
204
216
  background-image: url("data:image/svg+xml;base64,PHN2ZyBpZD0ibWluaW1pemUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxLjgxNyIgdmlld0JveD0iMCAwIDE2IDEuODE3Ij4KICA8ZGVmcz4KICAgIDxjbGlwUGF0aCBpZD0iY2xpcC1wYXRoIj4KICAgICAgPHJlY3QgaWQ9IlJlY3RhbmdsZV82OCIgZGF0YS1uYW1lPSJSZWN0YW5nbGUgNjgiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxLjgxNyIgZmlsbD0iIzAwMCIvPgogICAgPC9jbGlwUGF0aD4KICA8L2RlZnM+CiAgPGcgaWQ9Ikdyb3VwXzMwMSIgZGF0YS1uYW1lPSJHcm91cCAzMDEiIGNsaXAtcGF0aD0idXJsKCNjbGlwLXBhdGgpIj4KICAgIDxwYXRoIGlkPSJQYXRoXzgwNCIgZGF0YS1uYW1lPSJQYXRoIDgwNCIgZD0iTTE1LjM5NCwyLjIxMUguNjA2QS42MDYuNjA2LDAsMSwxLC42MDYsMUgxNS4zOTRhLjYwNi42MDYsMCwwLDEsMCwxLjIxMSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCAtMC4zOTQpIiBmaWxsPSIjZmZmIi8+CiAgPC9nPgo8L3N2Zz4K");
205
- `,fe=({config:t,minimize:i})=>{const[a,o]=n.useState();return n.useEffect((()=>{new ResizeObserver((()=>{const e=document.getElementById(de)?.offsetWidth;e&&e>50&&e!==a&&o(e)})).observe(document.getElementById(de))}),[]),e.jsx(pe,{bannerWidth:a,className:"bc-header",children:e.jsx(he,{className:"bc-banner",id:de,startColor:"#065A60",endColor:"#006466",bannerWidth:a,children:e.jsxs(be,{className:"bc-bannerContents",children:[e.jsxs(xe,{className:"bc-companyInfo",bannerWidth:a,logo:t.brandLogo||p,children:[e.jsx("i",{}),e.jsx("span",{children:t.brandName||"BreadCrumbs"})]}),e.jsx(me,{className:"bc-bannerActions",bannerWidth:a,children:i?e.jsx(ue,{className:"bc-flow-minimize",onClick:()=>i()}):null})]})})})},Ce=l.default.div`
217
+ `,ve=({config:t,minimize:i})=>{const[a,o]=n.useState();return n.useEffect((()=>{new ResizeObserver((()=>{const e=document.getElementById(he)?.offsetWidth;e&&e>50&&e!==a&&o(e)})).observe(document.getElementById(he))}),[]),e.jsx(be,{bannerWidth:a,className:"bc-header",children:e.jsx(me,{className:"bc-banner",id:he,startColor:"#065A60",endColor:"#006466",bannerWidth:a,children:e.jsxs(ue,{className:"bc-bannerContents",children:[e.jsxs(fe,{className:"bc-companyInfo",bannerWidth:a,logo:t.brandLogo||p,children:[e.jsx("i",{}),e.jsx("span",{children:t.brandName||"BreadCrumbs"})]}),e.jsx(Ce,{className:"bc-bannerActions",bannerWidth:a,children:i?e.jsx(we,{className:"bc-flow-minimize",onClick:()=>i()}):null})]})})})},Ae=l.default.div`
206
218
  width: 100%;
207
219
  text-align: center;
208
220
  i {
@@ -233,7 +245,7 @@
233
245
  border-radius: 0px 0px 10px 10px;
234
246
  opacity: 1;
235
247
  }
236
- `,we=c.default.forwardRef((({forRate:n},t)=>e.jsxs(Ce,{className:""+(n?"bc-ratingPositioning":""),children:[e.jsx("i",{}),e.jsx("span",{children:"Powered by Bread Crumbs"})]})));z('@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..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: "Montserrat", sans-serif;\n --bc-chat-fontSize-xs: 10px;\n --bc-chat-fontSize-sm: 12px;\n --bc-chat-fontSize-md: 14px;\n --bc-chat-fontSize-lg: 18px;\n --bc-chat-fontSize-xl: 22px;\n --bc-chat-fontSize-xxl: 26px;\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-agent-message-border-color: #95D5B2;\n --bc-chat-agent-message-background-start-color: #fff;\n --bc-chat-agent-message-background-end-color: #fff;\n --bc-chat-agent-message-text-color: #000;\n --bc-chat-client-message-border-color: #95D5B2;\n --bc-chat-client-message-background-start-color: #95D5B2;\n --bc-chat-client-message-background-end-color: #95D5B2;\n --bc-chat-client-message-text-color: #000;\n --bc-chat-danger-color: #d6312e;\n --bc-chat-success-color: #58aa18;\n --bc-chat-white-color: #fff;\n --bc-chat-radius: 5px; }\n');const ve=l.default.div`
248
+ `,ke=c.default.forwardRef((({forRate:n},t)=>e.jsxs(Ae,{className:""+(n?"bc-ratingPositioning":""),children:[e.jsx("i",{}),e.jsx("span",{children:"Powered by Bread Crumbs"})]})));z('@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..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: "Montserrat", sans-serif;\n --bc-chat-fontSize-xs: 10px;\n --bc-chat-fontSize-sm: 12px;\n --bc-chat-fontSize-md: 14px;\n --bc-chat-fontSize-lg: 18px;\n --bc-chat-fontSize-xl: 22px;\n --bc-chat-fontSize-xxl: 26px;\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-agent-message-border-color: #95D5B2;\n --bc-chat-agent-message-background-start-color: #fff;\n --bc-chat-agent-message-background-end-color: #fff;\n --bc-chat-agent-message-text-color: #000;\n --bc-chat-client-message-border-color: #95D5B2;\n --bc-chat-client-message-background-start-color: #95D5B2;\n --bc-chat-client-message-background-end-color: #95D5B2;\n --bc-chat-client-message-text-color: #000;\n --bc-chat-danger-color: #d6312e;\n --bc-chat-success-color: #58aa18;\n --bc-chat-white-color: #fff;\n --bc-chat-radius: 5px; }\n');const ye=l.default.div`
237
249
  height: 100%;
238
250
  display: flex;
239
251
  flex-direction: column;
@@ -259,5 +271,5 @@
259
271
  line-height: inherit;
260
272
  font-weight: inherit;
261
273
  }
262
- `;exports.BCChat=({config:t={language:"EN",backgroundColor:"#dedede"},messages:i=[],sendMessage:a,debug:o,minimize:r})=>{const[s,c]=n.useState("MESSAGE_LIST"),l="interactive"===(i&&i.length>0&&i[i.length-1].type);return e.jsxs(ve,{className:"bc-chat",children:[t.hideHeader?null:e.jsx(fe,{config:t,minimize:r}),"MESSAGE_LIST"===s?e.jsx(J,{messages:i,sendMessage:a,debug:o,config:t},"message-list"):null,l?e.jsx(we,{forRate:!0}):t.inputDisabled?null:e.jsx(le,{sendMessage:a,setView:c,config:t},"message-input")]})};
274
+ `;exports.BCChat=({config:t={language:"EN",backgroundColor:"#dedede"},messages:i=[],sendMessage:a,debug:o,minimize:r,onReachingUp:s})=>{const[c,l]=n.useState("MESSAGE_LIST"),d="interactive"===(i&&i.length>0&&i[i.length-1].type);return e.jsxs(ye,{className:"bc-chat",children:[t.hideHeader?null:e.jsx(ve,{config:t,minimize:r}),"MESSAGE_LIST"===c?e.jsx(P,{messages:i,sendMessage:a,debug:o,config:t,onReachingUp:s},"message-list"):null,d?e.jsx(ke,{forRate:!0}):t.inputDisabled?null:e.jsx(pe,{sendMessage:a,setView:l,config:t},"message-input")]})};
263
275
  //# 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mwGAAA,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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mwGAAA,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.30",
3
+ "version": "1.0.32",
4
4
  "main": "build/index.js",
5
5
  "module": "build/index.es.js",
6
6
  "jsnext:main": "build/index.es.js",