@bcrumbs.net/bc-chat 1.0.47 → 1.0.48
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 +1 -1
- package/build/index.es.js.map +1 -1
- package/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.es.js
CHANGED
|
@@ -66,7 +66,7 @@ import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import i,{useCal
|
|
|
66
66
|
background-repeat: no-repeat;
|
|
67
67
|
width: 15px;
|
|
68
68
|
height: 15px;
|
|
69
|
-
`,F={document:({message:t})=>{let i=t.content.split("/"),o=i[i.length-1];return e(I,{className:"bc-fileMessage",...t,children:n(E,{href:t.content,target:"_blank",download:o,rel:"noopener noreferrer",...t,children:[e(L,{color:(a=t,a.isAgent,"000000")}),e("span",{children:o})]})});var a},image:({message:n})=>e("div",{className:"bc-mediaMessage",style:{backgroundImage:v(n),color:y(n),borderColor:w(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(S,{href:"https://www.google.com/maps/?q="+t.content,target:"_blank",rel:"noopener noreferrer",className:"bc-locationMessage",isAgent:t.isAgent,children:n(z,{children:[e(B,{color:(i=t,i.isAgent,"000000")}),e(D,{color:y(t),children:"Open location"})]})});var i},text:({message:t})=>{const i=p(t.content);return n("div",{className:"bc-textMessage",style:{backgroundImage:v(t),color:y(t),borderColor:w(t),borderWidth:"1px",borderStyle:"solid",direction:"arb"===i?"rtl":"ltr",width:"100%"},children:[t.context&&t.context.replyToId?e(M,{context:t.context,isAgent:t.isAgent,language:i}):null,(t.content&&t.content.indexOf("\n")>-1?t.content.split("\n"):[t.content]).map(((n,i)=>e(g,{children:n},`${t.messageId}-${i}`)))]})},video:k,audio:k,interactive:null,template:({message:t})=>{const i=s((()=>{try{return JSON.parse(t.content)}catch(e){return void console.log(e.message)}}),[t]);return n("div",{style:{backgroundImage:v(t),color:y(t),borderColor:w(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})},N=()=>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"})]}),R={delivered:N,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:N,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"})})},Z=({message:n})=>{if(!n.status)return null;const t=R[n.status];return e("div",{className:`status-icon ${n.status||""}`,children:e(t,{})})};function G(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}G(".bc-agentMessage,\n.bc-clientMessage {\n margin: 10px 15px;\n font-size: var(--bc-chat-fontSize-sm);\n}\n.bc-agentMessage div p,\n.bc-clientMessage div p {\n padding: 0;\n margin: 0;\n}\n\n.bc-note {\n text-align: center;\n gap: 5px;\n}\n.bc-note > div {\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 background-color: #fff3cd !important;\n}\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}\n.status-icon.failed .resend {\n color: var(--bc-chat-dark-gray-color);\n cursor: pointer;\n margin: 0 10px;\n}\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}\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}\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\n.bc-agentMessage {\n text-align: left;\n display: flex;\n align-items: flex-end;\n flex-wrap: wrap;\n gap: 5px;\n}\n.bc-agentMessage .bc-fileMessage,\n.bc-agentMessage .bc-locationMessage {\n color: var(--bc-chat-dark-gray-color);\n cursor: pointer;\n}\n.bc-agentMessage .bc-fileMessage img,\n.bc-agentMessage .bc-locationMessage img {\n vertical-align: middle;\n margin-right: 10px;\n width: 30px;\n}\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\n.bc-agentMessage:first-child {\n flex: 1 0 50%;\n}\n\n.bc-agentMessage > :nth-child(2) {\n flex: 0 1 auto;\n max-width: 85%;\n}\n\n.bc-clientMessage {\n padding-left: 20px;\n text-align: right;\n}\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}\n.bc-clientMessage svg path:nth-child(2) {\n fill: #fff;\n}\n\n.bc-mediaMessage {\n position: relative;\n}\n.bc-mediaMessage video,\n.bc-mediaMessage img,\n.bc-mediaMessage audio {\n width: 300px;\n margin-bottom: -5px;\n}\n.bc-mediaMessage audio {\n -webkit-appearance: none;\n -webkit-border-radius: 0;\n border-radius: 0;\n}\n.bc-mediaMessage audio::-webkit-media-controls-panel {\n background-color: transparent;\n}\n.bc-mediaMessage audio::-webkit-media-controls-play-button {\n background-color: transparent;\n}\n.bc-mediaMessage audio::-webkit-media-controls-timeline {\n background-color: transparent;\n}\n.bc-mediaMessage audio::-webkit-media-controls-current-time-display, .bc-mediaMessage audio::-webkit-media-controls-time-remaining-display {\n color: inherit;\n}\n.bc-mediaMessage audio {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n height: 40px !important;\n width: 100% !important;\n max-width: 400px !important;\n position: static !important;\n -webkit-appearance: none !important;\n -webkit-border-radius: 0 !important;\n border-radius: 0 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls {\n display: flex !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-panel {\n display: flex !important;\n visibility: visible !important;\n background-color: #f0f0f0 !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-play-button {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-timeline {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-volume-slider {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-current-time-display, .bc-mediaMessage audio::-webkit-media-controls-time-remaining-display {\n display: block !important;\n visibility: visible !important;\n color: #000 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-mute-button {\n display: block !important;\n visibility: visible !important;\n}\n\n.bc-mediaMessage.audio {\n height: 40px;\n width: 300px;\n min-height: 40px !important;\n}\n.bc-mediaMessage.audio audio {\n height: 40px;\n}\n\n.bc-response-debug {\n background-color: transparent;\n color: #f5a623;\n padding: 0;\n}\n.bc-response-debug span {\n text-decoration: underline;\n}\n\n.bc-selectionContainer {\n display: flex;\n align-items: flex-start;\n flex-wrap: wrap;\n}\n\n.bc-selectionContainer:first-child {\n flex: 1 0 50%;\n}");const j=d.i`
|
|
69
|
+
`,F={document:({message:t})=>{let i=t.content.split("/"),o=i[i.length-1];return e(I,{className:"bc-fileMessage",...t,children:n(E,{href:t.content,target:"_blank",download:o,rel:"noopener noreferrer",...t,children:[e(L,{color:(a=t,a.isAgent,"000000")}),e("span",{children:o})]})});var a},image:({message:n})=>e("div",{className:"bc-mediaMessage",style:{backgroundImage:v(n),color:y(n),borderColor:w(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(S,{href:"https://www.google.com/maps/?q="+t.content,target:"_blank",rel:"noopener noreferrer",className:"bc-locationMessage",isAgent:t.isAgent,children:n(z,{children:[e(B,{color:(i=t,i.isAgent,"000000")}),e(D,{color:y(t),children:"Open location"})]})});var i},text:({message:t})=>{const i=p(t.content);return n("div",{className:"bc-textMessage",style:{backgroundImage:v(t),color:y(t),borderColor:w(t),borderWidth:"1px",borderStyle:"solid",direction:"arb"===i?"rtl":"ltr",maxWidth:"100%"},children:[t.context&&t.context.replyToId?e(M,{context:t.context,isAgent:t.isAgent,language:i}):null,(t.content&&t.content.indexOf("\n")>-1?t.content.split("\n"):[t.content]).map(((n,i)=>e(g,{children:n},`${t.messageId}-${i}`)))]})},video:k,audio:k,interactive:null,template:({message:t})=>{const i=s((()=>{try{return JSON.parse(t.content)}catch(e){return void console.log(e.message)}}),[t]);return n("div",{style:{backgroundImage:v(t),color:y(t),borderColor:w(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})},N=()=>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"})]}),R={delivered:N,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:N,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"})})},Z=({message:n})=>{if(!n.status)return null;const t=R[n.status];return e("div",{className:`status-icon ${n.status||""}`,children:e(t,{})})};function G(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}G(".bc-agentMessage,\n.bc-clientMessage {\n margin: 10px 15px;\n font-size: var(--bc-chat-fontSize-sm);\n}\n.bc-agentMessage div p,\n.bc-clientMessage div p {\n padding: 0;\n margin: 0;\n}\n\n.bc-note {\n text-align: center;\n gap: 5px;\n}\n.bc-note > div {\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 background-color: #fff3cd !important;\n}\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}\n.status-icon.failed .resend {\n color: var(--bc-chat-dark-gray-color);\n cursor: pointer;\n margin: 0 10px;\n}\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}\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}\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\n.bc-agentMessage {\n text-align: left;\n display: flex;\n align-items: flex-end;\n flex-wrap: wrap;\n gap: 5px;\n}\n.bc-agentMessage .bc-fileMessage,\n.bc-agentMessage .bc-locationMessage {\n color: var(--bc-chat-dark-gray-color);\n cursor: pointer;\n}\n.bc-agentMessage .bc-fileMessage img,\n.bc-agentMessage .bc-locationMessage img {\n vertical-align: middle;\n margin-right: 10px;\n width: 30px;\n}\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\n.bc-agentMessage:first-child {\n flex: 1 0 50%;\n}\n\n.bc-agentMessage > :nth-child(2) {\n flex: 0 1 auto;\n max-width: 85%;\n}\n\n.bc-clientMessage {\n padding-left: 20px;\n text-align: right;\n}\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}\n.bc-clientMessage svg path:nth-child(2) {\n fill: #fff;\n}\n\n.bc-mediaMessage {\n position: relative;\n}\n.bc-mediaMessage video,\n.bc-mediaMessage img,\n.bc-mediaMessage audio {\n width: 300px;\n margin-bottom: -5px;\n}\n.bc-mediaMessage audio {\n -webkit-appearance: none;\n -webkit-border-radius: 0;\n border-radius: 0;\n}\n.bc-mediaMessage audio::-webkit-media-controls-panel {\n background-color: transparent;\n}\n.bc-mediaMessage audio::-webkit-media-controls-play-button {\n background-color: transparent;\n}\n.bc-mediaMessage audio::-webkit-media-controls-timeline {\n background-color: transparent;\n}\n.bc-mediaMessage audio::-webkit-media-controls-current-time-display, .bc-mediaMessage audio::-webkit-media-controls-time-remaining-display {\n color: inherit;\n}\n.bc-mediaMessage audio {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n height: 40px !important;\n width: 100% !important;\n max-width: 400px !important;\n position: static !important;\n -webkit-appearance: none !important;\n -webkit-border-radius: 0 !important;\n border-radius: 0 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls {\n display: flex !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-panel {\n display: flex !important;\n visibility: visible !important;\n background-color: #f0f0f0 !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-play-button {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-timeline {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-volume-slider {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-current-time-display, .bc-mediaMessage audio::-webkit-media-controls-time-remaining-display {\n display: block !important;\n visibility: visible !important;\n color: #000 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-mute-button {\n display: block !important;\n visibility: visible !important;\n}\n\n.bc-mediaMessage.audio {\n height: 40px;\n width: 300px;\n min-height: 40px !important;\n}\n.bc-mediaMessage.audio audio {\n height: 40px;\n}\n\n.bc-response-debug {\n background-color: transparent;\n color: #f5a623;\n padding: 0;\n}\n.bc-response-debug span {\n text-decoration: underline;\n}\n\n.bc-selectionContainer {\n display: flex;\n align-items: flex-start;\n flex-wrap: wrap;\n}\n\n.bc-selectionContainer:first-child {\n flex: 1 0 50%;\n}");const j=d.i`
|
|
70
70
|
background-image: url(${e=>e.avatar||x});
|
|
71
71
|
width: 30px;
|
|
72
72
|
height: 30px;
|
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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;48IAAA,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
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
background-repeat: no-repeat;
|
|
67
67
|
width: 15px;
|
|
68
68
|
height: 15px;
|
|
69
|
-
`,j={document:({message:n})=>{let t=n.content.split("/"),i=t[t.length-1];return e.jsx(w,{className:"bc-fileMessage",...n,children:e.jsxs(k,{href:n.content,target:"_blank",download:i,rel:"noopener noreferrer",...n,children:[e.jsx(y,{color:(a=n,a.isAgent,"000000")}),e.jsx("span",{children:i})]})});var a},image:({message:n})=>e.jsx("div",{className:"bc-mediaMessage",style:{backgroundImage:h(n),color:x(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(A,{href:"https://www.google.com/maps/?q="+n.content,target:"_blank",rel:"noopener noreferrer",className:"bc-locationMessage",isAgent:n.isAgent,children:e.jsxs(M,{children:[e.jsx(L,{color:(t=n,t.isAgent,"000000")}),e.jsx(I,{color:x(n),children:"Open location"})]})});var t},text:({message:n})=>{const t=a.franc(n.content);return e.jsxs("div",{className:"bc-textMessage",style:{backgroundImage:h(n),color:x(n),borderColor:b(n),borderWidth:"1px",borderStyle:"solid",direction:"arb"===t?"rtl":"ltr",width:"100%"},children:[n.context&&n.context.replyToId?e.jsx(C,{context:n.context,isAgent:n.isAgent,language:t}):null,(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:v,audio:v,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:h(t),color:x(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})},E=()=>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"})]}),S={delivered:E,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:E,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"})})},z=({message:n})=>{if(!n.status)return null;const t=S[n.status];return e.jsx("div",{className:`status-icon ${n.status||""}`,children:e.jsx(t,{})})};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}\n.bc-agentMessage div p,\n.bc-clientMessage div p {\n padding: 0;\n margin: 0;\n}\n\n.bc-note {\n text-align: center;\n gap: 5px;\n}\n.bc-note > div {\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 background-color: #fff3cd !important;\n}\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}\n.status-icon.failed .resend {\n color: var(--bc-chat-dark-gray-color);\n cursor: pointer;\n margin: 0 10px;\n}\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}\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}\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\n.bc-agentMessage {\n text-align: left;\n display: flex;\n align-items: flex-end;\n flex-wrap: wrap;\n gap: 5px;\n}\n.bc-agentMessage .bc-fileMessage,\n.bc-agentMessage .bc-locationMessage {\n color: var(--bc-chat-dark-gray-color);\n cursor: pointer;\n}\n.bc-agentMessage .bc-fileMessage img,\n.bc-agentMessage .bc-locationMessage img {\n vertical-align: middle;\n margin-right: 10px;\n width: 30px;\n}\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\n.bc-agentMessage:first-child {\n flex: 1 0 50%;\n}\n\n.bc-agentMessage > :nth-child(2) {\n flex: 0 1 auto;\n max-width: 85%;\n}\n\n.bc-clientMessage {\n padding-left: 20px;\n text-align: right;\n}\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}\n.bc-clientMessage svg path:nth-child(2) {\n fill: #fff;\n}\n\n.bc-mediaMessage {\n position: relative;\n}\n.bc-mediaMessage video,\n.bc-mediaMessage img,\n.bc-mediaMessage audio {\n width: 300px;\n margin-bottom: -5px;\n}\n.bc-mediaMessage audio {\n -webkit-appearance: none;\n -webkit-border-radius: 0;\n border-radius: 0;\n}\n.bc-mediaMessage audio::-webkit-media-controls-panel {\n background-color: transparent;\n}\n.bc-mediaMessage audio::-webkit-media-controls-play-button {\n background-color: transparent;\n}\n.bc-mediaMessage audio::-webkit-media-controls-timeline {\n background-color: transparent;\n}\n.bc-mediaMessage audio::-webkit-media-controls-current-time-display, .bc-mediaMessage audio::-webkit-media-controls-time-remaining-display {\n color: inherit;\n}\n.bc-mediaMessage audio {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n height: 40px !important;\n width: 100% !important;\n max-width: 400px !important;\n position: static !important;\n -webkit-appearance: none !important;\n -webkit-border-radius: 0 !important;\n border-radius: 0 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls {\n display: flex !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-panel {\n display: flex !important;\n visibility: visible !important;\n background-color: #f0f0f0 !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-play-button {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-timeline {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-volume-slider {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-current-time-display, .bc-mediaMessage audio::-webkit-media-controls-time-remaining-display {\n display: block !important;\n visibility: visible !important;\n color: #000 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-mute-button {\n display: block !important;\n visibility: visible !important;\n}\n\n.bc-mediaMessage.audio {\n height: 40px;\n width: 300px;\n min-height: 40px !important;\n}\n.bc-mediaMessage.audio audio {\n height: 40px;\n}\n\n.bc-response-debug {\n background-color: transparent;\n color: #f5a623;\n padding: 0;\n}\n.bc-response-debug span {\n text-decoration: underline;\n}\n\n.bc-selectionContainer {\n display: flex;\n align-items: flex-start;\n flex-wrap: wrap;\n}\n\n.bc-selectionContainer:first-child {\n flex: 1 0 50%;\n}");const B=l.default.i`
|
|
69
|
+
`,j={document:({message:n})=>{let t=n.content.split("/"),i=t[t.length-1];return e.jsx(w,{className:"bc-fileMessage",...n,children:e.jsxs(k,{href:n.content,target:"_blank",download:i,rel:"noopener noreferrer",...n,children:[e.jsx(y,{color:(a=n,a.isAgent,"000000")}),e.jsx("span",{children:i})]})});var a},image:({message:n})=>e.jsx("div",{className:"bc-mediaMessage",style:{backgroundImage:h(n),color:x(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(A,{href:"https://www.google.com/maps/?q="+n.content,target:"_blank",rel:"noopener noreferrer",className:"bc-locationMessage",isAgent:n.isAgent,children:e.jsxs(M,{children:[e.jsx(L,{color:(t=n,t.isAgent,"000000")}),e.jsx(I,{color:x(n),children:"Open location"})]})});var t},text:({message:n})=>{const t=a.franc(n.content);return e.jsxs("div",{className:"bc-textMessage",style:{backgroundImage:h(n),color:x(n),borderColor:b(n),borderWidth:"1px",borderStyle:"solid",direction:"arb"===t?"rtl":"ltr",maxWidth:"100%"},children:[n.context&&n.context.replyToId?e.jsx(C,{context:n.context,isAgent:n.isAgent,language:t}):null,(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:v,audio:v,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:h(t),color:x(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})},E=()=>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"})]}),S={delivered:E,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:E,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"})})},z=({message:n})=>{if(!n.status)return null;const t=S[n.status];return e.jsx("div",{className:`status-icon ${n.status||""}`,children:e.jsx(t,{})})};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}\n.bc-agentMessage div p,\n.bc-clientMessage div p {\n padding: 0;\n margin: 0;\n}\n\n.bc-note {\n text-align: center;\n gap: 5px;\n}\n.bc-note > div {\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 background-color: #fff3cd !important;\n}\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}\n.status-icon.failed .resend {\n color: var(--bc-chat-dark-gray-color);\n cursor: pointer;\n margin: 0 10px;\n}\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}\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}\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\n.bc-agentMessage {\n text-align: left;\n display: flex;\n align-items: flex-end;\n flex-wrap: wrap;\n gap: 5px;\n}\n.bc-agentMessage .bc-fileMessage,\n.bc-agentMessage .bc-locationMessage {\n color: var(--bc-chat-dark-gray-color);\n cursor: pointer;\n}\n.bc-agentMessage .bc-fileMessage img,\n.bc-agentMessage .bc-locationMessage img {\n vertical-align: middle;\n margin-right: 10px;\n width: 30px;\n}\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\n.bc-agentMessage:first-child {\n flex: 1 0 50%;\n}\n\n.bc-agentMessage > :nth-child(2) {\n flex: 0 1 auto;\n max-width: 85%;\n}\n\n.bc-clientMessage {\n padding-left: 20px;\n text-align: right;\n}\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}\n.bc-clientMessage svg path:nth-child(2) {\n fill: #fff;\n}\n\n.bc-mediaMessage {\n position: relative;\n}\n.bc-mediaMessage video,\n.bc-mediaMessage img,\n.bc-mediaMessage audio {\n width: 300px;\n margin-bottom: -5px;\n}\n.bc-mediaMessage audio {\n -webkit-appearance: none;\n -webkit-border-radius: 0;\n border-radius: 0;\n}\n.bc-mediaMessage audio::-webkit-media-controls-panel {\n background-color: transparent;\n}\n.bc-mediaMessage audio::-webkit-media-controls-play-button {\n background-color: transparent;\n}\n.bc-mediaMessage audio::-webkit-media-controls-timeline {\n background-color: transparent;\n}\n.bc-mediaMessage audio::-webkit-media-controls-current-time-display, .bc-mediaMessage audio::-webkit-media-controls-time-remaining-display {\n color: inherit;\n}\n.bc-mediaMessage audio {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n height: 40px !important;\n width: 100% !important;\n max-width: 400px !important;\n position: static !important;\n -webkit-appearance: none !important;\n -webkit-border-radius: 0 !important;\n border-radius: 0 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls {\n display: flex !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-panel {\n display: flex !important;\n visibility: visible !important;\n background-color: #f0f0f0 !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-play-button {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-timeline {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-volume-slider {\n display: block !important;\n visibility: visible !important;\n opacity: 1 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-current-time-display, .bc-mediaMessage audio::-webkit-media-controls-time-remaining-display {\n display: block !important;\n visibility: visible !important;\n color: #000 !important;\n}\n.bc-mediaMessage audio::-webkit-media-controls-mute-button {\n display: block !important;\n visibility: visible !important;\n}\n\n.bc-mediaMessage.audio {\n height: 40px;\n width: 300px;\n min-height: 40px !important;\n}\n.bc-mediaMessage.audio audio {\n height: 40px;\n}\n\n.bc-response-debug {\n background-color: transparent;\n color: #f5a623;\n padding: 0;\n}\n.bc-response-debug span {\n text-decoration: underline;\n}\n\n.bc-selectionContainer {\n display: flex;\n align-items: flex-start;\n flex-wrap: wrap;\n}\n\n.bc-selectionContainer:first-child {\n flex: 1 0 50%;\n}");const B=l.default.i`
|
|
70
70
|
background-image: url(${e=>e.avatar||p});
|
|
71
71
|
width: 30px;
|
|
72
72
|
height: 30px;
|
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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2lJAAA,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|