@bcrumbs.net/bc-chat 1.0.21 → 1.0.23
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.es.js +13 -11
- package/build/index.es.js.map +1 -1
- package/build/index.js +24 -22
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.es.js
CHANGED
|
@@ -24,7 +24,9 @@ import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import i,{useMem
|
|
|
24
24
|
text-decoration: auto;
|
|
25
25
|
gap: 5px;
|
|
26
26
|
color: ${e=>`${f(e)}`};
|
|
27
|
-
|
|
27
|
+
font-size: var(--bc-chat-fontSize-sm);
|
|
28
|
+
`,y=l.a`
|
|
29
|
+
font-size: var(--bc-chat-fontSize-sm);
|
|
28
30
|
background-image: ${e=>u(e)};
|
|
29
31
|
color: ${e=>f(e)};
|
|
30
32
|
border-color: ${e=>C(e)};
|
|
@@ -37,7 +39,7 @@ import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import i,{useMem
|
|
|
37
39
|
-ms-filter: brightness(80%);
|
|
38
40
|
filter: brightness(80%);
|
|
39
41
|
}
|
|
40
|
-
`,
|
|
42
|
+
`,M=l.div`
|
|
41
43
|
display: flex;
|
|
42
44
|
flex-direction: row;
|
|
43
45
|
align-items: center;
|
|
@@ -51,7 +53,7 @@ import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import i,{useMem
|
|
|
51
53
|
background-repeat: no-repeat;
|
|
52
54
|
width: 15px;
|
|
53
55
|
height: 15px;
|
|
54
|
-
`,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(
|
|
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(y,{href:"https://www.google.com/maps/?q="+t.content,target:"_blank",rel:"noopener noreferrer",className:"bc-locationMessage",isAgent:t.isAgent,children:n(M,{children:[e(L,{color:(i=t,i.isAgent,"000000")}),e(k,{color:f(t),children:"Open location"})]})});var i},text:({message:n})=>e("div",{style:{backgroundImage:u(n),color:f(n),borderColor:C(n),borderWidth:"1px",borderStyle:"solid"},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:w,audio:w,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:u(t),color:f(t),borderColor:C(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})},S=l.div`
|
|
55
57
|
display: flex;
|
|
56
58
|
flex-direction: column;
|
|
57
59
|
gap: 5px;
|
|
@@ -60,7 +62,7 @@ import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import i,{useMem
|
|
|
60
62
|
margin: ${e=>e.isAgent?"0 40px 0 20px":"0 20px 0 40px"};
|
|
61
63
|
text-align: ${e=>e.isAgent?"left":"right"};
|
|
62
64
|
}
|
|
63
|
-
`;function
|
|
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}function D(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))}}D(".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.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 B=l.i`
|
|
64
66
|
background-image: url(${e=>e.brandLogo||m});
|
|
65
67
|
width: 30px;
|
|
66
68
|
height: 30px;
|
|
@@ -69,20 +71,20 @@ import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import i,{useMem
|
|
|
69
71
|
display: inline-block;
|
|
70
72
|
border-radius: 50%;
|
|
71
73
|
background-repeat: no-repeat;
|
|
72
|
-
`;function F(e,n){return
|
|
74
|
+
`;function F(e,n){return"note"===e?"bc-note":n?"bc-agentMessage":"bc-clientMessage"}const N=t=>{const{type:i,isAgent:a}=t.message,o=E[i]??null;return o?n("div",{className:F(i,a),children:[a&&"note"!==i?e(B,{brandLogo:t.config?.brandLogo}):null,e(o,{message:t.message}),e(z,{message:t.message})]}):null},Z=l.div`
|
|
73
75
|
width: 100%;
|
|
74
76
|
display: flex;
|
|
75
77
|
align-items: center;
|
|
76
|
-
${e=>e.isAgent?"justify-content: left;":"justify-content: right;"}
|
|
78
|
+
${e=>e.centered?"justify-content: center;":e.isAgent?"justify-content: left;":"justify-content: right;"}
|
|
77
79
|
.date-seperator-content {
|
|
78
|
-
margin-top: -10px;
|
|
80
|
+
${e=>e.centered?"margin-top: 0px;":"margin-top: -10px;"}
|
|
79
81
|
width: 130px;
|
|
80
82
|
display: flex;
|
|
81
83
|
justify-content: center;
|
|
82
84
|
align-items: center;
|
|
83
|
-
${e=>e.isAgent?"margin-left: 34px;":"margin-right: 8px;"}
|
|
85
|
+
${e=>e.centered?"":e.isAgent?"margin-left: 34px;":"margin-right: 8px;"}
|
|
84
86
|
}
|
|
85
|
-
`,R=({message:n})=>e("div",{children:e(Z,{isAgent:n.isAgent,children:e("div",{className:"date-seperator-content",children:new Date(n.createdAt).toLocaleString("en-US")})})}),G="bc-message-list-content",J=l.div`
|
|
87
|
+
`,R=({message:n})=>e("div",{children:e(Z,{isAgent:n.isAgent,centered:"note"===n.type,children:e("div",{className:"date-seperator-content",children:new Date(n.createdAt).toLocaleString("en-US")})})}),G="bc-message-list-content",J=l.div`
|
|
86
88
|
height: 100%;
|
|
87
89
|
width: 100%;
|
|
88
90
|
overflow-y: auto;
|
|
@@ -120,7 +122,7 @@ import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import i,{useMem
|
|
|
120
122
|
cursor: pointer;
|
|
121
123
|
display: block;
|
|
122
124
|
}
|
|
123
|
-
`,ce=({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(re,{id:"iconsContainer",children:[e(oe,{setFile:i,setProgress:a,setError:o}),e(te,{onClick:()=>g(!0)}),e(_,{setFile:i,setError:o,setProgress:a,send:l})]}),d?e(ie,{text:r,setText:c,onClick:()=>g(!1)}):null]})};
|
|
125
|
+
`,ce=({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(re,{id:"iconsContainer",children:[e(oe,{setFile:i,setProgress:a,setError:o}),e(te,{onClick:()=>g(!0)}),e(_,{setFile:i,setError:o,setProgress:a,send:l})]}),d?e(ie,{text:r,setText:c,onClick:()=>g(!1)}):null]})};D('.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 se=l.div`
|
|
124
126
|
width: calc(100% - 40px);
|
|
125
127
|
background-color: #d9d9d94d;
|
|
126
128
|
padding: 10px 20px;
|
|
@@ -230,7 +232,7 @@ import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import i,{useMem
|
|
|
230
232
|
border-radius: 0px 0px 10px 10px;
|
|
231
233
|
opacity: 1;
|
|
232
234
|
}
|
|
233
|
-
`,we=i.forwardRef((({forRate:t},i)=>n(fe,{className:""+(t?"bc-ratingPositioning":""),children:[e("i",{}),e("span",{children:"Powered by Bread Crumbs"})]})));
|
|
235
|
+
`,we=i.forwardRef((({forRate:t},i)=>n(fe,{className:""+(t?"bc-ratingPositioning":""),children:[e("i",{}),e("span",{children:"Powered by Bread Crumbs"})]})));D('@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.div`
|
|
234
236
|
height: 100%;
|
|
235
237
|
display: flex;
|
|
236
238
|
flex-direction: column;
|
package/build/index.es.js.map
CHANGED
|
@@ -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":"
|
|
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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6bAAA,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,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react"),t=require("@emotion/styled"),a=require("react-markdown"),i=require("uuid"),o=require("@azure/storage-blob");function
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react"),t=require("@emotion/styled"),a=require("react-markdown"),i=require("uuid"),o=require("@azure/storage-blob");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=r(n),c=r(t),l=r(a);const d={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"]},g="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEEAAABBCAYAAACO98lFAAAACXBIWXMAAAsSAAALEgHS3X78AAAFa0lEQVR42u2bX0xTVxzHvzqqVOqQrtJC2gmF4ooMWNg6FEJE3NhClpnG8aBzsTHugbgsLltiJg/6NI3J5pLFLbpIIjEjLuriiH9qnESlI6BQWcGsSEvT2lK8q0CvFChme1hwXs5tKfTWXfT83s6fe3Lz6fn9zvl9f7eL9L/u/xvPuS0GNQqBQqAQKAQKYaYlzfdBk0qPtzRFnL7L7ttoGLzz/EBQSlNRrMzj9HUzA9QdaEygECgECoFCoBAoBAq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7/H/iylAv4QLTN0I+8fWyq1OcypJMIsXh14zY0tFEjDXet6Pxvv1xbiFLWgr3eBB3JtmI65WnKLD/za0xaxeiuSwVK/NwrHgT57SYaZaxAMyjvlkBfF1u4k2Svr/dLEhVSlAIVr+d0y5TF+KYYeu8lZ9d6uKIAFo93YJJ7oK6Q2PfNaKSpJNrcLSyDpcc7TjtuhmT+mxS6fHhK5XIkPHD6wu4sdd2XrD3Fjwm7Gw/iWOGrYQgWq01oFprgI9l0D3kgD80DEfQj+DUBFTJqVBKU5GTqkKRUhdVH+gLuLGz/aSgxVnBIQxNTUYEAfxbbY70C89mrZ5u7LWdF7w6nZDAODQ1ifctDThjvybIemw4hH1tjdhp/SUh5fmEfp9Qb29Bk+sWduSURa1SRzIfy+CyqzPmOuZTh+APjRCnQTBMvqhtIojdvRdR0N+K9StzUKTIgnZFJq9LTJfsHSODaB2y48KwF0/DFtE/h1JliUKgECgECoFCoBAi2D8QCAe+XuY7HAAAAABJRU5ErkJggg==",p=["🤓","🙃","😕","☹️","😲","😳","😠","😇","😀","😁","😂","🤣","😃","😄","😅","😆","😉","😊","😏","😣","😥","😮","😴","😌","😋","😎","😍","🙂","🤗","🤔","😐","😑","😶","🙄"];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 h(e){return e.isAgent?"var(--bc-chat-agent-message-border-color)":"var(--bc-chat-client-message-border-color)"}function x(e){return e.isAgent?"var(--bc-chat-agent-message-text-color)":"var(--bc-chat-client-message-text-color)"}const m=({message:n})=>e.jsx("div",{className:"bc-mediaMessage"+("audio"===n.type?" audio":""),style:{padding:0},children:e.jsx("video",{src:n.content,controls:!0})}),u=c.default.div`
|
|
2
2
|
background-image: ${e=>b(e)};
|
|
3
3
|
color: ${e=>x(e)};
|
|
4
4
|
border-color: ${e=>h(e)};
|
|
@@ -24,7 +24,9 @@
|
|
|
24
24
|
text-decoration: auto;
|
|
25
25
|
gap: 5px;
|
|
26
26
|
color: ${e=>`${x(e)}`};
|
|
27
|
+
font-size: var(--bc-chat-fontSize-sm);
|
|
27
28
|
`,w=c.default.a`
|
|
29
|
+
font-size: var(--bc-chat-fontSize-sm);
|
|
28
30
|
background-image: ${e=>b(e)};
|
|
29
31
|
color: ${e=>x(e)};
|
|
30
32
|
border-color: ${e=>h(e)};
|
|
@@ -51,7 +53,7 @@
|
|
|
51
53
|
background-repeat: no-repeat;
|
|
52
54
|
width: 15px;
|
|
53
55
|
height: 15px;
|
|
54
|
-
`,
|
|
56
|
+
`,y={document:({message:n})=>{let t=n.content.split("/"),a=t[t.length-1];return e.jsx(u,{className:"bc-fileMessage",...n,children:e.jsxs(C,{href:n.content,target:"_blank",download:a,rel:"noopener noreferrer",...n,children:[e.jsx(f,{color:(i=n,i.isAgent,"000000")}),e.jsx("span",{children:a})]})});var i},image:({message:n})=>e.jsx("div",{className:"bc-mediaMessage",style:{backgroundImage:b(n),color:x(n),borderColor:h(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(w,{href:"https://www.google.com/maps/?q="+n.content,target:"_blank",rel:"noopener noreferrer",className:"bc-locationMessage",isAgent:n.isAgent,children:e.jsxs(v,{children:[e.jsx(I,{color:(t=n,t.isAgent,"000000")}),e.jsx(A,{color:x(n),children:"Open location"})]})});var t},text:({message:n})=>e.jsx("div",{style:{backgroundImage:b(n),color:x(n),borderColor:h(n),borderWidth:"1px",borderStyle:"solid"},children:(n.content&&n.content.indexOf("\n")>-1?n.content.split("\n"):[n.content]).map(((t,a)=>e.jsx(l.default,{children:t},`${n.messageId}-${a}`)))}),video:m,audio:m,interactive:null,template:({message:t})=>{const a=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:x(t),borderColor:h(t),borderWidth:"1px",borderStyle:"solid"},children:[e.jsx("b",{children:"Template message:"})," ",a.name," ",a.language?.code?`/ ${a.language.code}`:null]})},note:({message:n})=>e.jsx("div",{children:n.content})},M=c.default.div`
|
|
55
57
|
display: flex;
|
|
56
58
|
flex-direction: column;
|
|
57
59
|
gap: 5px;
|
|
@@ -60,7 +62,7 @@
|
|
|
60
62
|
margin: ${e=>e.isAgent?"0 40px 0 20px":"0 20px 0 40px"};
|
|
61
63
|
text-align: ${e=>e.isAgent?"left":"right"};
|
|
62
64
|
}
|
|
63
|
-
`;function k({message:n}){const{debug:t,conversationId:a,traceId:i,spanId:o,isAgent:
|
|
65
|
+
`;function k({message:n}){const{debug:t,conversationId:a,traceId:i,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:i})]}),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:a})]})]})}):null}function L(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===t&&a.firstChild?a.insertBefore(i,a.firstChild):a.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}L(".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.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 j=c.default.i`
|
|
64
66
|
background-image: url(${e=>e.brandLogo||g});
|
|
65
67
|
width: 30px;
|
|
66
68
|
height: 30px;
|
|
@@ -69,20 +71,20 @@
|
|
|
69
71
|
display: inline-block;
|
|
70
72
|
border-radius: 50%;
|
|
71
73
|
background-repeat: no-repeat;
|
|
72
|
-
`;function E(e,n){return
|
|
74
|
+
`;function E(e,n){return"note"===e?"bc-note":n?"bc-agentMessage":"bc-clientMessage"}const S=n=>{const{type:t,isAgent:a}=n.message,i=y[t]??null;return i?e.jsxs("div",{className:E(t,a),children:[a&&"note"!==t?e.jsx(j,{brandLogo:n.config?.brandLogo}):null,e.jsx(i,{message:n.message}),e.jsx(k,{message:n.message})]}):null},z=c.default.div`
|
|
73
75
|
width: 100%;
|
|
74
76
|
display: flex;
|
|
75
77
|
align-items: center;
|
|
76
|
-
${e=>e.isAgent?"justify-content: left;":"justify-content: right;"}
|
|
78
|
+
${e=>e.centered?"justify-content: center;":e.isAgent?"justify-content: left;":"justify-content: right;"}
|
|
77
79
|
.date-seperator-content {
|
|
78
|
-
margin-top: -10px;
|
|
80
|
+
${e=>e.centered?"margin-top: 0px;":"margin-top: -10px;"}
|
|
79
81
|
width: 130px;
|
|
80
82
|
display: flex;
|
|
81
83
|
justify-content: center;
|
|
82
84
|
align-items: center;
|
|
83
|
-
${e=>e.isAgent?"margin-left: 34px;":"margin-right: 8px;"}
|
|
85
|
+
${e=>e.centered?"":e.isAgent?"margin-left: 34px;":"margin-right: 8px;"}
|
|
84
86
|
}
|
|
85
|
-
`,
|
|
87
|
+
`,D=({message:n})=>e.jsx("div",{children:e.jsx(z,{isAgent:n.isAgent,centered:"note"===n.type,children:e.jsx("div",{className:"date-seperator-content",children:new Date(n.createdAt).toLocaleString("en-US")})})}),B="bc-message-list-content",F=c.default.div`
|
|
86
88
|
height: 100%;
|
|
87
89
|
width: 100%;
|
|
88
90
|
overflow-y: auto;
|
|
@@ -90,22 +92,22 @@
|
|
|
90
92
|
background-size: 100% 100%;
|
|
91
93
|
background-image: ${e=>`url(${e.config.backgroundImage})`};
|
|
92
94
|
${e=>e.config.backgroundColor&&`background-color: ${e.config.backgroundColor};`}
|
|
93
|
-
`,N=({sendMessage:t,debug:a,config:i,messages:o})=>(n.useEffect((()=>{const e=document.getElementById(B);if(!e)return;const n=e.scrollHeight;e.style.scrollBehavior="smooth",e.style.overscrollBehavior="contain",e.scroll(0,n)}),[o]),e.jsx(F,{id:B,config:i,children:o?.map(((n,
|
|
95
|
+
`,N=({sendMessage:t,debug:a,config:i,messages:o})=>(n.useEffect((()=>{const e=document.getElementById(B);if(!e)return;const n=e.scrollHeight;e.style.scrollBehavior="smooth",e.style.overscrollBehavior="contain",e.scroll(0,n)}),[o]),e.jsx(F,{id:B,config:i,children:o?.map(((n,r)=>e.jsxs("div",{children:[e.jsx(S,{message:n,index:r,sendMessage:t,messageActionsEnabled:o.length-1===r,debug:a,config:i}),e.jsx(D,{message:n})]},n.messageId?n.messageId:"message"+r)))},B)),Z="text";var R={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 G=c.default.span`
|
|
94
96
|
cursor: pointer;
|
|
95
97
|
width: 20px;
|
|
96
98
|
height: 20px;
|
|
97
99
|
margin: 5px;
|
|
98
|
-
`,J=()=>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"})}),K=()=>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"})}),P=({file:n,isFileSelected:t,cancelFileUpload:a})=>e.jsxs("div",{className:"bc-uploadFileDetails",style:{border:t?"green dashed 1px":""},id:"uploadFileDetails",children:[e.jsx("div",{className:"bc-uploadedFile",children:d.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+9z7uqq3k9yfHSjO3xEqzQKM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usRHiaJk7eSu3ScfOVGRcIZDBjShTKkQiZM3/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.jsx("div",{className:"bc-uploadFileName",children:e.jsx("span",{children:n.fileName})}),e.jsx("div",{className:"bc-uploadFileCancel",children:e.jsx("span",{onClick:a,children:e.jsx(K,{})})})]}),Q=({text:t,setText:a,config:i,send:o})=>{const
|
|
100
|
+
`,J=()=>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"})}),K=()=>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"})}),P=({file:n,isFileSelected:t,cancelFileUpload:a})=>e.jsxs("div",{className:"bc-uploadFileDetails",style:{border:t?"green dashed 1px":""},id:"uploadFileDetails",children:[e.jsx("div",{className:"bc-uploadedFile",children:d.SupportedImageFormats.indexOf(n.extension)>=0?e.jsx("img",{src:n.fileUrl,alt:"",className:"bc-imageFile"}):e.jsx("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAA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VXXnnllVdeeeWVV1555VXG/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:a,children:e.jsx(K,{})})})]}),Q=({text:t,setText:a,config:i,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:i.inputPlaceholder||R[i.language]?.placeholder,maxLength:1024,onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),o(),s())},onChange:e=>{a(e.target.value),s()}})},H=({config:n,send:t,file:a,isFileSelected:i,text:o,setText:r,cancelFileUpload:s})=>e.jsxs("div",{className:"bc-messageInput",children:[a?e.jsx(P,{file:a,isFileSelected:i,cancelFileUpload:s}):e.jsx(Q,{text:o,setText:r,config:n,send:t}),e.jsx(G,{onClick:()=>t(),children:o||a?e.jsx(J,{}):null})]});async function Y(e,n,t){const a=new o.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 o.AnonymousCredential).getContainerClient("anonymous"),r=new Date,s=`${r.getFullYear()}-${String(r.getMonth()+1).padStart(2,"0")}`,c=a.getBlockBlobClient(`${s}/${i.v4()}`);try{await c.uploadBrowserData(e,{onProgress:t=>{const a=Math.round(t.loadedBytes/e.size*100);n(a)},blockSize:4194304,concurrency:20,blobHTTPHeaders:{blobContentType:e.type}});t(c.url.split("?")[0])}catch(e){t(void 0,"Error uploading file:"+e.message)}}const U=(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`,W=c.default.i`
|
|
99
101
|
${e=>U("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)}
|
|
100
|
-
`,T=()=>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 V;const O=({setProgress:t,setFile:a,setError:i,send:o})=>{const[s
|
|
102
|
+
`,T=()=>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 V;const O=({setProgress:t,setFile:a,setError:i,send:o})=>{const[r,s]=n.useState(!1);n.useEffect((()=>{const e=document.createElement("script");return e.src="https://unpkg.com/mic-recorder-to-mp3",e.async=!0,e.onload=()=>console.log("Script Loaded"),document.body.appendChild(e),()=>{document.body.removeChild(e)}}),[]);const c=n.useCallback((()=>{if(!V){if("function"!=typeof MicRecorder)return void i("Please wait a little until voice library is loaded");V=new MicRecorder({bitRate:128})}i(void 0),r?V.stop().getMp3().then((([e,n])=>{s(!1);Y(new File([n],"recording.mp3",{type:"audio/mpeg"}),t,((e,n)=>{e?o({fileUrl:e,fileName:"recording",extension:"mp3"}):n&&i(n)}))})).catch((e=>i(e.message))):navigator.mediaDevices.getUserMedia({audio:!0}).then((()=>{V.start().then((()=>{s(!0)})).catch((e=>i(e.message)))})).catch((e=>i(e.message)))}),[r,i,t,o]);return e.jsxs("div",{id:"voiceRecorderIcon",className:"mic-container",children:[r?e.jsx("i",{onClick:c,children:e.jsx(T,{})}):e.jsx(W,{onClick:c,activeColor:"var(--bc-chat-dark-gray-color)"}),e.jsx("div",{className:"circle "+(r?"active":"")})]})};const q=c.default.i`
|
|
101
103
|
${e=>U("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)}
|
|
102
104
|
`,X=c.default.span`
|
|
103
105
|
margin: 8px;
|
|
104
106
|
cursor: pointer;
|
|
105
107
|
font-size: var(--bc-chat-fontSize-xl);
|
|
106
|
-
`,$=({onClick:n})=>e.jsx("div",{id:"emojiIcon",children:e.jsx(q,{onClick:n,activeColor:"var(--bc-chat-dark-gray-color)"})}),_=({text:t,setText:a,onClick:i})=>{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}(i),
|
|
108
|
+
`,$=({onClick:n})=>e.jsx("div",{id:"emojiIcon",children:e.jsx(q,{onClick:n,activeColor:"var(--bc-chat-dark-gray-color)"})}),_=({text:t,setText:a,onClick:i})=>{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}(i),r=n.useCallback((e=>{a(t+e)}),[a,t]),s=p.map(((n,t)=>e.jsx(X,{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})})},ee=c.default.i`
|
|
107
109
|
${e=>U("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)}
|
|
108
|
-
`,ne=({setProgress:t,setFile:a,setError:i})=>{const o=n.useCallback((e=>{a(void 0),i(void 0);const n=Array.from(e.target.files);if(e.target.value="",n.length<1)return;const o=n[0],{name:
|
|
110
|
+
`,ne=({setProgress:t,setFile:a,setError:i})=>{const o=n.useCallback((e=>{a(void 0),i(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 d.SupportedFormats.indexOf(c)<0?i("File type is not valid."):s>d.MaxFileSize?i("Maximum limit is 20 MBs"):void Y(o,t,((e,n)=>{e?a({fileUrl:e,fileName:r,extension:c}):n&&i(n)}))}),[t,a,i]);return e.jsxs("div",{id:"attachIcon",children:[e.jsx("label",{htmlFor:"fileInput",children:e.jsx(ee,{activeColor:"var(--bc-chat-dark-gray-color)"})}),e.jsx("input",{type:"file",className:"bc-fileUpload",id:"fileInput",onChange:o})]})},te=c.default.div`
|
|
109
111
|
padding: 0px 0px 0px 10px;
|
|
110
112
|
margin: 0px;
|
|
111
113
|
width: fit-content;
|
|
@@ -120,7 +122,7 @@
|
|
|
120
122
|
cursor: pointer;
|
|
121
123
|
display: block;
|
|
122
124
|
}
|
|
123
|
-
`,ae=({setView:t,setFile:a,setProgress:i,setError:o,text:
|
|
125
|
+
`,ae=({setView:t,setFile:a,setProgress:i,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(te,{id:"iconsContainer",children:[e.jsx(ne,{setFile:a,setProgress:i,setError:o}),e.jsx($,{onClick:()=>d(!0)}),e.jsx(O,{setFile:a,setError:o,setProgress:i,send:c})]}),l?e.jsx(_,{text:r,setText:s,onClick:()=>d(!1)}):null]})};L('.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 ie=c.default.div`
|
|
124
126
|
width: calc(100% - 40px);
|
|
125
127
|
background-color: #d9d9d94d;
|
|
126
128
|
padding: 10px 20px;
|
|
@@ -141,8 +143,8 @@
|
|
|
141
143
|
margin-top: 6px;
|
|
142
144
|
text-align: center;
|
|
143
145
|
}
|
|
144
|
-
`,oe=({config:t,sendMessage:a,setView:i})=>{const[o,
|
|
145
|
-
${e=>e.bannerWidth>
|
|
146
|
+
`,oe=({config:t,sendMessage:a,setView:i})=>{const[o,r]=n.useState(),[s,c]=n.useState(),[l,g]=n.useState(),[p,b]=n.useState(0),h=n.useCallback((e=>{if(e){const{fileUrl:n,extension:t}=e;a(d.SupportedImageFormats.indexOf(t)>=0?"image":d.SupportedAudioFormats.indexOf(t)>=0?"audio":"document",n)}else if(s){const{fileUrl:e,extension:n}=s;a(d.SupportedImageFormats.indexOf(n)>=0?"image":d.SupportedAudioFormats.indexOf(n)>=0?"audio":"document",e),c(void 0)}else a(Z,o),r("")}),[s,o,a]);return e.jsxs(ie,{children:[e.jsx("div",{className:"bc-InputArea",children:e.jsx(H,{config:t,send:h,text:o,setText:r,file:s,isFileSelected:!!s,cancelFileUpload:()=>c(void 0)})}),e.jsx("div",{className:"bc-CommandsArea",children:e.jsx(ae,{setView:i,setFile:c,setProgress:b,setError:g,setText:r,text:o,send:h})}),l?e.jsx("div",{className:"bc-uploadFileError",children:l}):null]})},re="bc-chat-header-banner",se=390,ce=c.default.div`
|
|
147
|
+
${e=>e.bannerWidth>se?"height: 60px;":"height: 90px;"}
|
|
146
148
|
display: block;
|
|
147
149
|
width: 100%;
|
|
148
150
|
background-color: transparent;
|
|
@@ -154,13 +156,13 @@
|
|
|
154
156
|
display: flex;
|
|
155
157
|
align-items: center;
|
|
156
158
|
background-image: ${e=>`linear-gradient(103deg, ${e.startColor},${e.endColor})`};
|
|
157
|
-
${e=>e.bannerWidth<=
|
|
159
|
+
${e=>e.bannerWidth<=se?'\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9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AgICAgPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZWUyYTdiIi8+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;"}
|
|
158
160
|
`,de=c.default.div`
|
|
159
161
|
width: 100%;
|
|
160
162
|
height: 100%;
|
|
161
163
|
display: flex;
|
|
162
164
|
`,ge=c.default.div`
|
|
163
|
-
${e=>e.bannerWidth>
|
|
165
|
+
${e=>e.bannerWidth>se?"padding-bottom: 0 !important;":""}
|
|
164
166
|
display: flex;
|
|
165
167
|
gap: 10px;
|
|
166
168
|
align-items: center;
|
|
@@ -182,7 +184,7 @@
|
|
|
182
184
|
font-style: normal;
|
|
183
185
|
}
|
|
184
186
|
`,pe=c.default.div`
|
|
185
|
-
${e=>e.bannerWidth>
|
|
187
|
+
${e=>e.bannerWidth>se?"padding-bottom: 0 !important;":""}
|
|
186
188
|
display: flex;
|
|
187
189
|
flex-direction: row-reverse;
|
|
188
190
|
gap: 10px;
|
|
@@ -199,7 +201,7 @@
|
|
|
199
201
|
}
|
|
200
202
|
`,be=c.default.i`
|
|
201
203
|
background-image: url("data:image/svg+xml;base64,PHN2ZyBpZD0ibWluaW1pemUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxLjgxNyIgdmlld0JveD0iMCAwIDE2IDEuODE3Ij4KICA8ZGVmcz4KICAgIDxjbGlwUGF0aCBpZD0iY2xpcC1wYXRoIj4KICAgICAgPHJlY3QgaWQ9IlJlY3RhbmdsZV82OCIgZGF0YS1uYW1lPSJSZWN0YW5nbGUgNjgiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxLjgxNyIgZmlsbD0iIzAwMCIvPgogICAgPC9jbGlwUGF0aD4KICA8L2RlZnM+CiAgPGcgaWQ9Ikdyb3VwXzMwMSIgZGF0YS1uYW1lPSJHcm91cCAzMDEiIGNsaXAtcGF0aD0idXJsKCNjbGlwLXBhdGgpIj4KICAgIDxwYXRoIGlkPSJQYXRoXzgwNCIgZGF0YS1uYW1lPSJQYXRoIDgwNCIgZD0iTTE1LjM5NCwyLjIxMUguNjA2QS42MDYuNjA2LDAsMSwxLC42MDYsMUgxNS4zOTRhLjYwNi42MDYsMCwwLDEsMCwxLjIxMSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCAtMC4zOTQpIiBmaWxsPSIjZmZmIi8+CiAgPC9nPgo8L3N2Zz4K");
|
|
202
|
-
`,he=({config:t,minimize:a})=>{const[i,o]=n.useState();return n.useEffect((()=>{new ResizeObserver((()=>{const e=document.getElementById(
|
|
204
|
+
`,he=({config:t,minimize:a})=>{const[i,o]=n.useState();return n.useEffect((()=>{new ResizeObserver((()=>{const e=document.getElementById(re)?.offsetWidth;e&&e>50&&e!==i&&o(e)})).observe(document.getElementById(re))}),[]),e.jsx(ce,{bannerWidth:i,className:"bc-header",children:e.jsx(le,{className:"bc-banner",id:re,startColor:"#065A60",endColor:"#006466",bannerWidth:i,children:e.jsxs(de,{className:"bc-bannerContents",children:[e.jsxs(ge,{className:"bc-companyInfo",bannerWidth:i,logo:t.brandLogo||g,children:[e.jsx("i",{}),e.jsx("span",{children:t.brandName||"BreadCrumbs"})]}),e.jsx(pe,{className:"bc-bannerActions",bannerWidth:i,children:a?e.jsx(be,{className:"bc-flow-minimize",onClick:()=>a()}):null})]})})})},xe=c.default.div`
|
|
203
205
|
width: 100%;
|
|
204
206
|
text-align: center;
|
|
205
207
|
i {
|
|
@@ -230,7 +232,7 @@
|
|
|
230
232
|
border-radius: 0px 0px 10px 10px;
|
|
231
233
|
opacity: 1;
|
|
232
234
|
}
|
|
233
|
-
`,me=
|
|
235
|
+
`,me=s.default.forwardRef((({forRate:n},t)=>e.jsxs(xe,{className:""+(n?"bc-ratingPositioning":""),children:[e.jsx("i",{}),e.jsx("span",{children:"Powered by Bread Crumbs"})]})));L('@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 ue=c.default.div`
|
|
234
236
|
height: 100%;
|
|
235
237
|
display: flex;
|
|
236
238
|
flex-direction: column;
|
|
@@ -256,5 +258,5 @@
|
|
|
256
258
|
line-height: inherit;
|
|
257
259
|
font-weight: inherit;
|
|
258
260
|
}
|
|
259
|
-
`;exports.BCChat=({config:t={language:"EN",backgroundColor:"#dedede"},messages:a=[],sendMessage:i,debug:o,minimize:
|
|
261
|
+
`;exports.BCChat=({config:t={language:"EN",backgroundColor:"#dedede"},messages:a=[],sendMessage:i,debug:o,minimize:r})=>{const[s,c]=n.useState("MESSAGE_LIST"),l="interactive"===(a&&a.length>0&&a[a.length-1].type);return e.jsxs(ue,{className:"bc-chat",children:[t.hideHeader?null:e.jsx(he,{config:t,minimize:r}),"MESSAGE_LIST"==s?e.jsx(N,{messages:a,sendMessage:i,debug:o,config:t},"message-list"):null,e.jsx(e.Fragment,{children:l?e.jsx(me,{forRate:!0}):e.jsx(oe,{sendMessage:i,setView:c,config:t},"message-input")})]})};
|
|
260
262
|
//# sourceMappingURL=index.js.map
|
package/build/index.js.map
CHANGED
|
@@ -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":"
|
|
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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ieAAA,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|