@snf/access-qa-bot 3.3.8 → 3.3.9
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.
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
(function(Pe,k){typeof exports=="object"&&typeof module<"u"?k(exports,require("react/jsx-runtime"),require("react"),require("react-dom/client"),require("react-dom/server")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom/client","react-dom/server"],k):(Pe=typeof globalThis<"u"?globalThis:Pe||self,k(Pe.AccessQABot={},Pe.jsxRuntime,Pe.React,Pe.ReactDOMClient,Pe.ReactDOMServer))})(this,function(Pe,k,h,vc,Ua){"use strict";function Fa(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const ce=Fa(h);function br(e,t){t===void 0&&(t={});var r=t.insertAt;if(e&&typeof document<"u"){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",r==="top"&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}br('.rcb-chat-header-container{border-bottom:1px solid #ccc;color:#fff;display:flex;justify-content:space-between;max-height:55px;padding:12px}.rcb-chat-header{display:flex;flex-direction:row}.rcb-bot-avatar{background-size:cover;border-radius:50%;height:30px;margin-right:12px;width:30px}.rcb-message-prompt-container.visible{align-items:center;animation:rcb-animation-pop-in .3s ease-in-out;bottom:0;display:flex;justify-content:center;margin:auto;opacity:1;pointer-events:auto;position:sticky}.rcb-message-prompt-container.hidden{height:0;opacity:0;pointer-events:none;visibility:hidden}.rcb-message-prompt-text{background-color:#fff;border:.5px solid #adadad;border-radius:20px;color:#adadad;cursor:pointer;font-size:12px;padding:6px 12px;transition:color .3s ease,border-color .3s ease;z-index:9999}.rcb-message-prompt-container.hidden .rcb-message-prompt-text{padding:0}.rcb-user-message-container{display:flex;flex-direction:row;justify-content:right}.rcb-user-message{border-radius:22px;font-size:15px;height:fit-content;margin-right:16px;margin-top:8px;min-height:20px;overflow:auto;overflow-wrap:anywhere;padding:12px 16px;text-align:right;white-space:pre-wrap;width:fit-content}.rcb-user-message-offset{margin-right:50px}.rcb-user-message-entry{animation:rcb-animation-user-message-entry .3s ease-in backwards}.rcb-message-user-avatar{background-size:cover;border-radius:50%;height:40px;margin-left:-10px;margin-right:6px;margin-top:9px;width:40px}.rcb-bot-message-container{display:flex;flex-direction:row}.rcb-bot-message{border-radius:22px;font-size:15px;height:fit-content;margin-left:16px;margin-top:8px;min-height:20px;overflow:auto;overflow-wrap:anywhere;padding:12px 16px;text-align:left;white-space:pre-wrap;width:fit-content}.rcb-bot-message-offset{margin-left:50px}.rcb-bot-message-entry{animation:rcb-animation-bot-message-entry .3s ease-in backwards}.rcb-message-bot-avatar{background-size:cover;border-radius:50%;height:40px;margin-left:6px;margin-right:-10px;margin-top:9px;width:40px}.rcb-typing-indicator{align-items:center;display:flex}.rcb-dot{animation:rcb-animation-bot-typing 1s infinite;background-color:#ccc;border-radius:50%;height:8px;margin-right:4px;width:8px}.rcb-dot:nth-child(2){animation-delay:.2s}.rcb-dot:nth-child(3){animation-delay:.4s}.rcb-chat-body-container{height:100%;overflow-x:hidden;overflow-y:scroll;padding-bottom:16px;position:relative;touch-action:pan-y;width:100%}.rcb-chat-body-container::-webkit-scrollbar-track{background-color:#f1f1f1}.rcb-chat-body-container::-webkit-scrollbar-thumb{background-color:#ddd;border-radius:4px}.rcb-chat-body-container::-webkit-scrollbar-thumb:hover{background-color:#cfcfcf}.rcb-chat-body-container::-webkit-scrollbar-corner{background-color:#f1f1f1}.rcb-checkbox-container{display:flex;flex-wrap:wrap;gap:10px;margin-left:16px;padding-top:12px}.rcb-checkbox-offset{margin-left:50px!important}.rcb-checkbox-row-container{align-items:center;animation:rcb-animations-checkboxes-entry .5s ease-out;background-color:#fff;border-radius:10px;border-style:solid;border-width:.5px;cursor:pointer;display:flex;gap:5px;max-height:32px;min-height:30px;overflow:hidden;width:80%}.rcb-checkbox-row-container:hover{box-shadow:0 0 5px #0003}.rcb-checkbox-row{align-items:center;cursor:pointer;display:inline-flex;margin-left:10px}.rcb-checkbox-mark{align-items:center;background-color:#f2f2f2;border:none;border-radius:50%;cursor:pointer;display:flex;height:20px;justify-content:center;margin-right:10px;transition:all .3s ease;width:20px}.rcb-checkbox-mark:hover{background-color:#c2c2c2}.rcb-checkbox-mark:before{content:"✓";transition:all .3s ease}.rcb-checkbox-label{font-size:14px}.rcb-checkbox-next-button{align-items:center;animation:rcb-animations-checkboxes-entry .5s ease-out;background-color:#fff;border-radius:10px;border-style:solid;border-width:.5px;cursor:pointer;display:inline-block;font-size:24px;max-height:32px;min-height:30px;text-align:center;width:80%}.rcb-checkbox-next-button:before{content:"→"}.rcb-checkbox-next-button:hover{box-shadow:0 0 5px #0003}.rcb-options-container{display:flex;flex-wrap:wrap;gap:10px;margin-left:16px;max-width:70%;padding-top:12px}.rcb-options-offset{margin-left:50px!important}.rcb-options{align-items:center;animation:rcb-animation-options-entry .5s ease-out;border-radius:20px;border-style:solid;border-width:.5px;cursor:pointer;display:inline-flex;font-size:14px;justify-content:center;overflow:hidden;padding:10px 20px;transition:background-color .3s ease}.rcb-options:hover{box-shadow:0 0 5px #0003}.rcb-line-break-container{align-items:center;display:flex;justify-content:center;max-height:45px;padding-bottom:5px;padding-top:10px}.rcb-line-break-text{color:#adadad;font-size:12px;padding:6px 12px}.rcb-spinner-container{align-items:center;display:flex;justify-content:center;max-height:45px;min-height:35px;padding-bottom:5px;padding-top:10px}.rcb-spinner{animation:rcb-animation-spin 1s linear infinite;border:4px solid #f3f3f3;border-radius:50%;height:22px;width:22px}.rcb-chat-input{align-items:center;background-color:#fff;border-top:1px solid #ccc;display:flex;padding:8px 16px}.rcb-chat-input::placeholder{color:#999}.rcb-chat-input-textarea{background-color:#fff;border:none;border-radius:4px;color:#000;flex:1;font-family:inherit;font-size:16px;height:auto;min-height:38px;outline:none;overflow-y:scroll;padding:8px;resize:none;touch-action:none}.rcb-chat-input-textarea::-webkit-scrollbar,.rcb-chat-input-textarea::-webkit-scrollbar-thumb{background-color:initial}.rcb-chat-input-textarea::-webkit-scrollbar-thumb:hover{background-color:initial}.rcb-chat-input-char-counter{font-size:14px;margin-left:8px;margin-top:3px}.rcb-chat-footer-container{align-items:flex-end;background-color:#f2f2f2;border-top:1px solid #ccc;color:#000;display:flex;font-size:12px;justify-content:space-between;max-height:55px;padding:12px 16px 8px 10px}.rcb-chat-footer,.rcb-toggle-button{display:flex;flex-direction:row}.rcb-toggle-button{border:none;border-radius:50%;bottom:20px;box-shadow:0 2px 4px #0003;cursor:pointer;height:75px;position:fixed;right:20px;width:75px;z-index:9999}.rcb-toggle-button.rcb-button-hide{animation:rcb-animation-collapse .3s ease-in-out forwards;opacity:0;visibility:hidden}.rcb-toggle-button.rcb-button-show{animation:rcb-animation-expand .3s ease-in-out forwards;opacity:1;visibility:visible}.rcb-toggle-icon{background-position:50%;background-repeat:no-repeat;background-size:cover;border-radius:inherit;height:100%;margin:auto;width:100%}.rcb-badge,.rcb-toggle-icon{align-items:center;display:flex;justify-content:center}.rcb-badge{background-color:red;border-radius:50%;color:#fff;height:25px;position:absolute;right:-6px;top:-6px;width:25px}.rcb-chat-tooltip{border-radius:20px;box-shadow:0 2px 6px #0003;cursor:pointer;font-size:20px;padding:16px;position:fixed;transition:transform .3s ease;white-space:nowrap;z-index:9999}.rcb-chat-tooltip-tail{border-style:solid;border-width:10px 0 10px 10px;content:"";margin-top:-10px;position:absolute;right:-10px;top:50%}.rcb-chat-tooltip.rcb-tooltip-hide{animation:rcb-animation-tooltip-out .5s ease-in-out;opacity:0;visibility:hidden}.rcb-chat-tooltip.rcb-tooltip-show{animation:rcb-animation-tooltip-in .5s ease-in-out;opacity:1;visibility:visible}.rcb-toast-prompt{animation:rcb-animation-pop-in .3s ease-in-out;background-color:#fff;border:.5px solid #7a7a7a;border-radius:5px;color:#7a7a7a;cursor:pointer;font-size:12px;margin-top:6px;padding:6px 12px;text-align:center;transition:color .3s ease,border-color .3s ease;width:100%;z-index:9999}.rcb-toast-prompt-container{align-items:center;animation:popIn .3s ease-in-out;bottom:0;display:flex;flex-direction:column;justify-content:flex-end;left:50%;margin:200 auto auto;opacity:1;pointer-events:auto;position:absolute;transform:translate(-50%)}.rcb-media-display-image-container,.rcb-media-display-video-container{border-radius:22px;margin-right:16px;margin-top:8px;padding:16px;width:fit-content}.rcb-media-display-offset{margin-right:50px!important}.rcb-media-display-image{border-radius:22px;height:auto;object-fit:cover;width:100%}.rcb-media-display-video{background-color:#000;border-radius:22px;height:auto;width:100%}.rcb-media-display-audio{border-radius:22px;height:auto;margin-right:16px;margin-top:8px;width:100%}.rcb-media-entry{animation:rcb-animation-user-message-entry .3s ease-in backwards}.rcb-attach-button-disabled,.rcb-attach-button-enabled{background-size:cover;border-radius:6px;display:inline-block;height:30px;position:relative;text-align:center;width:30px}.rcb-attach-button-disabled input[type=file],.rcb-attach-button-enabled input[type=file]{display:none;height:100%;position:absolute;width:100%}.rcb-attach-button-enabled{cursor:pointer}.rcb-attach-button-disabled{opacity:.5}.rcb-attach-button-enabled:after{background-color:#0000001a;border-radius:50%;content:"";height:0;left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%);transition:width .2s ease-out,height .2s ease-out,opacity .2s ease-out;width:0}.rcb-attach-button-enabled:hover:after{height:130%;opacity:1;width:130%}.rcb-attach-icon-disabled,.rcb-attach-icon-enabled{background-repeat:no-repeat;background-size:cover;display:inline-block;height:24px;margin-top:2px;transition:background-image .3s ease;width:24px}.rcb-attach-icon-enabled{cursor:pointer}.rcb-emoji-button-disabled,.rcb-emoji-button-enabled{background-size:cover;border-radius:6px;cursor:pointer;display:inline-block;height:30px;position:relative;text-align:center;width:30px}.rcb-emoji-icon-disabled,.rcb-emoji-icon-enabled{background-repeat:no-repeat;background-size:cover;display:inline-block;font-size:20px;height:24px;margin-top:2px;position:relative;width:24px}.rcb-emoji-icon-enabled{cursor:pointer}.rcb-emoji-icon-disabled{opacity:.5}.rcb-emoji-button-enabled:after{background-color:#0000001a;border-radius:50%;content:"";height:0;left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%);transition:width .2s ease-out,height .2s ease-out,opacity .2s ease-out;width:0}.rcb-emoji-button-enabled:hover:after{height:130%;opacity:1;width:130%}.rcb-emoji-button-popup{background-color:#fff;border:1px solid #ccc;border-radius:4px;box-shadow:0 2px 4px #0003;max-height:200px;overflow-y:auto;padding:8px;position:absolute;transform:translateY(calc(-100% - 30px));width:158px}.rcb-emoji{cursor:pointer;font-size:24px;padding:3px;transition:transform .2s ease-in-out}.rcb-emoji:hover{transform:scale(1.2)}.rcb-audio-icon{background-size:cover;border:none;cursor:pointer;display:inline-block;height:30px;margin-left:5px;position:relative;width:30px}.rcb-audio-icon:after{background-color:#0000001a;border-radius:50%;content:"";height:0;left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%);transition:width .2s ease-out,height .2s ease-out,opacity .2s ease-out;width:0}.rcb-audio-icon:hover:after{height:130%;opacity:1;width:130%}.rcb-close-chat-icon{background-size:cover;border:none;cursor:pointer;display:inline-block;height:30px;margin-left:5px;position:relative;width:30px}.rcb-close-chat-icon:after{background-color:#0000001a;border-radius:50%;content:"";height:0;left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%);transition:width .2s ease-out,height .2s ease-out,opacity .2s ease-out;width:0}.rcb-close-chat-icon:hover:after{height:130%;opacity:1;width:130%}.rcb-notification-icon{background-size:cover;border:none;cursor:pointer;display:inline-block;height:30px;margin-left:5px;position:relative;width:30px}.rcb-notification-icon:after{background-color:#0000001a;border-radius:50%;content:"";height:0;left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%);transition:width .2s ease-out,height .2s ease-out,opacity .2s ease-out;width:0}.rcb-notification-icon:hover:after{height:130%;opacity:1;width:130%}.rcb-voice-button-disabled,.rcb-voice-button-enabled{align-items:center;background-color:#fff;border-radius:4px;box-shadow:0 0 3px #0000004d;cursor:pointer;display:inline-flex;height:32px;justify-content:center;margin-left:8px;text-transform:uppercase;transition:all .3s ease;width:32px}.rcb-voice-button-enabled{border:1px solid red;box-shadow:0 0 3px #ff000080}.rcb-voice-button-enabled:hover{border:1px solid #3d0000}.rcb-voice-button-disabled{border:1px;border-color:#0003;border-style:solid}.rcb-voice-button-disabled:hover{box-shadow:0 0 3px #8a0000}.rcb-voice-icon{background-position:50%;background-repeat:no-repeat;background-size:cover;background-size:contain;height:60%;object-fit:cover;width:60%}.rcb-voice-icon.on{animation:rcb-animation-ping 1s infinite}.rcb-send-button{border:none;border-radius:4px;box-shadow:0 0 3px #0000004d;cursor:pointer;display:inline-flex;height:32px;justify-content:center;margin-left:8px;text-transform:uppercase;transition:background-color .3s ease;width:51px}.rcb-send-icon{background-position:50%;background-repeat:no-repeat;background-size:cover;background-size:contain;height:50%;object-fit:cover;transform:translateY(20%);width:50%}.rcb-view-history-container{align-items:center;display:flex;justify-content:center;max-height:45px;min-height:35px;padding-bottom:5px;padding-top:10px}.rcb-view-history-button{align-items:center;background-color:#fff;border:.5px solid #adadad;border-radius:20px;color:#adadad;cursor:pointer;display:inline-flex;font-size:12px;justify-content:center;max-width:60%;padding:6px 12px;transition:color .3s ease,border-color .3s ease}.rcb-view-history-button>p{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rcb-chatbot-global{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:1.5;z-index:9999}.rcb-chat-window{background-color:#fff;border-radius:10px;bottom:20px;box-shadow:0 2px 4px #0003;display:flex;flex-direction:column;height:550px;overflow:hidden;position:fixed;right:20px;transition:all .3s ease;width:375px}.rcb-window-embedded .rcb-chat-window{bottom:auto;opacity:1;position:relative;right:auto;visibility:visible}.rcb-window-open .rcb-chat-window{animation:rcb-animation-expand .3s ease-in-out forwards;opacity:1;visibility:visible}.rcb-window-close .rcb-chat-window{animation:rcb-animation-collapse .3s ease-in-out forwards;opacity:0;visibility:hidden}@keyframes rcb-animation-expand{0%{opacity:0;transform:translate(100%,100%) scale(0)}to{opacity:1;transform:translate(0) scale(1)}}@keyframes rcb-animation-collapse{0%{opacity:1;transform:translate(0) scale(1)}to{opacity:0;transform:translate(100%,100%) scale(0)}}@keyframes rcb-animation-ping{0%{filter:brightness(100%);opacity:1}50%{filter:brightness(50%);opacity:.8}}@keyframes rcb-animation-bot-message-entry{0%{opacity:0;transform:translate(-100%,50%) scale(0)}to{opacity:1;transform:translate(0) scale(1)}}@keyframes rcb-animation-user-message-entry{0%{opacity:0;transform:translate(100%,50%) scale(0)}to{opacity:1;transform:translate(0) scale(1)}}@keyframes rcb-animation-bot-typing{0%{opacity:.4}50%{opacity:1}to{opacity:.4}}@keyframes rcb-animation-pop-in{0%{opacity:0;transform:scale(.8)}70%{opacity:1;transform:scale(1.1)}to{transform:scale(1)}}@keyframes rcb-animations-checkboxes-entry{0%{opacity:0;transform:translate(-100%)}to{opacity:1;transform:translate(0)}}@keyframes rcb-animation-options-entry{0%{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes rcb-animation-tooltip-in{0%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}@keyframes rcb-animation-tooltip-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-5px)}}@keyframes rcb-animation-spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}',{insertAt:"top"});const ue={AUDIO_BUTTON:"audio-button",NOTIFICATION_BUTTON:"notification-button",CLOSE_CHAT_BUTTON:"close-chat-button",SEND_MESSAGE_BUTTON:"send-button",VOICE_MESSAGE_BUTTON:"voice-button",FILE_ATTACHMENT_BUTTON:"file-attachment-button",EMOJI_PICKER_BUTTON:"emoji-button"},vr="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml:space='preserve'%20viewBox='0%200%201000%201000'%3e%3crect%20width='100%25'%20height='100%25'%20fill='%23fff'/%3e%3cg%3e%3crect%20width='45'%20height='30'%20x='-22.5'%20y='-15'%20rx='1.5'%20ry='1.5'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2337547a;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20-99%20362)%20scale(3.4003)'/%3e%3cpath%20d='M0%2075q14%200%2014%2017%200%2016-14%2016Z'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2398b0ca;fill-rule:nonzero;opacity:1'%20transform='rotate(180%20106%20386)%20scale(3.4003)'/%3e%3crect%20width='25'%20height='4'%20x='-12.5'%20y='-2'%20rx='.2'%20ry='.2'%20style='stroke:%2346648c;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2346648c;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20-46%20282)%20scale(3.4003)'/%3e%3cpath%20d='M19%2065h4l5%204v1H14v-1Z'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2346648c;fill-rule:nonzero;opacity:1'%20transform='translate(165%20150)%20scale(3.4003)'/%3e%3crect%20width='25'%20height='2'%20x='-12.5'%20y='-1'%20rx='.1'%20ry='.1'%20style='stroke:%2398b0ca;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2398b0ca;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20-3%20240)%20scale(3.4003)'/%3e%3ccircle%20r='7.5'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23a478fc;fill-rule:nonzero;opacity:1'%20transform='translate(236%20175)%20scale(3.4003)'/%3e%3crect%20width='45'%20height='30'%20x='-22.5'%20y='-15'%20rx='1.5'%20ry='1.5'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2337547a;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20139%20600)%20scale(3.4003)'/%3e%3cpath%20d='M184%2075q14%200%2014%2017%200%2016-14%2016Z'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2398b0ca;fill-rule:nonzero;opacity:1'%20transform='translate(165%20150)%20scale(3.4003)'/%3e%3crect%20width='25'%20height='4'%20x='-12.5'%20y='-2'%20rx='.2'%20ry='.2'%20style='stroke:%2346648c;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2346648c;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20219%20548)%20scale(3.4003)'/%3e%3cpath%20d='M175%2065h4l5%204v1h-14v-1Z'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2346648c;fill-rule:nonzero;opacity:1'%20transform='translate(165%20150)%20scale(3.4003)'/%3e%3crect%20width='25'%20height='2'%20x='-12.5'%20y='-1'%20rx='.1'%20ry='.1'%20style='stroke:%2398b0ca;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2398b0ca;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20262%20505)%20scale(3.4003)'/%3e%3ccircle%20r='7.5'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23a478fc;fill-rule:nonzero;opacity:1'%20transform='translate(767%20175)%20scale(3.4003)'/%3e%3crect%20width='116.7'%20height='70'%20x='-58.4'%20y='-35'%20rx='31.5'%20ry='31.5'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2371c9fc;fill-rule:nonzero;opacity:1'%20transform='translate(502%20877)%20scale(3.4003)'/%3e%3crect%20width='60'%20height='20'%20x='-30'%20y='-10'%20rx='3'%20ry='3'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2337547a;fill-rule:nonzero;opacity:1'%20transform='translate(502%20728)%20scale(3.4003)'/%3e%3ccircle%20r='75'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2371c9fc;fill-rule:nonzero;opacity:1'%20transform='translate(502%20473)%20scale(3.4003)'/%3e%3crect%20width='129.4'%20height='82.3'%20x='-64.7'%20y='-41.1'%20rx='37'%20ry='37'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23fff;fill-rule:nonzero;opacity:1'%20transform='translate(502%20464)%20scale(3.4003)'/%3e%3crect%20width='108'%20height='68.6'%20x='-54'%20y='-34.3'%20rx='30.9'%20ry='30.9'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23162334;fill-rule:nonzero;opacity:1'%20transform='translate(502%20464)%20scale(3.4003)'/%3e%3ccircle%20r='19.4'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23a478fc;fill-rule:nonzero;opacity:1'%20transform='translate(415%20464)%20scale(3.4003)'/%3e%3ccircle%20r='19.4'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23a478fc;fill-rule:nonzero;opacity:1'%20transform='translate(591%20464)%20scale(3.4003)'/%3e%3crect%20width='96'%20height='53.2'%20x='-48'%20y='-26.6'%20rx='23.9'%20ry='23.9'%20style='stroke:%23162334;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23162334;fill-rule:nonzero;opacity:1'%20transform='translate(503%20875)%20scale(3.4003)'/%3e%3cpath%20stroke-linecap='round'%20d='m68%20215%207-15M81%20222l-7-22M81%20222l7-14M101%20208H87M114%20219l-7-24M113%20219l13-22M131%20214l-5-17M148%20214h-18M69%20214H51M100%20209l7-15'%20style='stroke:%23a478fc;stroke-width:3;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:10;is-custom-font:none;font-file-url:none;fill:none;fill-rule:nonzero;opacity:1'%20transform='translate(165%20150)%20scale(3.4003)'/%3e%3c/g%3e%3c/svg%3e",wr=h.forwardRef((e,t)=>ce.createElement("svg",{viewBox:"0 0 637 637",ref:t,...e},ce.createElement("path",{d:"m478 113-13 2-4 1h4l14-2c10-2 35-2 42-1l6 3 3 1c3 0-4-3-8-5-7-1-34-1-44 1m56 6 8 6c7 5 20 17 20 19s7 12 8 12l-3-6-4-6c0-3-15-17-25-24-5-3-8-4-4-1m-198 16-9 1a512 512 0 0 1 9-1m-180 30a412 412 0 0 0-23 4 167 167 0 0 0-32 8 439 439 0 0 1 46-9 304 304 0 0 1 11-2l6-1h-8m369 8 4 3-7-6c-1 0 0 2 3 3m-439 9c-7 3-18 13-18 15l6-5c5-5 9-8 14-10l6-4-8 4m442 12-10 11-7 6 7-6c7-5 14-14 13-16l-3 5M65 205l-1 11c0 9 0 10 4 17 5 10 7 12 22 11 10 0 15 0 38-5l5-1-6 1-16 2-21 2c-13 1-16-1-21-10-3-5-4-6-4-15l1-12c1-4 1-5-1-1m335 1c3 0 3 1 3 3l-2 6c-2 5-35 39-76 80-53 51-120 117-138 137-21 24-22 25-22 27 0 3 6 9 9 9 4 0 14-8 38-27a5073 5073 0 0 1 15-16 1421 1421 0 0 0-17 15l-31 25-6 2-4-3c-3-3-3-4-2-6 3-8 79-85 160-163 57-57 79-80 79-86 0-2-3-4-7-4-2 0-2 0 1 1m165 18c-9 17-25 32-57 53l-10 8 16-11 12-8c15-10 27-22 39-39 5-7 6-8 4-8l-4 5m-221 2a199 199 0 0 0-19 10 183 183 0 0 1 27-12c0-1-1-1-8 2m-34 16c-3 3-2 3 2 0l1-2-3 2m151 3-1 2 2-2c3-3 2-3-1 0m-16 12-11 10a281 281 0 0 0 11-10m-24 18-7 5-7 5-42 31c-10 7-24 19-22 19l7-6 16-12a343 343 0 0 0 35-25 573 573 0 0 0 20-17m-187 0-2 2 4-2 3-2-5 2m-14 6-3 2 4-1 4-3-5 2m-7 3-8 4-18 8 18-7 7-3 3-1c1-2 0-2-2-1m254 24a2672 2672 0 0 1-71 54 601 601 0 0 0 39-29 1352 1352 0 0 1 32-25m-291-8-2 2 4-2 3-2-5 2m-13 5-2 2h3c5-3 4-4-1-2m-19 9-7 3-13 6c-10 5-13 7-14 10-3 4-2 5 1 0 2-3 5-5 14-9l13-6 12-6-6 2m178 36c-17 12-21 16-21 17a390 390 0 0 1 20-17m-206 34 1 4 1 3 1 5 2 8 1 5v-6l-1-8-2-5-1-4-1-2c-1-2-1-2-1 0m222 23-9 7a683 683 0 0 0-56 44 261 261 0 0 0-26 20 1345 1345 0 0 0-46 34c-6 3-7 3-19 3-11 0-12 0-18-3-8-4-10-8-17-20l-5-10 4 10c5 10 12 18 19 22 4 2 6 2 17 2 13 0 14 0 21-3l26-19 42-33a2183 2183 0 0 0 43-34 643 643 0 0 1 24-20",fill:"#fff",fillRule:"evenodd"}),ce.createElement("path",{d:"M478 114a620 620 0 0 1-39 6l-21 3a5481 5481 0 0 0-19 3 870 870 0 0 1-54 8l-1 1-6 1-12 2-13 2a992 992 0 0 0-76 12 400 400 0 0 1-45 8l-6 1-5 1h-3l-3 1-2 1-26 4-13 2-17 3c-23 5-33 9-43 19-7 8-9 13-9 27 0 8 1 9 4 14 5 9 8 11 21 10l21-2a1133 1133 0 0 1 23-4 659 659 0 0 0 74-14l3-1h3l3-1h3l2-1 2-1h3l2-1h2l24-5 38-7a2100 2100 0 0 1 93-18l3-1 10-1a2082 2082 0 0 1 120-17l2 1c2 0 8 5 8 7l1 2 1 6c0 4 0 6-3 10-2 4-16 16-18 16l-7 5-10 8a1070 1070 0 0 0-11 7 113 113 0 0 1-20 14l-2 2-3 2-2 2h-1a154 154 0 0 1-28 21l-5 4-5 4a573 573 0 0 1-50 37 175 175 0 0 0-24 18l-1 2-2 1-2 1-2 1-1 1-12 10a396 396 0 0 0-32 25l-8 6-6 5-9 7a326 326 0 0 1-25 20l-13 12a5073 5073 0 0 0-17 15c-24 20-34 27-39 27-2 0-8-6-8-9 0-2 1-3 22-27 18-20 85-86 138-137 41-41 74-75 76-80l2-6c0-2 0-3-2-3l-7 1a233 233 0 0 1-26 9l-1 1-1 1h-1l-1 1h-2l-3 2-1 1h-2l-3 2h-1l-5 2-22 10-9 4-4 2-5 2-10 4-2 1-2 1-2 1-13 6a334 334 0 0 1-38 17 75 75 0 0 0-14 6l-5 2-4 1-2 1-3 2-7 3-16 6a247 247 0 0 0-32 14l-1 1h-2l-1 1h-2l-1 1-12 6a103 103 0 0 0-27 15l-2 5-1 1v11l1 5 1 5 1 4c0 3 0 4 2 4v3l1 3 1 2 2 10 1 4 1 5 2 10 2 8 1 4 1 4c3 3 9 25 11 38l1 7v2l1 4v1l1 1v2l1 2 1 3v1l5 10c7 13 9 16 17 20 6 3 7 3 18 3 12 0 13 0 19-3 8-4 11-6 26-18a1345 1345 0 0 1 85-67 683 683 0 0 1 50-39l12-9a513 513 0 0 1 44-33 201 201 0 0 0 22-17 2270 2270 0 0 0 73-54 158 158 0 0 0 58-59c2 0 3-9 4-27l-1-19-1-4-1-6-1-3-4-6-4-6c0-2-6-8-13-14a77 77 0 0 0-28-18c-6-1-34-1-43 1"}))),xr=h.forwardRef((e,t)=>ce.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ce.createElement("path",{d:"M765-321q0 117-84 196-83 80-200 80-118 0-200-80t-83-196v-392q0-85 61-144 61-58 146-58 86 0 147 58 61 59 61 144v374q0 54-39 92-39 37-93 37-55 0-93-37-38-38-38-92v-372h110v372q0 9 6 14t15 5q8 0 15-5t7-14v-374q0-39-29-66t-68-27q-40 0-69 27t-29 66v392q0 71 51 119t122 48q71 0 122-48t51-119v-426h111v426Z"}))),za=h.forwardRef((e,t)=>ce.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ce.createElement("path",{d:"M125-165v-113h77v-273q0-93 55-167 56-75 146-100v-19q0-32 22-55 23-23 55-23t55 23q22 23 22 55v19q90 25 146 99 56 73 56 168v273h77v113H125ZM480-32q-38 0-66-27-27-27-27-66h186q0 39-27 66t-66 27Z"}))),Ra=h.forwardRef((e,t)=>ce.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ce.createElement("path",{d:"M137-190v-113h78v-253q0-41 11-79 11-39 35-71l-9 150h10L17-802l74-74L873-92l-74 74-175-172H137Zm609-149L319-769q20-15 41-25t44-16v-28q0-32 22-54t54-22q32 0 55 22t22 54v28q85 23 137 94t52 160v217ZM481-47q-38 0-65-27t-27-65h184q0 38-27 65t-65 27Z"}))),ja=h.forwardRef((e,t)=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",ref:t,...e},ce.createElement("g",{strokeLinecap:"round",strokeWidth:10},ce.createElement("path",{d:"m19 19 61 61M80 19 19 80"})))),qa=h.forwardRef((e,t)=>ce.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ce.createElement("path",{d:"M94-136v-255l351-93-351-92v-253l816 346L94-136Z"}))),Ga=h.forwardRef((e,t)=>ce.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ce.createElement("path",{d:"M480-372q-61 0-105-43-43-43-43-105v-240q0-61 43-105 43-43 105-43 61 0 105 43 43 44 43 105v240q0 62-43 105t-105 43ZM425-76v-122q-121-16-197-108t-76-214h109q0 91 64 154t155 63q91 0 155-63t64-154h109q0 122-77 214T534-198v122H425Z"}))),Ya=h.forwardRef((e,t)=>ce.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ce.createElement("path",{d:"m763-343-80-79q8-20 13-44 5-23 5-54h109q0 49-11 95t-36 82ZM625-482 336-770v-2q3-56 45-96t101-40q62 0 105 43t43 105v249l-1 17q-1 7-4 12ZM427-76v-122q-120-16-196-108-77-92-77-214h109q0 91 64 154t155 63q43 0 80-14 37-15 67-41l78 79q-35 32-78 53t-93 28v122H427Zm362 27L41-796l75-75 748 748-75 74Z"}))),Er=h.forwardRef((e,t)=>ce.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ce.createElement("path",{d:"M625-511q29 0 50-21t20-50q0-29-20-50-21-20-50-20t-50 20-20 50q0 29 20 50 21 21 50 21Zm-290 0q29 0 50-21t20-49q0-30-20-50t-50-21q-29 0-50 20-20 21-20 50 0 30 20 50 21 21 50 21Zm145 268q75 0 137-43t85-115H258q24 72 85 115 62 43 137 43Zm0 198q-90 0-170-34-79-34-138-93T79-310q-34-80-34-170t34-170q34-79 93-138t138-93q80-34 170-34t170 34q79 34 138 93t93 138q34 80 34 170t-34 170q-34 79-93 138T650-79q-80 34-170 34Zm0-435Zm0 322q134 0 228-94t94-228q0-134-94-228t-228-94q-134 0-228 94t-94 228q0 134 94 228t228 94Z"}))),Wa=h.forwardRef((e,t)=>ce.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ce.createElement("path",{d:"M553-64v-108q107-27 173-113 67-87 67-197 0-109-67-195T553-789v-108q152 26 249 144 97 117 97 271 0 155-97 273T553-64ZM61-335v-290h176l236-237v764L237-335H61Zm492 28v-346q51 23 82 70t31 103-31 103q-31 47-82 70Z"}))),Va=h.forwardRef((e,t)=>ce.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ce.createElement("path",{d:"M807-15 700-123q-33 21-71 37-38 15-80 22v-108q20-4 38-12l35-17-153-154v257L234-335H57v-290h144L10-818l74-75L882-90l-75 75Zm37-264-80-79q13-30 19-60 7-31 7-64 0-109-68-195-67-86-173-112v-108q152 26 249 144 98 117 98 271 0 55-14 107-13 51-38 96ZM661-462 549-575v-78q51 23 83 70 31 47 31 103l-1 9-1 9ZM469-655 366-759l103-103v207Z"}))),kr={general:{primaryColor:"#42b0c5",secondaryColor:"#491d8d",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif",showHeader:!0,showFooter:!0,showInputRow:!0,actionDisabledIcon:"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20viewBox='0%200%2042%2042'%3e%3cpath%20style='fill:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke:%23b00000;stroke-opacity:1;stroke-miterlimit:4'%20d='M17%209a8%208%200%200%201-8%208%208%208%200%200%201-8-8%208%208%200%200%201%208-8%208%208%200%200%201%208%208Zm0%200'%20transform='rotate(.086)%20scale(1.77778)'/%3e%3cpath%20style='fill:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke:%23b00000;stroke-opacity:1;stroke-miterlimit:10'%20d='M14.66%2014.66%203.34%203.34'%20transform='rotate(.086)%20scale(1.77778)'/%3e%3c/svg%3e",embedded:!1,flowStartTrigger:"ON_LOAD"},tooltip:{mode:"CLOSE",text:"Talk to me! 😊"},chatButton:{icon:wr},header:{title:k.jsx("div",{style:{cursor:"pointer",margin:0,fontSize:20,fontWeight:"bold"},onClick:()=>window.open("https://github.com/tjtanjin/","_blank","noopener,noreferrer"),children:"Tan Jin"}),showAvatar:!0,avatar:vr,buttons:[ue.NOTIFICATION_BUTTON,ue.AUDIO_BUTTON,ue.CLOSE_CHAT_BUTTON],closeChatIcon:ja},notification:{disabled:!1,defaultToggledOn:!0,volume:.2,icon:za,iconDisabled:Ra,sound:"data:audio/wav;base64,UklGRmaIAABXQVZFZm10IBAAAAABAAIAQB8AAAB9AAAEABAATElTVBoAAABJTkZPSVNGVA4AAABMYXZmNjAuMTYuMTAwAGRhdGEgiAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////AAAAAAAA//////7/////////AAABAAAAAgABAAEAAQAAAAIAAQABAP//AAD+////AAD+//7////+////AAD//wAA/v8AAAAA/v8AAP//AAAAAAAAAgD////////+////AAABAAEAAgD/////AQABAAAA//8CAP//AAAAAAAA/v8AAAAA//8AAAEA//8EAAAAAAAAAAAA//8BAP//AQABAAEA/////wEA/v///wAAAAACAAAAAAABAAAA//8AAP//AAACAP//////////AAAAAAEAAAAAAAEA//8AAAEAAQADAAIAAgAAAAAA/v///wEAAAAAAAEAAAAAAAEA//8AAAEAAQD//wAA//8AAAEAAAABAAEAAAABAP//AAD//wAAAgAAAP//AQD/////AAAAAP7/AgAAAAIAAAAAAAAAAAABAAAAAQABAP//AAABAP///v8AAP////8AAP//AAD//wAA//8BAP//AAD///7///8BAP7///8AAAIAAgABAAEA/v8AAP//AQADAAEAAAACAAEA/////////v///wEA/v////7/AAD+////AAAAAAAAAgAAAAAAAAD//wEAAAAAAAAAAQABAAIA/v8AAAAA//8AAAEAAAAAAP//AgD//wEA/////wAAAQACAAAAAAAAAP//AQD/////AQAAAAEA/v8AAAEAAQABAAEA///+////AQD//wEAAgD+//7/AAAAAAAAAQAAAAAAAQAAAAAAAAAAAP//AAD//wEAAQD//wAAAQABAP7///8AAP7/AAABAP7/AQABAAEAAAABAAEAAAD+/wIAAAABAAAAAQD/////AQACAP////8AAP//AQD//wEA/v8CAAEAAAAAAAAAAQAAAAIAAQAAAAEAAgD//wEAAAAAAP7///8BAP//AgAAAP///v8CAAAAAgD///////////7/AAACAAEAAgD//wAAAAABAP//AwAAAAMA//8AAAAAAQD+/wAAAAD//wAAAQD//wEA//8BAP7/AAABAAAA//8BAAAA//8AAP//AQADAP3////+////AgD+/////v8BAAEAAQACAAAAAAAAAAAA//8AAP//AAD+/wEA/v8AAP7/AAD//wAAAQACAAAAAQAAAP//AQAAAAAAAAABAAAAAAD+//////8AAAAAAAD//wAAAAABAAEA//8AAAEA//8AAP//AgD+/wAA///+/wAA/v///wAAAQABAAAAAQD//wAA//8AAAEA//8BAAAAAgABAP//AAACAAIAAQABAP//AAAAAAAA//8BAAIAAAABAAAA//8CAAEA/v//////AAAAAAEA////////AQAAAP//AAD//wAAAAAAAP3/AAAAAAEAAAACAAAAAAAAAP//AAD//wAAAAAAAAAAAAAAAP///v///wAAAAABAAAAAAD//wEAAAABAAEAAQD//wAAAAACAAAAAQD+/wAA//8BAAEAAAD+/wAA/////wAAAAABAAAAAAD//////v8AAAAA//8AAAAAAAAAAAIAAAABAAEAAAABAP7/AAD9//////////7///8BAP//AAD///3/AQABAP//AAD//wAAAAABAAAA//8AAP//AAD/////AQABAAEA//8AAAAA//8BAAMA//8AAAAA//8AAP7/AAD//wAAAAAAAP7/AQAAAAAA/v8CAP//AAABAAIAAQABAAAA//8BAAEAAQD///7/AQD//wAAAQABAP//AAD//wEAAAAAAAAAAQAAAAIA//8AAP////8AAP//AQD//////v///wEA/v8AAAIAAgACAAEAAAAAAAEAAAAAAAAAAAAAAAAAAQD//wAA/////wAAAQACAP////8AAAAAAAD//wAAAQD+/wEA//8AAAEAAwD//wEAAQAAAAAAAAABAP////8AAAAAAQAAAAAAAAAAAAEAAQAAAP////////7/AQABAAEAAQD///////8BAAAA//8AAAAAAgABAAEA/v8BAP7///8BAP3/AQABAAIAAAD//wEAAAAAAP//AAABAAIA//8CAAAAAQAAAAEA//8BAAAA/////wAAAAD//wEAAQD//wAAAAAAAP//AAAAAAAAAQABAAAAAQAAAP//AQD//////v8AAAEAAAAAAAAA//8AAAAAAAACAAEAAQAAAP//AAABAAEA/////wAAAgABAAAAAAAAAAEAAAABAP//AQABAP7////+/wEAAAAAAP//AAABAAAAAAABAAEAAAAAAAAA//8BAP///f/+/wEAAQD///7///8AAAAAAQAAAP////8AAAAAAAABAAAAAQD/////AAD//wEA//8AAAIA//8CAAAA//8AAAAAAAD+/wEAAAD+/wAA/////wAA////////AAAAAAAA//8BAAAAAAD//wAAAAD//wEA//8AAP//AQD+/wAAAAAAAP7/AAD+/wEAAQABAP//AAABAAEAAQD//wAA/////wEA//8AAAAAAgAAAAAA//8BAAAAAgAAAAAAAAAAAP7/AQD//wAAAAD+/wAAAAADAAIA/////wAAAQD//wIA//8BAAEA/v8AAAIAAAAAAP3///8AAAAAAAAAAAAAAAABAP///////wAA//8AAAEAAQABAAEAAQABAAAAAQAAAAAAAQABAP7/AQD//wAAAQABAAEA//8BAAAAAgAAAAEAAAABAP//AAD/////AAD//wIA/////wIAAAD///7/AAAAAAAAAAACAP//AAABAP////8AAAAAAAABAAAAAgAAAAAAAQD+/wEA/////wAA/////wAAAAAAAAAA/v//////AAAAAP//AAABAAAAAQAAAAIAAAACAAAA//8AAAAA//8AAP7/AAAAAP//AAACAP//AQABAP//AQABAAAA/////////v8AAP//AQAAAAAA///+/wAAAQD+/wEAAQAAAAEA/////wAAAQD//wAA//8AAAAA/v8BAAEA//8AAP7//v8BAAAAAAAAAAEA//8AAAEA/////wAAAAD//////////wEAAAABAAEA//8CAAEA/f8AAAAA//8BAAAABAABAAEAAQAAAAAAAAAAAP7///8AAAAA/v8BAAAA//8AAAIA//8AAP////8BAP//AAAAAAAAAAD/////AQD///7/////////AQD8////AgABAAIA////////AAD//wAAAAABAAAAAAAAAAEAAgAAAP//AQD//wAAAAAAAP/////+/wAAAAABAAAAAwABAP///////wEAAAADAP//AQACAAAA//8CAAEAAAAAAP///////wIAAAAAAAAAAQAAAAAAAgD//wEAAAABAAAA/v8AAAAAAAAAAAAAAAAAAAEA/v8AAP//AQD//wAA//////7///8AAAAAAAAAAP7/AQD//wAA//8AAAEAAAABAAEAAQD/////AAD//wEAAAD/////AQAAAAEAAAD//wEAAAD/////AgD//wAAAQD//////////wAAAAD//wAAAAABAAAAAAD//wAAAQD///7/AQD//wEAAAD/////AAD//wEA//8AAAEA//8CAAAAAQD//wEAAgAAAAEAAwAAAAAA/v8BAAEAAgD//wEAAAAAAAAAAAD//wEA//8AAAAAAQACAP///////wAAAQABAAEAAAAAAAEAAQD+/wEA/f////////8AAAAA//8AAAEA//8BAAAA/v///wEAAAAAAAEA/////wAAAAAAAP//AAAAAAIAAAABAAAA/////wAAAAD//wAA/v8AAAMAAQD+/wEAAAABAAEA//8BAP//AgAAAAAAAAD//wAA/////wEA/v8CAP3/AAACAP3/AQABAAAAAQACAAEA/v8AAAAA//8BAAAAAgAAAAAAAgACAAEA/v/9/wAAAQABAP7///8AAP//AgD+/////v8CAP////8BAP//AQACAAEAAQABAP//AAD///7/AAABAAEAAgD//wEA//8CAAEAAQABAAEAAAABAAAA/v8AAAEA/v8AAP//AAABAP//AQAAAAEAAgAAAAAA/v///wEAAQAAAAIAAAD/////AgAAAAEA/v8AAP7/AQAAAAAAAQAAAAEAAAACAAEA//8BAP////8AAAIAAAAAAP//AAAAAAIAAAAAAAAAAwABAP///v8BAAAAAAAAAP3/AAABAAEA/v////////////3//v8AAAAAAQABAAIAAAD+/////v8AAAAAAQABAAEAAQAAAP//AAAAAP//AQAAAP//AAABAAAAAAAAAAAA////////AAAAAP//AQD/////AAABAAEA//8CAP7///8AAP7//v8BAAEAAAD+/////////wEAAAAAAAAAAgD//wAAAQAAAP7/AQABAP//AQAAAAAAAAD/////AAACAP////8BAAAAAAD//wAA//8AAAEAAQABAAAAAAABAAAAAQD+/wEA/v8AAAEAAQD/////AAD//wAAAQABAP7//v//////AAACAAAAAAAAAAAAAAACAAAAAQAAAAAA//8BAP//AQD//wAA///+/wIAAQD//wAAAAD//wAA/v8AAP3///8AAAAAAAAAAAAA/f8AAAAA//8CAP7/AAD///7/AAAAAAAAAAD//wEAAAAAAAEAAAAAAAAA//8BAP////8BAP7///8CAAEA//8BAP3///////////8BAAAAAAAAAAEAAgD+//////8BAAMAAQADAAEAAAACAAAAAQD/////AAABAAMAAQAAAP//AQD//wAA//8AAAAA//8CAP7//////wAAAAAAAAIA/v8AAP//AAACAP//AwD//wAA//8AAP//AwD//wEAAQABAAEAAQACAAEAAAD//wAA//8AAAIAAAAAAP///////wAAAQD//wIA//8BAP7/AAD///////8AAAAAAAAAAAEAAAD//wAAAQD//wEA//8BAAAAAAD/////AgABAAIAAAABAAAAAAAAAP//AAAAAAAA//8AAAAAAAD/////AQAAAAAAAQD//wAA///+////AAAAAAEAAgABAAEAAAAAAP//AQAAAAAAAQD+/wAAAAABAAEAAAD/////AQABAP7///8AAAIAAAACAAAA//8AAP//AgACAAAA///+/wAAAAABAAAAAQAAAAEA/v8BAAEA//8CAP//AQD+/////v8AAAAAAAACAP//AAD+/wIA/v8BAAAAAAD/////AAAAAP7///8AAP7//////wEAAAABAAAAAAD//wAAAAAAAAAAAgACAAAAAAABAAAA/f8AAP7/AgAAAAEA//8BAAAAAAD///7/AQD//wAAAAAAAAEAAAAAAAEAAAAAAAAAAQAAAAAA//8AAAAAAAABAP///////wAAAgABAAEA//8AAP//AAACAP//AQABAAEA//8BAAAAAAABAAAA//8AAAEAAAAAAAIA/v8BAP//AQD//wEAAAABAAEAAQACAAEAAAAAAAEAAAABAAAAAAD/////AAABAAEA//8AAAAAAQABAP//AAAAAP//AAD/////AQD//wAAAAABAAEA//8BAAAA//8AAP///f/+/wAA/////wAAAQAAAAIAAAAAAAAAAAD+/wEA/f8CAAAA//8AAAEAAgAAAAMAAAABAAAAAAAAAP//AQAAAAAAAQABAAAAAQAAAP//AAAAAAAA//8AAAAAAAABAAAAAQAAAAAAAAABAAIAAAAAAP7/AQD//wAAAAD+////AAAAAAAAAAABAAAA/////wAA//8AAAAAAAD/////AgD//wAA//8CAP//AQACAAEA/f////////8BAAIAAQABAP//AAD//wAA///+////AAD+/wAAAQD/////AAAAAAAA/////wAAAAABAAAAAQAAAAAA//8AAAIAAAABAP//AQABAAEA//8AAAAAAAADAAEAAAABAP//AgD//wMA//8AAAAAAAD//wAAAAD9/wEA///+/wAA//8BAAEA//8BAAAA//8AAP///v8BAP///////////v8BAAAAAQABAAAAAAAAAAAA//8AAP7/AQAAAAAAAAAAAP7/AQAAAAAAAgABAAEAAAABAAEAAAAAAAAAAAD+/wAAAAD//wEAAAAAAAAAAAAAAP//AgABAAAAAAABAAEAAAD/////AAAAAP//AAABAP////8BAAAAAQABAP7//v/+////AQAAAAAAAQAAAAEAAgAAAAAAAQAAAAEAAAD+/////v8BAP//AAABAP//AQABAAAAAAD//wAA//8CAP//AAAAAAEAAAABAAAAAAAAAP//AAD+////AwAAAAAAAQD//wEAAAACAAEAAAADAAAAAAD/////AAAAAAEAAAABAAAA//8AAAEA//8BAP///v8AAP//AAD//wAAAQABAP//AQAAAAAA/////wEAAQAAAP////8AAAEA//8BAAAAAQAAAP////8AAAAAAQAAAAIAAQAAAAEAAAAAAAEAAAD//wEAAAAAAP////8AAAAA//8BAAEAAAAAAAIA///+/wIA/v8BAAAAAQACAAAAAQAAAP7///8AAP//AAAAAAEAAAAAAP7/AAD+////AAAAAAAAAAD//wAA/v8BAAMAAAABAAIAAgD//wAA//8BAAEA//8BAP7/AAAAAP7///8BAAAAAQAAAP7/AQD/////AAAAAAEAAAABAP//AQABAAAAAgABAAAAAAAAAP///////wEA//8AAAEA//8AAAAAAQAAAAIAAAABAP7//////wAAAQABAAAAAAABAAEA///+/wAA//8BAP///v8AAP///v8BAAAA//8CAAAAAQAAAAEAAQABAAAAAAD+/wAAAAD+/wAAAAAAAAAA/f////////8AAAAAAQABAP///////wEA//8BAAEAAAAAAAAA/////wEA/v//////AAAAAP//AAABAAAAAAD+/wAAAAD9////AQAAAAEAAwD//wEAAQAAAP//AgAAAAAAAAD+/wIAAAAAAAAAAAAAAAIA//8AAAEAAQACAAAAAQD//wAAAAD//wIAAQABAAAAAAD//wEA//8BAAEAAQAAAAAAAQABAP7/AAD//wEAAAACAP7/AQAAAAAAAAD//wIAAQACAAIAAQAAAAAAAAAAAP3///8BAAAAAQACAP//AgD9/wAAAAD//wEA/v////////8AAAAAAAD//wEAAQD//wMAAQAAAAEA//8AAAEA//8AAAAAAAACAAAAAAD//wAAAQD///////8AAAAA//8BAAIA/v8BAAEA/f8AAAAAAAAAAAAAAgD/////AAD+/wAAAAD//wAAAAAAAP//////////AgABAP///v8AAAIAAQAAAP//AAABAAAA/////wAAAAAAAAEAAAABAP///v///wIA//8BAAEAAQAAAAAA///+/wEAAAAAAAAA/////////v8BAP3/AAAAAAAAAAAAAAAA//8AAP//AAAAAP//AAABAAIAAAACAP////8DAAAAAAABAAAAAwABAP//AAABAP//AAAAAP////8BAAAAAgD//wAA///+/wAAAQD//wAA//8AAP7///8AAAAA/v8AAAAAAQD//wEA/v////////8AAAAAAQAAAP//AQACAAAAAAAAAP//AAD//wAAAAD//wAAAAD+/wAAAAAAAP//AQD//wAAAgAAAAAAAQABAAAAAwD+/wAAAAD///7/AQD//wIAAQAAAP//AAD//wAA//8CAAEAAAAAAAAA/////wAAAAD//wEAAQD///////8BAAAA//8BAAEAAAAAAAAA/v///wEAAAAAAAAAAAADAAAAAAAAAAAAAQABAAEAAAD+//7//v8AAP//AQAAAAAAAAABAAEAAgAAAAAAAQD//wAA/f8AAAAAAAABAAAAAQAAAAAAAAAAAAIA//8BAP///////wIA/////wAAAAABAAEA//8BAAAAAAD//wAAAQD//wEAAAAAAAIA/v8BAP//AAAAAAEAAAABAP//AAAAAAAAAQABAP7/AAABAAAAAQD//wIAAAAAAAEA///+/wAA//8AAP//AAAAAAAAAAABAP///////wIAAQAAAAEAAQAAAP7/AQAAAAAAAQAAAAAAAQD/////AQAAAAAA///+//7/AAD+/wEA//8AAAAA///+/wEAAAABAAIAAQABAAAA//8AAP//AAD//wAAAAD//wAAAAAAAP//AQAAAAAA////////AQAAAAAAAQD+////AQABAP7/AAD///7/AgD//wAAAAAAAP//AAAAAAEA//8BAAEAAgAAAAIAAAD//wEA/////wAAAQD///7/AQD//wEAAQD/////AAAAAAEAAgAAAAAAAQD//wEA//8AAP7//////wAA//8BAAEA//8BAAAAAQD/////AAABAP//AAACAP//AQAAAP//AAABAP////8AAAAAAAABAAEAAwABAAAAAgD//wAAAAD//wEAAAABAAAAAAABAAEA/////wAA//8AAAIAAAAAAAEAAQABAAEAAQABAP//AgAAAAAA//8BAP3//v///wAA//8AAAAAAQAAAP//AQD//wEAAAACAAIAAAABAAAA//8BAAEA//8BAP//AAAAAP//AQAAAAIAAAD//wAAAAAAAAEA////////AQAAAP//AQD//wAAAQD+/wEAAAABAP///v///wAAAAAAAP//AAAAAAIAAQD//wAAAgD+/wAAAAD//wAAAAABAP///P//////AAACAP////8AAAIAAAABAAAAAAAAAAAA//8AAAAAAQADAP//AQAAAAAAAAABAAEAAQAAAAAA/v8AAAAAAAD//wAAAQD//wAAAAD//wAA/v////////8CAAEA/v8BAP7/AAAAAAAA//8AAAEAAAD//wIAAQAAAAIAAQAAAAAAAAD///7/AQABAP//AAAAAP//AAACAAEA//8BAAAAAwAAAAAAAAD//wEAAAD//wAA///////////+/wAAAQABAAIAAAABAAEAAAD//wEAAAD/////AAD+/wIAAwABAAEA/v8BAAEAAAD//wAA//8AAP//AAAAAAEAAAAAAP//AAAAAAEAAQABAAEA/v///wAAAAD//wEAAAACAAAA/f/+/wAA/v///wAA//8AAAEAAQD///7/AAAAAAAAAAABAAAAAAACAAAAAAABAAAAAAABAP//AQD//wAA//8BAP7/AgABAAEAAQAAAAAAAQD//wEA/v8AAP////8AAP///////wIAAQD//wAAAAD//wAA/v///wAAAQD//wIA/////wEAAAAAAAIAAAABAAAAAAD//wEA//8AAAAA/////wAAAQAAAAAAAAD//wEAAQAAAAAAAAACAP///////wAAAgD//wAA/v8AAAIAAAAAAAEAAAABAP//AQABAAEAAQAAAP///v8BAAEAAAAAAP////8AAAAAAQD//wIAAQAAAAEAAAAAAAAA//8BAP//AAAAAP7//v///wEAAAAAAAIAAAAAAP//AAD//wEA//8BAAAAAAABAAEAAAABAP7///8AAAIAAAABAP//AAD//wEAAAAAAP//AAAAAAEAAAAAAAAAAAAAAP7/AQD//wAAAQD+/wEA/v8BAP7/AAABAAEAAAACAAIAAAADAAAA//8AAAEAAAABAP//AQD//wIA/////wEA//8AAAEA//8AAAEAAAAAAAAAAQABAAAAAAAAAAAAAAD//////////wAA//8AAP7/AAD+/wAAAQAAAAAA/////wAABAAAAAAA//8AAAEAAAAAAAAA/v8AAP//AAAAAAAAAAD//wAAAAD///////8BAAEAAAD/////AgABAAEA/v/+/wAAAQACAAEAAAD//wAAAwABAP//AgD+/wAA/v8AAAAAAAAAAAEA//8AAAEAAAD+/wEAAAAAAAEAAgAAAAEAAAABAP//AQD+/wIA/////wAAAQD//wAAAQD+/wAAAQABAAAA////////AAACAAAAAQAAAAIA//8BAP///v///wEA//8BAAEAAQD+/wAAAQD9/wAAAQAAAAEAAAABAAAAAgAAAP//AAD+/wAA/f8AAAAA////////AgAAAAcAAQD7/wEA/f8AAAIA//8GAP7//v/+//b/AQD//wQADgD///3/9/8FAPr/6/8EABAACQD9/wIA/P/5/w4A///t/wQA/P8LAB0ACQD5////AQD2/+7/AgD6//r//v/z/xIA9f8oAAMA4f8OANz/EQAdAAAA5P/w/2MAAQDq/w0A1/8bALz/BgDb/+j/lQD9/yMABAACAA0Alf8NAKr/CwCMAPD/QwDq/wkA9v+g/wgAk/8QAD0ABgAWAAQAMwD7/9T/8//f//z/JwAEAOL/DwBxAAwAzf/+/xUA8v+O//H/fAD5/xUA+/9m//P/yf/r/y8ACAAbAEQA3f9AAAcB9f/p/sD/+QHv/8/9EQCv+ez/j+v8/3pS7/83By4AF6Go/7PNjgDMEn7/Sk0NAeEfIv+9DCwAKfuY/9fRAv2A3mjzfQg/Ft3fzTQE703jljkirPskFOdBEUYzORerLDvvDg7C6dcbwNJj/b/CisId8XfblBZS/oYksP1YRdoQJ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wAwAAQAHwD0/xUA8f/4/+L/2//7/8z/AwDc/woA6f8AAAQAAwAoAAcANAAAACcAAgAUAAEA+P8CANv/AgDR/wEA4v8BAOz/AgAIAPv/JAAVADMAFAAhAPP/GQDz//7/3P/l/+3/z/8BANf/CgDn/wkA/P///xoABwAwAAIAJwACABcAAwABAAIA4f8BAND/AgDd//3/6P8CAAYA/f8YAAwALwAZACUA9v8bAPj/AwDq/+r/7P/S//7/1/8EAOX/CQD6//7/GQAFAC8AAQApAAEAGQACAAMAAgDm/wEAzv8BANv//v/p/wIA//8BABMABQArACAALAABAB4A8f8NAOv/7v/m/9n/+P/R/wMA4f8OAPT/AQATAAMAKwAHACoAAwAbAAMABQADAO7/AQDU/wEA2f8AAOL////3////EgAAACUAGgAvAAUAHQD2/xIA9f/0//T/3P/4/8///f/h/wIA7f8AAAoAAQApAAQALQADACAAAgAPAP//9P///9r//f/T/wAA3f/9//D/AQAQAP//HAAHAC8ACQAfAPv/GAD+//f/+P/j/wEA0v/+/9n/AADq/wIABgD//x0AAQAuAAEAIwAAABQAAwD8/wEA3/8AAM//AADe////7f8BAAwA//8ZAAMALwAAACEA//8dAP3//v/9/+n////U//z/1v8BAOT/AAD+/wAAGwD+/ywA/v8kAAIAGAD///3////q/wEA0P///97/AADk/wAABAAAABUAAQAqAAEAKQAAABwAAAAFAP//6f8AANr////X/wAA4/8AAPj/AgAUAAAAKgD//ywAAAAcAP7/AQAAAOv/AADU/wAA2v8CAOP/AAABAAAAFgABABsAAAAqAAEAHwAAABQAAgDv/wEA3v///9H////f////7/8BAAoAAQApAAAALgD//yEAAQAIAAAA8P8BANr//v/V////4f8AAPf//v8UAAAAFAAAACYAAQAhAP7/GwD+//T/AADo/wIA1v8CANr/AgDp/wEABgAAAB8AAQAsAAEAJAAAAAwA///z/wEA3/8AANT/AADh/wEA9P///xQAAgASAAAAJQAAACEAAAAaAP//+v8BAOj////W////2P8BAOf///8DAAAAHwAAAC4AAAAlAAAAEgAAAPL/AQDm////0f8CAN3/AADr//7/EQD//xAAAQAhAAIAJQAAAB8AAAABAP//6v8CAN//AQDX/wAA4/8AAPr/AAAXAAAAKgABACgAAAAbAP///f8AAOj/AADU/wAA2v///+f/AQANAAMAEQD+/xwA/v8kAP7/IQABAAgA/v/p////5/8AANf/AQDd/wEA8v8BABMAAQAjAAAALgAAACAAAQADAAEA7f8BANn/AgDY//7/4P/+/wEAAAAXAAIAFAAFACUA/P8jAP//EgAAAO//AQDo////1/8AAN3/AADx//7/DgAAAB0AAQAoAAAAIwAAAAoAAQDv/wMA4f8AANn/AQDi/wEA+v///xgAAAAQAP3/IwD//yUA/v8XAAAA7/8AAOv/AADc/wAA3P/+/+v/AQALAAEAGgACACkAAAAkAP7/EAABAO/////q//7/1/8AANz/AgDw/wEAEgD//w8AAAAcAAIAJQAAAB0AAAD2////7P8AAOP/AgDa/wAA5P8BAAQAAQAWAAAAIgAAACMAAAAaAP//+P///+v/AQDZ/wAA2////+7/AAARAAAADgAAABYAAAAhAAAAIAABAPz/AQDt/wAA5P8AANr/AQDg/wEA/P8BABcAAAAhAP//KQD//xwAAAD8/wEA7v8AAN3////Z/wAA6f8BAA0AAAARAAEAEQAAACMAAAAgAAEA/f8CAO3/AADv/wAA3v8BANv////1////EgAAABkA//8nAAAAIgAAAAMAAADu/wAA6P8CANn/AQDg////BQD//xMAAQAOAP//IAABACYAAAAGAAAA6f////H/AADg/wEA2f8AAO3///8PAAAAFQACACQAAAAkAAEADQABAO//AADp/wAA2////9z/AQD7/wEAFgAAAAwAAQAXAP7/JQD9/xMAAADx/wAA8f8AAOr/AADc/wEA4/8BAAkAAAAVAAAAIQD//yYA//8UAAEA9P8BAOz/AADf/wAA3P8AAPP/AAAQAAAADQABAA0AAAAlAAEAGAD///H//v/0/wEA7v8CAN//AADg//3/BAACABUAAQAfAAAAJwABABgAAQD0//7/7f///+L/AADa/wIA8P///w4A//8SAAMACQAAACAAAQAgAP//+v////P////y/wEA4/8BANr/AQD9/wAAEwD//xkAAQAjAAAAIgABAPz////s/wAA6v8BANX/AQDr//7/BwABABMAAAAHAP//FwAAACYAAAD//wEA9P8BAPb/AQDu////2v8BAPn/AAATAP//FwD//yEAAAAjAAAAAgAAAOn/AQDr//7/2P8CAOT/AAABAP//FgABAAUAAQATAP//IwAAAAEAAgDy/wEA9/8AAPb/AADb/wAA6/8BABAAAAATAP7/IQAAACYA//8UAP//7/8AAPD/AADd/wEA3P/+//7///8OAAAACgAAAAgAAAAhAP//CQACAPT/AQD2/wAA9v///97////m/wIADgABABMAAQAfAP//JwAAABMAAADw/wAA8P///+r/AQDb/wAA9f8AAA8AAAARAAIABAD//wYA/v8HAAAAAQD//wMAAgAGAAAA7f8AAOz/AAALAP//DwACABQA//8bAAAAHgD///f/AADq/wEA6/8BANj//v/t/wAACAD+/xAAAgAEAAAABAABAAcAAQADAAAA//8AAAUA///1/wAA5f///wIAAAAOAAAAEAAAABsAAAAhAAAA/v8BAOj////y////3f8AAOf/AQAGAAEADAAAAAcA//8BAP//CQABAAMA//8BAP//BQAAAAAAAADo/wAA+/8AAAoAAAALAAAAFAAAACAAAQAGAAIA7f8BAPH/AADm/wMA3P8CAP7/AgASAP//CgD//wAAAAAIAP//BQD//wEAAAACAP7/BAAAAPz/AwD8////BAAAAAEA//8HAAAAHQAAAAgA/v/x//7/8f///+f/AQDg/////P///woAAAAMAP//AAABAAYA//8EAAAAAgAAAAUAAAACAAAAAwAAAAIAAAABAAAAAQABAAAAAgAcAP//DgD///T/AQDx/wAA9P8CAOH/AAD3/wAACQAAAAoAAQABAP//AwAAAAcAAAD+/wAAAgACAAEAAAD+////AwD+/wAAAAABAP//+v8BABEAAQATAAAA9f/+//L//f/z/wIA6f8AAPb/AQAFAP//DAAAAAAAAAAFAP//BQD//wEA//8DAAEAAQAAAP7///8AAAAA//8BAAIAAAD+/wAAEAABABYAAgD6/wEA8v8BAPX/AwDp/wAA8////wMA//8JAAEABAABAAEA//8FAAEA//8AAAMAAQACAP//AQAAAAEAAgAFAP//AQABAAAAAQAAAP//EQABAAAAAAD5/wEA+P8AAPr////6/wAA+/8BAAIA//8BAAAA//8CAAUA//8BAP7/AAABAAEAAgAAAAAAAwAAAAEA/v8DAAIAAAACAAQA//8TAAAA/P8BAPr////3//////8AAPz/AQD7/wEAAgD/////AAABAAEABAAAAP//////////AAAAAAAAAAADAAAAAwAAAAAA//8EAP///v/+/xAA//8HAAAA+/////j/AQD8////AAD///n///8AAAAA//8AAP////8DAP//AgAAAAAAAAACAAIAAAD+/wAAAQD//wAA/////wIAAgD9////CQACAAYA///9////+f8BAPr/AQAAAAIA/v///wAA//8AAAAAAAAAAAEAAAABAAAAAgAAAAEAAAAAAAEAAQABAAAAAgABAP//AAD//wEAAAD///////8BAAIAAQAAAAAA/v/+//////8BAAAAAQABAP//AAD///////8BAAAAAQABAP////8CAAEAAQD//wEA/v//////AQAAAAAAAAAAAAAAAAD9/wMA/////wAAAQD+/wEA/v/+//7/AQD//wMAAAAAAAAAAAABAAEA//////7/AAACAP3/AAD//wAAAQAAAP//AQD//wAAAAAAAAEA//8CAP//AAAAAAAA/v8AAAAA//8BAP//AAABAP//AAAAAP//AQD//wAAAQABAAAAAAABAAEA/v///wAAAAD//////////wAAAAAAAP//AAD////////8/wIAAAADAAEA/////wEA/v8BAP7/AgAAAAEAAgAAAP//AgD/////AQD//wEA//////7/AQD//wMAAAAAAAAA//8CAP//AQAAAP//AAACAAAAAAABAP//AQD+/wAA/////wAA/f///wAAAAAAAP7/AAAAAAAAAgD//wEAAQACAP//AAAAAAEAAQD//wAAAAAAAAAA//8BAAMA/v8AAP7/AQAAAAAAAQAAAAAA///+//7/AAAAAAAA//8BAP7/AQAAAP//AQABAAAAAQAAAP//AAD//wIA/v///wAAAQABAP//AAD//wEA//8BAP//AgAAAP///////wAAAQABAP//AwABAAAAAAAAAAAA/////wIAAwACAAAA/v8BAAAAAAAAAAAA//8AAP////8AAAAA/////wAA/////wEA/v8CAAEAAQD//wAAAAABAAAAAAD//wEAAQABAAAA//8CAAAAAAAAAP7/AAABAAAAAQABAAAAAgABAAAAAQD//wEAAwD+/wAA/v8AAAEAAAAAAAAAAAAAAAEAAAD//wMA/v///wAAAAACAAEAAAAAAP7///8DAAEAAQD//wEA/f8BAAEAAQD//wEAAQABAAMAAgAAAAEA//8AAP//BAAAAAIA/v//////AQABAAAAAAD//wEAAAACAAIAAQAAAAAAAgAAAAAAAAABAAIAAAABAAIAAQAAAP////8AAAAAAAD//wAAAQACAP//AAAAAAAAAQAAAAEA//8AAAAAAAD/////AQD//wAAAQD9////AQAAAAAA//8BAAAA///+/////v8BAAAAAQAAAAAAAAAAAAIA//8BAAAAAAACAP//AQD//wAAAAD/////AAD9/wAAAAACAAAAAgAAAAEAAQABAAEAAAAAAAEA//8AAAEAAQACAAAAAQAAAAEA//8BAAIAAAACAP//AAABAAAAAAAAAAAAAAD//wAAAQD/////AAAAAP////8AAAEAAAAAAP7///8BAAIAAQD//wEAAQAAAP//AgAAAAAAAAD//wAA//8CAP7/AQAAAP7/AAD+////AAAAAAAAAQABAAAA//8AAAEAAAABAP7/AAAAAP7/AAD+/wAAAQABAAEA/////////v8BAP///v///wIAAAAAAAAAAQAAAAIAAQAAAAAAAAABAAEAAAAAAAAAAAD//wEAAQD//wAAAQABAAAA/v/+/////////wAAAAD//wAAAAD/////AAAAAP7/AAD//wIA//8CAP//AQAAAP////8AAAAAAQABAP////8AAP//AQACAAAAAQAAAAAAAAAAAAAA//8BAAAAAAD+/wAA/v///wEAAAD+//7///8CAP7/AAABAP3/AwAAAAAAAAABAAIAAAABAAAAAQABAAIAAAAAAP//AAAAAAEAAAACAAEAAAACAAAAAAABAAAAAwAAAAAAAAD+/wAAAQD9//////8BAAAA/v8AAAAAAAAAAAAAAAD//wMA/v8BAAEAAQACAAAA/v8BAP//AwABAAIAAQABAP//AQAAAAEAAAAAAAEA//8AAAAAAAD/////AAABAAEAAAAAAP////8AAAAAAAAAAAAA/v8AAP//AQAAAP//AAABAAIAAQAAAAAAAgABAAAA/////wAAAQABAP//AQABAAEA/////wAAAAAAAAAAAAABAAEAAQAAAAAAAAAAAAAA//8AAP7/AQD9/wAAAgD//wEAAQABAAEA/v8AAAEA/////wAAAAAAAP//AAABAAAAAAAAAAAA//8CAP//AAABAAEAAQABAAAA//8BAAIAAgD//wAA/v8AAAEAAAD///7/AAAAAAEAAAABAAAAAQABAAAAAQACAAAA///+/wAAAQABAP7////+/wAA//8AAAAAAgAAAP//AQD9/wAAAAD//wAA//8AAAAAAQAAAAAAAQD//wAAAAAAAP//AQABAAAA/v8CAP//AAD///////8AAAAAAAACAAEA//8BAP7/AAAAAAEA//8BAAAAAQD//wAAAQD+/wAA/////wAAAAD//wAAAQABAAAA//8AAAEA/////wAA//8AAAAA/v/+/wEAAgABAP//AgD//wIA/////wAA//8AAAEAAQAAAAAAAQAAAAMAAAACAP//",showCount:!0},audio:{disabled:!0,defaultToggledOn:!1,language:"en-US",voiceNames:["Microsoft David - English (United States)","Alex (English - United States)"],rate:1,volume:1,icon:Wa,iconDisabled:Va},chatHistory:{disabled:!1,maxEntries:30,storageKey:"rcb-history",storageType:"LOCAL_STORAGE",viewChatHistoryButtonText:"Load Chat History ⟳",chatHistoryLineBreakText:"----- Previous Chat History -----",autoLoad:!1},chatInput:{disabled:!1,allowNewline:!1,enabledPlaceholderText:"Type your message...",disabledPlaceholderText:"",showCharacterCount:!1,characterLimit:-1,botDelay:1e3,sendButtonIcon:qa,blockSpam:!0,sendOptionOutput:!0,sendCheckboxOutput:!0,buttons:[ue.VOICE_MESSAGE_BUTTON,ue.SEND_MESSAGE_BUTTON]},chatWindow:{showScrollbar:!1,showTypingIndicator:!0,autoJumpToBottom:!1,showMessagePrompt:!0,messagePromptText:"New Messages ↓",messagePromptOffset:30,defaultOpen:!1},sensitiveInput:{maskInTextArea:!0,maskInUserBubble:!0,asterisksCount:10,hideInUserBubble:!1},userBubble:{animate:!0,showAvatar:!1,avatar:"data:image/svg+xml,%3csvg%20width='140'%20height='140'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cy='60.044'%20cx='70'%20fill='%235c5c5c'%20r='29'/%3e%3cpath%20d='m16.36%20156.186-.01-30.5c-.005-16.844%2024.168-30.507%2053.991-30.516%2029.823-.009%2054.004%2013.64%2054.01%2030.484l.008%2030.5-108%20.032z'%20fill='%235c5c5c'/%3e%3c/svg%3e",simulateStream:!1,streamSpeed:30},botBubble:{animate:!0,showAvatar:!1,avatar:vr,simulateStream:!1,streamSpeed:30},voice:{disabled:!0,defaultToggledOn:!1,language:"en-US",timeoutPeriod:1e4,autoSendDisabled:!1,autoSendPeriod:1e3,sendAsAudio:!1,icon:Ga,iconDisabled:Ya},footer:{text:k.jsxs("div",{style:{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",columnGap:3},onClick:()=>window.open("https://react-chatbotify.com","_blank","noopener,noreferrer"),children:[k.jsx("span",{children:"Powered By "},0),k.jsx("div",{style:{borderRadius:"50%",width:14,height:14,display:"flex",justifyContent:"center",alignItems:"center",background:"linear-gradient(to right, #42b0c5, #491d8d)"},children:k.jsx(wr,{style:{width:"80%",height:"80%",fill:"#fff"}})},1),k.jsx("span",{style:{fontWeight:"bold"},children:" React ChatBotify"},2)]}),buttons:[ue.FILE_ATTACHMENT_BUTTON,ue.EMOJI_PICKER_BUTTON]},fileAttachment:{disabled:!1,multiple:!0,accept:".png",icon:xr,iconDisabled:xr,sendFileName:!0,showMediaDisplay:!1},emoji:{disabled:!1,icon:Er,iconDisabled:Er,list:["😀","😃","😄","😅","😊","😌","😇","🙃","🤣","😍","🥰","🥳","🎉","🎈","🚀","⭐️"]},toast:{maxCount:3,forbidOnMax:!1,dismissOnClick:!0},event:{rcbPreInjectMessage:!1,rcbPostInjectMessage:!1,rcbStartSimulateStreamMessage:!1,rcbStopSimulateStreamMessage:!1,rcbStartStreamMessage:!1,rcbChunkStreamMessage:!1,rcbStopStreamMessage:!1,rcbRemoveMessage:!1,rcbSaveChatHistory:!1,rcbLoadChatHistory:!1,rcbToggleChatWindow:!1,rcbStartSpeakAudio:!1,rcbToggleAudio:!1,rcbToggleNotifications:!1,rcbToggleVoice:!1,rcbChangePath:!1,rcbShowToast:!1,rcbDismissToast:!1,rcbUserSubmitText:!1,rcbUserUploadFile:!1,rcbTextAreaChangeValue:!1,rcbPreLoadChatBot:!1,rcbPostLoadChatBot:!1,rcbPreProcessBlock:!1,rcbPostProcessBlock:!1},ariaLabel:{chatButton:"open chat",audioButton:"toggle audio",closeChatButton:"close chat",emojiButton:"emoji picker",fileAttachmentButton:"upload file",notificationButton:"toggle notifications",sendButton:"send message",voiceButton:"toggle voice",inputTextArea:"input text area"},device:{desktopEnabled:!0,mobileEnabled:!0,applyMobileOptimizations:!0}},Cr=h.createContext({settings:{},setSyncedSettings:()=>null,syncedSettingsRef:{current:{}}}),ee=()=>h.useContext(Cr),Xa=({children:e,settings:t=kr,setSyncedSettings:r,syncedSettingsRef:n})=>k.jsx(Cr.Provider,{value:{settings:t,setSyncedSettings:r,syncedSettingsRef:n},children:e}),Pr={tooltipStyle:{},notificationBadgeStyle:{},chatWindowStyle:{},headerStyle:{},bodyStyle:{},chatInputContainerStyle:{},chatInputAreaStyle:{},chatInputAreaFocusedStyle:{},chatInputAreaDisabledStyle:{},userBubbleStyle:{},botBubbleStyle:{},botOptionStyle:{},botOptionHoveredStyle:{},botCheckboxRowStyle:{},botCheckboxNextStyle:{},botCheckMarkStyle:{},botCheckMarkSelectedStyle:{},characterLimitStyle:{},characterLimitReachedStyle:{},chatHistoryLineBreakStyle:{},chatMessagePromptStyle:{},chatMessagePromptHoveredStyle:{},footerStyle:{},loadingSpinnerStyle:{},mediaDisplayContainerStyle:{},chatButtonStyle:{},chatButtonHoveredStyle:{},chatHistoryButtonStyle:{},chatHistoryButtonHoveredStyle:{},sendButtonStyle:{},sendButtonHoveredStyle:{},sendButtonDisabledStyle:{},audioButtonStyle:{},audioButtonDisabledStyle:{},closeChatButtonStyle:{},emojiButtonStyle:{},emojiButtonDisabledStyle:{},fileAttachmentButtonStyle:{},fileAttachmentButtonDisabledStyle:{},notificationButtonStyle:{},notificationButtonDisabledStyle:{},voiceButtonStyle:{},voiceButtonDisabledStyle:{},chatIconStyle:{},audioIconStyle:{},audioIconDisabledStyle:{},closeChatIconStyle:{},emojiIconStyle:{},emojiIconDisabledStyle:{},fileAttachmentIconStyle:{},fileAttachmentIconDisabledStyle:{},notificationIconStyle:{},notificationIconDisabledStyle:{},voiceIconStyle:{},voiceIconDisabledStyle:{},sendIconStyle:{},sendIconDisabledStyle:{},sendIconHoveredStyle:{},rcbTypingIndicatorContainerStyle:{},rcbTypingIndicatorDotStyle:{},toastPromptContainerStyle:{},toastPromptStyle:{},toastPromptHoveredStyle:{}},Sr=h.createContext({styles:{},setSyncedStyles:()=>null,syncedStylesRef:{current:{}}}),oe=()=>h.useContext(Sr),Ka=({children:e,styles:t=Pr,setSyncedStyles:r,syncedStylesRef:n})=>k.jsx(Sr.Provider,{value:{styles:t,setSyncedStyles:r,syncedStylesRef:n},children:e}),Ja=({buttons:e})=>{var t,r,n,o,a,s,A;const{settings:i}=ee(),{styles:c}=oe(),l={backgroundImage:`linear-gradient(to right, ${(t=i.general)==null?void 0:t.secondaryColor},
|
|
2
|
-
${(r=i.general)==null?void 0:r.primaryColor})`,...c.headerStyle};return k.jsxs("div",{style:l,className:"rcb-chat-header-container",children:[k.jsxs("div",{className:"rcb-chat-header",children:[((n=i.header)==null?void 0:n.showAvatar)&&k.jsx("div",{style:{backgroundImage:`url("${(o=i.header)==null?void 0:o.avatar}")`},className:"rcb-bot-avatar"}),h.isValidElement((a=i.header)==null?void 0:a.title)?(s=i.header)==null?void 0:s.title:k.jsx("div",{style:{margin:0,fontSize:20,fontWeight:"bold"},children:(A=i.header)==null?void 0:A.title})]}),k.jsx("div",{className:"rcb-chat-header",children:e==null?void 0:e.map((d,u)=>k.jsx(h.Fragment,{children:d},u))})]})},Dr=h.createContext({}),pe=()=>h.useContext(Dr),Za=({children:e,botIdRef:t,flowRef:r})=>{const n=h.useRef(null),o=h.useRef(""),a=h.useRef(null),s=h.useRef(new Map),A=h.useRef(null),i=h.useRef(""),c=h.useRef(!1),l=h.useRef(null),d=h.useRef(null),u=h.useRef(null);return k.jsx(Dr.Provider,{value:{botIdRef:t,flowRef:r,inputRef:n,timeoutIdRef:a,streamMessageMap:s,chatBodyRef:A,paramsInputRef:i,keepVoiceOnRef:c,audioContextRef:l,audioBufferRef:d,gainNodeRef:u,prevInputRef:o},children:e})},Se=e=>{const[t,r]=h.useState(e),n=h.useRef(e);return[t,o=>{const a=typeof o=="function"?o(n.current):o;n.current=a,r(a)},n]},Br=h.createContext({}),he=()=>h.useContext(Br),$a=({children:e,settings:t})=>{var r,n,o,a,s,A;const[i,c,l]=Se(!1),[d,u,p]=Se(((r=t==null?void 0:t.chatWindow)==null?void 0:r.defaultOpen)??!1),[f,y,g]=Se(((n=t==null?void 0:t.audio)==null?void 0:n.defaultToggledOn)??!1),[v,x,m]=Se(((o=t==null?void 0:t.voice)==null?void 0:o.defaultToggledOn)??!1),[E,P,C]=Se(((a=t==null?void 0:t.notification)==null?void 0:a.defaultToggledOn)??!0),[S,I]=h.useState(!1),[Q,B]=h.useState(!1),[O,D,M]=Se(!1),[U,L,F]=Se(!0),[_,H,b]=Se(!1),[X,w]=h.useState(!1),[K,R]=h.useState(!1),[z,G]=h.useState(0),[Z,$]=h.useState(0),[le,ae]=h.useState(!1),[se,we]=h.useState(((s=window.visualViewport)==null?void 0:s.height)??window.innerHeight),[Ye,ut]=h.useState(((A=window.visualViewport)==null?void 0:A.width)??window.innerWidth);return k.jsx(Br.Provider,{value:{isBotTyping:i,setSyncedIsBotTyping:c,syncedIsBotTypingRef:l,isChatWindowOpen:d,setSyncedIsChatWindowOpen:u,syncedIsChatWindowOpenRef:p,audioToggledOn:f,setSyncedAudioToggledOn:y,syncedAudioToggledOnRef:g,voiceToggledOn:v,setSyncedVoiceToggledOn:x,syncedVoiceToggledOnRef:m,notificationsToggledOn:E,setSyncedNotificationsToggledOn:P,syncedNotificationsToggledOnRef:C,isLoadingChatHistory:S,setIsLoadingChatHistory:I,hasChatHistoryLoaded:Q,setHasChatHistoryLoaded:B,isScrolling:O,setSyncedIsScrolling:D,syncedIsScrollingRef:M,textAreaDisabled:U,setSyncedTextAreaDisabled:L,syncedTextAreaDisabledRef:F,textAreaSensitiveMode:_,setSyncedTextAreaSensitiveMode:H,syncedTextAreaSensitiveModeRef:b,hasInteractedPage:X,setHasInteractedPage:w,hasFlowStarted:K,setHasFlowStarted:R,unreadCount:z,setUnreadCount:G,inputLength:Z,setInputLength:$,blockAllowsAttachment:le,setBlockAllowsAttachment:ae,viewportHeight:se,setViewportHeight:we,viewportWidth:Ye,setViewportWidth:ut},children:e})};var j=(e=>(e.START_SPEAK_AUDIO="rcb-start-speak-audio",e.TOGGLE_AUDIO="rcb-toggle-audio",e.TOGGLE_NOTIFICATIONS="rcb-toggle-notifications",e.TOGGLE_VOICE="rcb-toggle-voice",e.TOGGLE_CHAT_WINDOW="rcb-toggle-chat-window",e.PRE_INJECT_MESSAGE="rcb-pre-inject-message",e.POST_INJECT_MESSAGE="rcb-post-inject-message",e.START_SIMULATE_STREAM_MESSAGE="rcb-start-simulate-stream-message",e.STOP_SIMULATE_STREAM_MESSAGE="rcb-stop-simulate-stream-message",e.START_STREAM_MESSAGE="rcb-start-stream-message",e.CHUNK_STREAM_MESSAGE="rcb-chunk-stream-message",e.STOP_STREAM_MESSAGE="rcb-stop-stream-message",e.REMOVE_MESSAGE="rcb-remove-message",e.SAVE_CHAT_HISTORY="rcb-save-chat-history",e.LOAD_CHAT_HISTORY="rcb-load-chat-history",e.CHANGE_PATH="rcb-change-path",e.SHOW_TOAST="rcb-show-toast",e.DISMISS_TOAST="rcb-dismiss-toast",e.USER_SUBMIT_TEXT="rcb-user-submit-text",e.USER_UPLOAD_FILE="rcb-user-upload-file",e.TEXT_AREA_CHANGE_VALUE="rcb-text-area-change-value",e.PRE_LOAD_CHATBOT="rcb-pre-load-chatbot",e.POST_LOAD_CHATBOT="rcb-post-load-chatbot",e.PRE_PROCESS_BLOCK="rcb-pre-process-block",e.POST_PROCESS_BLOCK="rcb-post-process-block",e))(j||{});const ei={[j.START_SPEAK_AUDIO]:!0,[j.TOGGLE_AUDIO]:!0,[j.TOGGLE_VOICE]:!0,[j.TOGGLE_NOTIFICATIONS]:!0,[j.TOGGLE_CHAT_WINDOW]:!0,[j.PRE_INJECT_MESSAGE]:!0,[j.POST_INJECT_MESSAGE]:!1,[j.PRE_LOAD_CHATBOT]:!0,[j.POST_LOAD_CHATBOT]:!1,[j.START_SIMULATE_STREAM_MESSAGE]:!0,[j.STOP_SIMULATE_STREAM_MESSAGE]:!1,[j.START_STREAM_MESSAGE]:!0,[j.CHUNK_STREAM_MESSAGE]:!0,[j.STOP_STREAM_MESSAGE]:!0,[j.REMOVE_MESSAGE]:!0,[j.SAVE_CHAT_HISTORY]:!0,[j.LOAD_CHAT_HISTORY]:!0,[j.CHANGE_PATH]:!0,[j.SHOW_TOAST]:!0,[j.DISMISS_TOAST]:!0,[j.USER_SUBMIT_TEXT]:!0,[j.USER_UPLOAD_FILE]:!0,[j.TEXT_AREA_CHANGE_VALUE]:!0,[j.PRE_PROCESS_BLOCK]:!0,[j.POST_PROCESS_BLOCK]:!0},hn=async(e,t,r)=>{const n=new CustomEvent(e,{detail:t,cancelable:ei[e]});return n.data=r,n.promises=[],window.dispatchEvent(n),await Promise.all(n.promises),n},Ir=h.createContext({paths:[],setSyncedPaths:()=>{},syncedPathsRef:{current:[]}}),kt=()=>h.useContext(Ir),ti=({children:e})=>{const[t,r,n]=Se([]);return k.jsx(Ir.Provider,{value:{paths:t,setSyncedPaths:r,syncedPathsRef:n},children:e})},Le=()=>{const{botIdRef:e}=pe(),{syncedPathsRef:t}=kt(),r=h.useCallback(()=>t.current.length>0?t.current.at(-1)??null:null,[]),n=h.useCallback(()=>t.current.length>1?t.current.at(-2)??null:null,[]);return{dispatchRcbEvent:h.useCallback(async(o,a)=>{const s={botId:e.current,currPath:r(),prevPath:n()};return await hn(o,s,a)},[e])}},De=()=>{const{settings:e}=ee(),{isChatWindowOpen:t,setSyncedIsChatWindowOpen:r,viewportHeight:n,setViewportHeight:o,viewportWidth:a,setViewportWidth:s,setUnreadCount:A,setSyncedIsBotTyping:i,setSyncedIsScrolling:c,syncedIsBotTypingRef:l,syncedIsChatWindowOpenRef:d}=he(),{chatBodyRef:u}=pe(),{dispatchRcbEvent:p}=Le(),f=h.useCallback(()=>{if(!u.current)return!1;const m=u.current.getBoundingClientRect(),E=window.innerHeight??document.documentElement.clientHeight,P=window.innerWidth??document.documentElement.clientWidth;return m.top>=0&&m.left>=0&&m.bottom<=E&&m.right<=P},[u]),y=h.useCallback(async m=>{var E;m!==d.current&&((E=e.event)!=null&&E.rcbToggleChatWindow&&(await p(j.TOGGLE_CHAT_WINDOW,{currState:d.current,newState:!d.current})).defaultPrevented||r(P=>(P||A(0),!P)))},[d]),g=h.useCallback(async m=>{m!==l.current&&i(E=>!E)},[l]),v=h.useCallback((m,E,P,C)=>(m/=C/2)<1?P/2*m*m+E:-P/2*(--m*(m-2)-1)+E,[]),x=h.useCallback((m=0)=>{if(!u.current)return;const E=u.current.scrollHeight-u.current.clientHeight;if(m<=0)return u.current.scrollTop=E,void c(!1);const P=u.current.scrollTop,C=E-P;let S=0;const I=()=>{if(!u.current)return;S+=20;const Q=v(S,P,C,m);u.current.scrollTop=Q,S<m?requestAnimationFrame(I):c(!1)};I()},[u]);return{isChatWindowOpen:t,setSyncedIsChatWindowOpen:r,toggleChatWindow:y,viewportHeight:n,setViewportHeight:o,viewportWidth:a,setViewportWidth:s,toggleIsBotTyping:g,scrollToBottom:x,getIsChatBotVisible:f}},ni=()=>{var e,t,r;const{settings:n}=ee(),{styles:o}=oe(),{unreadCount:a,isScrolling:s}=he(),{chatBodyRef:A}=pe(),{scrollToBottom:i}=De(),[c,l]=h.useState(!1),d={color:(e=n.general)==null?void 0:e.primaryColor,borderColor:(t=n.general)==null?void 0:t.primaryColor,...o.chatMessagePromptHoveredStyle};return k.jsx("div",{className:"rcb-message-prompt-container "+(A.current&&((u=n.chatWindow)!=null&&u.showMessagePrompt)&&s&&a>0?"visible":"hidden"),children:k.jsx("div",{onMouseEnter:()=>{l(!0)},onMouseLeave:()=>{l(!1)},style:c?d:{...o.chatMessagePromptStyle},onMouseDown:p=>{p.preventDefault(),i(600)},className:"rcb-message-prompt-text",children:(r=n.chatWindow)==null?void 0:r.messagePromptText})});var u},Tr=h.createContext({messages:[],setSyncedMessages:()=>{},syncedMessagesRef:{current:[]}}),gn=()=>h.useContext(Tr),ri=({children:e})=>{const[t,r,n]=Se([]);return k.jsx(Tr.Provider,{value:{messages:t,setSyncedMessages:r,syncedMessagesRef:n},children:e})},oi=({message:e,isNewSender:t})=>{var r,n,o,a,s,A;const{settings:i}=ee(),{styles:c}=oe(),l=typeof e.content=="string",d=e.content,u=e.contentWrapper?k.jsx(e.contentWrapper,{children:d}):d,p={backgroundColor:(r=i.general)==null?void 0:r.primaryColor,color:"#fff",maxWidth:(n=i.userBubble)!=null&&n.showAvatar?"65%":"70%",...c.userBubbleStyle},f=(o=i.userBubble)!=null&&o.animate?"rcb-user-message-entry":"",y=((a=i.userBubble)==null?void 0:a.showAvatar)&&t,g="rcb-user-message"+(!t&&(s=i.userBubble)!=null&&s.showAvatar?" rcb-user-message-offset":"");return k.jsxs("div",{className:"rcb-user-message-container",children:[l?k.jsx("div",{style:p,className:`${g} ${f}`,children:u}):k.jsx(k.Fragment,{children:u}),y&&k.jsx("div",{style:{backgroundImage:`url("${(A=i.userBubble)==null?void 0:A.avatar}")`},className:"rcb-message-user-avatar"})]})},ai=({message:e,isNewSender:t})=>{var r,n,o,a,s,A;const{settings:i}=ee(),{styles:c}=oe(),l=typeof e.content=="string",d=e.content,u=e.contentWrapper?k.jsx(e.contentWrapper,{children:d}):d,p={backgroundColor:(r=i.general)==null?void 0:r.secondaryColor,color:"#fff",maxWidth:(n=i.botBubble)!=null&&n.showAvatar?"65%":"70%",...c.botBubbleStyle},f=(o=i.botBubble)!=null&&o.animate?"rcb-bot-message-entry":"",y=((a=i.botBubble)==null?void 0:a.showAvatar)&&t,g="rcb-bot-message"+(!t&&(s=i.botBubble)!=null&&s.showAvatar?" rcb-bot-message-offset":"");return k.jsxs("div",{className:"rcb-bot-message-container",children:[y&&k.jsx("div",{style:{backgroundImage:`url("${(A=i.botBubble)==null?void 0:A.avatar}")`},className:"rcb-message-bot-avatar"}),l?k.jsx("div",{style:p,className:`${g} ${f}`,children:u}):k.jsx(k.Fragment,{children:u})]})},ii=()=>{var e,t,r;const{settings:n}=ee(),{styles:o}=oe(),a=(e=n.botBubble)!=null&&e.animate?"rcb-bot-message-entry":"";return k.jsxs("div",{className:"rcb-bot-message-container",children:[((t=n.botBubble)==null?void 0:t.showAvatar)&&k.jsx("div",{style:{backgroundImage:`url("${(r=n.botBubble)==null?void 0:r.avatar}")`},className:"rcb-message-bot-avatar"}),k.jsx("div",{onMouseDown:s=>{s.preventDefault()},className:`rcb-bot-message ${a}`,children:k.jsxs("div",{className:"rcb-typing-indicator",style:{...o==null?void 0:o.rcbTypingIndicatorContainerStyle},children:[k.jsx("span",{className:"rcb-dot",style:{...o==null?void 0:o.rcbTypingIndicatorDotStyle}}),k.jsx("span",{className:"rcb-dot",style:{...o==null?void 0:o.rcbTypingIndicatorDotStyle}}),k.jsx("span",{className:"rcb-dot",style:{...o==null?void 0:o.rcbTypingIndicatorDotStyle}})]})})]})},Ai=()=>{var e,t,r;const{settings:n}=ee(),{styles:o}=oe(),{messages:a}=gn(),{scrollToBottom:s}=De(),{isBotTyping:A,syncedIsScrollingRef:i}=he(),{chatBodyRef:c}=pe(),l={...o==null?void 0:o.bodyStyle,scrollbarWidth:(e=n.chatWindow)!=null&&e.showScrollbar?"auto":"none"};return h.useEffect(()=>{i.current||s()},[(t=c.current)==null?void 0:t.scrollHeight]),k.jsxs("div",{style:l,className:"rcb-chat-body-container",ref:c,children:[a.map((d,u)=>{const p=(f=>f===0||a[f].sender!==a[f-1].sender)(u);return d.sender.toUpperCase()==="USER"?k.jsx(oi,{message:d,isNewSender:p},u):d.sender.toUpperCase()==="BOT"?k.jsx(ai,{message:d,isNewSender:p},u):k.jsx("div",{children:d.content},u)}),A&&((r=n.chatWindow)==null?void 0:r.showTypingIndicator)&&k.jsx(ii,{}),k.jsx(ni,{})]})},si=({checkboxes:e,checkedItems:t,path:r})=>{var n,o,a,s,A,i,c,l,d,u,p;const{settings:f}=ee(),{styles:y}=oe(),{paths:g}=kt(),{handleSubmitText:v}=ft(),[x,m]=h.useState(new Set),[E,P]=h.useState(!1),C={cursor:E?`url("${(n=f.general)==null?void 0:n.actionDisabledIcon}"), auto`:"pointer",color:(o=f.general)==null?void 0:o.primaryColor,borderColor:(a=f.general)==null?void 0:a.primaryColor,...y.botCheckboxRowStyle},S={cursor:E||x.size<e.min?`url("${(s=f.general)==null?void 0:s.actionDisabledIcon}"), auto`:"pointer",color:(A=f.general)==null?void 0:A.primaryColor,borderColor:(i=f.general)==null?void 0:i.primaryColor,...y.botCheckboxNextStyle},I={cursor:E?`url("${(c=f.general)==null?void 0:c.actionDisabledIcon}"), auto`:"pointer",color:"transparent",...y.botCheckMarkStyle},Q={cursor:E?`url("${(l=f.general)==null?void 0:l.actionDisabledIcon}"), auto`:"pointer",color:"#fff",borderColor:(d=f.general)==null?void 0:d.primaryColor,backgroundColor:(u=f.general)==null?void 0:u.primaryColor,...y.botCheckMarkSelectedStyle};return h.useEffect(()=>{g.length>0&&g[g.length-1]!==r&&P(!e.reusable)},[g]),k.jsxs("div",{className:"rcb-checkbox-container "+((p=f.botBubble)!=null&&p.showAvatar?"rcb-checkbox-offset":""),children:[e.items.map(B=>k.jsx("div",{onMouseDown:O=>{O.preventDefault(),(D=>{E||m(M=>{const U=new Set(M);if(U.has(D))t.delete(D),U.delete(D);else{if(x.size==e.max)return M;t.add(D),U.add(D)}return U})})(B)},style:C,className:"rcb-checkbox-row-container",children:k.jsxs("div",{className:"rcb-checkbox-row",children:[k.jsx("div",{style:x.has(B)?Q:I,className:"rcb-checkbox-mark"}),k.jsx("div",{className:"rcb-checkbox-label",children:B})]})},B)),k.jsx("div",{style:S,className:"rcb-checkbox-next-button",onMouseDown:B=>{var O;if(B.preventDefault(),E||x.size<e.min)return;const D=Array.from(t).join(", ");let M;P(!e.reusable),M=e.sendOutput!=null?e.sendOutput:((O=f.chatInput)==null?void 0:O.sendCheckboxOutput)??!0,v(D,M)}})]})},li=async(e,t)=>{const r=e.checkboxes;if(!r)return;let n;if(typeof r=="function"?(n=r(t),n instanceof Promise&&(n=await n)):n=r,Array.isArray(n)&&(n={items:n}),!("items"in n)||n.items.length==0)return;n.min==null&&(n.min=1),n.max==null&&(n.max=n.items.length),n.min>n.max&&(n.min=n.max),n.reusable==null&&(n.reusable=!1);const o=new Set,a=t.currPath,s=k.jsx(si,{checkboxes:n,checkedItems:o,path:a});await t.injectMessage(s)},ci=async(e,t)=>{const r=e.function;if(!r)return;const n=r(t);return n instanceof Promise?await n:n},ui=async(e,t,r)=>{const n=e.message;if(!n)return;if(typeof n=="string")return void(n.trim()!==""&&(r?await t.simulateStreamMessage(n):await t.injectMessage(n)));let o=n(t);o instanceof Promise&&(o=await o),typeof o=="string"&&o.trim()!==""&&(r?await t.simulateStreamMessage(o):await t.injectMessage(o))},di=({options:e,path:t})=>{var r,n,o,a,s,A;const{settings:i}=ee(),{styles:c}=oe(),{paths:l}=kt(),{handleSubmitText:d}=ft(),[u,p]=h.useState([]),[f,y]=h.useState(!1),g={cursor:f?`url("${(r=i.general)==null?void 0:r.actionDisabledIcon}"), auto`:"pointer",color:(n=i.general)==null?void 0:n.primaryColor,borderColor:(o=i.general)==null?void 0:o.primaryColor,backgroundColor:"#fff",...c.botOptionStyle},v={color:"#fff",borderColor:(a=i.general)==null?void 0:a.primaryColor,backgroundColor:(s=i.general)==null?void 0:s.primaryColor,...c.botOptionHoveredStyle};return h.useEffect(()=>{l.length>0&&l[l.length-1]!==t&&y(!e.reusable)},[l]),k.jsx("div",{className:"rcb-options-container "+((A=i.botBubble)!=null&&A.showAvatar?"rcb-options-offset":""),children:e.items.map((x,m)=>{const E=u[m]&&!f;return k.jsx("div",{className:"rcb-options",style:E?v:g,onMouseEnter:()=>(P=>{p(C=>{const S=[...C];return S[P]=!0,S})})(m),onMouseLeave:()=>(P=>{p(C=>{const S=[...C];return S[P]=!1,S})})(m),onMouseDown:P=>{var C;if(P.preventDefault(),f)return;let S;y(!e.reusable),S=e.sendOutput!=null?e.sendOutput:((C=i.chatInput)==null?void 0:C.sendOptionOutput)??!0,d(x,S)},children:x},x)})})},pi=async(e,t)=>{const r=e.options;if(!r)return;let n;if(typeof r=="function"?(n=r(t),n instanceof Promise&&(n=await n)):n=r,Array.isArray(n)&&(n={items:n}),!("items"in n)||n.items.length==0)return;n.reusable==null&&(n.reusable=!1);const o=t.currPath,a=k.jsx(di,{options:n,path:o});await t.injectMessage(a)},fi=async(e,t)=>{const r=e.component;if(r){if(typeof r=="function"){let n=r(t);return n instanceof Promise&&(n=await n),n?void await t.injectMessage(n):void 0}await t.injectMessage(r)}},hi=async(e,t,r,n)=>{const o=e.transition;let a;if(typeof o=="function"?(a=o(t),a instanceof Promise&&(a=await a)):a=o,typeof a=="number"&&(a={duration:a}),!a||a instanceof Promise||a.duration==null||typeof a.duration!="number")return;a.interruptable==null&&(a.interruptable=!1);const s=setTimeout(async()=>{const A=await n(e);A&&await Mr(A,t)},a.duration);a.interruptable&&(r.current=s)},gi=async(e,t,r)=>{const n=e.chatDisabled;if(n==null)return;let o;typeof n=="function"?(o=n(t),o instanceof Promise&&(o=await o)):o=n,r(o)},Qr=async(e,t,r)=>{const n=e.isSensitive;if(!n)return void r(!1);let o;typeof n=="function"?(o=n(t),o instanceof Promise&&(o=await o)):o=n,r(o)},Mr=async(e,t)=>{if(!e)throw new Error("Block is not valid.");const r=Object.keys(e);for(const n of r)n==="function"&&await ci(e,t);r.includes("path")&&await(async(n,o)=>{const a=n.path;if(!a)return!1;if(typeof a=="string")return await o.goToPath(a),!0;let s=a(o);if(s instanceof Promise&&(s=await s),!s)return!1;const A=s;return await o.goToPath(A),!0})(e,t)},mi=()=>{var e;const{settings:t}=ee(),{styles:r}=oe();return k.jsx("div",{className:"rcb-line-break-container",children:k.jsx("div",{style:{...r.chatHistoryLineBreakStyle},className:"rcb-line-break-text","data-testid":"chat-history-line-break-text",children:(e=t.chatHistory)==null?void 0:e.chatHistoryLineBreakText})})},yi=()=>{var e;const{settings:t}=ee(),{styles:r}=oe(),n={borderTop:`4px solid ${(e=t.general)==null?void 0:e.primaryColor}`,...r.loadingSpinnerStyle};return k.jsx("div",{className:"rcb-spinner-container",children:k.jsx("div",{style:n,className:"rcb-spinner"})})},Ft=()=>{try{if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();throw new Error("crypto.randomUUID not available")}catch(e){if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function")return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const r=crypto.getRandomValues(new Uint8Array(1))[0]%16;return(t==="x"?r:3&r|8).toString(16)});throw console.error(e),new Error("crypto.getRandomValues is also not available")}},Ze=(e,t)=>({id:Ft(),content:e,sender:t,type:typeof e=="string"?"string":"object",timestamp:new Date().toUTCString(),tags:[]});let $e,Or=!1,zt="rcb-history",Rt=30,_r=!1,jt=[];const Ct=()=>jt,mn=e=>{Lr(e),jt=e},Lr=e=>{$e&&$e.setItem(zt,JSON.stringify(e))},yn=e=>{var t,r,n,o,a;$e=((r=(t=e.chatHistory)==null?void 0:t.storageType)==null?void 0:r.toUpperCase())==="SESSION_STORAGE"?sessionStorage:localStorage,zt=(n=e.chatHistory)==null?void 0:n.storageKey,Rt=(o=e.chatHistory)==null?void 0:o.maxEntries,_r=(a=e.chatHistory)==null?void 0:a.disabled,jt=(s=>{if(s!=null)try{return JSON.parse(s)}catch{return[]}return[]})($e.getItem(zt))},bi=e=>h.isValidElement(e.content)?structuredClone({id:e.id,content:Ua.renderToString(e.content),type:e.type,sender:e.sender.toUpperCase(),timestamp:e.timestamp,tags:e.tags}):e,Nr=(e,t,r)=>{const n=new DOMParser().parseFromString(e,"text/html");return Array.from(n.body.childNodes).map((o,a)=>{var s;if(o.nodeType===Node.TEXT_NODE)return o.textContent;{const A=o.tagName.toLowerCase();let i=Array.from(o.attributes).reduce((c,l)=>{const d=l.name.toLowerCase();if(d==="style"){const u=l.value.split(";").filter(f=>f.trim()!==""),p={};u.forEach(f=>{const[y,g]=f.split(":").map(x=>x.trim()),v=y.replace(/-([a-z])/g,(x,m)=>m.toUpperCase());p[v]=g}),c[d]=p}else A!=="audio"&&A!=="video"||d!=="controls"||l.value!==""?c[d]=l.value:c[d]="true";return c},{});if(Object.prototype.hasOwnProperty.call(i,"class")){const c=o.classList;i.className=c.toString(),delete i.class,(s=t.botBubble)!=null&&s.showAvatar&&(i=vi(c,i)),i=wi(c,i,t,r),i=xi(c,i,t,r),i=Ei(c,i,t,r),i=ki(c,i,t,r)}if(["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr"].includes(A))return h.createElement(A,{key:a,...i});{const c=Nr(o.innerHTML,t,r);return h.createElement(A,{key:a,...i},...c)}}})},vi=(e,t)=>((e.contains("rcb-options-container")||e.contains("rcb-checkbox-container"))&&(t.className=`${e.toString()} rcb-options-offset`),t),wi=(e,t,r,n)=>{var o,a,s,A,i;return e.contains("rcb-options")&&(t.style={...t.style,color:((o=n.botOptionStyle)==null?void 0:o.color)??((a=r.general)==null?void 0:a.primaryColor),borderColor:((s=n.botOptionStyle)==null?void 0:s.color)??((A=r.general)==null?void 0:A.primaryColor),cursor:`url("${(i=r.general)==null?void 0:i.actionDisabledIcon}"), auto`,...n.botOptionStyle}),t},xi=(e,t,r,n)=>{var o,a,s,A,i;return e.contains("rcb-checkbox-row-container")&&(t.style={...t.style,color:((o=n.botCheckboxRowStyle)==null?void 0:o.color)??((a=r.general)==null?void 0:a.primaryColor),borderColor:((s=n.botCheckboxRowStyle)==null?void 0:s.color)??((A=r.general)==null?void 0:A.primaryColor),cursor:`url("${(i=r.general)==null?void 0:i.actionDisabledIcon}"), auto`,...n.botCheckboxRowStyle}),t},Ei=(e,t,r,n)=>{var o,a,s,A,i;return e.contains("rcb-checkbox-next-button")&&(t.style={...t.style,color:((o=n.botCheckboxNextStyle)==null?void 0:o.color)??((a=r.general)==null?void 0:a.primaryColor),borderColor:((s=n.botCheckboxNextStyle)==null?void 0:s.color)??((A=r.general)==null?void 0:A.primaryColor),cursor:`url("${(i=r.general)==null?void 0:i.actionDisabledIcon}"), auto`,...n.botCheckboxNextStyle}),t},ki=(e,t,r,n)=>{var o,a;return(e.contains("rcb-media-display-image-container")||e.contains("rcb-media-display-video-container"))&&(t.style={...t.style,backgroundColor:(o=r.general)==null?void 0:o.primaryColor,maxWidth:(a=r.userBubble)!=null&&a.showAvatar?"65%":"70%",...n.mediaDisplayContainerStyle}),t},bn=()=>{const{settings:e}=ee(),{notificationsToggledOn:t,setSyncedNotificationsToggledOn:r,hasInteractedPage:n,unreadCount:o,setUnreadCount:a,syncedNotificationsToggledOnRef:s}=he(),{audioBufferRef:A,audioContextRef:i,gainNodeRef:c}=pe(),{dispatchRcbEvent:l}=Le(),d=h.useCallback(async()=>{var p,f;const y=(p=e.notification)==null?void 0:p.sound;i.current=new AudioContext;const g=i.current.createGain();let v;if(g.gain.value=((f=e.notification)==null?void 0:f.volume)??.2,c.current=g,y!=null&&y.startsWith("data:audio")){const x=atob(y.split(",")[1]),m=new ArrayBuffer(x.length),E=new Uint8Array(m);for(let P=0;P<x.length;P++)E[P]=x.charCodeAt(P);v=m}else v=await(await fetch(y)).arrayBuffer();A.current=await i.current.decodeAudioData(v)},[e.notification]),u=h.useCallback(()=>{var p;if((p=e.notification)!=null&&p.disabled||!s.current||!n||!i.current||!A.current)return;const f=i.current.createBufferSource();f.buffer=A.current,f.connect(c.current).connect(i.current.destination),f.start()},[e.notification,s,n,i,A,c]);return{unreadCount:o,setUnreadCount:a,notificationsToggledOn:t,toggleNotifications:h.useCallback(async p=>{var f;p!==s.current&&((f=e.event)!=null&&f.rcbToggleNotifications&&(await l(j.TOGGLE_NOTIFICATIONS,{currState:s.current,newState:!s.current})).defaultPrevented||r(y=>!y))},[s]),playNotificationSound:u,setUpNotifications:d}},Ci=(e,t)=>{var r,n,o,a;((s,A,i,c,l)=>{if(!window.SpeechSynthesisUtterance)return void console.info("Speech Synthesis API is not supported in this environment.");const d=new window.SpeechSynthesisUtterance;d.text=s,d.lang=A,d.rate=c,d.volume=l;let u=!1;for(const p of i){const f=window.speechSynthesis.getVoices().find(y=>y.name===p);if(f){d.voice=f,window.speechSynthesis.speak(d),u=!0;break}}u||window.speechSynthesis.speak(d)})(t,(r=e.audio)==null?void 0:r.language,(n=e.audio)==null?void 0:n.voiceNames,(o=e.audio)==null?void 0:o.rate,(a=e.audio)==null?void 0:a.volume)},Hr=()=>{const{settings:e}=ee(),{audioToggledOn:t,setSyncedAudioToggledOn:r,syncedAudioToggledOnRef:n}=he(),{dispatchRcbEvent:o}=Le(),a=h.useCallback(async A=>{var i;A!==n.current&&((i=e.event)!=null&&i.rcbToggleAudio&&(await o(j.TOGGLE_AUDIO,{currState:n.current,newState:!n.current})).defaultPrevented||r(c=>!c))},[n]),s=h.useCallback(async A=>{var i,c;if((i=e.audio)!=null&&i.disabled||!n.current)return;let l=A;if((c=e.event)!=null&&c.rcbStartSpeakAudio){const d=await o(j.START_SPEAK_AUDIO,{textToRead:l});if(d.defaultPrevented)return;l=d.data.textToRead}Ci(e,l)},[e,n]);return{audioToggledOn:t,speakAudio:s,toggleAudio:a}},at=()=>{var e,t,r;const{settings:n}=ee(),{messages:o,setSyncedMessages:a,syncedMessagesRef:s}=gn(),{setSyncedIsBotTyping:A,setUnreadCount:i,syncedIsScrollingRef:c,syncedIsChatWindowOpenRef:l}=he(),{streamMessageMap:d,chatBodyRef:u,paramsInputRef:p}=pe(),{scrollToBottom:f,getIsChatBotVisible:y}=De(),{dispatchRcbEvent:g}=Le(),{speakAudio:v}=Hr(),{playNotificationSound:x}=bn(),m=h.useCallback(async D=>{var M,U;if((M=n.event)!=null&&M.rcbSaveChatHistory){const L=await g(j.SAVE_CHAT_HISTORY,{messages:D});if(L.defaultPrevented)return;D=((U=L.data)==null?void 0:U.messages)??D}await(async L=>{if(_r||!$e)return;const F=[];for(let H=L.length-1;H>=0;H--){const b=L[H];if(b.sender.toUpperCase()!=="SYSTEM"&&(b.content!==""&&F.unshift(b),F.length===Rt))break}let _=F.map(bi);if(!Or&&_.length<Rt){const H=Rt-_.length;_=[...jt.slice(-H),..._]}Lr(_)})(D)},[g,(e=n.event)==null?void 0:e.rcbSaveChatHistory]),E=h.useCallback((D,M=!1)=>{var U,L;m(D);let F=!0;const _=D[D.length-1];if(!_)return;const H=_.sender.toUpperCase();H==="USER"&&(F=!1),(U=n.general)!=null&&U.embedded&&y()&&(F=!1),(l.current&&!c.current||M)&&(F=!1),F&&x(),!M&&(H!=="USER"&&(L=n.chatWindow)!=null&&L.autoJumpToBottom||H==="USER"||!c.current)&&setTimeout(()=>f(),1)},[n,u,l,c,x,f,y]),P=h.useCallback(async(D,M="BOT",U=null)=>{var L,F,_,H,b;if(typeof D!="string")throw new Error("Content must be of type string to simulate stream.");M=M.toUpperCase();let X=Ze(D,M);if((L=n.event)!=null&&L.rcbStartSimulateStreamMessage){const $=await g(j.START_SIMULATE_STREAM_MESSAGE,{message:X});if($.defaultPrevented)return null;U=$.data.simulateStreamChunker||U,X=$.data.message}A(!1);let w=30;w=M==="BOT"?(F=n.botBubble)==null?void 0:F.streamSpeed:(_=n.userBubble)==null?void 0:_.streamSpeed;const K={...X,content:""};a($=>[...$,K]),E(s.current);let R=X.content;U&&(R=U(R));let z=0;const G=R.length;X.sender.toUpperCase()==="BOT"&&(l.current||(H=n.general)!=null&&H.embedded)&&typeof X.content=="string"&&X.content.trim()!==""&&v(X.content);const Z=new Promise($=>{const le=setInterval(()=>{if(z>=G)return clearInterval(le),void $();a(ae=>{const se=[...ae];for(let we=se.length-1;we>=0;we--)if(se[we].id===K.id){const Ye=R[z];Ye&&(K.content+=Ye,se[we]=K),z++;break}return se})},w)});return(c.current||!l.current)&&i($=>$+1),await Z,m(s.current),(b=n.event)!=null&&b.rcbStopSimulateStreamMessage&&await g(j.STOP_SIMULATE_STREAM_MESSAGE,{message:X}),M==="USER"&&(p.current=D),X},[n,g,E,s,p,A,i,l,v]),C=h.useCallback(async(D,M="BOT")=>{var U,L,F;M=M.toUpperCase();let _=Ze(D,M);if((U=n.event)!=null&&U.rcbPreInjectMessage){const H=await g(j.PRE_INJECT_MESSAGE,{message:_});if(H.defaultPrevented)return null;_=H.data.message}return _.sender.toUpperCase()==="BOT"&&(l.current||(L=n.general)!=null&&L.embedded)&&typeof _.content=="string"&&_.content.trim()!==""&&v(_.content),(c.current||!l.current)&&i(H=>H+1),(F=n.event)!=null&&F.rcbPostInjectMessage&&await g(j.POST_INJECT_MESSAGE,{message:_}),a(H=>[...H,_]),E(s.current),M==="USER"&&typeof D=="string"&&(p.current=D),_},[n,g,E,p,s,l,v,i]),S=h.useCallback(async D=>{var M;let U=s.current.find(_=>_.id===D),L=null,F=!1;return U||(L=Ct(),U=L.find(_=>_.id===D),U&&(F=!0)),!U||(M=n.event)!=null&&M.rcbRemoveMessage&&(await g(j.REMOVE_MESSAGE,{message:U})).defaultPrevented?null:F?(L&&mn(L.filter(_=>_.id!==D)),U):(a(_=>_.filter(H=>H.id!==D)),E(s.current),i(_=>Math.max(_-1,0)),U)},[g,(t=n.event)==null?void 0:t.rcbRemoveMessage,E,s,i,Ct,mn]),I=h.useCallback(async(D,M="BOT")=>{var U,L;if(M=M.toUpperCase(),!d.current.has(M)){const _=Ze(D,M);return(U=n.event)!=null&&U.rcbStartStreamMessage&&(await g(j.START_STREAM_MESSAGE,{message:_})).defaultPrevented?null:(A(!1),a(H=>[...H,_]),E(s.current),d.current.set(M,_.id),(c.current||!l.current)&&i(H=>H+1),_)}const F={...Ze(D,M),id:d.current.get(M)};return(L=n.event)!=null&&L.rcbChunkStreamMessage&&(await g(j.CHUNK_STREAM_MESSAGE,{message:F})).defaultPrevented?null:(a(_=>_.map(H=>H.id===F.id?F:H)),E(s.current,!0),F)},[g,n.event,E,s,A,i,d]),Q=h.useCallback(async(D="BOT")=>{var M;if(D=D.toUpperCase(),!d.current.has(D))return!0;const U=d.current.get(D);let L;for(let F=0;F<3;F++){const _=s.current.find(H=>H.id===U);_&&(L=_),await new Promise(H=>setTimeout(H,20))}return((M=n.event)==null||!M.rcbStopStreamMessage||!(await g(j.STOP_STREAM_MESSAGE,{message:L})).defaultPrevented)&&(d.current.delete(D),m(s.current),D==="USER"&&typeof(L==null?void 0:L.content)=="string"&&(p.current=L.content),!0)},[g,(r=n.event)==null?void 0:r.rcbStopStreamMessage,d,p]),B=h.useCallback(D=>{const M=typeof D=="function"?D(s.current):D;a(M),E(M)},[E,s]),O=h.useCallback((D,M,U=0)=>{var L;const F=s.current,_=D?D.toUpperCase():null,H=[];let b=U;for(let X=F.length-1;X>=0;X--){const w=F[X];if(!_||((L=w==null?void 0:w.sender)==null?void 0:L.toUpperCase())===_){if(b>0){b--;continue}if(H.push(w),M!==void 0&&H.length===M)break}}return H.length>0?H:null},[s]);return{simulateStreamMessage:P,injectMessage:C,removeMessage:S,streamMessage:I,endStreamMessage:Q,replaceMessages:B,getMessages:O,messages:o}};let vn,Ue,qt,et=!1,Fe=null;const wn=()=>{if(!vn){const e=window.SpeechRecognition||window.webkitSpeechRecognition;vn=e!=null?new e:null}return vn},Pi=(e,t,r,n,o,a)=>{var s,A,i;const c=wn();if(!c)return;if(!et)try{et=!0,c.lang=(s=e.voice)==null?void 0:s.language,c.start()}catch{}const l=(A=e.voice)==null?void 0:A.timeoutPeriod,d=(i=e.voice)==null?void 0:i.autoSendPeriod;c.onresult=u=>{var p,f;clearTimeout(Ue),Ue=null,clearTimeout(qt);const y=u.results[u.results.length-1][0].transcript;if(a.current){const g=(p=e.chatInput)==null?void 0:p.characterLimit,v=a.current.value+y;g!=null&&g>=0&&v.length>g?n(v.slice(0,g)):n(v),o(a.current.value.length)}l&&(Ue=setTimeout(async()=>await En(t,a),l)),(f=e.voice)!=null&&f.autoSendDisabled||(qt=setTimeout(r,d))},c.onend=()=>{et?(c.start(),!Ue&&l&&(Ue=setTimeout(async()=>await En(t,a),l))):(clearTimeout(Ue),Ue=null,clearTimeout(qt))},l&&(Ue=setTimeout(async()=>await En(t,a),l))},Si=(e,t)=>{navigator.mediaDevices.getUserMedia({audio:!0}).then(r=>{if(Fe=new MediaRecorder(r),!et)try{et=!0,Fe.start()}catch{}Fe.ondataavailable=n=>{t.current&&t.current.push(n.data)},Fe.onstop=()=>{e(),r.getTracks().forEach(n=>n.stop())}}).catch(r=>{console.error("Unable to use microphone:",r)})},xn=()=>{const e=wn();e&&(et=!1,e&&e.stop(),Fe&&Fe.state!=="inactive"&&(Fe.stop(),Fe=null),clearTimeout(Ue),Ue=null,clearTimeout(qt))},En=async(e,t)=>{var r;(r=t.current)!=null&&r.disabled||await e(),xn()},kn=()=>{const{settings:e}=ee(),{voiceToggledOn:t,setSyncedVoiceToggledOn:r,syncedVoiceToggledOnRef:n}=he(),{dispatchRcbEvent:o}=Le(),a=h.useCallback(async A=>{var i;A!==n.current&&((i=e.event)!=null&&i.rcbToggleVoice&&(await o(j.TOGGLE_VOICE,{currState:n.current,newState:!n.current})).defaultPrevented||r(c=>!c))},[n]),s=h.useCallback(A=>{((i,c)=>{var l,d,u;const p=wn();(l=c.voice)!=null&&l.disabled||(d=c.chatInput)==null||!d.blockSpam||!p||(i&&!et?(et=!0,(u=c.voice)!=null&&u.sendAsAudio?Fe==null||Fe.start():p.start()):i||xn())})(A,e)},[e]);return{voiceToggledOn:t,toggleVoice:a,syncVoice:s}},it=()=>{var e;const{settings:t}=ee(),{inputLength:r,setInputLength:n,textAreaDisabled:o,setSyncedTextAreaDisabled:a,textAreaSensitiveMode:s,setSyncedTextAreaSensitiveMode:A,syncedTextAreaDisabledRef:i,syncedTextAreaSensitiveModeRef:c}=he(),{inputRef:l,chatBodyRef:d,prevInputRef:u}=pe(),{dispatchRcbEvent:p}=Le(),{getIsChatBotVisible:f}=De(),y=h.useCallback(async C=>{var S,I,Q;if(i.current&&l.current)l.current.value="";else if(l.current&&u.current!==null){const B=(S=t.chatInput)==null?void 0:S.characterLimit,O=(I=t.chatInput)!=null&&I.allowNewline?C:C.replace(/\n/g," ");if(B!=null&&B>=0&&O.length>B?l.current.value=O.slice(0,B):l.current.value=O,(Q=t.event)!=null&&Q.rcbTextAreaChangeValue&&(await p(j.TEXT_AREA_CHANGE_VALUE,{currValue:l.current.value,prevValue:u.current})).defaultPrevented)return void(l.current.value=u.current);u.current=l.current.value}},[i,l,u,t,p]),g=h.useCallback(C=>{var S;(S=l.current)!=null&&S.disabled||setTimeout(()=>{var I,Q,B;(I=t.general)!=null&&I.embedded?f()&&((Q=l.current)==null||Q.focus()):C!=="start"&&((B=l.current)==null||B.focus())},100)},[l,(e=t.general)==null?void 0:e.embedded,d,f]),v=h.useCallback(()=>{l.current&&l.current.focus()},[]),x=h.useCallback(()=>{l.current&&l.current.blur()},[]),m=h.useCallback(()=>l&&l.current?l.current.value:"",[]),E=h.useCallback(C=>{C!==i.current&&a(S=>!S)},[i]),P=h.useCallback(C=>{C!==c.current&&A(S=>!S)},[c]);return{textAreaDisabled:o,setSyncedTextAreaDisabled:a,textAreaSensitiveMode:s,setSyncedTextAreaSensitiveMode:A,inputLength:r,setInputLength:n,getTextAreaValue:m,setTextAreaValue:y,updateTextAreaFocus:g,focusTextArea:v,blurTextArea:x,toggleTextAreaDisabled:E,toggleTextAreaSensitiveMode:P}},Ur=h.createContext({toasts:[],setSyncedToasts:()=>{},syncedToastsRef:{current:[]}}),Fr=()=>h.useContext(Ur),Di=({children:e})=>{const[t,r,n]=Se([]);return k.jsx(Ur.Provider,{value:{toasts:t,setSyncedToasts:r,syncedToastsRef:n},children:e})},pt=()=>{const{settings:e}=ee(),{toasts:t,setSyncedToasts:r,syncedToastsRef:n}=Fr(),{dispatchRcbEvent:o}=Le(),a=h.useCallback(async(i,c)=>{var l,d,u,p;let f=null;if(n.current.length>=(((l=e.toast)==null?void 0:l.maxCount)??3)){if((d=e.toast)!=null&&d.forbidOnMax)return null;f=Ft();let g={id:f,content:i,timeout:c};if((u=e.event)!=null&&u.rcbShowToast){const v=await o(j.SHOW_TOAST,{toast:g});if(v.defaultPrevented)return null;g=v.data.toast}return r(v=>[...v.slice(1),g]),f}f=Ft();let y={id:f,content:i,timeout:c};if((p=e.event)!=null&&p.rcbShowToast){const g=await o(j.SHOW_TOAST,{toast:y});if(g.defaultPrevented)return null;y=g.data.toast}return r(g=>[...g,y]),f},[e,o]),s=h.useCallback(async i=>{var c;const l=n.current.find(d=>d.id===i);return!l||(c=e.event)!=null&&c.rcbDismissToast&&(await o(j.DISMISS_TOAST,{toast:l})).defaultPrevented?null:(r(d=>d.filter(u=>u.id!==i)),i)},[o]),A=h.useCallback(i=>{const c=typeof i=="function"?i(n.current):i;r(c)},[n]);return{showToast:a,dismissToast:s,toasts:t,replaceToasts:A}},Gt=()=>{var e,t,r,n,o;const{settings:a}=ee(),{paths:s,setSyncedPaths:A,syncedPathsRef:i}=kt(),{flowRef:c,streamMessageMap:l,paramsInputRef:d,keepVoiceOnRef:u,timeoutIdRef:p}=pe(),{setSyncedIsBotTyping:f,setSyncedTextAreaDisabled:y,setSyncedTextAreaSensitiveMode:g,blockAllowsAttachment:v,setBlockAllowsAttachment:x}=he(),{dispatchRcbEvent:m}=Le(),{endStreamMessage:E,injectMessage:P,removeMessage:C,simulateStreamMessage:S,streamMessage:I}=at(),{showToast:Q,dismissToast:B}=pt(),{toggleChatWindow:O}=De(),{updateTextAreaFocus:D,setTextAreaValue:M}=it(),{syncVoice:U}=kn(),L=h.useCallback(async w=>{var K;if((K=a.event)!=null&&K.rcbPostProcessBlock){const R=await m(j.POST_PROCESS_BLOCK,{block:w});if(R.defaultPrevented)return null;w=R.data.block}return w},[(e=a.event)==null?void 0:e.rcbPostProcessBlock,m]),F=h.useCallback(async(w,K)=>{var R,z,G,Z;if(!w)return;let $=c.current[w];if(!$)return void f(!1);if((R=a.event)!=null&&R.rcbPreProcessBlock){const ae=await m(j.PRE_PROCESS_BLOCK,{block:$});if(ae.defaultPrevented)return;$=ae.data.block}f(!0),(z=a.chatInput)!=null&&z.blockSpam&&y(!0),g(!1);const le={prevPath:K,currPath:w,goToPath:b,setTextAreaValue:M,userInput:d.current,endStreamMessage:E,injectMessage:P,removeMessage:C,simulateStreamMessage:S,streamMessage:I,toggleChatWindow:O,showToast:Q,dismissToast:B};await(async(ae,se,we,Ye,ut,xe,Ne)=>{if(!ae)throw new Error("Block is not valid.");for(const xt of Object.keys(ae))switch(xt){case"message":await ui(ae,se,we);break;case"options":await pi(ae,se);break;case"checkboxes":await li(ae,se);break;case"component":await fi(ae,se);break;case"chatDisabled":await gi(ae,se,ut);break;case"isSensitive":await Qr(ae,se,xe);break;case"transition":await hi(ae,se,Ye,Ne)}})($,le,((G=a.botBubble)==null?void 0:G.simulateStream)??!1,p,y,g,L),f(!1),"chatDisabled"in $||y((Z=a.chatInput)==null?void 0:Z.disabled),"isSensitive"in $||g(!1),x(typeof $.file=="function"),D(w),U(u.current&&!$.chatDisabled),w!==K&&l.current.clear()},[c,D,U,(t=a.botBubble)==null?void 0:t.simulateStream,(r=a.chatInput)==null?void 0:r.disabled,d,E,P,C,S,I,O,Q,B,u,l]),_=h.useCallback(()=>i.current.length>0?i.current.at(-1)??null:null,[]),H=h.useCallback(()=>i.current.length>1?i.current.at(-2)??null:null,[]),b=h.useCallback(async w=>{var K;const R=_(),z=H();return((K=a.event)==null||!K.rcbChangePath||!(await m(j.CHANGE_PATH,{currPath:R,prevPath:z,nextPath:w})).defaultPrevented)&&(A(G=>[...G,w]),await F(w,R),!0)},[(n=a.chatInput)==null?void 0:n.blockSpam,(o=a.event)==null?void 0:o.rcbChangePath,F,m]),X=h.useCallback(w=>{const K=typeof w=="function"?w(i.current):w;A(K)},[i]);return{getCurrPath:_,getPrevPath:H,goToPath:b,blockAllowsAttachment:v,setBlockAllowsAttachment:x,paths:s,replacePaths:X,firePostProcessBlockEvent:L}},ft=()=>{var e,t,r,n;const{settings:o}=ee(),{endStreamMessage:a,injectMessage:s,removeMessage:A,simulateStreamMessage:i,streamMessage:c}=at(),{syncedPathsRef:l}=kt(),{getCurrPath:d,getPrevPath:u,goToPath:p,firePostProcessBlockEvent:f}=Gt(),{setSyncedTextAreaSensitiveMode:y,setSyncedTextAreaDisabled:g,setSyncedIsBotTyping:v,setBlockAllowsAttachment:x,setInputLength:m,syncedVoiceToggledOnRef:E,syncedTextAreaSensitiveModeRef:P}=he(),{flowRef:C,inputRef:S,keepVoiceOnRef:I,paramsInputRef:Q,timeoutIdRef:B}=pe(),{showToast:O,dismissToast:D}=pt(),{dispatchRcbEvent:M}=Le(),{syncVoice:U}=kn(),{setTextAreaValue:L}=it(),{toggleChatWindow:F}=De(),_=h.useCallback(async b=>{var X,w,K,R,z,G;const Z=d();if(Z&&C.current[Z]){if(P.current){if((X=o==null?void 0:o.sensitiveInput)!=null&&X.hideInUserBubble)return;if((w=o==null?void 0:o.sensitiveInput)!=null&&w.maskInUserBubble)return void((K=o.userBubble)!=null&&K.simulateStream?await i("*".repeat(((R=o.sensitiveInput)==null?void 0:R.asterisksCount)??10),"USER"):await s("*".repeat(((z=o.sensitiveInput)==null?void 0:z.asterisksCount)??10),"USER"))}(G=o.userBubble)!=null&&G.simulateStream?await i(b,"USER"):await s(b,"USER")}},[C,d,o,s,i,P]),H=h.useCallback(async(b,X=!0)=>{var w,K;if((b=b.trim())==="")return;X&&await _(b),B.current&&clearTimeout(B.current),S.current&&(L(""),m(0));const R=d();if(!R)return;let z=C.current[R];const G=await f(z);G&&((w=o.chatInput)!=null&&w.blockSpam&&g(!0),I.current=E.current,U(!1),setTimeout(()=>{v(!0)},400),y(!1),setTimeout(async()=>{var Z;const $={prevPath:u(),currPath:d(),goToPath:p,setTextAreaValue:L,userInput:Q.current,injectMessage:s,simulateStreamMessage:i,streamMessage:c,removeMessage:A,endStreamMessage:a,toggleChatWindow:F,showToast:O,dismissToast:D},le=l.current.length;await Mr(G,$),l.current.length===le&&(g("chatDisabled"in z?!!z.chatDisabled:!((Z=o.chatInput)==null||!Z.disabled)),Qr(z,$,y),x(typeof z.file=="function"),U(I.current),v(!1))},(K=o.chatInput)==null?void 0:K.botDelay))},[B,(e=o.chatInput)==null?void 0:e.blockSpam,(t=o.chatInput)==null?void 0:t.botDelay,(r=o.chatInput)==null?void 0:r.disabled,I,E,U,_,u,d,p,s,i,c,A,a,F,O,D,C]);return{handleSubmitText:h.useCallback(async(b,X=!0)=>{var w,K;b=b??((w=S.current)==null?void 0:w.value),!((K=o.event)!=null&&K.rcbUserSubmitText&&(await M(j.USER_SUBMIT_TEXT,{inputText:b,sendInChat:X})).defaultPrevented||!d())&&H(b,X)},[M,d,H,S,(n=o.event)==null?void 0:n.rcbUserSubmitText])}},Yt=()=>{var e;const{settings:t}=ee();return h.useMemo(()=>{var r;if(typeof window>"u"||!window.navigator)return!1;if((r=t.device)==null||!r.applyMobileOptimizations)return!0;const n=navigator.userAgent,o=!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(n),a=window.innerWidth>=768;return o&&a},[(e=t.device)==null?void 0:e.applyMobileOptimizations])},Bi=({buttons:e})=>{var t,r,n,o,a,s,A,i,c,l,d;const u=Yt(),{settings:p}=ee(),{styles:f}=oe(),{textAreaDisabled:y,textAreaSensitiveMode:g,inputLength:v,hasFlowStarted:x,setHasFlowStarted:m,setInputLength:E}=he(),{inputRef:P}=pe(),[C,S]=h.useState(!1),[I,Q]=h.useState(!1),{handleSubmitText:B}=ft(),{setTextAreaValue:O}=it(),D={boxSizing:u?"content-box":"border-box",...f.chatInputAreaStyle},M={outline:y?"":"none",boxShadow:y?"":`0 0 5px ${(t=p.general)==null?void 0:t.primaryColor}`,boxSizing:u?"content-box":"border-box",...f.chatInputAreaStyle,...f.chatInputAreaFocusedStyle},U={cursor:`url("${(r=p.general)==null?void 0:r.actionDisabledIcon}"), auto`,caretColor:"transparent",boxSizing:u?"content-box":"border-box",...f.chatInputAreaStyle,...f.chatInputAreaDisabledStyle},L={color:"#989898",...f.characterLimitStyle},F={color:"#ff0000",...f.characterLimitReachedStyle},_=y?(n=p.chatInput)==null?void 0:n.disabledPlaceholderText:(o=p.chatInput)==null?void 0:o.enabledPlaceholderText,H=()=>{y||S(!0)},b=()=>{S(!1)},X=()=>{Q(!0)},w=()=>{Q(!1)},K=async z=>{var G;if(!I&&z.key==="Enter"){if(z.shiftKey)return void((G=p.chatInput)!=null&&G.allowNewline||z.preventDefault());z.preventDefault(),await B()}},R=z=>{P.current&&(O(z.target.value),E(P.current.value.length))};return k.jsxs("div",{"aria-label":((a=p.ariaLabel)==null?void 0:a.inputTextArea)??"input text area",role:"textbox",onMouseDown:z=>{var G;z.stopPropagation(),!x&&((G=p.general)==null?void 0:G.flowStartTrigger)==="ON_CHATBOT_INTERACT"&&m(!0)},style:{...f.chatInputContainerStyle},className:"rcb-chat-input",children:[g&&(s=p.sensitiveInput)!=null&&s.maskInTextArea?k.jsx("input",{ref:P,type:"password",className:"rcb-chat-input-textarea",style:y?U:C?M:D,placeholder:_,onChange:R,onKeyDown:K,onFocus:H,onBlur:b,onCompositionStart:X,onCompositionEnd:w}):k.jsx("textarea",{ref:P,style:y?U:C?M:D,rows:1,className:"rcb-chat-input-textarea",placeholder:_,onChange:R,onKeyDown:K,onFocus:H,onBlur:b,onCompositionStart:X,onCompositionEnd:w}),k.jsxs(k.Fragment,{children:[e==null?void 0:e.map((z,G)=>k.jsx(h.Fragment,{children:z},G)),((A=p.chatInput)==null?void 0:A.showCharacterCount)&&((i=p.chatInput)==null?void 0:i.characterLimit)!=null&&((c=p.chatInput)==null?void 0:c.characterLimit)>0&&k.jsxs("div",{className:"rcb-chat-input-char-counter",style:v>=((l=p.chatInput)==null?void 0:l.characterLimit)?F:L,children:[v,"/",(d=p.chatInput)==null?void 0:d.characterLimit]})]})]})},Ii=({buttons:e})=>{var t;const{settings:r}=ee(),{styles:n}=oe();return k.jsxs("div",{"data-testid":"chatbot-footer-container",style:{...n.footerStyle},className:"rcb-chat-footer-container",children:[k.jsx("div",{className:"rcb-chat-footer",children:e==null?void 0:e.map((o,a)=>k.jsx(h.Fragment,{children:o},a))}),k.jsx("span",{children:(t=r.footer)==null?void 0:t.text})]})},Ti=()=>{var e,t,r,n,o,a,s;const{settings:A}=ee(),{styles:i}=oe(),{unreadCount:c}=he(),{isChatWindowOpen:l,toggleChatWindow:d}=De(),[u,p]=h.useState(!1),f={backgroundImage:`linear-gradient(to right, ${(e=A.general)==null?void 0:e.secondaryColor},
|
|
3
|
-
${(t=A.general)==null?void 0:t.primaryColor})`,...i.chatButtonStyle},y={transform:"scale(1.05)",...f,...i.chatButtonHoveredStyle},g={backgroundImage:`url(${(r=A.chatButton)==null?void 0:r.icon})`,fill:"#fff",width:75,height:75,...i.chatIconStyle};return k.jsx(k.Fragment,{children:!((n=A.general)!=null&&n.embedded)&&k.jsxs("div",{"aria-label":((o=A.ariaLabel)==null?void 0:o.chatButton)??"open chat",role:"button",style:u?y:f,className:"rcb-toggle-button "+(l?"rcb-button-hide":"rcb-button-show"),onMouseEnter:()=>{p(!0)},onMouseLeave:()=>{p(!1)},onClick:()=>d(!0),children:[(()=>{var v;const x=(v=A.chatButton)==null?void 0:v.icon;return x&&typeof x!="string"?x&&k.jsx("span",{className:"rcb-toggle-icon",children:k.jsx(x,{style:g})}):k.jsx("span",{className:"rcb-toggle-icon",style:g})})(),!((a=A.notification)!=null&&a.disabled)&&((s=A.notification)==null?void 0:s.showCount)&&k.jsx("span",{style:{...i.notificationBadgeStyle},className:"rcb-badge",children:c})]})})},Qi=()=>{var e,t,r,n,o,a;const s=Yt(),{settings:A}=ee(),{styles:i}=oe(),{chatBodyRef:c}=pe(),{isChatWindowOpen:l,toggleChatWindow:d}=De(),[u,p]=h.useState(!1),[f,y]=h.useState(!1),[g,v]=h.useState(0);h.useEffect(()=>{var E,P,C;const S=(E=A.tooltip)==null?void 0:E.mode;if(S==="ALWAYS")if(s){let I;I=l?(((P=c.current)==null?void 0:P.offsetWidth)??375)-(typeof((C=i.chatButtonStyle)==null?void 0:C.width)=="number"?i.chatButtonStyle.width:75):0,v(I),p(!0)}else p(!l);else S==="NEVER"?p(!1):S==="START"?f?p(!1):(y(!0),p(!0)):S==="CLOSE"&&p(!l)},[l,s,f,(e=i.chatButtonStyle)==null?void 0:e.width,(t=A.tooltip)==null?void 0:t.mode]);const x={transform:`translateX(-${g}px)`,right:(((r=i.chatButtonStyle)==null?void 0:r.width)??75)+40,bottom:30,backgroundColor:(n=A.general)==null?void 0:n.secondaryColor,color:"#fff",...i.tooltipStyle},m={borderColor:`transparent transparent transparent ${x.backgroundColor}`};return k.jsx(k.Fragment,{children:!((o=A.general)!=null&&o.embedded)&&k.jsxs("div",{"data-testid":"chat-tooltip",style:x,className:"rcb-chat-tooltip "+(u?"rcb-tooltip-show":"rcb-tooltip-hide"),onClick:()=>d(!0),children:[k.jsx("span",{children:(a=A.tooltip)==null?void 0:a.text}),k.jsx("span",{className:"rcb-chat-tooltip-tail",style:m})]})})},Mi=({id:e,content:t,timeout:r})=>{var n,o;const{settings:a}=ee(),{styles:s}=oe(),[A]=h.useState({toastPromptStyle:{...s.toastPromptStyle},toastPromptHoveredStyle:{...s.toastPromptHoveredStyle}}),{dismissToast:i}=pt(),[c,l]=h.useState(!1),d={color:(n=a.general)==null?void 0:n.primaryColor,borderColor:(o=a.general)==null?void 0:o.primaryColor,...A.toastPromptHoveredStyle};return h.useEffect(()=>{if(r){const u=setTimeout(()=>{i(e)},r);return()=>clearTimeout(u)}},[e,i,r]),typeof t=="string"?k.jsx("div",{onMouseEnter:()=>{l(!0)},onMouseLeave:()=>{l(!1)},style:c?d:A.toastPromptStyle,onMouseDown:async u=>{var p;(p=a.toast)!=null&&p.dismissOnClick&&(u.preventDefault(),await i(e))},className:"rcb-toast-prompt",children:t}):k.jsx(k.Fragment,{children:t})},Oi=()=>{var e,t,r,n,o,a,s,A,i,c,l,d;const{styles:u}=oe(),{toasts:p}=Fr(),f={bottom:`calc(${typeof((e=u.footerStyle)==null?void 0:e.height)=="number"?`${(t=u.footerStyle)==null?void 0:t.height}px`:((r=u.footerStyle)==null?void 0:r.height)??"50px"} + ${typeof((n=u.chatInputContainerStyle)==null?void 0:n.height)=="number"?`${(o=u.chatInputContainerStyle)==null?void 0:o.height}px`:((a=u.chatInputContainerStyle)==null?void 0:a.height)??"70px"} + 20px)`,width:300,minWidth:`calc(${typeof((s=u.chatWindowStyle)==null?void 0:s.width)=="number"?`${(A=u.chatWindowStyle)==null?void 0:A.width}px`:((i=u.chatWindowStyle)==null?void 0:i.width)??"375px"} / 2)`,maxWidth:`calc(${typeof((c=u.chatWindowStyle)==null?void 0:c.width)=="number"?`${(l=u.chatWindowStyle)==null?void 0:l.width}px`:((d=u.chatWindowStyle)==null?void 0:d.width)??"375px"} - 50px)`,...u.toastPromptContainerStyle};return k.jsx("div",{className:"rcb-toast-prompt-container",style:f,children:p.map(y=>k.jsx(Mi,{id:y.id,content:y.content,timeout:y.timeout},y.id))})},zr=({file:e,fileType:t,fileUrl:r})=>{var n,o,a;const{settings:s}=ee(),{styles:A}=oe(),i={backgroundColor:(n=s.general)==null?void 0:n.primaryColor,maxWidth:(o=s.userBubble)!=null&&o.showAvatar?"65%":"70%",...A.mediaDisplayContainerStyle};return k.jsx(k.Fragment,{children:r?k.jsxs(k.Fragment,{children:[t==="image"&&r&&k.jsx("div",{style:i,className:"rcb-media-display-image-container rcb-media-entry","data-testid":"media-display-image-container",children:k.jsx("img",{src:r,alt:"Image Display",className:"rcb-media-display-image"})}),t==="video"&&r&&k.jsx("div",{style:i,className:"rcb-media-display-video-container rcb-media-entry","data-testid":"media-display-video-container",children:k.jsxs("video",{controls:!0,className:"rcb-media-display-video",children:[k.jsx("source",{src:r,type:e.type}),"Your browser does not support the video tag."]})}),t==="audio"&&r&&k.jsxs("audio",{"data-testid":"media-display-audio-container",style:{maxWidth:(a=s.userBubble)!=null&&a.showAvatar?"65%":"70%"},controls:!0,className:"rcb-media-display-audio rcb-media-entry",children:[k.jsx("source",{src:r,type:e.type}),"Your browser does not support the audio tag."]})]}):k.jsx(k.Fragment,{})})},Rr=async e=>{if(!e)return{fileType:null,fileUrl:null};const t=e.type.split("/")[0];if(!["image","video","audio"].includes(t))return{fileType:null,fileUrl:null};try{return{fileType:t,fileUrl:await new Promise((r,n)=>{const o=new FileReader;o.onload=()=>r(o.result),o.onerror=()=>n(new Error("File reading failed")),o.readAsDataURL(e)})}}catch(r){return console.error(r),{fileType:null,fileUrl:null}}},_i=()=>{var e,t,r,n,o,a;const{settings:s}=ee(),{styles:A}=oe(),{injectMessage:i,simulateStreamMessage:c,streamMessage:l,removeMessage:d,endStreamMessage:u}=at(),{getCurrPath:p,getPrevPath:f,goToPath:y,blockAllowsAttachment:g}=Gt(),{flowRef:v,inputRef:x}=pe(),m=v.current,{showToast:E,dismissToast:P}=pt(),{dispatchRcbEvent:C}=Le(),{toggleChatWindow:S}=De(),{setTextAreaValue:I}=it(),{handleSubmitText:Q}=ft(),B={cursor:`url("${(e=s.general)==null?void 0:e.actionDisabledIcon}"), auto`,...A.fileAttachmentButtonStyle,...A.fileAttachmentButtonDisabledStyle},O={backgroundImage:`url(${(t=s.fileAttachment)==null?void 0:t.icon})`,fill:"#a6a6a6",...A.fileAttachmentIconStyle},D={backgroundImage:`url(${(r=s.fileAttachment)==null?void 0:r.icon})`,fill:"#a6a6a6",...A.fileAttachmentIconStyle,...A.fileAttachmentIconDisabledStyle};return k.jsxs("label",{"aria-label":((n=s.ariaLabel)==null?void 0:n.fileAttachmentButton)??"upload file",role:"button",className:g?"rcb-attach-button-enabled":"rcb-attach-button-disabled",style:g?{...A.fileAttachmentButtonStyle}:B,children:[k.jsx("input",{className:"rcb-attach-input",role:"file",type:"file",onChange:async M=>{var U,L,F,_;const H=M.target.files;if(!H)return;const b=Array.from(H);if(M.target.value="",(U=s.event)!=null&&U.rcbUserUploadFile&&(await C(j.USER_UPLOAD_FILE,{files:b})).defaultPrevented)return;const X=p();if(!X)return;const w=m[X];if(!w)return;const K=w.file;if(K!=null){const R=[];for(let z=0;z<b.length;z++){if(R.push(b[z].name),(L=s.fileAttachment)==null||!L.showMediaDisplay)continue;const G=await Rr(b[z]);!G.fileType||!G.fileUrl||await i(k.jsx(zr,{file:b[z],fileType:G.fileType,fileUrl:G.fileUrl}),"USER")}await Q("📄 "+R.join(", "),(F=s.fileAttachment)==null?void 0:F.sendFileName),await K({userInput:(_=x.current)==null?void 0:_.value,prevPath:f(),currPath:p(),goToPath:y,setTextAreaValue:I,injectMessage:i,simulateStreamMessage:c,streamMessage:l,removeMessage:d,endStreamMessage:u,toggleChatWindow:S,showToast:E,dismissToast:P,files:b})}},multiple:(o=s.fileAttachment)==null?void 0:o.multiple,accept:(a=s.fileAttachment)==null?void 0:a.accept,disabled:!g}),(()=>{var M,U;const L=g?(M=s.fileAttachment)==null?void 0:M.icon:(U=s.fileAttachment)==null?void 0:U.iconDisabled;return L&&typeof L!="string"?L&&k.jsx("span",{className:g?"rcb-attach-icon-enabled":"rcb-attach-icon-disabled",children:k.jsx(L,{style:g?O:D})}):k.jsx("span",{className:g?"rcb-attach-icon-enabled":"rcb-attach-icon-disabled",style:g?O:D})})()]})},Li=()=>{var e,t,r,n,o,a;const{settings:s}=ee(),{styles:A}=oe(),{syncedTextAreaDisabledRef:i}=he(),{inputRef:c}=pe(),{textAreaDisabled:l,setTextAreaValue:d}=it(),u=h.useRef(null),p=h.useRef(null),[f,y]=h.useState(!1),g={cursor:`url("${(e=s.general)==null?void 0:e.actionDisabledIcon}"), auto`,...A.emojiButtonStyle,...A.emojiButtonDisabledStyle},v={backgroundImage:`url(${(t=s.emoji)==null?void 0:t.icon})`,fill:"#a6a6a6",...A.emojiIconStyle},x={backgroundImage:`url(${(r=s.emoji)==null?void 0:r.icon})`,fill:"#a6a6a6",...A.emojiIconStyle,...A.emojiIconDisabledStyle};return h.useEffect(()=>{const m=P=>{const C=P.composedPath();u.current&&!C.includes(u.current)&&p.current&&!C.includes(p.current)&&y(!1)},E=()=>{(()=>{if(u.current&&p.current){const P=p.current.getBoundingClientRect(),C=u.current.offsetHeight,S=P.top-C-8;u.current.style.left=`${P.left}px`,u.current.style.top=`${S}px`}})()};return document.addEventListener("mousedown",m),window.addEventListener("resize",E),()=>{document.removeEventListener("mousedown",m),window.removeEventListener("resize",E)}},[]),k.jsxs(k.Fragment,{children:[k.jsx("div",{"aria-label":((n=s.ariaLabel)==null?void 0:n.emojiButton)??"emoji picker",role:"button",ref:p,className:l?"rcb-emoji-button-disabled":"rcb-emoji-button-enabled",style:l?g:{...A.emojiButtonStyle},onMouseDown:m=>{m.preventDefault(),i.current?y(!1):y(E=>!E)},children:(()=>{var m,E;const P=l?(m=s.emoji)==null?void 0:m.iconDisabled:(E=s.emoji)==null?void 0:E.icon;return P&&typeof P!="string"?P&&k.jsx("span",{className:l?"rcb-emoji-icon-disabled":"rcb-emoji-icon-enabled",children:k.jsx(P,{style:l?x:v})}):k.jsx("span",{className:l?"rcb-emoji-icon-disabled":"rcb-emoji-icon-enabled",style:l?x:v})})()}),f&&k.jsx("div",{className:"rcb-emoji-button-popup",ref:u,children:(a=(o=s.emoji)==null?void 0:o.list)==null?void 0:a.map((m,E)=>k.jsx("span",{className:"rcb-emoji",onMouseDown:P=>((C,S)=>{C.preventDefault(),c.current&&(d(c.current.value+S),setTimeout(()=>{const I=c.current;if(I){I.focus();const Q=I.value.length;I.setSelectionRange(Q,Q)}},50)),y(!1)})(P,m),children:m},E))})]})},Ni=()=>{var e,t,r;const{settings:n}=ee(),{styles:o}=oe(),{audioToggledOn:a,toggleAudio:s}=Hr(),A={backgroundImage:`url(${(e=n.audio)==null?void 0:e.icon})`,fill:"#fcec3d",...o.audioIconStyle},i={backgroundImage:`url(${(t=n.audio)==null?void 0:t.iconDisabled})`,fill:"#e8eaed",...o.audioIconStyle,...o.audioIconDisabledStyle};return k.jsx("div",{"aria-label":((r=n.ariaLabel)==null?void 0:r.audioButton)??"toggle audio",role:"button",onMouseDown:async c=>{c.preventDefault(),await s()},style:a?{...o.audioButtonStyle}:{...o.audioButtonStyle,...o.audioButtonDisabledStyle},children:(()=>{var c,l;const d=a?(c=n.audio)==null?void 0:c.icon:(l=n.audio)==null?void 0:l.iconDisabled;return d&&typeof d!="string"?d&&k.jsx("span",{className:"rcb-audio-icon","data-testid":"rcb-audio-icon",children:k.jsx(d,{style:a?A:i,"data-testid":"rcb-audio-icon-svg"})}):k.jsx("span",{className:"rcb-audio-icon","data-testid":"rcb-audio-icon",style:a?A:i})})()})},Hi=()=>{var e,t;const{settings:r}=ee(),{styles:n}=oe(),{toggleChatWindow:o}=De(),a={backgroundImage:`url(${(e=r.header)==null?void 0:e.closeChatIcon})`,fill:"#e8eaed",stroke:"#e8eaed",...n.closeChatIconStyle};return k.jsx("div",{"aria-label":((t=r.ariaLabel)==null?void 0:t.closeChatButton)??"close chat",role:"button",onMouseDown:s=>{s.stopPropagation(),o(!1)},style:{...n.closeChatButtonStyle},children:(()=>{var s;const A=(s=r.header)==null?void 0:s.closeChatIcon;return A&&typeof A!="string"?A&&k.jsx("span",{className:"rcb-close-chat-icon","data-testid":"rcb-close-chat-icon",children:k.jsx(A,{style:a})}):k.jsx("span",{className:"rcb-close-chat-icon","data-testid":"rcb-close-chat-icon",style:a})})()})},Ui=()=>{var e,t,r;const{settings:n}=ee(),{styles:o}=oe(),{notificationsToggledOn:a,toggleNotifications:s}=(()=>{const{notificationsToggledOn:c,toggleNotifications:l,playNotificationSound:d}=bn();return{notificationsToggledOn:c,toggleNotifications:l,playNotificationSound:d}})(),A={backgroundImage:`url(${(e=n.notification)==null?void 0:e.icon})`,fill:"#fcec3d",...o.notificationIconStyle},i={backgroundImage:`url(${(t=n.notification)==null?void 0:t.iconDisabled})`,fill:"#e8eaed",...o.notificationIconStyle,...o.notificationIconDisabledStyle};return k.jsx("div",{"aria-label":((r=n.ariaLabel)==null?void 0:r.notificationButton)??"toggle notifications",role:"button",onMouseDown:async c=>{c.preventDefault(),await s()},style:a?{...o.notificationButtonStyle}:{...o.notificationButtonStyle,...o.notificationButtonDisabledStyle},children:(()=>{var c,l;const d=a?(c=n.notification)==null?void 0:c.icon:(l=n.notification)==null?void 0:l.iconDisabled;return d&&typeof d!="string"?d&&k.jsx("span",{className:"rcb-notification-icon","data-testid":"rcb-notification-icon",children:k.jsx(d,{style:a?A:i,"data-testid":"rcb-notification-icon-svg"})}):k.jsx("span",{className:"rcb-notification-icon","data-testid":"rcb-notification-icon",style:a?A:i})})()})},Fi=()=>{var e,t,r;const{settings:n}=ee(),{styles:o}=oe(),{injectMessage:a}=at(),{inputRef:s}=pe(),{voiceToggledOn:A,toggleVoice:i}=kn(),{setInputLength:c,setTextAreaValue:l,textAreaDisabled:d}=it(),{handleSubmitText:u}=ft(),p=h.useRef([]),[f,y]=h.useState(!1);h.useEffect(()=>{var E;(E=n.voice)!=null&&E.sendAsAudio?(m(),p.current=[]):u()},[f]),h.useEffect(()=>{A?((E,P,C,S,I,Q,B)=>{var O;(O=E.voice)!=null&&O.sendAsAudio?Si(C,Q):Pi(E,P,C,S,I,B)})(n,i,x,l,c,p,s):xn()},[A]);const g={backgroundImage:`url(${(e=n.voice)==null?void 0:e.icon})`,fill:"#9aa0a6",...o.voiceIconStyle},v={backgroundImage:`url(${(t=n.voice)==null?void 0:t.iconDisabled})`,fill:"#9aa0a6",...o.voiceIconStyle,...o.voiceIconDisabledStyle},x=()=>{y(E=>!E)},m=async()=>{const E=new Blob(p.current,{type:"audio/wav"}),P=new File([E],"voice-input.wav",{type:"audio/wav"}),C=await Rr(P);!C.fileType||!C.fileUrl||await a(k.jsx(zr,{file:P,fileType:C.fileType,fileUrl:C.fileUrl}),"USER")};return k.jsx("div",{"aria-label":((r=n.ariaLabel)==null?void 0:r.voiceButton)??"toggle voice",role:"button",onMouseDown:async E=>{E.preventDefault(),!d&&await i()},style:A&&!d?{...o.voiceButtonStyle}:{...o.voiceButtonStyle,...o.voiceButtonDisabledStyle},className:A&&!d?"rcb-voice-button-enabled":"rcb-voice-button-disabled",children:(()=>{var E,P;const C=A?(E=n.voice)==null?void 0:E.icon:(P=n.voice)==null?void 0:P.iconDisabled;return C&&typeof C!="string"?C&&k.jsx("span",{className:"rcb-voice-icon "+(A&&!d?"on":""),children:k.jsx(C,{style:A&&!d?g:v})}):k.jsx("span",{className:"rcb-voice-icon"+(A&&!d?"-on":""),"data-testid":"rcb-voice-icon",style:A&&!d?g:v})})()})},zi=()=>{var e,t,r,n,o,a,s,A;const{settings:i}=ee(),{styles:c}=oe(),{textAreaDisabled:l}=he(),[d,u]=h.useState(!1),{handleSubmitText:p}=ft(),f={backgroundColor:(e=i.general)==null?void 0:e.primaryColor,...c.sendButtonStyle},y={cursor:`url("${(t=i.general)==null?void 0:t.actionDisabledIcon}"), auto`,backgroundColor:(r=i.general)==null?void 0:r.primaryColor,...c.sendButtonStyle,...c.sendButtonDisabledStyle},g={backgroundColor:(n=i.general)==null?void 0:n.secondaryColor,...c.sendButtonStyle,...c.sendButtonHoveredStyle},v={backgroundImage:`url(${(o=i.chatInput)==null?void 0:o.sendButtonIcon})`,fill:"#fff",...c.sendIconStyle},x={backgroundImage:`url(${(a=i.chatInput)==null?void 0:a.sendButtonIcon})`,fill:"#fff",...c.sendIconStyle,...c.sendIconDisabledStyle},m={backgroundImage:`url(${(s=i.chatInput)==null?void 0:s.sendButtonIcon})`,fill:"#fff",...c.sendIconStyle,...c.sendIconHoveredStyle};return k.jsx("div",{"aria-label":((A=i.ariaLabel)==null?void 0:A.sendButton)??"send message",role:"button",onMouseEnter:()=>{u(!0)},onMouseLeave:()=>{u(!1)},onMouseDown:async E=>{E==null||E.preventDefault(),!l&&await p()},style:l?y:d?g:f,className:"rcb-send-button",children:(()=>{var E;const P=(E=i.chatInput)==null?void 0:E.sendButtonIcon;return P&&typeof P!="string"?P&&k.jsx("span",{className:"rcb-send-icon","data-testid":"rcb-send-icon",children:k.jsx(P,{style:l?x:d?m:v})}):k.jsx("span",{className:"rcb-send-icon","data-testid":"rcb-send-icon",style:l?x:d?m:v})})()})},Ri=(e,t)=>{var r,n,o,a,s,A,i,c,l;const d={[ue.AUDIO_BUTTON]:(r=e.audio)==null?void 0:r.disabled,[ue.CLOSE_CHAT_BUTTON]:(n=e.general)==null?void 0:n.embedded,[ue.EMOJI_PICKER_BUTTON]:(o=e.emoji)==null?void 0:o.disabled,[ue.FILE_ATTACHMENT_BUTTON]:(a=e.fileAttachment)==null?void 0:a.disabled,[ue.NOTIFICATION_BUTTON]:(s=e.notification)==null?void 0:s.disabled,[ue.SEND_MESSAGE_BUTTON]:!1,[ue.VOICE_MESSAGE_BUTTON]:(A=e.voice)==null?void 0:A.disabled},u={},p=f=>f?f.map(y=>{if(typeof y=="string"){if((g=>Object.values(ue).includes(g))(y)&&!d[y]){if(u[y])return u[y];const g=t[y];if(typeof g=="function"){const v=g();return u[y]=v,v}return null}return null}return y}).filter(y=>y!==null):[];return{header:p((i=e.header)==null?void 0:i.buttons),chatInput:p((c=e.chatInput)==null?void 0:c.buttons),footer:p((l=e.footer)==null?void 0:l.buttons)}},ji=()=>{const{settings:e}=ee(),t=h.useMemo(()=>({[ue.CLOSE_CHAT_BUTTON]:()=>k.jsx(Hi,{}),[ue.AUDIO_BUTTON]:()=>k.jsx(Ni,{}),[ue.NOTIFICATION_BUTTON]:()=>k.jsx(Ui,{}),[ue.EMOJI_PICKER_BUTTON]:()=>k.jsx(Li,{}),[ue.FILE_ATTACHMENT_BUTTON]:()=>k.jsx(_i,{}),[ue.SEND_MESSAGE_BUTTON]:()=>k.jsx(zi,{}),[ue.VOICE_MESSAGE_BUTTON]:()=>k.jsx(Fi,{})}),[]),{header:r,chatInput:n,footer:o}=h.useMemo(()=>Ri(e,t),[e,t]);return{headerButtons:h.useMemo(()=>r,[r]),chatInputButtons:h.useMemo(()=>n,[n]),footerButtons:h.useMemo(()=>o,[o])}},Cn=()=>{const{settings:e}=ee(),{styles:t}=oe(),{setSyncedMessages:r,syncedMessagesRef:n}=gn(),{isLoadingChatHistory:o,setIsLoadingChatHistory:a,hasChatHistoryLoaded:s,setHasChatHistoryLoaded:A}=he(),{chatBodyRef:i}=pe(),{dispatchRcbEvent:c}=Le(),l=h.useCallback(async()=>{var d,u;const p=Ct();if(!p||(d=e.event)!=null&&d.rcbLoadChatHistory&&(await c(j.LOAD_CHAT_HISTORY,{})).defaultPrevented)return;a(!0);const f=((u=i.current)==null?void 0:u.scrollHeight)??0;((y,g,v,x,m,E,P,C,S)=>{var I;if(Or=!0,v!=null)try{const Q=Ze(k.jsx(yi,{}),"SYSTEM"),B=m.current.slice(1);x([Q,...B]);const O=v.map(D=>{if(D.type==="object"){const M=Nr(D.content,y,g);return{...D,content:M}}return D});setTimeout(()=>{var D;const M=m.current.slice(1);let U=(D=y.chatHistory)!=null&&D.autoLoad?Ze(k.jsx(k.Fragment,{}),"SYSTEM"):Ze(k.jsx(mi,{}),"SYSTEM");x([...O,U,...M]),S(!0)},500),setTimeout(()=>{if(!E.current)return;const{scrollHeight:D}=E.current,M=D-P;E.current.scrollTop+=M,C(!1)},510)}catch{$e.removeItem((I=y.chatHistory)==null?void 0:I.storageKey)}})(e,t,p,r,n,i,f,a,A)},[e,t,c,n,i,a,A]);return{isLoadingChatHistory:o,setIsLoadingChatHistory:a,hasChatHistoryLoaded:s,showChatHistory:l}},qi=()=>{var e,t,r;const{settings:n}=ee(),{styles:o}=oe(),{showChatHistory:a}=Cn(),[s,A]=h.useState(!1),i={color:(e=n.general)==null?void 0:e.primaryColor,borderColor:(t=n.general)==null?void 0:t.primaryColor,...o.chatHistoryButtonStyle,...o.chatHistoryButtonHoveredStyle};return k.jsx("div",{className:"rcb-view-history-container",children:k.jsx("div",{onMouseEnter:()=>{A(!0)},onMouseLeave:()=>{A(!1)},style:s?i:{...o.chatHistoryButtonStyle},onMouseDown:c=>{c.preventDefault(),a()},className:"rcb-view-history-button",role:"button",tabIndex:0,children:k.jsx("p",{children:(r=n.chatHistory)==null?void 0:r.viewChatHistoryButtonText})})})},Gi=()=>{var e,t,r,n;const o=Yt(),{settings:a}=ee(),{replaceMessages:s}=at(),{isBotTyping:A,isChatWindowOpen:i,setUnreadCount:c,setSyncedIsChatWindowOpen:l,setSyncedTextAreaDisabled:d,setSyncedAudioToggledOn:u,setSyncedVoiceToggledOn:p,setSyncedIsScrolling:f,syncedIsScrollingRef:y,syncedIsChatWindowOpenRef:g}=he(),{chatBodyRef:v}=pe(),{viewportHeight:x,setViewportHeight:m,setViewportWidth:E,scrollToBottom:P}=De(),{setUpNotifications:C}=bn(),{handleFirstInteraction:S}=(()=>{var O;const{settings:D}=ee(),{hasInteractedPage:M,setHasInteractedPage:U,hasFlowStarted:L,setHasFlowStarted:F}=he(),_=h.useCallback(()=>{var H;if(U(!0),!L&&((H=D.general)==null?void 0:H.flowStartTrigger)==="ON_PAGE_INTERACT"&&F(!0),!window.SpeechSynthesisUtterance)return void console.info("Speech Synthesis API is not supported in this environment.");const b=new window.SpeechSynthesisUtterance;b.text="",b.onend=()=>{window.removeEventListener("click",_),window.removeEventListener("keydown",_),window.removeEventListener("touchstart",_)},window.speechSynthesis.speak(b)},[L,(O=D.general)==null?void 0:O.flowStartTrigger]);return{hasInteractedPage:M,handleFirstInteraction:_}})(),{showChatHistory:I}=Cn(),Q=h.useRef(0),B=h.useRef(!1);h.useEffect(()=>(window.addEventListener("click",S),window.addEventListener("keydown",S),window.addEventListener("touchstart",S),()=>{window.removeEventListener("click",S),window.removeEventListener("keydown",S),window.removeEventListener("touchstart",S)}),[]),h.useEffect(()=>{const O=v.current;if(!O)return;const D=()=>{B.current||(B.current=!0,requestAnimationFrame(()=>{var M,U;if(!O)return;const{scrollTop:L,clientHeight:F,scrollHeight:_}=O,H=L+F<_-(((M=a.chatWindow)==null?void 0:M.messagePromptOffset)??30);f(H),y.current=H,H||(L+F>=_-1&&(O.scrollTop=_-F-1),(g.current||(U=a.general)!=null&&U.embedded)&&c(0)),B.current=!1}))};return O.addEventListener("wheel",D,{passive:!0}),O.addEventListener("touchmove",D,{passive:!0}),()=>{O.removeEventListener("wheel",D),O.removeEventListener("touchmove",D)}},[]),h.useEffect(()=>{var O,D,M;d((O=a.chatInput)==null?void 0:O.disabled),l((D=a.chatWindow)==null?void 0:D.defaultOpen),u((M=a.audio)==null?void 0:M.defaultToggledOn),setTimeout(()=>{var U;p((U=a.voice)==null?void 0:U.defaultToggledOn)},1)},[]),h.useEffect(()=>{var O;(O=a.notification)!=null&&O.disabled||C()},[(e=a.notification)==null?void 0:e.disabled]),h.useEffect(()=>{!y.current&&v!=null&&v.current&&P()},[A]),h.useEffect(()=>{var O,D;if((O=a.chatHistory)!=null&&O.disabled)$e&&$e.removeItem(zt);else if(yn(a),Ct().length>0){const M=Ze(k.jsx(qi,{}),"SYSTEM");s([M]),(D=a.chatHistory)!=null&&D.autoLoad&&I()}},[(t=a.chatHistory)==null?void 0:t.storageKey,(r=a.chatHistory)==null?void 0:r.maxEntries,(n=a.chatHistory)==null?void 0:n.disabled]),h.useEffect(()=>{var O;o||(O=a.general)!=null&&O.embedded||!navigator.virtualKeyboard||(navigator.virtualKeyboard.overlaysContent=!0,navigator.virtualKeyboard.addEventListener("geometrychange",D=>{if(!D.target)return;const{x:M,y:U,width:L,height:F}=D.target.boundingRect;M==0&&U==0&&L==0&&F==0?(setTimeout(()=>{var _;m((_=window.visualViewport)==null?void 0:_.height)},101),setTimeout(()=>{var _,H;x!=((_=window.visualViewport)==null?void 0:_.height)&&m((H=window.visualViewport)==null?void 0:H.height)},1001)):setTimeout(()=>{var _;m(((_=window.visualViewport)==null?void 0:_.height)-F)},101)}))},[o]),h.useEffect(()=>{var O,D,M,U;if(o)return;i&&(m((O=window.visualViewport)==null?void 0:O.height),E((D=window.visualViewport)==null?void 0:D.width));const L=()=>window.scrollTo({top:0,left:0,behavior:"auto"}),F=()=>Q.current=window.scrollY,_=()=>{var b,X;m((b=window.visualViewport)==null?void 0:b.height),E((X=window.visualViewport)==null?void 0:X.width)},H=()=>{var b;window.removeEventListener("scroll",L),window.removeEventListener("scroll",F),(b=window.visualViewport)==null||b.removeEventListener("resize",_)};return i?(H(),document.body.style.position="fixed",window.addEventListener("scroll",L),(M=window.visualViewport)==null||M.addEventListener("resize",_)):(document.body.style.position="static",H(),window.scrollTo({top:Q.current,left:0,behavior:"auto"}),window.addEventListener("scroll",F),(U=window.visualViewport)==null||U.removeEventListener("resize",_)),H},[i,o])},Yi="https://cdn.jsdelivr.net/gh/react-chatbotify/community-themes/themes",Wi="2592000",jr="RCB_THEME_CACHE_DATA",qr=async(e,t)=>{const{id:r,version:n,baseUrl:o=Yi,cacheDuration:a=Wi}=t,s=n||await(async(v,x)=>{const m=`${x}/${v}/meta.json`;try{const E=await fetch(m);return E.ok?(await E.json()).version:(console.error(`Failed to fetch meta.json from ${m}`),null)}catch(E){return console.error(`Failed to fetch meta.json from ${m}`,E),null}})(r,o);if(!s)return console.error(`Unable to find version for theme: ${r}`),{settings:{},inlineStyles:{},cssStylesText:""};const A=((v,x,m)=>{const E=localStorage.getItem(`${jr}_${v}_${x}`);if(!E)return null;try{const P=JSON.parse(E),C=new Date().getTime(),S=Math.floor(C/1e3);return P.cacheDate+m>=S?P:null}catch(P){return console.error(`Unable to fetch cache for ${v}`,P),null}})(r,s,a);if(A){const v=Gr(e,A.cssStylesText);return{settings:A.settings,inlineStyles:A.inlineStyles,cssStylesText:v}}const i=`${o}/${r}/${s}/styles.css`,c=`${o}/${r}/${s}/settings.json`,l=`${o}/${r}/${s}/styles.json`;let d="";const u=await fetch(i);u.ok?d=await u.text():console.info(`Could not fetch styles.css from ${i}`);const p=await fetch(c);let f={};p.ok?f=await p.json():console.info(`Could not fetch settings.json from ${c}`);const y=await fetch(l);let g={};return y.ok?g=await y.json():console.info(`Could not fetch styles.json from ${l}`),((v,x,m,E,P)=>{const C=new Date().getTime(),S={settings:m,inlineStyles:E,cssStylesText:P,cacheDate:Math.floor(C/1e3)};localStorage.setItem(`${jr}_${v}_${x}`,JSON.stringify(S))})(r,s,f,g,d),{settings:f,inlineStyles:g,cssStylesText:Gr(e,d)}},Gr=(e,t)=>t.split(new RegExp("(?<=})")).map(r=>{const n=r.trim();return n.startsWith("@import")||n.startsWith("@keyframes")||n.startsWith("@media")?n:n?`#${e} ${n}`:""}).join(`
|
|
4
|
-
`),
|
|
1
|
+
(function(Pe,k){typeof exports=="object"&&typeof module<"u"?k(exports,require("react/jsx-runtime"),require("react"),require("react-dom/client"),require("react-dom/server")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom/client","react-dom/server"],k):(Pe=typeof globalThis<"u"?globalThis:Pe||self,k(Pe.AccessQABot={},Pe.jsxRuntime,Pe.React,Pe.ReactDOMClient,Pe.ReactDOMServer))})(this,function(Pe,k,h,wc,Fa){"use strict";function za(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const ce=za(h);function br(e,t){t===void 0&&(t={});var r=t.insertAt;if(e&&typeof document<"u"){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",r==="top"&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}br('.rcb-chat-header-container{border-bottom:1px solid #ccc;color:#fff;display:flex;justify-content:space-between;max-height:55px;padding:12px}.rcb-chat-header{display:flex;flex-direction:row}.rcb-bot-avatar{background-size:cover;border-radius:50%;height:30px;margin-right:12px;width:30px}.rcb-message-prompt-container.visible{align-items:center;animation:rcb-animation-pop-in .3s ease-in-out;bottom:0;display:flex;justify-content:center;margin:auto;opacity:1;pointer-events:auto;position:sticky}.rcb-message-prompt-container.hidden{height:0;opacity:0;pointer-events:none;visibility:hidden}.rcb-message-prompt-text{background-color:#fff;border:.5px solid #adadad;border-radius:20px;color:#adadad;cursor:pointer;font-size:12px;padding:6px 12px;transition:color .3s ease,border-color .3s ease;z-index:9999}.rcb-message-prompt-container.hidden .rcb-message-prompt-text{padding:0}.rcb-user-message-container{display:flex;flex-direction:row;justify-content:right}.rcb-user-message{border-radius:22px;font-size:15px;height:fit-content;margin-right:16px;margin-top:8px;min-height:20px;overflow:auto;overflow-wrap:anywhere;padding:12px 16px;text-align:right;white-space:pre-wrap;width:fit-content}.rcb-user-message-offset{margin-right:50px}.rcb-user-message-entry{animation:rcb-animation-user-message-entry .3s ease-in backwards}.rcb-message-user-avatar{background-size:cover;border-radius:50%;height:40px;margin-left:-10px;margin-right:6px;margin-top:9px;width:40px}.rcb-bot-message-container{display:flex;flex-direction:row}.rcb-bot-message{border-radius:22px;font-size:15px;height:fit-content;margin-left:16px;margin-top:8px;min-height:20px;overflow:auto;overflow-wrap:anywhere;padding:12px 16px;text-align:left;white-space:pre-wrap;width:fit-content}.rcb-bot-message-offset{margin-left:50px}.rcb-bot-message-entry{animation:rcb-animation-bot-message-entry .3s ease-in backwards}.rcb-message-bot-avatar{background-size:cover;border-radius:50%;height:40px;margin-left:6px;margin-right:-10px;margin-top:9px;width:40px}.rcb-typing-indicator{align-items:center;display:flex}.rcb-dot{animation:rcb-animation-bot-typing 1s infinite;background-color:#ccc;border-radius:50%;height:8px;margin-right:4px;width:8px}.rcb-dot:nth-child(2){animation-delay:.2s}.rcb-dot:nth-child(3){animation-delay:.4s}.rcb-chat-body-container{height:100%;overflow-x:hidden;overflow-y:scroll;padding-bottom:16px;position:relative;touch-action:pan-y;width:100%}.rcb-chat-body-container::-webkit-scrollbar-track{background-color:#f1f1f1}.rcb-chat-body-container::-webkit-scrollbar-thumb{background-color:#ddd;border-radius:4px}.rcb-chat-body-container::-webkit-scrollbar-thumb:hover{background-color:#cfcfcf}.rcb-chat-body-container::-webkit-scrollbar-corner{background-color:#f1f1f1}.rcb-checkbox-container{display:flex;flex-wrap:wrap;gap:10px;margin-left:16px;padding-top:12px}.rcb-checkbox-offset{margin-left:50px!important}.rcb-checkbox-row-container{align-items:center;animation:rcb-animations-checkboxes-entry .5s ease-out;background-color:#fff;border-radius:10px;border-style:solid;border-width:.5px;cursor:pointer;display:flex;gap:5px;max-height:32px;min-height:30px;overflow:hidden;width:80%}.rcb-checkbox-row-container:hover{box-shadow:0 0 5px #0003}.rcb-checkbox-row{align-items:center;cursor:pointer;display:inline-flex;margin-left:10px}.rcb-checkbox-mark{align-items:center;background-color:#f2f2f2;border:none;border-radius:50%;cursor:pointer;display:flex;height:20px;justify-content:center;margin-right:10px;transition:all .3s ease;width:20px}.rcb-checkbox-mark:hover{background-color:#c2c2c2}.rcb-checkbox-mark:before{content:"✓";transition:all .3s ease}.rcb-checkbox-label{font-size:14px}.rcb-checkbox-next-button{align-items:center;animation:rcb-animations-checkboxes-entry .5s ease-out;background-color:#fff;border-radius:10px;border-style:solid;border-width:.5px;cursor:pointer;display:inline-block;font-size:24px;max-height:32px;min-height:30px;text-align:center;width:80%}.rcb-checkbox-next-button:before{content:"→"}.rcb-checkbox-next-button:hover{box-shadow:0 0 5px #0003}.rcb-options-container{display:flex;flex-wrap:wrap;gap:10px;margin-left:16px;max-width:70%;padding-top:12px}.rcb-options-offset{margin-left:50px!important}.rcb-options{align-items:center;animation:rcb-animation-options-entry .5s ease-out;border-radius:20px;border-style:solid;border-width:.5px;cursor:pointer;display:inline-flex;font-size:14px;justify-content:center;overflow:hidden;padding:10px 20px;transition:background-color .3s ease}.rcb-options:hover{box-shadow:0 0 5px #0003}.rcb-line-break-container{align-items:center;display:flex;justify-content:center;max-height:45px;padding-bottom:5px;padding-top:10px}.rcb-line-break-text{color:#adadad;font-size:12px;padding:6px 12px}.rcb-spinner-container{align-items:center;display:flex;justify-content:center;max-height:45px;min-height:35px;padding-bottom:5px;padding-top:10px}.rcb-spinner{animation:rcb-animation-spin 1s linear infinite;border:4px solid #f3f3f3;border-radius:50%;height:22px;width:22px}.rcb-chat-input{align-items:center;background-color:#fff;border-top:1px solid #ccc;display:flex;padding:8px 16px}.rcb-chat-input::placeholder{color:#999}.rcb-chat-input-textarea{background-color:#fff;border:none;border-radius:4px;color:#000;flex:1;font-family:inherit;font-size:16px;height:auto;min-height:38px;outline:none;overflow-y:scroll;padding:8px;resize:none;touch-action:none}.rcb-chat-input-textarea::-webkit-scrollbar,.rcb-chat-input-textarea::-webkit-scrollbar-thumb{background-color:initial}.rcb-chat-input-textarea::-webkit-scrollbar-thumb:hover{background-color:initial}.rcb-chat-input-char-counter{font-size:14px;margin-left:8px;margin-top:3px}.rcb-chat-footer-container{align-items:flex-end;background-color:#f2f2f2;border-top:1px solid #ccc;color:#000;display:flex;font-size:12px;justify-content:space-between;max-height:55px;padding:12px 16px 8px 10px}.rcb-chat-footer,.rcb-toggle-button{display:flex;flex-direction:row}.rcb-toggle-button{border:none;border-radius:50%;bottom:20px;box-shadow:0 2px 4px #0003;cursor:pointer;height:75px;position:fixed;right:20px;width:75px;z-index:9999}.rcb-toggle-button.rcb-button-hide{animation:rcb-animation-collapse .3s ease-in-out forwards;opacity:0;visibility:hidden}.rcb-toggle-button.rcb-button-show{animation:rcb-animation-expand .3s ease-in-out forwards;opacity:1;visibility:visible}.rcb-toggle-icon{background-position:50%;background-repeat:no-repeat;background-size:cover;border-radius:inherit;height:100%;margin:auto;width:100%}.rcb-badge,.rcb-toggle-icon{align-items:center;display:flex;justify-content:center}.rcb-badge{background-color:red;border-radius:50%;color:#fff;height:25px;position:absolute;right:-6px;top:-6px;width:25px}.rcb-chat-tooltip{border-radius:20px;box-shadow:0 2px 6px #0003;cursor:pointer;font-size:20px;padding:16px;position:fixed;transition:transform .3s ease;white-space:nowrap;z-index:9999}.rcb-chat-tooltip-tail{border-style:solid;border-width:10px 0 10px 10px;content:"";margin-top:-10px;position:absolute;right:-10px;top:50%}.rcb-chat-tooltip.rcb-tooltip-hide{animation:rcb-animation-tooltip-out .5s ease-in-out;opacity:0;visibility:hidden}.rcb-chat-tooltip.rcb-tooltip-show{animation:rcb-animation-tooltip-in .5s ease-in-out;opacity:1;visibility:visible}.rcb-toast-prompt{animation:rcb-animation-pop-in .3s ease-in-out;background-color:#fff;border:.5px solid #7a7a7a;border-radius:5px;color:#7a7a7a;cursor:pointer;font-size:12px;margin-top:6px;padding:6px 12px;text-align:center;transition:color .3s ease,border-color .3s ease;width:100%;z-index:9999}.rcb-toast-prompt-container{align-items:center;animation:popIn .3s ease-in-out;bottom:0;display:flex;flex-direction:column;justify-content:flex-end;left:50%;margin:200 auto auto;opacity:1;pointer-events:auto;position:absolute;transform:translate(-50%)}.rcb-media-display-image-container,.rcb-media-display-video-container{border-radius:22px;margin-right:16px;margin-top:8px;padding:16px;width:fit-content}.rcb-media-display-offset{margin-right:50px!important}.rcb-media-display-image{border-radius:22px;height:auto;object-fit:cover;width:100%}.rcb-media-display-video{background-color:#000;border-radius:22px;height:auto;width:100%}.rcb-media-display-audio{border-radius:22px;height:auto;margin-right:16px;margin-top:8px;width:100%}.rcb-media-entry{animation:rcb-animation-user-message-entry .3s ease-in backwards}.rcb-attach-button-disabled,.rcb-attach-button-enabled{background-size:cover;border-radius:6px;display:inline-block;height:30px;position:relative;text-align:center;width:30px}.rcb-attach-button-disabled input[type=file],.rcb-attach-button-enabled input[type=file]{display:none;height:100%;position:absolute;width:100%}.rcb-attach-button-enabled{cursor:pointer}.rcb-attach-button-disabled{opacity:.5}.rcb-attach-button-enabled:after{background-color:#0000001a;border-radius:50%;content:"";height:0;left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%);transition:width .2s ease-out,height .2s ease-out,opacity .2s ease-out;width:0}.rcb-attach-button-enabled:hover:after{height:130%;opacity:1;width:130%}.rcb-attach-icon-disabled,.rcb-attach-icon-enabled{background-repeat:no-repeat;background-size:cover;display:inline-block;height:24px;margin-top:2px;transition:background-image .3s ease;width:24px}.rcb-attach-icon-enabled{cursor:pointer}.rcb-emoji-button-disabled,.rcb-emoji-button-enabled{background-size:cover;border-radius:6px;cursor:pointer;display:inline-block;height:30px;position:relative;text-align:center;width:30px}.rcb-emoji-icon-disabled,.rcb-emoji-icon-enabled{background-repeat:no-repeat;background-size:cover;display:inline-block;font-size:20px;height:24px;margin-top:2px;position:relative;width:24px}.rcb-emoji-icon-enabled{cursor:pointer}.rcb-emoji-icon-disabled{opacity:.5}.rcb-emoji-button-enabled:after{background-color:#0000001a;border-radius:50%;content:"";height:0;left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%);transition:width .2s ease-out,height .2s ease-out,opacity .2s ease-out;width:0}.rcb-emoji-button-enabled:hover:after{height:130%;opacity:1;width:130%}.rcb-emoji-button-popup{background-color:#fff;border:1px solid #ccc;border-radius:4px;box-shadow:0 2px 4px #0003;max-height:200px;overflow-y:auto;padding:8px;position:absolute;transform:translateY(calc(-100% - 30px));width:158px}.rcb-emoji{cursor:pointer;font-size:24px;padding:3px;transition:transform .2s ease-in-out}.rcb-emoji:hover{transform:scale(1.2)}.rcb-audio-icon{background-size:cover;border:none;cursor:pointer;display:inline-block;height:30px;margin-left:5px;position:relative;width:30px}.rcb-audio-icon:after{background-color:#0000001a;border-radius:50%;content:"";height:0;left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%);transition:width .2s ease-out,height .2s ease-out,opacity .2s ease-out;width:0}.rcb-audio-icon:hover:after{height:130%;opacity:1;width:130%}.rcb-close-chat-icon{background-size:cover;border:none;cursor:pointer;display:inline-block;height:30px;margin-left:5px;position:relative;width:30px}.rcb-close-chat-icon:after{background-color:#0000001a;border-radius:50%;content:"";height:0;left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%);transition:width .2s ease-out,height .2s ease-out,opacity .2s ease-out;width:0}.rcb-close-chat-icon:hover:after{height:130%;opacity:1;width:130%}.rcb-notification-icon{background-size:cover;border:none;cursor:pointer;display:inline-block;height:30px;margin-left:5px;position:relative;width:30px}.rcb-notification-icon:after{background-color:#0000001a;border-radius:50%;content:"";height:0;left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%);transition:width .2s ease-out,height .2s ease-out,opacity .2s ease-out;width:0}.rcb-notification-icon:hover:after{height:130%;opacity:1;width:130%}.rcb-voice-button-disabled,.rcb-voice-button-enabled{align-items:center;background-color:#fff;border-radius:4px;box-shadow:0 0 3px #0000004d;cursor:pointer;display:inline-flex;height:32px;justify-content:center;margin-left:8px;text-transform:uppercase;transition:all .3s ease;width:32px}.rcb-voice-button-enabled{border:1px solid red;box-shadow:0 0 3px #ff000080}.rcb-voice-button-enabled:hover{border:1px solid #3d0000}.rcb-voice-button-disabled{border:1px;border-color:#0003;border-style:solid}.rcb-voice-button-disabled:hover{box-shadow:0 0 3px #8a0000}.rcb-voice-icon{background-position:50%;background-repeat:no-repeat;background-size:cover;background-size:contain;height:60%;object-fit:cover;width:60%}.rcb-voice-icon.on{animation:rcb-animation-ping 1s infinite}.rcb-send-button{border:none;border-radius:4px;box-shadow:0 0 3px #0000004d;cursor:pointer;display:inline-flex;height:32px;justify-content:center;margin-left:8px;text-transform:uppercase;transition:background-color .3s ease;width:51px}.rcb-send-icon{background-position:50%;background-repeat:no-repeat;background-size:cover;background-size:contain;height:50%;object-fit:cover;transform:translateY(20%);width:50%}.rcb-view-history-container{align-items:center;display:flex;justify-content:center;max-height:45px;min-height:35px;padding-bottom:5px;padding-top:10px}.rcb-view-history-button{align-items:center;background-color:#fff;border:.5px solid #adadad;border-radius:20px;color:#adadad;cursor:pointer;display:inline-flex;font-size:12px;justify-content:center;max-width:60%;padding:6px 12px;transition:color .3s ease,border-color .3s ease}.rcb-view-history-button>p{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rcb-chatbot-global{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:1.5;z-index:9999}.rcb-chat-window{background-color:#fff;border-radius:10px;bottom:20px;box-shadow:0 2px 4px #0003;display:flex;flex-direction:column;height:550px;overflow:hidden;position:fixed;right:20px;transition:all .3s ease;width:375px}.rcb-window-embedded .rcb-chat-window{bottom:auto;opacity:1;position:relative;right:auto;visibility:visible}.rcb-window-open .rcb-chat-window{animation:rcb-animation-expand .3s ease-in-out forwards;opacity:1;visibility:visible}.rcb-window-close .rcb-chat-window{animation:rcb-animation-collapse .3s ease-in-out forwards;opacity:0;visibility:hidden}@keyframes rcb-animation-expand{0%{opacity:0;transform:translate(100%,100%) scale(0)}to{opacity:1;transform:translate(0) scale(1)}}@keyframes rcb-animation-collapse{0%{opacity:1;transform:translate(0) scale(1)}to{opacity:0;transform:translate(100%,100%) scale(0)}}@keyframes rcb-animation-ping{0%{filter:brightness(100%);opacity:1}50%{filter:brightness(50%);opacity:.8}}@keyframes rcb-animation-bot-message-entry{0%{opacity:0;transform:translate(-100%,50%) scale(0)}to{opacity:1;transform:translate(0) scale(1)}}@keyframes rcb-animation-user-message-entry{0%{opacity:0;transform:translate(100%,50%) scale(0)}to{opacity:1;transform:translate(0) scale(1)}}@keyframes rcb-animation-bot-typing{0%{opacity:.4}50%{opacity:1}to{opacity:.4}}@keyframes rcb-animation-pop-in{0%{opacity:0;transform:scale(.8)}70%{opacity:1;transform:scale(1.1)}to{transform:scale(1)}}@keyframes rcb-animations-checkboxes-entry{0%{opacity:0;transform:translate(-100%)}to{opacity:1;transform:translate(0)}}@keyframes rcb-animation-options-entry{0%{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes rcb-animation-tooltip-in{0%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}@keyframes rcb-animation-tooltip-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-5px)}}@keyframes rcb-animation-spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}',{insertAt:"top"});const ue={AUDIO_BUTTON:"audio-button",NOTIFICATION_BUTTON:"notification-button",CLOSE_CHAT_BUTTON:"close-chat-button",SEND_MESSAGE_BUTTON:"send-button",VOICE_MESSAGE_BUTTON:"voice-button",FILE_ATTACHMENT_BUTTON:"file-attachment-button",EMOJI_PICKER_BUTTON:"emoji-button"},vr="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml:space='preserve'%20viewBox='0%200%201000%201000'%3e%3crect%20width='100%25'%20height='100%25'%20fill='%23fff'/%3e%3cg%3e%3crect%20width='45'%20height='30'%20x='-22.5'%20y='-15'%20rx='1.5'%20ry='1.5'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2337547a;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20-99%20362)%20scale(3.4003)'/%3e%3cpath%20d='M0%2075q14%200%2014%2017%200%2016-14%2016Z'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2398b0ca;fill-rule:nonzero;opacity:1'%20transform='rotate(180%20106%20386)%20scale(3.4003)'/%3e%3crect%20width='25'%20height='4'%20x='-12.5'%20y='-2'%20rx='.2'%20ry='.2'%20style='stroke:%2346648c;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2346648c;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20-46%20282)%20scale(3.4003)'/%3e%3cpath%20d='M19%2065h4l5%204v1H14v-1Z'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2346648c;fill-rule:nonzero;opacity:1'%20transform='translate(165%20150)%20scale(3.4003)'/%3e%3crect%20width='25'%20height='2'%20x='-12.5'%20y='-1'%20rx='.1'%20ry='.1'%20style='stroke:%2398b0ca;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2398b0ca;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20-3%20240)%20scale(3.4003)'/%3e%3ccircle%20r='7.5'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23a478fc;fill-rule:nonzero;opacity:1'%20transform='translate(236%20175)%20scale(3.4003)'/%3e%3crect%20width='45'%20height='30'%20x='-22.5'%20y='-15'%20rx='1.5'%20ry='1.5'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2337547a;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20139%20600)%20scale(3.4003)'/%3e%3cpath%20d='M184%2075q14%200%2014%2017%200%2016-14%2016Z'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2398b0ca;fill-rule:nonzero;opacity:1'%20transform='translate(165%20150)%20scale(3.4003)'/%3e%3crect%20width='25'%20height='4'%20x='-12.5'%20y='-2'%20rx='.2'%20ry='.2'%20style='stroke:%2346648c;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2346648c;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20219%20548)%20scale(3.4003)'/%3e%3cpath%20d='M175%2065h4l5%204v1h-14v-1Z'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2346648c;fill-rule:nonzero;opacity:1'%20transform='translate(165%20150)%20scale(3.4003)'/%3e%3crect%20width='25'%20height='2'%20x='-12.5'%20y='-1'%20rx='.1'%20ry='.1'%20style='stroke:%2398b0ca;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2398b0ca;fill-rule:nonzero;opacity:1'%20transform='rotate(90%20262%20505)%20scale(3.4003)'/%3e%3ccircle%20r='7.5'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23a478fc;fill-rule:nonzero;opacity:1'%20transform='translate(767%20175)%20scale(3.4003)'/%3e%3crect%20width='116.7'%20height='70'%20x='-58.4'%20y='-35'%20rx='31.5'%20ry='31.5'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2371c9fc;fill-rule:nonzero;opacity:1'%20transform='translate(502%20877)%20scale(3.4003)'/%3e%3crect%20width='60'%20height='20'%20x='-30'%20y='-10'%20rx='3'%20ry='3'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2337547a;fill-rule:nonzero;opacity:1'%20transform='translate(502%20728)%20scale(3.4003)'/%3e%3ccircle%20r='75'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%2371c9fc;fill-rule:nonzero;opacity:1'%20transform='translate(502%20473)%20scale(3.4003)'/%3e%3crect%20width='129.4'%20height='82.3'%20x='-64.7'%20y='-41.1'%20rx='37'%20ry='37'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23fff;fill-rule:nonzero;opacity:1'%20transform='translate(502%20464)%20scale(3.4003)'/%3e%3crect%20width='108'%20height='68.6'%20x='-54'%20y='-34.3'%20rx='30.9'%20ry='30.9'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23162334;fill-rule:nonzero;opacity:1'%20transform='translate(502%20464)%20scale(3.4003)'/%3e%3ccircle%20r='19.4'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23a478fc;fill-rule:nonzero;opacity:1'%20transform='translate(415%20464)%20scale(3.4003)'/%3e%3ccircle%20r='19.4'%20style='stroke:none;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23a478fc;fill-rule:nonzero;opacity:1'%20transform='translate(591%20464)%20scale(3.4003)'/%3e%3crect%20width='96'%20height='53.2'%20x='-48'%20y='-26.6'%20rx='23.9'%20ry='23.9'%20style='stroke:%23162334;stroke-width:1;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:4;is-custom-font:none;font-file-url:none;fill:%23162334;fill-rule:nonzero;opacity:1'%20transform='translate(503%20875)%20scale(3.4003)'/%3e%3cpath%20stroke-linecap='round'%20d='m68%20215%207-15M81%20222l-7-22M81%20222l7-14M101%20208H87M114%20219l-7-24M113%20219l13-22M131%20214l-5-17M148%20214h-18M69%20214H51M100%20209l7-15'%20style='stroke:%23a478fc;stroke-width:3;stroke-dasharray:none;stroke-linecap:butt;stroke-dashoffset:0;stroke-linejoin:miter;stroke-miterlimit:10;is-custom-font:none;font-file-url:none;fill:none;fill-rule:nonzero;opacity:1'%20transform='translate(165%20150)%20scale(3.4003)'/%3e%3c/g%3e%3c/svg%3e",wr=h.forwardRef((e,t)=>ce.createElement("svg",{viewBox:"0 0 637 637",ref:t,...e},ce.createElement("path",{d:"m478 113-13 2-4 1h4l14-2c10-2 35-2 42-1l6 3 3 1c3 0-4-3-8-5-7-1-34-1-44 1m56 6 8 6c7 5 20 17 20 19s7 12 8 12l-3-6-4-6c0-3-15-17-25-24-5-3-8-4-4-1m-198 16-9 1a512 512 0 0 1 9-1m-180 30a412 412 0 0 0-23 4 167 167 0 0 0-32 8 439 439 0 0 1 46-9 304 304 0 0 1 11-2l6-1h-8m369 8 4 3-7-6c-1 0 0 2 3 3m-439 9c-7 3-18 13-18 15l6-5c5-5 9-8 14-10l6-4-8 4m442 12-10 11-7 6 7-6c7-5 14-14 13-16l-3 5M65 205l-1 11c0 9 0 10 4 17 5 10 7 12 22 11 10 0 15 0 38-5l5-1-6 1-16 2-21 2c-13 1-16-1-21-10-3-5-4-6-4-15l1-12c1-4 1-5-1-1m335 1c3 0 3 1 3 3l-2 6c-2 5-35 39-76 80-53 51-120 117-138 137-21 24-22 25-22 27 0 3 6 9 9 9 4 0 14-8 38-27a5073 5073 0 0 1 15-16 1421 1421 0 0 0-17 15l-31 25-6 2-4-3c-3-3-3-4-2-6 3-8 79-85 160-163 57-57 79-80 79-86 0-2-3-4-7-4-2 0-2 0 1 1m165 18c-9 17-25 32-57 53l-10 8 16-11 12-8c15-10 27-22 39-39 5-7 6-8 4-8l-4 5m-221 2a199 199 0 0 0-19 10 183 183 0 0 1 27-12c0-1-1-1-8 2m-34 16c-3 3-2 3 2 0l1-2-3 2m151 3-1 2 2-2c3-3 2-3-1 0m-16 12-11 10a281 281 0 0 0 11-10m-24 18-7 5-7 5-42 31c-10 7-24 19-22 19l7-6 16-12a343 343 0 0 0 35-25 573 573 0 0 0 20-17m-187 0-2 2 4-2 3-2-5 2m-14 6-3 2 4-1 4-3-5 2m-7 3-8 4-18 8 18-7 7-3 3-1c1-2 0-2-2-1m254 24a2672 2672 0 0 1-71 54 601 601 0 0 0 39-29 1352 1352 0 0 1 32-25m-291-8-2 2 4-2 3-2-5 2m-13 5-2 2h3c5-3 4-4-1-2m-19 9-7 3-13 6c-10 5-13 7-14 10-3 4-2 5 1 0 2-3 5-5 14-9l13-6 12-6-6 2m178 36c-17 12-21 16-21 17a390 390 0 0 1 20-17m-206 34 1 4 1 3 1 5 2 8 1 5v-6l-1-8-2-5-1-4-1-2c-1-2-1-2-1 0m222 23-9 7a683 683 0 0 0-56 44 261 261 0 0 0-26 20 1345 1345 0 0 0-46 34c-6 3-7 3-19 3-11 0-12 0-18-3-8-4-10-8-17-20l-5-10 4 10c5 10 12 18 19 22 4 2 6 2 17 2 13 0 14 0 21-3l26-19 42-33a2183 2183 0 0 0 43-34 643 643 0 0 1 24-20",fill:"#fff",fillRule:"evenodd"}),ce.createElement("path",{d:"M478 114a620 620 0 0 1-39 6l-21 3a5481 5481 0 0 0-19 3 870 870 0 0 1-54 8l-1 1-6 1-12 2-13 2a992 992 0 0 0-76 12 400 400 0 0 1-45 8l-6 1-5 1h-3l-3 1-2 1-26 4-13 2-17 3c-23 5-33 9-43 19-7 8-9 13-9 27 0 8 1 9 4 14 5 9 8 11 21 10l21-2a1133 1133 0 0 1 23-4 659 659 0 0 0 74-14l3-1h3l3-1h3l2-1 2-1h3l2-1h2l24-5 38-7a2100 2100 0 0 1 93-18l3-1 10-1a2082 2082 0 0 1 120-17l2 1c2 0 8 5 8 7l1 2 1 6c0 4 0 6-3 10-2 4-16 16-18 16l-7 5-10 8a1070 1070 0 0 0-11 7 113 113 0 0 1-20 14l-2 2-3 2-2 2h-1a154 154 0 0 1-28 21l-5 4-5 4a573 573 0 0 1-50 37 175 175 0 0 0-24 18l-1 2-2 1-2 1-2 1-1 1-12 10a396 396 0 0 0-32 25l-8 6-6 5-9 7a326 326 0 0 1-25 20l-13 12a5073 5073 0 0 0-17 15c-24 20-34 27-39 27-2 0-8-6-8-9 0-2 1-3 22-27 18-20 85-86 138-137 41-41 74-75 76-80l2-6c0-2 0-3-2-3l-7 1a233 233 0 0 1-26 9l-1 1-1 1h-1l-1 1h-2l-3 2-1 1h-2l-3 2h-1l-5 2-22 10-9 4-4 2-5 2-10 4-2 1-2 1-2 1-13 6a334 334 0 0 1-38 17 75 75 0 0 0-14 6l-5 2-4 1-2 1-3 2-7 3-16 6a247 247 0 0 0-32 14l-1 1h-2l-1 1h-2l-1 1-12 6a103 103 0 0 0-27 15l-2 5-1 1v11l1 5 1 5 1 4c0 3 0 4 2 4v3l1 3 1 2 2 10 1 4 1 5 2 10 2 8 1 4 1 4c3 3 9 25 11 38l1 7v2l1 4v1l1 1v2l1 2 1 3v1l5 10c7 13 9 16 17 20 6 3 7 3 18 3 12 0 13 0 19-3 8-4 11-6 26-18a1345 1345 0 0 1 85-67 683 683 0 0 1 50-39l12-9a513 513 0 0 1 44-33 201 201 0 0 0 22-17 2270 2270 0 0 0 73-54 158 158 0 0 0 58-59c2 0 3-9 4-27l-1-19-1-4-1-6-1-3-4-6-4-6c0-2-6-8-13-14a77 77 0 0 0-28-18c-6-1-34-1-43 1"}))),xr=h.forwardRef((e,t)=>ce.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ce.createElement("path",{d:"M765-321q0 117-84 196-83 80-200 80-118 0-200-80t-83-196v-392q0-85 61-144 61-58 146-58 86 0 147 58 61 59 61 144v374q0 54-39 92-39 37-93 37-55 0-93-37-38-38-38-92v-372h110v372q0 9 6 14t15 5q8 0 15-5t7-14v-374q0-39-29-66t-68-27q-40 0-69 27t-29 66v392q0 71 51 119t122 48q71 0 122-48t51-119v-426h111v426Z"}))),Ra=h.forwardRef((e,t)=>ce.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ce.createElement("path",{d:"M125-165v-113h77v-273q0-93 55-167 56-75 146-100v-19q0-32 22-55 23-23 55-23t55 23q22 23 22 55v19q90 25 146 99 56 73 56 168v273h77v113H125ZM480-32q-38 0-66-27-27-27-27-66h186q0 39-27 66t-66 27Z"}))),ja=h.forwardRef((e,t)=>ce.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ce.createElement("path",{d:"M137-190v-113h78v-253q0-41 11-79 11-39 35-71l-9 150h10L17-802l74-74L873-92l-74 74-175-172H137Zm609-149L319-769q20-15 41-25t44-16v-28q0-32 22-54t54-22q32 0 55 22t22 54v28q85 23 137 94t52 160v217ZM481-47q-38 0-65-27t-27-65h184q0 38-27 65t-65 27Z"}))),qa=h.forwardRef((e,t)=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",ref:t,...e},ce.createElement("g",{strokeLinecap:"round",strokeWidth:10},ce.createElement("path",{d:"m19 19 61 61M80 19 19 80"})))),Ga=h.forwardRef((e,t)=>ce.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ce.createElement("path",{d:"M94-136v-255l351-93-351-92v-253l816 346L94-136Z"}))),Ya=h.forwardRef((e,t)=>ce.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ce.createElement("path",{d:"M480-372q-61 0-105-43-43-43-43-105v-240q0-61 43-105 43-43 105-43 61 0 105 43 43 44 43 105v240q0 62-43 105t-105 43ZM425-76v-122q-121-16-197-108t-76-214h109q0 91 64 154t155 63q91 0 155-63t64-154h109q0 122-77 214T534-198v122H425Z"}))),Wa=h.forwardRef((e,t)=>ce.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ce.createElement("path",{d:"m763-343-80-79q8-20 13-44 5-23 5-54h109q0 49-11 95t-36 82ZM625-482 336-770v-2q3-56 45-96t101-40q62 0 105 43t43 105v249l-1 17q-1 7-4 12ZM427-76v-122q-120-16-196-108-77-92-77-214h109q0 91 64 154t155 63q43 0 80-14 37-15 67-41l78 79q-35 32-78 53t-93 28v122H427Zm362 27L41-796l75-75 748 748-75 74Z"}))),Er=h.forwardRef((e,t)=>ce.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ce.createElement("path",{d:"M625-511q29 0 50-21t20-50q0-29-20-50-21-20-50-20t-50 20-20 50q0 29 20 50 21 21 50 21Zm-290 0q29 0 50-21t20-49q0-30-20-50t-50-21q-29 0-50 20-20 21-20 50 0 30 20 50 21 21 50 21Zm145 268q75 0 137-43t85-115H258q24 72 85 115 62 43 137 43Zm0 198q-90 0-170-34-79-34-138-93T79-310q-34-80-34-170t34-170q34-79 93-138t138-93q80-34 170-34t170 34q79 34 138 93t93 138q34 80 34 170t-34 170q-34 79-93 138T650-79q-80 34-170 34Zm0-435Zm0 322q134 0 228-94t94-228q0-134-94-228t-228-94q-134 0-228 94t-94 228q0 134 94 228t228 94Z"}))),Va=h.forwardRef((e,t)=>ce.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ce.createElement("path",{d:"M553-64v-108q107-27 173-113 67-87 67-197 0-109-67-195T553-789v-108q152 26 249 144 97 117 97 271 0 155-97 273T553-64ZM61-335v-290h176l236-237v764L237-335H61Zm492 28v-346q51 23 82 70t31 103-31 103q-31 47-82 70Z"}))),Xa=h.forwardRef((e,t)=>ce.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ce.createElement("path",{d:"M807-15 700-123q-33 21-71 37-38 15-80 22v-108q20-4 38-12l35-17-153-154v257L234-335H57v-290h144L10-818l74-75L882-90l-75 75Zm37-264-80-79q13-30 19-60 7-31 7-64 0-109-68-195-67-86-173-112v-108q152 26 249 144 98 117 98 271 0 55-14 107-13 51-38 96ZM661-462 549-575v-78q51 23 83 70 31 47 31 103l-1 9-1 9ZM469-655 366-759l103-103v207Z"}))),kr={general:{primaryColor:"#42b0c5",secondaryColor:"#491d8d",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif",showHeader:!0,showFooter:!0,showInputRow:!0,actionDisabledIcon:"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20viewBox='0%200%2042%2042'%3e%3cpath%20style='fill:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke:%23b00000;stroke-opacity:1;stroke-miterlimit:4'%20d='M17%209a8%208%200%200%201-8%208%208%208%200%200%201-8-8%208%208%200%200%201%208-8%208%208%200%200%201%208%208Zm0%200'%20transform='rotate(.086)%20scale(1.77778)'/%3e%3cpath%20style='fill:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke:%23b00000;stroke-opacity:1;stroke-miterlimit:10'%20d='M14.66%2014.66%203.34%203.34'%20transform='rotate(.086)%20scale(1.77778)'/%3e%3c/svg%3e",embedded:!1,flowStartTrigger:"ON_LOAD"},tooltip:{mode:"CLOSE",text:"Talk to me! 😊"},chatButton:{icon:wr},header:{title:k.jsx("div",{style:{cursor:"pointer",margin:0,fontSize:20,fontWeight:"bold"},onClick:()=>window.open("https://github.com/tjtanjin/","_blank","noopener,noreferrer"),children:"Tan Jin"}),showAvatar:!0,avatar:vr,buttons:[ue.NOTIFICATION_BUTTON,ue.AUDIO_BUTTON,ue.CLOSE_CHAT_BUTTON],closeChatIcon:qa},notification:{disabled:!1,defaultToggledOn:!0,volume:.2,icon:Ra,iconDisabled:ja,sound:"data:audio/wav;base64,UklGRmaIAABXQVZFZm10IBAAAAABAAIAQB8AAAB9AAAEABAATElTVBoAAABJTkZPSVNGVA4AAABMYXZmNjAuMTYuMTAwAGRhdGEgiAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////AAAAAAAA//////7/////////AAABAAAAAgABAAEAAQAAAAIAAQABAP//AAD+////AAD+//7////+////AAD//wAA/v8AAAAA/v8AAP//AAAAAAAAAgD////////+////AAABAAEAAgD/////AQABAAAA//8CAP//AAAAAAAA/v8AAAAA//8AAAEA//8EAAAAAAAAAAAA//8BAP//AQABAAEA/////wEA/v///wAAAAACAAAAAAABAAAA//8AAP//AAACAP//////////AAAAAAEAAAAAAAEA//8AAAEAAQADAAIAAgAAAAAA/v///wEAAAAAAAEAAAAAAAEA//8AAAEAAQD//wAA//8AAAEAAAABAAEAAAABAP//AAD//wAAAgAAAP//AQD/////AAAAAP7/AgAAAAIAAAAAAAAAAAABAAAAAQABAP//AAABAP///v8AAP////8AAP//AAD//wAA//8BAP//AAD///7///8BAP7///8AAAIAAgABAAEA/v8AAP//AQADAAEAAAACAAEA/////////v///wEA/v////7/AAD+////AAAAAAAAAgAAAAAAAAD//wEAAAAAAAAAAQABAAIA/v8AAAAA//8AAAEAAAAAAP//AgD//wEA/////wAAAQACAAAAAAAAAP//AQD/////AQAAAAEA/v8AAAEAAQABAAEA///+////AQD//wEAAgD+//7/AAAAAAAAAQAAAAAAAQAAAAAAAAAAAP//AAD//wEAAQD//wAAAQABAP7///8AAP7/AAABAP7/AQABAAEAAAABAAEAAAD+/wIAAAABAAAAAQD/////AQACAP////8AAP//AQD//wEA/v8CAAEAAAAAAAAAAQAAAAIAAQAAAAEAAgD//wEAAAAAAP7///8BAP//AgAAAP///v8CAAAAAgD///////////7/AAACAAEAAgD//wAAAAABAP//AwAAAAMA//8AAAAAAQD+/wAAAAD//wAAAQD//wEA//8BAP7/AAABAAAA//8BAAAA//8AAP//AQADAP3////+////AgD+/////v8BAAEAAQACAAAAAAAAAAAA//8AAP//AAD+/wEA/v8AAP7/AAD//wAAAQACAAAAAQAAAP//AQAAAAAAAAABAAAAAAD+//////8AAAAAAAD//wAAAAABAAEA//8AAAEA//8AAP//AgD+/wAA///+/wAA/v///wAAAQABAAAAAQD//wAA//8AAAEA//8BAAAAAgABAP//AAACAAIAAQABAP//AAAAAAAA//8BAAIAAAABAAAA//8CAAEA/v//////AAAAAAEA////////AQAAAP//AAD//wAAAAAAAP3/AAAAAAEAAAACAAAAAAAAAP//AAD//wAAAAAAAAAAAAAAAP///v///wAAAAABAAAAAAD//wEAAAABAAEAAQD//wAAAAACAAAAAQD+/wAA//8BAAEAAAD+/wAA/////wAAAAABAAAAAAD//////v8AAAAA//8AAAAAAAAAAAIAAAABAAEAAAABAP7/AAD9//////////7///8BAP//AAD///3/AQABAP//AAD//wAAAAABAAAA//8AAP//AAD/////AQABAAEA//8AAAAA//8BAAMA//8AAAAA//8AAP7/AAD//wAAAAAAAP7/AQAAAAAA/v8CAP//AAABAAIAAQABAAAA//8BAAEAAQD///7/AQD//wAAAQABAP//AAD//wEAAAAAAAAAAQAAAAIA//8AAP////8AAP//AQD//////v///wEA/v8AAAIAAgACAAEAAAAAAAEAAAAAAAAAAAAAAAAAAQD//wAA/////wAAAQACAP////8AAAAAAAD//wAAAQD+/wEA//8AAAEAAwD//wEAAQAAAAAAAAABAP////8AAAAAAQAAAAAAAAAAAAEAAQAAAP////////7/AQABAAEAAQD///////8BAAAA//8AAAAAAgABAAEA/v8BAP7///8BAP3/AQABAAIAAAD//wEAAAAAAP//AAABAAIA//8CAAAAAQAAAAEA//8BAAAA/////wAAAAD//wEAAQD//wAAAAAAAP//AAAAAAAAAQABAAAAAQAAAP//AQD//////v8AAAEAAAAAAAAA//8AAAAAAAACAAEAAQAAAP//AAABAAEA/////wAAAgABAAAAAAAAAAEAAAABAP//AQABAP7////+/wEAAAAAAP//AAABAAAAAAABAAEAAAAAAAAA//8BAP///f/+/wEAAQD///7///8AAAAAAQAAAP////8AAAAAAAABAAAAAQD/////AAD//wEA//8AAAIA//8CAAAA//8AAAAAAAD+/wEAAAD+/wAA/////wAA////////AAAAAAAA//8BAAAAAAD//wAAAAD//wEA//8AAP//AQD+/wAAAAAAAP7/AAD+/wEAAQABAP//AAABAAEAAQD//wAA/////wEA//8AAAAAAgAAAAAA//8BAAAAAgAAAAAAAAAAAP7/AQD//wAAAAD+/wAAAAADAAIA/////wAAAQD//wIA//8BAAEA/v8AAAIAAAAAAP3///8AAAAAAAAAAAAAAAABAP///////wAA//8AAAEAAQABAAEAAQABAAAAAQAAAAAAAQABAP7/AQD//wAAAQABAAEA//8BAAAAAgAAAAEAAAABAP//AAD/////AAD//wIA/////wIAAAD///7/AAAAAAAAAAACAP//AAABAP////8AAAAAAAABAAAAAgAAAAAAAQD+/wEA/////wAA/////wAAAAAAAAAA/v//////AAAAAP//AAABAAAAAQAAAAIAAAACAAAA//8AAAAA//8AAP7/AAAAAP//AAACAP//AQABAP//AQABAAAA/////////v8AAP//AQAAAAAA///+/wAAAQD+/wEAAQAAAAEA/////wAAAQD//wAA//8AAAAA/v8BAAEA//8AAP7//v8BAAAAAAAAAAEA//8AAAEA/////wAAAAD//////////wEAAAABAAEA//8CAAEA/f8AAAAA//8BAAAABAABAAEAAQAAAAAAAAAAAP7///8AAAAA/v8BAAAA//8AAAIA//8AAP////8BAP//AAAAAAAAAAD/////AQD///7/////////AQD8////AgABAAIA////////AAD//wAAAAABAAAAAAAAAAEAAgAAAP//AQD//wAAAAAAAP/////+/wAAAAABAAAAAwABAP///////wEAAAADAP//AQACAAAA//8CAAEAAAAAAP///////wIAAAAAAAAAAQAAAAAAAgD//wEAAAABAAAA/v8AAAAAAAAAAAAAAAAAAAEA/v8AAP//AQD//wAA//////7///8AAAAAAAAAAP7/AQD//wAA//8AAAEAAAABAAEAAQD/////AAD//wEAAAD/////AQAAAAEAAAD//wEAAAD/////AgD//wAAAQD//////////wAAAAD//wAAAAABAAAAAAD//wAAAQD///7/AQD//wEAAAD/////AAD//wEA//8AAAEA//8CAAAAAQD//wEAAgAAAAEAAwAAAAAA/v8BAAEAAgD//wEAAAAAAAAAAAD//wEA//8AAAAAAQACAP///////wAAAQABAAEAAAAAAAEAAQD+/wEA/f////////8AAAAA//8AAAEA//8BAAAA/v///wEAAAAAAAEA/////wAAAAAAAP//AAAAAAIAAAABAAAA/////wAAAAD//wAA/v8AAAMAAQD+/wEAAAABAAEA//8BAP//AgAAAAAAAAD//wAA/////wEA/v8CAP3/AAACAP3/AQABAAAAAQACAAEA/v8AAAAA//8BAAAAAgAAAAAAAgACAAEA/v/9/wAAAQABAP7///8AAP//AgD+/////v8CAP////8BAP//AQACAAEAAQABAP//AAD///7/AAABAAEAAgD//wEA//8CAAEAAQABAAEAAAABAAAA/v8AAAEA/v8AAP//AAABAP//AQAAAAEAAgAAAAAA/v///wEAAQAAAAIAAAD/////AgAAAAEA/v8AAP7/AQAAAAAAAQAAAAEAAAACAAEA//8BAP////8AAAIAAAAAAP//AAAAAAIAAAAAAAAAAwABAP///v8BAAAAAAAAAP3/AAABAAEA/v////////////3//v8AAAAAAQABAAIAAAD+/////v8AAAAAAQABAAEAAQAAAP//AAAAAP//AQAAAP//AAABAAAAAAAAAAAA////////AAAAAP//AQD/////AAABAAEA//8CAP7///8AAP7//v8BAAEAAAD+/////////wEAAAAAAAAAAgD//wAAAQAAAP7/AQABAP//AQAAAAAAAAD/////AAACAP////8BAAAAAAD//wAA//8AAAEAAQABAAAAAAABAAAAAQD+/wEA/v8AAAEAAQD/////AAD//wAAAQABAP7//v//////AAACAAAAAAAAAAAAAAACAAAAAQAAAAAA//8BAP//AQD//wAA///+/wIAAQD//wAAAAD//wAA/v8AAP3///8AAAAAAAAAAAAA/f8AAAAA//8CAP7/AAD///7/AAAAAAAAAAD//wEAAAAAAAEAAAAAAAAA//8BAP////8BAP7///8CAAEA//8BAP3///////////8BAAAAAAAAAAEAAgD+//////8BAAMAAQADAAEAAAACAAAAAQD/////AAABAAMAAQAAAP//AQD//wAA//8AAAAA//8CAP7//////wAAAAAAAAIA/v8AAP//AAACAP//AwD//wAA//8AAP//AwD//wEAAQABAAEAAQACAAEAAAD//wAA//8AAAIAAAAAAP///////wAAAQD//wIA//8BAP7/AAD///////8AAAAAAAAAAAEAAAD//wAAAQD//wEA//8BAAAAAAD/////AgABAAIAAAABAAAAAAAAAP//AAAAAAAA//8AAAAAAAD/////AQAAAAAAAQD//wAA///+////AAAAAAEAAgABAAEAAAAAAP//AQAAAAAAAQD+/wAAAAABAAEAAAD/////AQABAP7///8AAAIAAAACAAAA//8AAP//AgACAAAA///+/wAAAAABAAAAAQAAAAEA/v8BAAEA//8CAP//AQD+/////v8AAAAAAAACAP//AAD+/wIA/v8BAAAAAAD/////AAAAAP7///8AAP7//////wEAAAABAAAAAAD//wAAAAAAAAAAAgACAAAAAAABAAAA/f8AAP7/AgAAAAEA//8BAAAAAAD///7/AQD//wAAAAAAAAEAAAAAAAEAAAAAAAAAAQAAAAAA//8AAAAAAAABAP///////wAAAgABAAEA//8AAP//AAACAP//AQABAAEA//8BAAAAAAABAAAA//8AAAEAAAAAAAIA/v8BAP//AQD//wEAAAABAAEAAQACAAEAAAAAAAEAAAABAAAAAAD/////AAABAAEA//8AAAAAAQABAP//AAAAAP//AAD/////AQD//wAAAAABAAEA//8BAAAA//8AAP///f/+/wAA/////wAAAQAAAAIAAAAAAAAAAAD+/wEA/f8CAAAA//8AAAEAAgAAAAMAAAABAAAAAAAAAP//AQAAAAAAAQABAAAAAQAAAP//AAAAAAAA//8AAAAAAAABAAAAAQAAAAAAAAABAAIAAAAAAP7/AQD//wAAAAD+////AAAAAAAAAAABAAAA/////wAA//8AAAAAAAD/////AgD//wAA//8CAP//AQACAAEA/f////////8BAAIAAQABAP//AAD//wAA///+////AAD+/wAAAQD/////AAAAAAAA/////wAAAAABAAAAAQAAAAAA//8AAAIAAAABAP//AQABAAEA//8AAAAAAAADAAEAAAABAP//AgD//wMA//8AAAAAAAD//wAAAAD9/wEA///+/wAA//8BAAEA//8BAAAA//8AAP///v8BAP///////////v8BAAAAAQABAAAAAAAAAAAA//8AAP7/AQAAAAAAAAAAAP7/AQAAAAAAAgABAAEAAAABAAEAAAAAAAAAAAD+/wAAAAD//wEAAAAAAAAAAAAAAP//AgABAAAAAAABAAEAAAD/////AAAAAP//AAABAP////8BAAAAAQABAP7//v/+////AQAAAAAAAQAAAAEAAgAAAAAAAQAAAAEAAAD+/////v8BAP//AAABAP//AQABAAAAAAD//wAA//8CAP//AAAAAAEAAAABAAAAAAAAAP//AAD+////AwAAAAAAAQD//wEAAAACAAEAAAADAAAAAAD/////AAAAAAEAAAABAAAA//8AAAEA//8BAP///v8AAP//AAD//wAAAQABAP//AQAAAAAA/////wEAAQAAAP////8AAAEA//8BAAAAAQAAAP////8AAAAAAQAAAAIAAQAAAAEAAAAAAAEAAAD//wEAAAAAAP////8AAAAA//8BAAEAAAAAAAIA///+/wIA/v8BAAAAAQACAAAAAQAAAP7///8AAP//AAAAAAEAAAAAAP7/AAD+////AAAAAAAAAAD//wAA/v8BAAMAAAABAAIAAgD//wAA//8BAAEA//8BAP7/AAAAAP7///8BAAAAAQAAAP7/AQD/////AAAAAAEAAAABAP//AQABAAAAAgABAAAAAAAAAP///////wEA//8AAAEA//8AAAAAAQAAAAIAAAABAP7//////wAAAQABAAAAAAABAAEA///+/wAA//8BAP///v8AAP///v8BAAAA//8CAAAAAQAAAAEAAQABAAAAAAD+/wAAAAD+/wAAAAAAAAAA/f////////8AAAAAAQABAP///////wEA//8BAAEAAAAAAAAA/////wEA/v//////AAAAAP//AAABAAAAAAD+/wAAAAD9////AQAAAAEAAwD//wEAAQAAAP//AgAAAAAAAAD+/wIAAAAAAAAAAAAAAAIA//8AAAEAAQACAAAAAQD//wAAAAD//wIAAQABAAAAAAD//wEA//8BAAEAAQAAAAAAAQABAP7/AAD//wEAAAACAP7/AQAAAAAAAAD//wIAAQACAAIAAQAAAAAAAAAAAP3///8BAAAAAQACAP//AgD9/wAAAAD//wEA/v////////8AAAAAAAD//wEAAQD//wMAAQAAAAEA//8AAAEA//8AAAAAAAACAAAAAAD//wAAAQD///////8AAAAA//8BAAIA/v8BAAEA/f8AAAAAAAAAAAAAAgD/////AAD+/wAAAAD//wAAAAAAAP//////////AgABAP///v8AAAIAAQAAAP//AAABAAAA/////wAAAAAAAAEAAAABAP///v///wIA//8BAAEAAQAAAAAA///+/wEAAAAAAAAA/////////v8BAP3/AAAAAAAAAAAAAAAA//8AAP//AAAAAP//AAABAAIAAAACAP////8DAAAAAAABAAAAAwABAP//AAABAP//AAAAAP////8BAAAAAgD//wAA///+/wAAAQD//wAA//8AAP7///8AAAAA/v8AAAAAAQD//wEA/v////////8AAAAAAQAAAP//AQACAAAAAAAAAP//AAD//wAAAAD//wAAAAD+/wAAAAAAAP//AQD//wAAAgAAAAAAAQABAAAAAwD+/wAAAAD///7/AQD//wIAAQAAAP//AAD//wAA//8CAAEAAAAAAAAA/////wAAAAD//wEAAQD///////8BAAAA//8BAAEAAAAAAAAA/v///wEAAAAAAAAAAAADAAAAAAAAAAAAAQABAAEAAAD+//7//v8AAP//AQAAAAAAAAABAAEAAgAAAAAAAQD//wAA/f8AAAAAAAABAAAAAQAAAAAAAAAAAAIA//8BAP///////wIA/////wAAAAABAAEA//8BAAAAAAD//wAAAQD//wEAAAAAAAIA/v8BAP//AAAAAAEAAAABAP//AAAAAAAAAQABAP7/AAABAAAAAQD//wIAAAAAAAEA///+/wAA//8AAP//AAAAAAAAAAABAP///////wIAAQAAAAEAAQAAAP7/AQAAAAAAAQAAAAAAAQD/////AQAAAAAA///+//7/AAD+/wEA//8AAAAA///+/wEAAAABAAIAAQABAAAA//8AAP//AAD//wAAAAD//wAAAAAAAP//AQAAAAAA////////AQAAAAAAAQD+////AQABAP7/AAD///7/AgD//wAAAAAAAP//AAAAAAEA//8BAAEAAgAAAAIAAAD//wEA/////wAAAQD///7/AQD//wEAAQD/////AAAAAAEAAgAAAAAAAQD//wEA//8AAP7//////wAA//8BAAEA//8BAAAAAQD/////AAABAP//AAACAP//AQAAAP//AAABAP////8AAAAAAAABAAEAAwABAAAAAgD//wAAAAD//wEAAAABAAAAAAABAAEA/////wAA//8AAAIAAAAAAAEAAQABAAEAAQABAP//AgAAAAAA//8BAP3//v///wAA//8AAAAAAQAAAP//AQD//wEAAAACAAIAAAABAAAA//8BAAEA//8BAP//AAAAAP//AQAAAAIAAAD//wAAAAAAAAEA////////AQAAAP//AQD//wAAAQD+/wEAAAABAP///v///wAAAAAAAP//AAAAAAIAAQD//wAAAgD+/wAAAAD//wAAAAABAP///P//////AAACAP////8AAAIAAAABAAAAAAAAAAAA//8AAAAAAQADAP//AQAAAAAAAAABAAEAAQAAAAAA/v8AAAAAAAD//wAAAQD//wAAAAD//wAA/v////////8CAAEA/v8BAP7/AAAAAAAA//8AAAEAAAD//wIAAQAAAAIAAQAAAAAAAAD///7/AQABAP//AAAAAP//AAACAAEA//8BAAAAAwAAAAAAAAD//wEAAAD//wAA///////////+/wAAAQABAAIAAAABAAEAAAD//wEAAAD/////AAD+/wIAAwABAAEA/v8BAAEAAAD//wAA//8AAP//AAAAAAEAAAAAAP//AAAAAAEAAQABAAEA/v///wAAAAD//wEAAAACAAAA/f/+/wAA/v///wAA//8AAAEAAQD///7/AAAAAAAAAAABAAAAAAACAAAAAAABAAAAAAABAP//AQD//wAA//8BAP7/AgABAAEAAQAAAAAAAQD//wEA/v8AAP////8AAP///////wIAAQD//wAAAAD//wAA/v///wAAAQD//wIA/////wEAAAAAAAIAAAABAAAAAAD//wEA//8AAAAA/////wAAAQAAAAAAAAD//wEAAQAAAAAAAAACAP///////wAAAgD//wAA/v8AAAIAAAAAAAEAAAABAP//AQABAAEAAQAAAP///v8BAAEAAAAAAP////8AAAAAAQD//wIAAQAAAAEAAAAAAAAA//8BAP//AAAAAP7//v///wEAAAAAAAIAAAAAAP//AAD//wEA//8BAAAAAAABAAEAAAABAP7///8AAAIAAAABAP//AAD//wEAAAAAAP//AAAAAAEAAAAAAAAAAAAAAP7/AQD//wAAAQD+/wEA/v8BAP7/AAABAAEAAAACAAIAAAADAAAA//8AAAEAAAABAP//AQD//wIA/////wEA//8AAAEA//8AAAEAAAAAAAAAAQABAAAAAAAAAAAAAAD//////////wAA//8AAP7/AAD+/wAAAQAAAAAA/////wAABAAAAAAA//8AAAEAAAAAAAAA/v8AAP//AAAAAAAAAAD//wAAAAD///////8BAAEAAAD/////AgABAAEA/v/+/wAAAQACAAEAAAD//wAAAwABAP//AgD+/wAA/v8AAAAAAAAAAAEA//8AAAEAAAD+/wEAAAAAAAEAAgAAAAEAAAABAP//AQD+/wIA/////wAAAQD//wAAAQD+/wAAAQABAAAA////////AAACAAAAAQAAAAIA//8BAP///v///wEA//8BAAEAAQD+/wAAAQD9/wAAAQAAAAEAAAABAAAAAgAAAP//AAD+/wAA/f8AAAAA////////AgAAAAcAAQD7/wEA/f8AAAIA//8GAP7//v/+//b/AQD//wQADgD///3/9/8FAPr/6/8EABAACQD9/wIA/P/5/w4A///t/wQA/P8LAB0ACQD5////AQD2/+7/AgD6//r//v/z/xIA9f8oAAMA4f8OANz/EQAdAAAA5P/w/2MAAQDq/w0A1/8bALz/BgDb/+j/lQD9/yMABAACAA0Alf8NAKr/CwCMAPD/QwDq/wkA9v+g/wgAk/8QAD0ABgAWAAQAMwD7/9T/8//f//z/JwAEAOL/DwBxAAwAzf/+/xUA8v+O//H/fAD5/xUA+/9m//P/yf/r/y8ACAAbAEQA3f9AAAcB9f/p/sD/+QHv/8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AIAHQAEAAcAAADr/wEAzv8CANj//f/k/wEA+f/+/xQABwAqAB4ALAD+/x4A8P8SAOb/8//f/9j//f/N/wEA3v8LAO7/AgAMAAQALAAEAC0AAQAdAAQADwABAPP/BADV/wMA0/8AAOH/AQD1/wAAEAADACQAGwAwAAQAHwD0/xUA8f/4/+L/2//7/8z/AwDc/woA6f8AAAQAAwAoAAcANAAAACcAAgAUAAEA+P8CANv/AgDR/wEA4v8BAOz/AgAIAPv/JAAVADMAFAAhAPP/GQDz//7/3P/l/+3/z/8BANf/CgDn/wkA/P///xoABwAwAAIAJwACABcAAwABAAIA4f8BAND/AgDd//3/6P8CAAYA/f8YAAwALwAZACUA9v8bAPj/AwDq/+r/7P/S//7/1/8EAOX/CQD6//7/GQAFAC8AAQApAAEAGQACAAMAAgDm/wEAzv8BANv//v/p/wIA//8BABMABQArACAALAABAB4A8f8NAOv/7v/m/9n/+P/R/wMA4f8OAPT/AQATAAMAKwAHACoAAwAbAAMABQADAO7/AQDU/wEA2f8AAOL////3////EgAAACUAGgAvAAUAHQD2/xIA9f/0//T/3P/4/8///f/h/wIA7f8AAAoAAQApAAQALQADACAAAgAPAP//9P///9r//f/T/wAA3f/9//D/AQAQAP//HAAHAC8ACQAfAPv/GAD+//f/+P/j/wEA0v/+/9n/AADq/wIABgD//x0AAQAuAAEAIwAAABQAAwD8/wEA3/8AAM//AADe////7f8BAAwA//8ZAAMALwAAACEA//8dAP3//v/9/+n////U//z/1v8BAOT/AAD+/wAAGwD+/ywA/v8kAAIAGAD///3////q/wEA0P///97/AADk/wAABAAAABUAAQAqAAEAKQAAABwAAAAFAP//6f8AANr////X/wAA4/8AAPj/AgAUAAAAKgD//ywAAAAcAP7/AQAAAOv/AADU/wAA2v8CAOP/AAABAAAAFgABABsAAAAqAAEAHwAAABQAAgDv/wEA3v///9H////f////7/8BAAoAAQApAAAALgD//yEAAQAIAAAA8P8BANr//v/V////4f8AAPf//v8UAAAAFAAAACYAAQAhAP7/GwD+//T/AADo/wIA1v8CANr/AgDp/wEABgAAAB8AAQAsAAEAJAAAAAwA///z/wEA3/8AANT/AADh/wEA9P///xQAAgASAAAAJQAAACEAAAAaAP//+v8BAOj////W////2P8BAOf///8DAAAAHwAAAC4AAAAlAAAAEgAAAPL/AQDm////0f8CAN3/AADr//7/EQD//xAAAQAhAAIAJQAAAB8AAAABAP//6v8CAN//AQDX/wAA4/8AAPr/AAAXAAAAKgABACgAAAAbAP///f8AAOj/AADU/wAA2v///+f/AQANAAMAEQD+/xwA/v8kAP7/IQABAAgA/v/p////5/8AANf/AQDd/wEA8v8BABMAAQAjAAAALgAAACAAAQADAAEA7f8BANn/AgDY//7/4P/+/wEAAAAXAAIAFAAFACUA/P8jAP//EgAAAO//AQDo////1/8AAN3/AADx//7/DgAAAB0AAQAoAAAAIwAAAAoAAQDv/wMA4f8AANn/AQDi/wEA+v///xgAAAAQAP3/IwD//yUA/v8XAAAA7/8AAOv/AADc/wAA3P/+/+v/AQALAAEAGgACACkAAAAkAP7/EAABAO/////q//7/1/8AANz/AgDw/wEAEgD//w8AAAAcAAIAJQAAAB0AAAD2////7P8AAOP/AgDa/wAA5P8BAAQAAQAWAAAAIgAAACMAAAAaAP//+P///+v/AQDZ/wAA2////+7/AAARAAAADgAAABYAAAAhAAAAIAABAPz/AQDt/wAA5P8AANr/AQDg/wEA/P8BABcAAAAhAP//KQD//xwAAAD8/wEA7v8AAN3////Z/wAA6f8BAA0AAAARAAEAEQAAACMAAAAgAAEA/f8CAO3/AADv/wAA3v8BANv////1////EgAAABkA//8nAAAAIgAAAAMAAADu/wAA6P8CANn/AQDg////BQD//xMAAQAOAP//IAABACYAAAAGAAAA6f////H/AADg/wEA2f8AAO3///8PAAAAFQACACQAAAAkAAEADQABAO//AADp/wAA2////9z/AQD7/wEAFgAAAAwAAQAXAP7/JQD9/xMAAADx/wAA8f8AAOr/AADc/wEA4/8BAAkAAAAVAAAAIQD//yYA//8UAAEA9P8BAOz/AADf/wAA3P8AAPP/AAAQAAAADQABAA0AAAAlAAEAGAD///H//v/0/wEA7v8CAN//AADg//3/BAACABUAAQAfAAAAJwABABgAAQD0//7/7f///+L/AADa/wIA8P///w4A//8SAAMACQAAACAAAQAgAP//+v////P////y/wEA4/8BANr/AQD9/wAAEwD//xkAAQAjAAAAIgABAPz////s/wAA6v8BANX/AQDr//7/BwABABMAAAAHAP//FwAAACYAAAD//wEA9P8BAPb/AQDu////2v8BAPn/AAATAP//FwD//yEAAAAjAAAAAgAAAOn/AQDr//7/2P8CAOT/AAABAP//FgABAAUAAQATAP//IwAAAAEAAgDy/wEA9/8AAPb/AADb/wAA6/8BABAAAAATAP7/IQAAACYA//8UAP//7/8AAPD/AADd/wEA3P/+//7///8OAAAACgAAAAgAAAAhAP//CQACAPT/AQD2/wAA9v///97////m/wIADgABABMAAQAfAP//JwAAABMAAADw/wAA8P///+r/AQDb/wAA9f8AAA8AAAARAAIABAD//wYA/v8HAAAAAQD//wMAAgAGAAAA7f8AAOz/AAALAP//DwACABQA//8bAAAAHgD///f/AADq/wEA6/8BANj//v/t/wAACAD+/xAAAgAEAAAABAABAAcAAQADAAAA//8AAAUA///1/wAA5f///wIAAAAOAAAAEAAAABsAAAAhAAAA/v8BAOj////y////3f8AAOf/AQAGAAEADAAAAAcA//8BAP//CQABAAMA//8BAP//BQAAAAAAAADo/wAA+/8AAAoAAAALAAAAFAAAACAAAQAGAAIA7f8BAPH/AADm/wMA3P8CAP7/AgASAP//CgD//wAAAAAIAP//BQD//wEAAAACAP7/BAAAAPz/AwD8////BAAAAAEA//8HAAAAHQAAAAgA/v/x//7/8f///+f/AQDg/////P///woAAAAMAP//AAABAAYA//8EAAAAAgAAAAUAAAACAAAAAwAAAAIAAAABAAAAAQABAAAAAgAcAP//DgD///T/AQDx/wAA9P8CAOH/AAD3/wAACQAAAAoAAQABAP//AwAAAAcAAAD+/wAAAgACAAEAAAD+////AwD+/wAAAAABAP//+v8BABEAAQATAAAA9f/+//L//f/z/wIA6f8AAPb/AQAFAP//DAAAAAAAAAAFAP//BQD//wEA//8DAAEAAQAAAP7///8AAAAA//8BAAIAAAD+/wAAEAABABYAAgD6/wEA8v8BAPX/AwDp/wAA8////wMA//8JAAEABAABAAEA//8FAAEA//8AAAMAAQACAP//AQAAAAEAAgAFAP//AQABAAAAAQAAAP//EQABAAAAAAD5/wEA+P8AAPr////6/wAA+/8BAAIA//8BAAAA//8CAAUA//8BAP7/AAABAAEAAgAAAAAAAwAAAAEA/v8DAAIAAAACAAQA//8TAAAA/P8BAPr////3//////8AAPz/AQD7/wEAAgD/////AAABAAEABAAAAP//////////AAAAAAAAAAADAAAAAwAAAAAA//8EAP///v/+/xAA//8HAAAA+/////j/AQD8////AAD///n///8AAAAA//8AAP////8DAP//AgAAAAAAAAACAAIAAAD+/wAAAQD//wAA/////wIAAgD9////CQACAAYA///9////+f8BAPr/AQAAAAIA/v///wAA//8AAAAAAAAAAAEAAAABAAAAAgAAAAEAAAAAAAEAAQABAAAAAgABAP//AAD//wEAAAD///////8BAAIAAQAAAAAA/v/+//////8BAAAAAQABAP//AAD///////8BAAAAAQABAP////8CAAEAAQD//wEA/v//////AQAAAAAAAAAAAAAAAAD9/wMA/////wAAAQD+/wEA/v/+//7/AQD//wMAAAAAAAAAAAABAAEA//////7/AAACAP3/AAD//wAAAQAAAP//AQD//wAAAAAAAAEA//8CAP//AAAAAAAA/v8AAAAA//8BAP//AAABAP//AAAAAP//AQD//wAAAQABAAAAAAABAAEA/v///wAAAAD//////////wAAAAAAAP//AAD////////8/wIAAAADAAEA/////wEA/v8BAP7/AgAAAAEAAgAAAP//AgD/////AQD//wEA//////7/AQD//wMAAAAAAAAA//8CAP//AQAAAP//AAACAAAAAAABAP//AQD+/wAA/////wAA/f///wAAAAAAAP7/AAAAAAAAAgD//wEAAQACAP//AAAAAAEAAQD//wAAAAAAAAAA//8BAAMA/v8AAP7/AQAAAAAAAQAAAAAA///+//7/AAAAAAAA//8BAP7/AQAAAP//AQABAAAAAQAAAP//AAD//wIA/v///wAAAQABAP//AAD//wEA//8BAP//AgAAAP///////wAAAQABAP//AwABAAAAAAAAAAAA/////wIAAwACAAAA/v8BAAAAAAAAAAAA//8AAP////8AAAAA/////wAA/////wEA/v8CAAEAAQD//wAAAAABAAAAAAD//wEAAQABAAAA//8CAAAAAAAAAP7/AAABAAAAAQABAAAAAgABAAAAAQD//wEAAwD+/wAA/v8AAAEAAAAAAAAAAAAAAAEAAAD//wMA/v///wAAAAACAAEAAAAAAP7///8DAAEAAQD//wEA/f8BAAEAAQD//wEAAQABAAMAAgAAAAEA//8AAP//BAAAAAIA/v//////AQABAAAAAAD//wEAAAACAAIAAQAAAAAAAgAAAAAAAAABAAIAAAABAAIAAQAAAP////8AAAAAAAD//wAAAQACAP//AAAAAAAAAQAAAAEA//8AAAAAAAD/////AQD//wAAAQD9////AQAAAAAA//8BAAAA///+/////v8BAAAAAQAAAAAAAAAAAAIA//8BAAAAAAACAP//AQD//wAAAAD/////AAD9/wAAAAACAAAAAgAAAAEAAQABAAEAAAAAAAEA//8AAAEAAQACAAAAAQAAAAEA//8BAAIAAAACAP//AAABAAAAAAAAAAAAAAD//wAAAQD/////AAAAAP////8AAAEAAAAAAP7///8BAAIAAQD//wEAAQAAAP//AgAAAAAAAAD//wAA//8CAP7/AQAAAP7/AAD+////AAAAAAAAAQABAAAA//8AAAEAAAABAP7/AAAAAP7/AAD+/wAAAQABAAEA/////////v8BAP///v///wIAAAAAAAAAAQAAAAIAAQAAAAAAAAABAAEAAAAAAAAAAAD//wEAAQD//wAAAQABAAAA/v/+/////////wAAAAD//wAAAAD/////AAAAAP7/AAD//wIA//8CAP//AQAAAP////8AAAAAAQABAP////8AAP//AQACAAAAAQAAAAAAAAAAAAAA//8BAAAAAAD+/wAA/v///wEAAAD+//7///8CAP7/AAABAP3/AwAAAAAAAAABAAIAAAABAAAAAQABAAIAAAAAAP//AAAAAAEAAAACAAEAAAACAAAAAAABAAAAAwAAAAAAAAD+/wAAAQD9//////8BAAAA/v8AAAAAAAAAAAAAAAD//wMA/v8BAAEAAQACAAAA/v8BAP//AwABAAIAAQABAP//AQAAAAEAAAAAAAEA//8AAAAAAAD/////AAABAAEAAAAAAP////8AAAAAAAAAAAAA/v8AAP//AQAAAP//AAABAAIAAQAAAAAAAgABAAAA/////wAAAQABAP//AQABAAEA/////wAAAAAAAAAAAAABAAEAAQAAAAAAAAAAAAAA//8AAP7/AQD9/wAAAgD//wEAAQABAAEA/v8AAAEA/////wAAAAAAAP//AAABAAAAAAAAAAAA//8CAP//AAABAAEAAQABAAAA//8BAAIAAgD//wAA/v8AAAEAAAD///7/AAAAAAEAAAABAAAAAQABAAAAAQACAAAA///+/wAAAQABAP7////+/wAA//8AAAAAAgAAAP//AQD9/wAAAAD//wAA//8AAAAAAQAAAAAAAQD//wAAAAAAAP//AQABAAAA/v8CAP//AAD///////8AAAAAAAACAAEA//8BAP7/AAAAAAEA//8BAAAAAQD//wAAAQD+/wAA/////wAAAAD//wAAAQABAAAA//8AAAEA/////wAA//8AAAAA/v/+/wEAAgABAP//AgD//wIA/////wAA//8AAAEAAQAAAAAAAQAAAAMAAAACAP//",showCount:!0},audio:{disabled:!0,defaultToggledOn:!1,language:"en-US",voiceNames:["Microsoft David - English (United States)","Alex (English - United States)"],rate:1,volume:1,icon:Va,iconDisabled:Xa},chatHistory:{disabled:!1,maxEntries:30,storageKey:"rcb-history",storageType:"LOCAL_STORAGE",viewChatHistoryButtonText:"Load Chat History ⟳",chatHistoryLineBreakText:"----- Previous Chat History -----",autoLoad:!1},chatInput:{disabled:!1,allowNewline:!1,enabledPlaceholderText:"Type your message...",disabledPlaceholderText:"",showCharacterCount:!1,characterLimit:-1,botDelay:1e3,sendButtonIcon:Ga,blockSpam:!0,sendOptionOutput:!0,sendCheckboxOutput:!0,buttons:[ue.VOICE_MESSAGE_BUTTON,ue.SEND_MESSAGE_BUTTON]},chatWindow:{showScrollbar:!1,showTypingIndicator:!0,autoJumpToBottom:!1,showMessagePrompt:!0,messagePromptText:"New Messages ↓",messagePromptOffset:30,defaultOpen:!1},sensitiveInput:{maskInTextArea:!0,maskInUserBubble:!0,asterisksCount:10,hideInUserBubble:!1},userBubble:{animate:!0,showAvatar:!1,avatar:"data:image/svg+xml,%3csvg%20width='140'%20height='140'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cy='60.044'%20cx='70'%20fill='%235c5c5c'%20r='29'/%3e%3cpath%20d='m16.36%20156.186-.01-30.5c-.005-16.844%2024.168-30.507%2053.991-30.516%2029.823-.009%2054.004%2013.64%2054.01%2030.484l.008%2030.5-108%20.032z'%20fill='%235c5c5c'/%3e%3c/svg%3e",simulateStream:!1,streamSpeed:30},botBubble:{animate:!0,showAvatar:!1,avatar:vr,simulateStream:!1,streamSpeed:30},voice:{disabled:!0,defaultToggledOn:!1,language:"en-US",timeoutPeriod:1e4,autoSendDisabled:!1,autoSendPeriod:1e3,sendAsAudio:!1,icon:Ya,iconDisabled:Wa},footer:{text:k.jsxs("div",{style:{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",columnGap:3},onClick:()=>window.open("https://react-chatbotify.com","_blank","noopener,noreferrer"),children:[k.jsx("span",{children:"Powered By "},0),k.jsx("div",{style:{borderRadius:"50%",width:14,height:14,display:"flex",justifyContent:"center",alignItems:"center",background:"linear-gradient(to right, #42b0c5, #491d8d)"},children:k.jsx(wr,{style:{width:"80%",height:"80%",fill:"#fff"}})},1),k.jsx("span",{style:{fontWeight:"bold"},children:" React ChatBotify"},2)]}),buttons:[ue.FILE_ATTACHMENT_BUTTON,ue.EMOJI_PICKER_BUTTON]},fileAttachment:{disabled:!1,multiple:!0,accept:".png",icon:xr,iconDisabled:xr,sendFileName:!0,showMediaDisplay:!1},emoji:{disabled:!1,icon:Er,iconDisabled:Er,list:["😀","😃","😄","😅","😊","😌","😇","🙃","🤣","😍","🥰","🥳","🎉","🎈","🚀","⭐️"]},toast:{maxCount:3,forbidOnMax:!1,dismissOnClick:!0},event:{rcbPreInjectMessage:!1,rcbPostInjectMessage:!1,rcbStartSimulateStreamMessage:!1,rcbStopSimulateStreamMessage:!1,rcbStartStreamMessage:!1,rcbChunkStreamMessage:!1,rcbStopStreamMessage:!1,rcbRemoveMessage:!1,rcbSaveChatHistory:!1,rcbLoadChatHistory:!1,rcbToggleChatWindow:!1,rcbStartSpeakAudio:!1,rcbToggleAudio:!1,rcbToggleNotifications:!1,rcbToggleVoice:!1,rcbChangePath:!1,rcbShowToast:!1,rcbDismissToast:!1,rcbUserSubmitText:!1,rcbUserUploadFile:!1,rcbTextAreaChangeValue:!1,rcbPreLoadChatBot:!1,rcbPostLoadChatBot:!1,rcbPreProcessBlock:!1,rcbPostProcessBlock:!1},ariaLabel:{chatButton:"open chat",audioButton:"toggle audio",closeChatButton:"close chat",emojiButton:"emoji picker",fileAttachmentButton:"upload file",notificationButton:"toggle notifications",sendButton:"send message",voiceButton:"toggle voice",inputTextArea:"input text area"},device:{desktopEnabled:!0,mobileEnabled:!0,applyMobileOptimizations:!0}},Cr=h.createContext({settings:{},setSyncedSettings:()=>null,syncedSettingsRef:{current:{}}}),ee=()=>h.useContext(Cr),Ka=({children:e,settings:t=kr,setSyncedSettings:r,syncedSettingsRef:n})=>k.jsx(Cr.Provider,{value:{settings:t,setSyncedSettings:r,syncedSettingsRef:n},children:e}),Pr={tooltipStyle:{},notificationBadgeStyle:{},chatWindowStyle:{},headerStyle:{},bodyStyle:{},chatInputContainerStyle:{},chatInputAreaStyle:{},chatInputAreaFocusedStyle:{},chatInputAreaDisabledStyle:{},userBubbleStyle:{},botBubbleStyle:{},botOptionStyle:{},botOptionHoveredStyle:{},botCheckboxRowStyle:{},botCheckboxNextStyle:{},botCheckMarkStyle:{},botCheckMarkSelectedStyle:{},characterLimitStyle:{},characterLimitReachedStyle:{},chatHistoryLineBreakStyle:{},chatMessagePromptStyle:{},chatMessagePromptHoveredStyle:{},footerStyle:{},loadingSpinnerStyle:{},mediaDisplayContainerStyle:{},chatButtonStyle:{},chatButtonHoveredStyle:{},chatHistoryButtonStyle:{},chatHistoryButtonHoveredStyle:{},sendButtonStyle:{},sendButtonHoveredStyle:{},sendButtonDisabledStyle:{},audioButtonStyle:{},audioButtonDisabledStyle:{},closeChatButtonStyle:{},emojiButtonStyle:{},emojiButtonDisabledStyle:{},fileAttachmentButtonStyle:{},fileAttachmentButtonDisabledStyle:{},notificationButtonStyle:{},notificationButtonDisabledStyle:{},voiceButtonStyle:{},voiceButtonDisabledStyle:{},chatIconStyle:{},audioIconStyle:{},audioIconDisabledStyle:{},closeChatIconStyle:{},emojiIconStyle:{},emojiIconDisabledStyle:{},fileAttachmentIconStyle:{},fileAttachmentIconDisabledStyle:{},notificationIconStyle:{},notificationIconDisabledStyle:{},voiceIconStyle:{},voiceIconDisabledStyle:{},sendIconStyle:{},sendIconDisabledStyle:{},sendIconHoveredStyle:{},rcbTypingIndicatorContainerStyle:{},rcbTypingIndicatorDotStyle:{},toastPromptContainerStyle:{},toastPromptStyle:{},toastPromptHoveredStyle:{}},Sr=h.createContext({styles:{},setSyncedStyles:()=>null,syncedStylesRef:{current:{}}}),ie=()=>h.useContext(Sr),Ja=({children:e,styles:t=Pr,setSyncedStyles:r,syncedStylesRef:n})=>k.jsx(Sr.Provider,{value:{styles:t,setSyncedStyles:r,syncedStylesRef:n},children:e}),Za=({buttons:e})=>{var t,r,n,o,a,A,s;const{settings:i}=ee(),{styles:c}=ie(),l={backgroundImage:`linear-gradient(to right, ${(t=i.general)==null?void 0:t.secondaryColor},
|
|
2
|
+
${(r=i.general)==null?void 0:r.primaryColor})`,...c.headerStyle};return k.jsxs("div",{style:l,className:"rcb-chat-header-container",children:[k.jsxs("div",{className:"rcb-chat-header",children:[((n=i.header)==null?void 0:n.showAvatar)&&k.jsx("div",{style:{backgroundImage:`url("${(o=i.header)==null?void 0:o.avatar}")`},className:"rcb-bot-avatar"}),h.isValidElement((a=i.header)==null?void 0:a.title)?(A=i.header)==null?void 0:A.title:k.jsx("div",{style:{margin:0,fontSize:20,fontWeight:"bold"},children:(s=i.header)==null?void 0:s.title})]}),k.jsx("div",{className:"rcb-chat-header",children:e==null?void 0:e.map((d,u)=>k.jsx(h.Fragment,{children:d},u))})]})},Dr=h.createContext({}),pe=()=>h.useContext(Dr),$a=({children:e,botIdRef:t,flowRef:r})=>{const n=h.useRef(null),o=h.useRef(""),a=h.useRef(null),A=h.useRef(new Map),s=h.useRef(null),i=h.useRef(""),c=h.useRef(!1),l=h.useRef(null),d=h.useRef(null),u=h.useRef(null);return k.jsx(Dr.Provider,{value:{botIdRef:t,flowRef:r,inputRef:n,timeoutIdRef:a,streamMessageMap:A,chatBodyRef:s,paramsInputRef:i,keepVoiceOnRef:c,audioContextRef:l,audioBufferRef:d,gainNodeRef:u,prevInputRef:o},children:e})},Se=e=>{const[t,r]=h.useState(e),n=h.useRef(e);return[t,o=>{const a=typeof o=="function"?o(n.current):o;n.current=a,r(a)},n]},Br=h.createContext({}),he=()=>h.useContext(Br),ei=({children:e,settings:t})=>{var r,n,o,a,A,s;const[i,c,l]=Se(!1),[d,u,p]=Se(((r=t==null?void 0:t.chatWindow)==null?void 0:r.defaultOpen)??!1),[f,y,g]=Se(((n=t==null?void 0:t.audio)==null?void 0:n.defaultToggledOn)??!1),[v,x,m]=Se(((o=t==null?void 0:t.voice)==null?void 0:o.defaultToggledOn)??!1),[E,P,C]=Se(((a=t==null?void 0:t.notification)==null?void 0:a.defaultToggledOn)??!0),[S,I]=h.useState(!1),[Q,B]=h.useState(!1),[O,D,M]=Se(!1),[U,L,F]=Se(!0),[_,H,b]=Se(!1),[X,w]=h.useState(!1),[K,R]=h.useState(!1),[z,q]=h.useState(0),[Z,J]=h.useState(0),[ae,re]=h.useState(!1),[le,we]=h.useState(((A=window.visualViewport)==null?void 0:A.height)??window.innerHeight),[Ye,ut]=h.useState(((s=window.visualViewport)==null?void 0:s.width)??window.innerWidth);return k.jsx(Br.Provider,{value:{isBotTyping:i,setSyncedIsBotTyping:c,syncedIsBotTypingRef:l,isChatWindowOpen:d,setSyncedIsChatWindowOpen:u,syncedIsChatWindowOpenRef:p,audioToggledOn:f,setSyncedAudioToggledOn:y,syncedAudioToggledOnRef:g,voiceToggledOn:v,setSyncedVoiceToggledOn:x,syncedVoiceToggledOnRef:m,notificationsToggledOn:E,setSyncedNotificationsToggledOn:P,syncedNotificationsToggledOnRef:C,isLoadingChatHistory:S,setIsLoadingChatHistory:I,hasChatHistoryLoaded:Q,setHasChatHistoryLoaded:B,isScrolling:O,setSyncedIsScrolling:D,syncedIsScrollingRef:M,textAreaDisabled:U,setSyncedTextAreaDisabled:L,syncedTextAreaDisabledRef:F,textAreaSensitiveMode:_,setSyncedTextAreaSensitiveMode:H,syncedTextAreaSensitiveModeRef:b,hasInteractedPage:X,setHasInteractedPage:w,hasFlowStarted:K,setHasFlowStarted:R,unreadCount:z,setUnreadCount:q,inputLength:Z,setInputLength:J,blockAllowsAttachment:ae,setBlockAllowsAttachment:re,viewportHeight:le,setViewportHeight:we,viewportWidth:Ye,setViewportWidth:ut},children:e})};var j=(e=>(e.START_SPEAK_AUDIO="rcb-start-speak-audio",e.TOGGLE_AUDIO="rcb-toggle-audio",e.TOGGLE_NOTIFICATIONS="rcb-toggle-notifications",e.TOGGLE_VOICE="rcb-toggle-voice",e.TOGGLE_CHAT_WINDOW="rcb-toggle-chat-window",e.PRE_INJECT_MESSAGE="rcb-pre-inject-message",e.POST_INJECT_MESSAGE="rcb-post-inject-message",e.START_SIMULATE_STREAM_MESSAGE="rcb-start-simulate-stream-message",e.STOP_SIMULATE_STREAM_MESSAGE="rcb-stop-simulate-stream-message",e.START_STREAM_MESSAGE="rcb-start-stream-message",e.CHUNK_STREAM_MESSAGE="rcb-chunk-stream-message",e.STOP_STREAM_MESSAGE="rcb-stop-stream-message",e.REMOVE_MESSAGE="rcb-remove-message",e.SAVE_CHAT_HISTORY="rcb-save-chat-history",e.LOAD_CHAT_HISTORY="rcb-load-chat-history",e.CHANGE_PATH="rcb-change-path",e.SHOW_TOAST="rcb-show-toast",e.DISMISS_TOAST="rcb-dismiss-toast",e.USER_SUBMIT_TEXT="rcb-user-submit-text",e.USER_UPLOAD_FILE="rcb-user-upload-file",e.TEXT_AREA_CHANGE_VALUE="rcb-text-area-change-value",e.PRE_LOAD_CHATBOT="rcb-pre-load-chatbot",e.POST_LOAD_CHATBOT="rcb-post-load-chatbot",e.PRE_PROCESS_BLOCK="rcb-pre-process-block",e.POST_PROCESS_BLOCK="rcb-post-process-block",e))(j||{});const ti={[j.START_SPEAK_AUDIO]:!0,[j.TOGGLE_AUDIO]:!0,[j.TOGGLE_VOICE]:!0,[j.TOGGLE_NOTIFICATIONS]:!0,[j.TOGGLE_CHAT_WINDOW]:!0,[j.PRE_INJECT_MESSAGE]:!0,[j.POST_INJECT_MESSAGE]:!1,[j.PRE_LOAD_CHATBOT]:!0,[j.POST_LOAD_CHATBOT]:!1,[j.START_SIMULATE_STREAM_MESSAGE]:!0,[j.STOP_SIMULATE_STREAM_MESSAGE]:!1,[j.START_STREAM_MESSAGE]:!0,[j.CHUNK_STREAM_MESSAGE]:!0,[j.STOP_STREAM_MESSAGE]:!0,[j.REMOVE_MESSAGE]:!0,[j.SAVE_CHAT_HISTORY]:!0,[j.LOAD_CHAT_HISTORY]:!0,[j.CHANGE_PATH]:!0,[j.SHOW_TOAST]:!0,[j.DISMISS_TOAST]:!0,[j.USER_SUBMIT_TEXT]:!0,[j.USER_UPLOAD_FILE]:!0,[j.TEXT_AREA_CHANGE_VALUE]:!0,[j.PRE_PROCESS_BLOCK]:!0,[j.POST_PROCESS_BLOCK]:!0},hn=async(e,t,r)=>{const n=new CustomEvent(e,{detail:t,cancelable:ti[e]});return n.data=r,n.promises=[],window.dispatchEvent(n),await Promise.all(n.promises),n},Ir=h.createContext({paths:[],setSyncedPaths:()=>{},syncedPathsRef:{current:[]}}),kt=()=>h.useContext(Ir),ni=({children:e})=>{const[t,r,n]=Se([]);return k.jsx(Ir.Provider,{value:{paths:t,setSyncedPaths:r,syncedPathsRef:n},children:e})},Le=()=>{const{botIdRef:e}=pe(),{syncedPathsRef:t}=kt(),r=h.useCallback(()=>t.current.length>0?t.current.at(-1)??null:null,[]),n=h.useCallback(()=>t.current.length>1?t.current.at(-2)??null:null,[]);return{dispatchRcbEvent:h.useCallback(async(o,a)=>{const A={botId:e.current,currPath:r(),prevPath:n()};return await hn(o,A,a)},[e])}},De=()=>{const{settings:e}=ee(),{isChatWindowOpen:t,setSyncedIsChatWindowOpen:r,viewportHeight:n,setViewportHeight:o,viewportWidth:a,setViewportWidth:A,setUnreadCount:s,setSyncedIsBotTyping:i,setSyncedIsScrolling:c,syncedIsBotTypingRef:l,syncedIsChatWindowOpenRef:d}=he(),{chatBodyRef:u}=pe(),{dispatchRcbEvent:p}=Le(),f=h.useCallback(()=>{if(!u.current)return!1;const m=u.current.getBoundingClientRect(),E=window.innerHeight??document.documentElement.clientHeight,P=window.innerWidth??document.documentElement.clientWidth;return m.top>=0&&m.left>=0&&m.bottom<=E&&m.right<=P},[u]),y=h.useCallback(async m=>{var E;m!==d.current&&((E=e.event)!=null&&E.rcbToggleChatWindow&&(await p(j.TOGGLE_CHAT_WINDOW,{currState:d.current,newState:!d.current})).defaultPrevented||r(P=>(P||s(0),!P)))},[d]),g=h.useCallback(async m=>{m!==l.current&&i(E=>!E)},[l]),v=h.useCallback((m,E,P,C)=>(m/=C/2)<1?P/2*m*m+E:-P/2*(--m*(m-2)-1)+E,[]),x=h.useCallback((m=0)=>{if(!u.current)return;const E=u.current.scrollHeight-u.current.clientHeight;if(m<=0)return u.current.scrollTop=E,void c(!1);const P=u.current.scrollTop,C=E-P;let S=0;const I=()=>{if(!u.current)return;S+=20;const Q=v(S,P,C,m);u.current.scrollTop=Q,S<m?requestAnimationFrame(I):c(!1)};I()},[u]);return{isChatWindowOpen:t,setSyncedIsChatWindowOpen:r,toggleChatWindow:y,viewportHeight:n,setViewportHeight:o,viewportWidth:a,setViewportWidth:A,toggleIsBotTyping:g,scrollToBottom:x,getIsChatBotVisible:f}},ri=()=>{var e,t,r;const{settings:n}=ee(),{styles:o}=ie(),{unreadCount:a,isScrolling:A}=he(),{chatBodyRef:s}=pe(),{scrollToBottom:i}=De(),[c,l]=h.useState(!1),d={color:(e=n.general)==null?void 0:e.primaryColor,borderColor:(t=n.general)==null?void 0:t.primaryColor,...o.chatMessagePromptHoveredStyle};return k.jsx("div",{className:"rcb-message-prompt-container "+(s.current&&((u=n.chatWindow)!=null&&u.showMessagePrompt)&&A&&a>0?"visible":"hidden"),children:k.jsx("div",{onMouseEnter:()=>{l(!0)},onMouseLeave:()=>{l(!1)},style:c?d:{...o.chatMessagePromptStyle},onMouseDown:p=>{p.preventDefault(),i(600)},className:"rcb-message-prompt-text",children:(r=n.chatWindow)==null?void 0:r.messagePromptText})});var u},Tr=h.createContext({messages:[],setSyncedMessages:()=>{},syncedMessagesRef:{current:[]}}),gn=()=>h.useContext(Tr),oi=({children:e})=>{const[t,r,n]=Se([]);return k.jsx(Tr.Provider,{value:{messages:t,setSyncedMessages:r,syncedMessagesRef:n},children:e})},ai=({message:e,isNewSender:t})=>{var r,n,o,a,A,s;const{settings:i}=ee(),{styles:c}=ie(),l=typeof e.content=="string",d=e.content,u=e.contentWrapper?k.jsx(e.contentWrapper,{children:d}):d,p={backgroundColor:(r=i.general)==null?void 0:r.primaryColor,color:"#fff",maxWidth:(n=i.userBubble)!=null&&n.showAvatar?"65%":"70%",...c.userBubbleStyle},f=(o=i.userBubble)!=null&&o.animate?"rcb-user-message-entry":"",y=((a=i.userBubble)==null?void 0:a.showAvatar)&&t,g="rcb-user-message"+(!t&&(A=i.userBubble)!=null&&A.showAvatar?" rcb-user-message-offset":"");return k.jsxs("div",{className:"rcb-user-message-container",children:[l?k.jsx("div",{style:p,className:`${g} ${f}`,children:u}):k.jsx(k.Fragment,{children:u}),y&&k.jsx("div",{style:{backgroundImage:`url("${(s=i.userBubble)==null?void 0:s.avatar}")`},className:"rcb-message-user-avatar"})]})},ii=({message:e,isNewSender:t})=>{var r,n,o,a,A,s;const{settings:i}=ee(),{styles:c}=ie(),l=typeof e.content=="string",d=e.content,u=e.contentWrapper?k.jsx(e.contentWrapper,{children:d}):d,p={backgroundColor:(r=i.general)==null?void 0:r.secondaryColor,color:"#fff",maxWidth:(n=i.botBubble)!=null&&n.showAvatar?"65%":"70%",...c.botBubbleStyle},f=(o=i.botBubble)!=null&&o.animate?"rcb-bot-message-entry":"",y=((a=i.botBubble)==null?void 0:a.showAvatar)&&t,g="rcb-bot-message"+(!t&&(A=i.botBubble)!=null&&A.showAvatar?" rcb-bot-message-offset":"");return k.jsxs("div",{className:"rcb-bot-message-container",children:[y&&k.jsx("div",{style:{backgroundImage:`url("${(s=i.botBubble)==null?void 0:s.avatar}")`},className:"rcb-message-bot-avatar"}),l?k.jsx("div",{style:p,className:`${g} ${f}`,children:u}):k.jsx(k.Fragment,{children:u})]})},si=()=>{var e,t,r;const{settings:n}=ee(),{styles:o}=ie(),a=(e=n.botBubble)!=null&&e.animate?"rcb-bot-message-entry":"";return k.jsxs("div",{className:"rcb-bot-message-container",children:[((t=n.botBubble)==null?void 0:t.showAvatar)&&k.jsx("div",{style:{backgroundImage:`url("${(r=n.botBubble)==null?void 0:r.avatar}")`},className:"rcb-message-bot-avatar"}),k.jsx("div",{onMouseDown:A=>{A.preventDefault()},className:`rcb-bot-message ${a}`,children:k.jsxs("div",{className:"rcb-typing-indicator",style:{...o==null?void 0:o.rcbTypingIndicatorContainerStyle},children:[k.jsx("span",{className:"rcb-dot",style:{...o==null?void 0:o.rcbTypingIndicatorDotStyle}}),k.jsx("span",{className:"rcb-dot",style:{...o==null?void 0:o.rcbTypingIndicatorDotStyle}}),k.jsx("span",{className:"rcb-dot",style:{...o==null?void 0:o.rcbTypingIndicatorDotStyle}})]})})]})},Ai=()=>{var e,t,r;const{settings:n}=ee(),{styles:o}=ie(),{messages:a}=gn(),{scrollToBottom:A}=De(),{isBotTyping:s,syncedIsScrollingRef:i}=he(),{chatBodyRef:c}=pe(),l={...o==null?void 0:o.bodyStyle,scrollbarWidth:(e=n.chatWindow)!=null&&e.showScrollbar?"auto":"none"};return h.useEffect(()=>{i.current||A()},[(t=c.current)==null?void 0:t.scrollHeight]),k.jsxs("div",{style:l,className:"rcb-chat-body-container",ref:c,children:[a.map((d,u)=>{const p=(f=>f===0||a[f].sender!==a[f-1].sender)(u);return d.sender.toUpperCase()==="USER"?k.jsx(ai,{message:d,isNewSender:p},u):d.sender.toUpperCase()==="BOT"?k.jsx(ii,{message:d,isNewSender:p},u):k.jsx("div",{children:d.content},u)}),s&&((r=n.chatWindow)==null?void 0:r.showTypingIndicator)&&k.jsx(si,{}),k.jsx(ri,{})]})},li=({checkboxes:e,checkedItems:t,path:r})=>{var n,o,a,A,s,i,c,l,d,u,p;const{settings:f}=ee(),{styles:y}=ie(),{paths:g}=kt(),{handleSubmitText:v}=ft(),[x,m]=h.useState(new Set),[E,P]=h.useState(!1),C={cursor:E?`url("${(n=f.general)==null?void 0:n.actionDisabledIcon}"), auto`:"pointer",color:(o=f.general)==null?void 0:o.primaryColor,borderColor:(a=f.general)==null?void 0:a.primaryColor,...y.botCheckboxRowStyle},S={cursor:E||x.size<e.min?`url("${(A=f.general)==null?void 0:A.actionDisabledIcon}"), auto`:"pointer",color:(s=f.general)==null?void 0:s.primaryColor,borderColor:(i=f.general)==null?void 0:i.primaryColor,...y.botCheckboxNextStyle},I={cursor:E?`url("${(c=f.general)==null?void 0:c.actionDisabledIcon}"), auto`:"pointer",color:"transparent",...y.botCheckMarkStyle},Q={cursor:E?`url("${(l=f.general)==null?void 0:l.actionDisabledIcon}"), auto`:"pointer",color:"#fff",borderColor:(d=f.general)==null?void 0:d.primaryColor,backgroundColor:(u=f.general)==null?void 0:u.primaryColor,...y.botCheckMarkSelectedStyle};return h.useEffect(()=>{g.length>0&&g[g.length-1]!==r&&P(!e.reusable)},[g]),k.jsxs("div",{className:"rcb-checkbox-container "+((p=f.botBubble)!=null&&p.showAvatar?"rcb-checkbox-offset":""),children:[e.items.map(B=>k.jsx("div",{onMouseDown:O=>{O.preventDefault(),(D=>{E||m(M=>{const U=new Set(M);if(U.has(D))t.delete(D),U.delete(D);else{if(x.size==e.max)return M;t.add(D),U.add(D)}return U})})(B)},style:C,className:"rcb-checkbox-row-container",children:k.jsxs("div",{className:"rcb-checkbox-row",children:[k.jsx("div",{style:x.has(B)?Q:I,className:"rcb-checkbox-mark"}),k.jsx("div",{className:"rcb-checkbox-label",children:B})]})},B)),k.jsx("div",{style:S,className:"rcb-checkbox-next-button",onMouseDown:B=>{var O;if(B.preventDefault(),E||x.size<e.min)return;const D=Array.from(t).join(", ");let M;P(!e.reusable),M=e.sendOutput!=null?e.sendOutput:((O=f.chatInput)==null?void 0:O.sendCheckboxOutput)??!0,v(D,M)}})]})},ci=async(e,t)=>{const r=e.checkboxes;if(!r)return;let n;if(typeof r=="function"?(n=r(t),n instanceof Promise&&(n=await n)):n=r,Array.isArray(n)&&(n={items:n}),!("items"in n)||n.items.length==0)return;n.min==null&&(n.min=1),n.max==null&&(n.max=n.items.length),n.min>n.max&&(n.min=n.max),n.reusable==null&&(n.reusable=!1);const o=new Set,a=t.currPath,A=k.jsx(li,{checkboxes:n,checkedItems:o,path:a});await t.injectMessage(A)},ui=async(e,t)=>{const r=e.function;if(!r)return;const n=r(t);return n instanceof Promise?await n:n},di=async(e,t,r)=>{const n=e.message;if(!n)return;if(typeof n=="string")return void(n.trim()!==""&&(r?await t.simulateStreamMessage(n):await t.injectMessage(n)));let o=n(t);o instanceof Promise&&(o=await o),typeof o=="string"&&o.trim()!==""&&(r?await t.simulateStreamMessage(o):await t.injectMessage(o))},pi=({options:e,path:t})=>{var r,n,o,a,A,s;const{settings:i}=ee(),{styles:c}=ie(),{paths:l}=kt(),{handleSubmitText:d}=ft(),[u,p]=h.useState([]),[f,y]=h.useState(!1),g={cursor:f?`url("${(r=i.general)==null?void 0:r.actionDisabledIcon}"), auto`:"pointer",color:(n=i.general)==null?void 0:n.primaryColor,borderColor:(o=i.general)==null?void 0:o.primaryColor,backgroundColor:"#fff",...c.botOptionStyle},v={color:"#fff",borderColor:(a=i.general)==null?void 0:a.primaryColor,backgroundColor:(A=i.general)==null?void 0:A.primaryColor,...c.botOptionHoveredStyle};return h.useEffect(()=>{l.length>0&&l[l.length-1]!==t&&y(!e.reusable)},[l]),k.jsx("div",{className:"rcb-options-container "+((s=i.botBubble)!=null&&s.showAvatar?"rcb-options-offset":""),children:e.items.map((x,m)=>{const E=u[m]&&!f;return k.jsx("div",{className:"rcb-options",style:E?v:g,onMouseEnter:()=>(P=>{p(C=>{const S=[...C];return S[P]=!0,S})})(m),onMouseLeave:()=>(P=>{p(C=>{const S=[...C];return S[P]=!1,S})})(m),onMouseDown:P=>{var C;if(P.preventDefault(),f)return;let S;y(!e.reusable),S=e.sendOutput!=null?e.sendOutput:((C=i.chatInput)==null?void 0:C.sendOptionOutput)??!0,d(x,S)},children:x},x)})})},fi=async(e,t)=>{const r=e.options;if(!r)return;let n;if(typeof r=="function"?(n=r(t),n instanceof Promise&&(n=await n)):n=r,Array.isArray(n)&&(n={items:n}),!("items"in n)||n.items.length==0)return;n.reusable==null&&(n.reusable=!1);const o=t.currPath,a=k.jsx(pi,{options:n,path:o});await t.injectMessage(a)},hi=async(e,t)=>{const r=e.component;if(r){if(typeof r=="function"){let n=r(t);return n instanceof Promise&&(n=await n),n?void await t.injectMessage(n):void 0}await t.injectMessage(r)}},gi=async(e,t,r,n)=>{const o=e.transition;let a;if(typeof o=="function"?(a=o(t),a instanceof Promise&&(a=await a)):a=o,typeof a=="number"&&(a={duration:a}),!a||a instanceof Promise||a.duration==null||typeof a.duration!="number")return;a.interruptable==null&&(a.interruptable=!1);const A=setTimeout(async()=>{const s=await n(e);s&&await Mr(s,t)},a.duration);a.interruptable&&(r.current=A)},mi=async(e,t,r)=>{const n=e.chatDisabled;if(n==null)return;let o;typeof n=="function"?(o=n(t),o instanceof Promise&&(o=await o)):o=n,r(o)},Qr=async(e,t,r)=>{const n=e.isSensitive;if(!n)return void r(!1);let o;typeof n=="function"?(o=n(t),o instanceof Promise&&(o=await o)):o=n,r(o)},Mr=async(e,t)=>{if(!e)throw new Error("Block is not valid.");const r=Object.keys(e);for(const n of r)n==="function"&&await ui(e,t);r.includes("path")&&await(async(n,o)=>{const a=n.path;if(!a)return!1;if(typeof a=="string")return await o.goToPath(a),!0;let A=a(o);if(A instanceof Promise&&(A=await A),!A)return!1;const s=A;return await o.goToPath(s),!0})(e,t)},yi=()=>{var e;const{settings:t}=ee(),{styles:r}=ie();return k.jsx("div",{className:"rcb-line-break-container",children:k.jsx("div",{style:{...r.chatHistoryLineBreakStyle},className:"rcb-line-break-text","data-testid":"chat-history-line-break-text",children:(e=t.chatHistory)==null?void 0:e.chatHistoryLineBreakText})})},bi=()=>{var e;const{settings:t}=ee(),{styles:r}=ie(),n={borderTop:`4px solid ${(e=t.general)==null?void 0:e.primaryColor}`,...r.loadingSpinnerStyle};return k.jsx("div",{className:"rcb-spinner-container",children:k.jsx("div",{style:n,className:"rcb-spinner"})})},Ft=()=>{try{if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();throw new Error("crypto.randomUUID not available")}catch(e){if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function")return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const r=crypto.getRandomValues(new Uint8Array(1))[0]%16;return(t==="x"?r:3&r|8).toString(16)});throw console.error(e),new Error("crypto.getRandomValues is also not available")}},Ze=(e,t)=>({id:Ft(),content:e,sender:t,type:typeof e=="string"?"string":"object",timestamp:new Date().toUTCString(),tags:[]});let $e,Or=!1,zt="rcb-history",Rt=30,_r=!1,jt=[];const Ct=()=>jt,mn=e=>{Lr(e),jt=e},Lr=e=>{$e&&$e.setItem(zt,JSON.stringify(e))},yn=e=>{var t,r,n,o,a;$e=((r=(t=e.chatHistory)==null?void 0:t.storageType)==null?void 0:r.toUpperCase())==="SESSION_STORAGE"?sessionStorage:localStorage,zt=(n=e.chatHistory)==null?void 0:n.storageKey,Rt=(o=e.chatHistory)==null?void 0:o.maxEntries,_r=(a=e.chatHistory)==null?void 0:a.disabled,jt=(A=>{if(A!=null)try{return JSON.parse(A)}catch{return[]}return[]})($e.getItem(zt))},vi=e=>h.isValidElement(e.content)?structuredClone({id:e.id,content:Fa.renderToString(e.content),type:e.type,sender:e.sender.toUpperCase(),timestamp:e.timestamp,tags:e.tags}):e,Nr=(e,t,r)=>{const n=new DOMParser().parseFromString(e,"text/html");return Array.from(n.body.childNodes).map((o,a)=>{var A;if(o.nodeType===Node.TEXT_NODE)return o.textContent;{const s=o.tagName.toLowerCase();let i=Array.from(o.attributes).reduce((c,l)=>{const d=l.name.toLowerCase();if(d==="style"){const u=l.value.split(";").filter(f=>f.trim()!==""),p={};u.forEach(f=>{const[y,g]=f.split(":").map(x=>x.trim()),v=y.replace(/-([a-z])/g,(x,m)=>m.toUpperCase());p[v]=g}),c[d]=p}else s!=="audio"&&s!=="video"||d!=="controls"||l.value!==""?c[d]=l.value:c[d]="true";return c},{});if(Object.prototype.hasOwnProperty.call(i,"class")){const c=o.classList;i.className=c.toString(),delete i.class,(A=t.botBubble)!=null&&A.showAvatar&&(i=wi(c,i)),i=xi(c,i,t,r),i=Ei(c,i,t,r),i=ki(c,i,t,r),i=Ci(c,i,t,r)}if(["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr"].includes(s))return h.createElement(s,{key:a,...i});{const c=Nr(o.innerHTML,t,r);return h.createElement(s,{key:a,...i},...c)}}})},wi=(e,t)=>((e.contains("rcb-options-container")||e.contains("rcb-checkbox-container"))&&(t.className=`${e.toString()} rcb-options-offset`),t),xi=(e,t,r,n)=>{var o,a,A,s,i;return e.contains("rcb-options")&&(t.style={...t.style,color:((o=n.botOptionStyle)==null?void 0:o.color)??((a=r.general)==null?void 0:a.primaryColor),borderColor:((A=n.botOptionStyle)==null?void 0:A.color)??((s=r.general)==null?void 0:s.primaryColor),cursor:`url("${(i=r.general)==null?void 0:i.actionDisabledIcon}"), auto`,...n.botOptionStyle}),t},Ei=(e,t,r,n)=>{var o,a,A,s,i;return e.contains("rcb-checkbox-row-container")&&(t.style={...t.style,color:((o=n.botCheckboxRowStyle)==null?void 0:o.color)??((a=r.general)==null?void 0:a.primaryColor),borderColor:((A=n.botCheckboxRowStyle)==null?void 0:A.color)??((s=r.general)==null?void 0:s.primaryColor),cursor:`url("${(i=r.general)==null?void 0:i.actionDisabledIcon}"), auto`,...n.botCheckboxRowStyle}),t},ki=(e,t,r,n)=>{var o,a,A,s,i;return e.contains("rcb-checkbox-next-button")&&(t.style={...t.style,color:((o=n.botCheckboxNextStyle)==null?void 0:o.color)??((a=r.general)==null?void 0:a.primaryColor),borderColor:((A=n.botCheckboxNextStyle)==null?void 0:A.color)??((s=r.general)==null?void 0:s.primaryColor),cursor:`url("${(i=r.general)==null?void 0:i.actionDisabledIcon}"), auto`,...n.botCheckboxNextStyle}),t},Ci=(e,t,r,n)=>{var o,a;return(e.contains("rcb-media-display-image-container")||e.contains("rcb-media-display-video-container"))&&(t.style={...t.style,backgroundColor:(o=r.general)==null?void 0:o.primaryColor,maxWidth:(a=r.userBubble)!=null&&a.showAvatar?"65%":"70%",...n.mediaDisplayContainerStyle}),t},bn=()=>{const{settings:e}=ee(),{notificationsToggledOn:t,setSyncedNotificationsToggledOn:r,hasInteractedPage:n,unreadCount:o,setUnreadCount:a,syncedNotificationsToggledOnRef:A}=he(),{audioBufferRef:s,audioContextRef:i,gainNodeRef:c}=pe(),{dispatchRcbEvent:l}=Le(),d=h.useCallback(async()=>{var p,f;const y=(p=e.notification)==null?void 0:p.sound;i.current=new AudioContext;const g=i.current.createGain();let v;if(g.gain.value=((f=e.notification)==null?void 0:f.volume)??.2,c.current=g,y!=null&&y.startsWith("data:audio")){const x=atob(y.split(",")[1]),m=new ArrayBuffer(x.length),E=new Uint8Array(m);for(let P=0;P<x.length;P++)E[P]=x.charCodeAt(P);v=m}else v=await(await fetch(y)).arrayBuffer();s.current=await i.current.decodeAudioData(v)},[e.notification]),u=h.useCallback(()=>{var p;if((p=e.notification)!=null&&p.disabled||!A.current||!n||!i.current||!s.current)return;const f=i.current.createBufferSource();f.buffer=s.current,f.connect(c.current).connect(i.current.destination),f.start()},[e.notification,A,n,i,s,c]);return{unreadCount:o,setUnreadCount:a,notificationsToggledOn:t,toggleNotifications:h.useCallback(async p=>{var f;p!==A.current&&((f=e.event)!=null&&f.rcbToggleNotifications&&(await l(j.TOGGLE_NOTIFICATIONS,{currState:A.current,newState:!A.current})).defaultPrevented||r(y=>!y))},[A]),playNotificationSound:u,setUpNotifications:d}},Pi=(e,t)=>{var r,n,o,a;((A,s,i,c,l)=>{if(!window.SpeechSynthesisUtterance)return void console.info("Speech Synthesis API is not supported in this environment.");const d=new window.SpeechSynthesisUtterance;d.text=A,d.lang=s,d.rate=c,d.volume=l;let u=!1;for(const p of i){const f=window.speechSynthesis.getVoices().find(y=>y.name===p);if(f){d.voice=f,window.speechSynthesis.speak(d),u=!0;break}}u||window.speechSynthesis.speak(d)})(t,(r=e.audio)==null?void 0:r.language,(n=e.audio)==null?void 0:n.voiceNames,(o=e.audio)==null?void 0:o.rate,(a=e.audio)==null?void 0:a.volume)},Hr=()=>{const{settings:e}=ee(),{audioToggledOn:t,setSyncedAudioToggledOn:r,syncedAudioToggledOnRef:n}=he(),{dispatchRcbEvent:o}=Le(),a=h.useCallback(async s=>{var i;s!==n.current&&((i=e.event)!=null&&i.rcbToggleAudio&&(await o(j.TOGGLE_AUDIO,{currState:n.current,newState:!n.current})).defaultPrevented||r(c=>!c))},[n]),A=h.useCallback(async s=>{var i,c;if((i=e.audio)!=null&&i.disabled||!n.current)return;let l=s;if((c=e.event)!=null&&c.rcbStartSpeakAudio){const d=await o(j.START_SPEAK_AUDIO,{textToRead:l});if(d.defaultPrevented)return;l=d.data.textToRead}Pi(e,l)},[e,n]);return{audioToggledOn:t,speakAudio:A,toggleAudio:a}},at=()=>{var e,t,r;const{settings:n}=ee(),{messages:o,setSyncedMessages:a,syncedMessagesRef:A}=gn(),{setSyncedIsBotTyping:s,setUnreadCount:i,syncedIsScrollingRef:c,syncedIsChatWindowOpenRef:l}=he(),{streamMessageMap:d,chatBodyRef:u,paramsInputRef:p}=pe(),{scrollToBottom:f,getIsChatBotVisible:y}=De(),{dispatchRcbEvent:g}=Le(),{speakAudio:v}=Hr(),{playNotificationSound:x}=bn(),m=h.useCallback(async D=>{var M,U;if((M=n.event)!=null&&M.rcbSaveChatHistory){const L=await g(j.SAVE_CHAT_HISTORY,{messages:D});if(L.defaultPrevented)return;D=((U=L.data)==null?void 0:U.messages)??D}await(async L=>{if(_r||!$e)return;const F=[];for(let H=L.length-1;H>=0;H--){const b=L[H];if(b.sender.toUpperCase()!=="SYSTEM"&&(b.content!==""&&F.unshift(b),F.length===Rt))break}let _=F.map(vi);if(!Or&&_.length<Rt){const H=Rt-_.length;_=[...jt.slice(-H),..._]}Lr(_)})(D)},[g,(e=n.event)==null?void 0:e.rcbSaveChatHistory]),E=h.useCallback((D,M=!1)=>{var U,L;m(D);let F=!0;const _=D[D.length-1];if(!_)return;const H=_.sender.toUpperCase();H==="USER"&&(F=!1),(U=n.general)!=null&&U.embedded&&y()&&(F=!1),(l.current&&!c.current||M)&&(F=!1),F&&x(),!M&&(H!=="USER"&&(L=n.chatWindow)!=null&&L.autoJumpToBottom||H==="USER"||!c.current)&&setTimeout(()=>f(),1)},[n,u,l,c,x,f,y]),P=h.useCallback(async(D,M="BOT",U=null)=>{var L,F,_,H,b;if(typeof D!="string")throw new Error("Content must be of type string to simulate stream.");M=M.toUpperCase();let X=Ze(D,M);if((L=n.event)!=null&&L.rcbStartSimulateStreamMessage){const J=await g(j.START_SIMULATE_STREAM_MESSAGE,{message:X});if(J.defaultPrevented)return null;U=J.data.simulateStreamChunker||U,X=J.data.message}s(!1);let w=30;w=M==="BOT"?(F=n.botBubble)==null?void 0:F.streamSpeed:(_=n.userBubble)==null?void 0:_.streamSpeed;const K={...X,content:""};a(J=>[...J,K]),E(A.current);let R=X.content;U&&(R=U(R));let z=0;const q=R.length;X.sender.toUpperCase()==="BOT"&&(l.current||(H=n.general)!=null&&H.embedded)&&typeof X.content=="string"&&X.content.trim()!==""&&v(X.content);const Z=new Promise(J=>{const ae=setInterval(()=>{if(z>=q)return clearInterval(ae),void J();a(re=>{const le=[...re];for(let we=le.length-1;we>=0;we--)if(le[we].id===K.id){const Ye=R[z];Ye&&(K.content+=Ye,le[we]=K),z++;break}return le})},w)});return(c.current||!l.current)&&i(J=>J+1),await Z,m(A.current),(b=n.event)!=null&&b.rcbStopSimulateStreamMessage&&await g(j.STOP_SIMULATE_STREAM_MESSAGE,{message:X}),M==="USER"&&(p.current=D),X},[n,g,E,A,p,s,i,l,v]),C=h.useCallback(async(D,M="BOT")=>{var U,L,F;M=M.toUpperCase();let _=Ze(D,M);if((U=n.event)!=null&&U.rcbPreInjectMessage){const H=await g(j.PRE_INJECT_MESSAGE,{message:_});if(H.defaultPrevented)return null;_=H.data.message}return _.sender.toUpperCase()==="BOT"&&(l.current||(L=n.general)!=null&&L.embedded)&&typeof _.content=="string"&&_.content.trim()!==""&&v(_.content),(c.current||!l.current)&&i(H=>H+1),(F=n.event)!=null&&F.rcbPostInjectMessage&&await g(j.POST_INJECT_MESSAGE,{message:_}),a(H=>[...H,_]),E(A.current),M==="USER"&&typeof D=="string"&&(p.current=D),_},[n,g,E,p,A,l,v,i]),S=h.useCallback(async D=>{var M;let U=A.current.find(_=>_.id===D),L=null,F=!1;return U||(L=Ct(),U=L.find(_=>_.id===D),U&&(F=!0)),!U||(M=n.event)!=null&&M.rcbRemoveMessage&&(await g(j.REMOVE_MESSAGE,{message:U})).defaultPrevented?null:F?(L&&mn(L.filter(_=>_.id!==D)),U):(a(_=>_.filter(H=>H.id!==D)),E(A.current),i(_=>Math.max(_-1,0)),U)},[g,(t=n.event)==null?void 0:t.rcbRemoveMessage,E,A,i,Ct,mn]),I=h.useCallback(async(D,M="BOT")=>{var U,L;if(M=M.toUpperCase(),!d.current.has(M)){const _=Ze(D,M);return(U=n.event)!=null&&U.rcbStartStreamMessage&&(await g(j.START_STREAM_MESSAGE,{message:_})).defaultPrevented?null:(s(!1),a(H=>[...H,_]),E(A.current),d.current.set(M,_.id),(c.current||!l.current)&&i(H=>H+1),_)}const F={...Ze(D,M),id:d.current.get(M)};return(L=n.event)!=null&&L.rcbChunkStreamMessage&&(await g(j.CHUNK_STREAM_MESSAGE,{message:F})).defaultPrevented?null:(a(_=>_.map(H=>H.id===F.id?F:H)),E(A.current,!0),F)},[g,n.event,E,A,s,i,d]),Q=h.useCallback(async(D="BOT")=>{var M;if(D=D.toUpperCase(),!d.current.has(D))return!0;const U=d.current.get(D);let L;for(let F=0;F<3;F++){const _=A.current.find(H=>H.id===U);_&&(L=_),await new Promise(H=>setTimeout(H,20))}return((M=n.event)==null||!M.rcbStopStreamMessage||!(await g(j.STOP_STREAM_MESSAGE,{message:L})).defaultPrevented)&&(d.current.delete(D),m(A.current),D==="USER"&&typeof(L==null?void 0:L.content)=="string"&&(p.current=L.content),!0)},[g,(r=n.event)==null?void 0:r.rcbStopStreamMessage,d,p]),B=h.useCallback(D=>{const M=typeof D=="function"?D(A.current):D;a(M),E(M)},[E,A]),O=h.useCallback((D,M,U=0)=>{var L;const F=A.current,_=D?D.toUpperCase():null,H=[];let b=U;for(let X=F.length-1;X>=0;X--){const w=F[X];if(!_||((L=w==null?void 0:w.sender)==null?void 0:L.toUpperCase())===_){if(b>0){b--;continue}if(H.push(w),M!==void 0&&H.length===M)break}}return H.length>0?H:null},[A]);return{simulateStreamMessage:P,injectMessage:C,removeMessage:S,streamMessage:I,endStreamMessage:Q,replaceMessages:B,getMessages:O,messages:o}};let vn,Ue,qt,et=!1,Fe=null;const wn=()=>{if(!vn){const e=window.SpeechRecognition||window.webkitSpeechRecognition;vn=e!=null?new e:null}return vn},Si=(e,t,r,n,o,a)=>{var A,s,i;const c=wn();if(!c)return;if(!et)try{et=!0,c.lang=(A=e.voice)==null?void 0:A.language,c.start()}catch{}const l=(s=e.voice)==null?void 0:s.timeoutPeriod,d=(i=e.voice)==null?void 0:i.autoSendPeriod;c.onresult=u=>{var p,f;clearTimeout(Ue),Ue=null,clearTimeout(qt);const y=u.results[u.results.length-1][0].transcript;if(a.current){const g=(p=e.chatInput)==null?void 0:p.characterLimit,v=a.current.value+y;g!=null&&g>=0&&v.length>g?n(v.slice(0,g)):n(v),o(a.current.value.length)}l&&(Ue=setTimeout(async()=>await En(t,a),l)),(f=e.voice)!=null&&f.autoSendDisabled||(qt=setTimeout(r,d))},c.onend=()=>{et?(c.start(),!Ue&&l&&(Ue=setTimeout(async()=>await En(t,a),l))):(clearTimeout(Ue),Ue=null,clearTimeout(qt))},l&&(Ue=setTimeout(async()=>await En(t,a),l))},Di=(e,t)=>{navigator.mediaDevices.getUserMedia({audio:!0}).then(r=>{if(Fe=new MediaRecorder(r),!et)try{et=!0,Fe.start()}catch{}Fe.ondataavailable=n=>{t.current&&t.current.push(n.data)},Fe.onstop=()=>{e(),r.getTracks().forEach(n=>n.stop())}}).catch(r=>{console.error("Unable to use microphone:",r)})},xn=()=>{const e=wn();e&&(et=!1,e&&e.stop(),Fe&&Fe.state!=="inactive"&&(Fe.stop(),Fe=null),clearTimeout(Ue),Ue=null,clearTimeout(qt))},En=async(e,t)=>{var r;(r=t.current)!=null&&r.disabled||await e(),xn()},kn=()=>{const{settings:e}=ee(),{voiceToggledOn:t,setSyncedVoiceToggledOn:r,syncedVoiceToggledOnRef:n}=he(),{dispatchRcbEvent:o}=Le(),a=h.useCallback(async s=>{var i;s!==n.current&&((i=e.event)!=null&&i.rcbToggleVoice&&(await o(j.TOGGLE_VOICE,{currState:n.current,newState:!n.current})).defaultPrevented||r(c=>!c))},[n]),A=h.useCallback(s=>{((i,c)=>{var l,d,u;const p=wn();(l=c.voice)!=null&&l.disabled||(d=c.chatInput)==null||!d.blockSpam||!p||(i&&!et?(et=!0,(u=c.voice)!=null&&u.sendAsAudio?Fe==null||Fe.start():p.start()):i||xn())})(s,e)},[e]);return{voiceToggledOn:t,toggleVoice:a,syncVoice:A}},it=()=>{var e;const{settings:t}=ee(),{inputLength:r,setInputLength:n,textAreaDisabled:o,setSyncedTextAreaDisabled:a,textAreaSensitiveMode:A,setSyncedTextAreaSensitiveMode:s,syncedTextAreaDisabledRef:i,syncedTextAreaSensitiveModeRef:c}=he(),{inputRef:l,chatBodyRef:d,prevInputRef:u}=pe(),{dispatchRcbEvent:p}=Le(),{getIsChatBotVisible:f}=De(),y=h.useCallback(async C=>{var S,I,Q;if(i.current&&l.current)l.current.value="";else if(l.current&&u.current!==null){const B=(S=t.chatInput)==null?void 0:S.characterLimit,O=(I=t.chatInput)!=null&&I.allowNewline?C:C.replace(/\n/g," ");if(B!=null&&B>=0&&O.length>B?l.current.value=O.slice(0,B):l.current.value=O,(Q=t.event)!=null&&Q.rcbTextAreaChangeValue&&(await p(j.TEXT_AREA_CHANGE_VALUE,{currValue:l.current.value,prevValue:u.current})).defaultPrevented)return void(l.current.value=u.current);u.current=l.current.value}},[i,l,u,t,p]),g=h.useCallback(C=>{var S;(S=l.current)!=null&&S.disabled||setTimeout(()=>{var I,Q,B;(I=t.general)!=null&&I.embedded?f()&&((Q=l.current)==null||Q.focus()):C!=="start"&&((B=l.current)==null||B.focus())},100)},[l,(e=t.general)==null?void 0:e.embedded,d,f]),v=h.useCallback(()=>{l.current&&l.current.focus()},[]),x=h.useCallback(()=>{l.current&&l.current.blur()},[]),m=h.useCallback(()=>l&&l.current?l.current.value:"",[]),E=h.useCallback(C=>{C!==i.current&&a(S=>!S)},[i]),P=h.useCallback(C=>{C!==c.current&&s(S=>!S)},[c]);return{textAreaDisabled:o,setSyncedTextAreaDisabled:a,textAreaSensitiveMode:A,setSyncedTextAreaSensitiveMode:s,inputLength:r,setInputLength:n,getTextAreaValue:m,setTextAreaValue:y,updateTextAreaFocus:g,focusTextArea:v,blurTextArea:x,toggleTextAreaDisabled:E,toggleTextAreaSensitiveMode:P}},Ur=h.createContext({toasts:[],setSyncedToasts:()=>{},syncedToastsRef:{current:[]}}),Fr=()=>h.useContext(Ur),Bi=({children:e})=>{const[t,r,n]=Se([]);return k.jsx(Ur.Provider,{value:{toasts:t,setSyncedToasts:r,syncedToastsRef:n},children:e})},pt=()=>{const{settings:e}=ee(),{toasts:t,setSyncedToasts:r,syncedToastsRef:n}=Fr(),{dispatchRcbEvent:o}=Le(),a=h.useCallback(async(i,c)=>{var l,d,u,p;let f=null;if(n.current.length>=(((l=e.toast)==null?void 0:l.maxCount)??3)){if((d=e.toast)!=null&&d.forbidOnMax)return null;f=Ft();let g={id:f,content:i,timeout:c};if((u=e.event)!=null&&u.rcbShowToast){const v=await o(j.SHOW_TOAST,{toast:g});if(v.defaultPrevented)return null;g=v.data.toast}return r(v=>[...v.slice(1),g]),f}f=Ft();let y={id:f,content:i,timeout:c};if((p=e.event)!=null&&p.rcbShowToast){const g=await o(j.SHOW_TOAST,{toast:y});if(g.defaultPrevented)return null;y=g.data.toast}return r(g=>[...g,y]),f},[e,o]),A=h.useCallback(async i=>{var c;const l=n.current.find(d=>d.id===i);return!l||(c=e.event)!=null&&c.rcbDismissToast&&(await o(j.DISMISS_TOAST,{toast:l})).defaultPrevented?null:(r(d=>d.filter(u=>u.id!==i)),i)},[o]),s=h.useCallback(i=>{const c=typeof i=="function"?i(n.current):i;r(c)},[n]);return{showToast:a,dismissToast:A,toasts:t,replaceToasts:s}},Gt=()=>{var e,t,r,n,o;const{settings:a}=ee(),{paths:A,setSyncedPaths:s,syncedPathsRef:i}=kt(),{flowRef:c,streamMessageMap:l,paramsInputRef:d,keepVoiceOnRef:u,timeoutIdRef:p}=pe(),{setSyncedIsBotTyping:f,setSyncedTextAreaDisabled:y,setSyncedTextAreaSensitiveMode:g,blockAllowsAttachment:v,setBlockAllowsAttachment:x}=he(),{dispatchRcbEvent:m}=Le(),{endStreamMessage:E,injectMessage:P,removeMessage:C,simulateStreamMessage:S,streamMessage:I}=at(),{showToast:Q,dismissToast:B}=pt(),{toggleChatWindow:O}=De(),{updateTextAreaFocus:D,setTextAreaValue:M}=it(),{syncVoice:U}=kn(),L=h.useCallback(async w=>{var K;if((K=a.event)!=null&&K.rcbPostProcessBlock){const R=await m(j.POST_PROCESS_BLOCK,{block:w});if(R.defaultPrevented)return null;w=R.data.block}return w},[(e=a.event)==null?void 0:e.rcbPostProcessBlock,m]),F=h.useCallback(async(w,K)=>{var R,z,q,Z;if(!w)return;let J=c.current[w];if(!J)return void f(!1);if((R=a.event)!=null&&R.rcbPreProcessBlock){const re=await m(j.PRE_PROCESS_BLOCK,{block:J});if(re.defaultPrevented)return;J=re.data.block}f(!0),(z=a.chatInput)!=null&&z.blockSpam&&y(!0),g(!1);const ae={prevPath:K,currPath:w,goToPath:b,setTextAreaValue:M,userInput:d.current,endStreamMessage:E,injectMessage:P,removeMessage:C,simulateStreamMessage:S,streamMessage:I,toggleChatWindow:O,showToast:Q,dismissToast:B};await(async(re,le,we,Ye,ut,xe,Ne)=>{if(!re)throw new Error("Block is not valid.");for(const xt of Object.keys(re))switch(xt){case"message":await di(re,le,we);break;case"options":await fi(re,le);break;case"checkboxes":await ci(re,le);break;case"component":await hi(re,le);break;case"chatDisabled":await mi(re,le,ut);break;case"isSensitive":await Qr(re,le,xe);break;case"transition":await gi(re,le,Ye,Ne)}})(J,ae,((q=a.botBubble)==null?void 0:q.simulateStream)??!1,p,y,g,L),f(!1),"chatDisabled"in J||y((Z=a.chatInput)==null?void 0:Z.disabled),"isSensitive"in J||g(!1),x(typeof J.file=="function"),D(w),U(u.current&&!J.chatDisabled),w!==K&&l.current.clear()},[c,D,U,(t=a.botBubble)==null?void 0:t.simulateStream,(r=a.chatInput)==null?void 0:r.disabled,d,E,P,C,S,I,O,Q,B,u,l]),_=h.useCallback(()=>i.current.length>0?i.current.at(-1)??null:null,[]),H=h.useCallback(()=>i.current.length>1?i.current.at(-2)??null:null,[]),b=h.useCallback(async w=>{var K;const R=_(),z=H();return((K=a.event)==null||!K.rcbChangePath||!(await m(j.CHANGE_PATH,{currPath:R,prevPath:z,nextPath:w})).defaultPrevented)&&(s(q=>[...q,w]),await F(w,R),!0)},[(n=a.chatInput)==null?void 0:n.blockSpam,(o=a.event)==null?void 0:o.rcbChangePath,F,m]),X=h.useCallback(w=>{const K=typeof w=="function"?w(i.current):w;s(K)},[i]);return{getCurrPath:_,getPrevPath:H,goToPath:b,blockAllowsAttachment:v,setBlockAllowsAttachment:x,paths:A,replacePaths:X,firePostProcessBlockEvent:L}},ft=()=>{var e,t,r,n;const{settings:o}=ee(),{endStreamMessage:a,injectMessage:A,removeMessage:s,simulateStreamMessage:i,streamMessage:c}=at(),{syncedPathsRef:l}=kt(),{getCurrPath:d,getPrevPath:u,goToPath:p,firePostProcessBlockEvent:f}=Gt(),{setSyncedTextAreaSensitiveMode:y,setSyncedTextAreaDisabled:g,setSyncedIsBotTyping:v,setBlockAllowsAttachment:x,setInputLength:m,syncedVoiceToggledOnRef:E,syncedTextAreaSensitiveModeRef:P}=he(),{flowRef:C,inputRef:S,keepVoiceOnRef:I,paramsInputRef:Q,timeoutIdRef:B}=pe(),{showToast:O,dismissToast:D}=pt(),{dispatchRcbEvent:M}=Le(),{syncVoice:U}=kn(),{setTextAreaValue:L}=it(),{toggleChatWindow:F}=De(),_=h.useCallback(async b=>{var X,w,K,R,z,q;const Z=d();if(Z&&C.current[Z]){if(P.current){if((X=o==null?void 0:o.sensitiveInput)!=null&&X.hideInUserBubble)return;if((w=o==null?void 0:o.sensitiveInput)!=null&&w.maskInUserBubble)return void((K=o.userBubble)!=null&&K.simulateStream?await i("*".repeat(((R=o.sensitiveInput)==null?void 0:R.asterisksCount)??10),"USER"):await A("*".repeat(((z=o.sensitiveInput)==null?void 0:z.asterisksCount)??10),"USER"))}(q=o.userBubble)!=null&&q.simulateStream?await i(b,"USER"):await A(b,"USER")}},[C,d,o,A,i,P]),H=h.useCallback(async(b,X=!0)=>{var w,K;if((b=b.trim())==="")return;X&&await _(b),B.current&&clearTimeout(B.current),S.current&&(L(""),m(0));const R=d();if(!R)return;let z=C.current[R];const q=await f(z);q&&((w=o.chatInput)!=null&&w.blockSpam&&g(!0),I.current=E.current,U(!1),setTimeout(()=>{v(!0)},400),y(!1),setTimeout(async()=>{var Z;const J={prevPath:u(),currPath:d(),goToPath:p,setTextAreaValue:L,userInput:Q.current,injectMessage:A,simulateStreamMessage:i,streamMessage:c,removeMessage:s,endStreamMessage:a,toggleChatWindow:F,showToast:O,dismissToast:D},ae=l.current.length;await Mr(q,J),l.current.length===ae&&(g("chatDisabled"in z?!!z.chatDisabled:!((Z=o.chatInput)==null||!Z.disabled)),Qr(z,J,y),x(typeof z.file=="function"),U(I.current),v(!1))},(K=o.chatInput)==null?void 0:K.botDelay))},[B,(e=o.chatInput)==null?void 0:e.blockSpam,(t=o.chatInput)==null?void 0:t.botDelay,(r=o.chatInput)==null?void 0:r.disabled,I,E,U,_,u,d,p,A,i,c,s,a,F,O,D,C]);return{handleSubmitText:h.useCallback(async(b,X=!0)=>{var w,K;b=b??((w=S.current)==null?void 0:w.value),!((K=o.event)!=null&&K.rcbUserSubmitText&&(await M(j.USER_SUBMIT_TEXT,{inputText:b,sendInChat:X})).defaultPrevented||!d())&&H(b,X)},[M,d,H,S,(n=o.event)==null?void 0:n.rcbUserSubmitText])}},Yt=()=>{var e;const{settings:t}=ee();return h.useMemo(()=>{var r;if(typeof window>"u"||!window.navigator)return!1;if((r=t.device)==null||!r.applyMobileOptimizations)return!0;const n=navigator.userAgent,o=!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(n),a=window.innerWidth>=768;return o&&a},[(e=t.device)==null?void 0:e.applyMobileOptimizations])},Ii=({buttons:e})=>{var t,r,n,o,a,A,s,i,c,l,d;const u=Yt(),{settings:p}=ee(),{styles:f}=ie(),{textAreaDisabled:y,textAreaSensitiveMode:g,inputLength:v,hasFlowStarted:x,setHasFlowStarted:m,setInputLength:E}=he(),{inputRef:P}=pe(),[C,S]=h.useState(!1),[I,Q]=h.useState(!1),{handleSubmitText:B}=ft(),{setTextAreaValue:O}=it(),D={boxSizing:u?"content-box":"border-box",...f.chatInputAreaStyle},M={outline:y?"":"none",boxShadow:y?"":`0 0 5px ${(t=p.general)==null?void 0:t.primaryColor}`,boxSizing:u?"content-box":"border-box",...f.chatInputAreaStyle,...f.chatInputAreaFocusedStyle},U={cursor:`url("${(r=p.general)==null?void 0:r.actionDisabledIcon}"), auto`,caretColor:"transparent",boxSizing:u?"content-box":"border-box",...f.chatInputAreaStyle,...f.chatInputAreaDisabledStyle},L={color:"#989898",...f.characterLimitStyle},F={color:"#ff0000",...f.characterLimitReachedStyle},_=y?(n=p.chatInput)==null?void 0:n.disabledPlaceholderText:(o=p.chatInput)==null?void 0:o.enabledPlaceholderText,H=()=>{y||S(!0)},b=()=>{S(!1)},X=()=>{Q(!0)},w=()=>{Q(!1)},K=async z=>{var q;if(!I&&z.key==="Enter"){if(z.shiftKey)return void((q=p.chatInput)!=null&&q.allowNewline||z.preventDefault());z.preventDefault(),await B()}},R=z=>{P.current&&(O(z.target.value),E(P.current.value.length))};return k.jsxs("div",{"aria-label":((a=p.ariaLabel)==null?void 0:a.inputTextArea)??"input text area",role:"textbox",onMouseDown:z=>{var q;z.stopPropagation(),!x&&((q=p.general)==null?void 0:q.flowStartTrigger)==="ON_CHATBOT_INTERACT"&&m(!0)},style:{...f.chatInputContainerStyle},className:"rcb-chat-input",children:[g&&(A=p.sensitiveInput)!=null&&A.maskInTextArea?k.jsx("input",{ref:P,type:"password",className:"rcb-chat-input-textarea",style:y?U:C?M:D,placeholder:_,onChange:R,onKeyDown:K,onFocus:H,onBlur:b,onCompositionStart:X,onCompositionEnd:w}):k.jsx("textarea",{ref:P,style:y?U:C?M:D,rows:1,className:"rcb-chat-input-textarea",placeholder:_,onChange:R,onKeyDown:K,onFocus:H,onBlur:b,onCompositionStart:X,onCompositionEnd:w}),k.jsxs(k.Fragment,{children:[e==null?void 0:e.map((z,q)=>k.jsx(h.Fragment,{children:z},q)),((s=p.chatInput)==null?void 0:s.showCharacterCount)&&((i=p.chatInput)==null?void 0:i.characterLimit)!=null&&((c=p.chatInput)==null?void 0:c.characterLimit)>0&&k.jsxs("div",{className:"rcb-chat-input-char-counter",style:v>=((l=p.chatInput)==null?void 0:l.characterLimit)?F:L,children:[v,"/",(d=p.chatInput)==null?void 0:d.characterLimit]})]})]})},Ti=({buttons:e})=>{var t;const{settings:r}=ee(),{styles:n}=ie();return k.jsxs("div",{"data-testid":"chatbot-footer-container",style:{...n.footerStyle},className:"rcb-chat-footer-container",children:[k.jsx("div",{className:"rcb-chat-footer",children:e==null?void 0:e.map((o,a)=>k.jsx(h.Fragment,{children:o},a))}),k.jsx("span",{children:(t=r.footer)==null?void 0:t.text})]})},Qi=()=>{var e,t,r,n,o,a,A;const{settings:s}=ee(),{styles:i}=ie(),{unreadCount:c}=he(),{isChatWindowOpen:l,toggleChatWindow:d}=De(),[u,p]=h.useState(!1),f={backgroundImage:`linear-gradient(to right, ${(e=s.general)==null?void 0:e.secondaryColor},
|
|
3
|
+
${(t=s.general)==null?void 0:t.primaryColor})`,...i.chatButtonStyle},y={transform:"scale(1.05)",...f,...i.chatButtonHoveredStyle},g={backgroundImage:`url(${(r=s.chatButton)==null?void 0:r.icon})`,fill:"#fff",width:75,height:75,...i.chatIconStyle};return k.jsx(k.Fragment,{children:!((n=s.general)!=null&&n.embedded)&&k.jsxs("div",{"aria-label":((o=s.ariaLabel)==null?void 0:o.chatButton)??"open chat",role:"button",style:u?y:f,className:"rcb-toggle-button "+(l?"rcb-button-hide":"rcb-button-show"),onMouseEnter:()=>{p(!0)},onMouseLeave:()=>{p(!1)},onClick:()=>d(!0),children:[(()=>{var v;const x=(v=s.chatButton)==null?void 0:v.icon;return x&&typeof x!="string"?x&&k.jsx("span",{className:"rcb-toggle-icon",children:k.jsx(x,{style:g})}):k.jsx("span",{className:"rcb-toggle-icon",style:g})})(),!((a=s.notification)!=null&&a.disabled)&&((A=s.notification)==null?void 0:A.showCount)&&k.jsx("span",{style:{...i.notificationBadgeStyle},className:"rcb-badge",children:c})]})})},Mi=()=>{var e,t,r,n,o,a;const A=Yt(),{settings:s}=ee(),{styles:i}=ie(),{chatBodyRef:c}=pe(),{isChatWindowOpen:l,toggleChatWindow:d}=De(),[u,p]=h.useState(!1),[f,y]=h.useState(!1),[g,v]=h.useState(0);h.useEffect(()=>{var E,P,C;const S=(E=s.tooltip)==null?void 0:E.mode;if(S==="ALWAYS")if(A){let I;I=l?(((P=c.current)==null?void 0:P.offsetWidth)??375)-(typeof((C=i.chatButtonStyle)==null?void 0:C.width)=="number"?i.chatButtonStyle.width:75):0,v(I),p(!0)}else p(!l);else S==="NEVER"?p(!1):S==="START"?f?p(!1):(y(!0),p(!0)):S==="CLOSE"&&p(!l)},[l,A,f,(e=i.chatButtonStyle)==null?void 0:e.width,(t=s.tooltip)==null?void 0:t.mode]);const x={transform:`translateX(-${g}px)`,right:(((r=i.chatButtonStyle)==null?void 0:r.width)??75)+40,bottom:30,backgroundColor:(n=s.general)==null?void 0:n.secondaryColor,color:"#fff",...i.tooltipStyle},m={borderColor:`transparent transparent transparent ${x.backgroundColor}`};return k.jsx(k.Fragment,{children:!((o=s.general)!=null&&o.embedded)&&k.jsxs("div",{"data-testid":"chat-tooltip",style:x,className:"rcb-chat-tooltip "+(u?"rcb-tooltip-show":"rcb-tooltip-hide"),onClick:()=>d(!0),children:[k.jsx("span",{children:(a=s.tooltip)==null?void 0:a.text}),k.jsx("span",{className:"rcb-chat-tooltip-tail",style:m})]})})},Oi=({id:e,content:t,timeout:r})=>{var n,o;const{settings:a}=ee(),{styles:A}=ie(),[s]=h.useState({toastPromptStyle:{...A.toastPromptStyle},toastPromptHoveredStyle:{...A.toastPromptHoveredStyle}}),{dismissToast:i}=pt(),[c,l]=h.useState(!1),d={color:(n=a.general)==null?void 0:n.primaryColor,borderColor:(o=a.general)==null?void 0:o.primaryColor,...s.toastPromptHoveredStyle};return h.useEffect(()=>{if(r){const u=setTimeout(()=>{i(e)},r);return()=>clearTimeout(u)}},[e,i,r]),typeof t=="string"?k.jsx("div",{onMouseEnter:()=>{l(!0)},onMouseLeave:()=>{l(!1)},style:c?d:s.toastPromptStyle,onMouseDown:async u=>{var p;(p=a.toast)!=null&&p.dismissOnClick&&(u.preventDefault(),await i(e))},className:"rcb-toast-prompt",children:t}):k.jsx(k.Fragment,{children:t})},_i=()=>{var e,t,r,n,o,a,A,s,i,c,l,d;const{styles:u}=ie(),{toasts:p}=Fr(),f={bottom:`calc(${typeof((e=u.footerStyle)==null?void 0:e.height)=="number"?`${(t=u.footerStyle)==null?void 0:t.height}px`:((r=u.footerStyle)==null?void 0:r.height)??"50px"} + ${typeof((n=u.chatInputContainerStyle)==null?void 0:n.height)=="number"?`${(o=u.chatInputContainerStyle)==null?void 0:o.height}px`:((a=u.chatInputContainerStyle)==null?void 0:a.height)??"70px"} + 20px)`,width:300,minWidth:`calc(${typeof((A=u.chatWindowStyle)==null?void 0:A.width)=="number"?`${(s=u.chatWindowStyle)==null?void 0:s.width}px`:((i=u.chatWindowStyle)==null?void 0:i.width)??"375px"} / 2)`,maxWidth:`calc(${typeof((c=u.chatWindowStyle)==null?void 0:c.width)=="number"?`${(l=u.chatWindowStyle)==null?void 0:l.width}px`:((d=u.chatWindowStyle)==null?void 0:d.width)??"375px"} - 50px)`,...u.toastPromptContainerStyle};return k.jsx("div",{className:"rcb-toast-prompt-container",style:f,children:p.map(y=>k.jsx(Oi,{id:y.id,content:y.content,timeout:y.timeout},y.id))})},zr=({file:e,fileType:t,fileUrl:r})=>{var n,o,a;const{settings:A}=ee(),{styles:s}=ie(),i={backgroundColor:(n=A.general)==null?void 0:n.primaryColor,maxWidth:(o=A.userBubble)!=null&&o.showAvatar?"65%":"70%",...s.mediaDisplayContainerStyle};return k.jsx(k.Fragment,{children:r?k.jsxs(k.Fragment,{children:[t==="image"&&r&&k.jsx("div",{style:i,className:"rcb-media-display-image-container rcb-media-entry","data-testid":"media-display-image-container",children:k.jsx("img",{src:r,alt:"Image Display",className:"rcb-media-display-image"})}),t==="video"&&r&&k.jsx("div",{style:i,className:"rcb-media-display-video-container rcb-media-entry","data-testid":"media-display-video-container",children:k.jsxs("video",{controls:!0,className:"rcb-media-display-video",children:[k.jsx("source",{src:r,type:e.type}),"Your browser does not support the video tag."]})}),t==="audio"&&r&&k.jsxs("audio",{"data-testid":"media-display-audio-container",style:{maxWidth:(a=A.userBubble)!=null&&a.showAvatar?"65%":"70%"},controls:!0,className:"rcb-media-display-audio rcb-media-entry",children:[k.jsx("source",{src:r,type:e.type}),"Your browser does not support the audio tag."]})]}):k.jsx(k.Fragment,{})})},Rr=async e=>{if(!e)return{fileType:null,fileUrl:null};const t=e.type.split("/")[0];if(!["image","video","audio"].includes(t))return{fileType:null,fileUrl:null};try{return{fileType:t,fileUrl:await new Promise((r,n)=>{const o=new FileReader;o.onload=()=>r(o.result),o.onerror=()=>n(new Error("File reading failed")),o.readAsDataURL(e)})}}catch(r){return console.error(r),{fileType:null,fileUrl:null}}},Li=()=>{var e,t,r,n,o,a;const{settings:A}=ee(),{styles:s}=ie(),{injectMessage:i,simulateStreamMessage:c,streamMessage:l,removeMessage:d,endStreamMessage:u}=at(),{getCurrPath:p,getPrevPath:f,goToPath:y,blockAllowsAttachment:g}=Gt(),{flowRef:v,inputRef:x}=pe(),m=v.current,{showToast:E,dismissToast:P}=pt(),{dispatchRcbEvent:C}=Le(),{toggleChatWindow:S}=De(),{setTextAreaValue:I}=it(),{handleSubmitText:Q}=ft(),B={cursor:`url("${(e=A.general)==null?void 0:e.actionDisabledIcon}"), auto`,...s.fileAttachmentButtonStyle,...s.fileAttachmentButtonDisabledStyle},O={backgroundImage:`url(${(t=A.fileAttachment)==null?void 0:t.icon})`,fill:"#a6a6a6",...s.fileAttachmentIconStyle},D={backgroundImage:`url(${(r=A.fileAttachment)==null?void 0:r.icon})`,fill:"#a6a6a6",...s.fileAttachmentIconStyle,...s.fileAttachmentIconDisabledStyle};return k.jsxs("label",{"aria-label":((n=A.ariaLabel)==null?void 0:n.fileAttachmentButton)??"upload file",role:"button",className:g?"rcb-attach-button-enabled":"rcb-attach-button-disabled",style:g?{...s.fileAttachmentButtonStyle}:B,children:[k.jsx("input",{className:"rcb-attach-input",role:"file",type:"file",onChange:async M=>{var U,L,F,_;const H=M.target.files;if(!H)return;const b=Array.from(H);if(M.target.value="",(U=A.event)!=null&&U.rcbUserUploadFile&&(await C(j.USER_UPLOAD_FILE,{files:b})).defaultPrevented)return;const X=p();if(!X)return;const w=m[X];if(!w)return;const K=w.file;if(K!=null){const R=[];for(let z=0;z<b.length;z++){if(R.push(b[z].name),(L=A.fileAttachment)==null||!L.showMediaDisplay)continue;const q=await Rr(b[z]);!q.fileType||!q.fileUrl||await i(k.jsx(zr,{file:b[z],fileType:q.fileType,fileUrl:q.fileUrl}),"USER")}await Q("📄 "+R.join(", "),(F=A.fileAttachment)==null?void 0:F.sendFileName),await K({userInput:(_=x.current)==null?void 0:_.value,prevPath:f(),currPath:p(),goToPath:y,setTextAreaValue:I,injectMessage:i,simulateStreamMessage:c,streamMessage:l,removeMessage:d,endStreamMessage:u,toggleChatWindow:S,showToast:E,dismissToast:P,files:b})}},multiple:(o=A.fileAttachment)==null?void 0:o.multiple,accept:(a=A.fileAttachment)==null?void 0:a.accept,disabled:!g}),(()=>{var M,U;const L=g?(M=A.fileAttachment)==null?void 0:M.icon:(U=A.fileAttachment)==null?void 0:U.iconDisabled;return L&&typeof L!="string"?L&&k.jsx("span",{className:g?"rcb-attach-icon-enabled":"rcb-attach-icon-disabled",children:k.jsx(L,{style:g?O:D})}):k.jsx("span",{className:g?"rcb-attach-icon-enabled":"rcb-attach-icon-disabled",style:g?O:D})})()]})},Ni=()=>{var e,t,r,n,o,a;const{settings:A}=ee(),{styles:s}=ie(),{syncedTextAreaDisabledRef:i}=he(),{inputRef:c}=pe(),{textAreaDisabled:l,setTextAreaValue:d}=it(),u=h.useRef(null),p=h.useRef(null),[f,y]=h.useState(!1),g={cursor:`url("${(e=A.general)==null?void 0:e.actionDisabledIcon}"), auto`,...s.emojiButtonStyle,...s.emojiButtonDisabledStyle},v={backgroundImage:`url(${(t=A.emoji)==null?void 0:t.icon})`,fill:"#a6a6a6",...s.emojiIconStyle},x={backgroundImage:`url(${(r=A.emoji)==null?void 0:r.icon})`,fill:"#a6a6a6",...s.emojiIconStyle,...s.emojiIconDisabledStyle};return h.useEffect(()=>{const m=P=>{const C=P.composedPath();u.current&&!C.includes(u.current)&&p.current&&!C.includes(p.current)&&y(!1)},E=()=>{(()=>{if(u.current&&p.current){const P=p.current.getBoundingClientRect(),C=u.current.offsetHeight,S=P.top-C-8;u.current.style.left=`${P.left}px`,u.current.style.top=`${S}px`}})()};return document.addEventListener("mousedown",m),window.addEventListener("resize",E),()=>{document.removeEventListener("mousedown",m),window.removeEventListener("resize",E)}},[]),k.jsxs(k.Fragment,{children:[k.jsx("div",{"aria-label":((n=A.ariaLabel)==null?void 0:n.emojiButton)??"emoji picker",role:"button",ref:p,className:l?"rcb-emoji-button-disabled":"rcb-emoji-button-enabled",style:l?g:{...s.emojiButtonStyle},onMouseDown:m=>{m.preventDefault(),i.current?y(!1):y(E=>!E)},children:(()=>{var m,E;const P=l?(m=A.emoji)==null?void 0:m.iconDisabled:(E=A.emoji)==null?void 0:E.icon;return P&&typeof P!="string"?P&&k.jsx("span",{className:l?"rcb-emoji-icon-disabled":"rcb-emoji-icon-enabled",children:k.jsx(P,{style:l?x:v})}):k.jsx("span",{className:l?"rcb-emoji-icon-disabled":"rcb-emoji-icon-enabled",style:l?x:v})})()}),f&&k.jsx("div",{className:"rcb-emoji-button-popup",ref:u,children:(a=(o=A.emoji)==null?void 0:o.list)==null?void 0:a.map((m,E)=>k.jsx("span",{className:"rcb-emoji",onMouseDown:P=>((C,S)=>{C.preventDefault(),c.current&&(d(c.current.value+S),setTimeout(()=>{const I=c.current;if(I){I.focus();const Q=I.value.length;I.setSelectionRange(Q,Q)}},50)),y(!1)})(P,m),children:m},E))})]})},Hi=()=>{var e,t,r;const{settings:n}=ee(),{styles:o}=ie(),{audioToggledOn:a,toggleAudio:A}=Hr(),s={backgroundImage:`url(${(e=n.audio)==null?void 0:e.icon})`,fill:"#fcec3d",...o.audioIconStyle},i={backgroundImage:`url(${(t=n.audio)==null?void 0:t.iconDisabled})`,fill:"#e8eaed",...o.audioIconStyle,...o.audioIconDisabledStyle};return k.jsx("div",{"aria-label":((r=n.ariaLabel)==null?void 0:r.audioButton)??"toggle audio",role:"button",onMouseDown:async c=>{c.preventDefault(),await A()},style:a?{...o.audioButtonStyle}:{...o.audioButtonStyle,...o.audioButtonDisabledStyle},children:(()=>{var c,l;const d=a?(c=n.audio)==null?void 0:c.icon:(l=n.audio)==null?void 0:l.iconDisabled;return d&&typeof d!="string"?d&&k.jsx("span",{className:"rcb-audio-icon","data-testid":"rcb-audio-icon",children:k.jsx(d,{style:a?s:i,"data-testid":"rcb-audio-icon-svg"})}):k.jsx("span",{className:"rcb-audio-icon","data-testid":"rcb-audio-icon",style:a?s:i})})()})},Ui=()=>{var e,t;const{settings:r}=ee(),{styles:n}=ie(),{toggleChatWindow:o}=De(),a={backgroundImage:`url(${(e=r.header)==null?void 0:e.closeChatIcon})`,fill:"#e8eaed",stroke:"#e8eaed",...n.closeChatIconStyle};return k.jsx("div",{"aria-label":((t=r.ariaLabel)==null?void 0:t.closeChatButton)??"close chat",role:"button",onMouseDown:A=>{A.stopPropagation(),o(!1)},style:{...n.closeChatButtonStyle},children:(()=>{var A;const s=(A=r.header)==null?void 0:A.closeChatIcon;return s&&typeof s!="string"?s&&k.jsx("span",{className:"rcb-close-chat-icon","data-testid":"rcb-close-chat-icon",children:k.jsx(s,{style:a})}):k.jsx("span",{className:"rcb-close-chat-icon","data-testid":"rcb-close-chat-icon",style:a})})()})},Fi=()=>{var e,t,r;const{settings:n}=ee(),{styles:o}=ie(),{notificationsToggledOn:a,toggleNotifications:A}=(()=>{const{notificationsToggledOn:c,toggleNotifications:l,playNotificationSound:d}=bn();return{notificationsToggledOn:c,toggleNotifications:l,playNotificationSound:d}})(),s={backgroundImage:`url(${(e=n.notification)==null?void 0:e.icon})`,fill:"#fcec3d",...o.notificationIconStyle},i={backgroundImage:`url(${(t=n.notification)==null?void 0:t.iconDisabled})`,fill:"#e8eaed",...o.notificationIconStyle,...o.notificationIconDisabledStyle};return k.jsx("div",{"aria-label":((r=n.ariaLabel)==null?void 0:r.notificationButton)??"toggle notifications",role:"button",onMouseDown:async c=>{c.preventDefault(),await A()},style:a?{...o.notificationButtonStyle}:{...o.notificationButtonStyle,...o.notificationButtonDisabledStyle},children:(()=>{var c,l;const d=a?(c=n.notification)==null?void 0:c.icon:(l=n.notification)==null?void 0:l.iconDisabled;return d&&typeof d!="string"?d&&k.jsx("span",{className:"rcb-notification-icon","data-testid":"rcb-notification-icon",children:k.jsx(d,{style:a?s:i,"data-testid":"rcb-notification-icon-svg"})}):k.jsx("span",{className:"rcb-notification-icon","data-testid":"rcb-notification-icon",style:a?s:i})})()})},zi=()=>{var e,t,r;const{settings:n}=ee(),{styles:o}=ie(),{injectMessage:a}=at(),{inputRef:A}=pe(),{voiceToggledOn:s,toggleVoice:i}=kn(),{setInputLength:c,setTextAreaValue:l,textAreaDisabled:d}=it(),{handleSubmitText:u}=ft(),p=h.useRef([]),[f,y]=h.useState(!1);h.useEffect(()=>{var E;(E=n.voice)!=null&&E.sendAsAudio?(m(),p.current=[]):u()},[f]),h.useEffect(()=>{s?((E,P,C,S,I,Q,B)=>{var O;(O=E.voice)!=null&&O.sendAsAudio?Di(C,Q):Si(E,P,C,S,I,B)})(n,i,x,l,c,p,A):xn()},[s]);const g={backgroundImage:`url(${(e=n.voice)==null?void 0:e.icon})`,fill:"#9aa0a6",...o.voiceIconStyle},v={backgroundImage:`url(${(t=n.voice)==null?void 0:t.iconDisabled})`,fill:"#9aa0a6",...o.voiceIconStyle,...o.voiceIconDisabledStyle},x=()=>{y(E=>!E)},m=async()=>{const E=new Blob(p.current,{type:"audio/wav"}),P=new File([E],"voice-input.wav",{type:"audio/wav"}),C=await Rr(P);!C.fileType||!C.fileUrl||await a(k.jsx(zr,{file:P,fileType:C.fileType,fileUrl:C.fileUrl}),"USER")};return k.jsx("div",{"aria-label":((r=n.ariaLabel)==null?void 0:r.voiceButton)??"toggle voice",role:"button",onMouseDown:async E=>{E.preventDefault(),!d&&await i()},style:s&&!d?{...o.voiceButtonStyle}:{...o.voiceButtonStyle,...o.voiceButtonDisabledStyle},className:s&&!d?"rcb-voice-button-enabled":"rcb-voice-button-disabled",children:(()=>{var E,P;const C=s?(E=n.voice)==null?void 0:E.icon:(P=n.voice)==null?void 0:P.iconDisabled;return C&&typeof C!="string"?C&&k.jsx("span",{className:"rcb-voice-icon "+(s&&!d?"on":""),children:k.jsx(C,{style:s&&!d?g:v})}):k.jsx("span",{className:"rcb-voice-icon"+(s&&!d?"-on":""),"data-testid":"rcb-voice-icon",style:s&&!d?g:v})})()})},Ri=()=>{var e,t,r,n,o,a,A,s;const{settings:i}=ee(),{styles:c}=ie(),{textAreaDisabled:l}=he(),[d,u]=h.useState(!1),{handleSubmitText:p}=ft(),f={backgroundColor:(e=i.general)==null?void 0:e.primaryColor,...c.sendButtonStyle},y={cursor:`url("${(t=i.general)==null?void 0:t.actionDisabledIcon}"), auto`,backgroundColor:(r=i.general)==null?void 0:r.primaryColor,...c.sendButtonStyle,...c.sendButtonDisabledStyle},g={backgroundColor:(n=i.general)==null?void 0:n.secondaryColor,...c.sendButtonStyle,...c.sendButtonHoveredStyle},v={backgroundImage:`url(${(o=i.chatInput)==null?void 0:o.sendButtonIcon})`,fill:"#fff",...c.sendIconStyle},x={backgroundImage:`url(${(a=i.chatInput)==null?void 0:a.sendButtonIcon})`,fill:"#fff",...c.sendIconStyle,...c.sendIconDisabledStyle},m={backgroundImage:`url(${(A=i.chatInput)==null?void 0:A.sendButtonIcon})`,fill:"#fff",...c.sendIconStyle,...c.sendIconHoveredStyle};return k.jsx("div",{"aria-label":((s=i.ariaLabel)==null?void 0:s.sendButton)??"send message",role:"button",onMouseEnter:()=>{u(!0)},onMouseLeave:()=>{u(!1)},onMouseDown:async E=>{E==null||E.preventDefault(),!l&&await p()},style:l?y:d?g:f,className:"rcb-send-button",children:(()=>{var E;const P=(E=i.chatInput)==null?void 0:E.sendButtonIcon;return P&&typeof P!="string"?P&&k.jsx("span",{className:"rcb-send-icon","data-testid":"rcb-send-icon",children:k.jsx(P,{style:l?x:d?m:v})}):k.jsx("span",{className:"rcb-send-icon","data-testid":"rcb-send-icon",style:l?x:d?m:v})})()})},ji=(e,t)=>{var r,n,o,a,A,s,i,c,l;const d={[ue.AUDIO_BUTTON]:(r=e.audio)==null?void 0:r.disabled,[ue.CLOSE_CHAT_BUTTON]:(n=e.general)==null?void 0:n.embedded,[ue.EMOJI_PICKER_BUTTON]:(o=e.emoji)==null?void 0:o.disabled,[ue.FILE_ATTACHMENT_BUTTON]:(a=e.fileAttachment)==null?void 0:a.disabled,[ue.NOTIFICATION_BUTTON]:(A=e.notification)==null?void 0:A.disabled,[ue.SEND_MESSAGE_BUTTON]:!1,[ue.VOICE_MESSAGE_BUTTON]:(s=e.voice)==null?void 0:s.disabled},u={},p=f=>f?f.map(y=>{if(typeof y=="string"){if((g=>Object.values(ue).includes(g))(y)&&!d[y]){if(u[y])return u[y];const g=t[y];if(typeof g=="function"){const v=g();return u[y]=v,v}return null}return null}return y}).filter(y=>y!==null):[];return{header:p((i=e.header)==null?void 0:i.buttons),chatInput:p((c=e.chatInput)==null?void 0:c.buttons),footer:p((l=e.footer)==null?void 0:l.buttons)}},qi=()=>{const{settings:e}=ee(),t=h.useMemo(()=>({[ue.CLOSE_CHAT_BUTTON]:()=>k.jsx(Ui,{}),[ue.AUDIO_BUTTON]:()=>k.jsx(Hi,{}),[ue.NOTIFICATION_BUTTON]:()=>k.jsx(Fi,{}),[ue.EMOJI_PICKER_BUTTON]:()=>k.jsx(Ni,{}),[ue.FILE_ATTACHMENT_BUTTON]:()=>k.jsx(Li,{}),[ue.SEND_MESSAGE_BUTTON]:()=>k.jsx(Ri,{}),[ue.VOICE_MESSAGE_BUTTON]:()=>k.jsx(zi,{})}),[]),{header:r,chatInput:n,footer:o}=h.useMemo(()=>ji(e,t),[e,t]);return{headerButtons:h.useMemo(()=>r,[r]),chatInputButtons:h.useMemo(()=>n,[n]),footerButtons:h.useMemo(()=>o,[o])}},Cn=()=>{const{settings:e}=ee(),{styles:t}=ie(),{setSyncedMessages:r,syncedMessagesRef:n}=gn(),{isLoadingChatHistory:o,setIsLoadingChatHistory:a,hasChatHistoryLoaded:A,setHasChatHistoryLoaded:s}=he(),{chatBodyRef:i}=pe(),{dispatchRcbEvent:c}=Le(),l=h.useCallback(async()=>{var d,u;const p=Ct();if(!p||(d=e.event)!=null&&d.rcbLoadChatHistory&&(await c(j.LOAD_CHAT_HISTORY,{})).defaultPrevented)return;a(!0);const f=((u=i.current)==null?void 0:u.scrollHeight)??0;((y,g,v,x,m,E,P,C,S)=>{var I;if(Or=!0,v!=null)try{const Q=Ze(k.jsx(bi,{}),"SYSTEM"),B=m.current.slice(1);x([Q,...B]);const O=v.map(D=>{if(D.type==="object"){const M=Nr(D.content,y,g);return{...D,content:M}}return D});setTimeout(()=>{var D;const M=m.current.slice(1);let U=(D=y.chatHistory)!=null&&D.autoLoad?Ze(k.jsx(k.Fragment,{}),"SYSTEM"):Ze(k.jsx(yi,{}),"SYSTEM");x([...O,U,...M]),S(!0)},500),setTimeout(()=>{if(!E.current)return;const{scrollHeight:D}=E.current,M=D-P;E.current.scrollTop+=M,C(!1)},510)}catch{$e.removeItem((I=y.chatHistory)==null?void 0:I.storageKey)}})(e,t,p,r,n,i,f,a,s)},[e,t,c,n,i,a,s]);return{isLoadingChatHistory:o,setIsLoadingChatHistory:a,hasChatHistoryLoaded:A,showChatHistory:l}},Gi=()=>{var e,t,r;const{settings:n}=ee(),{styles:o}=ie(),{showChatHistory:a}=Cn(),[A,s]=h.useState(!1),i={color:(e=n.general)==null?void 0:e.primaryColor,borderColor:(t=n.general)==null?void 0:t.primaryColor,...o.chatHistoryButtonStyle,...o.chatHistoryButtonHoveredStyle};return k.jsx("div",{className:"rcb-view-history-container",children:k.jsx("div",{onMouseEnter:()=>{s(!0)},onMouseLeave:()=>{s(!1)},style:A?i:{...o.chatHistoryButtonStyle},onMouseDown:c=>{c.preventDefault(),a()},className:"rcb-view-history-button",role:"button",tabIndex:0,children:k.jsx("p",{children:(r=n.chatHistory)==null?void 0:r.viewChatHistoryButtonText})})})},Yi=()=>{var e,t,r,n;const o=Yt(),{settings:a}=ee(),{replaceMessages:A}=at(),{isBotTyping:s,isChatWindowOpen:i,setUnreadCount:c,setSyncedIsChatWindowOpen:l,setSyncedTextAreaDisabled:d,setSyncedAudioToggledOn:u,setSyncedVoiceToggledOn:p,setSyncedIsScrolling:f,syncedIsScrollingRef:y,syncedIsChatWindowOpenRef:g}=he(),{chatBodyRef:v}=pe(),{viewportHeight:x,setViewportHeight:m,setViewportWidth:E,scrollToBottom:P}=De(),{setUpNotifications:C}=bn(),{handleFirstInteraction:S}=(()=>{var O;const{settings:D}=ee(),{hasInteractedPage:M,setHasInteractedPage:U,hasFlowStarted:L,setHasFlowStarted:F}=he(),_=h.useCallback(()=>{var H;if(U(!0),!L&&((H=D.general)==null?void 0:H.flowStartTrigger)==="ON_PAGE_INTERACT"&&F(!0),!window.SpeechSynthesisUtterance)return void console.info("Speech Synthesis API is not supported in this environment.");const b=new window.SpeechSynthesisUtterance;b.text="",b.onend=()=>{window.removeEventListener("click",_),window.removeEventListener("keydown",_),window.removeEventListener("touchstart",_)},window.speechSynthesis.speak(b)},[L,(O=D.general)==null?void 0:O.flowStartTrigger]);return{hasInteractedPage:M,handleFirstInteraction:_}})(),{showChatHistory:I}=Cn(),Q=h.useRef(0),B=h.useRef(!1);h.useEffect(()=>(window.addEventListener("click",S),window.addEventListener("keydown",S),window.addEventListener("touchstart",S),()=>{window.removeEventListener("click",S),window.removeEventListener("keydown",S),window.removeEventListener("touchstart",S)}),[]),h.useEffect(()=>{const O=v.current;if(!O)return;const D=()=>{B.current||(B.current=!0,requestAnimationFrame(()=>{var M,U;if(!O)return;const{scrollTop:L,clientHeight:F,scrollHeight:_}=O,H=L+F<_-(((M=a.chatWindow)==null?void 0:M.messagePromptOffset)??30);f(H),y.current=H,H||(L+F>=_-1&&(O.scrollTop=_-F-1),(g.current||(U=a.general)!=null&&U.embedded)&&c(0)),B.current=!1}))};return O.addEventListener("wheel",D,{passive:!0}),O.addEventListener("touchmove",D,{passive:!0}),()=>{O.removeEventListener("wheel",D),O.removeEventListener("touchmove",D)}},[]),h.useEffect(()=>{var O,D,M;d((O=a.chatInput)==null?void 0:O.disabled),l((D=a.chatWindow)==null?void 0:D.defaultOpen),u((M=a.audio)==null?void 0:M.defaultToggledOn),setTimeout(()=>{var U;p((U=a.voice)==null?void 0:U.defaultToggledOn)},1)},[]),h.useEffect(()=>{var O;(O=a.notification)!=null&&O.disabled||C()},[(e=a.notification)==null?void 0:e.disabled]),h.useEffect(()=>{!y.current&&v!=null&&v.current&&P()},[s]),h.useEffect(()=>{var O,D;if((O=a.chatHistory)!=null&&O.disabled)$e&&$e.removeItem(zt);else if(yn(a),Ct().length>0){const M=Ze(k.jsx(Gi,{}),"SYSTEM");A([M]),(D=a.chatHistory)!=null&&D.autoLoad&&I()}},[(t=a.chatHistory)==null?void 0:t.storageKey,(r=a.chatHistory)==null?void 0:r.maxEntries,(n=a.chatHistory)==null?void 0:n.disabled]),h.useEffect(()=>{var O;o||(O=a.general)!=null&&O.embedded||!navigator.virtualKeyboard||(navigator.virtualKeyboard.overlaysContent=!0,navigator.virtualKeyboard.addEventListener("geometrychange",D=>{if(!D.target)return;const{x:M,y:U,width:L,height:F}=D.target.boundingRect;M==0&&U==0&&L==0&&F==0?(setTimeout(()=>{var _;m((_=window.visualViewport)==null?void 0:_.height)},101),setTimeout(()=>{var _,H;x!=((_=window.visualViewport)==null?void 0:_.height)&&m((H=window.visualViewport)==null?void 0:H.height)},1001)):setTimeout(()=>{var _;m(((_=window.visualViewport)==null?void 0:_.height)-F)},101)}))},[o]),h.useEffect(()=>{var O,D,M,U;if(o)return;i&&(m((O=window.visualViewport)==null?void 0:O.height),E((D=window.visualViewport)==null?void 0:D.width));const L=()=>window.scrollTo({top:0,left:0,behavior:"auto"}),F=()=>Q.current=window.scrollY,_=()=>{var b,X;m((b=window.visualViewport)==null?void 0:b.height),E((X=window.visualViewport)==null?void 0:X.width)},H=()=>{var b;window.removeEventListener("scroll",L),window.removeEventListener("scroll",F),(b=window.visualViewport)==null||b.removeEventListener("resize",_)};return i?(H(),document.body.style.position="fixed",window.addEventListener("scroll",L),(M=window.visualViewport)==null||M.addEventListener("resize",_)):(document.body.style.position="static",H(),window.scrollTo({top:Q.current,left:0,behavior:"auto"}),window.addEventListener("scroll",F),(U=window.visualViewport)==null||U.removeEventListener("resize",_)),H},[i,o])},Wi="https://cdn.jsdelivr.net/gh/react-chatbotify/community-themes/themes",Vi="2592000",jr="RCB_THEME_CACHE_DATA",qr=async(e,t)=>{const{id:r,version:n,baseUrl:o=Wi,cacheDuration:a=Vi}=t,A=n||await(async(v,x)=>{const m=`${x}/${v}/meta.json`;try{const E=await fetch(m);return E.ok?(await E.json()).version:(console.error(`Failed to fetch meta.json from ${m}`),null)}catch(E){return console.error(`Failed to fetch meta.json from ${m}`,E),null}})(r,o);if(!A)return console.error(`Unable to find version for theme: ${r}`),{settings:{},inlineStyles:{},cssStylesText:""};const s=((v,x,m)=>{const E=localStorage.getItem(`${jr}_${v}_${x}`);if(!E)return null;try{const P=JSON.parse(E),C=new Date().getTime(),S=Math.floor(C/1e3);return P.cacheDate+m>=S?P:null}catch(P){return console.error(`Unable to fetch cache for ${v}`,P),null}})(r,A,a);if(s){const v=Gr(e,s.cssStylesText);return{settings:s.settings,inlineStyles:s.inlineStyles,cssStylesText:v}}const i=`${o}/${r}/${A}/styles.css`,c=`${o}/${r}/${A}/settings.json`,l=`${o}/${r}/${A}/styles.json`;let d="";const u=await fetch(i);u.ok?d=await u.text():console.info(`Could not fetch styles.css from ${i}`);const p=await fetch(c);let f={};p.ok?f=await p.json():console.info(`Could not fetch settings.json from ${c}`);const y=await fetch(l);let g={};return y.ok?g=await y.json():console.info(`Could not fetch styles.json from ${l}`),((v,x,m,E,P)=>{const C=new Date().getTime(),S={settings:m,inlineStyles:E,cssStylesText:P,cacheDate:Math.floor(C/1e3)};localStorage.setItem(`${jr}_${v}_${x}`,JSON.stringify(S))})(r,A,f,g,d),{settings:f,inlineStyles:g,cssStylesText:Gr(e,d)}},Gr=(e,t)=>t.split(new RegExp("(?<=})")).map(r=>{const n=r.trim();return n.startsWith("@import")||n.startsWith("@keyframes")||n.startsWith("@media")?n:n?`#${e} ${n}`:""}).join(`
|
|
4
|
+
`),Xi=async(e,t,r,n)=>{var o,a;let A=Wt(kr),s=Wt(Pr),i="";if(n!=null)if(Array.isArray(n))for(const c of n){const l=await qr(e,c);A=ze(l.settings,A),s=ze(l.inlineStyles,s),i+=l.cssStylesText}else{const c=await qr(e,n);A=ze(c.settings,A),s=ze(c.inlineStyles,s),i+=c.cssStylesText}return t!=null&&(A=ze(t,A)),r!=null&&(s=ze(r,s)),((o=A.chatInput)==null?void 0:o.botDelay)!=null&&((a=A.chatInput)==null?void 0:a.botDelay)<500&&(A.chatInput.botDelay=500),{settings:A,inlineStyles:s,cssStylesText:i}},ze=(e,t)=>{const r=[{source:e,target:t}];for(;r.length;){const n=r.pop();if(n==null)continue;const{source:o,target:a}=n;for(const A of Object.keys(o)){const s=A;if(h.isValidElement(o[s]))a[s]=o[s];else if(typeof o[s]!="object"||o[s]===null||Array.isArray(o[s]))try{a[s]=o[s]}catch{}else(typeof a[s]!="object"||a[s]===null)&&(a[s]={}),r.push({source:o[s],target:a[s]})}}return t},Wt=e=>{if(e===null||typeof e!="object")return e;const t=Array.isArray(e)?[]:{},r=[{source:e,target:t}],n=new WeakMap;for(n.set(e,t);r.length;){const o=r.pop();if(o==null)continue;const{source:a,target:A}=o;for(const s in a)if(Object.prototype.hasOwnProperty.call(a,s)){const i=a[s];if(i&&typeof i=="object")if(n.has(i))A[s]=n.get(i);else{const c=Array.isArray(i)?[]:{};n.set(i,c),A[s]=c,r.push({source:i,target:c})}else A[s]=i}}return t},Yr=()=>{const{settings:e,setSyncedSettings:t,syncedSettingsRef:r}=ee(),n=h.useCallback(a=>{!a||Object.keys(a).length===0||t(Wt(ze(a,e)))},[e]),o=h.useCallback(a=>{const A=typeof a=="function"?a(r.current):a;t(A)},[r]);return{settings:e,replaceSettings:o,updateSettings:n}},Wr=()=>{const{styles:e,setSyncedStyles:t,syncedStylesRef:r}=ie(),n=h.useCallback(a=>{!a||Object.keys(a).length===0||t(Wt(ze(a,e)))},[e]),o=h.useCallback(a=>{const A=typeof a=="function"?a(r.current):a;t(A)},[r]);return{styles:e,replaceStyles:o,updateStyles:n}},Ki=({plugins:e,slots:t})=>{var r,n;const o=Yt(),{settings:a}=ee(),{styles:A}=ie(),{hasFlowStarted:s,setHasFlowStarted:i}=he(),{inputRef:c}=pe(),{viewportHeight:l,viewportWidth:d,isChatWindowOpen:u}=De(),{goToPath:p}=Gt(),{headerButtons:f,chatInputButtons:y,footerButtons:g}=qi();Yi(),(x=>{const{updateSettings:m}=Yr(),{updateStyles:E}=Wr(),P=x==null?void 0:x.map(C=>C());h.useEffect(()=>{let C={},S={};P==null||P.forEach(I=>{I!=null&&I.settings&&Object.keys(I==null?void 0:I.settings).length!==0&&(C=ze(I.settings,C)),I!=null&&I.styles&&Object.keys(I==null?void 0:I.styles).length!==0&&(S=ze(I.styles,S))}),m(C),E(S)},[])})(e),h.useEffect(()=>{var x;(s||((x=a.general)==null?void 0:x.flowStartTrigger)==="ON_LOAD")&&p("start")},[s,(r=a.general)==null?void 0:r.flowStartTrigger]);const v=h.useMemo(()=>{var x;const m="rcb-chatbot-global ";return(x=a.general)!=null&&x.embedded?m+"rcb-window-embedded":u?m+"rcb-window-open":m+"rcb-window-close"},[a,u]);return k.jsx(k.Fragment,{children:(()=>{var x,m;return o&&((x=a.device)==null?void 0:x.desktopEnabled)||!o&&((m=a.device)==null?void 0:m.mobileEnabled)})()&&k.jsxs("div",{onMouseDown:x=>{var m,E;!s&&((m=a.general)==null?void 0:m.flowStartTrigger)==="ON_CHATBOT_INTERACT"&&i(!0),o?(E=c.current)==null||E.blur():x==null||x.preventDefault()},className:v,children:[k.jsx(Mi,{}),k.jsx(Qi,{}),u&&!o&&!((n=a.general)!=null&&n.embedded)&&k.jsxs(k.Fragment,{children:[k.jsx("style",{children:`
|
|
5
5
|
html {
|
|
6
6
|
overflow: hidden !important;
|
|
7
7
|
touch-action: none !important;
|
|
8
8
|
scroll-behavior: auto !important;
|
|
9
9
|
}
|
|
10
|
-
`}),k.jsx("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"#fff",zIndex:9999}})]}),k.jsx("div",{style:(()=>{var x,m;return o||(x=a.general)!=null&&x.embedded?(m=a.general)!=null&&m.embedded?{...
|
|
10
|
+
`}),k.jsx("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"#fff",zIndex:9999}})]}),k.jsx("div",{style:(()=>{var x,m;return o||(x=a.general)!=null&&x.embedded?(m=a.general)!=null&&m.embedded?{...A.chatWindowStyle}:{...A.chatWindowStyle,zIndex:1e4}:{...A.chatWindowStyle,borderRadius:"0px",left:"0px",right:"auto",top:"0px",bottom:"auto",width:`${d}px`,height:`${l}px`,zIndex:1e4}})(),className:"rcb-chat-window",children:(()=>{var x,m,E;const P=(t==null?void 0:t.chatBotHeader)||Za,C=(t==null?void 0:t.chatBotBody)||Ai,S=(t==null?void 0:t.chatBotInput)||Ii,I=(t==null?void 0:t.chatBotFooter)||Ti;return k.jsxs(k.Fragment,{children:[((x=a.general)==null?void 0:x.showHeader)&&k.jsx(P,{buttons:f}),k.jsx(C,{}),k.jsx(_i,{}),((m=a.general)==null?void 0:m.showInputRow)&&k.jsx(S,{buttons:y}),((E=a.general)==null?void 0:E.showFooter)&&k.jsx(I,{buttons:g})]})})()})]})})},Vr=h.createContext(void 0),Xr=()=>h.useContext(Vr),Kr=({children:e})=>{var t;const r=h.useRef(""),n=h.useRef({}),[o,a,A]=Se({}),[s,i,c]=Se({}),[l,d]=h.useState(!1);return h.useEffect(()=>{d(!0)},[]),l?k.jsx("div",{style:{fontFamily:(t=o.general)==null?void 0:t.fontFamily},children:k.jsx(Vr.Provider,{value:{loadConfig:async(u,p,f,y,g,v)=>{r.current=u,n.current=p;const x=await Xi(u,f,y,g);v.current&&(v.current.textContent=x.cssStylesText),a(x.settings),i(x.inlineStyles)}},children:k.jsx(Ka,{settings:o,setSyncedSettings:a,syncedSettingsRef:A,children:k.jsx(Ja,{styles:s,setSyncedStyles:i,syncedStylesRef:c,children:k.jsx(Bi,{children:k.jsx($a,{botIdRef:r,flowRef:n,children:k.jsx(ni,{children:k.jsx(ei,{settings:o,children:k.jsx(oi,{children:e})})})})})})})})}):null},Ji=({id:e,flow:t,settings:r,styles:n,themes:o,plugins:a,setConfigLoaded:A,styleRootRef:s})=>{const i=h.useMemo(()=>e,[]),c=Xr(),{flowRef:l}=pe();return l&&l.current!==t&&(l.current=t),h.useEffect(()=>{(async()=>{var d,u;(d=r.event)!=null&&d.rcbPreLoadChatBot&&(await hn(j.PRE_LOAD_CHATBOT,{botId:i,currPath:null,prevPath:null},{flow:t,settings:r,styles:n,themes:o,plugins:a})).defaultPrevented||(c!=null&&c.loadConfig&&(await c.loadConfig(i,t,r,n,o,s),A(!0)),(u=r.event)!=null&&u.rcbPostLoadChatBot&&hn(j.POST_LOAD_CHATBOT,{botId:i,currPath:null,prevPath:null},{flow:t,settings:r,styles:n,themes:o,plugins:a}))})()},[o]),null},Pn=["Quickstart","API Docs","Examples","Github","Discord"],Zi={start:{message:"Hello, I am Tan Jin 👋! Welcome to React ChatBotify, I'm excited that you are using our chatbot 😊!",transition:{duration:1e3},chatDisabled:!0,path:"show_options"},show_options:{message:"It looks like you have not set up a conversation flow yet. No worries! Here are a few helpful things you can check out to get started:",options:Pn,path:"process_options"},prompt_again:{message:"Do you need any other help?",options:Pn,path:"process_options"},unknown_input:{message:"Sorry, I do not understand your message 😢! If you require further assistance, you may click on the Github option and open an issue there or visit our discord.",options:Pn,path:"process_options"},process_options:{transition:{duration:0},path:e=>{let t="";switch(e.userInput){case"Quickstart":t="https://react-chatbotify.com/docs/introduction/quickstart/";break;case"API Docs":t="https://react-chatbotify.com/docs/api/bot_options";break;case"Examples":t="https://react-chatbotify.com/docs/examples/basic_form";break;case"Github":t="https://github.com/react-chatbotify/react-chatbotify/";break;case"Discord":t="https://discord.gg/6R4DK4G5Zh";break;default:return"unknown_input"}return e.injectMessage("Sit tight! I'll send you right there!"),setTimeout(()=>{window.open(t)},1e3),"repeat"}},repeat:{transition:{duration:3e3},path:"prompt_again"}},$i=({id:e,flow:t,settings:r,styles:n,themes:o,plugins:a,slots:A})=>{const s=h.useMemo(()=>e||"rcb-"+Ft(),[]),i=t&&Object.keys(t).length!==0?t:Zi,c=r||{},l=n||{},d=a||[],[u,p]=h.useState(!1),f=Xr(),y=h.useRef(null),[g,v]=h.useState(o||[]);h.useEffect(()=>{o&&v(o)},[o]);const x=()=>k.jsxs(k.Fragment,{children:[k.jsx(Ji,{styleRootRef:y,id:s,flow:i,settings:c,styles:l,themes:g,plugins:d,setConfigLoaded:p}),u&&k.jsx(Ki,{plugins:a,slots:A})]});return k.jsxs(f==null?Kr:k.Fragment,{children:[k.jsx("style",{ref:y}),k.jsx("div",{id:s,children:x()})]})},es=()=>{const{getBotId:e}=(()=>{const{botIdRef:t}=pe();return{getBotId:h.useCallback(()=>t.current,[t])}})();return{getBotId:e}},Vt=()=>{const{hasFlowStarted:e,restartFlow:t,getFlow:r}=(()=>{const{replaceMessages:n}=at(),{replacePaths:o,goToPath:a}=Gt(),{replaceToasts:A}=pt(),{hasFlowStarted:s}=he(),{flowRef:i,timeoutIdRef:c}=pe(),{settings:l}=ee();return{hasFlowStarted:s,restartFlow:h.useCallback(async()=>{yn(l),c.current&&clearTimeout(c.current),n([]),A([]),o([]),await a("start")},[c,l,n,A,o,yn,a]),getFlow:h.useCallback(()=>(i==null?void 0:i.current)??{},[i])}})();return{hasFlowStarted:e,restartFlow:t,getFlow:r}},Pt=()=>{const{endStreamMessage:e,injectMessage:t,removeMessage:r,simulateStreamMessage:n,streamMessage:o,messages:a,replaceMessages:A,getMessages:s}=at();return{endStreamMessage:e,injectMessage:t,removeMessage:r,simulateStreamMessage:n,streamMessage:o,messages:a,replaceMessages:A,getMessages:s}},Qe=(e,t)=>{const{getBotId:r}=es();h.useEffect(()=>{const n=o=>{o.detail.botId===r()&&t(o)};return window.addEventListener(e,n),()=>{window.removeEventListener(e,n)}},[r,e,t])},Jr=()=>{const{settings:e,replaceSettings:t,updateSettings:r}=Yr();return{settings:e,replaceSettings:t,updateSettings:r}},Zr=()=>{const{textAreaDisabled:e,toggleTextAreaDisabled:t,textAreaSensitiveMode:r,toggleTextAreaSensitiveMode:n,getTextAreaValue:o,setTextAreaValue:a,focusTextArea:A,blurTextArea:s}=it();return{textAreaDisabled:e,toggleTextAreaDisabled:t,textAreaSensitiveMode:r,toggleTextAreaSensitiveMode:n,getTextAreaValue:o,setTextAreaValue:a,focusTextArea:A,blurTextArea:s}},$r=()=>{const{showChatHistory:e,hasChatHistoryLoaded:t}=Cn();return{showChatHistory:e,getHistoryMessages:Ct,setHistoryMessages:mn,hasChatHistoryLoaded:t}},Sn={a:{content:9,self:!1,type:105},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:9,void:!0},body:{content:127},button:{content:8,type:105},caption:{content:1,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:97},dd:{content:1,parent:["dl"]},dl:{children:["dt","dd"],type:1},dt:{content:1,invalid:["footer","header"],parent:["dl"]},figcaption:{content:1,parent:["figure"]},footer:{invalid:["footer","header"]},header:{invalid:["footer","header"]},hr:{type:1,void:!0},img:{void:!0},li:{content:1,parent:["ul","ol","menu"]},main:{self:!1},ol:{children:["li"],type:1},picture:{children:["source","img"],type:25},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:8,parent:["ruby","rtc"]},rtc:{content:8,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:8,parent:["details"]},table:{children:["caption","colgroup","thead","tbody","tfoot","tr"],type:1},tbody:{parent:["table"],children:["tr"]},td:{content:1,parent:["tr"]},tfoot:{parent:["table"],children:["tr"]},th:{content:1,parent:["tr"]},thead:{parent:["table"],children:["tr"]},tr:{parent:["table","tbody","thead","tfoot"],children:["th","td"]},track:{parent:["audio","video"],void:!0},ul:{children:["li"],type:1},video:{children:["track","source"]},wbr:{type:9,void:!0}};function st(e){return t=>{Sn[t]={...e,...Sn[t]}}}["address","main","div","figure","p","pre"].forEach(st({content:1,type:65})),["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach(st({content:8,type:73})),["p","pre"].forEach(st({content:8,type:65})),["s","small","span","del","ins"].forEach(st({content:8,type:9})),["article","aside","footer","header","nav","section","blockquote"].forEach(st({content:1,type:67})),["h1","h2","h3","h4","h5","h6"].forEach(st({content:8,type:69})),["audio","canvas","iframe","img","video"].forEach(st({type:89}));const Dn=Object.freeze(Sn),ts=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],ns=Object.keys(Dn).filter(e=>e!=="canvas"&&e!=="iframe"),eo=Object.freeze({alt:1,cite:1,class:1,colspan:3,controls:4,datetime:1,default:4,disabled:4,dir:1,height:1,href:1,id:1,kind:1,label:1,lang:1,loading:1,loop:4,media:1,muted:4,poster:1,rel:1,role:1,rowspan:3,scope:1,sizes:1,span:3,start:3,style:5,src:1,srclang:1,srcset:1,tabindex:1,target:1,title:1,type:1,width:1}),rs=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function Xt(){return Xt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xt.apply(this,arguments)}function to({attributes:e={},className:t,children:r=null,selfClose:n=!1,tagName:o}){const a=o;return n?h.createElement(a,Xt({className:t},e)):h.createElement(a,Xt({className:t},e),r)}class os{attribute(t,r){return r}node(t,r){return r}}function as(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}/*!
|
|
11
11
|
* escape-html
|
|
12
12
|
* Copyright(c) 2012-2013 TJ Holowaychuk
|
|
13
13
|
* Copyright(c) 2015 Andreas Lubbe
|
|
14
14
|
* Copyright(c) 2015 Tiancheng "Timothy" Gu
|
|
15
15
|
* MIT Licensed
|
|
16
|
-
*/var no,ro;const
|
|
16
|
+
*/var no,ro;const is=as(function(){if(ro)return no;ro=1;var e=/["'&<>]/;return no=function(t){var r=""+t,n=e.exec(r);if(!n)return r;var o,a="",A=0,s=0;for(A=n.index;A<r.length;A++){switch(r.charCodeAt(A)){case 34:o=""";break;case 38:o="&";break;case 39:o="'";break;case 60:o="<";break;case 62:o=">";break;default:continue}s!==A&&(a+=r.substring(s,A)),s=A+1,a+=o}return s!==A?a+r.substring(s,A):a}}());function Xe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const ss=/(url|image|image-set)\(/i;class As extends os{attribute(t,r){return t==="style"&&Object.keys(r).forEach(n=>{String(r[n]).match(ss)&&delete r[n]}),r}}const ls=/^<(!doctype|(html|head|body)(\s|>))/i,cs=/^(aria-|data-|\w+:)/iu,us=/{{{(\w+)\/?}}}/;function ds(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}let oo=class{constructor(e,t={},r=[],n=[]){var o;if(Xe(this,"allowed",void 0),Xe(this,"banned",void 0),Xe(this,"blocked",void 0),Xe(this,"container",void 0),Xe(this,"content",[]),Xe(this,"props",void 0),Xe(this,"matchers",void 0),Xe(this,"filters",void 0),Xe(this,"keyIndex",void 0),process.env.NODE_ENV!=="production"&&e&&typeof e!="string")throw new TypeError("Interweave parser requires a valid string.");this.props=t,this.matchers=r,this.filters=[...n,new As],this.keyIndex=-1,this.container=this.createContainer(e||""),this.allowed=new Set((o=t.allowList)!==null&&o!==void 0?o:ns),this.banned=new Set(ts),this.blocked=new Set(t.blockList)}applyAttributeFilters(e,t){return this.filters.reduce((r,n)=>r!==null&&typeof n.attribute=="function"?n.attribute(e,r):r,t)}applyNodeFilters(e,t){return this.filters.reduce((r,n)=>r!==null&&typeof n.node=="function"?n.node(e,r):r,t)}applyMatchers(e,t){const r={},{props:n}=this;let o=e,a=0,A=null;return this.matchers.forEach(s=>{const i=s.asTag().toLowerCase(),c=this.getTagConfig(i);if(n[s.inverseName]||!this.isTagAllowed(i)||!this.canRenderChild(t,c))return;let l="";for(;o&&(A=s.match(o));){const{index:d,length:u,match:p,valid:f,void:y,...g}=A,v=s.propName+String(a);d>0&&(l+=o.slice(0,d)),f?(l+=y?`{{{${v}/}}}`:`{{{${v}}}}${p}{{{/${v}}}}`,this.keyIndex+=1,a+=1,r[v]={children:p,matcher:s,props:{...n,...g,key:this.keyIndex}}):l+=p,s.greedy?(o=l+o.slice(d+u),l=""):o=o.slice(d+(u||p.length))}s.greedy||(o=l+o)}),a===0?e:this.replaceTokens(o,r)}canRenderChild(e,t){return!(!e.tagName||!t.tagName||e.void)&&(e.children.length>0?e.children.includes(t.tagName):!(e.invalid.length>0&&e.invalid.includes(t.tagName))&&(t.parent.length>0?t.parent.includes(e.tagName):!(!e.self&&e.tagName===t.tagName)&&!!(e&&e.content&t.type)))}convertLineBreaks(e){const{noHtml:t,disableLineBreaks:r}=this.props;if(t||r||e.match(/<((?:\/[ a-z]+)|(?:[ a-z]+\/))>/gi))return e;let n=e.replace(/\r\n/g,`
|
|
17
17
|
`);return n=n.replace(/\n{3,}/g,`
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
`),n=n.replace(/\n/g,"<br/>"),n}createContainer(e){var t;const r=(typeof global<"u"&&global.INTERWEAVE_SSR_POLYFILL||uA)();if(!r)return;const n=(t=this.props.containerTagName)!==null&&t!==void 0?t:"body",o=n==="body"||n==="fragment"?r.body:r.createElement(n);if(e.match(sA)){if(process.env.NODE_ENV!=="production")throw new Error("HTML documents as Interweave content are not supported.")}else o.innerHTML=this.convertLineBreaks(this.props.escapeHtml?aA(e):e);return o}extractAttributes(e){const{allowAttributes:t}=this.props,r={};let n=0;return e.nodeType===1&&e.attributes&&([...e.attributes].forEach(o=>{const{name:a,value:s}=o,A=a.toLowerCase(),i=eo[A]||eo[a];if(!this.isSafe(e)||!A.match(lA)&&(!t&&(!i||i===2)||A.startsWith("on")||s.replace(/(\s|\0|�([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let c=A==="style"?this.extractStyleAttribute(e):s;i===4?c=!0:i===3?c=Number.parseFloat(String(c)):i!==5&&(c=String(c)),r[nA[A]||A]=this.applyAttributeFilters(A,c),n+=1}),n!==0)?r:null}extractStyleAttribute(e){const t={};return Array.from(e.style).forEach(r=>{const n=e.style[r];(typeof n=="string"||typeof n=="number")&&(t[r.replace(/-([a-z])/g,(o,a)=>String(a).toUpperCase())]=n)}),t}getTagConfig(e){const t={children:[],content:0,invalid:[],parent:[],self:!0,tagName:"",type:0,void:!1};return Dn[e]?{...t,...Dn[e],tagName:e}:t}isSafe(e){if(typeof HTMLAnchorElement<"u"&&e instanceof HTMLAnchorElement){const t=e.getAttribute("href");if(t!=null&&t.startsWith("#"))return!0;const r=e.protocol.toLowerCase();return r===":"||r==="http:"||r==="https:"||r==="mailto:"||r==="tel:"}return!0}isTagAllowed(e){return!this.banned.has(e)&&!this.blocked.has(e)&&(this.props.allowElements||this.allowed.has(e))}parse(){return this.container?this.parseNode(this.container,this.getTagConfig(this.container.nodeName.toLowerCase())):[]}parseNode(e,t){const{noHtml:r,noHtmlExceptMatchers:n,allowElements:o,transform:a,transformOnlyAllowList:s}=this.props;let A=[],i="";return[...e.childNodes].forEach(c=>{if(c.nodeType===1){const d=c.nodeName.toLowerCase(),u=this.getTagConfig(d);i&&(A.push(i),i="");const p=this.applyNodeFilters(d,c);if(!p)return;let f;if(a&&(!s||this.isTagAllowed(d))){this.keyIndex+=1;const y=this.keyIndex;f=this.parseNode(p,u);const g=a(p,f,u);if(g===null)return;if(typeof g<"u")return void A.push(h.cloneElement(g,{key:y}));this.keyIndex=y-1}if(this.banned.has(d))return;if(r||n&&d!=="br"||!this.isTagAllowed(d)||!o&&!this.canRenderChild(t,u))A=[...A,...this.parseNode(p,u.tagName?u:t)];else{var l;this.keyIndex+=1;const y=this.extractAttributes(p),g={tagName:d};y&&(g.attributes=y),u.void&&(g.selfClose=u.void),A.push(h.createElement(to,{...g,key:this.keyIndex},(l=f)!==null&&l!==void 0?l:this.parseNode(p,u)))}}else if(c.nodeType===3){const d=r&&!n?c.textContent:this.applyMatchers(c.textContent||"",t);Array.isArray(d)?A=[...A,...d]:i+=d}}),i&&A.push(i),A}replaceTokens(e,t){if(!e.includes("{{{"))return e;const r=[];let n=e,o=null;for(;o=n.match(cA);){const[a,s]=o,A=o.index,i=a.includes("/");if(process.env.NODE_ENV!=="production"&&!t[s])throw new Error(`Token "${s}" found but no matching element to replace with.`);A>0&&(r.push(n.slice(0,A)),n=n.slice(A));const{children:c,matcher:l,props:d}=t[s];let u;if(i)u=a.length,r.push(l.createElement(c,d));else{const p=n.match(new RegExp(`{{{/${s}}}}`));if(process.env.NODE_ENV!=="production"&&!p)throw new Error(`Closing token missing for interpolated element "${s}".`);u=p.index+p[0].length,r.push(l.createElement(this.replaceTokens(n.slice(a.length,p.index),t),d))}n=n.slice(u)}return n.length>0&&r.push(n),r.length===0?"":r.length===1&&typeof r[0]=="string"?r[0]:r}};function dA(e){var t;const{attributes:r,className:n,containerTagName:o,content:a,emptyContent:s,parsedContent:A,tagName:i,noWrap:c}=e,l=(t=o??i)!==null&&t!==void 0?t:"span",d=l==="fragment"||c;let u;if(A)u=A;else{const p=new oo(a??"",e).parse();p.length>0&&(u=p)}return u||(u=s),d?h.createElement(h.Fragment,null,u):h.createElement(to,{attributes:r,className:n,tagName:l},u)}function pA(e){const{attributes:t,className:r,content:n="",disableFilters:o=!1,disableMatchers:a=!1,emptyContent:s=null,filters:A=[],matchers:i=[],onAfterParse:c=null,onBeforeParse:l=null,tagName:d="span",noWrap:u=!1,...p}=e,f=a?[]:i,y=o?[]:A,g=l?[l]:[],v=c?[c]:[];f.forEach(P=>{P.onBeforeParse&&g.push(P.onBeforeParse.bind(P)),P.onAfterParse&&v.push(P.onAfterParse.bind(P))});const x=g.reduce((P,C)=>{const S=C(P,e);if(process.env.NODE_ENV!=="production"&&typeof S!="string")throw new TypeError("Interweave `onBeforeParse` must return a valid HTML string.");return S},n??""),m=new oo(x,p,f,y),E=v.reduce((P,C)=>{const S=C(P,e);if(process.env.NODE_ENV!=="production"&&!Array.isArray(S))throw new TypeError("Interweave `onAfterParse` must return an array of strings and React elements.");return S},m.parse());return h.createElement(dA,{attributes:t,className:r,containerTagName:e.containerTagName,emptyContent:s,noWrap:u,parsedContent:E.length===0?void 0:E,tagName:d})}const fA=({children:e})=>k.jsx("div",{style:{whiteSpace:"normal"},children:k.jsx(pA,{content:typeof e=="string"?e:""})}),hA={autoConfig:!0},ao=(e,t,r)=>{var n;if(!e.detail.currPath)return!1;const o=t[e.detail.currPath];return!!o&&(((n=o.renderHtml)==null?void 0:n.map(a=>a.toUpperCase()).includes(r))??!1)},gA=e=>{const t=[];let r="",n=!1;for(let o=0;o<e.length;o++){const a=e[o];a==="<"?n?(t.push(r),r=a):(n=!0,r=a):a===">"?(r+=a,t.push(r),r="",n=!1):n?r+=a:t.push(a)}return r!==""&&t.push(r),t},mA=e=>{const{getFlow:t}=Vt(),{messages:r,replaceMessages:n}=Pt(),{settings:o}=Jr(),{hasChatHistoryLoaded:a}=$r(),s={...e,...hA},A=s.htmlComponent?s.htmlComponent:fA;h.useEffect(()=>{var l,d;if(a){const u=[...r];for(let p=0;p<u.length&&p<(((l=o.chatHistory)==null?void 0:l.maxEntries)??30);p++){const f=u[p];(d=f.tags)!=null&&d.includes("rcb-html-renderer-plugin:parsed")&&(f.contentWrapper=A)}n(u)}},[a]);const i=async l=>{var d;const u=(d=l.data.message)==null?void 0:d.sender.toUpperCase();typeof l.data.message.content=="string"&&ao(l,t(),u)&&(l.type==="rcb-start-simulate-stream-message"&&(l.data.simulateStreamChunker=gA),l.data.message.contentWrapper=A,l.data.message.tags||(l.data.message.tags=[]),l.data.message.tags.push("rcb-html-renderer-plugin:parsed"))};Qe(j.PRE_INJECT_MESSAGE,i),Qe(j.CHUNK_STREAM_MESSAGE,i),Qe(j.START_STREAM_MESSAGE,i),Qe(j.START_SIMULATE_STREAM_MESSAGE,i),Qe(j.START_SPEAK_AUDIO,async l=>{ao(l,t(),"BOT")&&(l.data.textToRead=(d=>typeof window.DOMParser<"u"?new DOMParser().parseFromString(d,"text/html").body.textContent||"":d.replace(/<\/?[^>]+(>|$)/g,""))(l.data.textToRead))});const c={name:"@rcb-plugins/html-renderer"};return s!=null&&s.autoConfig&&(c.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0,rcbStartSpeakAudio:!0}}),c},yA=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,bA=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,vA={};function io(e,t){return(vA.jsx?bA:yA).test(e)}const wA=/[ \t\n\f\r]/g;function Ao(e){return e.replace(wA,"")===""}class St{constructor(t,r,n){this.property=t,this.normal=r,n&&(this.space=n)}}function so(e,t){const r={},n={};let o=-1;for(;++o<e.length;)Object.assign(r,e[o].property),Object.assign(n,e[o].normal);return new St(r,n,t)}function Bn(e){return e.toLowerCase()}St.prototype.property={},St.prototype.normal={},St.prototype.space=null;class Me{constructor(t,r){this.property=t,this.attribute=r}}Me.prototype.space=null,Me.prototype.boolean=!1,Me.prototype.booleanish=!1,Me.prototype.overloadedBoolean=!1,Me.prototype.number=!1,Me.prototype.commaSeparated=!1,Me.prototype.spaceSeparated=!1,Me.prototype.commaOrSpaceSeparated=!1,Me.prototype.mustUseProperty=!1,Me.prototype.defined=!1;let xA=0;const J=st(),fe=st(),lo=st(),N=st(),ie=st(),ht=st(),Be=st();function st(){return 2**++xA}const In=Object.freeze(Object.defineProperty({__proto__:null,boolean:J,booleanish:fe,commaOrSpaceSeparated:Be,commaSeparated:ht,number:N,overloadedBoolean:lo,spaceSeparated:ie},Symbol.toStringTag,{value:"Module"})),Tn=Object.keys(In);class Qn extends Me{constructor(t,r,n,o){let a=-1;if(super(t,r),co(this,"space",o),typeof n=="number")for(;++a<Tn.length;){const s=Tn[a];co(this,Tn[a],(n&In[s])===In[s])}}}function co(e,t,r){r&&(e[t]=r)}Qn.prototype.defined=!0;const EA={}.hasOwnProperty;function gt(e){const t={},r={};let n;for(n in e.properties)if(EA.call(e.properties,n)){const o=e.properties[n],a=new Qn(n,e.transform(e.attributes||{},n),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(a.mustUseProperty=!0),t[n]=a,r[Bn(n)]=n,r[Bn(a.attribute)]=n}return new St(t,r,e.space)}const uo=gt({space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),po=gt({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function fo(e,t){return t in e?e[t]:t}function ho(e,t){return fo(e,t.toLowerCase())}const go=gt({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:ho,properties:{xmlns:null,xmlnsXLink:null}}),mo=gt({transform:(e,t)=>t==="role"?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:fe,ariaAutoComplete:null,ariaBusy:fe,ariaChecked:fe,ariaColCount:N,ariaColIndex:N,ariaColSpan:N,ariaControls:ie,ariaCurrent:null,ariaDescribedBy:ie,ariaDetails:null,ariaDisabled:fe,ariaDropEffect:ie,ariaErrorMessage:null,ariaExpanded:fe,ariaFlowTo:ie,ariaGrabbed:fe,ariaHasPopup:null,ariaHidden:fe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ie,ariaLevel:N,ariaLive:null,ariaModal:fe,ariaMultiLine:fe,ariaMultiSelectable:fe,ariaOrientation:null,ariaOwns:ie,ariaPlaceholder:null,ariaPosInSet:N,ariaPressed:fe,ariaReadOnly:fe,ariaRelevant:null,ariaRequired:fe,ariaRoleDescription:ie,ariaRowCount:N,ariaRowIndex:N,ariaRowSpan:N,ariaSelected:fe,ariaSetSize:N,ariaSort:null,ariaValueMax:N,ariaValueMin:N,ariaValueNow:N,ariaValueText:null,role:null}}),kA=gt({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:ho,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ht,acceptCharset:ie,accessKey:ie,action:null,allow:null,allowFullScreen:J,allowPaymentRequest:J,allowUserMedia:J,alt:null,as:null,async:J,autoCapitalize:null,autoComplete:ie,autoFocus:J,autoPlay:J,blocking:ie,capture:null,charSet:null,checked:J,cite:null,className:ie,cols:N,colSpan:null,content:null,contentEditable:fe,controls:J,controlsList:ie,coords:N|ht,crossOrigin:null,data:null,dateTime:null,decoding:null,default:J,defer:J,dir:null,dirName:null,disabled:J,download:lo,draggable:fe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:J,formTarget:null,headers:ie,height:N,hidden:J,high:N,href:null,hrefLang:null,htmlFor:ie,httpEquiv:ie,id:null,imageSizes:null,imageSrcSet:null,inert:J,inputMode:null,integrity:null,is:null,isMap:J,itemId:null,itemProp:ie,itemRef:ie,itemScope:J,itemType:ie,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:J,low:N,manifest:null,max:null,maxLength:N,media:null,method:null,min:null,minLength:N,multiple:J,muted:J,name:null,nonce:null,noModule:J,noValidate:J,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:J,optimum:N,pattern:null,ping:ie,placeholder:null,playsInline:J,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:J,referrerPolicy:null,rel:ie,required:J,reversed:J,rows:N,rowSpan:N,sandbox:ie,scope:null,scoped:J,seamless:J,selected:J,shadowRootClonable:J,shadowRootDelegatesFocus:J,shadowRootMode:null,shape:null,size:N,sizes:null,slot:null,span:N,spellCheck:fe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:N,step:null,style:null,tabIndex:N,target:null,title:null,translate:null,type:null,typeMustMatch:J,useMap:null,value:fe,width:N,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ie,axis:null,background:null,bgColor:null,border:N,borderColor:null,bottomMargin:N,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:J,declare:J,event:null,face:null,frame:null,frameBorder:null,hSpace:N,leftMargin:N,link:null,longDesc:null,lowSrc:null,marginHeight:N,marginWidth:N,noResize:J,noHref:J,noShade:J,noWrap:J,object:null,profile:null,prompt:null,rev:null,rightMargin:N,rules:null,scheme:null,scrolling:fe,standby:null,summary:null,text:null,topMargin:N,valueType:null,version:null,vAlign:null,vLink:null,vSpace:N,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:J,disableRemotePlayback:J,prefix:null,property:null,results:N,security:null,unselectable:null}}),CA=gt({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:fo,properties:{about:Be,accentHeight:N,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:N,amplitude:N,arabicForm:null,ascent:N,attributeName:null,attributeType:null,azimuth:N,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:N,by:null,calcMode:null,capHeight:N,className:ie,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:N,diffuseConstant:N,direction:null,display:null,dur:null,divisor:N,dominantBaseline:null,download:J,dx:null,dy:null,edgeMode:null,editable:null,elevation:N,enableBackground:null,end:null,event:null,exponent:N,externalResourcesRequired:null,fill:null,fillOpacity:N,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ht,g2:ht,glyphName:ht,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:N,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:N,horizOriginX:N,horizOriginY:N,id:null,ideographic:N,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:N,k:N,k1:N,k2:N,k3:N,k4:N,kernelMatrix:Be,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:N,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:N,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:N,overlineThickness:N,paintOrder:null,panose1:null,path:null,pathLength:N,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ie,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:N,pointsAtY:N,pointsAtZ:N,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Be,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Be,rev:Be,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Be,requiredFeatures:Be,requiredFonts:Be,requiredFormats:Be,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:N,specularExponent:N,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:N,strikethroughThickness:N,string:null,stroke:null,strokeDashArray:Be,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:N,strokeOpacity:N,strokeWidth:null,style:null,surfaceScale:N,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Be,tabIndex:N,tableValues:null,target:null,targetX:N,targetY:N,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Be,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:N,underlineThickness:N,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:N,values:null,vAlphabetic:N,vMathematical:N,vectorEffect:null,vHanging:N,vIdeographic:N,version:null,vertAdvY:N,vertOriginX:N,vertOriginY:N,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:N,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),PA=/^data[-\w.:]+$/i,yo=/-[a-z]/g,SA=/[A-Z]/g;function DA(e){return"-"+e.toLowerCase()}function BA(e){return e.charAt(1).toUpperCase()}const IA={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},TA=so([po,uo,go,mo,kA],"html"),Mn=so([po,uo,go,mo,CA],"svg");function bo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var On,vo,wo,mt={},QA=function(){if(wo)return mt;wo=1;var e=mt&&mt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(mt,"__esModule",{value:!0}),mt.default=function(r,n){var o=null;if(!r||typeof r!="string")return o;var a=(0,t.default)(r),s=typeof n=="function";return a.forEach(function(A){if(A.type==="declaration"){var i=A.property,c=A.value;s?n(i,c,A):c&&((o=o||{})[i]=c)}}),o};var t=e(function(){if(vo)return On;vo=1;var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,A=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,i=/^[;\s]*/,c=/^\s+|\s+$/g,l="";function d(u){return u?u.replace(c,l):l}return On=function(u,p){if(typeof u!="string")throw new TypeError("First argument must be a string");if(!u)return[];p=p||{};var f=1,y=1;function g(Q){var B=Q.match(n);B&&(f+=B.length);var O=Q.lastIndexOf(`
|
|
21
|
-
`);y=~O?Q.length-O:y+Q.length}function v(){var Q={line:f,column:y};return function(B){return B.position=new x(Q),P(),B}}function x(Q){this.start=Q,this.end={line:f,column:y},this.source=p.source}function m(Q){var B=new Error(p.source+":"+f+":"+y+": "+Q);if(B.reason=Q,B.filename=p.source,B.line=f,B.column=y,B.source=u,!p.silent)throw B}function E(Q){var B=Q.exec(u);if(B){var O=B[0];return g(O),u=u.slice(O.length),B}}function P(){E(o)}function C(Q){var B;for(Q=Q||[];B=S();)B!==!1&&Q.push(B);return Q}function S(){var Q=v();if(u.charAt(0)=="/"&&u.charAt(1)=="*"){for(var B=2;l!=u.charAt(B)&&(u.charAt(B)!="*"||u.charAt(B+1)!="/");)++B;if(B+=2,l===u.charAt(B-1))return m("End of comment missing");var O=u.slice(2,B-2);return y+=2,g(O),u=u.slice(B),y+=2,Q({type:"comment",comment:O})}}function I(){var Q=v(),B=E(a);if(B){if(S(),!E(s))return m("property missing ':'");var O=E(A),D=Q({type:"declaration",property:d(B[0].replace(r,l)),value:O?d(O[0].replace(r,l)):l});return E(i),D}}return x.prototype.content=u,P(),function(){var Q,B=[];for(C(B);Q=I();)Q!==!1&&(B.push(Q),C(B));return B}()},On}());return mt}();const xo=bo(QA),MA=xo.default||xo,Eo=ko("end"),_n=ko("start");function ko(e){return function(t){const r=t&&t.position&&t.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Dt(e){return e&&typeof e=="object"?"position"in e||"type"in e?Co(e.position):"start"in e||"end"in e?Co(e):"line"in e||"column"in e?Ln(e):"":""}function Ln(e){return Po(e&&e.line)+":"+Po(e&&e.column)}function Co(e){return Ln(e&&e.start)+"-"+Ln(e&&e.end)}function Po(e){return e&&typeof e=="number"?e:1}class ve extends Error{constructor(t,r,n){super(),typeof r=="string"&&(n=r,r=void 0);let o="",a={},s=!1;if(r&&(a="line"in r&&"column"in r||"start"in r&&"end"in r?{place:r}:"type"in r?{ancestors:[r],place:r.position}:{...r}),typeof t=="string"?o=t:!a.cause&&t&&(s=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof n=="string"){const i=n.indexOf(":");i===-1?a.ruleId=n:(a.source=n.slice(0,i),a.ruleId=n.slice(i+1))}if(!a.place&&a.ancestors&&a.ancestors){const i=a.ancestors[a.ancestors.length-1];i&&(a.place=i.position)}const A=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=A?A.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=A?A.line:void 0,this.name=Dt(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=s&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}ve.prototype.file="",ve.prototype.name="",ve.prototype.reason="",ve.prototype.message="",ve.prototype.stack="",ve.prototype.column=void 0,ve.prototype.line=void 0,ve.prototype.ancestors=void 0,ve.prototype.cause=void 0,ve.prototype.fatal=void 0,ve.prototype.place=void 0,ve.prototype.ruleId=void 0,ve.prototype.source=void 0;const Nn={}.hasOwnProperty,OA=new Map,_A=/[A-Z]/g,LA=/-([a-z])/g,NA=new Set(["table","tbody","thead","tfoot","tr"]),HA=new Set(["td","th"]),So="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function UA(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let n;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=function(s,A){return i;function i(c,l,d,u){const p=Array.isArray(d.children),f=_n(c);return A(l,d,u,p,{columnNumber:f?f.column-1:void 0,fileName:s,lineNumber:f?f.line:void 0},void 0)}}(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=function(s,A,i){return c;function c(l,d,u,p){const f=Array.isArray(u.children)?i:A;return p?f(d,u,p):f(d,u)}}(0,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:n,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Mn:TA,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Do(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function Do(e,t,r){return t.type==="element"?function(n,o,a){const s=n.schema;let A=s;o.tagName.toLowerCase()==="svg"&&s.space==="html"&&(A=Mn,n.schema=A),n.ancestors.push(o);const i=Io(n,o.tagName,!1),c=function(d,u){const p={};let f,y;for(y in u.properties)if(y!=="children"&&Nn.call(u.properties,y)){const g=FA(d,y,u.properties[y]);if(g){const[v,x]=g;d.tableCellAlignToStyle&&v==="align"&&typeof x=="string"&&HA.has(u.tagName)?f=x:p[v]=x}}return f&&((p.style||(p.style={}))[d.stylePropertyNameCase==="css"?"text-align":"textAlign"]=f),p}(n,o);let l=Un(n,o);return NA.has(o.tagName)&&(l=l.filter(function(d){return typeof d!="string"||!function(u){return typeof u=="object"?u.type==="text"&&Ao(u.value):Ao(u)}(d)})),Bo(n,c,i,o),Hn(c,l),n.ancestors.pop(),n.schema=s,n.create(o,i,c,a)}(e,t,r):t.type==="mdxFlowExpression"||t.type==="mdxTextExpression"?function(n,o){if(o.data&&o.data.estree&&n.evaluater){const a=o.data.estree.body[0];return a.type,n.evaluater.evaluateExpression(a.expression)}Bt(n,o.position)}(e,t):t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement"?function(n,o,a){const s=n.schema;let A=s;o.name==="svg"&&s.space==="html"&&(A=Mn,n.schema=A),n.ancestors.push(o);const i=o.name===null?n.Fragment:Io(n,o.name,!0),c=function(d,u){const p={};for(const f of u.attributes)if(f.type==="mdxJsxExpressionAttribute")if(f.data&&f.data.estree&&d.evaluater){const y=f.data.estree.body[0];y.type;const g=y.expression;g.type;const v=g.properties[0];v.type,Object.assign(p,d.evaluater.evaluateExpression(v.argument))}else Bt(d,u.position);else{const y=f.name;let g;if(f.value&&typeof f.value=="object")if(f.value.data&&f.value.data.estree&&d.evaluater){const v=f.value.data.estree.body[0];v.type,g=d.evaluater.evaluateExpression(v.expression)}else Bt(d,u.position);else g=f.value===null||f.value;p[y]=g}return p}(n,o),l=Un(n,o);return Bo(n,c,i,o),Hn(c,l),n.ancestors.pop(),n.schema=s,n.create(o,i,c,a)}(e,t,r):t.type==="mdxjsEsm"?function(n,o){if(o.data&&o.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(o.data.estree);Bt(n,o.position)}(e,t):t.type==="root"?function(n,o,a){const s={};return Hn(s,Un(n,o)),n.create(o,n.Fragment,s,a)}(e,t,r):t.type==="text"?function(n,o){return o.value}(0,t):void 0}function Bo(e,t,r,n){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=n)}function Hn(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function Un(e,t){const r=[];let n=-1;const o=e.passKeys?new Map:OA;for(;++n<t.children.length;){const a=t.children[n];let s;if(e.passKeys){const i=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(i){const c=o.get(i)||0;s=i+"-"+c,o.set(i,c+1)}}const A=Do(e,a,s);A!==void 0&&r.push(A)}return r}function FA(e,t,r){const n=function(o,a){const s=Bn(a);let A=a,i=Me;if(s in o.normal)return o.property[o.normal[s]];if(s.length>4&&s.slice(0,4)==="data"&&PA.test(a)){if(a.charAt(4)==="-"){const c=a.slice(5).replace(yo,BA);A="data"+c.charAt(0).toUpperCase()+c.slice(1)}else{const c=a.slice(4);if(!yo.test(c)){let l=c.replace(SA,DA);l.charAt(0)!=="-"&&(l="-"+l),a="data"+l}}i=Qn}return new i(A,a)}(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=n.commaSeparated?function(o){const a={};return(o[o.length-1]===""?[...o,""]:o).join((a.padRight?" ":"")+","+(a.padLeft===!1?"":" ")).trim()}(r):function(o){return o.join(" ").trim()}(r)),n.property==="style"){let o=typeof r=="object"?r:function(a,s){const A={};try{MA(s,i)}catch(c){if(!a.ignoreInvalidStyle){const l=c,d=new ve("Cannot parse `style` attribute",{ancestors:a.ancestors,cause:l,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw d.file=a.filePath||void 0,d.url=So+"#cannot-parse-style-attribute",d}}return A;function i(c,l){let d=c;d.slice(0,2)!=="--"&&(d.slice(0,4)==="-ms-"&&(d="ms-"+d.slice(4)),d=d.replace(LA,RA)),A[d]=l}}(e,String(r));return e.stylePropertyNameCase==="css"&&(o=function(a){const s={};let A;for(A in a)Nn.call(a,A)&&(s[zA(A)]=a[A]);return s}(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&n.space?IA[n.property]||n.property:n.attribute,r]}}function Io(e,t,r){let n;if(r)if(t.includes(".")){const o=t.split(".");let a,s=-1;for(;++s<o.length;){const A=io(o[s])?{type:"Identifier",name:o[s]}:{type:"Literal",value:o[s]};a=a?{type:"MemberExpression",object:a,property:A,computed:!(!s||A.type!=="Literal"),optional:!1}:A}n=a}else n=io(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else n={type:"Literal",value:t};if(n.type==="Literal"){const o=n.value;return Nn.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(n);Bt(e)}function Bt(e,t){const r=new ve("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=So+"#cannot-handle-mdx-estrees-without-createevaluater",r}function zA(e){let t=e.replace(_A,jA);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function RA(e,t){return t.toUpperCase()}function jA(e){return"-"+e.toLowerCase()}const Fn={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Kt={};function To(e,t,r){if(function(n){return!(!n||typeof n!="object")}(e)){if("value"in e)return e.type!=="html"||r?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Qo(e.children,t,r)}return Array.isArray(e)?Qo(e,t,r):""}function Qo(e,t,r){const n=[];let o=-1;for(;++o<e.length;)n[o]=To(e[o],t,r);return n.join("")}const Mo=document.createElement("i");function zn(e){const t="&"+e+";";Mo.innerHTML=t;const r=Mo.textContent;return(r.charCodeAt(r.length-1)!==59||e==="semi")&&r!==t&&r}function Re(e,t,r,n){const o=e.length;let a,s=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,r=r>0?r:0,n.length<1e4)a=Array.from(n),a.unshift(t,r),e.splice(...a);else for(r&&e.splice(t,r);s<n.length;)a=n.slice(s,s+1e4),a.unshift(t,0),e.splice(...a),s+=1e4,t+=1e4}function Oe(e,t){return e.length>0?(Re(e,e.length,0,t),e):t}const Oo={}.hasOwnProperty;function qA(e){const t={};let r=-1;for(;++r<e.length;)GA(t,e[r]);return t}function GA(e,t){let r;for(r in t){const n=(Oo.call(e,r)?e[r]:void 0)||(e[r]={}),o=t[r];let a;if(o)for(a in o){Oo.call(n,a)||(n[a]=[]);const s=o[a];YA(n[a],Array.isArray(s)?s:s?[s]:[])}}}function YA(e,t){let r=-1;const n=[];for(;++r<t.length;)(t[r].add==="after"?e:n).push(t[r]);Re(e,0,0,n)}function _o(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||!(65535&~r)||(65535&r)==65534||r>1114111?"�":String.fromCodePoint(r)}function yt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const je=tt(/[A-Za-z]/),Ie=tt(/[\dA-Za-z]/),WA=tt(/[#-'*+\--9=?A-Z^-~]/);function Rn(e){return e!==null&&(e<32||e===127)}const jn=tt(/\d/),VA=tt(/[\dA-Fa-f]/),XA=tt(/[!-/:-@[-`{-~]/);function V(e){return e!==null&&e<-2}function Ee(e){return e!==null&&(e<0||e===32)}function re(e){return e===-2||e===-1||e===32}const KA=tt(new RegExp("\\p{P}|\\p{S}","u")),JA=tt(/\s/);function tt(e){return function(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function bt(e){const t=[];let r=-1,n=0,o=0;for(;++r<e.length;){const a=e.charCodeAt(r);let s="";if(a===37&&Ie(e.charCodeAt(r+1))&&Ie(e.charCodeAt(r+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(s=String.fromCharCode(a));else if(a>55295&&a<57344){const A=e.charCodeAt(r+1);a<56320&&A>56319&&A<57344?(s=String.fromCharCode(a,A),o=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(n,r),encodeURIComponent(s)),n=r+o+1,s=""),o&&(r+=o,o=0)}return t.join("")+e.slice(n)}function Ae(e,t,r,n){const o=n?n-1:Number.POSITIVE_INFINITY;let a=0;return function(A){return re(A)?(e.enter(r),s(A)):t(A)};function s(A){return re(A)&&a++<o?(e.consume(A),s):(e.exit(r),t(A))}}const ZA={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(a){return a===null?void e.consume(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ae(e,t,"linePrefix"))},function(a){return e.enter("paragraph"),n(a)});let r;return t;function n(a){const s=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=s),r=s,o(a)}function o(a){return a===null?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(a)):V(a)?(e.consume(a),e.exit("chunkText"),n):(e.consume(a),o)}}},$A={tokenize:function(e){const t=this,r=[];let n,o,a,s=0;return A;function A(m){if(s<r.length){const E=r[s];return t.containerState=E[1],e.attempt(E[0].continuation,i,c)(m)}return c(m)}function i(m){if(s++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,n&&x();const E=t.events.length;let P,C=E;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){P=t.events[C][1].end;break}v(s);let S=E;for(;S<t.events.length;)t.events[S][1].end={...P},S++;return Re(t.events,C+1,0,t.events.slice(E)),t.events.length=S,c(m)}return A(m)}function c(m){if(s===r.length){if(!n)return u(m);if(n.currentConstruct&&n.currentConstruct.concrete)return f(m);t.interrupt=!(!n.currentConstruct||n._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Lo,l,d)(m)}function l(m){return n&&x(),v(s),u(m)}function d(m){return t.parser.lazy[t.now().line]=s!==r.length,a=t.now().offset,f(m)}function u(m){return t.containerState={},e.attempt(Lo,p,f)(m)}function p(m){return s++,r.push([t.currentConstruct,t.containerState]),u(m)}function f(m){return m===null?(n&&x(),v(0),void e.consume(m)):(n=n||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:n,contentType:"flow",previous:o}),y(m))}function y(m){return m===null?(g(e.exit("chunkFlow"),!0),v(0),void e.consume(m)):V(m)?(e.consume(m),g(e.exit("chunkFlow")),s=0,t.interrupt=void 0,A):(e.consume(m),y)}function g(m,E){const P=t.sliceStream(m);if(E&&P.push(null),m.previous=o,o&&(o.next=m),o=m,n.defineSkip(m.start),n.write(P),t.parser.lazy[m.start.line]){let C=n.events.length;for(;C--;)if(n.events[C][1].start.offset<a&&(!n.events[C][1].end||n.events[C][1].end.offset>a))return;const S=t.events.length;let I,Q,B=S;for(;B--;)if(t.events[B][0]==="exit"&&t.events[B][1].type==="chunkFlow"){if(I){Q=t.events[B][1].end;break}I=!0}for(v(s),C=S;C<t.events.length;)t.events[C][1].end={...Q},C++;Re(t.events,B+1,0,t.events.slice(S)),t.events.length=C}}function v(m){let E=r.length;for(;E-- >m;){const P=r[E];t.containerState=P[1],P[0].exit.call(t,e)}r.length=m}function x(){n.write([null]),o=void 0,n=void 0,t.containerState._closeFlow=void 0}}},Lo={tokenize:function(e,t,r){return Ae(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function No(e){return e===null||Ee(e)||JA(e)?1:KA(e)?2:void 0}function qn(e,t,r){const n=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!n.includes(a)&&(t=a(t,r),n.push(a))}return t}const Gn={name:"attention",resolveAll:function(e,t){let r,n,o,a,s,A,i,c,l=-1;for(;++l<e.length;)if(e[l][0]==="enter"&&e[l][1].type==="attentionSequence"&&e[l][1]._close){for(r=l;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[l][1]).charCodeAt(0)){if((e[r][1]._close||e[l][1]._open)&&(e[l][1].end.offset-e[l][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[l][1].end.offset-e[l][1].start.offset)%3))continue;A=e[r][1].end.offset-e[r][1].start.offset>1&&e[l][1].end.offset-e[l][1].start.offset>1?2:1;const d={...e[r][1].end},u={...e[l][1].start};Ho(d,-A),Ho(u,A),a={type:A>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},s={type:A>1?"strongSequence":"emphasisSequence",start:{...e[l][1].start},end:u},o={type:A>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[l][1].start}},n={type:A>1?"strong":"emphasis",start:{...a.start},end:{...s.end}},e[r][1].end={...a.start},e[l][1].start={...s.end},i=[],e[r][1].end.offset-e[r][1].start.offset&&(i=Oe(i,[["enter",e[r][1],t],["exit",e[r][1],t]])),i=Oe(i,[["enter",n,t],["enter",a,t],["exit",a,t],["enter",o,t]]),i=Oe(i,qn(t.parser.constructs.insideSpan.null,e.slice(r+1,l),t)),i=Oe(i,[["exit",o,t],["enter",s,t],["exit",s,t],["exit",n,t]]),e[l][1].end.offset-e[l][1].start.offset?(c=2,i=Oe(i,[["enter",e[l][1],t],["exit",e[l][1],t]])):c=0,Re(e,r-1,l-r+3,i),l=r+i.length-c-2;break}}for(l=-1;++l<e.length;)e[l][1].type==="attentionSequence"&&(e[l][1].type="data");return e},tokenize:function(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,o=No(n);let a;return function(A){return a=A,e.enter("attentionSequence"),s(A)};function s(A){if(A===a)return e.consume(A),s;const i=e.exit("attentionSequence"),c=No(A),l=!c||c===2&&o||r.includes(A),d=!o||o===2&&c||r.includes(n);return i._open=!!(a===42?l:l&&(o||!d)),i._close=!!(a===42?d:d&&(c||!l)),t(A)}}};function Ho(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const es={name:"autolink",tokenize:function(e,t,r){let n=0;return function(u){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(u),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(u){return je(u)?(e.consume(u),a):u===64?r(u):i(u)}function a(u){return u===43||u===45||u===46||Ie(u)?(n=1,s(u)):i(u)}function s(u){return u===58?(e.consume(u),n=0,A):(u===43||u===45||u===46||Ie(u))&&n++<32?(e.consume(u),s):(n=0,i(u))}function A(u){return u===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(u),e.exit("autolinkMarker"),e.exit("autolink"),t):u===null||u===32||u===60||Rn(u)?r(u):(e.consume(u),A)}function i(u){return u===64?(e.consume(u),c):WA(u)?(e.consume(u),i):r(u)}function c(u){return Ie(u)?l(u):r(u)}function l(u){return u===46?(e.consume(u),n=0,c):u===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(u),e.exit("autolinkMarker"),e.exit("autolink"),t):d(u)}function d(u){if((u===45||Ie(u))&&n++<63){const p=u===45?d:l;return e.consume(u),p}return r(u)}}},Jt={partial:!0,tokenize:function(e,t,r){return function(o){return re(o)?Ae(e,n,"linePrefix")(o):n(o)};function n(o){return o===null||V(o)?t(o):r(o)}}},Uo={continuation:{tokenize:function(e,t,r){const n=this;return function(a){return re(a)?Ae(e,o,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)};function o(a){return e.attempt(Uo,t,r)(a)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,r){const n=this;return function(a){if(a===62){const s=n.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),o}return r(a)};function o(a){return re(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}},Fo={name:"characterEscape",tokenize:function(e,t,r){return function(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),n};function n(o){return XA(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(o)}}},zo={name:"characterReference",tokenize:function(e,t,r){const n=this;let o,a,s=0;return function(l){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(l),e.exit("characterReferenceMarker"),A};function A(l){return l===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(l),e.exit("characterReferenceMarkerNumeric"),i):(e.enter("characterReferenceValue"),o=31,a=Ie,c(l))}function i(l){return l===88||l===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(l),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=VA,c):(e.enter("characterReferenceValue"),o=7,a=jn,c(l))}function c(l){if(l===59&&s){const d=e.exit("characterReferenceValue");return a!==Ie||zn(n.sliceSerialize(d))?(e.enter("characterReferenceMarker"),e.consume(l),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):r(l)}return a(l)&&s++<o?(e.consume(l),c):r(l)}}},Ro={partial:!0,tokenize:function(e,t,r){const n=this;return function(a){return a===null?r(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)};function o(a){return n.parser.lazy[n.now().line]?r(a):t(a)}}},jo={concrete:!0,name:"codeFenced",tokenize:function(e,t,r){const n=this,o={partial:!0,tokenize:function(m,E,P){let C=0;return S;function S(D){return m.enter("lineEnding"),m.consume(D),m.exit("lineEnding"),I}function I(D){return m.enter("codeFencedFence"),re(D)?Ae(m,Q,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):Q(D)}function Q(D){return D===a?(m.enter("codeFencedFenceSequence"),B(D)):P(D)}function B(D){return D===a?(C++,m.consume(D),B):C>=A?(m.exit("codeFencedFenceSequence"),re(D)?Ae(m,O,"whitespace")(D):O(D)):P(D)}function O(D){return D===null||V(D)?(m.exit("codeFencedFence"),E(D)):P(D)}}};let a,s=0,A=0;return function(m){return function(E){const P=n.events[n.events.length-1];return s=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,a=E,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),i(E)}(m)};function i(m){return m===a?(A++,e.consume(m),i):A<3?r(m):(e.exit("codeFencedFenceSequence"),re(m)?Ae(e,c,"whitespace")(m):c(m))}function c(m){return m===null||V(m)?(e.exit("codeFencedFence"),n.interrupt?t(m):e.check(Ro,p,x)(m)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),l(m))}function l(m){return m===null||V(m)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(m)):re(m)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ae(e,d,"whitespace")(m)):m===96&&m===a?r(m):(e.consume(m),l)}function d(m){return m===null||V(m)?c(m):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),u(m))}function u(m){return m===null||V(m)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(m)):m===96&&m===a?r(m):(e.consume(m),u)}function p(m){return e.attempt(o,x,f)(m)}function f(m){return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),y}function y(m){return s>0&&re(m)?Ae(e,g,"linePrefix",s+1)(m):g(m)}function g(m){return m===null||V(m)?e.check(Ro,p,x)(m):(e.enter("codeFlowValue"),v(m))}function v(m){return m===null||V(m)?(e.exit("codeFlowValue"),g(m)):(e.consume(m),v)}function x(m){return e.exit("codeFenced"),t(m)}}},Yn={name:"codeIndented",tokenize:function(e,t,r){const n=this;return function(i){return e.enter("codeIndented"),Ae(e,o,"linePrefix",5)(i)};function o(i){const c=n.events[n.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?a(i):r(i)}function a(i){return i===null?A(i):V(i)?e.attempt(ts,a,A)(i):(e.enter("codeFlowValue"),s(i))}function s(i){return i===null||V(i)?(e.exit("codeFlowValue"),a(i)):(e.consume(i),s)}function A(i){return e.exit("codeIndented"),t(i)}}},ts={partial:!0,tokenize:function(e,t,r){const n=this;return o;function o(s){return n.parser.lazy[n.now().line]?r(s):V(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):Ae(e,a,"linePrefix",5)(s)}function a(s){const A=n.events[n.events.length-1];return A&&A[1].type==="linePrefix"&&A[2].sliceSerialize(A[1],!0).length>=4?t(s):V(s)?o(s):r(s)}}},ns={name:"codeText",previous:function(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"},resolve:function(e){let t,r,n=e.length-4,o=3;if(!(e[o][1].type!=="lineEnding"&&e[o][1].type!=="space"||e[n][1].type!=="lineEnding"&&e[n][1].type!=="space")){for(t=o;++t<n;)if(e[t][1].type==="codeTextData"){e[o][1].type="codeTextPadding",e[n][1].type="codeTextPadding",o+=2,n-=2;break}}for(t=o-1,n++;++t<=n;)r===void 0?t!==n&&e[t][1].type!=="lineEnding"&&(r=t):(t===n||e[t][1].type==="lineEnding")&&(e[r][1].type="codeTextData",t!==r+2&&(e[r][1].end=e[t-1][1].end,e.splice(r+2,t-r-2),n-=t-r-2,t=r+2),r=void 0);return e},tokenize:function(e,t,r){let n,o,a=0;return function(l){return e.enter("codeText"),e.enter("codeTextSequence"),s(l)};function s(l){return l===96?(e.consume(l),a++,s):(e.exit("codeTextSequence"),A(l))}function A(l){return l===null?r(l):l===32?(e.enter("space"),e.consume(l),e.exit("space"),A):l===96?(o=e.enter("codeTextSequence"),n=0,c(l)):V(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),A):(e.enter("codeTextData"),i(l))}function i(l){return l===null||l===32||l===96||V(l)?(e.exit("codeTextData"),A(l)):(e.consume(l),i)}function c(l){return l===96?(e.consume(l),n++,c):n===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(l)):(o.type="codeTextData",i(l))}}};class rs{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){const n=r??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(t,n):t>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(t,r,n){const o=r||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return n&&It(this.left,n),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),It(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),It(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const r=this.left.splice(t,Number.POSITIVE_INFINITY);It(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);It(this.left,r.reverse())}}}function It(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function qo(e){const t={};let r,n,o,a,s,A,i,c=-1;const l=new rs(e);for(;++c<l.length;){for(;c in t;)c=t[c];if(r=l.get(c),c&&r[1].type==="chunkFlow"&&l.get(c-1)[1].type==="listItemPrefix"&&(A=r[1]._tokenizer.events,o=0,o<A.length&&A[o][1].type==="lineEndingBlank"&&(o+=2),o<A.length&&A[o][1].type==="content"))for(;++o<A.length&&A[o][1].type!=="content";)A[o][1].type==="chunkText"&&(A[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,os(l,c)),c=t[c],i=!0);else if(r[1]._container){for(o=c,n=void 0;o--;)if(a=l.get(o),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(n&&(l.get(n)[1].type="lineEndingBlank"),a[1].type="lineEnding",n=o);else if(a[1].type!=="linePrefix")break;n&&(r[1].end={...l.get(n)[1].start},s=l.slice(n,c),s.unshift(r),l.splice(n,c-n+1,s))}}return Re(e,0,Number.POSITIVE_INFINITY,l.slice(0)),!i}function os(e,t){const r=e.get(t)[1],n=e.get(t)[2];let o=t-1;const a=[],s=r._tokenizer||n.parser[r.contentType](r.start),A=s.events,i=[],c={};let l,d,u=-1,p=r,f=0,y=0;const g=[y];for(;p;){for(;e.get(++o)[1]!==p;);a.push(o),p._tokenizer||(l=n.sliceStream(p),p.next||l.push(null),d&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(l),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=r;++u<A.length;)A[u][0]==="exit"&&A[u-1][0]==="enter"&&A[u][1].type===A[u-1][1].type&&A[u][1].start.line!==A[u][1].end.line&&(y=u+1,g.push(y),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),u=g.length;u--;){const v=A.slice(g[u],g[u+1]),x=a.pop();i.push([x,x+v.length-1]),e.splice(x,2,v)}for(i.reverse(),u=-1;++u<i.length;)c[f+i[u][0]]=f+i[u][1],f+=i[u][1]-i[u][0]-1;return c}const as={resolve:function(e){return qo(e),e},tokenize:function(e,t){let r;return function(s){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),n(s)};function n(s){return s===null?o(s):V(s)?e.check(is,a,o)(s):(e.consume(s),n)}function o(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,n}}},is={partial:!0,tokenize:function(e,t,r){const n=this;return function(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ae(e,o,"linePrefix")};function o(a){if(a===null||V(a))return r(a);const s=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(n.parser.constructs.flow,r,t)(a)}}};function Go(e,t,r,n,o,a,s,A,i){const c=i||Number.POSITIVE_INFINITY;let l=0;return function(g){return g===60?(e.enter(n),e.enter(o),e.enter(a),e.consume(g),e.exit(a),d):g===null||g===32||g===41||Rn(g)?r(g):(e.enter(n),e.enter(s),e.enter(A),e.enter("chunkString",{contentType:"string"}),f(g))};function d(g){return g===62?(e.enter(a),e.consume(g),e.exit(a),e.exit(o),e.exit(n),t):(e.enter(A),e.enter("chunkString",{contentType:"string"}),u(g))}function u(g){return g===62?(e.exit("chunkString"),e.exit(A),d(g)):g===null||g===60||V(g)?r(g):(e.consume(g),g===92?p:u)}function p(g){return g===60||g===62||g===92?(e.consume(g),u):u(g)}function f(g){return l||g!==null&&g!==41&&!Ee(g)?l<c&&g===40?(e.consume(g),l++,f):g===41?(e.consume(g),l--,f):g===null||g===32||g===40||Rn(g)?r(g):(e.consume(g),g===92?y:f):(e.exit("chunkString"),e.exit(A),e.exit(s),e.exit(n),t(g))}function y(g){return g===40||g===41||g===92?(e.consume(g),f):f(g)}}function Yo(e,t,r,n,o,a){const s=this;let A,i=0;return function(u){return e.enter(n),e.enter(o),e.consume(u),e.exit(o),e.enter(a),c};function c(u){return i>999||u===null||u===91||u===93&&!A||u===94&&!i&&"_hiddenFootnoteSupport"in s.parser.constructs?r(u):u===93?(e.exit(a),e.enter(o),e.consume(u),e.exit(o),e.exit(n),t):V(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),l(u))}function l(u){return u===null||u===91||u===93||V(u)||i++>999?(e.exit("chunkString"),c(u)):(e.consume(u),A||(A=!re(u)),u===92?d:l)}function d(u){return u===91||u===92||u===93?(e.consume(u),i++,l):l(u)}}function Wo(e,t,r,n,o,a){let s;return function(d){return d===34||d===39||d===40?(e.enter(n),e.enter(o),e.consume(d),e.exit(o),s=d===40?41:d,A):r(d)};function A(d){return d===s?(e.enter(o),e.consume(d),e.exit(o),e.exit(n),t):(e.enter(a),i(d))}function i(d){return d===s?(e.exit(a),A(s)):d===null?r(d):V(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Ae(e,i,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===s||d===null||V(d)?(e.exit("chunkString"),i(d)):(e.consume(d),d===92?l:c)}function l(d){return d===s||d===92?(e.consume(d),c):c(d)}}function Tt(e,t){let r;return function n(o){return V(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r=!0,n):re(o)?Ae(e,n,r?"linePrefix":"lineSuffix")(o):t(o)}}const As={name:"definition",tokenize:function(e,t,r){const n=this;let o;return function(d){return e.enter("definition"),function(u){return Yo.call(n,e,a,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(u)}(d)};function a(d){return o=yt(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),s):r(d)}function s(d){return Ee(d)?Tt(e,A)(d):A(d)}function A(d){return Go(e,i,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function i(d){return e.attempt(ss,c,c)(d)}function c(d){return re(d)?Ae(e,l,"whitespace")(d):l(d)}function l(d){return d===null||V(d)?(e.exit("definition"),n.parser.defined.push(o),t(d)):r(d)}}},ss={partial:!0,tokenize:function(e,t,r){return function(s){return Ee(s)?Tt(e,n)(s):r(s)};function n(s){return Wo(e,o,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return re(s)?Ae(e,a,"whitespace")(s):a(s)}function a(s){return s===null||V(s)?t(s):r(s)}}},ls={name:"hardBreakEscape",tokenize:function(e,t,r){return function(o){return e.enter("hardBreakEscape"),e.consume(o),n};function n(o){return V(o)?(e.exit("hardBreakEscape"),t(o)):r(o)}}},cs={name:"headingAtx",resolve:function(e,t){let r,n,o=e.length-2,a=3;return e[a][1].type==="whitespace"&&(a+=2),o-2>a&&e[o][1].type==="whitespace"&&(o-=2),e[o][1].type==="atxHeadingSequence"&&(a===o-1||o-4>a&&e[o-2][1].type==="whitespace")&&(o-=a+1===o?2:4),o>a&&(r={type:"atxHeadingText",start:e[a][1].start,end:e[o][1].end},n={type:"chunkText",start:e[a][1].start,end:e[o][1].end,contentType:"text"},Re(e,a,o-a+1,[["enter",r,t],["enter",n,t],["exit",n,t],["exit",r,t]])),e},tokenize:function(e,t,r){let n=0;return function(i){return e.enter("atxHeading"),function(c){return e.enter("atxHeadingSequence"),o(c)}(i)};function o(i){return i===35&&n++<6?(e.consume(i),o):i===null||Ee(i)?(e.exit("atxHeadingSequence"),a(i)):r(i)}function a(i){return i===35?(e.enter("atxHeadingSequence"),s(i)):i===null||V(i)?(e.exit("atxHeading"),t(i)):re(i)?Ae(e,a,"whitespace")(i):(e.enter("atxHeadingText"),A(i))}function s(i){return i===35?(e.consume(i),s):(e.exit("atxHeadingSequence"),a(i))}function A(i){return i===null||i===35||Ee(i)?(e.exit("atxHeadingText"),a(i)):(e.consume(i),A)}}},us=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Vo=["pre","script","style","textarea"],ds={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&(e[t][0]!=="enter"||e[t][1].type!=="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},tokenize:function(e,t,r){const n=this;let o,a,s,A,i;return function(w){return function(K){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(K),c}(w)};function c(w){return w===33?(e.consume(w),l):w===47?(e.consume(w),a=!0,p):w===63?(e.consume(w),o=3,n.interrupt?t:H):je(w)?(e.consume(w),s=String.fromCharCode(w),f):r(w)}function l(w){return w===45?(e.consume(w),o=2,d):w===91?(e.consume(w),o=5,A=0,u):je(w)?(e.consume(w),o=4,n.interrupt?t:H):r(w)}function d(w){return w===45?(e.consume(w),n.interrupt?t:H):r(w)}function u(w){return w==="CDATA[".charCodeAt(A++)?(e.consume(w),A===6?n.interrupt?t:B:u):r(w)}function p(w){return je(w)?(e.consume(w),s=String.fromCharCode(w),f):r(w)}function f(w){if(w===null||w===47||w===62||Ee(w)){const K=w===47,R=s.toLowerCase();return K||a||!Vo.includes(R)?us.includes(s.toLowerCase())?(o=6,K?(e.consume(w),y):n.interrupt?t(w):B(w)):(o=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(w):a?g(w):v(w)):(o=1,n.interrupt?t(w):B(w))}return w===45||Ie(w)?(e.consume(w),s+=String.fromCharCode(w),f):r(w)}function y(w){return w===62?(e.consume(w),n.interrupt?t:B):r(w)}function g(w){return re(w)?(e.consume(w),g):I(w)}function v(w){return w===47?(e.consume(w),I):w===58||w===95||je(w)?(e.consume(w),x):re(w)?(e.consume(w),v):I(w)}function x(w){return w===45||w===46||w===58||w===95||Ie(w)?(e.consume(w),x):m(w)}function m(w){return w===61?(e.consume(w),E):re(w)?(e.consume(w),m):v(w)}function E(w){return w===null||w===60||w===61||w===62||w===96?r(w):w===34||w===39?(e.consume(w),i=w,P):re(w)?(e.consume(w),E):C(w)}function P(w){return w===i?(e.consume(w),i=null,S):w===null||V(w)?r(w):(e.consume(w),P)}function C(w){return w===null||w===34||w===39||w===47||w===60||w===61||w===62||w===96||Ee(w)?m(w):(e.consume(w),C)}function S(w){return w===47||w===62||re(w)?v(w):r(w)}function I(w){return w===62?(e.consume(w),Q):r(w)}function Q(w){return w===null||V(w)?B(w):re(w)?(e.consume(w),Q):r(w)}function B(w){return w===45&&o===2?(e.consume(w),U):w===60&&o===1?(e.consume(w),L):w===62&&o===4?(e.consume(w),b):w===63&&o===3?(e.consume(w),H):w===93&&o===5?(e.consume(w),_):!V(w)||o!==6&&o!==7?w===null||V(w)?(e.exit("htmlFlowData"),O(w)):(e.consume(w),B):(e.exit("htmlFlowData"),e.check(ps,X,O)(w))}function O(w){return e.check(fs,D,X)(w)}function D(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),M}function M(w){return w===null||V(w)?O(w):(e.enter("htmlFlowData"),B(w))}function U(w){return w===45?(e.consume(w),H):B(w)}function L(w){return w===47?(e.consume(w),s="",F):B(w)}function F(w){if(w===62){const K=s.toLowerCase();return Vo.includes(K)?(e.consume(w),b):B(w)}return je(w)&&s.length<8?(e.consume(w),s+=String.fromCharCode(w),F):B(w)}function _(w){return w===93?(e.consume(w),H):B(w)}function H(w){return w===62?(e.consume(w),b):w===45&&o===2?(e.consume(w),H):B(w)}function b(w){return w===null||V(w)?(e.exit("htmlFlowData"),X(w)):(e.consume(w),b)}function X(w){return e.exit("htmlFlow"),t(w)}}},ps={partial:!0,tokenize:function(e,t,r){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),e.attempt(Jt,t,r)}}},fs={partial:!0,tokenize:function(e,t,r){const n=this;return function(a){return V(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):r(a)};function o(a){return n.parser.lazy[n.now().line]?r(a):t(a)}}},hs={name:"htmlText",tokenize:function(e,t,r){const n=this;let o,a,s;return function(b){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(b),A};function A(b){return b===33?(e.consume(b),i):b===47?(e.consume(b),E):b===63?(e.consume(b),x):je(b)?(e.consume(b),S):r(b)}function i(b){return b===45?(e.consume(b),c):b===91?(e.consume(b),a=0,p):je(b)?(e.consume(b),v):r(b)}function c(b){return b===45?(e.consume(b),u):r(b)}function l(b){return b===null?r(b):b===45?(e.consume(b),d):V(b)?(s=l,F(b)):(e.consume(b),l)}function d(b){return b===45?(e.consume(b),u):l(b)}function u(b){return b===62?L(b):b===45?d(b):l(b)}function p(b){return b==="CDATA[".charCodeAt(a++)?(e.consume(b),a===6?f:p):r(b)}function f(b){return b===null?r(b):b===93?(e.consume(b),y):V(b)?(s=f,F(b)):(e.consume(b),f)}function y(b){return b===93?(e.consume(b),g):f(b)}function g(b){return b===62?L(b):b===93?(e.consume(b),g):f(b)}function v(b){return b===null||b===62?L(b):V(b)?(s=v,F(b)):(e.consume(b),v)}function x(b){return b===null?r(b):b===63?(e.consume(b),m):V(b)?(s=x,F(b)):(e.consume(b),x)}function m(b){return b===62?L(b):x(b)}function E(b){return je(b)?(e.consume(b),P):r(b)}function P(b){return b===45||Ie(b)?(e.consume(b),P):C(b)}function C(b){return V(b)?(s=C,F(b)):re(b)?(e.consume(b),C):L(b)}function S(b){return b===45||Ie(b)?(e.consume(b),S):b===47||b===62||Ee(b)?I(b):r(b)}function I(b){return b===47?(e.consume(b),L):b===58||b===95||je(b)?(e.consume(b),Q):V(b)?(s=I,F(b)):re(b)?(e.consume(b),I):L(b)}function Q(b){return b===45||b===46||b===58||b===95||Ie(b)?(e.consume(b),Q):B(b)}function B(b){return b===61?(e.consume(b),O):V(b)?(s=B,F(b)):re(b)?(e.consume(b),B):I(b)}function O(b){return b===null||b===60||b===61||b===62||b===96?r(b):b===34||b===39?(e.consume(b),o=b,D):V(b)?(s=O,F(b)):re(b)?(e.consume(b),O):(e.consume(b),M)}function D(b){return b===o?(e.consume(b),o=void 0,U):b===null?r(b):V(b)?(s=D,F(b)):(e.consume(b),D)}function M(b){return b===null||b===34||b===39||b===60||b===61||b===96?r(b):b===47||b===62||Ee(b)?I(b):(e.consume(b),M)}function U(b){return b===47||b===62||Ee(b)?I(b):r(b)}function L(b){return b===62?(e.consume(b),e.exit("htmlTextData"),e.exit("htmlText"),t):r(b)}function F(b){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),_}function _(b){return re(b)?Ae(e,H,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):H(b)}function H(b){return e.enter("htmlTextData"),s(b)}}},Wn={name:"labelEnd",resolveAll:function(e){let t=-1;const r=[];for(;++t<e.length;){const n=e[t][1];if(r.push(e[t]),n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd"){const o=n.type==="labelImage"?4:2;n.type="data",t+=o}}return e.length!==r.length&&Re(e,0,e.length,r),e},resolveTo:function(e,t){let r,n,o,a,s=e.length,A=0;for(;s--;)if(r=e[s][1],n){if(r.type==="link"||r.type==="labelLink"&&r._inactive)break;e[s][0]==="enter"&&r.type==="labelLink"&&(r._inactive=!0)}else if(o){if(e[s][0]==="enter"&&(r.type==="labelImage"||r.type==="labelLink")&&!r._balanced&&(n=s,r.type!=="labelLink")){A=2;break}}else r.type==="labelEnd"&&(o=s);const i={type:e[n][1].type==="labelLink"?"link":"image",start:{...e[n][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[n][1].start},end:{...e[o][1].end}},l={type:"labelText",start:{...e[n+A+2][1].end},end:{...e[o-2][1].start}};return a=[["enter",i,t],["enter",c,t]],a=Oe(a,e.slice(n+1,n+A+3)),a=Oe(a,[["enter",l,t]]),a=Oe(a,qn(t.parser.constructs.insideSpan.null,e.slice(n+A+4,o-3),t)),a=Oe(a,[["exit",l,t],e[o-2],e[o-1],["exit",c,t]]),a=Oe(a,e.slice(o+1)),a=Oe(a,[["exit",i,t]]),Re(e,n,e.length,a),e},tokenize:function(e,t,r){const n=this;let o,a,s=n.events.length;for(;s--;)if((n.events[s][1].type==="labelImage"||n.events[s][1].type==="labelLink")&&!n.events[s][1]._balanced){o=n.events[s][1];break}return function(d){return o?o._inactive?l(d):(a=n.parser.defined.includes(yt(n.sliceSerialize({start:o.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),A):r(d)};function A(d){return d===40?e.attempt(gs,c,a?c:l)(d):d===91?e.attempt(ms,c,a?i:l)(d):a?c(d):l(d)}function i(d){return e.attempt(ys,c,l)(d)}function c(d){return t(d)}function l(d){return o._balanced=!0,r(d)}}},gs={tokenize:function(e,t,r){return function(l){return e.enter("resource"),e.enter("resourceMarker"),e.consume(l),e.exit("resourceMarker"),n};function n(l){return Ee(l)?Tt(e,o)(l):o(l)}function o(l){return l===41?c(l):Go(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(l)}function a(l){return Ee(l)?Tt(e,A)(l):c(l)}function s(l){return r(l)}function A(l){return l===34||l===39||l===40?Wo(e,i,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(l):c(l)}function i(l){return Ee(l)?Tt(e,c)(l):c(l)}function c(l){return l===41?(e.enter("resourceMarker"),e.consume(l),e.exit("resourceMarker"),e.exit("resource"),t):r(l)}}},ms={tokenize:function(e,t,r){const n=this;return function(s){return Yo.call(n,e,o,a,"reference","referenceMarker","referenceString")(s)};function o(s){return n.parser.defined.includes(yt(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(s):r(s)}function a(s){return r(s)}}},ys={tokenize:function(e,t,r){return function(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),n};function n(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):r(o)}}},bs={name:"labelStartImage",resolveAll:Wn.resolveAll,tokenize:function(e,t,r){const n=this;return function(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),o};function o(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):r(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(s):t(s)}}},vs={name:"labelStartLink",resolveAll:Wn.resolveAll,tokenize:function(e,t,r){const n=this;return function(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),o};function o(a){return a===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(a):t(a)}}},Vn={name:"lineEnding",tokenize:function(e,t){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ae(e,t,"linePrefix")}}},Zt={name:"thematicBreak",tokenize:function(e,t,r){let n,o=0;return function(A){return e.enter("thematicBreak"),function(i){return n=i,a(i)}(A)};function a(A){return A===n?(e.enter("thematicBreakSequence"),s(A)):o>=3&&(A===null||V(A))?(e.exit("thematicBreak"),t(A)):r(A)}function s(A){return A===n?(e.consume(A),o++,s):(e.exit("thematicBreakSequence"),re(A)?Ae(e,a,"whitespace")(A):a(A))}}},ke={continuation:{tokenize:function(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(Jt,function(a){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,Ae(e,t,"listItemIndent",n.containerState.size+1)(a)},function(a){return n.containerState.furtherBlankLines||!re(a)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,o(a)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(xs,t,o)(a))});function o(a){return n.containerState._closeFlow=!0,n.interrupt=void 0,Ae(e,e.attempt(ke,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,r){const n=this,o=n.events[n.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,s=0;return function(u){const p=n.containerState.type||(u===42||u===43||u===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!n.containerState.marker||u===n.containerState.marker:jn(u)){if(n.containerState.type||(n.containerState.type=p,e.enter(p,{_container:!0})),p==="listUnordered")return e.enter("listItemPrefix"),u===42||u===45?e.check(Zt,r,i)(u):i(u);if(!n.interrupt||u===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),A(u)}return r(u)};function A(u){return jn(u)&&++s<10?(e.consume(u),A):(!n.interrupt||s<2)&&(n.containerState.marker?u===n.containerState.marker:u===41||u===46)?(e.exit("listItemValue"),i(u)):r(u)}function i(u){return e.enter("listItemMarker"),e.consume(u),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||u,e.check(Jt,n.interrupt?r:c,e.attempt(ws,d,l))}function c(u){return n.containerState.initialBlankLine=!0,a++,d(u)}function l(u){return re(u)?(e.enter("listItemPrefixWhitespace"),e.consume(u),e.exit("listItemPrefixWhitespace"),d):r(u)}function d(u){return n.containerState.size=a+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(u)}}},ws={partial:!0,tokenize:function(e,t,r){const n=this;return Ae(e,function(o){const a=n.events[n.events.length-1];return!re(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):r(o)},"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},xs={partial:!0,tokenize:function(e,t,r){const n=this;return Ae(e,function(o){const a=n.events[n.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===n.containerState.size?t(o):r(o)},"listItemIndent",n.containerState.size+1)}},Xo={name:"setextUnderline",resolveTo:function(e,t){let r,n,o,a=e.length;for(;a--;)if(e[a][0]==="enter"){if(e[a][1].type==="content"){r=a;break}e[a][1].type==="paragraph"&&(n=a)}else e[a][1].type==="content"&&e.splice(a,1),!o&&e[a][1].type==="definition"&&(o=a);const s={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[n][1].type="setextHeadingText",o?(e.splice(n,0,["enter",s,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=s,e.push(["exit",s,t]),e},tokenize:function(e,t,r){const n=this;let o;return function(A){let i,c=n.events.length;for(;c--;)if(n.events[c][1].type!=="lineEnding"&&n.events[c][1].type!=="linePrefix"&&n.events[c][1].type!=="content"){i=n.events[c][1].type==="paragraph";break}return n.parser.lazy[n.now().line]||!n.interrupt&&!i?r(A):(e.enter("setextHeadingLine"),o=A,function(l){return e.enter("setextHeadingLineSequence"),a(l)}(A))};function a(A){return A===o?(e.consume(A),a):(e.exit("setextHeadingLineSequence"),re(A)?Ae(e,s,"lineSuffix")(A):s(A))}function s(A){return A===null||V(A)?(e.exit("setextHeadingLine"),t(A)):r(A)}}},Es={tokenize:function(e){const t=this,r=e.attempt(Jt,function(o){return o===null?void e.consume(o):(e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r)},e.attempt(this.parser.constructs.flowInitial,n,Ae(e,e.attempt(this.parser.constructs.flow,n,e.attempt(as,n)),"linePrefix")));return r;function n(o){if(o!==null)return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,r;e.consume(o)}}},ks={resolveAll:Jo()},Cs=Ko("string"),Ps=Ko("text");function Ko(e){return{resolveAll:Jo(e==="text"?Ss:void 0),tokenize:function(t){const r=this,n=this.parser.constructs[e],o=t.attempt(n,a,s);return a;function a(c){return i(c)?o(c):s(c)}function s(c){if(c!==null)return t.enter("data"),t.consume(c),A;t.consume(c)}function A(c){return i(c)?(t.exit("data"),o(c)):(t.consume(c),A)}function i(c){if(c===null)return!0;const l=n[c];let d=-1;if(l)for(;++d<l.length;){const u=l[d];if(!u.previous||u.previous.call(r,r.previous))return!0}return!1}}}}function Jo(e){return function(t,r){let n,o=-1;for(;++o<=t.length;)n===void 0?t[o]&&t[o][1].type==="data"&&(n=o,o++):(!t[o]||t[o][1].type!=="data")&&(o!==n+2&&(t[n][1].end=t[o-1][1].end,t.splice(n+2,o-n-2),o=n+2),n=void 0);return e?e(t,r):t}}function Ss(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const n=e[r-1][1],o=t.sliceStream(n);let a,s=o.length,A=-1,i=0;for(;s--;){const c=o[s];if(typeof c=="string"){for(A=c.length;c.charCodeAt(A-1)===32;)i++,A--;if(A)break;A=-1}else if(c===-2)a=!0,i++;else if(c!==-1){s++;break}}if(i){const c={type:r===e.length||a||i<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?A:n.start._bufferIndex+A,_index:n.start._index+s,line:n.end.line,column:n.end.column-i,offset:n.end.offset-i},end:{...n.end}};n.end={...c.start},n.start.offset===n.end.offset?Object.assign(n,c):(e.splice(r,0,["enter",c,t],["exit",c,t]),r+=2)}r++}return e}const Ds={42:ke,43:ke,45:ke,48:ke,49:ke,50:ke,51:ke,52:ke,53:ke,54:ke,55:ke,56:ke,57:ke,62:Uo},Bs={91:As},Is={[-2]:Yn,[-1]:Yn,32:Yn},Ts={35:cs,42:Zt,45:[Xo,Zt],60:ds,61:Xo,95:Zt,96:jo,126:jo},Qs={38:zo,92:Fo},Ms={[-5]:Vn,[-4]:Vn,[-3]:Vn,33:bs,38:zo,42:Gn,60:[es,hs],91:vs,92:[ls,Fo],93:Wn,95:Gn,96:ns},Os={null:[Gn,ks]},_s=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:Bs,disable:{null:[]},document:Ds,flow:Ts,flowInitial:Is,insideSpan:Os,string:Qs,text:Ms},Symbol.toStringTag,{value:"Module"}));function Ls(e,t,r){let n={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const o={},a=[];let s=[],A=[];const i={attempt:y(function(x,m){g(x,m.from)}),check:y(f),consume:function(x){V(x)?(n.line++,n.column=1,n.offset+=x===-3?2:1,v()):x!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===s[n._index].length&&(n._bufferIndex=-1,n._index++)),c.previous=x},enter:function(x,m){const E=m||{};return E.type=x,E.start=u(),c.events.push(["enter",E,c]),A.push(E),E},exit:function(x){const m=A.pop();return m.end=u(),c.events.push(["exit",m,c]),m},interrupt:y(f,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(x){o[x.line]=x.column,v()},events:[],now:u,parser:e,previous:null,sliceSerialize:function(x,m){return function(E,P){let C=-1;const S=[];let I;for(;++C<E.length;){const Q=E[C];let B;if(typeof Q=="string")B=Q;else switch(Q){case-5:B="\r";break;case-4:B=`
|
|
20
|
+
`),n=n.replace(/\n/g,"<br/>"),n}createContainer(e){var t;const r=(typeof global<"u"&&global.INTERWEAVE_SSR_POLYFILL||ds)();if(!r)return;const n=(t=this.props.containerTagName)!==null&&t!==void 0?t:"body",o=n==="body"||n==="fragment"?r.body:r.createElement(n);if(e.match(ls)){if(process.env.NODE_ENV!=="production")throw new Error("HTML documents as Interweave content are not supported.")}else o.innerHTML=this.convertLineBreaks(this.props.escapeHtml?is(e):e);return o}extractAttributes(e){const{allowAttributes:t}=this.props,r={};let n=0;return e.nodeType===1&&e.attributes&&([...e.attributes].forEach(o=>{const{name:a,value:A}=o,s=a.toLowerCase(),i=eo[s]||eo[a];if(!this.isSafe(e)||!s.match(cs)&&(!t&&(!i||i===2)||s.startsWith("on")||A.replace(/(\s|\0|�([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let c=s==="style"?this.extractStyleAttribute(e):A;i===4?c=!0:i===3?c=Number.parseFloat(String(c)):i!==5&&(c=String(c)),r[rs[s]||s]=this.applyAttributeFilters(s,c),n+=1}),n!==0)?r:null}extractStyleAttribute(e){const t={};return Array.from(e.style).forEach(r=>{const n=e.style[r];(typeof n=="string"||typeof n=="number")&&(t[r.replace(/-([a-z])/g,(o,a)=>String(a).toUpperCase())]=n)}),t}getTagConfig(e){const t={children:[],content:0,invalid:[],parent:[],self:!0,tagName:"",type:0,void:!1};return Dn[e]?{...t,...Dn[e],tagName:e}:t}isSafe(e){if(typeof HTMLAnchorElement<"u"&&e instanceof HTMLAnchorElement){const t=e.getAttribute("href");if(t!=null&&t.startsWith("#"))return!0;const r=e.protocol.toLowerCase();return r===":"||r==="http:"||r==="https:"||r==="mailto:"||r==="tel:"}return!0}isTagAllowed(e){return!this.banned.has(e)&&!this.blocked.has(e)&&(this.props.allowElements||this.allowed.has(e))}parse(){return this.container?this.parseNode(this.container,this.getTagConfig(this.container.nodeName.toLowerCase())):[]}parseNode(e,t){const{noHtml:r,noHtmlExceptMatchers:n,allowElements:o,transform:a,transformOnlyAllowList:A}=this.props;let s=[],i="";return[...e.childNodes].forEach(c=>{if(c.nodeType===1){const d=c.nodeName.toLowerCase(),u=this.getTagConfig(d);i&&(s.push(i),i="");const p=this.applyNodeFilters(d,c);if(!p)return;let f;if(a&&(!A||this.isTagAllowed(d))){this.keyIndex+=1;const y=this.keyIndex;f=this.parseNode(p,u);const g=a(p,f,u);if(g===null)return;if(typeof g<"u")return void s.push(h.cloneElement(g,{key:y}));this.keyIndex=y-1}if(this.banned.has(d))return;if(r||n&&d!=="br"||!this.isTagAllowed(d)||!o&&!this.canRenderChild(t,u))s=[...s,...this.parseNode(p,u.tagName?u:t)];else{var l;this.keyIndex+=1;const y=this.extractAttributes(p),g={tagName:d};y&&(g.attributes=y),u.void&&(g.selfClose=u.void),s.push(h.createElement(to,{...g,key:this.keyIndex},(l=f)!==null&&l!==void 0?l:this.parseNode(p,u)))}}else if(c.nodeType===3){const d=r&&!n?c.textContent:this.applyMatchers(c.textContent||"",t);Array.isArray(d)?s=[...s,...d]:i+=d}}),i&&s.push(i),s}replaceTokens(e,t){if(!e.includes("{{{"))return e;const r=[];let n=e,o=null;for(;o=n.match(us);){const[a,A]=o,s=o.index,i=a.includes("/");if(process.env.NODE_ENV!=="production"&&!t[A])throw new Error(`Token "${A}" found but no matching element to replace with.`);s>0&&(r.push(n.slice(0,s)),n=n.slice(s));const{children:c,matcher:l,props:d}=t[A];let u;if(i)u=a.length,r.push(l.createElement(c,d));else{const p=n.match(new RegExp(`{{{/${A}}}}`));if(process.env.NODE_ENV!=="production"&&!p)throw new Error(`Closing token missing for interpolated element "${A}".`);u=p.index+p[0].length,r.push(l.createElement(this.replaceTokens(n.slice(a.length,p.index),t),d))}n=n.slice(u)}return n.length>0&&r.push(n),r.length===0?"":r.length===1&&typeof r[0]=="string"?r[0]:r}};function ps(e){var t;const{attributes:r,className:n,containerTagName:o,content:a,emptyContent:A,parsedContent:s,tagName:i,noWrap:c}=e,l=(t=o??i)!==null&&t!==void 0?t:"span",d=l==="fragment"||c;let u;if(s)u=s;else{const p=new oo(a??"",e).parse();p.length>0&&(u=p)}return u||(u=A),d?h.createElement(h.Fragment,null,u):h.createElement(to,{attributes:r,className:n,tagName:l},u)}function fs(e){const{attributes:t,className:r,content:n="",disableFilters:o=!1,disableMatchers:a=!1,emptyContent:A=null,filters:s=[],matchers:i=[],onAfterParse:c=null,onBeforeParse:l=null,tagName:d="span",noWrap:u=!1,...p}=e,f=a?[]:i,y=o?[]:s,g=l?[l]:[],v=c?[c]:[];f.forEach(P=>{P.onBeforeParse&&g.push(P.onBeforeParse.bind(P)),P.onAfterParse&&v.push(P.onAfterParse.bind(P))});const x=g.reduce((P,C)=>{const S=C(P,e);if(process.env.NODE_ENV!=="production"&&typeof S!="string")throw new TypeError("Interweave `onBeforeParse` must return a valid HTML string.");return S},n??""),m=new oo(x,p,f,y),E=v.reduce((P,C)=>{const S=C(P,e);if(process.env.NODE_ENV!=="production"&&!Array.isArray(S))throw new TypeError("Interweave `onAfterParse` must return an array of strings and React elements.");return S},m.parse());return h.createElement(ps,{attributes:t,className:r,containerTagName:e.containerTagName,emptyContent:A,noWrap:u,parsedContent:E.length===0?void 0:E,tagName:d})}const hs=({children:e})=>k.jsx("div",{style:{whiteSpace:"normal"},children:k.jsx(fs,{content:typeof e=="string"?e:""})}),gs={autoConfig:!0},ao=(e,t,r)=>{var n;if(!e.detail.currPath)return!1;const o=t[e.detail.currPath];return!!o&&(((n=o.renderHtml)==null?void 0:n.map(a=>a.toUpperCase()).includes(r))??!1)},ms=e=>{const t=[];let r="",n=!1;for(let o=0;o<e.length;o++){const a=e[o];a==="<"?n?(t.push(r),r=a):(n=!0,r=a):a===">"?(r+=a,t.push(r),r="",n=!1):n?r+=a:t.push(a)}return r!==""&&t.push(r),t},ys=e=>{const{getFlow:t}=Vt(),{messages:r,replaceMessages:n}=Pt(),{settings:o}=Jr(),{hasChatHistoryLoaded:a}=$r(),A={...e,...gs},s=A.htmlComponent?A.htmlComponent:hs;h.useEffect(()=>{var l,d;if(a){const u=[...r];for(let p=0;p<u.length&&p<(((l=o.chatHistory)==null?void 0:l.maxEntries)??30);p++){const f=u[p];(d=f.tags)!=null&&d.includes("rcb-html-renderer-plugin:parsed")&&(f.contentWrapper=s)}n(u)}},[a]);const i=async l=>{var d;const u=(d=l.data.message)==null?void 0:d.sender.toUpperCase();typeof l.data.message.content=="string"&&ao(l,t(),u)&&(l.type==="rcb-start-simulate-stream-message"&&(l.data.simulateStreamChunker=ms),l.data.message.contentWrapper=s,l.data.message.tags||(l.data.message.tags=[]),l.data.message.tags.push("rcb-html-renderer-plugin:parsed"))};Qe(j.PRE_INJECT_MESSAGE,i),Qe(j.CHUNK_STREAM_MESSAGE,i),Qe(j.START_STREAM_MESSAGE,i),Qe(j.START_SIMULATE_STREAM_MESSAGE,i),Qe(j.START_SPEAK_AUDIO,async l=>{ao(l,t(),"BOT")&&(l.data.textToRead=(d=>typeof window.DOMParser<"u"?new DOMParser().parseFromString(d,"text/html").body.textContent||"":d.replace(/<\/?[^>]+(>|$)/g,""))(l.data.textToRead))});const c={name:"@rcb-plugins/html-renderer"};return A!=null&&A.autoConfig&&(c.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0,rcbStartSpeakAudio:!0}}),c},bs=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,vs=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ws={};function io(e,t){return(ws.jsx?vs:bs).test(e)}const xs=/[ \t\n\f\r]/g;function so(e){return e.replace(xs,"")===""}class St{constructor(t,r,n){this.property=t,this.normal=r,n&&(this.space=n)}}function Ao(e,t){const r={},n={};let o=-1;for(;++o<e.length;)Object.assign(r,e[o].property),Object.assign(n,e[o].normal);return new St(r,n,t)}function Bn(e){return e.toLowerCase()}St.prototype.property={},St.prototype.normal={},St.prototype.space=null;class Me{constructor(t,r){this.property=t,this.attribute=r}}Me.prototype.space=null,Me.prototype.boolean=!1,Me.prototype.booleanish=!1,Me.prototype.overloadedBoolean=!1,Me.prototype.number=!1,Me.prototype.commaSeparated=!1,Me.prototype.spaceSeparated=!1,Me.prototype.commaOrSpaceSeparated=!1,Me.prototype.mustUseProperty=!1,Me.prototype.defined=!1;let Es=0;const $=At(),fe=At(),lo=At(),N=At(),se=At(),ht=At(),Be=At();function At(){return 2**++Es}const In=Object.freeze(Object.defineProperty({__proto__:null,boolean:$,booleanish:fe,commaOrSpaceSeparated:Be,commaSeparated:ht,number:N,overloadedBoolean:lo,spaceSeparated:se},Symbol.toStringTag,{value:"Module"})),Tn=Object.keys(In);class Qn extends Me{constructor(t,r,n,o){let a=-1;if(super(t,r),co(this,"space",o),typeof n=="number")for(;++a<Tn.length;){const A=Tn[a];co(this,Tn[a],(n&In[A])===In[A])}}}function co(e,t,r){r&&(e[t]=r)}Qn.prototype.defined=!0;const ks={}.hasOwnProperty;function gt(e){const t={},r={};let n;for(n in e.properties)if(ks.call(e.properties,n)){const o=e.properties[n],a=new Qn(n,e.transform(e.attributes||{},n),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(a.mustUseProperty=!0),t[n]=a,r[Bn(n)]=n,r[Bn(a.attribute)]=n}return new St(t,r,e.space)}const uo=gt({space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),po=gt({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function fo(e,t){return t in e?e[t]:t}function ho(e,t){return fo(e,t.toLowerCase())}const go=gt({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:ho,properties:{xmlns:null,xmlnsXLink:null}}),mo=gt({transform:(e,t)=>t==="role"?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:fe,ariaAutoComplete:null,ariaBusy:fe,ariaChecked:fe,ariaColCount:N,ariaColIndex:N,ariaColSpan:N,ariaControls:se,ariaCurrent:null,ariaDescribedBy:se,ariaDetails:null,ariaDisabled:fe,ariaDropEffect:se,ariaErrorMessage:null,ariaExpanded:fe,ariaFlowTo:se,ariaGrabbed:fe,ariaHasPopup:null,ariaHidden:fe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:se,ariaLevel:N,ariaLive:null,ariaModal:fe,ariaMultiLine:fe,ariaMultiSelectable:fe,ariaOrientation:null,ariaOwns:se,ariaPlaceholder:null,ariaPosInSet:N,ariaPressed:fe,ariaReadOnly:fe,ariaRelevant:null,ariaRequired:fe,ariaRoleDescription:se,ariaRowCount:N,ariaRowIndex:N,ariaRowSpan:N,ariaSelected:fe,ariaSetSize:N,ariaSort:null,ariaValueMax:N,ariaValueMin:N,ariaValueNow:N,ariaValueText:null,role:null}}),Cs=gt({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:ho,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ht,acceptCharset:se,accessKey:se,action:null,allow:null,allowFullScreen:$,allowPaymentRequest:$,allowUserMedia:$,alt:null,as:null,async:$,autoCapitalize:null,autoComplete:se,autoFocus:$,autoPlay:$,blocking:se,capture:null,charSet:null,checked:$,cite:null,className:se,cols:N,colSpan:null,content:null,contentEditable:fe,controls:$,controlsList:se,coords:N|ht,crossOrigin:null,data:null,dateTime:null,decoding:null,default:$,defer:$,dir:null,dirName:null,disabled:$,download:lo,draggable:fe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:$,formTarget:null,headers:se,height:N,hidden:$,high:N,href:null,hrefLang:null,htmlFor:se,httpEquiv:se,id:null,imageSizes:null,imageSrcSet:null,inert:$,inputMode:null,integrity:null,is:null,isMap:$,itemId:null,itemProp:se,itemRef:se,itemScope:$,itemType:se,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:$,low:N,manifest:null,max:null,maxLength:N,media:null,method:null,min:null,minLength:N,multiple:$,muted:$,name:null,nonce:null,noModule:$,noValidate:$,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:$,optimum:N,pattern:null,ping:se,placeholder:null,playsInline:$,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:$,referrerPolicy:null,rel:se,required:$,reversed:$,rows:N,rowSpan:N,sandbox:se,scope:null,scoped:$,seamless:$,selected:$,shadowRootClonable:$,shadowRootDelegatesFocus:$,shadowRootMode:null,shape:null,size:N,sizes:null,slot:null,span:N,spellCheck:fe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:N,step:null,style:null,tabIndex:N,target:null,title:null,translate:null,type:null,typeMustMatch:$,useMap:null,value:fe,width:N,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:se,axis:null,background:null,bgColor:null,border:N,borderColor:null,bottomMargin:N,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:$,declare:$,event:null,face:null,frame:null,frameBorder:null,hSpace:N,leftMargin:N,link:null,longDesc:null,lowSrc:null,marginHeight:N,marginWidth:N,noResize:$,noHref:$,noShade:$,noWrap:$,object:null,profile:null,prompt:null,rev:null,rightMargin:N,rules:null,scheme:null,scrolling:fe,standby:null,summary:null,text:null,topMargin:N,valueType:null,version:null,vAlign:null,vLink:null,vSpace:N,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:$,disableRemotePlayback:$,prefix:null,property:null,results:N,security:null,unselectable:null}}),Ps=gt({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:fo,properties:{about:Be,accentHeight:N,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:N,amplitude:N,arabicForm:null,ascent:N,attributeName:null,attributeType:null,azimuth:N,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:N,by:null,calcMode:null,capHeight:N,className:se,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:N,diffuseConstant:N,direction:null,display:null,dur:null,divisor:N,dominantBaseline:null,download:$,dx:null,dy:null,edgeMode:null,editable:null,elevation:N,enableBackground:null,end:null,event:null,exponent:N,externalResourcesRequired:null,fill:null,fillOpacity:N,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ht,g2:ht,glyphName:ht,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:N,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:N,horizOriginX:N,horizOriginY:N,id:null,ideographic:N,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:N,k:N,k1:N,k2:N,k3:N,k4:N,kernelMatrix:Be,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:N,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:N,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:N,overlineThickness:N,paintOrder:null,panose1:null,path:null,pathLength:N,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:se,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:N,pointsAtY:N,pointsAtZ:N,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Be,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Be,rev:Be,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Be,requiredFeatures:Be,requiredFonts:Be,requiredFormats:Be,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:N,specularExponent:N,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:N,strikethroughThickness:N,string:null,stroke:null,strokeDashArray:Be,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:N,strokeOpacity:N,strokeWidth:null,style:null,surfaceScale:N,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Be,tabIndex:N,tableValues:null,target:null,targetX:N,targetY:N,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Be,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:N,underlineThickness:N,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:N,values:null,vAlphabetic:N,vMathematical:N,vectorEffect:null,vHanging:N,vIdeographic:N,version:null,vertAdvY:N,vertOriginX:N,vertOriginY:N,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:N,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),Ss=/^data[-\w.:]+$/i,yo=/-[a-z]/g,Ds=/[A-Z]/g;function Bs(e){return"-"+e.toLowerCase()}function Is(e){return e.charAt(1).toUpperCase()}const Ts={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Qs=Ao([po,uo,go,mo,Cs],"html"),Mn=Ao([po,uo,go,mo,Ps],"svg");function bo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var On,vo,wo,mt={},Ms=function(){if(wo)return mt;wo=1;var e=mt&&mt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(mt,"__esModule",{value:!0}),mt.default=function(r,n){var o=null;if(!r||typeof r!="string")return o;var a=(0,t.default)(r),A=typeof n=="function";return a.forEach(function(s){if(s.type==="declaration"){var i=s.property,c=s.value;A?n(i,c,s):c&&((o=o||{})[i]=c)}}),o};var t=e(function(){if(vo)return On;vo=1;var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,A=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,i=/^[;\s]*/,c=/^\s+|\s+$/g,l="";function d(u){return u?u.replace(c,l):l}return On=function(u,p){if(typeof u!="string")throw new TypeError("First argument must be a string");if(!u)return[];p=p||{};var f=1,y=1;function g(Q){var B=Q.match(n);B&&(f+=B.length);var O=Q.lastIndexOf(`
|
|
21
|
+
`);y=~O?Q.length-O:y+Q.length}function v(){var Q={line:f,column:y};return function(B){return B.position=new x(Q),P(),B}}function x(Q){this.start=Q,this.end={line:f,column:y},this.source=p.source}function m(Q){var B=new Error(p.source+":"+f+":"+y+": "+Q);if(B.reason=Q,B.filename=p.source,B.line=f,B.column=y,B.source=u,!p.silent)throw B}function E(Q){var B=Q.exec(u);if(B){var O=B[0];return g(O),u=u.slice(O.length),B}}function P(){E(o)}function C(Q){var B;for(Q=Q||[];B=S();)B!==!1&&Q.push(B);return Q}function S(){var Q=v();if(u.charAt(0)=="/"&&u.charAt(1)=="*"){for(var B=2;l!=u.charAt(B)&&(u.charAt(B)!="*"||u.charAt(B+1)!="/");)++B;if(B+=2,l===u.charAt(B-1))return m("End of comment missing");var O=u.slice(2,B-2);return y+=2,g(O),u=u.slice(B),y+=2,Q({type:"comment",comment:O})}}function I(){var Q=v(),B=E(a);if(B){if(S(),!E(A))return m("property missing ':'");var O=E(s),D=Q({type:"declaration",property:d(B[0].replace(r,l)),value:O?d(O[0].replace(r,l)):l});return E(i),D}}return x.prototype.content=u,P(),function(){var Q,B=[];for(C(B);Q=I();)Q!==!1&&(B.push(Q),C(B));return B}()},On}());return mt}();const xo=bo(Ms),Os=xo.default||xo,Eo=ko("end"),_n=ko("start");function ko(e){return function(t){const r=t&&t.position&&t.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Dt(e){return e&&typeof e=="object"?"position"in e||"type"in e?Co(e.position):"start"in e||"end"in e?Co(e):"line"in e||"column"in e?Ln(e):"":""}function Ln(e){return Po(e&&e.line)+":"+Po(e&&e.column)}function Co(e){return Ln(e&&e.start)+"-"+Ln(e&&e.end)}function Po(e){return e&&typeof e=="number"?e:1}class ve extends Error{constructor(t,r,n){super(),typeof r=="string"&&(n=r,r=void 0);let o="",a={},A=!1;if(r&&(a="line"in r&&"column"in r||"start"in r&&"end"in r?{place:r}:"type"in r?{ancestors:[r],place:r.position}:{...r}),typeof t=="string"?o=t:!a.cause&&t&&(A=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof n=="string"){const i=n.indexOf(":");i===-1?a.ruleId=n:(a.source=n.slice(0,i),a.ruleId=n.slice(i+1))}if(!a.place&&a.ancestors&&a.ancestors){const i=a.ancestors[a.ancestors.length-1];i&&(a.place=i.position)}const s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=s?s.line:void 0,this.name=Dt(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=A&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}ve.prototype.file="",ve.prototype.name="",ve.prototype.reason="",ve.prototype.message="",ve.prototype.stack="",ve.prototype.column=void 0,ve.prototype.line=void 0,ve.prototype.ancestors=void 0,ve.prototype.cause=void 0,ve.prototype.fatal=void 0,ve.prototype.place=void 0,ve.prototype.ruleId=void 0,ve.prototype.source=void 0;const Nn={}.hasOwnProperty,_s=new Map,Ls=/[A-Z]/g,Ns=/-([a-z])/g,Hs=new Set(["table","tbody","thead","tfoot","tr"]),Us=new Set(["td","th"]),So="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Fs(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let n;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=function(A,s){return i;function i(c,l,d,u){const p=Array.isArray(d.children),f=_n(c);return s(l,d,u,p,{columnNumber:f?f.column-1:void 0,fileName:A,lineNumber:f?f.line:void 0},void 0)}}(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=function(A,s,i){return c;function c(l,d,u,p){const f=Array.isArray(u.children)?i:s;return p?f(d,u,p):f(d,u)}}(0,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:n,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Mn:Qs,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Do(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function Do(e,t,r){return t.type==="element"?function(n,o,a){const A=n.schema;let s=A;o.tagName.toLowerCase()==="svg"&&A.space==="html"&&(s=Mn,n.schema=s),n.ancestors.push(o);const i=Io(n,o.tagName,!1),c=function(d,u){const p={};let f,y;for(y in u.properties)if(y!=="children"&&Nn.call(u.properties,y)){const g=zs(d,y,u.properties[y]);if(g){const[v,x]=g;d.tableCellAlignToStyle&&v==="align"&&typeof x=="string"&&Us.has(u.tagName)?f=x:p[v]=x}}return f&&((p.style||(p.style={}))[d.stylePropertyNameCase==="css"?"text-align":"textAlign"]=f),p}(n,o);let l=Un(n,o);return Hs.has(o.tagName)&&(l=l.filter(function(d){return typeof d!="string"||!function(u){return typeof u=="object"?u.type==="text"&&so(u.value):so(u)}(d)})),Bo(n,c,i,o),Hn(c,l),n.ancestors.pop(),n.schema=A,n.create(o,i,c,a)}(e,t,r):t.type==="mdxFlowExpression"||t.type==="mdxTextExpression"?function(n,o){if(o.data&&o.data.estree&&n.evaluater){const a=o.data.estree.body[0];return a.type,n.evaluater.evaluateExpression(a.expression)}Bt(n,o.position)}(e,t):t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement"?function(n,o,a){const A=n.schema;let s=A;o.name==="svg"&&A.space==="html"&&(s=Mn,n.schema=s),n.ancestors.push(o);const i=o.name===null?n.Fragment:Io(n,o.name,!0),c=function(d,u){const p={};for(const f of u.attributes)if(f.type==="mdxJsxExpressionAttribute")if(f.data&&f.data.estree&&d.evaluater){const y=f.data.estree.body[0];y.type;const g=y.expression;g.type;const v=g.properties[0];v.type,Object.assign(p,d.evaluater.evaluateExpression(v.argument))}else Bt(d,u.position);else{const y=f.name;let g;if(f.value&&typeof f.value=="object")if(f.value.data&&f.value.data.estree&&d.evaluater){const v=f.value.data.estree.body[0];v.type,g=d.evaluater.evaluateExpression(v.expression)}else Bt(d,u.position);else g=f.value===null||f.value;p[y]=g}return p}(n,o),l=Un(n,o);return Bo(n,c,i,o),Hn(c,l),n.ancestors.pop(),n.schema=A,n.create(o,i,c,a)}(e,t,r):t.type==="mdxjsEsm"?function(n,o){if(o.data&&o.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(o.data.estree);Bt(n,o.position)}(e,t):t.type==="root"?function(n,o,a){const A={};return Hn(A,Un(n,o)),n.create(o,n.Fragment,A,a)}(e,t,r):t.type==="text"?function(n,o){return o.value}(0,t):void 0}function Bo(e,t,r,n){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=n)}function Hn(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function Un(e,t){const r=[];let n=-1;const o=e.passKeys?new Map:_s;for(;++n<t.children.length;){const a=t.children[n];let A;if(e.passKeys){const i=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(i){const c=o.get(i)||0;A=i+"-"+c,o.set(i,c+1)}}const s=Do(e,a,A);s!==void 0&&r.push(s)}return r}function zs(e,t,r){const n=function(o,a){const A=Bn(a);let s=a,i=Me;if(A in o.normal)return o.property[o.normal[A]];if(A.length>4&&A.slice(0,4)==="data"&&Ss.test(a)){if(a.charAt(4)==="-"){const c=a.slice(5).replace(yo,Is);s="data"+c.charAt(0).toUpperCase()+c.slice(1)}else{const c=a.slice(4);if(!yo.test(c)){let l=c.replace(Ds,Bs);l.charAt(0)!=="-"&&(l="-"+l),a="data"+l}}i=Qn}return new i(s,a)}(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=n.commaSeparated?function(o){const a={};return(o[o.length-1]===""?[...o,""]:o).join((a.padRight?" ":"")+","+(a.padLeft===!1?"":" ")).trim()}(r):function(o){return o.join(" ").trim()}(r)),n.property==="style"){let o=typeof r=="object"?r:function(a,A){const s={};try{Os(A,i)}catch(c){if(!a.ignoreInvalidStyle){const l=c,d=new ve("Cannot parse `style` attribute",{ancestors:a.ancestors,cause:l,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw d.file=a.filePath||void 0,d.url=So+"#cannot-parse-style-attribute",d}}return s;function i(c,l){let d=c;d.slice(0,2)!=="--"&&(d.slice(0,4)==="-ms-"&&(d="ms-"+d.slice(4)),d=d.replace(Ns,js)),s[d]=l}}(e,String(r));return e.stylePropertyNameCase==="css"&&(o=function(a){const A={};let s;for(s in a)Nn.call(a,s)&&(A[Rs(s)]=a[s]);return A}(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&n.space?Ts[n.property]||n.property:n.attribute,r]}}function Io(e,t,r){let n;if(r)if(t.includes(".")){const o=t.split(".");let a,A=-1;for(;++A<o.length;){const s=io(o[A])?{type:"Identifier",name:o[A]}:{type:"Literal",value:o[A]};a=a?{type:"MemberExpression",object:a,property:s,computed:!(!A||s.type!=="Literal"),optional:!1}:s}n=a}else n=io(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else n={type:"Literal",value:t};if(n.type==="Literal"){const o=n.value;return Nn.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(n);Bt(e)}function Bt(e,t){const r=new ve("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=So+"#cannot-handle-mdx-estrees-without-createevaluater",r}function Rs(e){let t=e.replace(Ls,qs);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function js(e,t){return t.toUpperCase()}function qs(e){return"-"+e.toLowerCase()}const Fn={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Kt={};function To(e,t,r){if(function(n){return!(!n||typeof n!="object")}(e)){if("value"in e)return e.type!=="html"||r?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Qo(e.children,t,r)}return Array.isArray(e)?Qo(e,t,r):""}function Qo(e,t,r){const n=[];let o=-1;for(;++o<e.length;)n[o]=To(e[o],t,r);return n.join("")}const Mo=document.createElement("i");function zn(e){const t="&"+e+";";Mo.innerHTML=t;const r=Mo.textContent;return(r.charCodeAt(r.length-1)!==59||e==="semi")&&r!==t&&r}function Re(e,t,r,n){const o=e.length;let a,A=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,r=r>0?r:0,n.length<1e4)a=Array.from(n),a.unshift(t,r),e.splice(...a);else for(r&&e.splice(t,r);A<n.length;)a=n.slice(A,A+1e4),a.unshift(t,0),e.splice(...a),A+=1e4,t+=1e4}function Oe(e,t){return e.length>0?(Re(e,e.length,0,t),e):t}const Oo={}.hasOwnProperty;function Gs(e){const t={};let r=-1;for(;++r<e.length;)Ys(t,e[r]);return t}function Ys(e,t){let r;for(r in t){const n=(Oo.call(e,r)?e[r]:void 0)||(e[r]={}),o=t[r];let a;if(o)for(a in o){Oo.call(n,a)||(n[a]=[]);const A=o[a];Ws(n[a],Array.isArray(A)?A:A?[A]:[])}}}function Ws(e,t){let r=-1;const n=[];for(;++r<t.length;)(t[r].add==="after"?e:n).push(t[r]);Re(e,0,0,n)}function _o(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||!(65535&~r)||(65535&r)==65534||r>1114111?"�":String.fromCodePoint(r)}function yt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const je=tt(/[A-Za-z]/),Ie=tt(/[\dA-Za-z]/),Vs=tt(/[#-'*+\--9=?A-Z^-~]/);function Rn(e){return e!==null&&(e<32||e===127)}const jn=tt(/\d/),Xs=tt(/[\dA-Fa-f]/),Ks=tt(/[!-/:-@[-`{-~]/);function V(e){return e!==null&&e<-2}function Ee(e){return e!==null&&(e<0||e===32)}function oe(e){return e===-2||e===-1||e===32}const Js=tt(new RegExp("\\p{P}|\\p{S}","u")),Zs=tt(/\s/);function tt(e){return function(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function bt(e){const t=[];let r=-1,n=0,o=0;for(;++r<e.length;){const a=e.charCodeAt(r);let A="";if(a===37&&Ie(e.charCodeAt(r+1))&&Ie(e.charCodeAt(r+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(A=String.fromCharCode(a));else if(a>55295&&a<57344){const s=e.charCodeAt(r+1);a<56320&&s>56319&&s<57344?(A=String.fromCharCode(a,s),o=1):A="�"}else A=String.fromCharCode(a);A&&(t.push(e.slice(n,r),encodeURIComponent(A)),n=r+o+1,A=""),o&&(r+=o,o=0)}return t.join("")+e.slice(n)}function Ae(e,t,r,n){const o=n?n-1:Number.POSITIVE_INFINITY;let a=0;return function(s){return oe(s)?(e.enter(r),A(s)):t(s)};function A(s){return oe(s)&&a++<o?(e.consume(s),A):(e.exit(r),t(s))}}const $s={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(a){return a===null?void e.consume(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ae(e,t,"linePrefix"))},function(a){return e.enter("paragraph"),n(a)});let r;return t;function n(a){const A=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=A),r=A,o(a)}function o(a){return a===null?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(a)):V(a)?(e.consume(a),e.exit("chunkText"),n):(e.consume(a),o)}}},eA={tokenize:function(e){const t=this,r=[];let n,o,a,A=0;return s;function s(m){if(A<r.length){const E=r[A];return t.containerState=E[1],e.attempt(E[0].continuation,i,c)(m)}return c(m)}function i(m){if(A++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,n&&x();const E=t.events.length;let P,C=E;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){P=t.events[C][1].end;break}v(A);let S=E;for(;S<t.events.length;)t.events[S][1].end={...P},S++;return Re(t.events,C+1,0,t.events.slice(E)),t.events.length=S,c(m)}return s(m)}function c(m){if(A===r.length){if(!n)return u(m);if(n.currentConstruct&&n.currentConstruct.concrete)return f(m);t.interrupt=!(!n.currentConstruct||n._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Lo,l,d)(m)}function l(m){return n&&x(),v(A),u(m)}function d(m){return t.parser.lazy[t.now().line]=A!==r.length,a=t.now().offset,f(m)}function u(m){return t.containerState={},e.attempt(Lo,p,f)(m)}function p(m){return A++,r.push([t.currentConstruct,t.containerState]),u(m)}function f(m){return m===null?(n&&x(),v(0),void e.consume(m)):(n=n||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:n,contentType:"flow",previous:o}),y(m))}function y(m){return m===null?(g(e.exit("chunkFlow"),!0),v(0),void e.consume(m)):V(m)?(e.consume(m),g(e.exit("chunkFlow")),A=0,t.interrupt=void 0,s):(e.consume(m),y)}function g(m,E){const P=t.sliceStream(m);if(E&&P.push(null),m.previous=o,o&&(o.next=m),o=m,n.defineSkip(m.start),n.write(P),t.parser.lazy[m.start.line]){let C=n.events.length;for(;C--;)if(n.events[C][1].start.offset<a&&(!n.events[C][1].end||n.events[C][1].end.offset>a))return;const S=t.events.length;let I,Q,B=S;for(;B--;)if(t.events[B][0]==="exit"&&t.events[B][1].type==="chunkFlow"){if(I){Q=t.events[B][1].end;break}I=!0}for(v(A),C=S;C<t.events.length;)t.events[C][1].end={...Q},C++;Re(t.events,B+1,0,t.events.slice(S)),t.events.length=C}}function v(m){let E=r.length;for(;E-- >m;){const P=r[E];t.containerState=P[1],P[0].exit.call(t,e)}r.length=m}function x(){n.write([null]),o=void 0,n=void 0,t.containerState._closeFlow=void 0}}},Lo={tokenize:function(e,t,r){return Ae(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function No(e){return e===null||Ee(e)||Zs(e)?1:Js(e)?2:void 0}function qn(e,t,r){const n=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!n.includes(a)&&(t=a(t,r),n.push(a))}return t}const Gn={name:"attention",resolveAll:function(e,t){let r,n,o,a,A,s,i,c,l=-1;for(;++l<e.length;)if(e[l][0]==="enter"&&e[l][1].type==="attentionSequence"&&e[l][1]._close){for(r=l;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[l][1]).charCodeAt(0)){if((e[r][1]._close||e[l][1]._open)&&(e[l][1].end.offset-e[l][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[l][1].end.offset-e[l][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[l][1].end.offset-e[l][1].start.offset>1?2:1;const d={...e[r][1].end},u={...e[l][1].start};Ho(d,-s),Ho(u,s),a={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},A={type:s>1?"strongSequence":"emphasisSequence",start:{...e[l][1].start},end:u},o={type:s>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[l][1].start}},n={type:s>1?"strong":"emphasis",start:{...a.start},end:{...A.end}},e[r][1].end={...a.start},e[l][1].start={...A.end},i=[],e[r][1].end.offset-e[r][1].start.offset&&(i=Oe(i,[["enter",e[r][1],t],["exit",e[r][1],t]])),i=Oe(i,[["enter",n,t],["enter",a,t],["exit",a,t],["enter",o,t]]),i=Oe(i,qn(t.parser.constructs.insideSpan.null,e.slice(r+1,l),t)),i=Oe(i,[["exit",o,t],["enter",A,t],["exit",A,t],["exit",n,t]]),e[l][1].end.offset-e[l][1].start.offset?(c=2,i=Oe(i,[["enter",e[l][1],t],["exit",e[l][1],t]])):c=0,Re(e,r-1,l-r+3,i),l=r+i.length-c-2;break}}for(l=-1;++l<e.length;)e[l][1].type==="attentionSequence"&&(e[l][1].type="data");return e},tokenize:function(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,o=No(n);let a;return function(s){return a=s,e.enter("attentionSequence"),A(s)};function A(s){if(s===a)return e.consume(s),A;const i=e.exit("attentionSequence"),c=No(s),l=!c||c===2&&o||r.includes(s),d=!o||o===2&&c||r.includes(n);return i._open=!!(a===42?l:l&&(o||!d)),i._close=!!(a===42?d:d&&(c||!l)),t(s)}}};function Ho(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const tA={name:"autolink",tokenize:function(e,t,r){let n=0;return function(u){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(u),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(u){return je(u)?(e.consume(u),a):u===64?r(u):i(u)}function a(u){return u===43||u===45||u===46||Ie(u)?(n=1,A(u)):i(u)}function A(u){return u===58?(e.consume(u),n=0,s):(u===43||u===45||u===46||Ie(u))&&n++<32?(e.consume(u),A):(n=0,i(u))}function s(u){return u===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(u),e.exit("autolinkMarker"),e.exit("autolink"),t):u===null||u===32||u===60||Rn(u)?r(u):(e.consume(u),s)}function i(u){return u===64?(e.consume(u),c):Vs(u)?(e.consume(u),i):r(u)}function c(u){return Ie(u)?l(u):r(u)}function l(u){return u===46?(e.consume(u),n=0,c):u===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(u),e.exit("autolinkMarker"),e.exit("autolink"),t):d(u)}function d(u){if((u===45||Ie(u))&&n++<63){const p=u===45?d:l;return e.consume(u),p}return r(u)}}},Jt={partial:!0,tokenize:function(e,t,r){return function(o){return oe(o)?Ae(e,n,"linePrefix")(o):n(o)};function n(o){return o===null||V(o)?t(o):r(o)}}},Uo={continuation:{tokenize:function(e,t,r){const n=this;return function(a){return oe(a)?Ae(e,o,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)};function o(a){return e.attempt(Uo,t,r)(a)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,r){const n=this;return function(a){if(a===62){const A=n.containerState;return A.open||(e.enter("blockQuote",{_container:!0}),A.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),o}return r(a)};function o(a){return oe(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}},Fo={name:"characterEscape",tokenize:function(e,t,r){return function(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),n};function n(o){return Ks(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(o)}}},zo={name:"characterReference",tokenize:function(e,t,r){const n=this;let o,a,A=0;return function(l){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(l),e.exit("characterReferenceMarker"),s};function s(l){return l===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(l),e.exit("characterReferenceMarkerNumeric"),i):(e.enter("characterReferenceValue"),o=31,a=Ie,c(l))}function i(l){return l===88||l===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(l),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=Xs,c):(e.enter("characterReferenceValue"),o=7,a=jn,c(l))}function c(l){if(l===59&&A){const d=e.exit("characterReferenceValue");return a!==Ie||zn(n.sliceSerialize(d))?(e.enter("characterReferenceMarker"),e.consume(l),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):r(l)}return a(l)&&A++<o?(e.consume(l),c):r(l)}}},Ro={partial:!0,tokenize:function(e,t,r){const n=this;return function(a){return a===null?r(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)};function o(a){return n.parser.lazy[n.now().line]?r(a):t(a)}}},jo={concrete:!0,name:"codeFenced",tokenize:function(e,t,r){const n=this,o={partial:!0,tokenize:function(m,E,P){let C=0;return S;function S(D){return m.enter("lineEnding"),m.consume(D),m.exit("lineEnding"),I}function I(D){return m.enter("codeFencedFence"),oe(D)?Ae(m,Q,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):Q(D)}function Q(D){return D===a?(m.enter("codeFencedFenceSequence"),B(D)):P(D)}function B(D){return D===a?(C++,m.consume(D),B):C>=s?(m.exit("codeFencedFenceSequence"),oe(D)?Ae(m,O,"whitespace")(D):O(D)):P(D)}function O(D){return D===null||V(D)?(m.exit("codeFencedFence"),E(D)):P(D)}}};let a,A=0,s=0;return function(m){return function(E){const P=n.events[n.events.length-1];return A=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,a=E,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),i(E)}(m)};function i(m){return m===a?(s++,e.consume(m),i):s<3?r(m):(e.exit("codeFencedFenceSequence"),oe(m)?Ae(e,c,"whitespace")(m):c(m))}function c(m){return m===null||V(m)?(e.exit("codeFencedFence"),n.interrupt?t(m):e.check(Ro,p,x)(m)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),l(m))}function l(m){return m===null||V(m)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(m)):oe(m)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ae(e,d,"whitespace")(m)):m===96&&m===a?r(m):(e.consume(m),l)}function d(m){return m===null||V(m)?c(m):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),u(m))}function u(m){return m===null||V(m)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(m)):m===96&&m===a?r(m):(e.consume(m),u)}function p(m){return e.attempt(o,x,f)(m)}function f(m){return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),y}function y(m){return A>0&&oe(m)?Ae(e,g,"linePrefix",A+1)(m):g(m)}function g(m){return m===null||V(m)?e.check(Ro,p,x)(m):(e.enter("codeFlowValue"),v(m))}function v(m){return m===null||V(m)?(e.exit("codeFlowValue"),g(m)):(e.consume(m),v)}function x(m){return e.exit("codeFenced"),t(m)}}},Yn={name:"codeIndented",tokenize:function(e,t,r){const n=this;return function(i){return e.enter("codeIndented"),Ae(e,o,"linePrefix",5)(i)};function o(i){const c=n.events[n.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?a(i):r(i)}function a(i){return i===null?s(i):V(i)?e.attempt(nA,a,s)(i):(e.enter("codeFlowValue"),A(i))}function A(i){return i===null||V(i)?(e.exit("codeFlowValue"),a(i)):(e.consume(i),A)}function s(i){return e.exit("codeIndented"),t(i)}}},nA={partial:!0,tokenize:function(e,t,r){const n=this;return o;function o(A){return n.parser.lazy[n.now().line]?r(A):V(A)?(e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),o):Ae(e,a,"linePrefix",5)(A)}function a(A){const s=n.events[n.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(A):V(A)?o(A):r(A)}}},rA={name:"codeText",previous:function(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"},resolve:function(e){let t,r,n=e.length-4,o=3;if(!(e[o][1].type!=="lineEnding"&&e[o][1].type!=="space"||e[n][1].type!=="lineEnding"&&e[n][1].type!=="space")){for(t=o;++t<n;)if(e[t][1].type==="codeTextData"){e[o][1].type="codeTextPadding",e[n][1].type="codeTextPadding",o+=2,n-=2;break}}for(t=o-1,n++;++t<=n;)r===void 0?t!==n&&e[t][1].type!=="lineEnding"&&(r=t):(t===n||e[t][1].type==="lineEnding")&&(e[r][1].type="codeTextData",t!==r+2&&(e[r][1].end=e[t-1][1].end,e.splice(r+2,t-r-2),n-=t-r-2,t=r+2),r=void 0);return e},tokenize:function(e,t,r){let n,o,a=0;return function(l){return e.enter("codeText"),e.enter("codeTextSequence"),A(l)};function A(l){return l===96?(e.consume(l),a++,A):(e.exit("codeTextSequence"),s(l))}function s(l){return l===null?r(l):l===32?(e.enter("space"),e.consume(l),e.exit("space"),s):l===96?(o=e.enter("codeTextSequence"),n=0,c(l)):V(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s):(e.enter("codeTextData"),i(l))}function i(l){return l===null||l===32||l===96||V(l)?(e.exit("codeTextData"),s(l)):(e.consume(l),i)}function c(l){return l===96?(e.consume(l),n++,c):n===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(l)):(o.type="codeTextData",i(l))}}};class oA{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){const n=r??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(t,n):t>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(t,r,n){const o=r||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return n&&It(this.left,n),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),It(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),It(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const r=this.left.splice(t,Number.POSITIVE_INFINITY);It(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);It(this.left,r.reverse())}}}function It(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function qo(e){const t={};let r,n,o,a,A,s,i,c=-1;const l=new oA(e);for(;++c<l.length;){for(;c in t;)c=t[c];if(r=l.get(c),c&&r[1].type==="chunkFlow"&&l.get(c-1)[1].type==="listItemPrefix"&&(s=r[1]._tokenizer.events,o=0,o<s.length&&s[o][1].type==="lineEndingBlank"&&(o+=2),o<s.length&&s[o][1].type==="content"))for(;++o<s.length&&s[o][1].type!=="content";)s[o][1].type==="chunkText"&&(s[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,aA(l,c)),c=t[c],i=!0);else if(r[1]._container){for(o=c,n=void 0;o--;)if(a=l.get(o),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(n&&(l.get(n)[1].type="lineEndingBlank"),a[1].type="lineEnding",n=o);else if(a[1].type!=="linePrefix")break;n&&(r[1].end={...l.get(n)[1].start},A=l.slice(n,c),A.unshift(r),l.splice(n,c-n+1,A))}}return Re(e,0,Number.POSITIVE_INFINITY,l.slice(0)),!i}function aA(e,t){const r=e.get(t)[1],n=e.get(t)[2];let o=t-1;const a=[],A=r._tokenizer||n.parser[r.contentType](r.start),s=A.events,i=[],c={};let l,d,u=-1,p=r,f=0,y=0;const g=[y];for(;p;){for(;e.get(++o)[1]!==p;);a.push(o),p._tokenizer||(l=n.sliceStream(p),p.next||l.push(null),d&&A.defineSkip(p.start),p._isInFirstContentOfListItem&&(A._gfmTasklistFirstContentOfListItem=!0),A.write(l),p._isInFirstContentOfListItem&&(A._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=r;++u<s.length;)s[u][0]==="exit"&&s[u-1][0]==="enter"&&s[u][1].type===s[u-1][1].type&&s[u][1].start.line!==s[u][1].end.line&&(y=u+1,g.push(y),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(A.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),u=g.length;u--;){const v=s.slice(g[u],g[u+1]),x=a.pop();i.push([x,x+v.length-1]),e.splice(x,2,v)}for(i.reverse(),u=-1;++u<i.length;)c[f+i[u][0]]=f+i[u][1],f+=i[u][1]-i[u][0]-1;return c}const iA={resolve:function(e){return qo(e),e},tokenize:function(e,t){let r;return function(A){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),n(A)};function n(A){return A===null?o(A):V(A)?e.check(sA,a,o)(A):(e.consume(A),n)}function o(A){return e.exit("chunkContent"),e.exit("content"),t(A)}function a(A){return e.consume(A),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,n}}},sA={partial:!0,tokenize:function(e,t,r){const n=this;return function(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ae(e,o,"linePrefix")};function o(a){if(a===null||V(a))return r(a);const A=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&A&&A[1].type==="linePrefix"&&A[2].sliceSerialize(A[1],!0).length>=4?t(a):e.interrupt(n.parser.constructs.flow,r,t)(a)}}};function Go(e,t,r,n,o,a,A,s,i){const c=i||Number.POSITIVE_INFINITY;let l=0;return function(g){return g===60?(e.enter(n),e.enter(o),e.enter(a),e.consume(g),e.exit(a),d):g===null||g===32||g===41||Rn(g)?r(g):(e.enter(n),e.enter(A),e.enter(s),e.enter("chunkString",{contentType:"string"}),f(g))};function d(g){return g===62?(e.enter(a),e.consume(g),e.exit(a),e.exit(o),e.exit(n),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),u(g))}function u(g){return g===62?(e.exit("chunkString"),e.exit(s),d(g)):g===null||g===60||V(g)?r(g):(e.consume(g),g===92?p:u)}function p(g){return g===60||g===62||g===92?(e.consume(g),u):u(g)}function f(g){return l||g!==null&&g!==41&&!Ee(g)?l<c&&g===40?(e.consume(g),l++,f):g===41?(e.consume(g),l--,f):g===null||g===32||g===40||Rn(g)?r(g):(e.consume(g),g===92?y:f):(e.exit("chunkString"),e.exit(s),e.exit(A),e.exit(n),t(g))}function y(g){return g===40||g===41||g===92?(e.consume(g),f):f(g)}}function Yo(e,t,r,n,o,a){const A=this;let s,i=0;return function(u){return e.enter(n),e.enter(o),e.consume(u),e.exit(o),e.enter(a),c};function c(u){return i>999||u===null||u===91||u===93&&!s||u===94&&!i&&"_hiddenFootnoteSupport"in A.parser.constructs?r(u):u===93?(e.exit(a),e.enter(o),e.consume(u),e.exit(o),e.exit(n),t):V(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),l(u))}function l(u){return u===null||u===91||u===93||V(u)||i++>999?(e.exit("chunkString"),c(u)):(e.consume(u),s||(s=!oe(u)),u===92?d:l)}function d(u){return u===91||u===92||u===93?(e.consume(u),i++,l):l(u)}}function Wo(e,t,r,n,o,a){let A;return function(d){return d===34||d===39||d===40?(e.enter(n),e.enter(o),e.consume(d),e.exit(o),A=d===40?41:d,s):r(d)};function s(d){return d===A?(e.enter(o),e.consume(d),e.exit(o),e.exit(n),t):(e.enter(a),i(d))}function i(d){return d===A?(e.exit(a),s(A)):d===null?r(d):V(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Ae(e,i,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===A||d===null||V(d)?(e.exit("chunkString"),i(d)):(e.consume(d),d===92?l:c)}function l(d){return d===A||d===92?(e.consume(d),c):c(d)}}function Tt(e,t){let r;return function n(o){return V(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r=!0,n):oe(o)?Ae(e,n,r?"linePrefix":"lineSuffix")(o):t(o)}}const AA={name:"definition",tokenize:function(e,t,r){const n=this;let o;return function(d){return e.enter("definition"),function(u){return Yo.call(n,e,a,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(u)}(d)};function a(d){return o=yt(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),A):r(d)}function A(d){return Ee(d)?Tt(e,s)(d):s(d)}function s(d){return Go(e,i,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function i(d){return e.attempt(lA,c,c)(d)}function c(d){return oe(d)?Ae(e,l,"whitespace")(d):l(d)}function l(d){return d===null||V(d)?(e.exit("definition"),n.parser.defined.push(o),t(d)):r(d)}}},lA={partial:!0,tokenize:function(e,t,r){return function(A){return Ee(A)?Tt(e,n)(A):r(A)};function n(A){return Wo(e,o,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(A)}function o(A){return oe(A)?Ae(e,a,"whitespace")(A):a(A)}function a(A){return A===null||V(A)?t(A):r(A)}}},cA={name:"hardBreakEscape",tokenize:function(e,t,r){return function(o){return e.enter("hardBreakEscape"),e.consume(o),n};function n(o){return V(o)?(e.exit("hardBreakEscape"),t(o)):r(o)}}},uA={name:"headingAtx",resolve:function(e,t){let r,n,o=e.length-2,a=3;return e[a][1].type==="whitespace"&&(a+=2),o-2>a&&e[o][1].type==="whitespace"&&(o-=2),e[o][1].type==="atxHeadingSequence"&&(a===o-1||o-4>a&&e[o-2][1].type==="whitespace")&&(o-=a+1===o?2:4),o>a&&(r={type:"atxHeadingText",start:e[a][1].start,end:e[o][1].end},n={type:"chunkText",start:e[a][1].start,end:e[o][1].end,contentType:"text"},Re(e,a,o-a+1,[["enter",r,t],["enter",n,t],["exit",n,t],["exit",r,t]])),e},tokenize:function(e,t,r){let n=0;return function(i){return e.enter("atxHeading"),function(c){return e.enter("atxHeadingSequence"),o(c)}(i)};function o(i){return i===35&&n++<6?(e.consume(i),o):i===null||Ee(i)?(e.exit("atxHeadingSequence"),a(i)):r(i)}function a(i){return i===35?(e.enter("atxHeadingSequence"),A(i)):i===null||V(i)?(e.exit("atxHeading"),t(i)):oe(i)?Ae(e,a,"whitespace")(i):(e.enter("atxHeadingText"),s(i))}function A(i){return i===35?(e.consume(i),A):(e.exit("atxHeadingSequence"),a(i))}function s(i){return i===null||i===35||Ee(i)?(e.exit("atxHeadingText"),a(i)):(e.consume(i),s)}}},dA=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Vo=["pre","script","style","textarea"],pA={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&(e[t][0]!=="enter"||e[t][1].type!=="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},tokenize:function(e,t,r){const n=this;let o,a,A,s,i;return function(w){return function(K){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(K),c}(w)};function c(w){return w===33?(e.consume(w),l):w===47?(e.consume(w),a=!0,p):w===63?(e.consume(w),o=3,n.interrupt?t:H):je(w)?(e.consume(w),A=String.fromCharCode(w),f):r(w)}function l(w){return w===45?(e.consume(w),o=2,d):w===91?(e.consume(w),o=5,s=0,u):je(w)?(e.consume(w),o=4,n.interrupt?t:H):r(w)}function d(w){return w===45?(e.consume(w),n.interrupt?t:H):r(w)}function u(w){return w==="CDATA[".charCodeAt(s++)?(e.consume(w),s===6?n.interrupt?t:B:u):r(w)}function p(w){return je(w)?(e.consume(w),A=String.fromCharCode(w),f):r(w)}function f(w){if(w===null||w===47||w===62||Ee(w)){const K=w===47,R=A.toLowerCase();return K||a||!Vo.includes(R)?dA.includes(A.toLowerCase())?(o=6,K?(e.consume(w),y):n.interrupt?t(w):B(w)):(o=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(w):a?g(w):v(w)):(o=1,n.interrupt?t(w):B(w))}return w===45||Ie(w)?(e.consume(w),A+=String.fromCharCode(w),f):r(w)}function y(w){return w===62?(e.consume(w),n.interrupt?t:B):r(w)}function g(w){return oe(w)?(e.consume(w),g):I(w)}function v(w){return w===47?(e.consume(w),I):w===58||w===95||je(w)?(e.consume(w),x):oe(w)?(e.consume(w),v):I(w)}function x(w){return w===45||w===46||w===58||w===95||Ie(w)?(e.consume(w),x):m(w)}function m(w){return w===61?(e.consume(w),E):oe(w)?(e.consume(w),m):v(w)}function E(w){return w===null||w===60||w===61||w===62||w===96?r(w):w===34||w===39?(e.consume(w),i=w,P):oe(w)?(e.consume(w),E):C(w)}function P(w){return w===i?(e.consume(w),i=null,S):w===null||V(w)?r(w):(e.consume(w),P)}function C(w){return w===null||w===34||w===39||w===47||w===60||w===61||w===62||w===96||Ee(w)?m(w):(e.consume(w),C)}function S(w){return w===47||w===62||oe(w)?v(w):r(w)}function I(w){return w===62?(e.consume(w),Q):r(w)}function Q(w){return w===null||V(w)?B(w):oe(w)?(e.consume(w),Q):r(w)}function B(w){return w===45&&o===2?(e.consume(w),U):w===60&&o===1?(e.consume(w),L):w===62&&o===4?(e.consume(w),b):w===63&&o===3?(e.consume(w),H):w===93&&o===5?(e.consume(w),_):!V(w)||o!==6&&o!==7?w===null||V(w)?(e.exit("htmlFlowData"),O(w)):(e.consume(w),B):(e.exit("htmlFlowData"),e.check(fA,X,O)(w))}function O(w){return e.check(hA,D,X)(w)}function D(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),M}function M(w){return w===null||V(w)?O(w):(e.enter("htmlFlowData"),B(w))}function U(w){return w===45?(e.consume(w),H):B(w)}function L(w){return w===47?(e.consume(w),A="",F):B(w)}function F(w){if(w===62){const K=A.toLowerCase();return Vo.includes(K)?(e.consume(w),b):B(w)}return je(w)&&A.length<8?(e.consume(w),A+=String.fromCharCode(w),F):B(w)}function _(w){return w===93?(e.consume(w),H):B(w)}function H(w){return w===62?(e.consume(w),b):w===45&&o===2?(e.consume(w),H):B(w)}function b(w){return w===null||V(w)?(e.exit("htmlFlowData"),X(w)):(e.consume(w),b)}function X(w){return e.exit("htmlFlow"),t(w)}}},fA={partial:!0,tokenize:function(e,t,r){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),e.attempt(Jt,t,r)}}},hA={partial:!0,tokenize:function(e,t,r){const n=this;return function(a){return V(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):r(a)};function o(a){return n.parser.lazy[n.now().line]?r(a):t(a)}}},gA={name:"htmlText",tokenize:function(e,t,r){const n=this;let o,a,A;return function(b){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(b),s};function s(b){return b===33?(e.consume(b),i):b===47?(e.consume(b),E):b===63?(e.consume(b),x):je(b)?(e.consume(b),S):r(b)}function i(b){return b===45?(e.consume(b),c):b===91?(e.consume(b),a=0,p):je(b)?(e.consume(b),v):r(b)}function c(b){return b===45?(e.consume(b),u):r(b)}function l(b){return b===null?r(b):b===45?(e.consume(b),d):V(b)?(A=l,F(b)):(e.consume(b),l)}function d(b){return b===45?(e.consume(b),u):l(b)}function u(b){return b===62?L(b):b===45?d(b):l(b)}function p(b){return b==="CDATA[".charCodeAt(a++)?(e.consume(b),a===6?f:p):r(b)}function f(b){return b===null?r(b):b===93?(e.consume(b),y):V(b)?(A=f,F(b)):(e.consume(b),f)}function y(b){return b===93?(e.consume(b),g):f(b)}function g(b){return b===62?L(b):b===93?(e.consume(b),g):f(b)}function v(b){return b===null||b===62?L(b):V(b)?(A=v,F(b)):(e.consume(b),v)}function x(b){return b===null?r(b):b===63?(e.consume(b),m):V(b)?(A=x,F(b)):(e.consume(b),x)}function m(b){return b===62?L(b):x(b)}function E(b){return je(b)?(e.consume(b),P):r(b)}function P(b){return b===45||Ie(b)?(e.consume(b),P):C(b)}function C(b){return V(b)?(A=C,F(b)):oe(b)?(e.consume(b),C):L(b)}function S(b){return b===45||Ie(b)?(e.consume(b),S):b===47||b===62||Ee(b)?I(b):r(b)}function I(b){return b===47?(e.consume(b),L):b===58||b===95||je(b)?(e.consume(b),Q):V(b)?(A=I,F(b)):oe(b)?(e.consume(b),I):L(b)}function Q(b){return b===45||b===46||b===58||b===95||Ie(b)?(e.consume(b),Q):B(b)}function B(b){return b===61?(e.consume(b),O):V(b)?(A=B,F(b)):oe(b)?(e.consume(b),B):I(b)}function O(b){return b===null||b===60||b===61||b===62||b===96?r(b):b===34||b===39?(e.consume(b),o=b,D):V(b)?(A=O,F(b)):oe(b)?(e.consume(b),O):(e.consume(b),M)}function D(b){return b===o?(e.consume(b),o=void 0,U):b===null?r(b):V(b)?(A=D,F(b)):(e.consume(b),D)}function M(b){return b===null||b===34||b===39||b===60||b===61||b===96?r(b):b===47||b===62||Ee(b)?I(b):(e.consume(b),M)}function U(b){return b===47||b===62||Ee(b)?I(b):r(b)}function L(b){return b===62?(e.consume(b),e.exit("htmlTextData"),e.exit("htmlText"),t):r(b)}function F(b){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),_}function _(b){return oe(b)?Ae(e,H,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):H(b)}function H(b){return e.enter("htmlTextData"),A(b)}}},Wn={name:"labelEnd",resolveAll:function(e){let t=-1;const r=[];for(;++t<e.length;){const n=e[t][1];if(r.push(e[t]),n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd"){const o=n.type==="labelImage"?4:2;n.type="data",t+=o}}return e.length!==r.length&&Re(e,0,e.length,r),e},resolveTo:function(e,t){let r,n,o,a,A=e.length,s=0;for(;A--;)if(r=e[A][1],n){if(r.type==="link"||r.type==="labelLink"&&r._inactive)break;e[A][0]==="enter"&&r.type==="labelLink"&&(r._inactive=!0)}else if(o){if(e[A][0]==="enter"&&(r.type==="labelImage"||r.type==="labelLink")&&!r._balanced&&(n=A,r.type!=="labelLink")){s=2;break}}else r.type==="labelEnd"&&(o=A);const i={type:e[n][1].type==="labelLink"?"link":"image",start:{...e[n][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[n][1].start},end:{...e[o][1].end}},l={type:"labelText",start:{...e[n+s+2][1].end},end:{...e[o-2][1].start}};return a=[["enter",i,t],["enter",c,t]],a=Oe(a,e.slice(n+1,n+s+3)),a=Oe(a,[["enter",l,t]]),a=Oe(a,qn(t.parser.constructs.insideSpan.null,e.slice(n+s+4,o-3),t)),a=Oe(a,[["exit",l,t],e[o-2],e[o-1],["exit",c,t]]),a=Oe(a,e.slice(o+1)),a=Oe(a,[["exit",i,t]]),Re(e,n,e.length,a),e},tokenize:function(e,t,r){const n=this;let o,a,A=n.events.length;for(;A--;)if((n.events[A][1].type==="labelImage"||n.events[A][1].type==="labelLink")&&!n.events[A][1]._balanced){o=n.events[A][1];break}return function(d){return o?o._inactive?l(d):(a=n.parser.defined.includes(yt(n.sliceSerialize({start:o.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),s):r(d)};function s(d){return d===40?e.attempt(mA,c,a?c:l)(d):d===91?e.attempt(yA,c,a?i:l)(d):a?c(d):l(d)}function i(d){return e.attempt(bA,c,l)(d)}function c(d){return t(d)}function l(d){return o._balanced=!0,r(d)}}},mA={tokenize:function(e,t,r){return function(l){return e.enter("resource"),e.enter("resourceMarker"),e.consume(l),e.exit("resourceMarker"),n};function n(l){return Ee(l)?Tt(e,o)(l):o(l)}function o(l){return l===41?c(l):Go(e,a,A,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(l)}function a(l){return Ee(l)?Tt(e,s)(l):c(l)}function A(l){return r(l)}function s(l){return l===34||l===39||l===40?Wo(e,i,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(l):c(l)}function i(l){return Ee(l)?Tt(e,c)(l):c(l)}function c(l){return l===41?(e.enter("resourceMarker"),e.consume(l),e.exit("resourceMarker"),e.exit("resource"),t):r(l)}}},yA={tokenize:function(e,t,r){const n=this;return function(A){return Yo.call(n,e,o,a,"reference","referenceMarker","referenceString")(A)};function o(A){return n.parser.defined.includes(yt(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(A):r(A)}function a(A){return r(A)}}},bA={tokenize:function(e,t,r){return function(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),n};function n(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):r(o)}}},vA={name:"labelStartImage",resolveAll:Wn.resolveAll,tokenize:function(e,t,r){const n=this;return function(A){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(A),e.exit("labelImageMarker"),o};function o(A){return A===91?(e.enter("labelMarker"),e.consume(A),e.exit("labelMarker"),e.exit("labelImage"),a):r(A)}function a(A){return A===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(A):t(A)}}},wA={name:"labelStartLink",resolveAll:Wn.resolveAll,tokenize:function(e,t,r){const n=this;return function(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),o};function o(a){return a===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(a):t(a)}}},Vn={name:"lineEnding",tokenize:function(e,t){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ae(e,t,"linePrefix")}}},Zt={name:"thematicBreak",tokenize:function(e,t,r){let n,o=0;return function(s){return e.enter("thematicBreak"),function(i){return n=i,a(i)}(s)};function a(s){return s===n?(e.enter("thematicBreakSequence"),A(s)):o>=3&&(s===null||V(s))?(e.exit("thematicBreak"),t(s)):r(s)}function A(s){return s===n?(e.consume(s),o++,A):(e.exit("thematicBreakSequence"),oe(s)?Ae(e,a,"whitespace")(s):a(s))}}},ke={continuation:{tokenize:function(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(Jt,function(a){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,Ae(e,t,"listItemIndent",n.containerState.size+1)(a)},function(a){return n.containerState.furtherBlankLines||!oe(a)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,o(a)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(EA,t,o)(a))});function o(a){return n.containerState._closeFlow=!0,n.interrupt=void 0,Ae(e,e.attempt(ke,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,r){const n=this,o=n.events[n.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,A=0;return function(u){const p=n.containerState.type||(u===42||u===43||u===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!n.containerState.marker||u===n.containerState.marker:jn(u)){if(n.containerState.type||(n.containerState.type=p,e.enter(p,{_container:!0})),p==="listUnordered")return e.enter("listItemPrefix"),u===42||u===45?e.check(Zt,r,i)(u):i(u);if(!n.interrupt||u===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(u)}return r(u)};function s(u){return jn(u)&&++A<10?(e.consume(u),s):(!n.interrupt||A<2)&&(n.containerState.marker?u===n.containerState.marker:u===41||u===46)?(e.exit("listItemValue"),i(u)):r(u)}function i(u){return e.enter("listItemMarker"),e.consume(u),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||u,e.check(Jt,n.interrupt?r:c,e.attempt(xA,d,l))}function c(u){return n.containerState.initialBlankLine=!0,a++,d(u)}function l(u){return oe(u)?(e.enter("listItemPrefixWhitespace"),e.consume(u),e.exit("listItemPrefixWhitespace"),d):r(u)}function d(u){return n.containerState.size=a+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(u)}}},xA={partial:!0,tokenize:function(e,t,r){const n=this;return Ae(e,function(o){const a=n.events[n.events.length-1];return!oe(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):r(o)},"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},EA={partial:!0,tokenize:function(e,t,r){const n=this;return Ae(e,function(o){const a=n.events[n.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===n.containerState.size?t(o):r(o)},"listItemIndent",n.containerState.size+1)}},Xo={name:"setextUnderline",resolveTo:function(e,t){let r,n,o,a=e.length;for(;a--;)if(e[a][0]==="enter"){if(e[a][1].type==="content"){r=a;break}e[a][1].type==="paragraph"&&(n=a)}else e[a][1].type==="content"&&e.splice(a,1),!o&&e[a][1].type==="definition"&&(o=a);const A={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[n][1].type="setextHeadingText",o?(e.splice(n,0,["enter",A,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=A,e.push(["exit",A,t]),e},tokenize:function(e,t,r){const n=this;let o;return function(s){let i,c=n.events.length;for(;c--;)if(n.events[c][1].type!=="lineEnding"&&n.events[c][1].type!=="linePrefix"&&n.events[c][1].type!=="content"){i=n.events[c][1].type==="paragraph";break}return n.parser.lazy[n.now().line]||!n.interrupt&&!i?r(s):(e.enter("setextHeadingLine"),o=s,function(l){return e.enter("setextHeadingLineSequence"),a(l)}(s))};function a(s){return s===o?(e.consume(s),a):(e.exit("setextHeadingLineSequence"),oe(s)?Ae(e,A,"lineSuffix")(s):A(s))}function A(s){return s===null||V(s)?(e.exit("setextHeadingLine"),t(s)):r(s)}}},kA={tokenize:function(e){const t=this,r=e.attempt(Jt,function(o){return o===null?void e.consume(o):(e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r)},e.attempt(this.parser.constructs.flowInitial,n,Ae(e,e.attempt(this.parser.constructs.flow,n,e.attempt(iA,n)),"linePrefix")));return r;function n(o){if(o!==null)return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,r;e.consume(o)}}},CA={resolveAll:Jo()},PA=Ko("string"),SA=Ko("text");function Ko(e){return{resolveAll:Jo(e==="text"?DA:void 0),tokenize:function(t){const r=this,n=this.parser.constructs[e],o=t.attempt(n,a,A);return a;function a(c){return i(c)?o(c):A(c)}function A(c){if(c!==null)return t.enter("data"),t.consume(c),s;t.consume(c)}function s(c){return i(c)?(t.exit("data"),o(c)):(t.consume(c),s)}function i(c){if(c===null)return!0;const l=n[c];let d=-1;if(l)for(;++d<l.length;){const u=l[d];if(!u.previous||u.previous.call(r,r.previous))return!0}return!1}}}}function Jo(e){return function(t,r){let n,o=-1;for(;++o<=t.length;)n===void 0?t[o]&&t[o][1].type==="data"&&(n=o,o++):(!t[o]||t[o][1].type!=="data")&&(o!==n+2&&(t[n][1].end=t[o-1][1].end,t.splice(n+2,o-n-2),o=n+2),n=void 0);return e?e(t,r):t}}function DA(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const n=e[r-1][1],o=t.sliceStream(n);let a,A=o.length,s=-1,i=0;for(;A--;){const c=o[A];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)i++,s--;if(s)break;s=-1}else if(c===-2)a=!0,i++;else if(c!==-1){A++;break}}if(i){const c={type:r===e.length||a||i<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:A?s:n.start._bufferIndex+s,_index:n.start._index+A,line:n.end.line,column:n.end.column-i,offset:n.end.offset-i},end:{...n.end}};n.end={...c.start},n.start.offset===n.end.offset?Object.assign(n,c):(e.splice(r,0,["enter",c,t],["exit",c,t]),r+=2)}r++}return e}const BA={42:ke,43:ke,45:ke,48:ke,49:ke,50:ke,51:ke,52:ke,53:ke,54:ke,55:ke,56:ke,57:ke,62:Uo},IA={91:AA},TA={[-2]:Yn,[-1]:Yn,32:Yn},QA={35:uA,42:Zt,45:[Xo,Zt],60:pA,61:Xo,95:Zt,96:jo,126:jo},MA={38:zo,92:Fo},OA={[-5]:Vn,[-4]:Vn,[-3]:Vn,33:vA,38:zo,42:Gn,60:[tA,gA],91:wA,92:[cA,Fo],93:Wn,95:Gn,96:rA},_A={null:[Gn,CA]},LA=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:IA,disable:{null:[]},document:BA,flow:QA,flowInitial:TA,insideSpan:_A,string:MA,text:OA},Symbol.toStringTag,{value:"Module"}));function NA(e,t,r){let n={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const o={},a=[];let A=[],s=[];const i={attempt:y(function(x,m){g(x,m.from)}),check:y(f),consume:function(x){V(x)?(n.line++,n.column=1,n.offset+=x===-3?2:1,v()):x!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===A[n._index].length&&(n._bufferIndex=-1,n._index++)),c.previous=x},enter:function(x,m){const E=m||{};return E.type=x,E.start=u(),c.events.push(["enter",E,c]),s.push(E),E},exit:function(x){const m=s.pop();return m.end=u(),c.events.push(["exit",m,c]),m},interrupt:y(f,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(x){o[x.line]=x.column,v()},events:[],now:u,parser:e,previous:null,sliceSerialize:function(x,m){return function(E,P){let C=-1;const S=[];let I;for(;++C<E.length;){const Q=E[C];let B;if(typeof Q=="string")B=Q;else switch(Q){case-5:B="\r";break;case-4:B=`
|
|
22
22
|
`;break;case-3:B=`\r
|
|
23
|
-
`;break;case-2:B=P?" ":" ";break;case-1:if(!P&&I)continue;B=" ";break;default:B=String.fromCharCode(Q)}I=Q===-2,S.push(B)}return S.join("")}(d(x),m)},sliceStream:d,write:function(x){return s=Oe(s,x),function(){let m;for(;n._index<s.length;){const E=s[n._index];if(typeof E=="string")for(m=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===m&&n._bufferIndex<E.length;)p(E.charCodeAt(n._bufferIndex));else p(E)}}(),s[s.length-1]!==null?[]:(g(t,0),c.events=qn(a,c.events,c),c.events)}};let l=t.tokenize.call(c,i);return t.resolveAll&&a.push(t),c;function d(x){return function(m,E){const P=E.start._index,C=E.start._bufferIndex,S=E.end._index,I=E.end._bufferIndex;let Q;if(P===S)Q=[m[P].slice(C,I)];else{if(Q=m.slice(P,S),C>-1){const B=Q[0];typeof B=="string"?Q[0]=B.slice(C):Q.shift()}I>0&&Q.push(m[S].slice(0,I))}return Q}(s,x)}function u(){const{_bufferIndex:x,_index:m,line:E,column:P,offset:C}=n;return{_bufferIndex:x,_index:m,line:E,column:P,offset:C}}function p(x){l=l(x)}function f(x,m){m.restore()}function y(x,m){return function(E,P,C){let S,I,Q,B;return Array.isArray(E)?O(E):"tokenize"in E?O([E]):function(L){return F;function F(_){const H=_!==null&&L[_],b=_!==null&&L.null;return O([...Array.isArray(H)?H:H?[H]:[],...Array.isArray(b)?b:b?[b]:[]])(_)}}(E);function O(L){return S=L,I=0,L.length===0?C:D(L[I])}function D(L){return function(F){return B=function(){const _=u(),H=c.previous,b=c.currentConstruct,X=c.events.length,w=Array.from(A);return{from:X,restore:K};function K(){n=_,c.previous=H,c.currentConstruct=b,c.events.length=X,A=w,v()}}(),Q=L,L.partial||(c.currentConstruct=L),L.name&&c.parser.constructs.disable.null.includes(L.name)?U():L.tokenize.call(m?Object.assign(Object.create(c),m):c,i,M,U)(F)}}function M(L){return x(Q,B),P}function U(L){return B.restore(),++I<S.length?D(S[I]):C}}}function g(x,m){x.resolveAll&&!a.includes(x)&&a.push(x),x.resolve&&Re(c.events,m,c.events.length-m,x.resolve(c.events.slice(m),c)),x.resolveTo&&(c.events=x.resolveTo(c.events,c))}function v(){n.line in o&&n.column<2&&(n.column=o[n.line],n.offset+=o[n.line]-1)}}const Zo=/[\0\t\n\r]/g,Ns=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Hs(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const n=r.charCodeAt(1),o=n===120||n===88;return _o(r.slice(o?2:1),o?16:10)}return zn(r)||e}const $o={}.hasOwnProperty;function Us(e,t,r){return typeof t!="string"&&(r=t,t=void 0),function(n){const o={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(dn),autolinkProtocol:D,autolinkEmail:D,atxHeading:i(We),blockQuote:i(ut),characterEscape:D,characterReference:D,codeFenced:i(xe),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:i(xe,c),codeText:i(Ne,c),codeTextData:D,data:D,codeFlowValue:D,definition:i(xt),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:i(ot),hardBreakEscape:i(ge),hardBreakTrailing:i(ge),htmlFlow:i(_e,c),htmlFlowData:D,htmlText:i(_e,c),htmlTextData:D,image:i(Ve),label:c,link:i(dn),listItem:i(Nt),listItemValue:y,listOrdered:i(pn,f),listUnordered:i(pn),paragraph:i(yr),reference:Z,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:i(We),strong:i(dt),thematicBreak:i(fn)},exit:{atxHeading:d(),atxHeadingSequence:I,autolink:d(),autolinkEmail:Ye,autolinkProtocol:we,blockQuote:d(),characterEscapeValue:M,characterReferenceMarkerHexadecimal:le,characterReferenceMarkerNumeric:le,characterReferenceValue:ae,characterReference:se,codeFenced:d(m),codeFencedFence:x,codeFencedFenceInfo:g,codeFencedFenceMeta:v,codeFlowValue:M,codeIndented:d(E),codeText:d(H),codeTextData:M,data:M,definition:d(),definitionDestinationString:S,definitionLabelString:P,definitionTitleString:C,emphasis:d(),hardBreakEscape:d(L),hardBreakTrailing:d(L),htmlFlow:d(F),htmlFlowData:M,htmlText:d(_),htmlTextData:M,image:d(X),label:K,labelText:w,lineEnding:U,link:d(b),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:$,resourceDestinationString:R,resourceTitleString:z,resource:G,setextHeading:d(O),setextHeadingLineSequence:B,setextHeadingText:Q,strong:d(),thematicBreak:d()}};ea(o,(n||{}).mdastExtensions||[]);const a={};return s;function s(T){let q={type:"root",children:[]};const Y={stack:[q],tokenStack:[],config:o,enter:l,exit:u,buffer:c,resume:p,data:a},te=[];let ne=-1;for(;++ne<T.length;)(T[ne][1].type==="listOrdered"||T[ne][1].type==="listUnordered")&&(T[ne][0]==="enter"?te.push(ne):ne=A(T,te.pop(),ne));for(ne=-1;++ne<T.length;){const de=o[T[ne][0]];$o.call(de,T[ne][1].type)&&de[T[ne][1].type].call(Object.assign({sliceSerialize:T[ne][2].sliceSerialize},Y),T[ne][1])}if(Y.tokenStack.length>0){const de=Y.tokenStack[Y.tokenStack.length-1];(de[1]||ta).call(Y,void 0,de[0])}for(q.position={start:nt(T.length>0?T[0][1].start:{line:1,column:1,offset:0}),end:nt(T.length>0?T[T.length-2][1].end:{line:1,column:1,offset:0})},ne=-1;++ne<o.transforms.length;)q=o.transforms[ne](q)||q;return q}function A(T,q,Y){let te,ne,de,Ce,He=q-1,Ut=-1,Ha=!1;for(;++He<=Y;){const Te=T[He];switch(Te[1].type){case"listUnordered":case"listOrdered":case"blockQuote":Te[0]==="enter"?Ut++:Ut--,Ce=void 0;break;case"lineEndingBlank":Te[0]==="enter"&&(te&&!Ce&&!Ut&&!de&&(de=He),Ce=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ce=void 0}if(!Ut&&Te[0]==="enter"&&Te[1].type==="listItemPrefix"||Ut===-1&&Te[0]==="exit"&&(Te[1].type==="listUnordered"||Te[1].type==="listOrdered")){if(te){let Et=He;for(ne=void 0;Et--;){const Je=T[Et];if(Je[1].type==="lineEnding"||Je[1].type==="lineEndingBlank"){if(Je[0]==="exit")continue;ne&&(T[ne][1].type="lineEndingBlank",Ha=!0),Je[1].type="lineEnding",ne=Et}else if(Je[1].type!=="linePrefix"&&Je[1].type!=="blockQuotePrefix"&&Je[1].type!=="blockQuotePrefixWhitespace"&&Je[1].type!=="blockQuoteMarker"&&Je[1].type!=="listItemIndent")break}de&&(!ne||de<ne)&&(te._spread=!0),te.end=Object.assign({},ne?T[ne][1].start:Te[1].end),T.splice(ne||He,0,["exit",te,Te[2]]),He++,Y++}if(Te[1].type==="listItemPrefix"){const Et={type:"listItem",_spread:!1,start:Object.assign({},Te[1].start),end:void 0};te=Et,T.splice(He,0,["enter",Et,Te[2]]),He++,Y++,de=void 0,Ce=!0}}}return T[q][1]._spread=Ha,Y}function i(T,q){return Y;function Y(te){l.call(this,T(te),te),q&&q.call(this,te)}}function c(){this.stack.push({type:"fragment",children:[]})}function l(T,q,Y){this.stack[this.stack.length-1].children.push(T),this.stack.push(T),this.tokenStack.push([q,Y||void 0]),T.position={start:nt(q.start),end:void 0}}function d(T){return q;function q(Y){T&&T.call(this,Y),u.call(this,Y)}}function u(T,q){const Y=this.stack.pop(),te=this.tokenStack.pop();if(!te)throw new Error("Cannot close `"+T.type+"` ("+Dt({start:T.start,end:T.end})+"): it’s not open");te[0].type!==T.type&&(q?q.call(this,T,te[0]):(te[1]||ta).call(this,T,te[0])),Y.position.end=nt(T.end)}function p(){return function(T){return To(T,typeof Kt.includeImageAlt!="boolean"||Kt.includeImageAlt,typeof Kt.includeHtml!="boolean"||Kt.includeHtml)}(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function y(T){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(T),10),this.data.expectingFirstListItemValue=void 0)}function g(){const T=this.resume();this.stack[this.stack.length-1].lang=T}function v(){const T=this.resume();this.stack[this.stack.length-1].meta=T}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function m(){const T=this.resume();this.stack[this.stack.length-1].value=T.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const T=this.resume();this.stack[this.stack.length-1].value=T.replace(/(\r?\n|\r)$/g,"")}function P(T){const q=this.resume(),Y=this.stack[this.stack.length-1];Y.label=q,Y.identifier=yt(this.sliceSerialize(T)).toLowerCase()}function C(){const T=this.resume();this.stack[this.stack.length-1].title=T}function S(){const T=this.resume();this.stack[this.stack.length-1].url=T}function I(T){const q=this.stack[this.stack.length-1];if(!q.depth){const Y=this.sliceSerialize(T).length;q.depth=Y}}function Q(){this.data.setextHeadingSlurpLineEnding=!0}function B(T){this.stack[this.stack.length-1].depth=this.sliceSerialize(T).codePointAt(0)===61?1:2}function O(){this.data.setextHeadingSlurpLineEnding=void 0}function D(T){const q=this.stack[this.stack.length-1].children;let Y=q[q.length-1];(!Y||Y.type!=="text")&&(Y=Ht(),Y.position={start:nt(T.start),end:void 0},q.push(Y)),this.stack.push(Y)}function M(T){const q=this.stack.pop();q.value+=this.sliceSerialize(T),q.position.end=nt(T.end)}function U(T){const q=this.stack[this.stack.length-1];if(this.data.atHardBreak)return q.children[q.children.length-1].position.end=nt(T.end),void(this.data.atHardBreak=void 0);!this.data.setextHeadingSlurpLineEnding&&o.canContainEols.includes(q.type)&&(D.call(this,T),M.call(this,T))}function L(){this.data.atHardBreak=!0}function F(){const T=this.resume();this.stack[this.stack.length-1].value=T}function _(){const T=this.resume();this.stack[this.stack.length-1].value=T}function H(){const T=this.resume();this.stack[this.stack.length-1].value=T}function b(){const T=this.stack[this.stack.length-1];if(this.data.inReference){const q=this.data.referenceType||"shortcut";T.type+="Reference",T.referenceType=q,delete T.url,delete T.title}else delete T.identifier,delete T.label;this.data.referenceType=void 0}function X(){const T=this.stack[this.stack.length-1];if(this.data.inReference){const q=this.data.referenceType||"shortcut";T.type+="Reference",T.referenceType=q,delete T.url,delete T.title}else delete T.identifier,delete T.label;this.data.referenceType=void 0}function w(T){const q=this.sliceSerialize(T),Y=this.stack[this.stack.length-2];Y.label=function(te){return te.replace(Ns,Hs)}(q),Y.identifier=yt(q).toLowerCase()}function K(){const T=this.stack[this.stack.length-1],q=this.resume(),Y=this.stack[this.stack.length-1];if(this.data.inReference=!0,Y.type==="link"){const te=T.children;Y.children=te}else Y.alt=q}function R(){const T=this.resume();this.stack[this.stack.length-1].url=T}function z(){const T=this.resume();this.stack[this.stack.length-1].title=T}function G(){this.data.inReference=void 0}function Z(){this.data.referenceType="collapsed"}function $(T){const q=this.resume(),Y=this.stack[this.stack.length-1];Y.label=q,Y.identifier=yt(this.sliceSerialize(T)).toLowerCase(),this.data.referenceType="full"}function le(T){this.data.characterReferenceType=T.type}function ae(T){const q=this.sliceSerialize(T),Y=this.data.characterReferenceType;let te;Y?(te=_o(q,Y==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):te=zn(q),this.stack[this.stack.length-1].value+=te}function se(T){this.stack.pop().position.end=nt(T.end)}function we(T){M.call(this,T),this.stack[this.stack.length-1].url=this.sliceSerialize(T)}function Ye(T){M.call(this,T),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(T)}function ut(){return{type:"blockquote",children:[]}}function xe(){return{type:"code",lang:null,meta:null,value:""}}function Ne(){return{type:"inlineCode",value:""}}function xt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ot(){return{type:"emphasis",children:[]}}function We(){return{type:"heading",depth:0,children:[]}}function ge(){return{type:"break"}}function _e(){return{type:"html",value:""}}function Ve(){return{type:"image",title:null,url:"",alt:null}}function dn(){return{type:"link",title:null,url:"",children:[]}}function pn(T){return{type:"list",ordered:T.type==="listOrdered",start:null,spread:T._spread,children:[]}}function Nt(T){return{type:"listItem",spread:T._spread,checked:null,children:[]}}function yr(){return{type:"paragraph",children:[]}}function dt(){return{type:"strong",children:[]}}function Ht(){return{type:"text",value:""}}function fn(){return{type:"thematicBreak"}}}(r)(function(n){for(;!qo(n););return n}(function(n){const o={constructs:qA([_s,...(n||{}).extensions||[]]),content:a(ZA),defined:[],document:a($A),flow:a(Es),lazy:{},string:a(Cs),text:a(Ps)};return o;function a(s){return function(A){return Ls(o,s,A)}}}(r).document().write(function(){let n,o=1,a="",s=!0;return function(A,i,c){const l=[];let d,u,p,f,y;for(A=a+(typeof A=="string"?A.toString():new TextDecoder(i||void 0).decode(A)),p=0,a="",s&&(A.charCodeAt(0)===65279&&p++,s=void 0);p<A.length;){if(Zo.lastIndex=p,d=Zo.exec(A),f=d&&d.index!==void 0?d.index:A.length,y=A.charCodeAt(f),!d){a=A.slice(p);break}if(y===10&&p===f&&n)l.push(-3),n=void 0;else switch(n&&(l.push(-5),n=void 0),p<f&&(l.push(A.slice(p,f)),o+=f-p),y){case 0:l.push(65533),o++;break;case 9:for(u=4*Math.ceil(o/4),l.push(-2);o++<u;)l.push(-1);break;case 10:l.push(-4),o=1;break;default:n=!0,o=1}p=f+1}return c&&(n&&l.push(-5),a&&l.push(a),l.push(null)),l}}()(e,t,!0))))}function nt(e){return{line:e.line,column:e.column,offset:e.offset}}function ea(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?ea(e,n):Fs(e,n)}}function Fs(e,t){let r;for(r in t)if($o.call(t,r))switch(r){case"canContainEols":{const n=t[r];n&&e[r].push(...n);break}case"transforms":{const n=t[r];n&&e[r].push(...n);break}case"enter":case"exit":{const n=t[r];n&&Object.assign(e[r],n);break}}}function ta(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Dt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Dt({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Dt({start:t.start,end:t.end})+") is still open")}function zs(e){const t=this;t.parser=function(r){return Us(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function na(e,t){const r=t.referenceType;let n="]";if(r==="collapsed"?n+="[]":r==="full"&&(n+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+n}];const o=e.all(t),a=o[0];a&&a.type==="text"?a.value="["+a.value:o.unshift({type:"text",value:"["});const s=o[o.length-1];return s&&s.type==="text"?s.value+=n:o.push({type:"text",value:n}),o}function ra(e){return e.spread??e.children.length>1}function Rs(e){const t=String(e),r=/\r?\n|\r/g;let n=r.exec(t),o=0;const a=[];for(;n;)a.push(oa(t.slice(o,n.index),o>0,!0),n[0]),o=n.index+n[0].length,n=r.exec(t);return a.push(oa(t.slice(o),o>0,!1)),a.join("")}function oa(e,t,r){let n=0,o=e.length;if(t){let a=e.codePointAt(n);for(;a===9||a===32;)n++,a=e.codePointAt(n)}if(r){let a=e.codePointAt(o-1);for(;a===9||a===32;)o--,a=e.codePointAt(o-1)}return o>n?e.slice(n,o):""}const js={blockquote:function(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)},break:function(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
|
|
23
|
+
`;break;case-2:B=P?" ":" ";break;case-1:if(!P&&I)continue;B=" ";break;default:B=String.fromCharCode(Q)}I=Q===-2,S.push(B)}return S.join("")}(d(x),m)},sliceStream:d,write:function(x){return A=Oe(A,x),function(){let m;for(;n._index<A.length;){const E=A[n._index];if(typeof E=="string")for(m=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===m&&n._bufferIndex<E.length;)p(E.charCodeAt(n._bufferIndex));else p(E)}}(),A[A.length-1]!==null?[]:(g(t,0),c.events=qn(a,c.events,c),c.events)}};let l=t.tokenize.call(c,i);return t.resolveAll&&a.push(t),c;function d(x){return function(m,E){const P=E.start._index,C=E.start._bufferIndex,S=E.end._index,I=E.end._bufferIndex;let Q;if(P===S)Q=[m[P].slice(C,I)];else{if(Q=m.slice(P,S),C>-1){const B=Q[0];typeof B=="string"?Q[0]=B.slice(C):Q.shift()}I>0&&Q.push(m[S].slice(0,I))}return Q}(A,x)}function u(){const{_bufferIndex:x,_index:m,line:E,column:P,offset:C}=n;return{_bufferIndex:x,_index:m,line:E,column:P,offset:C}}function p(x){l=l(x)}function f(x,m){m.restore()}function y(x,m){return function(E,P,C){let S,I,Q,B;return Array.isArray(E)?O(E):"tokenize"in E?O([E]):function(L){return F;function F(_){const H=_!==null&&L[_],b=_!==null&&L.null;return O([...Array.isArray(H)?H:H?[H]:[],...Array.isArray(b)?b:b?[b]:[]])(_)}}(E);function O(L){return S=L,I=0,L.length===0?C:D(L[I])}function D(L){return function(F){return B=function(){const _=u(),H=c.previous,b=c.currentConstruct,X=c.events.length,w=Array.from(s);return{from:X,restore:K};function K(){n=_,c.previous=H,c.currentConstruct=b,c.events.length=X,s=w,v()}}(),Q=L,L.partial||(c.currentConstruct=L),L.name&&c.parser.constructs.disable.null.includes(L.name)?U():L.tokenize.call(m?Object.assign(Object.create(c),m):c,i,M,U)(F)}}function M(L){return x(Q,B),P}function U(L){return B.restore(),++I<S.length?D(S[I]):C}}}function g(x,m){x.resolveAll&&!a.includes(x)&&a.push(x),x.resolve&&Re(c.events,m,c.events.length-m,x.resolve(c.events.slice(m),c)),x.resolveTo&&(c.events=x.resolveTo(c.events,c))}function v(){n.line in o&&n.column<2&&(n.column=o[n.line],n.offset+=o[n.line]-1)}}const Zo=/[\0\t\n\r]/g,HA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function UA(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const n=r.charCodeAt(1),o=n===120||n===88;return _o(r.slice(o?2:1),o?16:10)}return zn(r)||e}const $o={}.hasOwnProperty;function FA(e,t,r){return typeof t!="string"&&(r=t,t=void 0),function(n){const o={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(dn),autolinkProtocol:D,autolinkEmail:D,atxHeading:i(We),blockQuote:i(ut),characterEscape:D,characterReference:D,codeFenced:i(xe),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:i(xe,c),codeText:i(Ne,c),codeTextData:D,data:D,codeFlowValue:D,definition:i(xt),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:i(ot),hardBreakEscape:i(ge),hardBreakTrailing:i(ge),htmlFlow:i(_e,c),htmlFlowData:D,htmlText:i(_e,c),htmlTextData:D,image:i(Ve),label:c,link:i(dn),listItem:i(Nt),listItemValue:y,listOrdered:i(pn,f),listUnordered:i(pn),paragraph:i(yr),reference:Z,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:i(We),strong:i(dt),thematicBreak:i(fn)},exit:{atxHeading:d(),atxHeadingSequence:I,autolink:d(),autolinkEmail:Ye,autolinkProtocol:we,blockQuote:d(),characterEscapeValue:M,characterReferenceMarkerHexadecimal:ae,characterReferenceMarkerNumeric:ae,characterReferenceValue:re,characterReference:le,codeFenced:d(m),codeFencedFence:x,codeFencedFenceInfo:g,codeFencedFenceMeta:v,codeFlowValue:M,codeIndented:d(E),codeText:d(H),codeTextData:M,data:M,definition:d(),definitionDestinationString:S,definitionLabelString:P,definitionTitleString:C,emphasis:d(),hardBreakEscape:d(L),hardBreakTrailing:d(L),htmlFlow:d(F),htmlFlowData:M,htmlText:d(_),htmlTextData:M,image:d(X),label:K,labelText:w,lineEnding:U,link:d(b),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:J,resourceDestinationString:R,resourceTitleString:z,resource:q,setextHeading:d(O),setextHeadingLineSequence:B,setextHeadingText:Q,strong:d(),thematicBreak:d()}};ea(o,(n||{}).mdastExtensions||[]);const a={};return A;function A(T){let G={type:"root",children:[]};const Y={stack:[G],tokenStack:[],config:o,enter:l,exit:u,buffer:c,resume:p,data:a},te=[];let ne=-1;for(;++ne<T.length;)(T[ne][1].type==="listOrdered"||T[ne][1].type==="listUnordered")&&(T[ne][0]==="enter"?te.push(ne):ne=s(T,te.pop(),ne));for(ne=-1;++ne<T.length;){const de=o[T[ne][0]];$o.call(de,T[ne][1].type)&&de[T[ne][1].type].call(Object.assign({sliceSerialize:T[ne][2].sliceSerialize},Y),T[ne][1])}if(Y.tokenStack.length>0){const de=Y.tokenStack[Y.tokenStack.length-1];(de[1]||ta).call(Y,void 0,de[0])}for(G.position={start:nt(T.length>0?T[0][1].start:{line:1,column:1,offset:0}),end:nt(T.length>0?T[T.length-2][1].end:{line:1,column:1,offset:0})},ne=-1;++ne<o.transforms.length;)G=o.transforms[ne](G)||G;return G}function s(T,G,Y){let te,ne,de,Ce,He=G-1,Ut=-1,Ua=!1;for(;++He<=Y;){const Te=T[He];switch(Te[1].type){case"listUnordered":case"listOrdered":case"blockQuote":Te[0]==="enter"?Ut++:Ut--,Ce=void 0;break;case"lineEndingBlank":Te[0]==="enter"&&(te&&!Ce&&!Ut&&!de&&(de=He),Ce=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ce=void 0}if(!Ut&&Te[0]==="enter"&&Te[1].type==="listItemPrefix"||Ut===-1&&Te[0]==="exit"&&(Te[1].type==="listUnordered"||Te[1].type==="listOrdered")){if(te){let Et=He;for(ne=void 0;Et--;){const Je=T[Et];if(Je[1].type==="lineEnding"||Je[1].type==="lineEndingBlank"){if(Je[0]==="exit")continue;ne&&(T[ne][1].type="lineEndingBlank",Ua=!0),Je[1].type="lineEnding",ne=Et}else if(Je[1].type!=="linePrefix"&&Je[1].type!=="blockQuotePrefix"&&Je[1].type!=="blockQuotePrefixWhitespace"&&Je[1].type!=="blockQuoteMarker"&&Je[1].type!=="listItemIndent")break}de&&(!ne||de<ne)&&(te._spread=!0),te.end=Object.assign({},ne?T[ne][1].start:Te[1].end),T.splice(ne||He,0,["exit",te,Te[2]]),He++,Y++}if(Te[1].type==="listItemPrefix"){const Et={type:"listItem",_spread:!1,start:Object.assign({},Te[1].start),end:void 0};te=Et,T.splice(He,0,["enter",Et,Te[2]]),He++,Y++,de=void 0,Ce=!0}}}return T[G][1]._spread=Ua,Y}function i(T,G){return Y;function Y(te){l.call(this,T(te),te),G&&G.call(this,te)}}function c(){this.stack.push({type:"fragment",children:[]})}function l(T,G,Y){this.stack[this.stack.length-1].children.push(T),this.stack.push(T),this.tokenStack.push([G,Y||void 0]),T.position={start:nt(G.start),end:void 0}}function d(T){return G;function G(Y){T&&T.call(this,Y),u.call(this,Y)}}function u(T,G){const Y=this.stack.pop(),te=this.tokenStack.pop();if(!te)throw new Error("Cannot close `"+T.type+"` ("+Dt({start:T.start,end:T.end})+"): it’s not open");te[0].type!==T.type&&(G?G.call(this,T,te[0]):(te[1]||ta).call(this,T,te[0])),Y.position.end=nt(T.end)}function p(){return function(T){return To(T,typeof Kt.includeImageAlt!="boolean"||Kt.includeImageAlt,typeof Kt.includeHtml!="boolean"||Kt.includeHtml)}(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function y(T){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(T),10),this.data.expectingFirstListItemValue=void 0)}function g(){const T=this.resume();this.stack[this.stack.length-1].lang=T}function v(){const T=this.resume();this.stack[this.stack.length-1].meta=T}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function m(){const T=this.resume();this.stack[this.stack.length-1].value=T.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const T=this.resume();this.stack[this.stack.length-1].value=T.replace(/(\r?\n|\r)$/g,"")}function P(T){const G=this.resume(),Y=this.stack[this.stack.length-1];Y.label=G,Y.identifier=yt(this.sliceSerialize(T)).toLowerCase()}function C(){const T=this.resume();this.stack[this.stack.length-1].title=T}function S(){const T=this.resume();this.stack[this.stack.length-1].url=T}function I(T){const G=this.stack[this.stack.length-1];if(!G.depth){const Y=this.sliceSerialize(T).length;G.depth=Y}}function Q(){this.data.setextHeadingSlurpLineEnding=!0}function B(T){this.stack[this.stack.length-1].depth=this.sliceSerialize(T).codePointAt(0)===61?1:2}function O(){this.data.setextHeadingSlurpLineEnding=void 0}function D(T){const G=this.stack[this.stack.length-1].children;let Y=G[G.length-1];(!Y||Y.type!=="text")&&(Y=Ht(),Y.position={start:nt(T.start),end:void 0},G.push(Y)),this.stack.push(Y)}function M(T){const G=this.stack.pop();G.value+=this.sliceSerialize(T),G.position.end=nt(T.end)}function U(T){const G=this.stack[this.stack.length-1];if(this.data.atHardBreak)return G.children[G.children.length-1].position.end=nt(T.end),void(this.data.atHardBreak=void 0);!this.data.setextHeadingSlurpLineEnding&&o.canContainEols.includes(G.type)&&(D.call(this,T),M.call(this,T))}function L(){this.data.atHardBreak=!0}function F(){const T=this.resume();this.stack[this.stack.length-1].value=T}function _(){const T=this.resume();this.stack[this.stack.length-1].value=T}function H(){const T=this.resume();this.stack[this.stack.length-1].value=T}function b(){const T=this.stack[this.stack.length-1];if(this.data.inReference){const G=this.data.referenceType||"shortcut";T.type+="Reference",T.referenceType=G,delete T.url,delete T.title}else delete T.identifier,delete T.label;this.data.referenceType=void 0}function X(){const T=this.stack[this.stack.length-1];if(this.data.inReference){const G=this.data.referenceType||"shortcut";T.type+="Reference",T.referenceType=G,delete T.url,delete T.title}else delete T.identifier,delete T.label;this.data.referenceType=void 0}function w(T){const G=this.sliceSerialize(T),Y=this.stack[this.stack.length-2];Y.label=function(te){return te.replace(HA,UA)}(G),Y.identifier=yt(G).toLowerCase()}function K(){const T=this.stack[this.stack.length-1],G=this.resume(),Y=this.stack[this.stack.length-1];if(this.data.inReference=!0,Y.type==="link"){const te=T.children;Y.children=te}else Y.alt=G}function R(){const T=this.resume();this.stack[this.stack.length-1].url=T}function z(){const T=this.resume();this.stack[this.stack.length-1].title=T}function q(){this.data.inReference=void 0}function Z(){this.data.referenceType="collapsed"}function J(T){const G=this.resume(),Y=this.stack[this.stack.length-1];Y.label=G,Y.identifier=yt(this.sliceSerialize(T)).toLowerCase(),this.data.referenceType="full"}function ae(T){this.data.characterReferenceType=T.type}function re(T){const G=this.sliceSerialize(T),Y=this.data.characterReferenceType;let te;Y?(te=_o(G,Y==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):te=zn(G),this.stack[this.stack.length-1].value+=te}function le(T){this.stack.pop().position.end=nt(T.end)}function we(T){M.call(this,T),this.stack[this.stack.length-1].url=this.sliceSerialize(T)}function Ye(T){M.call(this,T),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(T)}function ut(){return{type:"blockquote",children:[]}}function xe(){return{type:"code",lang:null,meta:null,value:""}}function Ne(){return{type:"inlineCode",value:""}}function xt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ot(){return{type:"emphasis",children:[]}}function We(){return{type:"heading",depth:0,children:[]}}function ge(){return{type:"break"}}function _e(){return{type:"html",value:""}}function Ve(){return{type:"image",title:null,url:"",alt:null}}function dn(){return{type:"link",title:null,url:"",children:[]}}function pn(T){return{type:"list",ordered:T.type==="listOrdered",start:null,spread:T._spread,children:[]}}function Nt(T){return{type:"listItem",spread:T._spread,checked:null,children:[]}}function yr(){return{type:"paragraph",children:[]}}function dt(){return{type:"strong",children:[]}}function Ht(){return{type:"text",value:""}}function fn(){return{type:"thematicBreak"}}}(r)(function(n){for(;!qo(n););return n}(function(n){const o={constructs:Gs([LA,...(n||{}).extensions||[]]),content:a($s),defined:[],document:a(eA),flow:a(kA),lazy:{},string:a(PA),text:a(SA)};return o;function a(A){return function(s){return NA(o,A,s)}}}(r).document().write(function(){let n,o=1,a="",A=!0;return function(s,i,c){const l=[];let d,u,p,f,y;for(s=a+(typeof s=="string"?s.toString():new TextDecoder(i||void 0).decode(s)),p=0,a="",A&&(s.charCodeAt(0)===65279&&p++,A=void 0);p<s.length;){if(Zo.lastIndex=p,d=Zo.exec(s),f=d&&d.index!==void 0?d.index:s.length,y=s.charCodeAt(f),!d){a=s.slice(p);break}if(y===10&&p===f&&n)l.push(-3),n=void 0;else switch(n&&(l.push(-5),n=void 0),p<f&&(l.push(s.slice(p,f)),o+=f-p),y){case 0:l.push(65533),o++;break;case 9:for(u=4*Math.ceil(o/4),l.push(-2);o++<u;)l.push(-1);break;case 10:l.push(-4),o=1;break;default:n=!0,o=1}p=f+1}return c&&(n&&l.push(-5),a&&l.push(a),l.push(null)),l}}()(e,t,!0))))}function nt(e){return{line:e.line,column:e.column,offset:e.offset}}function ea(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?ea(e,n):zA(e,n)}}function zA(e,t){let r;for(r in t)if($o.call(t,r))switch(r){case"canContainEols":{const n=t[r];n&&e[r].push(...n);break}case"transforms":{const n=t[r];n&&e[r].push(...n);break}case"enter":case"exit":{const n=t[r];n&&Object.assign(e[r],n);break}}}function ta(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Dt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Dt({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Dt({start:t.start,end:t.end})+") is still open")}function RA(e){const t=this;t.parser=function(r){return FA(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function na(e,t){const r=t.referenceType;let n="]";if(r==="collapsed"?n+="[]":r==="full"&&(n+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+n}];const o=e.all(t),a=o[0];a&&a.type==="text"?a.value="["+a.value:o.unshift({type:"text",value:"["});const A=o[o.length-1];return A&&A.type==="text"?A.value+=n:o.push({type:"text",value:n}),o}function ra(e){return e.spread??e.children.length>1}function jA(e){const t=String(e),r=/\r?\n|\r/g;let n=r.exec(t),o=0;const a=[];for(;n;)a.push(oa(t.slice(o,n.index),o>0,!0),n[0]),o=n.index+n[0].length,n=r.exec(t);return a.push(oa(t.slice(o),o>0,!1)),a.join("")}function oa(e,t,r){let n=0,o=e.length;if(t){let a=e.codePointAt(n);for(;a===9||a===32;)n++,a=e.codePointAt(n)}if(r){let a=e.codePointAt(o-1);for(;a===9||a===32;)o--,a=e.codePointAt(o-1)}return o>n?e.slice(n,o):""}const qA={blockquote:function(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)},break:function(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
|
|
24
24
|
`}]},code:function(e,t){const r=t.value?t.value+`
|
|
25
|
-
`:"",n={};t.lang&&(n.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:n,children:[{type:"text",value:r}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o},delete:function(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},emphasis:function(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},footnoteReference:function(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=String(t.identifier).toUpperCase(),o=bt(n.toLowerCase()),a=e.footnoteOrder.indexOf(n);let s
|
|
26
|
-
`}),l.type!=="element"||l.tagName!=="p"||o?
|
|
27
|
-
`});const c={type:"element",tagName:"li",properties:a,children:
|
|
25
|
+
`:"",n={};t.lang&&(n.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:n,children:[{type:"text",value:r}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o},delete:function(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},emphasis:function(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},footnoteReference:function(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=String(t.identifier).toUpperCase(),o=bt(n.toLowerCase()),a=e.footnoteOrder.indexOf(n);let A,s=e.footnoteCounts.get(n);s===void 0?(s=0,e.footnoteOrder.push(n),A=e.footnoteOrder.length):A=a+1,s+=1,e.footnoteCounts.set(n,s);const i={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+o,id:r+"fnref-"+o+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(A)}]};e.patch(t,i);const c={type:"element",tagName:"sup",properties:{},children:[i]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},html:function(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}},imageReference:function(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return na(e,t);const o={src:bt(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(o.title=n.title);const a={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,a),e.applyData(t,a)},image:function(e,t){const r={src:bt(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,n),e.applyData(t,n)},inlineCode:function(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const n={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,n),e.applyData(t,n)},linkReference:function(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return na(e,t);const o={href:bt(n.url||"")};n.title!==null&&n.title!==void 0&&(o.title=n.title);const a={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)},link:function(e,t){const r={href:bt(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},listItem:function(e,t,r){const n=e.all(t),o=r?function(l){let d=!1;if(l.type==="list"){d=l.spread||!1;const u=l.children;let p=-1;for(;!d&&++p<u.length;)d=ra(u[p])}return d}(r):ra(t),a={},A=[];if(typeof t.checked=="boolean"){const l=n[0];let d;l&&l.type==="element"&&l.tagName==="p"?d=l:(d={type:"element",tagName:"p",properties:{},children:[]},n.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let s=-1;for(;++s<n.length;){const l=n[s];(o||s!==0||l.type!=="element"||l.tagName!=="p")&&A.push({type:"text",value:`
|
|
26
|
+
`}),l.type!=="element"||l.tagName!=="p"||o?A.push(l):A.push(...l.children)}const i=n[n.length-1];i&&(o||i.type!=="element"||i.tagName!=="p")&&A.push({type:"text",value:`
|
|
27
|
+
`});const c={type:"element",tagName:"li",properties:a,children:A};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){const r={},n=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++o<n.length;){const A=n[o];if(A.type==="element"&&A.tagName==="li"&&A.properties&&Array.isArray(A.properties.className)&&A.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(n,!0)};return e.patch(t,a),e.applyData(t,a)},paragraph:function(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},root:function(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)},strong:function(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},table:function(e,t){const r=e.all(t),n=r.shift(),o=[];if(n){const A={type:"element",tagName:"thead",properties:{},children:e.wrap([n],!0)};e.patch(t.children[0],A),o.push(A)}if(r.length>0){const A={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},s=_n(t.children[1]),i=Eo(t.children[t.children.length-1]);s&&i&&(A.position={start:s,end:i}),o.push(A)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,a),e.applyData(t,a)},tableCell:function(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},tableRow:function(e,t,r){const n=r?r.children:void 0,o=(n?n.indexOf(t):1)===0?"th":"td",a=r&&r.type==="table"?r.align:void 0,A=a?a.length:t.children.length;let s=-1;const i=[];for(;++s<A;){const l=t.children[s],d={},u=a?a[s]:void 0;u&&(d.align=u);let p={type:"element",tagName:o,properties:d,children:[]};l&&(p.children=e.all(l),e.patch(l,p),p=e.applyData(l,p)),i.push(p)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(i,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const r={type:"text",value:jA(String(t.value))};return e.patch(t,r),e.applyData(t,r)},thematicBreak:function(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)},toml:$t,yaml:$t,definition:$t,footnoteDefinition:$t};function $t(){}const aa=typeof self=="object"?self:globalThis,ia=e=>((t,r)=>{const n=(a,A)=>(t.set(A,a),a),o=a=>{if(t.has(a))return t.get(a);const[A,s]=r[a];switch(A){case 0:case-1:return n(s,a);case 1:{const i=n([],a);for(const c of s)i.push(o(c));return i}case 2:{const i=n({},a);for(const[c,l]of s)i[o(c)]=o(l);return i}case 3:return n(new Date(s),a);case 4:{const{source:i,flags:c}=s;return n(new RegExp(i,c),a)}case 5:{const i=n(new Map,a);for(const[c,l]of s)i.set(o(c),o(l));return i}case 6:{const i=n(new Set,a);for(const c of s)i.add(o(c));return i}case 7:{const{name:i,message:c}=s;return n(new aa[i](c),a)}case 8:return n(BigInt(s),a);case"BigInt":return n(Object(BigInt(s)),a);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:i}=new Uint8Array(s);return n(new DataView(i),s)}}return n(new aa[A](s),a)};return o})(new Map,e)(0),vt="",{toString:GA}={},{keys:YA}=Object,Qt=e=>{const t=typeof e;if(t!=="object"||!e)return[0,t];const r=GA.call(e).slice(8,-1);switch(r){case"Array":return[1,vt];case"Object":return[2,vt];case"Date":return[3,vt];case"RegExp":return[4,vt];case"Map":return[5,vt];case"Set":return[6,vt];case"DataView":return[1,r]}return r.includes("Array")?[1,r]:r.includes("Error")?[7,r]:[2,r]},en=([e,t])=>e===0&&(t==="function"||t==="symbol"),sa=(e,{json:t,lossy:r}={})=>{const n=[];return((o,a,A,s)=>{const i=(l,d)=>{const u=s.push(l)-1;return A.set(d,u),u},c=l=>{if(A.has(l))return A.get(l);let[d,u]=Qt(l);switch(d){case 0:{let f=l;switch(u){case"bigint":d=8,f=l.toString();break;case"function":case"symbol":if(o)throw new TypeError("unable to serialize "+u);f=null;break;case"undefined":return i([-1],l)}return i([d,f],l)}case 1:{if(u){let g=l;return u==="DataView"?g=new Uint8Array(l.buffer):u==="ArrayBuffer"&&(g=new Uint8Array(l)),i([u,[...g]],l)}const f=[],y=i([d,f],l);for(const g of l)f.push(c(g));return y}case 2:{if(u)switch(u){case"BigInt":return i([u,l.toString()],l);case"Boolean":case"Number":case"String":return i([u,l.valueOf()],l)}if(a&&"toJSON"in l)return c(l.toJSON());const f=[],y=i([d,f],l);for(const g of YA(l))(o||!en(Qt(l[g])))&&f.push([c(g),c(l[g])]);return y}case 3:return i([d,l.toISOString()],l);case 4:{const{source:f,flags:y}=l;return i([d,{source:f,flags:y}],l)}case 5:{const f=[],y=i([d,f],l);for(const[g,v]of l)(o||!en(Qt(g))&&!en(Qt(v)))&&f.push([c(g),c(v)]);return y}case 6:{const f=[],y=i([d,f],l);for(const g of l)(o||!en(Qt(g)))&&f.push(c(g));return y}}const{message:p}=l;return i([d,{name:u,message:p}],l)};return c})(!(t||r),!!t,new Map,n)(e),n},tn=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ia(sa(e,t)):structuredClone(e):(e,t)=>ia(sa(e,t));function WA(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function VA(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const Aa=function(e){if(e==null)return XA;if(typeof e=="function")return nn(e);if(typeof e=="object")return Array.isArray(e)?function(t){const r=[];let n=-1;for(;++n<t.length;)r[n]=Aa(t[n]);return nn(o);function o(...a){let A=-1;for(;++A<r.length;)if(r[A].apply(this,a))return!0;return!1}}(e):function(t){const r=t;return nn(n);function n(o){const a=o;let A;for(A in t)if(a[A]!==r[A])return!1;return!0}}(e);if(typeof e=="string")return function(t){return nn(r);function r(n){return n&&n.type===t}}(e);throw new Error("Expected function, string, or object as test")};function nn(e){return function(t,r,n){return!(!function(o){return o!==null&&typeof o=="object"&&"type"in o}(t)||!e.call(this,t,typeof r=="number"?r:void 0,n||void 0))}}function XA(){return!0}const la=[],KA=!0,ca=!1;function JA(e,t,r,n){let o;typeof t=="function"&&typeof r!="function"?(n=r,r=t):o=t;const a=Aa(o),A=n?-1:1;(function s(i,c,l){const d=i&&typeof i=="object"?i:{};if(typeof d.type=="string"){const p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(u,"name",{value:"node ("+i.type+(p?"<"+p+">":"")+")"})}return u;function u(){let p,f,y,g=la;if((!t||a(i,c,l[l.length-1]||void 0))&&(g=function(v){return Array.isArray(v)?v:typeof v=="number"?[KA,v]:v==null?la:[v]}(r(i,l)),g[0]===ca))return g;if("children"in i&&i.children){const v=i;if(v.children&&g[0]!=="skip")for(f=(n?v.children.length:-1)+A,y=l.concat(v);f>-1&&f<v.children.length;){const x=v.children[f];if(p=s(x,f,y)(),p[0]===ca)return p;f=typeof p[1]=="number"?p[1]:f+A}}return g}})(e,void 0,[])()}function ua(e,t,r,n){let o,a,A;typeof t=="function"?(a=void 0,A=t,o=r):(a=t,A=r,o=n),JA(e,a,function(s,i){const c=i[i.length-1],l=c?c.children.indexOf(s):void 0;return A(s,l,c)},o)}const Xn={}.hasOwnProperty,ZA={};function $A(e,t){const r=t||ZA,n=new Map,o=new Map,a=new Map,A={...qA,...r.handlers},s={all:function(i){const c=[];if("children"in i){const l=i.children;let d=-1;for(;++d<l.length;){const u=s.one(l[d],i);if(u){if(d&&l[d-1].type==="break"&&(!Array.isArray(u)&&u.type==="text"&&(u.value=da(u.value)),!Array.isArray(u)&&u.type==="element")){const p=u.children[0];p&&p.type==="text"&&(p.value=da(p.value))}Array.isArray(u)?c.push(...u):c.push(u)}}}return c},applyData:tl,definitionById:n,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:A,one:function(i,c){const l=i.type,d=s.handlers[l];if(Xn.call(s.handlers,l)&&d)return d(s,i,c);if(s.options.passThrough&&s.options.passThrough.includes(l)){if("children"in i){const{children:u,...p}=i,f=tn(p);return f.children=s.all(i),f}return tn(i)}return(s.options.unknownHandler||nl)(s,i,c)},options:r,patch:el,wrap:rl};return ua(e,function(i){if(i.type==="definition"||i.type==="footnoteDefinition"){const c=i.type==="definition"?n:o,l=String(i.identifier).toUpperCase();c.has(l)||c.set(l,i)}}),s}function el(e,t){e.position&&(t.position=function(r){const n=_n(r),o=Eo(r);if(n&&o)return{start:n,end:o}}(e))}function tl(e,t){let r=t;if(e&&e.data){const n=e.data.hName,o=e.data.hChildren,a=e.data.hProperties;typeof n=="string"&&(r.type==="element"?r.tagName=n:r={type:"element",tagName:n,properties:{},children:"children"in r?r.children:[r]}),r.type==="element"&&a&&Object.assign(r.properties,tn(a)),"children"in r&&r.children&&o!=null&&(r.children=o)}return r}function nl(e,t){const r=t.data||{},n=!("value"in t)||Xn.call(r,"hProperties")||Xn.call(r,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,n),e.applyData(t,n)}function rl(e,t){const r=[];let n=-1;for(t&&r.push({type:"text",value:`
|
|
28
28
|
`});++n<e.length;)n&&r.push({type:"text",value:`
|
|
29
29
|
`}),r.push(e[n]);return t&&e.length>0&&r.push({type:"text",value:`
|
|
30
|
-
`}),r}function da(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function pa(e,t){const r
|
|
31
|
-
`},{type:"element",tagName:"ol",properties:{},children:
|
|
30
|
+
`}),r}function da(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function pa(e,t){const r=$A(e,t),n=r.one(e,void 0),o=function(A){const s=typeof A.options.clobberPrefix=="string"?A.options.clobberPrefix:"user-content-",i=A.options.footnoteBackContent||WA,c=A.options.footnoteBackLabel||VA,l=A.options.footnoteLabel||"Footnotes",d=A.options.footnoteLabelTagName||"h2",u=A.options.footnoteLabelProperties||{className:["sr-only"]},p=[];let f=-1;for(;++f<A.footnoteOrder.length;){const y=A.footnoteById.get(A.footnoteOrder[f]);if(!y)continue;const g=A.all(y),v=String(y.identifier).toUpperCase(),x=bt(v.toLowerCase());let m=0;const E=[],P=A.footnoteCounts.get(v);for(;P!==void 0&&++m<=P;){E.length>0&&E.push({type:"text",value:" "});let I=typeof i=="string"?i:i(f,m);typeof I=="string"&&(I={type:"text",value:I}),E.push({type:"element",tagName:"a",properties:{href:"#"+s+"fnref-"+x+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof c=="string"?c:c(f,m),className:["data-footnote-backref"]},children:Array.isArray(I)?I:[I]})}const C=g[g.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const I=C.children[C.children.length-1];I&&I.type==="text"?I.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...E)}else g.push(...E);const S={type:"element",tagName:"li",properties:{id:s+"fn-"+x},children:A.wrap(g,!0)};A.patch(y,S),p.push(S)}if(p.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:d,properties:{...tn(u),id:"footnote-label"},children:[{type:"text",value:l}]},{type:"text",value:`
|
|
31
|
+
`},{type:"element",tagName:"ol",properties:{},children:A.wrap(p,!0)},{type:"text",value:`
|
|
32
32
|
`}]}}(r),a=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return o&&a.children.push({type:"text",value:`
|
|
33
|
-
`},o),a}function rl(e,t){return e&&"run"in e?async function(r,n){const o=pa(r,{file:n,...t});await e.run(o,n)}:function(r,n){return pa(r,{file:n,...e||t})}}function fa(e){if(e)throw e}var Kn,ha,ol=function(){if(ha)return Kn;ha=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,o=function(i){return typeof Array.isArray=="function"?Array.isArray(i):t.call(i)==="[object Array]"},a=function(i){if(!i||t.call(i)!=="[object Object]")return!1;var c,l=e.call(i,"constructor"),d=i.constructor&&i.constructor.prototype&&e.call(i.constructor.prototype,"isPrototypeOf");if(i.constructor&&!l&&!d)return!1;for(c in i);return typeof c>"u"||e.call(i,c)},s=function(i,c){r&&c.name==="__proto__"?r(i,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0}):i[c.name]=c.newValue},A=function(i,c){if(c==="__proto__"){if(!e.call(i,c))return;if(n)return n(i,c).value}return i[c]};return Kn=function i(){var c,l,d,u,p,f,y=arguments[0],g=1,v=arguments.length,x=!1;for(typeof y=="boolean"&&(x=y,y=arguments[1]||{},g=2),(y==null||typeof y!="object"&&typeof y!="function")&&(y={});g<v;++g)if((c=arguments[g])!=null)for(l in c)d=A(y,l),y!==(u=A(c,l))&&(x&&u&&(a(u)||(p=o(u)))?(p?(p=!1,f=d&&o(d)?d:[]):f=d&&a(d)?d:{},s(y,{name:l,newValue:i(x,f,u)})):typeof u<"u"&&s(y,{name:l,newValue:u}));return y},Kn}();const Jn=bo(ol);function Zn(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return!(t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.toStringTag in e||Symbol.iterator in e)}function al(){const e=[],t={run:function(...r){let n=-1;const o=r.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);(function a(s,...A){const i=e[++n];let c=-1;if(s)o(s);else{for(;++c<r.length;)(A[c]===null||A[c]===void 0)&&(A[c]=r[c]);r=A,i?function(l,d){let u;return p;function p(...g){const v=l.length>g.length;let x;v&&g.push(f);try{x=l.apply(this,g)}catch(m){if(v&&u)throw m;return f(m)}v||(x&&x.then&&typeof x.then=="function"?x.then(y,f):x instanceof Error?f(x):y(x))}function f(g,...v){u||(u=!0,d(g,...v))}function y(g){f(null,g)}}(i,a)(...A):o(null,...A)}})(null,...r)},use:function(r){if(typeof r!="function")throw new TypeError("Expected `middelware` to be a function, not "+r);return e.push(r),t}};return t}const qe={basename:function(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Mt(e);let r,n=0,o=-1,a=e.length;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(r){n=a+1;break}}else o<0&&(r=!0,o=a+1);return o<0?"":e.slice(n,o)}if(t===e)return"";let s=-1,A=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(r){n=a+1;break}}else s<0&&(r=!0,s=a+1),A>-1&&(e.codePointAt(a)===t.codePointAt(A--)?A<0&&(o=a):(A=-1,o=s));return n===o?o=s:o<0&&(o=e.length),e.slice(n,o)},dirname:function(e){if(Mt(e),e.length===0)return".";let t,r=-1,n=e.length;for(;--n;)if(e.codePointAt(n)===47){if(t){r=n;break}}else t||(t=!0);return r<0?e.codePointAt(0)===47?"/":".":r===1&&e.codePointAt(0)===47?"//":e.slice(0,r)},extname:function(e){Mt(e);let t,r=e.length,n=-1,o=0,a=-1,s=0;for(;r--;){const A=e.codePointAt(r);if(A!==47)n<0&&(t=!0,n=r+1),A===46?a<0?a=r:s!==1&&(s=1):a>-1&&(s=-1);else if(t){o=r+1;break}}return a<0||n<0||s===0||s===1&&a===n-1&&a===o+1?"":e.slice(a,n)},join:function(...e){let t,r=-1;for(;++r<e.length;)Mt(e[r]),e[r]&&(t=t===void 0?e[r]:t+"/"+e[r]);return t===void 0?".":function(n){Mt(n);const o=n.codePointAt(0)===47;let a=function(s,A){let i,c,l="",d=0,u=-1,p=0,f=-1;for(;++f<=s.length;){if(f<s.length)i=s.codePointAt(f);else{if(i===47)break;i=47}if(i===47){if(u!==f-1&&p!==1)if(u!==f-1&&p===2){if(l.length<2||d!==2||l.codePointAt(l.length-1)!==46||l.codePointAt(l.length-2)!==46){if(l.length>2){if(c=l.lastIndexOf("/"),c!==l.length-1){c<0?(l="",d=0):(l=l.slice(0,c),d=l.length-1-l.lastIndexOf("/")),u=f,p=0;continue}}else if(l.length>0){l="",d=0,u=f,p=0;continue}}A&&(l=l.length>0?l+"/..":"..",d=2)}else l.length>0?l+="/"+s.slice(u+1,f):l=s.slice(u+1,f),d=f-u-1;u=f,p=0}else i===46&&p>-1?p++:p=-1}return l}(n,!o);return a.length===0&&!o&&(a="."),a.length>0&&n.codePointAt(n.length-1)===47&&(a+="/"),o?"/"+a:a}(t)},sep:"/"};function Mt(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const il={cwd:function(){return"/"}};function $n(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Al(e){if(typeof e=="string")e=new URL(e);else if(!$n(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return function(t){if(t.hostname!==""){const o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}const r=t.pathname;let n=-1;for(;++n<r.length;)if(r.codePointAt(n)===37&&r.codePointAt(n+1)===50){const o=r.codePointAt(n+2);if(o===70||o===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(r)}(e)}const er=["history","path","basename","stem","extname","dirname"];class ga{constructor(t){let r;var n;r=t?$n(t)?{path:t}:typeof t=="string"||(n=t)&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n?{value:t}:t:{},this.cwd="cwd"in r?"":il.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o,a=-1;for(;++a<er.length;){const s=er[a];s in r&&r[s]!==void 0&&r[s]!==null&&(this[s]=s==="history"?[...r[s]]:r[s])}for(o in r)er.includes(o)||(this[o]=r[o])}get basename(){return typeof this.path=="string"?qe.basename(this.path):void 0}set basename(t){nr(t,"basename"),tr(t,"basename"),this.path=qe.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?qe.dirname(this.path):void 0}set dirname(t){ma(this.basename,"dirname"),this.path=qe.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?qe.extname(this.path):void 0}set extname(t){if(tr(t,"extname"),ma(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=qe.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){$n(t)&&(t=Al(t)),nr(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?qe.basename(this.path,this.extname):void 0}set stem(t){nr(t,"stem"),tr(t,"stem"),this.path=qe.join(this.dirname||"",t+(this.extname||""))}fail(t,r,n){const o=this.message(t,r,n);throw o.fatal=!0,o}info(t,r,n){const o=this.message(t,r,n);return o.fatal=void 0,o}message(t,r,n){const o=new ve(t,r,n);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function tr(e,t){if(e&&e.includes(qe.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+qe.sep+"`")}function nr(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ma(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const sl=function(e){const t=this.constructor.prototype,r=t[e],n=function(){return r.apply(n,arguments)};return Object.setPrototypeOf(n,t),n},ll={}.hasOwnProperty;class rr extends sl{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=al()}copy(){const t=new rr;let r=-1;for(;++r<this.attachers.length;){const n=this.attachers[r];t.use(...n)}return t.data(Jn(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(ir("data",this.frozen),this.namespace[t]=r,this):ll.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ir("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);const o=r.call(t,...n);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=rn(t),n=this.parser||this.Parser;return or("parse",n),n(String(r),r)}process(t,r){const n=this;return this.freeze(),or("process",this.parser||this.Parser),ar("process",this.compiler||this.Compiler),r?o(void 0,r):new Promise(o);function o(a,s){const A=rn(t),i=n.parse(A);function c(l,d){l||!d?s(l):a?a(d):r(void 0,d)}n.run(i,A,function(l,d,u){if(l||!d||!u)return c(l);const p=d,f=n.stringify(p,u);var y;typeof(y=f)=="string"||function(g){return!!(g&&typeof g=="object"&&"byteLength"in g&&"byteOffset"in g)}(y)?u.value=f:u.result=f,c(l,u)})}}processSync(t){let r,n=!1;return this.freeze(),or("processSync",this.parser||this.Parser),ar("processSync",this.compiler||this.Compiler),this.process(t,function(o,a){n=!0,fa(o),r=a}),ba("processSync","process",n),r}run(t,r,n){ya(t),this.freeze();const o=this.transformers;return!n&&typeof r=="function"&&(n=r,r=void 0),n?a(void 0,n):new Promise(a);function a(s,A){const i=rn(r);o.run(t,i,function(c,l,d){const u=l||t;c?A(c):s?s(u):n(void 0,u,d)})}}runSync(t,r){let n,o=!1;return this.run(t,r,function(a,s){fa(a),n=s,o=!0}),ba("runSync","run",o),n}stringify(t,r){this.freeze();const n=rn(r),o=this.compiler||this.Compiler;return ar("stringify",o),ya(t),o(t,n)}use(t,...r){const n=this.attachers,o=this.namespace;if(ir("use",this.frozen),t!=null)if(typeof t=="function")i(t,r);else{if(typeof t!="object")throw new TypeError("Expected usable value, not `"+t+"`");Array.isArray(t)?A(t):s(t)}return this;function a(c){if(typeof c=="function")i(c,[]);else{if(typeof c!="object")throw new TypeError("Expected usable value, not `"+c+"`");if(Array.isArray(c)){const[l,...d]=c;i(l,d)}else s(c)}}function s(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");A(c.plugins),c.settings&&(o.settings=Jn(!0,o.settings,c.settings))}function A(c){let l=-1;if(c!=null){if(!Array.isArray(c))throw new TypeError("Expected a list of plugins, not `"+c+"`");for(;++l<c.length;)a(c[l])}}function i(c,l){let d=-1,u=-1;for(;++d<n.length;)if(n[d][0]===c){u=d;break}if(u===-1)n.push([c,...l]);else if(l.length>0){let[p,...f]=l;const y=n[u][1];Zn(y)&&Zn(p)&&(p=Jn(!0,y,p)),n[u]=[c,p,...f]}}}}const cl=new rr().freeze();function or(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ar(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ir(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ya(e){if(!Zn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ba(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function rn(e){return function(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}(e)?e:new ga(e)}const va=[],wa={allowDangerousHtml:!0},ul=/^(https?|ircs?|mailto|xmpp)$/i,dl=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function pl(e){const t=e.allowedElements,r=e.allowElement,n=e.children||"",o=e.className,a=e.components,s=e.disallowedElements,A=e.rehypePlugins||va,i=e.remarkPlugins||va,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...wa}:wa,l=e.skipHtml,d=e.unwrapDisallowed,u=e.urlTransform||fl,p=cl().use(zs).use(i).use(rl,c).use(A),f=new ga;typeof n=="string"&&(f.value=n);for(const v of dl)Object.hasOwn(e,v.from)&&(v.from,v.to&&v.to,v.id);const y=p.parse(f);let g=p.runSync(y,f);return o&&(g={type:"element",tagName:"div",properties:{className:o},children:g.type==="root"?g.children:[g]}),ua(g,function(v,x,m){if(v.type==="raw"&&m&&typeof x=="number")return l?m.children.splice(x,1):m.children[x]={type:"text",value:v.value},x;if(v.type==="element"){let E;for(E in Fn)if(Object.hasOwn(Fn,E)&&Object.hasOwn(v.properties,E)){const P=v.properties[E],C=Fn[E];(C===null||C.includes(v.tagName))&&(v.properties[E]=u(String(P||""),E,v))}}if(v.type==="element"){let E=t?!t.includes(v.tagName):!!s&&s.includes(v.tagName);if(!E&&r&&typeof x=="number"&&(E=!r(v,x,m)),E&&m&&typeof x=="number")return d&&v.children?m.children.splice(x,1,...v.children):m.children.splice(x,1),x}}),UA(g,{Fragment:k.Fragment,components:a,ignoreInvalidStyle:!0,jsx:k.jsx,jsxs:k.jsxs,passKeys:!0,passNode:!0})}function fl(e){const t=e.indexOf(":"),r=e.indexOf("?"),n=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||r!==-1&&t>r||n!==-1&&t>n||ul.test(e.slice(0,t))?e:""}const hl=({children:e})=>k.jsx("div",{style:{whiteSpace:"normal"},children:k.jsx(pl,{components:{p:({...t})=>k.jsx("p",{style:{margin:0,marginBottom:"0.5em",lineHeight:1.4,textAlign:"left"},children:t.children}),ul:({...t})=>k.jsx("ul",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:t.children}),ol:({...t})=>k.jsx("ol",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:t.children}),li:({...t})=>k.jsx("li",{style:{marginBottom:"1px",lineHeight:1.4},children:t.children}),code:({inline:t,children:r})=>t?k.jsx("code",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"2px 4px",borderRadius:"4px",fontFamily:"inherit",fontSize:"0.95em"},children:r}):k.jsx("pre",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"8px",borderRadius:"4px",overflowX:"auto",margin:"0.5em 0",whiteSpace:"pre-wrap"},children:k.jsx("code",{children:r})}),blockquote:({...t})=>k.jsx("blockquote",{style:{margin:0,paddingLeft:"10px",borderLeft:"2px solid #ccc",color:"#666",fontStyle:"italic"},children:t.children})},children:typeof e=="string"?e:""})}),gl={autoConfig:!0},ml=e=>()=>(t=>{const{getFlow:r}=Vt(),{messages:n,replaceMessages:o}=Pt(),{settings:a}=Jr(),{hasChatHistoryLoaded:s}=$r(),A={...t,...gl},i=A.markdownComponent?A.markdownComponent:hl;h.useEffect(()=>{var d,u;if(s){const p=[...n];for(let f=0;f<p.length&&f<(((d=a.chatHistory)==null?void 0:d.maxEntries)??30);f++){const y=p[f];(u=y.tags)!=null&&u.includes("rcb-markdown-renderer-plugin:parsed")&&(y.contentWrapper=i)}o(p)}},[s]);const c=async d=>{var u;const p=(u=d.data.message)==null?void 0:u.sender.toUpperCase();((f,y,g)=>{var v;if(typeof f.data.message.content!="string"||!f.detail.currPath)return!1;const x=y[f.detail.currPath];return!!x&&(((v=x.renderMarkdown)==null?void 0:v.map(m=>m.toUpperCase()).includes(g))??!1)})(d,r(),p)&&(d.data.message.contentWrapper=i,d.data.message.tags||(d.data.message.tags=[]),d.data.message.tags.push("rcb-markdown-renderer-plugin:parsed"))};Qe(j.PRE_INJECT_MESSAGE,c),Qe(j.CHUNK_STREAM_MESSAGE,c),Qe(j.START_STREAM_MESSAGE,c),Qe(j.START_SIMULATE_STREAM_MESSAGE,c);const l={name:"@rcb-plugins/markdown-renderer"};return A!=null&&A.autoConfig&&(l.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0}}),l})(e),on={autoConfig:!0,promptBaseColors:{info:"#007bff",warning:"#ffc107",error:"#dc3545",success:"#28a745"},promptHoveredColors:{info:"#0056b3",warning:"#d39e00",error:"#c82333",success:"#218838"},textAreaHighlightColors:{info:"#007bff",warning:"#ffc107",error:"#dc3545",success:"#28a745"}},xa=(e,t,r="validateTextInput")=>{var n;if((n=e.detail)==null||!n.currPath)return;const o=t[e.detail.currPath];if(!o)return;const a=o[r];return typeof a=="function"?a:void 0},yl=e=>{const{showToast:t}=(()=>{const{showToast:d,dismissToast:u,toasts:p,replaceToasts:f}=pt();return{showToast:d,dismissToast:u,toasts:p,replaceToasts:f}})(),{getFlow:r}=Vt(),{styles:n,updateStyles:o,replaceStyles:a}=(()=>{const{styles:d,replaceStyles:u,updateStyles:p}=Wr();return{styles:d,replaceStyles:u,updateStyles:p}})(),s=(d=>({...on,...d,promptBaseColors:{...on.promptBaseColors},promptHoveredColors:{...on.promptHoveredColors},textAreaHighlightColors:{...on.textAreaHighlightColors}}))(e),[A,i]=h.useState(0),c=h.useRef({});Qe(j.USER_SUBMIT_TEXT,d=>{const u=d,p=xa(u,r(),"validateTextInput");if(!p)return;const f=p(u.data.inputText);if(f!=null&&f.success||d.preventDefault(),!f.promptContent)return;A===0&&(c.current=structuredClone(n));const y=((g,v)=>{const x=g.promptType??"info";let m={};return v.advancedStyles&&(m=v.advancedStyles[x]),v.promptBaseColors&&(m.toastPromptStyle={color:v.promptBaseColors[x],borderColor:v.promptBaseColors[x]}),v.promptHoveredColors&&(m.toastPromptHoveredStyle={color:v.promptHoveredColors[x],borderColor:v.promptHoveredColors[x]}),v.textAreaHighlightColors&&(g.highlightTextArea??!0)&&(m.chatInputAreaStyle={boxShadow:`${v.textAreaHighlightColors[x]} 0px 0px 5px`}),m})(f,s);o(y),t(f.promptContent,f.promptDuration??3e3),i(g=>g+1)}),Qe(j.USER_UPLOAD_FILE,d=>{var u,p;const f=d,y=(p=(u=f.data)==null?void 0:u.files)==null?void 0:p[0];if(!y)return console.error("No file uploaded."),void d.preventDefault();const g=xa(f,r(),"validateFileInput");if(!g)return void console.error("Validator not found for file input.");const v=g(y);if(!v.success)return console.error("Validation failed:",v),v.promptContent&&t(v.promptContent,v.promptDuration??3e3),void d.preventDefault();console.log("Validation successful:",v)}),Qe(j.DISMISS_TOAST,()=>{i(d=>d-1)}),h.useEffect(()=>{A===0&&setTimeout(()=>{a(c.current)})},[A,a]);const l={name:"@rcb-plugins/input-validator"};return s.autoConfig&&(l.settings={event:{rcbUserSubmitText:!0,rcbUserUploadFile:!0,rcbDismissToast:!0}}),l},Ea=h.forwardRef((e,t)=>{let{embedded:r,currentOpen:n,enabled:o,onSetEnabled:a}=e;const s=Pt(),A=(()=>{const{isChatWindowOpen:l,toggleChatWindow:d,toggleIsBotTyping:u,scrollToBottom:p,getIsChatBotVisible:f}=De();return{isChatWindowOpen:l,toggleChatWindow:d,toggleIsBotTyping:u,scrollToBottom:p,getIsChatBotVisible:f}})(),i=h.useRef(!1),c=h.useRef(!1);return h.useEffect(()=>{!r&&A&&A.toggleChatWindow&&(i.current===n||c.current||(setTimeout(()=>{A&&A.toggleChatWindow&&A.toggleChatWindow(n)},0),i.current=n!=null&&n),c.current=!1)},[n,r,A]),h.useEffect(()=>{const l=()=>{c.current=!0};return window.addEventListener("rcb-toggle-chat-window",l),()=>window.removeEventListener("rcb-toggle-chat-window",l)}),h.useImperativeHandle(t,()=>({addMessage:l=>{s&&s.injectMessage&&s.injectMessage(l)},openChat:()=>{!r&&A&&A.toggleChatWindow&&A.toggleChatWindow(!0)},closeChat:()=>{!r&&A&&A.toggleChatWindow&&A.toggleChatWindow(!1)},toggleChat:()=>{!r&&A&&A.toggleChatWindow&&A.toggleChatWindow()},setBotEnabled:l=>{a&&a(l)}}),[s,A,r,a]),null});Ea.displayName="BotController";const ka=e=>{let{loginUrl:t,className:r="",style:n,isHeaderButton:o=!1}=e;const a=o?{display:"inline-block",padding:"6px 12px",backgroundColor:"transparent",border:"1px solid #ccc",color:"white",textDecoration:"none",borderRadius:"4px",fontWeight:"normal",textAlign:"center",margin:"8px",fontSize:"12px",opacity:.8,transition:"all 0.2s ease"}:{display:"inline-block",padding:"10px 20px",backgroundColor:"white",border:"1px solid var(--primaryColor, #107180)",color:"var(--primaryColor, #107180)",textDecoration:"none",borderRadius:"4px",fontWeight:"bold",textAlign:"center",margin:"18px",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.2)"};return h.createElement(h.Fragment,null,o&&h.createElement("style",null,`
|
|
33
|
+
`},o),a}function ol(e,t){return e&&"run"in e?async function(r,n){const o=pa(r,{file:n,...t});await e.run(o,n)}:function(r,n){return pa(r,{file:n,...e||t})}}function fa(e){if(e)throw e}var Kn,ha,al=function(){if(ha)return Kn;ha=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,o=function(i){return typeof Array.isArray=="function"?Array.isArray(i):t.call(i)==="[object Array]"},a=function(i){if(!i||t.call(i)!=="[object Object]")return!1;var c,l=e.call(i,"constructor"),d=i.constructor&&i.constructor.prototype&&e.call(i.constructor.prototype,"isPrototypeOf");if(i.constructor&&!l&&!d)return!1;for(c in i);return typeof c>"u"||e.call(i,c)},A=function(i,c){r&&c.name==="__proto__"?r(i,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0}):i[c.name]=c.newValue},s=function(i,c){if(c==="__proto__"){if(!e.call(i,c))return;if(n)return n(i,c).value}return i[c]};return Kn=function i(){var c,l,d,u,p,f,y=arguments[0],g=1,v=arguments.length,x=!1;for(typeof y=="boolean"&&(x=y,y=arguments[1]||{},g=2),(y==null||typeof y!="object"&&typeof y!="function")&&(y={});g<v;++g)if((c=arguments[g])!=null)for(l in c)d=s(y,l),y!==(u=s(c,l))&&(x&&u&&(a(u)||(p=o(u)))?(p?(p=!1,f=d&&o(d)?d:[]):f=d&&a(d)?d:{},A(y,{name:l,newValue:i(x,f,u)})):typeof u<"u"&&A(y,{name:l,newValue:u}));return y},Kn}();const Jn=bo(al);function Zn(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return!(t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.toStringTag in e||Symbol.iterator in e)}function il(){const e=[],t={run:function(...r){let n=-1;const o=r.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);(function a(A,...s){const i=e[++n];let c=-1;if(A)o(A);else{for(;++c<r.length;)(s[c]===null||s[c]===void 0)&&(s[c]=r[c]);r=s,i?function(l,d){let u;return p;function p(...g){const v=l.length>g.length;let x;v&&g.push(f);try{x=l.apply(this,g)}catch(m){if(v&&u)throw m;return f(m)}v||(x&&x.then&&typeof x.then=="function"?x.then(y,f):x instanceof Error?f(x):y(x))}function f(g,...v){u||(u=!0,d(g,...v))}function y(g){f(null,g)}}(i,a)(...s):o(null,...s)}})(null,...r)},use:function(r){if(typeof r!="function")throw new TypeError("Expected `middelware` to be a function, not "+r);return e.push(r),t}};return t}const qe={basename:function(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Mt(e);let r,n=0,o=-1,a=e.length;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(r){n=a+1;break}}else o<0&&(r=!0,o=a+1);return o<0?"":e.slice(n,o)}if(t===e)return"";let A=-1,s=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(r){n=a+1;break}}else A<0&&(r=!0,A=a+1),s>-1&&(e.codePointAt(a)===t.codePointAt(s--)?s<0&&(o=a):(s=-1,o=A));return n===o?o=A:o<0&&(o=e.length),e.slice(n,o)},dirname:function(e){if(Mt(e),e.length===0)return".";let t,r=-1,n=e.length;for(;--n;)if(e.codePointAt(n)===47){if(t){r=n;break}}else t||(t=!0);return r<0?e.codePointAt(0)===47?"/":".":r===1&&e.codePointAt(0)===47?"//":e.slice(0,r)},extname:function(e){Mt(e);let t,r=e.length,n=-1,o=0,a=-1,A=0;for(;r--;){const s=e.codePointAt(r);if(s!==47)n<0&&(t=!0,n=r+1),s===46?a<0?a=r:A!==1&&(A=1):a>-1&&(A=-1);else if(t){o=r+1;break}}return a<0||n<0||A===0||A===1&&a===n-1&&a===o+1?"":e.slice(a,n)},join:function(...e){let t,r=-1;for(;++r<e.length;)Mt(e[r]),e[r]&&(t=t===void 0?e[r]:t+"/"+e[r]);return t===void 0?".":function(n){Mt(n);const o=n.codePointAt(0)===47;let a=function(A,s){let i,c,l="",d=0,u=-1,p=0,f=-1;for(;++f<=A.length;){if(f<A.length)i=A.codePointAt(f);else{if(i===47)break;i=47}if(i===47){if(u!==f-1&&p!==1)if(u!==f-1&&p===2){if(l.length<2||d!==2||l.codePointAt(l.length-1)!==46||l.codePointAt(l.length-2)!==46){if(l.length>2){if(c=l.lastIndexOf("/"),c!==l.length-1){c<0?(l="",d=0):(l=l.slice(0,c),d=l.length-1-l.lastIndexOf("/")),u=f,p=0;continue}}else if(l.length>0){l="",d=0,u=f,p=0;continue}}s&&(l=l.length>0?l+"/..":"..",d=2)}else l.length>0?l+="/"+A.slice(u+1,f):l=A.slice(u+1,f),d=f-u-1;u=f,p=0}else i===46&&p>-1?p++:p=-1}return l}(n,!o);return a.length===0&&!o&&(a="."),a.length>0&&n.codePointAt(n.length-1)===47&&(a+="/"),o?"/"+a:a}(t)},sep:"/"};function Mt(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const sl={cwd:function(){return"/"}};function $n(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Al(e){if(typeof e=="string")e=new URL(e);else if(!$n(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return function(t){if(t.hostname!==""){const o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}const r=t.pathname;let n=-1;for(;++n<r.length;)if(r.codePointAt(n)===37&&r.codePointAt(n+1)===50){const o=r.codePointAt(n+2);if(o===70||o===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(r)}(e)}const er=["history","path","basename","stem","extname","dirname"];class ga{constructor(t){let r;var n;r=t?$n(t)?{path:t}:typeof t=="string"||(n=t)&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n?{value:t}:t:{},this.cwd="cwd"in r?"":sl.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o,a=-1;for(;++a<er.length;){const A=er[a];A in r&&r[A]!==void 0&&r[A]!==null&&(this[A]=A==="history"?[...r[A]]:r[A])}for(o in r)er.includes(o)||(this[o]=r[o])}get basename(){return typeof this.path=="string"?qe.basename(this.path):void 0}set basename(t){nr(t,"basename"),tr(t,"basename"),this.path=qe.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?qe.dirname(this.path):void 0}set dirname(t){ma(this.basename,"dirname"),this.path=qe.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?qe.extname(this.path):void 0}set extname(t){if(tr(t,"extname"),ma(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=qe.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){$n(t)&&(t=Al(t)),nr(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?qe.basename(this.path,this.extname):void 0}set stem(t){nr(t,"stem"),tr(t,"stem"),this.path=qe.join(this.dirname||"",t+(this.extname||""))}fail(t,r,n){const o=this.message(t,r,n);throw o.fatal=!0,o}info(t,r,n){const o=this.message(t,r,n);return o.fatal=void 0,o}message(t,r,n){const o=new ve(t,r,n);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function tr(e,t){if(e&&e.includes(qe.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+qe.sep+"`")}function nr(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ma(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const ll=function(e){const t=this.constructor.prototype,r=t[e],n=function(){return r.apply(n,arguments)};return Object.setPrototypeOf(n,t),n},cl={}.hasOwnProperty;class rr extends ll{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=il()}copy(){const t=new rr;let r=-1;for(;++r<this.attachers.length;){const n=this.attachers[r];t.use(...n)}return t.data(Jn(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(ir("data",this.frozen),this.namespace[t]=r,this):cl.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ir("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);const o=r.call(t,...n);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=rn(t),n=this.parser||this.Parser;return or("parse",n),n(String(r),r)}process(t,r){const n=this;return this.freeze(),or("process",this.parser||this.Parser),ar("process",this.compiler||this.Compiler),r?o(void 0,r):new Promise(o);function o(a,A){const s=rn(t),i=n.parse(s);function c(l,d){l||!d?A(l):a?a(d):r(void 0,d)}n.run(i,s,function(l,d,u){if(l||!d||!u)return c(l);const p=d,f=n.stringify(p,u);var y;typeof(y=f)=="string"||function(g){return!!(g&&typeof g=="object"&&"byteLength"in g&&"byteOffset"in g)}(y)?u.value=f:u.result=f,c(l,u)})}}processSync(t){let r,n=!1;return this.freeze(),or("processSync",this.parser||this.Parser),ar("processSync",this.compiler||this.Compiler),this.process(t,function(o,a){n=!0,fa(o),r=a}),ba("processSync","process",n),r}run(t,r,n){ya(t),this.freeze();const o=this.transformers;return!n&&typeof r=="function"&&(n=r,r=void 0),n?a(void 0,n):new Promise(a);function a(A,s){const i=rn(r);o.run(t,i,function(c,l,d){const u=l||t;c?s(c):A?A(u):n(void 0,u,d)})}}runSync(t,r){let n,o=!1;return this.run(t,r,function(a,A){fa(a),n=A,o=!0}),ba("runSync","run",o),n}stringify(t,r){this.freeze();const n=rn(r),o=this.compiler||this.Compiler;return ar("stringify",o),ya(t),o(t,n)}use(t,...r){const n=this.attachers,o=this.namespace;if(ir("use",this.frozen),t!=null)if(typeof t=="function")i(t,r);else{if(typeof t!="object")throw new TypeError("Expected usable value, not `"+t+"`");Array.isArray(t)?s(t):A(t)}return this;function a(c){if(typeof c=="function")i(c,[]);else{if(typeof c!="object")throw new TypeError("Expected usable value, not `"+c+"`");if(Array.isArray(c)){const[l,...d]=c;i(l,d)}else A(c)}}function A(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(c.plugins),c.settings&&(o.settings=Jn(!0,o.settings,c.settings))}function s(c){let l=-1;if(c!=null){if(!Array.isArray(c))throw new TypeError("Expected a list of plugins, not `"+c+"`");for(;++l<c.length;)a(c[l])}}function i(c,l){let d=-1,u=-1;for(;++d<n.length;)if(n[d][0]===c){u=d;break}if(u===-1)n.push([c,...l]);else if(l.length>0){let[p,...f]=l;const y=n[u][1];Zn(y)&&Zn(p)&&(p=Jn(!0,y,p)),n[u]=[c,p,...f]}}}}const ul=new rr().freeze();function or(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ar(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ir(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ya(e){if(!Zn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ba(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function rn(e){return function(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}(e)?e:new ga(e)}const va=[],wa={allowDangerousHtml:!0},dl=/^(https?|ircs?|mailto|xmpp)$/i,pl=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function fl(e){const t=e.allowedElements,r=e.allowElement,n=e.children||"",o=e.className,a=e.components,A=e.disallowedElements,s=e.rehypePlugins||va,i=e.remarkPlugins||va,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...wa}:wa,l=e.skipHtml,d=e.unwrapDisallowed,u=e.urlTransform||hl,p=ul().use(RA).use(i).use(ol,c).use(s),f=new ga;typeof n=="string"&&(f.value=n);for(const v of pl)Object.hasOwn(e,v.from)&&(v.from,v.to&&v.to,v.id);const y=p.parse(f);let g=p.runSync(y,f);return o&&(g={type:"element",tagName:"div",properties:{className:o},children:g.type==="root"?g.children:[g]}),ua(g,function(v,x,m){if(v.type==="raw"&&m&&typeof x=="number")return l?m.children.splice(x,1):m.children[x]={type:"text",value:v.value},x;if(v.type==="element"){let E;for(E in Fn)if(Object.hasOwn(Fn,E)&&Object.hasOwn(v.properties,E)){const P=v.properties[E],C=Fn[E];(C===null||C.includes(v.tagName))&&(v.properties[E]=u(String(P||""),E,v))}}if(v.type==="element"){let E=t?!t.includes(v.tagName):!!A&&A.includes(v.tagName);if(!E&&r&&typeof x=="number"&&(E=!r(v,x,m)),E&&m&&typeof x=="number")return d&&v.children?m.children.splice(x,1,...v.children):m.children.splice(x,1),x}}),Fs(g,{Fragment:k.Fragment,components:a,ignoreInvalidStyle:!0,jsx:k.jsx,jsxs:k.jsxs,passKeys:!0,passNode:!0})}function hl(e){const t=e.indexOf(":"),r=e.indexOf("?"),n=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||r!==-1&&t>r||n!==-1&&t>n||dl.test(e.slice(0,t))?e:""}const gl=({children:e})=>k.jsx("div",{style:{whiteSpace:"normal"},children:k.jsx(fl,{components:{p:({...t})=>k.jsx("p",{style:{margin:0,marginBottom:"0.5em",lineHeight:1.4,textAlign:"left"},children:t.children}),ul:({...t})=>k.jsx("ul",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:t.children}),ol:({...t})=>k.jsx("ol",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:t.children}),li:({...t})=>k.jsx("li",{style:{marginBottom:"1px",lineHeight:1.4},children:t.children}),code:({inline:t,children:r})=>t?k.jsx("code",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"2px 4px",borderRadius:"4px",fontFamily:"inherit",fontSize:"0.95em"},children:r}):k.jsx("pre",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"8px",borderRadius:"4px",overflowX:"auto",margin:"0.5em 0",whiteSpace:"pre-wrap"},children:k.jsx("code",{children:r})}),blockquote:({...t})=>k.jsx("blockquote",{style:{margin:0,paddingLeft:"10px",borderLeft:"2px solid #ccc",color:"#666",fontStyle:"italic"},children:t.children})},children:typeof e=="string"?e:""})}),ml={autoConfig:!0},yl=e=>()=>(t=>{const{getFlow:r}=Vt(),{messages:n,replaceMessages:o}=Pt(),{settings:a}=Jr(),{hasChatHistoryLoaded:A}=$r(),s={...t,...ml},i=s.markdownComponent?s.markdownComponent:gl;h.useEffect(()=>{var d,u;if(A){const p=[...n];for(let f=0;f<p.length&&f<(((d=a.chatHistory)==null?void 0:d.maxEntries)??30);f++){const y=p[f];(u=y.tags)!=null&&u.includes("rcb-markdown-renderer-plugin:parsed")&&(y.contentWrapper=i)}o(p)}},[A]);const c=async d=>{var u;const p=(u=d.data.message)==null?void 0:u.sender.toUpperCase();((f,y,g)=>{var v;if(typeof f.data.message.content!="string"||!f.detail.currPath)return!1;const x=y[f.detail.currPath];return!!x&&(((v=x.renderMarkdown)==null?void 0:v.map(m=>m.toUpperCase()).includes(g))??!1)})(d,r(),p)&&(d.data.message.contentWrapper=i,d.data.message.tags||(d.data.message.tags=[]),d.data.message.tags.push("rcb-markdown-renderer-plugin:parsed"))};Qe(j.PRE_INJECT_MESSAGE,c),Qe(j.CHUNK_STREAM_MESSAGE,c),Qe(j.START_STREAM_MESSAGE,c),Qe(j.START_SIMULATE_STREAM_MESSAGE,c);const l={name:"@rcb-plugins/markdown-renderer"};return s!=null&&s.autoConfig&&(l.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0}}),l})(e),on={autoConfig:!0,promptBaseColors:{info:"#007bff",warning:"#ffc107",error:"#dc3545",success:"#28a745"},promptHoveredColors:{info:"#0056b3",warning:"#d39e00",error:"#c82333",success:"#218838"},textAreaHighlightColors:{info:"#007bff",warning:"#ffc107",error:"#dc3545",success:"#28a745"}},xa=(e,t,r="validateTextInput")=>{var n;if((n=e.detail)==null||!n.currPath)return;const o=t[e.detail.currPath];if(!o)return;const a=o[r];return typeof a=="function"?a:void 0},bl=e=>{const{showToast:t}=(()=>{const{showToast:d,dismissToast:u,toasts:p,replaceToasts:f}=pt();return{showToast:d,dismissToast:u,toasts:p,replaceToasts:f}})(),{getFlow:r}=Vt(),{styles:n,updateStyles:o,replaceStyles:a}=(()=>{const{styles:d,replaceStyles:u,updateStyles:p}=Wr();return{styles:d,replaceStyles:u,updateStyles:p}})(),A=(d=>({...on,...d,promptBaseColors:{...on.promptBaseColors},promptHoveredColors:{...on.promptHoveredColors},textAreaHighlightColors:{...on.textAreaHighlightColors}}))(e),[s,i]=h.useState(0),c=h.useRef({});Qe(j.USER_SUBMIT_TEXT,d=>{const u=d,p=xa(u,r(),"validateTextInput");if(!p)return;const f=p(u.data.inputText);if(f!=null&&f.success||d.preventDefault(),!f.promptContent)return;s===0&&(c.current=structuredClone(n));const y=((g,v)=>{const x=g.promptType??"info";let m={};return v.advancedStyles&&(m=v.advancedStyles[x]),v.promptBaseColors&&(m.toastPromptStyle={color:v.promptBaseColors[x],borderColor:v.promptBaseColors[x]}),v.promptHoveredColors&&(m.toastPromptHoveredStyle={color:v.promptHoveredColors[x],borderColor:v.promptHoveredColors[x]}),v.textAreaHighlightColors&&(g.highlightTextArea??!0)&&(m.chatInputAreaStyle={boxShadow:`${v.textAreaHighlightColors[x]} 0px 0px 5px`}),m})(f,A);o(y),t(f.promptContent,f.promptDuration??3e3),i(g=>g+1)}),Qe(j.USER_UPLOAD_FILE,d=>{var u,p;const f=d,y=(p=(u=f.data)==null?void 0:u.files)==null?void 0:p[0];if(!y)return console.error("No file uploaded."),void d.preventDefault();const g=xa(f,r(),"validateFileInput");if(!g)return void console.error("Validator not found for file input.");const v=g(y);if(!v.success)return console.error("Validation failed:",v),v.promptContent&&t(v.promptContent,v.promptDuration??3e3),void d.preventDefault();console.log("Validation successful:",v)}),Qe(j.DISMISS_TOAST,()=>{i(d=>d-1)}),h.useEffect(()=>{s===0&&setTimeout(()=>{a(c.current)})},[s,a]);const l={name:"@rcb-plugins/input-validator"};return A.autoConfig&&(l.settings={event:{rcbUserSubmitText:!0,rcbUserUploadFile:!0,rcbDismissToast:!0}}),l},Ea=h.forwardRef((e,t)=>{let{embedded:r,currentOpen:n,enabled:o,onSetEnabled:a}=e;const A=Pt(),s=(()=>{const{isChatWindowOpen:l,toggleChatWindow:d,toggleIsBotTyping:u,scrollToBottom:p,getIsChatBotVisible:f}=De();return{isChatWindowOpen:l,toggleChatWindow:d,toggleIsBotTyping:u,scrollToBottom:p,getIsChatBotVisible:f}})(),i=h.useRef(!1),c=h.useRef(!1);return h.useEffect(()=>{!r&&s&&s.toggleChatWindow&&(i.current===n||c.current||(setTimeout(()=>{s&&s.toggleChatWindow&&s.toggleChatWindow(n)},0),i.current=n!=null&&n),c.current=!1)},[n,r,s]),h.useEffect(()=>{const l=()=>{c.current=!0};return window.addEventListener("rcb-toggle-chat-window",l),()=>window.removeEventListener("rcb-toggle-chat-window",l)}),h.useImperativeHandle(t,()=>({addMessage:l=>{A&&A.injectMessage&&A.injectMessage(l)},openChat:()=>{!r&&s&&s.toggleChatWindow&&s.toggleChatWindow(!0)},closeChat:()=>{!r&&s&&s.toggleChatWindow&&s.toggleChatWindow(!1)},toggleChat:()=>{!r&&s&&s.toggleChatWindow&&s.toggleChatWindow()},setBotEnabled:l=>{a&&a(l)}}),[A,s,r,a]),null});Ea.displayName="BotController";const ka=h.createContext(null),vl=e=>{let{trackEvent:t,children:r}=e;const n=h.useRef(t);return n.current=t,h.createElement(ka.Provider,{value:{trackEvent:o=>n.current(o)}},r)},Ca=()=>h.useContext(ka)||{trackEvent:()=>{}},Pa=e=>{let{loginUrl:t,className:r="",style:n,isHeaderButton:o=!1}=e;const{trackEvent:a}=Ca(),A=o?{display:"inline-block",padding:"6px 12px",backgroundColor:"transparent",border:"1px solid #ccc",color:"white",textDecoration:"none",borderRadius:"4px",fontWeight:"normal",textAlign:"center",margin:"8px",fontSize:"12px",opacity:.8,transition:"all 0.2s ease"}:{display:"inline-block",padding:"10px 20px",backgroundColor:"white",border:"1px solid var(--primaryColor, #107180)",color:"var(--primaryColor, #107180)",textDecoration:"none",borderRadius:"4px",fontWeight:"bold",textAlign:"center",margin:"18px",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.2)"};return h.createElement(h.Fragment,null,o&&h.createElement("style",null,`
|
|
34
34
|
.rcb-chat-header-container .qa-bot-header-login-button:hover {
|
|
35
35
|
background-color: #0000001a !important;
|
|
36
36
|
opacity: 1 !important;
|
|
37
37
|
}
|
|
38
|
-
`),h.createElement("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"qa-bot-login-button ".concat(o?"qa-bot-header-login-button":""," ").concat(r),style:Object.assign(Object.assign({},a),n)},"Log In"))},bl=()=>h.createElement("div",{className:"user-login-icon",style:{alignItems:"center",justifyContent:"center",width:"30px",height:"30px",borderRadius:"50%",backgroundColor:"var(--primaryColor, #1a5b6e)",marginRight:"5px",display:"flex"},role:"img","aria-label":"User logged in",title:"User logged in"},h.createElement("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false"},h.createElement("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),h.createElement("circle",{cx:"12",cy:"7",r:"4"}))),me=[];for(let e=0;e<256;++e)me.push((e+256).toString(16).slice(1));let Ar;const vl=new Uint8Array(16);var Ca={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Pa(e,t,r){var o;if(Ca.randomUUID&&!e)return Ca.randomUUID();const n=(e=e||{}).random??((o=e.rng)==null?void 0:o.call(e))??function(){if(!Ar){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Ar=crypto.getRandomValues.bind(crypto)}return Ar(vl)}();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=15&n[6]|64,n[8]=63&n[8]|128,function(a,s=0){return(me[a[s+0]]+me[a[s+1]]+me[a[s+2]]+me[a[s+3]]+"-"+me[a[s+4]]+me[a[s+5]]+"-"+me[a[s+6]]+me[a[s+7]]+"-"+me[a[s+8]]+me[a[s+9]]+"-"+me[a[s+10]]+me[a[s+11]]+me[a[s+12]]+me[a[s+13]]+me[a[s+14]]+me[a[s+15]]).toLowerCase()}(n)}function an(){return typeof localStorage<"u"&&localStorage.getItem("QA_BOT_DEBUG")==="true"}const wl="background: #1a5b6e; color: white; padding: 2px 6px; border-radius: 3px;",xl="background: #7c3aed; color: white; padding: 2px 6px; border-radius: 3px;",El="background: #059669; color: white; padding: 2px 6px; border-radius: 3px;",kl="background: #f59e0b; color: #000; padding: 2px 6px; border-radius: 3px 0 0 3px; font-weight: bold;",Cl="background: #fbbf24; color: #000; padding: 2px 6px; border-radius: 0 3px 3px 0;",Pl=()=>{an()&&console.log("%c QA Bot Core %c v".concat("0.2.19"," "),kl,Cl)},An=function(e){if(an()){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];console.log("%c[Session]%c ".concat(e),wl,"",...r)}},Ge=function(e){if(an()){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];console.log("%c[History]%c ".concat(e),xl,"",...r)}},Sl=(e,t)=>{an()&&console.log("%c[Message]%c ".concat(e),El,"",t)},Dl=function(){console.warn(...arguments)},lt=function(){console.error(...arguments)},Sa="qa_bot_session_messages",Da=()=>"qa_bot_session_".concat(Pa()),Ot=()=>{try{const e=localStorage.getItem(Sa);return e?JSON.parse(e):{}}catch{return{}}},Bl=(e,t,r,n,o)=>{const a=Ot();if(!a[e]&&(a[e]={messages:[],startedAt:new Date().toISOString(),preview:""},Ge("NEW session created",{sessionId:e.slice(-12)})),a[e].messages.some(c=>c.id===t))return void Ge("DUPLICATE message skipped",{sessionId:e.slice(-12),messageId:t.slice(-8),sender:n});const s={id:t,content:r,sender:n,type:o,timestamp:Date.now()};a[e].messages.push(s),Ge("MESSAGE added",{sessionId:e.slice(-12),messageId:t.slice(-8),sender:n,totalInSession:a[e].messages.length});const A=a[e].messages,i=A.find(c=>{var l;return c.sender.toLowerCase()==="bot"&&((l=c.content)===null||l===void 0?void 0:l.trim())&&c.content.length>=100});if(i){const c=i.content;a[e].preview=c.slice(0,50)+(c.length>50?"...":"")}else{const c=A.find(l=>{var d;return l.sender.toLowerCase()==="user"&&((d=l.content)===null||d===void 0?void 0:d.trim())});if(c&&!a[e].preview){const l=c.content;a[e].preview=l.slice(0,50)+(l.length>50?"...":"")}}(c=>{var l;const d=()=>Object.values(c).reduce((u,p)=>u+p.messages.length,0);for(;d()>100&&Object.keys(c).length>1;){const u=(l=Object.entries(c).sort((p,f)=>{let[,y]=p,[,g]=f;return new Date(y.startedAt).getTime()-new Date(g.startedAt).getTime()})[0])===null||l===void 0?void 0:l[0];if(!u)break;delete c[u]}localStorage.setItem(Sa,JSON.stringify(c))})(a),Ge("STORAGE state",{ourSessions:Object.keys(a).length,ourTotalMessages:Object.values(a).reduce((c,l)=>c+l.messages.length,0)})},Ba=e=>{var t,r;return(r=(t=Ot()[e])===null||t===void 0?void 0:t.messages.length)!==null&&r!==void 0?r:0},Il=e=>{const t=Ot()[e];return t!=null&&t.startedAt?Date.now()-new Date(t.startedAt).getTime():0},Ia=h.createContext(void 0),Tl=e=>{let{children:t,getSessionId:r,setSessionId:n,resetSession:o,clearResettingFlag:a}=e;return h.createElement(Ia.Provider,{value:{getSessionId:r,setSessionId:n,resetSession:o,clearResettingFlag:a}},t)},sr=()=>{const e=h.useContext(Ia);if(!e)throw new Error("useSession must be used within a SessionProvider");return e},Ql=()=>{const[e,t]=h.useState(!1),[r,n]=h.useState([]),[o,a]=h.useState(null),[s,A]=h.useState(0),i=h.useRef(null),c=h.useRef(null),{replaceMessages:l}=Pt(),{toggleTextAreaDisabled:d}=Zr(),{setSessionId:u,getSessionId:p}=sr();h.useEffect(()=>{var y,g;const v=m=>{i.current&&!i.current.contains(m.target)&&c.current&&!c.current.contains(m.target)&&t(!1)},x=(g=(y=i.current)===null||y===void 0?void 0:y.getRootNode())!==null&&g!==void 0?g:document;return e&&x.addEventListener("mousedown",v),()=>{x.removeEventListener("mousedown",v)}},[e]);const f=y=>{var g;const v=p();if(Ge("RESTORE requested",{targetSession:y.slice(-12),currentSession:v==null?void 0:v.slice(-12)}),y===v)return Ge("RESTORE skipped - already on this session"),void t(!1);const x=(P=>{var C;return((C=Ot()[P])===null||C===void 0?void 0:C.messages)||[]})(y).filter(P=>{var C;return(C=P.content)===null||C===void 0?void 0:C.trim()});Ge("Stored messages from our localStorage",{count:x.length,ids:x.map(P=>P.id.slice(-8))});const m=x.map(P=>({id:P.id,content:P.content,sender:P.sender.toUpperCase(),type:P.type||"string",timestamp:new Date(P.timestamp).toISOString()}));var E;u(y),Ge("Session ID updated",{newSession:y.slice(-12)}),l(m),Ge("replaceMessages called",{count:m.length}),E=(g=c.current)===null||g===void 0?void 0:g.getRootNode(),setTimeout(()=>{const P=(E||document).querySelector(".rcb-chat-body-container");P&&P.querySelectorAll(".rcb-bot-message").forEach(C=>{var S;let I=C.innerHTML,Q=!1;I.includes("](")&&(I=I.replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>'),Q=!0),I.includes("<a href=")&&(I=I.replace(/<a\s+href=["']([^"']+)["'][^&]*>([^&]+)<\/a>/gi,'<a href="$1" target="_blank" rel="noopener noreferrer">$2</a>'),Q=!0),(I.includes("<a ")||!((S=C.textContent)===null||S===void 0)&&S.includes("<a href="))&&(C.textContent||"").includes("<a href=")&&(I=I.replace(/<a\s+href="([^"]+)"[^&]*>([^&]+)<\/a>/gi,'<a href="$1" target="_blank" rel="noopener noreferrer">$2</a>'),Q=!0),Q&&(C.innerHTML=I)})},50),d(!1),Ge("Chat input enabled after restore"),t(!1)};return h.createElement("div",{style:{position:"relative"}},h.createElement("button",{ref:c,className:"history-button",onClick:()=>{if(!e&&(n((()=>{const y=Ot();return Object.entries(y).map(g=>{let[v,x]=g;return Object.assign({sessionId:v},x)}).sort((g,v)=>new Date(v.startedAt).getTime()-new Date(g.startedAt).getTime())})()),c.current)){const y=c.current.closest(".rcb-chat-window");if(y){const g=y.getBoundingClientRect(),v=c.current.getBoundingClientRect();a(g.width+3),A(g.right-v.right-18+4)}}t(!e)},style:{alignItems:"center",justifyContent:"center",width:"30px",height:"30px",borderRadius:"50%",backgroundColor:"var(--primaryColor, #1a5b6e)",marginRight:"18px",display:"flex",border:"none",cursor:"pointer",padding:0},"aria-label":"View chat history",title:"View chat history","aria-expanded":e,"aria-haspopup":"menu"},h.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false"},h.createElement("circle",{cx:"12",cy:"12",r:"10"}),h.createElement("polyline",{points:"12 6 12 12 16 14"}))),e&&h.createElement("div",{ref:i,role:"menu",style:{position:"absolute",right:s?"-".concat(s,"px"):"-18px",top:"100%",marginTop:"8px",width:o?"".concat(o,"px"):"550px",backgroundColor:"white",borderRadius:0,borderBottom:"3px solid var(--primaryColor, #1a5b6e)",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)",maxHeight:"250px",overflowY:"auto",zIndex:1e3}},r.length===0?h.createElement("div",{style:{padding:"12px 16px",color:"#666",fontSize:"14px",textAlign:"center"}},"No chat history"):r.map(y=>h.createElement("button",{key:y.sessionId,role:"menuitem",onClick:()=>f(y.sessionId),style:{width:"100%",padding:"10px 14px",border:"none",backgroundColor:"transparent",cursor:"pointer",textAlign:"left",display:"flex",flexDirection:"column",gap:"2px",borderBottom:"1px solid #eee"},onMouseEnter:g=>{g.currentTarget.style.backgroundColor="#f5f5f5"},onMouseLeave:g=>{g.currentTarget.style.backgroundColor="transparent"}},h.createElement("span",{style:{fontSize:"14px",color:"#333",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},y.preview||"New conversation"),h.createElement("span",{style:{fontSize:"12px",color:"#888"}},(g=>{const v=new Date(g),x=new Date().getTime()-v.getTime(),m=Math.floor(x/864e5);return m===0?v.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):m===1?"Yesterday":m<7?v.toLocaleDateString([],{weekday:"short"}):v.toLocaleDateString([],{month:"short",day:"numeric"})})(y.startedAt))))))};function lr(){return lr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},lr.apply(null,arguments)}const Ta=({width:e=24,height:t=24,color:r="currentColor",children:n,...o})=>h.createElement("svg",lr({xmlns:"http://www.w3.org/2000/svg",width:e,height:t,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false"},o),n),Ml=e=>h.createElement(Ta,e,h.createElement("path",{d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})),Qa=h.createContext(null),Ol=e=>{let{trackEvent:t,children:r}=e;const n=h.useRef(t);return n.current=t,h.createElement(Qa.Provider,{value:{trackEvent:o=>n.current(o)}},r)},_l=()=>{const{restartFlow:e}=Vt(),{setTextAreaValue:t}=Zr(),{messages:r}=Pt(),{getSessionId:n,resetSession:o,clearResettingFlag:a}=sr(),{trackEvent:s}=h.useContext(Qa)||{trackEvent:()=>{}};return h.createElement("button",{onClick:async()=>{const A=n(),i=A?Ba(A):0;s({type:"chatbot_new_chat",previousMessageCount:i}),o(),await t(""),await e(),setTimeout(()=>{a()},100)},tabIndex:0,"aria-label":"New chat conversation",style:{backgroundColor:"var(--primaryColor, #107180)",border:"none",color:"#ffffff",fontSize:"14px",cursor:"pointer",padding:"8px 12px",borderRadius:"4px",transition:"all 0.2s ease",display:"flex",alignItems:"center",gap:"6px",fontWeight:"500"},onMouseEnter:A=>{A.target.style.backgroundColor="var(--secondaryColor, #0d5f6b)"},onMouseLeave:A=>{A.target.style.backgroundColor="var(--primaryColor, #107180)"}},h.createElement(Ml,{width:16,height:16}),"New Chat")};function cr(e){if(typeof e=="string")return e;if(typeof e=="number")return String(e);if(!e)return"";if(Array.isArray(e))return e.map(cr).join("");if(typeof e=="object"&&e!==null&&"props"in e){const t=e.props;if(t&&"children"in t)return cr(t.children)}return""}const Ll=()=>{const{getSessionId:e}=sr(),t=h.useCallback(r=>{var n;const o=(n=r.data)===null||n===void 0?void 0:n.message;if(!(o!=null&&o.id))return;const a=o.sender,s=o.type||"string";let A;if(A=typeof o.content=="string"?o.content:cr(o.content),Sl("TRACKED",{id:o.id,sender:a,content:A.substring(0,50)+(A.length>50?"...":"")}),A.includes("rcb-options-container")||!A.trim())return;const i=e();Bl(i,o.id,A,a,s)},[e]);return h.useEffect(()=>(window.addEventListener("rcb-pre-inject-message",t),()=>{window.removeEventListener("rcb-pre-inject-message",t)}),[t]),null},Nl=()=>(h.useEffect(()=>{const e=s=>{if(!["ArrowDown","ArrowUp","ArrowLeft","ArrowRight","Enter"," ","Home","End"].includes(s.key))return;const A=document.activeElement;if(A&&(A.tagName==="INPUT"||A.tagName==="TEXTAREA"||A.contentEditable==="true"||A.classList.contains("rcb-chat-input-textarea")))return;const i=document.querySelector(".rcb-chat-window");if(!i)return;const c=Array.from(i.querySelectorAll(".rcb-message-container, .rcb-bot-message-container, .rcb-user-message-container")).filter(u=>u.offsetParent!==null);if(c.length>0){const u=c[c.length-1].querySelector(".rcb-checkbox-container");if(u&&u.offsetParent!==null){const p=Array.from(u.querySelectorAll(".rcb-checkbox-row-container")),f=u.querySelector(".rcb-checkbox-next-button");if(p.length>0){const y=[...p];return f&&y.push(f),void((g,v)=>{g.preventDefault();let x=-1;for(let E=0;E<v.length;E++)if(v[E]===document.activeElement||v[E].contains(document.activeElement)){x=E;break}x===-1&&(x=0);let m=x;switch(g.key){case"ArrowDown":case"ArrowRight":m=x<v.length-1?x+1:0;break;case"ArrowUp":case"ArrowLeft":m=x>0?x-1:v.length-1;break;case"Home":m=0;break;case"End":m=v.length-1;break;case"Enter":case" ":{const E=v[x],P=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});return void E.dispatchEvent(P)}default:return}v[m].focus(),v[m].setAttribute("tabindex","0"),v[m].classList.add("keyboard-focused"),v.forEach((E,P)=>{P!==m&&(E.setAttribute("tabindex","-1"),E.classList.remove("keyboard-focused"))})})(s,y)}}}let l=[];if(c.length>0){const u=c[c.length-1],p=Array.from(u.querySelectorAll(".rcb-options-container")).filter(f=>f.offsetParent!==null);if(p.length>0){const f=p[p.length-1];l=Array.from(f.querySelectorAll(".rcb-options"))}}if(l.length===0)return;const d=l.findIndex(u=>u===document.activeElement);switch(s.key){case"ArrowDown":case"ArrowRight":{let u;s.preventDefault(),u=d<l.length-1?d+1:0,l[u].setAttribute("tabindex","0"),l.forEach((p,f)=>{f!==u&&(p.setAttribute("tabindex","-1"),p.classList.remove("keyboard-focused"))}),l[u].classList.add("keyboard-focused"),l[u].focus();break}case"ArrowUp":case"ArrowLeft":{let u;s.preventDefault(),u=d>0?d-1:l.length-1,l[u].setAttribute("tabindex","0"),l.forEach((p,f)=>{f!==u&&(p.setAttribute("tabindex","-1"),p.classList.remove("keyboard-focused"))}),l[u].classList.add("keyboard-focused"),l[u].focus();break}case"Enter":case" ":if(s.preventDefault(),document.activeElement&&l.includes(document.activeElement)){const u=document.activeElement;if(u.classList.contains("rcb-checkbox-row-container")||u.closest(".rcb-checkbox-row-container")){const p=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});u.dispatchEvent(p);const f=u.querySelector(".rcb-checkbox-label"),y=f?f.textContent:u.textContent||"checkbox",g=u.querySelector(".rcb-checkbox-mark"),v=g&&g.style.backgroundColor?"checked":"unchecked";t("".concat(y," ").concat(v))}else{const p=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});u.dispatchEvent(p);const f=u.textContent||u.innerText;t("Selected: ".concat(f))}}break;case"Home":s.preventDefault(),l.length>0&&(l[0].setAttribute("tabindex","0"),l.forEach((u,p)=>{p!==0&&(u.setAttribute("tabindex","-1"),u.classList.remove("keyboard-focused"))}),l[0].classList.add("keyboard-focused"),l[0].focus());break;case"End":if(s.preventDefault(),l.length>0){const u=l.length-1;l[u].setAttribute("tabindex","0"),l.forEach((p,f)=>{f!==u&&(p.setAttribute("tabindex","-1"),p.classList.remove("keyboard-focused"))}),l[u].classList.add("keyboard-focused"),l[u].focus()}}},t=s=>{const A=document.createElement("div");A.setAttribute("aria-live","assertive"),A.setAttribute("aria-atomic","true"),A.className="sr-only",A.textContent=s,document.body.appendChild(A),setTimeout(()=>{document.body.contains(A)&&document.body.removeChild(A)},1e3)},r=function(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;if(s||(s=document.querySelector(".rcb-chat-window"),s||(s=document.querySelector('[class*="rcb-chat"]')),s||(s=document.querySelector(".qa-bot"))),!s)return;const A=s.closest(".embedded-qa-bot")!==null,i=Array.from(s.querySelectorAll(".rcb-message-container, .rcb-bot-message-container, .rcb-user-message-container")).filter(u=>u.offsetParent!==null);if(i.length===0)return;const c=i[i.length-1],l=Array.from(c.querySelectorAll(".rcb-options-container")).filter(u=>u.offsetParent!==null);let d=[];if(l.length>0){const u=l[l.length-1];d=Array.from(u.querySelectorAll(".rcb-options"))}if(d.length===0){let u=c.querySelector(".rcb-checkbox-container");if(!u&&s&&(u=s.querySelector(".rcb-checkbox-container")),u&&u.offsetParent!==null){const p=Array.from(u.querySelectorAll(".rcb-checkbox-row-container")).filter(f=>f.offsetParent!==null&&f.style.display!=="none");if(p.length>0){const f=u.querySelector(".rcb-checkbox-next-button"),y=[...p];if(f&&f.offsetParent!==null&&y.push(f),y.forEach((g,v)=>{g.setAttribute("tabindex",v===0?"0":"-1"),v===0?g.classList.add("keyboard-focused"):g.classList.remove("keyboard-focused")}),p.length>1){u.querySelectorAll(".keyboard-nav-hint").forEach(v=>v.remove());const g=document.createElement("div");g.className="keyboard-nav-hint",g.textContent="Use arrow keys ↕ to navigate, Enter to select/deselect, or click any option",g.style.cssText="font-size: 12px !important; color: #666 !important; margin-bottom: 8px !important; font-style: italic !important; display: block !important;",u.insertBefore(g,u.firstChild)}return void setTimeout(()=>{y[0]&&y[0].offsetParent!==null&&!A&&y[0].focus()},150)}}}if(d.length>0){if(d.forEach((u,p)=>{const f=p===0?"0":"-1";u.setAttribute("tabindex",f),u.setAttribute("role","option"),u.setAttribute("aria-posinset",p+1),u.setAttribute("aria-setsize",d.length),p===0?u.classList.add("keyboard-focused"):u.classList.remove("keyboard-focused")}),d.length>1){const u=l.length>0?l[l.length-1]:null;if(u){u.querySelectorAll(".keyboard-nav-hint").forEach(f=>f.remove());const p=document.createElement("div");p.className="keyboard-nav-hint",p.textContent="Use arrow keys ↕ to navigate, Enter to select, or click any option",p.style.cssText="font-size: 12px !important; color: #666 !important; margin-bottom: 8px !important; font-style: italic !important; display: block !important;",u.insertBefore(p,u.firstChild)}}else{const u=l.length>0?l[l.length-1]:null;u&&u.querySelectorAll(".keyboard-nav-hint").forEach(p=>p.remove())}setTimeout(()=>{d[0]&&d[0].offsetParent!==null&&!A&&(d[0].focus(),d.length>1&&t("".concat(d.length," options available. Use arrow keys to navigate.")))},200)}},n=s=>{const A=s.querySelectorAll(".rcb-options");A.forEach((i,c)=>{i.hasAttribute("role")||(i.setAttribute("role","button"),i.setAttribute("tabindex",c===0?"0":"-1"),i.setAttribute("aria-posinset",c+1),i.setAttribute("aria-setsize",A.length))}),s.querySelectorAll(".rcb-checkbox-row-container").forEach((i,c)=>{i.hasAttribute("role")||(i.setAttribute("role","checkbox"),i.setAttribute("tabindex",c===0?"0":"-1"))})},o=new MutationObserver(s=>{s.forEach(A=>{if(A.type==="childList"){const l=Array.from(A.addedNodes),d=l.some(p=>{var f,y,g,v;return p.nodeType===Node.ELEMENT_NODE&&(((f=p.classList)===null||f===void 0?void 0:f.contains("rcb-options-container"))||((y=p.classList)===null||y===void 0?void 0:y.contains("rcb-options"))||((g=p.querySelector)===null||g===void 0?void 0:g.call(p,".rcb-options-container"))||((v=p.querySelector)===null||v===void 0?void 0:v.call(p,".rcb-options")))}),u=l.some(p=>{var f,y;return p.nodeType===Node.ELEMENT_NODE&&(((f=p.classList)===null||f===void 0?void 0:f.contains("rcb-checkbox-container"))||((y=p.querySelector)===null||y===void 0?void 0:y.call(p,".rcb-checkbox-container")))});if(d||u){let p=A.target;for(;p&&((i=p.classList)===null||i===void 0||!i.contains("qa-bot"))&&((c=p.classList)===null||c===void 0||!c.contains("rcb-chat-window"));){var i,c;p=p.parentElement}const f=p||document;n(f),f.querySelectorAll(".rcb-options[tabindex], .rcb-checkbox-row-container[tabindex], .rcb-checkbox-next-button[tabindex]").forEach(y=>{y.setAttribute("tabindex","-1"),y.classList.remove("keyboard-focused")}),setTimeout(()=>r(p),100)}}})});o.observe(document.body,{childList:!0,subtree:!0}),document.addEventListener("keydown",e),n(document),r();const a=setInterval(()=>{document.querySelectorAll(".qa-bot").forEach(s=>{const A=s.querySelectorAll(".rcb-options-container .rcb-options").length>0,i=s.querySelectorAll(".rcb-checkbox-row-container").length>0;if(A){n(s);const c=s.querySelectorAll(".rcb-options[tabindex]").length;s.querySelectorAll(".rcb-options").length>c&&r(s)}if(i){n(s);const c=s.querySelectorAll(".rcb-checkbox-row-container[tabindex]").length;s.querySelectorAll(".rcb-checkbox-row-container").length>c&&r(s)}})},1e3);return()=>{document.removeEventListener("keydown",e),o.disconnect(),clearInterval(a)}},[]),null),Hl="#1a5b6e",Ul="#107180",Fl="Arial, sans-serif",Ma="Q&A Bot",zl="/chat-icon.svg",Rl="Type your question here...",jl="Select an option to continue",ql=!1,Gl="Ask me a question!",Oa="/login",Yl={general:{showHeader:!0,showFooter:!0},tooltip:{mode:"CLOSE"},chatInput:{disabled:!1,characterLimit:1e3,showCharacterCount:!1,allowNewline:!0,blockSpam:!1},chatWindow:{defaultOpen:!1,showScrollbar:!1},botBubble:{simulateStream:!0,streamSpeed:10,showAvatar:!1},userBubble:{showAvatar:!1},notification:{disabled:!0,showCount:!1},audio:{disabled:!0},emoji:{disabled:!0},fileAttachment:{disabled:!0}},ur=h.forwardRef((e,t)=>{var r,n;const{apiKey:o,qaEndpoint:a,ratingEndpoint:s,welcomeMessage:A,open:i,onOpenChange:c,isLoggedIn:l,allowAnonAccess:d=!1,actingUser:u,primaryColor:p,secondaryColor:f,botName:y,logo:g,placeholder:v,errorMessage:x,embedded:m,footerText:E,footerLink:P,tooltipText:C,loginUrl:S,customFlow:I,onAnalyticsEvent:Q}=e,B=h.useRef("bot_".concat(Math.random().toString(36).substr(2,9)));h.useEffect(()=>{Pl()},[]);const O=h.useRef(null);O.current===null&&(O.current=Da(),An("CREATED",O.current));const D=h.useRef(!1),M=h.useRef({getSessionId:()=>O.current,isResetting:()=>D.current}),[U,L]=h.useState(l);h.useEffect(()=>{L(l)},[l]);const F=m!==void 0?m:ql,_=h.useCallback(R=>{var z;Q&&Q(Object.assign(Object.assign({},R),{timestamp:Date.now(),sessionId:(z=O.current)!==null&&z!==void 0?z:void 0,pageUrl:typeof window<"u"?window.location.href:void 0,isEmbedded:F}))},[Q,F]),H=h.useMemo(()=>{const R=Object.assign({},Yl);R.general=Object.assign(Object.assign({},R.general),{primaryColor:p||Hl,secondaryColor:f||Ul,fontFamily:Fl,embedded:F});const z=U===!1?[h.createElement(ka,{key:"login-button",loginUrl:S||Oa,isHeaderButton:!0})]:[h.createElement(Ql,{key:"history-button"}),h.createElement(bl,{key:"user-icon"})];R.header={title:h.createElement("span",{style:{fontSize:14,fontWeight:500}},y||Ma),showAvatar:!0,avatar:g||zl,buttons:[...z,ue.CLOSE_CHAT_BUTTON]},R.chatInput=Object.assign(Object.assign({},R.chatInput),{disabled:!1,enabledPlaceholderText:v||Rl,disabledPlaceholderText:x||jl}),R.tooltip=Object.assign(Object.assign({},R.tooltip),{text:C||Gl});const G=E?P?h.createElement("a",{href:P,target:"_blank",rel:"noopener noreferrer",key:"footer-link"},E):h.createElement("span",{key:"footer-text"},E):null;return R.footer={text:G,buttons:[h.createElement(_l,{key:"new-chat-button"})]},R.chatWindow=Object.assign(Object.assign({},R.chatWindow),{defaultOpen:!!F}),R.event={rcbPreInjectMessage:!0,rcbPostInjectMessage:!0,rcbUserSubmitText:!0,rcbChangePath:!0,rcbToggleChatWindow:!0},R},[p,f,y,g,v,x,F,C,U,S,E,P]),b=h.useRef(null),X=function(R){let z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return h.useMemo(()=>{const G=(Z,$)=>{if(R.current){const le=getComputedStyle(R.current).getPropertyValue(Z);if(le&&le.trim()!=="")return le.trim();if(R.current.parentElement){const ae=getComputedStyle(R.current.parentElement).getPropertyValue(Z);if(ae&&ae.trim()!=="")return ae.trim()}}return $};return{primaryColor:G("--primaryColor",z.primaryColor),secondaryColor:G("--secondaryColor",z.secondaryColor),fontFamily:G("--fontFamily",z.fontFamily)}},[R,z])}(b,H.general);((R,z)=>{h.useEffect(()=>{z.current&&(R?z.current.classList.add("bot-logged-in"):z.current.classList.remove("bot-logged-in"))},[R,z])})(U!==!1,b),(R=>{let{settings:z,themeColors:G}=R;h.useEffect(()=>{G&&(Object.entries(G).forEach(Z=>{let[$,le]=Z;le&&document.documentElement.style.setProperty("--".concat($),le)}),G.primaryColor&&document.documentElement.style.setProperty("--rcb-header-background",G.primaryColor),G.secondaryColor&&document.documentElement.style.setProperty("--rcb-header-background-hover",G.secondaryColor))},[G]),h.useEffect(()=>{var Z,$;!((Z=z.header)===null||Z===void 0)&&Z.title&&typeof z.header.title=="string"&&(z.header.title=h.createElement("div",{key:"header-title"},h.createElement("h1",{className:"sr-only"},z.header.title),h.createElement("span",{"aria-hidden":"true"},z.header.title))),z.device={desktopEnabled:!0,mobileEnabled:!0,applyMobileOptimizations:!1},z.chatHistory={disabled:!0},z.chatButton=Object.assign(Object.assign({},z.chatButton),{icon:($=z.header)===null||$===void 0?void 0:$.avatar}),z.event=Object.assign(Object.assign({},z.event),{rcbToggleChatWindow:!0})},[z])})({settings:H,themeColors:X});const w=h.useMemo(()=>{const R=(G=>{let{endpoint:Z,ratingEndpoint:$,apiKey:le,sessionId:ae,isResetting:se=()=>!1,isLoggedIn:we,allowAnonAccess:Ye=!1,loginUrl:ut="/login",trackEvent:xe}=G;if(we===!1&&!Ye)return xe==null||xe({type:"chatbot_login_prompt_shown"}),{qa_loop:{message:"To ask questions, please log in first.",component:h.createElement(ka,{loginUrl:ut}),chatDisabled:!0,path:"qa_loop"}};let Ne=null,xt=!1;if(!Z)throw new Error("Q&A endpoint is required");return{qa_loop:{message:async ot=>{const{userInput:We}=ot;if(se&&se()||!We||We.trim()==="")return null;if(We==="👍 Helpful"||We==="👎 Not helpful"){if($&&Ne)try{const ge=We==="👍 Helpful",_e={"Content-Type":"application/json"};le&&(_e["X-API-KEY"]=le);const Ve=ae();Ve&&(_e["X-Session-ID"]=Ve,_e["X-Query-ID"]=Ne),await fetch($,{method:"POST",headers:_e,credentials:"include",body:JSON.stringify({sessionId:Ve,queryId:Ne,rating:ge?1:0})}),xe==null||xe({type:"chatbot_rating_sent",queryId:Ne,rating:ge?"helpful":"not_helpful"})}catch(ge){lt("Error sending feedback:",ge)}return"Thanks for the feedback! Feel free to ask another question."}try{const ge=Pa();Ne=ge,xe==null||xe({type:"chatbot_question_sent",queryId:ge,questionLength:We.length});const _e={"Content-Type":"application/json"};le&&(_e["X-API-KEY"]=le);const Ve=ae();Ve&&(_e["X-Session-ID"]=Ve,_e["X-Query-ID"]=ge);const dn={query:We,session_id:Ve,question_id:ge};An("SENT to API",{session_id:Ve,question_id:ge});const pn=Date.now(),Nt=await fetch(Z,{method:"POST",headers:_e,credentials:"include",body:JSON.stringify(dn)}),yr=Date.now()-pn;if(!Nt.ok)throw new Error("API returned ".concat(Nt.status));const dt=await Nt.json(),Ht=dt.response||dt.answer||dt.text||dt.message;if(!Ht)throw new Error("Invalid response format from API");const fn=(Y=>{if(!Y||typeof Y!="string")return Y;let te=Y.replace(/\[(https?:\/\/[^\s]+?)\]/gi,"[$1]($1)");return te=te.replace(new RegExp(`(?<!\\]\\(|href=["']|\\[)https?:\\/\\/[^\\s[\\]()]+`,"gi"),ne=>{let de=ne,Ce="";const He=de.match(/([.,;:!?]+)$/);return He&&(Ce=He[1],de=de.slice(0,-Ce.length)),"[".concat(de,"](").concat(de,")").concat(Ce)}),te})(Ht),T=function(Y){const{confidence:te,tools_used:ne,metadata:de}=Y;if(!(te||ne&&ne.length!==0))return"";const Ce=[];return te&&Ce.push("• Confidence: ".concat(te)),ne&&ne.length>0&&Ce.push("• Tools used: ".concat(ne.join(", "))),de!=null&&de.agent&&Ce.push("• Agent: ".concat(de.agent)),`---
|
|
38
|
+
`),h.createElement("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"qa-bot-login-button ".concat(o?"qa-bot-header-login-button":""," ").concat(r),style:Object.assign(Object.assign({},A),n),onClick:()=>{a({type:"chatbot_login_clicked",loginUrl:t})}},"Log In"))},wl=()=>h.createElement("div",{className:"user-login-icon",style:{alignItems:"center",justifyContent:"center",width:"30px",height:"30px",borderRadius:"50%",backgroundColor:"var(--primaryColor, #1a5b6e)",marginRight:"5px",display:"flex"},role:"img","aria-label":"User logged in",title:"User logged in"},h.createElement("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false"},h.createElement("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),h.createElement("circle",{cx:"12",cy:"7",r:"4"}))),me=[];for(let e=0;e<256;++e)me.push((e+256).toString(16).slice(1));let sr;const xl=new Uint8Array(16);var Sa={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Da(e,t,r){var o;if(Sa.randomUUID&&!e)return Sa.randomUUID();const n=(e=e||{}).random??((o=e.rng)==null?void 0:o.call(e))??function(){if(!sr){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");sr=crypto.getRandomValues.bind(crypto)}return sr(xl)}();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=15&n[6]|64,n[8]=63&n[8]|128,function(a,A=0){return(me[a[A+0]]+me[a[A+1]]+me[a[A+2]]+me[a[A+3]]+"-"+me[a[A+4]]+me[a[A+5]]+"-"+me[a[A+6]]+me[a[A+7]]+"-"+me[a[A+8]]+me[a[A+9]]+"-"+me[a[A+10]]+me[a[A+11]]+me[a[A+12]]+me[a[A+13]]+me[a[A+14]]+me[a[A+15]]).toLowerCase()}(n)}function an(){return typeof localStorage<"u"&&localStorage.getItem("QA_BOT_DEBUG")==="true"}const El="background: #1a5b6e; color: white; padding: 2px 6px; border-radius: 3px;",kl="background: #7c3aed; color: white; padding: 2px 6px; border-radius: 3px;",Cl="background: #059669; color: white; padding: 2px 6px; border-radius: 3px;",Pl="background: #f59e0b; color: #000; padding: 2px 6px; border-radius: 3px 0 0 3px; font-weight: bold;",Sl="background: #fbbf24; color: #000; padding: 2px 6px; border-radius: 0 3px 3px 0;",Dl=()=>{an()&&console.log("%c QA Bot Core %c v".concat("0.2.19"," "),Pl,Sl)},sn=function(e){if(an()){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];console.log("%c[Session]%c ".concat(e),El,"",...r)}},Ge=function(e){if(an()){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];console.log("%c[History]%c ".concat(e),kl,"",...r)}},Bl=(e,t)=>{an()&&console.log("%c[Message]%c ".concat(e),Cl,"",t)},Il=function(){console.warn(...arguments)},lt=function(){console.error(...arguments)},Ba="qa_bot_session_messages",Ia=()=>"qa_bot_session_".concat(Da()),Ot=()=>{try{const e=localStorage.getItem(Ba);return e?JSON.parse(e):{}}catch{return{}}},Tl=(e,t,r,n,o)=>{const a=Ot();if(!a[e]&&(a[e]={messages:[],startedAt:new Date().toISOString(),preview:""},Ge("NEW session created",{sessionId:e.slice(-12)})),a[e].messages.some(c=>c.id===t))return void Ge("DUPLICATE message skipped",{sessionId:e.slice(-12),messageId:t.slice(-8),sender:n});const A={id:t,content:r,sender:n,type:o,timestamp:Date.now()};a[e].messages.push(A),Ge("MESSAGE added",{sessionId:e.slice(-12),messageId:t.slice(-8),sender:n,totalInSession:a[e].messages.length});const s=a[e].messages,i=s.find(c=>{var l;return c.sender.toLowerCase()==="bot"&&((l=c.content)===null||l===void 0?void 0:l.trim())&&c.content.length>=100});if(i){const c=i.content;a[e].preview=c.slice(0,50)+(c.length>50?"...":"")}else{const c=s.find(l=>{var d;return l.sender.toLowerCase()==="user"&&((d=l.content)===null||d===void 0?void 0:d.trim())});if(c&&!a[e].preview){const l=c.content;a[e].preview=l.slice(0,50)+(l.length>50?"...":"")}}(c=>{var l;const d=()=>Object.values(c).reduce((u,p)=>u+p.messages.length,0);for(;d()>100&&Object.keys(c).length>1;){const u=(l=Object.entries(c).sort((p,f)=>{let[,y]=p,[,g]=f;return new Date(y.startedAt).getTime()-new Date(g.startedAt).getTime()})[0])===null||l===void 0?void 0:l[0];if(!u)break;delete c[u]}localStorage.setItem(Ba,JSON.stringify(c))})(a),Ge("STORAGE state",{ourSessions:Object.keys(a).length,ourTotalMessages:Object.values(a).reduce((c,l)=>c+l.messages.length,0)})},Ta=e=>{var t,r;return(r=(t=Ot()[e])===null||t===void 0?void 0:t.messages.length)!==null&&r!==void 0?r:0},Ql=e=>{const t=Ot()[e];return t!=null&&t.startedAt?Date.now()-new Date(t.startedAt).getTime():0},Qa=h.createContext(void 0),Ml=e=>{let{children:t,getSessionId:r,setSessionId:n,resetSession:o,clearResettingFlag:a}=e;return h.createElement(Qa.Provider,{value:{getSessionId:r,setSessionId:n,resetSession:o,clearResettingFlag:a}},t)},Ar=()=>{const e=h.useContext(Qa);if(!e)throw new Error("useSession must be used within a SessionProvider");return e},Ol=()=>{const[e,t]=h.useState(!1),[r,n]=h.useState([]),[o,a]=h.useState(null),[A,s]=h.useState(0),i=h.useRef(null),c=h.useRef(null),{replaceMessages:l}=Pt(),{toggleTextAreaDisabled:d}=Zr(),{setSessionId:u,getSessionId:p}=Ar();h.useEffect(()=>{var y,g;const v=m=>{i.current&&!i.current.contains(m.target)&&c.current&&!c.current.contains(m.target)&&t(!1)},x=(g=(y=i.current)===null||y===void 0?void 0:y.getRootNode())!==null&&g!==void 0?g:document;return e&&x.addEventListener("mousedown",v),()=>{x.removeEventListener("mousedown",v)}},[e]);const f=y=>{var g;const v=p();if(Ge("RESTORE requested",{targetSession:y.slice(-12),currentSession:v==null?void 0:v.slice(-12)}),y===v)return Ge("RESTORE skipped - already on this session"),void t(!1);const x=(P=>{var C;return((C=Ot()[P])===null||C===void 0?void 0:C.messages)||[]})(y).filter(P=>{var C;return(C=P.content)===null||C===void 0?void 0:C.trim()});Ge("Stored messages from our localStorage",{count:x.length,ids:x.map(P=>P.id.slice(-8))});const m=x.map(P=>({id:P.id,content:P.content,sender:P.sender.toUpperCase(),type:P.type||"string",timestamp:new Date(P.timestamp).toISOString()}));var E;u(y),Ge("Session ID updated",{newSession:y.slice(-12)}),l(m),Ge("replaceMessages called",{count:m.length}),E=(g=c.current)===null||g===void 0?void 0:g.getRootNode(),setTimeout(()=>{const P=(E||document).querySelector(".rcb-chat-body-container");P&&P.querySelectorAll(".rcb-bot-message").forEach(C=>{var S;let I=C.innerHTML,Q=!1;I.includes("](")&&(I=I.replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>'),Q=!0),I.includes("<a href=")&&(I=I.replace(/<a\s+href=["']([^"']+)["'][^&]*>([^&]+)<\/a>/gi,'<a href="$1" target="_blank" rel="noopener noreferrer">$2</a>'),Q=!0),(I.includes("<a ")||!((S=C.textContent)===null||S===void 0)&&S.includes("<a href="))&&(C.textContent||"").includes("<a href=")&&(I=I.replace(/<a\s+href="([^"]+)"[^&]*>([^&]+)<\/a>/gi,'<a href="$1" target="_blank" rel="noopener noreferrer">$2</a>'),Q=!0),Q&&(C.innerHTML=I)})},50),d(!1),Ge("Chat input enabled after restore"),t(!1)};return h.createElement("div",{style:{position:"relative"}},h.createElement("button",{ref:c,className:"history-button",onClick:()=>{if(!e&&(n((()=>{const y=Ot();return Object.entries(y).map(g=>{let[v,x]=g;return Object.assign({sessionId:v},x)}).sort((g,v)=>new Date(v.startedAt).getTime()-new Date(g.startedAt).getTime())})()),c.current)){const y=c.current.closest(".rcb-chat-window");if(y){const g=y.getBoundingClientRect(),v=c.current.getBoundingClientRect();a(g.width+3),s(g.right-v.right-18+4)}}t(!e)},style:{alignItems:"center",justifyContent:"center",width:"30px",height:"30px",borderRadius:"50%",backgroundColor:"var(--primaryColor, #1a5b6e)",marginRight:"18px",display:"flex",border:"none",cursor:"pointer",padding:0},"aria-label":"View chat history",title:"View chat history","aria-expanded":e,"aria-haspopup":"menu"},h.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false"},h.createElement("circle",{cx:"12",cy:"12",r:"10"}),h.createElement("polyline",{points:"12 6 12 12 16 14"}))),e&&h.createElement("div",{ref:i,role:"menu",style:{position:"absolute",right:A?"-".concat(A,"px"):"-18px",top:"100%",marginTop:"8px",width:o?"".concat(o,"px"):"550px",backgroundColor:"white",borderRadius:0,borderBottom:"3px solid var(--primaryColor, #1a5b6e)",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)",maxHeight:"250px",overflowY:"auto",zIndex:1e3}},r.length===0?h.createElement("div",{style:{padding:"12px 16px",color:"#666",fontSize:"14px",textAlign:"center"}},"No chat history"):r.map(y=>h.createElement("button",{key:y.sessionId,role:"menuitem",onClick:()=>f(y.sessionId),style:{width:"100%",padding:"10px 14px",border:"none",backgroundColor:"transparent",cursor:"pointer",textAlign:"left",display:"flex",flexDirection:"column",gap:"2px",borderBottom:"1px solid #eee"},onMouseEnter:g=>{g.currentTarget.style.backgroundColor="#f5f5f5"},onMouseLeave:g=>{g.currentTarget.style.backgroundColor="transparent"}},h.createElement("span",{style:{fontSize:"14px",color:"#333",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},y.preview||"New conversation"),h.createElement("span",{style:{fontSize:"12px",color:"#888"}},(g=>{const v=new Date(g),x=new Date().getTime()-v.getTime(),m=Math.floor(x/864e5);return m===0?v.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):m===1?"Yesterday":m<7?v.toLocaleDateString([],{weekday:"short"}):v.toLocaleDateString([],{month:"short",day:"numeric"})})(y.startedAt))))))};function lr(){return lr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},lr.apply(null,arguments)}const Ma=({width:e=24,height:t=24,color:r="currentColor",children:n,...o})=>h.createElement("svg",lr({xmlns:"http://www.w3.org/2000/svg",width:e,height:t,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false"},o),n),_l=e=>h.createElement(Ma,e,h.createElement("path",{d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})),Ll=()=>{const{restartFlow:e}=Vt(),{setTextAreaValue:t}=Zr(),{messages:r}=Pt(),{getSessionId:n,resetSession:o,clearResettingFlag:a}=Ar(),{trackEvent:A}=Ca();return h.createElement("button",{onClick:async()=>{const s=n(),i=s?Ta(s):0;A({type:"chatbot_new_chat",previousMessageCount:i}),o(),await t(""),await e(),setTimeout(()=>{a()},100)},tabIndex:0,"aria-label":"New chat conversation",style:{backgroundColor:"var(--primaryColor, #107180)",border:"none",color:"#ffffff",fontSize:"14px",cursor:"pointer",padding:"8px 12px",borderRadius:"4px",transition:"all 0.2s ease",display:"flex",alignItems:"center",gap:"6px",fontWeight:"500"},onMouseEnter:s=>{s.target.style.backgroundColor="var(--secondaryColor, #0d5f6b)"},onMouseLeave:s=>{s.target.style.backgroundColor="var(--primaryColor, #107180)"}},h.createElement(_l,{width:16,height:16}),"New Chat")};function cr(e){if(typeof e=="string")return e;if(typeof e=="number")return String(e);if(!e)return"";if(Array.isArray(e))return e.map(cr).join("");if(typeof e=="object"&&e!==null&&"props"in e){const t=e.props;if(t&&"children"in t)return cr(t.children)}return""}const Nl=()=>{const{getSessionId:e}=Ar(),t=h.useCallback(r=>{var n;const o=(n=r.data)===null||n===void 0?void 0:n.message;if(!(o!=null&&o.id))return;const a=o.sender,A=o.type||"string";let s;if(s=typeof o.content=="string"?o.content:cr(o.content),Bl("TRACKED",{id:o.id,sender:a,content:s.substring(0,50)+(s.length>50?"...":"")}),s.includes("rcb-options-container")||!s.trim())return;const i=e();Tl(i,o.id,s,a,A)},[e]);return h.useEffect(()=>(window.addEventListener("rcb-pre-inject-message",t),()=>{window.removeEventListener("rcb-pre-inject-message",t)}),[t]),null},Hl=()=>(h.useEffect(()=>{const e=A=>{if(!["ArrowDown","ArrowUp","ArrowLeft","ArrowRight","Enter"," ","Home","End"].includes(A.key))return;const s=document.activeElement;if(s&&(s.tagName==="INPUT"||s.tagName==="TEXTAREA"||s.contentEditable==="true"||s.classList.contains("rcb-chat-input-textarea")))return;const i=document.querySelector(".rcb-chat-window");if(!i)return;const c=Array.from(i.querySelectorAll(".rcb-message-container, .rcb-bot-message-container, .rcb-user-message-container")).filter(u=>u.offsetParent!==null);if(c.length>0){const u=c[c.length-1].querySelector(".rcb-checkbox-container");if(u&&u.offsetParent!==null){const p=Array.from(u.querySelectorAll(".rcb-checkbox-row-container")),f=u.querySelector(".rcb-checkbox-next-button");if(p.length>0){const y=[...p];return f&&y.push(f),void((g,v)=>{g.preventDefault();let x=-1;for(let E=0;E<v.length;E++)if(v[E]===document.activeElement||v[E].contains(document.activeElement)){x=E;break}x===-1&&(x=0);let m=x;switch(g.key){case"ArrowDown":case"ArrowRight":m=x<v.length-1?x+1:0;break;case"ArrowUp":case"ArrowLeft":m=x>0?x-1:v.length-1;break;case"Home":m=0;break;case"End":m=v.length-1;break;case"Enter":case" ":{const E=v[x],P=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});return void E.dispatchEvent(P)}default:return}v[m].focus(),v[m].setAttribute("tabindex","0"),v[m].classList.add("keyboard-focused"),v.forEach((E,P)=>{P!==m&&(E.setAttribute("tabindex","-1"),E.classList.remove("keyboard-focused"))})})(A,y)}}}let l=[];if(c.length>0){const u=c[c.length-1],p=Array.from(u.querySelectorAll(".rcb-options-container")).filter(f=>f.offsetParent!==null);if(p.length>0){const f=p[p.length-1];l=Array.from(f.querySelectorAll(".rcb-options"))}}if(l.length===0)return;const d=l.findIndex(u=>u===document.activeElement);switch(A.key){case"ArrowDown":case"ArrowRight":{let u;A.preventDefault(),u=d<l.length-1?d+1:0,l[u].setAttribute("tabindex","0"),l.forEach((p,f)=>{f!==u&&(p.setAttribute("tabindex","-1"),p.classList.remove("keyboard-focused"))}),l[u].classList.add("keyboard-focused"),l[u].focus();break}case"ArrowUp":case"ArrowLeft":{let u;A.preventDefault(),u=d>0?d-1:l.length-1,l[u].setAttribute("tabindex","0"),l.forEach((p,f)=>{f!==u&&(p.setAttribute("tabindex","-1"),p.classList.remove("keyboard-focused"))}),l[u].classList.add("keyboard-focused"),l[u].focus();break}case"Enter":case" ":if(A.preventDefault(),document.activeElement&&l.includes(document.activeElement)){const u=document.activeElement;if(u.classList.contains("rcb-checkbox-row-container")||u.closest(".rcb-checkbox-row-container")){const p=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});u.dispatchEvent(p);const f=u.querySelector(".rcb-checkbox-label"),y=f?f.textContent:u.textContent||"checkbox",g=u.querySelector(".rcb-checkbox-mark"),v=g&&g.style.backgroundColor?"checked":"unchecked";t("".concat(y," ").concat(v))}else{const p=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});u.dispatchEvent(p);const f=u.textContent||u.innerText;t("Selected: ".concat(f))}}break;case"Home":A.preventDefault(),l.length>0&&(l[0].setAttribute("tabindex","0"),l.forEach((u,p)=>{p!==0&&(u.setAttribute("tabindex","-1"),u.classList.remove("keyboard-focused"))}),l[0].classList.add("keyboard-focused"),l[0].focus());break;case"End":if(A.preventDefault(),l.length>0){const u=l.length-1;l[u].setAttribute("tabindex","0"),l.forEach((p,f)=>{f!==u&&(p.setAttribute("tabindex","-1"),p.classList.remove("keyboard-focused"))}),l[u].classList.add("keyboard-focused"),l[u].focus()}}},t=A=>{const s=document.createElement("div");s.setAttribute("aria-live","assertive"),s.setAttribute("aria-atomic","true"),s.className="sr-only",s.textContent=A,document.body.appendChild(s),setTimeout(()=>{document.body.contains(s)&&document.body.removeChild(s)},1e3)},r=function(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;if(A||(A=document.querySelector(".rcb-chat-window"),A||(A=document.querySelector('[class*="rcb-chat"]')),A||(A=document.querySelector(".qa-bot"))),!A)return;const s=A.closest(".embedded-qa-bot")!==null,i=Array.from(A.querySelectorAll(".rcb-message-container, .rcb-bot-message-container, .rcb-user-message-container")).filter(u=>u.offsetParent!==null);if(i.length===0)return;const c=i[i.length-1],l=Array.from(c.querySelectorAll(".rcb-options-container")).filter(u=>u.offsetParent!==null);let d=[];if(l.length>0){const u=l[l.length-1];d=Array.from(u.querySelectorAll(".rcb-options"))}if(d.length===0){let u=c.querySelector(".rcb-checkbox-container");if(!u&&A&&(u=A.querySelector(".rcb-checkbox-container")),u&&u.offsetParent!==null){const p=Array.from(u.querySelectorAll(".rcb-checkbox-row-container")).filter(f=>f.offsetParent!==null&&f.style.display!=="none");if(p.length>0){const f=u.querySelector(".rcb-checkbox-next-button"),y=[...p];if(f&&f.offsetParent!==null&&y.push(f),y.forEach((g,v)=>{g.setAttribute("tabindex",v===0?"0":"-1"),v===0?g.classList.add("keyboard-focused"):g.classList.remove("keyboard-focused")}),p.length>1){u.querySelectorAll(".keyboard-nav-hint").forEach(v=>v.remove());const g=document.createElement("div");g.className="keyboard-nav-hint",g.textContent="Use arrow keys ↕ to navigate, Enter to select/deselect, or click any option",g.style.cssText="font-size: 12px !important; color: #666 !important; margin-bottom: 8px !important; font-style: italic !important; display: block !important;",u.insertBefore(g,u.firstChild)}return void setTimeout(()=>{y[0]&&y[0].offsetParent!==null&&!s&&y[0].focus()},150)}}}if(d.length>0){if(d.forEach((u,p)=>{const f=p===0?"0":"-1";u.setAttribute("tabindex",f),u.setAttribute("role","option"),u.setAttribute("aria-posinset",p+1),u.setAttribute("aria-setsize",d.length),p===0?u.classList.add("keyboard-focused"):u.classList.remove("keyboard-focused")}),d.length>1){const u=l.length>0?l[l.length-1]:null;if(u){u.querySelectorAll(".keyboard-nav-hint").forEach(f=>f.remove());const p=document.createElement("div");p.className="keyboard-nav-hint",p.textContent="Use arrow keys ↕ to navigate, Enter to select, or click any option",p.style.cssText="font-size: 12px !important; color: #666 !important; margin-bottom: 8px !important; font-style: italic !important; display: block !important;",u.insertBefore(p,u.firstChild)}}else{const u=l.length>0?l[l.length-1]:null;u&&u.querySelectorAll(".keyboard-nav-hint").forEach(p=>p.remove())}setTimeout(()=>{d[0]&&d[0].offsetParent!==null&&!s&&(d[0].focus(),d.length>1&&t("".concat(d.length," options available. Use arrow keys to navigate.")))},200)}},n=A=>{const s=A.querySelectorAll(".rcb-options");s.forEach((i,c)=>{i.hasAttribute("role")||(i.setAttribute("role","button"),i.setAttribute("tabindex",c===0?"0":"-1"),i.setAttribute("aria-posinset",c+1),i.setAttribute("aria-setsize",s.length))}),A.querySelectorAll(".rcb-checkbox-row-container").forEach((i,c)=>{i.hasAttribute("role")||(i.setAttribute("role","checkbox"),i.setAttribute("tabindex",c===0?"0":"-1"))})},o=new MutationObserver(A=>{A.forEach(s=>{if(s.type==="childList"){const l=Array.from(s.addedNodes),d=l.some(p=>{var f,y,g,v;return p.nodeType===Node.ELEMENT_NODE&&(((f=p.classList)===null||f===void 0?void 0:f.contains("rcb-options-container"))||((y=p.classList)===null||y===void 0?void 0:y.contains("rcb-options"))||((g=p.querySelector)===null||g===void 0?void 0:g.call(p,".rcb-options-container"))||((v=p.querySelector)===null||v===void 0?void 0:v.call(p,".rcb-options")))}),u=l.some(p=>{var f,y;return p.nodeType===Node.ELEMENT_NODE&&(((f=p.classList)===null||f===void 0?void 0:f.contains("rcb-checkbox-container"))||((y=p.querySelector)===null||y===void 0?void 0:y.call(p,".rcb-checkbox-container")))});if(d||u){let p=s.target;for(;p&&((i=p.classList)===null||i===void 0||!i.contains("qa-bot"))&&((c=p.classList)===null||c===void 0||!c.contains("rcb-chat-window"));){var i,c;p=p.parentElement}const f=p||document;n(f),f.querySelectorAll(".rcb-options[tabindex], .rcb-checkbox-row-container[tabindex], .rcb-checkbox-next-button[tabindex]").forEach(y=>{y.setAttribute("tabindex","-1"),y.classList.remove("keyboard-focused")}),setTimeout(()=>r(p),100)}}})});o.observe(document.body,{childList:!0,subtree:!0}),document.addEventListener("keydown",e),n(document),r();const a=setInterval(()=>{document.querySelectorAll(".qa-bot").forEach(A=>{const s=A.querySelectorAll(".rcb-options-container .rcb-options").length>0,i=A.querySelectorAll(".rcb-checkbox-row-container").length>0;if(s){n(A);const c=A.querySelectorAll(".rcb-options[tabindex]").length;A.querySelectorAll(".rcb-options").length>c&&r(A)}if(i){n(A);const c=A.querySelectorAll(".rcb-checkbox-row-container[tabindex]").length;A.querySelectorAll(".rcb-checkbox-row-container").length>c&&r(A)}})},1e3);return()=>{document.removeEventListener("keydown",e),o.disconnect(),clearInterval(a)}},[]),null),Ul="#1a5b6e",Fl="#107180",zl="Arial, sans-serif",Oa="Q&A Bot",Rl="/chat-icon.svg",jl="Type your question here...",ql="Select an option to continue",Gl=!1,Yl="Ask me a question!",_a="/login",Wl={general:{showHeader:!0,showFooter:!0},tooltip:{mode:"CLOSE"},chatInput:{disabled:!1,characterLimit:1e3,showCharacterCount:!1,allowNewline:!0,blockSpam:!1},chatWindow:{defaultOpen:!1,showScrollbar:!1},botBubble:{simulateStream:!0,streamSpeed:10,showAvatar:!1},userBubble:{showAvatar:!1},notification:{disabled:!0,showCount:!1},audio:{disabled:!0},emoji:{disabled:!0},fileAttachment:{disabled:!0}},ur=h.forwardRef((e,t)=>{var r,n;const{apiKey:o,qaEndpoint:a,ratingEndpoint:A,welcomeMessage:s,open:i,onOpenChange:c,isLoggedIn:l,allowAnonAccess:d=!1,actingUser:u,primaryColor:p,secondaryColor:f,botName:y,logo:g,placeholder:v,errorMessage:x,embedded:m,footerText:E,footerLink:P,tooltipText:C,loginUrl:S,customFlow:I,onAnalyticsEvent:Q}=e,B=h.useRef("bot_".concat(Math.random().toString(36).substr(2,9)));h.useEffect(()=>{Dl()},[]);const O=h.useRef(null);O.current===null&&(O.current=Ia(),sn("CREATED",O.current));const D=h.useRef(!1),M=h.useRef({getSessionId:()=>O.current,isResetting:()=>D.current}),[U,L]=h.useState(l);h.useEffect(()=>{L(l)},[l]);const F=m!==void 0?m:Gl,_=h.useCallback(R=>{var z;Q&&Q(Object.assign(Object.assign({},R),{timestamp:Date.now(),sessionId:(z=O.current)!==null&&z!==void 0?z:void 0,pageUrl:typeof window<"u"?window.location.href:void 0,isEmbedded:F}))},[Q,F]),H=h.useMemo(()=>{const R=Object.assign({},Wl);R.general=Object.assign(Object.assign({},R.general),{primaryColor:p||Ul,secondaryColor:f||Fl,fontFamily:zl,embedded:F});const z=U===!1?[h.createElement(Pa,{key:"login-button",loginUrl:S||_a,isHeaderButton:!0})]:[h.createElement(Ol,{key:"history-button"}),h.createElement(wl,{key:"user-icon"})];R.header={title:h.createElement("span",{style:{fontSize:14,fontWeight:500}},y||Oa),showAvatar:!0,avatar:g||Rl,buttons:[...z,ue.CLOSE_CHAT_BUTTON]},R.chatInput=Object.assign(Object.assign({},R.chatInput),{disabled:!1,enabledPlaceholderText:v||jl,disabledPlaceholderText:x||ql}),R.tooltip=Object.assign(Object.assign({},R.tooltip),{text:C||Yl});const q=E?P?h.createElement("a",{href:P,target:"_blank",rel:"noopener noreferrer",key:"footer-link"},E):h.createElement("span",{key:"footer-text"},E):null;return R.footer={text:q,buttons:[h.createElement(Ll,{key:"new-chat-button"})]},R.chatWindow=Object.assign(Object.assign({},R.chatWindow),{defaultOpen:!!F}),R.event={rcbPreInjectMessage:!0,rcbPostInjectMessage:!0,rcbUserSubmitText:!0,rcbChangePath:!0,rcbToggleChatWindow:!0},R},[p,f,y,g,v,x,F,C,U,S,E,P]),b=h.useRef(null),X=function(R){let z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return h.useMemo(()=>{const q=(Z,J)=>{if(R.current){const ae=getComputedStyle(R.current).getPropertyValue(Z);if(ae&&ae.trim()!=="")return ae.trim();if(R.current.parentElement){const re=getComputedStyle(R.current.parentElement).getPropertyValue(Z);if(re&&re.trim()!=="")return re.trim()}}return J};return{primaryColor:q("--primaryColor",z.primaryColor),secondaryColor:q("--secondaryColor",z.secondaryColor),fontFamily:q("--fontFamily",z.fontFamily)}},[R,z])}(b,H.general);((R,z)=>{h.useEffect(()=>{z.current&&(R?z.current.classList.add("bot-logged-in"):z.current.classList.remove("bot-logged-in"))},[R,z])})(U!==!1,b),(R=>{let{settings:z,themeColors:q}=R;h.useEffect(()=>{q&&(Object.entries(q).forEach(Z=>{let[J,ae]=Z;ae&&document.documentElement.style.setProperty("--".concat(J),ae)}),q.primaryColor&&document.documentElement.style.setProperty("--rcb-header-background",q.primaryColor),q.secondaryColor&&document.documentElement.style.setProperty("--rcb-header-background-hover",q.secondaryColor))},[q]),h.useEffect(()=>{var Z,J;!((Z=z.header)===null||Z===void 0)&&Z.title&&typeof z.header.title=="string"&&(z.header.title=h.createElement("div",{key:"header-title"},h.createElement("h1",{className:"sr-only"},z.header.title),h.createElement("span",{"aria-hidden":"true"},z.header.title))),z.device={desktopEnabled:!0,mobileEnabled:!0,applyMobileOptimizations:!1},z.chatHistory={disabled:!0},z.chatButton=Object.assign(Object.assign({},z.chatButton),{icon:(J=z.header)===null||J===void 0?void 0:J.avatar}),z.event=Object.assign(Object.assign({},z.event),{rcbToggleChatWindow:!0})},[z])})({settings:H,themeColors:X});const w=h.useMemo(()=>{const R=(q=>{let{endpoint:Z,ratingEndpoint:J,apiKey:ae,sessionId:re,isResetting:le=()=>!1,isLoggedIn:we,allowAnonAccess:Ye=!1,loginUrl:ut="/login",trackEvent:xe}=q;if(we===!1&&!Ye)return xe==null||xe({type:"chatbot_login_prompt_shown"}),{qa_loop:{message:"To ask questions, please log in first.",component:h.createElement(Pa,{loginUrl:ut}),chatDisabled:!0,path:"qa_loop"}};let Ne=null,xt=!1;if(!Z)throw new Error("Q&A endpoint is required");return{qa_loop:{message:async ot=>{const{userInput:We}=ot;if(le&&le()||!We||We.trim()==="")return null;if(We==="👍 Helpful"||We==="👎 Not helpful"){if(J&&Ne)try{const ge=We==="👍 Helpful",_e={"Content-Type":"application/json"};ae&&(_e["X-API-KEY"]=ae);const Ve=re();Ve&&(_e["X-Session-ID"]=Ve,_e["X-Query-ID"]=Ne),await fetch(J,{method:"POST",headers:_e,credentials:"include",body:JSON.stringify({sessionId:Ve,queryId:Ne,rating:ge?1:0})}),xe==null||xe({type:"chatbot_rating_sent",queryId:Ne,rating:ge?"helpful":"not_helpful"})}catch(ge){lt("Error sending feedback:",ge)}return"Thanks for the feedback! Feel free to ask another question."}try{const ge=Da();Ne=ge,xe==null||xe({type:"chatbot_question_sent",queryId:ge,questionLength:We.length});const _e={"Content-Type":"application/json"};ae&&(_e["X-API-KEY"]=ae);const Ve=re();Ve&&(_e["X-Session-ID"]=Ve,_e["X-Query-ID"]=ge);const dn={query:We,session_id:Ve,question_id:ge};sn("SENT to API",{session_id:Ve,question_id:ge});const pn=Date.now(),Nt=await fetch(Z,{method:"POST",headers:_e,credentials:"include",body:JSON.stringify(dn)}),yr=Date.now()-pn;if(!Nt.ok)throw new Error("API returned ".concat(Nt.status));const dt=await Nt.json(),Ht=dt.response||dt.answer||dt.text||dt.message;if(!Ht)throw new Error("Invalid response format from API");const fn=(Y=>{if(!Y||typeof Y!="string")return Y;let te=Y.replace(/\[(https?:\/\/[^\s]+?)\]/gi,"[$1]($1)");return te=te.replace(new RegExp(`(?<!\\]\\(|href=["']|\\[)https?:\\/\\/[^\\s[\\]()]+`,"gi"),ne=>{let de=ne,Ce="";const He=de.match(/([.,;:!?]+)$/);return He&&(Ce=He[1],de=de.slice(0,-Ce.length)),"[".concat(de,"](").concat(de,")").concat(Ce)}),te})(Ht),T=function(Y){const{confidence:te,tools_used:ne,metadata:de}=Y;if(!(te||ne&&ne.length!==0))return"";const Ce=[];return te&&Ce.push("• Confidence: ".concat(te)),ne&&ne.length>0&&Ce.push("• Tools used: ".concat(ne.join(", "))),de!=null&&de.agent&&Ce.push("• Agent: ".concat(de.agent)),`---
|
|
39
39
|
`.concat(Ce.join(`
|
|
40
|
-
`))}(dt),
|
|
40
|
+
`))}(dt),G=T?"".concat(fn,`
|
|
41
41
|
|
|
42
|
-
`).concat(T):fn;return await ot.injectMessage(q),xe==null||xe({type:"chatbot_answer_received",queryId:ge,responseTimeMs:yr,success:!0,responseLength:Ht.length,hasMetadata:!!T}),xt=!0,setTimeout(async()=>{await ot.injectMessage("Feel free to ask another question.")},100),null}catch(ge){return lt("Error in Q&A flow:",ge),xe==null||xe({type:"chatbot_answer_error",queryId:Ne??void 0,errorType:ge instanceof Error?ge.message:"unknown"}),"I apologize, but I'm having trouble processing your question. Please try again later."}},options:ot=>se&&se()||ot.userInput==="👍 Helpful"||ot.userInput==="👎 Not helpful"?[]:$&&xt?["👍 Helpful","👎 Not helpful"]:[],renderMarkdown:["BOT"],chatDisabled:!1,path:"qa_loop"}}})({endpoint:a,ratingEndpoint:s,apiKey:o,sessionId:M.current.getSessionId,isResetting:M.current.isResetting,isLoggedIn:U,allowAnonAccess:d,loginUrl:S||Oa,trackEvent:_});return Object.assign(Object.assign({start:{message:A,renderMarkdown:["BOT"],transition:{duration:0},path:"qa_loop"}},R),I||{})},[o,a,s,A,U,d,S,I,u,_]),K=h.useMemo(()=>{return[()=>mA(z),ml(),()=>yl(R)];var R,z},[]);return h.useEffect(()=>{const R=()=>{const G=document.querySelector(".rcb-chat-window");if(!G)return;const Z=G.querySelector(".rcb-send-button");Z&&(Z.hasAttribute("tabindex")||Z.setAttribute("tabindex","0"),Z.hasAttribute("data-keyboard-enabled")||(Z.setAttribute("data-keyboard-enabled","true"),Z.addEventListener("keydown",$=>{if($.key==="Enter"||$.key===" "){$.preventDefault();const le=Z&&Object.keys(Z).find(se=>se.startsWith("__reactProps"));if(le){const se=Z[le],we=se==null?void 0:se.onMouseDown;if(we&&typeof we=="function")return void we($)}const ae=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});Z.dispatchEvent(ae)}})))},z=setInterval(R,1e3);return R(),()=>clearInterval(z)},[]),Nl(),h.useEffect(()=>{if(!F){const R=z=>{const G=z.data.newState;c==null||c(G);const Z=O.current;_(G?{type:"chatbot_open"}:{type:"chatbot_close",messageCount:Z?Ba(Z):0,durationMs:Z?Il(Z):0})};return window.addEventListener("rcb-toggle-chat-window",R),()=>{window.removeEventListener("rcb-toggle-chat-window",R)}}},[F,c,_]),h.createElement("div",{className:"qa-bot ".concat(!((r=H.general)===null||r===void 0)&&r.embedded?"embedded-qa-bot":""),ref:b,role:"region","aria-label":y||Ma},h.createElement(Tl,{getSessionId:()=>O.current,setSessionId:R=>{const z=O.current;O.current=R,An("RESTORED","".concat(z==null?void 0:z.slice(-12)," -> ").concat(R.slice(-12)))},resetSession:()=>{const R=O.current;D.current=!0,O.current=Da(),An("RESET","".concat(R==null?void 0:R.slice(-12)," -> ").concat(O.current.slice(-12)))},clearResettingFlag:()=>{D.current=!1}},h.createElement(Ol,{trackEvent:_},h.createElement(Kr,null,h.createElement("div",null,h.createElement(Ll,null),h.createElement(Ea,{ref:t,embedded:((n=H.general)===null||n===void 0?void 0:n.embedded)||!1,currentOpen:i||!1,enabled:U!==!1,onSetEnabled:R=>L(!!R&&void 0)}),h.createElement(Zi,{key:"chatbot-".concat(B.current,"-").concat(U),settings:H,flow:w,plugins:K}),h.createElement("div",{role:"status","aria-live":"polite","aria-label":"Bot response updates",className:"sr-only",id:"bot-live-region"}),h.createElement("div",{id:"chat-input-help",className:"sr-only"},"Type your message and press Enter to send. Use arrow keys to navigate through response options."))))))});ur.displayName="QABot",br('.rcb-chat-window{height:800px!important;max-height:80vh!important;max-width:100%;width:550px!important}.rcb-chat-window .rcb-chat-header{align-items:center;display:flex;flex-direction:row;font-weight:700}.rcb-chat-window a{color:#000;font-weight:700;text-decoration:underline}.rcb-chat-window a:hover{color:var(--primaryColor,#107180)}.rcb-chat-window .rcb-bot-message a,.rcb-chat-window .rcb-bot-message a:link,.rcb-chat-window .rcb-bot-message a:visited{color:#fff!important;text-decoration:underline!important}.rcb-chat-window .rcb-bot-message a:hover{opacity:.85;text-decoration:underline!important}.rcb-chat-window .rcb-chat-input-textarea{overflow-y:auto}.rcb-chat-window .rcb-chat-footer-container{font-size:10px}.qa-bot .history-button,.qa-bot .user-login-icon{display:none!important}.qa-bot.bot-logged-in .history-button,.qa-bot.bot-logged-in .user-login-icon{display:flex!important;transform:scale(1.3) translateY(-2px)}.qa-bot.bot-logged-in .history-button:hover{opacity:.8}.qa-bot.bot-logged-in .history-button:focus{outline:2px solid #fff;outline-offset:2px}.embedded-qa-bot .rcb-chat-window{max-width:100%;width:100%!important}.qa-bot.hidden{display:none}.embedded-qa-bot .rcb-bot-message,.embedded-qa-bot .rcb-user-message{max-width:90%!important;word-break:break-word}.embedded-qa-bot .rcb-chat-input-textarea{width:100%!important}.qa-bot-container{max-width:100%;width:100%}@keyframes phone-ring{0%{transform:translateX(0) translateY(0) rotate(0deg)}2%{transform:translateX(0) translateY(-8px) rotate(-2deg)}4%{transform:translateX(0) translateY(-6px) rotate(2deg)}6%{transform:translateX(0) translateY(-8px) rotate(-1deg)}8%{transform:translateX(0) translateY(-6px) rotate(1deg)}10%{transform:translateX(0) translateY(-8px) rotate(-2deg)}12%{transform:translateX(0) translateY(-6px) rotate(2deg)}20%{transform:translateX(0) translateY(0) rotate(0deg)}30%{transform:translateX(0) translateY(0) rotate(0deg)}40%{transform:translateX(0) translateY(0) rotate(0deg)}49%{transform:translateX(0) translateY(0) rotate(0deg)}50%{transform:translateX(0) translateY(-8px) rotate(-2deg)}52%{transform:translateX(0) translateY(-6px) rotate(2deg)}54%{transform:translateX(0) translateY(-8px) rotate(-1deg)}56%{transform:translateX(0) translateY(-6px) rotate(1deg)}58%{transform:translateX(0) translateY(-8px) rotate(-2deg)}60%{transform:translateX(0) translateY(-6px) rotate(2deg)}70%{transform:translateX(0) translateY(0) rotate(0deg)}to{transform:translateX(0) translateY(0) rotate(0deg)}}@media (max-width:768px){.rcb-chat-window{max-height:calc(100vh - 100px)!important;max-width:calc(100vw - 40px)!important;width:550px!important}.embedded-chat-container.open{height:400px}.embedded-chat-closed{font-size:14px;height:40px}.embedded-chat-open-btn{font-size:12px;padding:3px 10px}.rcb-bot-message,.rcb-user-message{max-width:85%!important}.rcb-chat-input-textarea{font-size:16px!important;min-height:44px!important}.rcb-chat-header{padding:12px 16px!important}}@media (max-width:480px){.rcb-chat-window{bottom:10px!important;left:10px!important;max-height:calc(100vh - 80px)!important;max-width:calc(100vw - 20px)!important;right:10px!important;width:calc(100vw - 20px)!important}.embedded-chat-container.open{height:350px}.rcb-bot-message,.rcb-user-message{margin-bottom:8px!important;max-width:90%!important}.rcb-chat-header{font-size:14px!important;padding:8px 12px!important}.rcb-chat-button{bottom:20px!important;height:50px!important;right:20px!important;width:50px!important}.rcb-chat-footer-container{font-size:9px!important;padding:8px 12px!important}}@media (max-width:360px){.rcb-chat-window{left:5px!important;max-width:calc(100vw - 10px)!important;right:5px!important;width:calc(100vw - 10px)!important}.rcb-chat-header{font-size:13px!important;padding:6px 8px!important}}.rcb-checkbox-container{display:flex!important;flex-wrap:wrap!important;gap:8px!important;margin-left:16px!important;max-width:100%!important;padding-top:12px!important}.rcb-checkbox-row-container{align-items:center!important;background-color:#fff!important;border:1px solid #d0d0d0!important;border-radius:6px!important;box-sizing:border-box!important;color:var(--primaryColor,#107180)!important;cursor:pointer!important;display:flex!important;flex:0 0 auto!important;font-size:14px!important;font-weight:400!important;margin:0!important;max-height:auto!important;min-height:auto!important;padding:8px 12px!important;text-align:center!important;transition:all .2s ease!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:auto!important}.rcb-checkbox-row-container:hover{background-color:#e8f4f8!important;border-color:var(--primaryColor,#107180)!important;box-shadow:0 2px 4px #10718033!important;transform:translateY(-1px)!important}.rcb-checkbox-row-container[data-checked=true]{background-color:var(--primaryColor,#107180)!important;border-color:var(--primaryColor,#107180)!important;color:#fff!important}.rcb-checkbox-row{margin-left:0!important}.rcb-checkbox-mark{height:14px!important;margin-right:6px!important;width:14px!important}.rcb-checkbox-label{font-size:13px!important;margin:0!important;white-space:nowrap!important}.rcb-checkbox-next-button{align-items:center!important;background-color:#fff!important;border:1px solid #d0d0d0!important;border-radius:6px!important;box-sizing:border-box!important;color:var(--secondaryColor,#107180)!important;cursor:pointer!important;display:flex!important;flex:0 0 auto!important;font-size:14px!important;font-weight:400!important;justify-content:center!important;line-height:24px!important;margin:0!important;max-height:auto!important;min-height:auto!important;padding:8px 12px!important;text-align:center!important;transition:all .2s ease!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:auto!important}.rcb-checkbox-next-button:hover{background-color:#e8f4f8!important;border-color:var(--secondaryColor,#107180)!important;box-shadow:0 2px 4px #10718033!important;transform:translateY(-1px)!important}.sr-only{clip:rect(0,0,0,0)!important;border:0!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;white-space:nowrap!important;width:1px!important}.rcb-chat-input-send-button:focus,.rcb-chat-input-textarea:focus{outline:2px solid var(--primaryColor,#107180)!important;outline-offset:2px!important}.rcb-user-message{word-wrap:break-word!important;overflow:hidden!important;word-break:break-word!important}:focus-visible{outline:2px solid var(--primaryColor,#107180)!important;outline-offset:2px!important}.rcb-options-container{display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;gap:8px!important;margin:16px!important;padding:0!important}.rcb-options{background-color:#fff!important;border:1px solid #d0d0d0!important;border-radius:6px!important;box-sizing:border-box!important;color:var(--secondaryColor,#107180)!important;cursor:pointer!important;flex:0 0 auto!important;font-size:14px!important;font-weight:400!important;outline:none!important;padding:8px 12px!important;text-align:center!important;transition:all .2s ease!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:auto!important}.rcb-options:hover{background-color:#e8f4f8!important;border-color:var(--secondaryColor,#107180)!important;box-shadow:0 2px 4px #10718033!important;transform:translateY(-1px)!important}.rcb-checkbox-next-button.keyboard-focused,.rcb-checkbox-next-button:focus,.rcb-checkbox-next-button:focus-visible,.rcb-checkbox-row-container.keyboard-focused,.rcb-checkbox-row-container:focus,.rcb-checkbox-row-container:focus-visible,.rcb-options.keyboard-focused,.rcb-options:focus,.rcb-options:focus-visible{background-color:#e8f4f8!important;border-color:var(--secondaryColor,#107180)!important;outline:none!important}.rcb-options:active{background-color:var(--secondaryColor,#107180)!important;border-color:var(--secondaryColor,#107180)!important;color:#fff!important;transform:translateY(0)!important}.keyboard-nav-hint{color:#666!important;font-size:12px!important;font-style:italic!important;margin-bottom:8px!important}@media (prefers-reduced-motion:reduce){.keyboard-nav-hint{display:none!important}}.rcb-options-container [role=button][tabindex="0"],.rcb-options-container button[tabindex="0"]{position:relative!important}.rcb-options-container [role=button][tabindex="0"]:after,.rcb-options-container button[tabindex="0"]:after{color:var(--secondaryColor,#107180)!important;content:"←"!important;font-size:16px!important;opacity:0!important;position:absolute!important;right:12px!important;top:50%!important;transform:translateY(-50%)!important;transition:opacity .2s ease!important}.rcb-options-container [role=button][tabindex="0"]:focus:after,.rcb-options-container button[tabindex="0"]:focus:after{opacity:1!important}.rcb-chat-input-send-button{cursor:pointer!important;opacity:1!important;pointer-events:auto!important;visibility:visible!important}.rcb-chat-input-send-button:not([tabindex]){-webkit-user-select:none;-moz-user-select:none;user-select:none}.rcb-chat-input-container [onclick],.rcb-chat-input-container [role=button],.rcb-chat-input-container div[style*=cursor],.rcb-chat-input-container svg:last-child,.rcb-chat-input-container>div:last-child{tabindex:0!important;cursor:pointer!important}.rcb-chat-footer{margin-top:4px!important;padding-top:0!important}.rcb-chat-footer-container{align-items:center!important;display:flex!important;margin-top:4px!important;padding-top:4px!important}.rcb-chat-footer-container button{order:1!important}.rcb-chat-footer-container a[href*=qa-bot-core]{tab-index:0!important;order:2!important}.rcb-chat-footer-container a[href*=feedback]{tab-index:0!important;order:3!important}@media (prefers-contrast:high){.rcb-chat-window a{background-color:#fff!important;border:1px solid #000!important;color:#000!important}}@media (prefers-reduced-motion:reduce){*{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}.rcb-chat-input-textarea{user-select:text!important}.rcb-chat-body-container,.rcb-chat-input-textarea,.rcb-chat-window{touch-action:pan-y!important}.embedded-qa-bot,.rcb-chat-window{-webkit-overflow-scrolling:touch!important}.embedded-qa-bot .rcb-chat-input-textarea{touch-action:pan-y!important;user-select:text!important}.embedded-qa-bot .rcb-chat-body-container,.embedded-qa-bot .rcb-chat-window{touch-action:pan-y!important}.rcb-chat-header-container{background:var(--primaryColor,#1a5b6e)!important;background:linear-gradient(135deg,var(--primaryColor,#1a5b6e) 0,var(--secondaryColor,#107180) 100%)!important}.rcb-toggle-button{align-items:center!important;background:var(--primaryColor,#1a5b6e)!important;display:flex!important;justify-content:center!important}.rcb-toggle-button svg{stroke:#fff!important;color:#fff!important}.rcb-toggle-button *,.rcb-toggle-button img,.rcb-toggle-button svg,.rcb-toggle-button>*{box-sizing:border-box!important;height:50px!important;left:0!important;margin:0 auto!important;max-height:50px!important;max-width:50px!important;min-height:50px!important;min-width:50px!important;padding:2px!important;position:relative!important;top:0!important;width:50px!important}.rcb-send-button{background-color:var(--primaryColor,#1a5b6e)!important}',{insertAt:"top"});const Wl=()=>{const[e,t]=h.useState(!1),r=()=>typeof navigator<"u"&&navigator.mediaDevices!==void 0&&typeof navigator.mediaDevices.getDisplayMedia=="function";return{captureScreenshot:async()=>{if(!r())throw new Error("Screen capture is not available in this environment");try{t(!0);const n=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser",cursor:"always",width:{ideal:1920},height:{ideal:1080}},audio:!1}),o=document.createElement("video");o.srcObject=n,await new Promise(l=>{o.onloadedmetadata=()=>{o.play(),l()}});const a=document.createElement("canvas");a.width=o.videoWidth,a.height=o.videoHeight;const s=a.getContext("2d");if(!s)throw new Error("Could not get canvas context");s.drawImage(o,0,0,a.width,a.height);const A=await new Promise(l=>a.toBlob(l,"image/png"));if(!A)throw new Error("Could not create image blob");const i=new Date().toISOString().replace(/[:.]/g,"-"),c=new File([A],"screenshot-".concat(i,".png"),{type:"image/png"});return n.getTracks().forEach(l=>l.stop()),t(!1),c}catch(n){throw lt("Error capturing screenshot:",n),t(!1),n}},isCapturing:e,isScreenCaptureAvailable:r()}},Vl=e=>h.createElement(Ta,e,h.createElement("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),h.createElement("polyline",{points:"17 8 12 3 7 8"}),h.createElement("line",{x1:"12",y1:"3",x2:"12",y2:"15"})),Xl=e=>new Promise((t,r)=>{const n=new FileReader;n.onload=()=>{if(typeof n.result!="string")return void r(new Error("Failed to read file ".concat(e.name)));const o=n.result.split(",")[1];t({fileName:e.name,contentType:e.type,size:e.size,fileData:o})},n.onerror=()=>r(new Error("Failed to read file ".concat(e.name))),n.readAsDataURL(e)}),Kl=e=>Promise.all(e.map(Xl)),Jl=e=>e<1024?"".concat(e," B"):e<1048576?"".concat((e/1024).toFixed(1)," KB"):"".concat((e/1048576).toFixed(1)," MB"),sn=e=>{let{onFileUpload:t,maxSizeMB:r=10,acceptedTypes:n="image/*,application/pdf,text/*,.doc,.docx",enableScreenshot:o=!1,className:a}=e;const[s,A]=h.useState(!1),[i,c]=h.useState([]),[l,d]=h.useState(null),u=h.useRef(null),{captureScreenshot:p,isCapturing:f,isScreenCaptureAvailable:y}=Wl(),g=C=>{const S=document.createElement("div");S.setAttribute("aria-live","assertive"),S.setAttribute("aria-atomic","true"),S.className="sr-only",S.textContent=C,document.body.appendChild(S),setTimeout(()=>document.body.removeChild(S),1e3)},v=C=>{if(!C||C.length===0)return void Dl("FileUploadComponent: No valid files provided to handleFiles");let S;try{S=Array.from(C)}catch(O){return lt("FileUploadComponent: Error converting files to array:",O),void g("Error processing selected files. Please try again.")}const I=[...i,...S];c(I);const Q=S.length,B=S.map(O=>O.name).join(", ");g("".concat(Q," file").concat(Q>1?"s":""," selected: ").concat(B)),setTimeout(()=>{const O=document.querySelector(".rcb-chat-content");O&&(O.scrollTop=O.scrollHeight)},100),t&&t(I)},x=C=>{C.preventDefault(),C.stopPropagation(),C.type==="dragenter"||C.type==="dragover"?A(!0):C.type==="dragleave"&&A(!1)},m=()=>{try{u.current&&u.current.click()}catch(C){lt("FileUploadComponent: Error in handleButtonClick:",C),g("Error opening file selection dialog. Please try again.")}},E=()=>{d(null)},P=o&&y;return h.createElement("div",{className:"file-upload-container ".concat(a||""),style:{padding:"16px",margin:"8px 0"}},P&&h.createElement("div",{style:{display:"flex",justifyContent:"center",marginBottom:"10px"}},h.createElement("button",{onClick:C=>{C.preventDefault(),(async()=>{try{const S=await p();v([S]),g("Screenshot captured successfully")}catch{g("Error capturing screenshot. Please try again.")}})()},disabled:f,"aria-describedby":"screenshot-help","aria-label":f?"Taking screenshot, please wait":"Take a screenshot to attach",style:{display:"flex",alignItems:"center",gap:"8px",backgroundColor:"#107180",color:"white",border:"none",borderRadius:"5px",padding:"8px 12px",cursor:f?"not-allowed":"pointer",fontSize:"14px",fontWeight:"500",boxShadow:"0 1px 3px rgba(0,0,0,0.2)"}},h.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},h.createElement("path",{d:"M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"}),h.createElement("circle",{cx:"12",cy:"13",r:"4"})),f?"Taking screenshot...":"Take screenshot..."),h.createElement("span",{id:"screenshot-help",className:"sr-only"},"Captures the current screen and adds it as an attachment")),h.createElement("div",{className:"file-upload-dropzone ".concat(s?"active":""),onDragEnter:x,onDragLeave:x,onDragOver:x,onDrop:C=>{var S;C.preventDefault(),C.stopPropagation(),A(!1);try{!((S=C.dataTransfer)===null||S===void 0)&&S.files&&C.dataTransfer.files.length>0&&v(C.dataTransfer.files)}catch(I){lt("FileUploadComponent: Error in handleDrop:",I),g("Error processing dropped files. Please try again.")}},role:"button",tabIndex:0,"aria-label":"File upload area. Click to select files or drag and drop files here.","aria-describedby":"upload-instructions",onKeyDown:C=>{C.key!=="Enter"&&C.key!==" "||(C.preventDefault(),m())},style:{padding:"20px",border:"2px dashed #ccc",borderRadius:"8px",backgroundColor:s?"#f0f8ff":"#fafafa",transition:"all 0.3s ease"}},h.createElement("input",{ref:u,type:"file",className:"file-input",onChange:C=>{var S;try{!((S=C.target)===null||S===void 0)&&S.files&&C.target.files.length>0&&v(C.target.files)}catch(I){lt("FileUploadComponent: Error in handleFileSelect:",I),g("Error processing selected files. Please try again.")}},multiple:!0,style:{display:"none"},"aria-label":"Select files to upload",accept:n}),h.createElement("div",{className:"upload-content",onClick:m,style:{cursor:"pointer",flexDirection:"column",alignItems:"center",display:"flex",textAlign:"center",padding:"12px"}},h.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"}},h.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"10px"}},h.createElement(Vl,null),h.createElement("p",{style:{margin:0,fontWeight:"bold"}},"Upload Files")),h.createElement("p",{id:"upload-instructions",style:{margin:0,fontSize:"14px",color:"#666"}},"Drag and drop files here or click to select. (Max ",r,"MB each)")),i.length>0&&h.createElement("div",{className:"selected-files",style:{display:"flex",flexWrap:"wrap",gap:"8px",marginTop:"12px",alignItems:"center"}},h.createElement("span",{style:{fontWeight:400,color:"#888",fontSize:"13px",marginRight:"8px",alignSelf:"center"}},"Selected files:"),i.map((C,S)=>h.createElement("span",{key:S,style:{background:"#fff",color:"#107180",borderRadius:"5px",padding:"4px 12px",fontSize:"14px",marginRight:"4px",marginBottom:"4px",border:"1px solid #ccc",display:"flex",alignItems:"center",gap:"6px",cursor:"pointer"},onClick:I=>{I.stopPropagation(),(Q=>{d(Q)})(C)}},h.createElement("span",{onClick:I=>{I.stopPropagation(),(Q=>{const B=i.filter((O,D)=>D!==Q);c(B),t&&t(B)})(S)},style:{cursor:"pointer",color:"#888",fontWeight:"bold",fontSize:"15px",marginRight:"4px",userSelect:"none",lineHeight:1},title:"Remove file","aria-label":"Remove ".concat(C.name)},"×"),C.name," (",Jl(C.size),")"))))),(()=>{if(!l)return null;const C=l.type.startsWith("image/"),S=l.type.startsWith("text/"),I=l.type==="application/pdf";return h.createElement("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.7)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1e3},onClick:E},h.createElement("div",{style:{backgroundColor:"white",padding:"20px",borderRadius:"8px",maxWidth:"90%",maxHeight:"90%",overflow:"auto",position:"relative"},onClick:Q=>Q.stopPropagation()},h.createElement("button",{onClick:E,style:{position:"absolute",top:"10px",right:"10px",background:"none",border:"none",fontSize:"24px",cursor:"pointer",color:"#666"}},"×"),h.createElement("h3",{style:{marginTop:0,marginBottom:"16px"}},l.name),C&&h.createElement("img",{src:URL.createObjectURL(l),alt:l.name,style:{maxWidth:"100%",maxHeight:"70vh"}}),S&&h.createElement("pre",{style:{whiteSpace:"pre-wrap",wordWrap:"break-word",maxHeight:"70vh",overflow:"auto",padding:"16px",backgroundColor:"#f5f5f5",borderRadius:"4px"}},URL.createObjectURL(l)),I&&h.createElement("iframe",{src:URL.createObjectURL(l),style:{width:"100%",height:"70vh",border:"none"},title:l.name}),!C&&!S&&!I&&h.createElement("div",{style:{padding:"20px",textAlign:"center"}},"Preview not available for this file type")))})())};function Zl(e,t){if(!t||Object.keys(t).length===0)return e;const r={};for(const[n,o]of Object.entries(e)){let a=Object.assign({},o);if(a.chatDisabled===void 0){const s=!(!a.options&&!a.checkboxes);a.chatDisabled=s}r[n]=a}return r}function ln(e){return async t=>{const r=await e(t);await t.injectMessage(r)}}const $l=h.forwardRef((e,t)=>{const[r,n]=h.useState(e.defaultOpen||!1),o=h.useRef(null);return h.useImperativeHandle(t,()=>({addMessage:a=>{var s;(s=o.current)===null||s===void 0||s.addMessage(a)},setBotEnabled:a=>{var s;(s=o.current)===null||s===void 0||s.setBotEnabled(a)},openChat:()=>{var a;n(!0),(a=o.current)===null||a===void 0||a.openChat()},closeChat:()=>{var a;n(!1),(a=o.current)===null||a===void 0||a.closeChat()},toggleChat:()=>{var a;n(s=>!s),(a=o.current)===null||a===void 0||a.toggleChat()}}),[]),h.createElement(ur,{ref:o,apiKey:e.apiKey,qaEndpoint:e.qaEndpoint,ratingEndpoint:e.ratingEndpoint,welcomeMessage:e.welcomeMessage,primaryColor:e.primaryColor,secondaryColor:e.secondaryColor,botName:e.botName,logo:e.logo,placeholder:e.placeholder,errorMessage:e.errorMessage,embedded:e.embedded,isLoggedIn:e.isLoggedIn,allowAnonAccess:e.allowAnonAccess,open:r,onOpenChange:n,footerText:e.footerText,footerLink:e.footerLink,tooltipText:e.tooltipText,onAnalyticsEvent:e.onAnalyticsEvent})});$l.displayName="ProgrammaticQABot";const rt={QA_ENDPOINT:"https://access-ai-grace1-external.ccs.uky.edu/access/chat/api/",RATING_ENDPOINT:"https://access-ai-grace1-external.ccs.uky.edu/access/chat/rating/",METRICS_API_ENDPOINT:"https://access-ai-grace1-external.ccs.uky.edu/access/xdmod/chat/api/",METRICS_RATING_ENDPOINT:"https://access-ai-grace1-external.ccs.uky.edu/access/xdmod/chat/rating/",METRICS_QUESTIONS_URL:"https://metrics.access-ci.org/qa_bot_faq",NETLIFY_BASE_URL:"https://access-jsm-api.netlify.app",DEFAULT_API_KEY:"demo-key"},Ke={BOT_NAME:"ACCESS Q&A",LOGO:"https://support.access-ci.org/themes/contrib/asp-theme/images/icons/ACCESS-arrrow.svg",WELCOME_MESSAGE:"Hello! What can I help you with?",WELCOME_MESSAGE_LOGGED_OUT:"To ask questions, please log in.",LOGIN_URL:"/login",PRIMARY_COLOR:"#1a5b6e",SECONDARY_COLOR:"#107180",TOOLTIP:"Ask me about ACCESS! 😊"},_a={SESSION_ID:"access-qa-bot-session-id"};function ec({welcome:e,setTicketForm:t,isLoggedIn:r,trackEvent:n}){return{start:{message:e,options:["Ask a question about ACCESS","Open a Help Ticket","Usage and performance of ACCESS resources (XDMoD)","Report a security issue"],path:o=>(n({type:"chatbot_menu_selected",selection:o.userInput}),o.userInput==="Ask a question about ACCESS"?r?"go_ahead_and_ask":"qa_loop":o.userInput==="Open a Help Ticket"?(t({}),"help_ticket"):o.userInput==="Usage and performance of ACCESS resources (XDMoD)"?"metrics_intro":o.userInput==="Report a security issue"?(t({}),n({type:"chatbot_security_started"}),"security_incident"):"start")},go_ahead_and_ask:{message:`Go ahead and ask your question! I'll do my best to help.
|
|
42
|
+
`).concat(T):fn;return await ot.injectMessage(G),xe==null||xe({type:"chatbot_answer_received",queryId:ge,responseTimeMs:yr,success:!0,responseLength:Ht.length,hasMetadata:!!T}),xt=!0,setTimeout(async()=>{await ot.injectMessage("Feel free to ask another question.")},100),null}catch(ge){return lt("Error in Q&A flow:",ge),xe==null||xe({type:"chatbot_answer_error",queryId:Ne??void 0,errorType:ge instanceof Error?ge.message:"unknown"}),"I apologize, but I'm having trouble processing your question. Please try again later."}},options:ot=>le&&le()||ot.userInput==="👍 Helpful"||ot.userInput==="👎 Not helpful"?[]:J&&xt?["👍 Helpful","👎 Not helpful"]:[],renderMarkdown:["BOT"],chatDisabled:!1,path:"qa_loop"}}})({endpoint:a,ratingEndpoint:A,apiKey:o,sessionId:M.current.getSessionId,isResetting:M.current.isResetting,isLoggedIn:U,allowAnonAccess:d,loginUrl:S||_a,trackEvent:_});return Object.assign(Object.assign({start:{message:s,renderMarkdown:["BOT"],transition:{duration:0},path:"qa_loop"}},R),I||{})},[o,a,A,s,U,d,S,I,u,_]),K=h.useMemo(()=>{return[()=>ys(z),yl(),()=>bl(R)];var R,z},[]);return h.useEffect(()=>{const R=()=>{const q=document.querySelector(".rcb-chat-window");if(!q)return;const Z=q.querySelector(".rcb-send-button");Z&&(Z.hasAttribute("tabindex")||Z.setAttribute("tabindex","0"),Z.hasAttribute("data-keyboard-enabled")||(Z.setAttribute("data-keyboard-enabled","true"),Z.addEventListener("keydown",J=>{if(J.key==="Enter"||J.key===" "){J.preventDefault();const ae=Z&&Object.keys(Z).find(le=>le.startsWith("__reactProps"));if(ae){const le=Z[ae],we=le==null?void 0:le.onMouseDown;if(we&&typeof we=="function")return void we(J)}const re=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});Z.dispatchEvent(re)}})))},z=setInterval(R,1e3);return R(),()=>clearInterval(z)},[]),Hl(),h.useEffect(()=>{const R=b.current;if(!R)return;const z=q=>{var Z,J,ae;const re=(J=(Z=q.target).closest)===null||J===void 0?void 0:J.call(Z,"a");re&&re.closest(".rcb-chat-body-container")&&(re.classList.contains("qa-bot-login-button")||re.closest(".rcb-options-container")||_({type:"chatbot_link_clicked",linkUrl:re.href,linkText:((ae=re.textContent)===null||ae===void 0?void 0:ae.trim())||""}))};return R.addEventListener("click",z),()=>R.removeEventListener("click",z)},[_]),h.useEffect(()=>{if(!F){const R=z=>{const q=z.data.newState;c==null||c(q);const Z=O.current;_(q?{type:"chatbot_open"}:{type:"chatbot_close",messageCount:Z?Ta(Z):0,durationMs:Z?Ql(Z):0})};return window.addEventListener("rcb-toggle-chat-window",R),()=>{window.removeEventListener("rcb-toggle-chat-window",R)}}},[F,c,_]),h.createElement("div",{className:"qa-bot ".concat(!((r=H.general)===null||r===void 0)&&r.embedded?"embedded-qa-bot":""),ref:b,role:"region","aria-label":y||Oa},h.createElement(Ml,{getSessionId:()=>O.current,setSessionId:R=>{const z=O.current;O.current=R,sn("RESTORED","".concat(z==null?void 0:z.slice(-12)," -> ").concat(R.slice(-12)))},resetSession:()=>{const R=O.current;D.current=!0,O.current=Ia(),sn("RESET","".concat(R==null?void 0:R.slice(-12)," -> ").concat(O.current.slice(-12)))},clearResettingFlag:()=>{D.current=!1}},h.createElement(vl,{trackEvent:_},h.createElement(Kr,null,h.createElement("div",null,h.createElement(Nl,null),h.createElement(Ea,{ref:t,embedded:((n=H.general)===null||n===void 0?void 0:n.embedded)||!1,currentOpen:i||!1,enabled:U!==!1,onSetEnabled:R=>L(!!R&&void 0)}),h.createElement($i,{key:"chatbot-".concat(B.current,"-").concat(U),settings:H,flow:w,plugins:K}),h.createElement("div",{role:"status","aria-live":"polite","aria-label":"Bot response updates",className:"sr-only",id:"bot-live-region"}),h.createElement("div",{id:"chat-input-help",className:"sr-only"},"Type your message and press Enter to send. Use arrow keys to navigate through response options."))))))});ur.displayName="QABot",br('.rcb-chat-window{height:800px!important;max-height:80vh!important;max-width:100%;width:550px!important}.rcb-chat-window .rcb-chat-header{align-items:center;display:flex;flex-direction:row;font-weight:700}.rcb-chat-window a{color:#000;font-weight:700;text-decoration:underline}.rcb-chat-window a:hover{color:var(--primaryColor,#107180)}.rcb-chat-window .rcb-bot-message a,.rcb-chat-window .rcb-bot-message a:link,.rcb-chat-window .rcb-bot-message a:visited{color:#fff!important;text-decoration:underline!important}.rcb-chat-window .rcb-bot-message a:hover{opacity:.85;text-decoration:underline!important}.rcb-chat-window .rcb-chat-input-textarea{overflow-y:auto}.rcb-chat-window .rcb-chat-footer-container{font-size:10px}.qa-bot .history-button,.qa-bot .user-login-icon{display:none!important}.qa-bot.bot-logged-in .history-button,.qa-bot.bot-logged-in .user-login-icon{display:flex!important;transform:scale(1.3) translateY(-2px)}.qa-bot.bot-logged-in .history-button:hover{opacity:.8}.qa-bot.bot-logged-in .history-button:focus{outline:2px solid #fff;outline-offset:2px}.embedded-qa-bot .rcb-chat-window{max-width:100%;width:100%!important}.qa-bot.hidden{display:none}.embedded-qa-bot .rcb-bot-message,.embedded-qa-bot .rcb-user-message{max-width:90%!important;word-break:break-word}.embedded-qa-bot .rcb-chat-input-textarea{width:100%!important}.qa-bot-container{max-width:100%;width:100%}@keyframes phone-ring{0%{transform:translateX(0) translateY(0) rotate(0deg)}2%{transform:translateX(0) translateY(-8px) rotate(-2deg)}4%{transform:translateX(0) translateY(-6px) rotate(2deg)}6%{transform:translateX(0) translateY(-8px) rotate(-1deg)}8%{transform:translateX(0) translateY(-6px) rotate(1deg)}10%{transform:translateX(0) translateY(-8px) rotate(-2deg)}12%{transform:translateX(0) translateY(-6px) rotate(2deg)}20%{transform:translateX(0) translateY(0) rotate(0deg)}30%{transform:translateX(0) translateY(0) rotate(0deg)}40%{transform:translateX(0) translateY(0) rotate(0deg)}49%{transform:translateX(0) translateY(0) rotate(0deg)}50%{transform:translateX(0) translateY(-8px) rotate(-2deg)}52%{transform:translateX(0) translateY(-6px) rotate(2deg)}54%{transform:translateX(0) translateY(-8px) rotate(-1deg)}56%{transform:translateX(0) translateY(-6px) rotate(1deg)}58%{transform:translateX(0) translateY(-8px) rotate(-2deg)}60%{transform:translateX(0) translateY(-6px) rotate(2deg)}70%{transform:translateX(0) translateY(0) rotate(0deg)}to{transform:translateX(0) translateY(0) rotate(0deg)}}@media (max-width:768px){.rcb-chat-window{max-height:calc(100vh - 100px)!important;max-width:calc(100vw - 40px)!important;width:550px!important}.embedded-chat-container.open{height:400px}.embedded-chat-closed{font-size:14px;height:40px}.embedded-chat-open-btn{font-size:12px;padding:3px 10px}.rcb-bot-message,.rcb-user-message{max-width:85%!important}.rcb-chat-input-textarea{font-size:16px!important;min-height:44px!important}.rcb-chat-header{padding:12px 16px!important}}@media (max-width:480px){.rcb-chat-window{bottom:10px!important;left:10px!important;max-height:calc(100vh - 80px)!important;max-width:calc(100vw - 20px)!important;right:10px!important;width:calc(100vw - 20px)!important}.embedded-chat-container.open{height:350px}.rcb-bot-message,.rcb-user-message{margin-bottom:8px!important;max-width:90%!important}.rcb-chat-header{font-size:14px!important;padding:8px 12px!important}.rcb-chat-button{bottom:20px!important;height:50px!important;right:20px!important;width:50px!important}.rcb-chat-footer-container{font-size:9px!important;padding:8px 12px!important}}@media (max-width:360px){.rcb-chat-window{left:5px!important;max-width:calc(100vw - 10px)!important;right:5px!important;width:calc(100vw - 10px)!important}.rcb-chat-header{font-size:13px!important;padding:6px 8px!important}}.rcb-checkbox-container{display:flex!important;flex-wrap:wrap!important;gap:8px!important;margin-left:16px!important;max-width:100%!important;padding-top:12px!important}.rcb-checkbox-row-container{align-items:center!important;background-color:#fff!important;border:1px solid #d0d0d0!important;border-radius:6px!important;box-sizing:border-box!important;color:var(--primaryColor,#107180)!important;cursor:pointer!important;display:flex!important;flex:0 0 auto!important;font-size:14px!important;font-weight:400!important;margin:0!important;max-height:auto!important;min-height:auto!important;padding:8px 12px!important;text-align:center!important;transition:all .2s ease!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:auto!important}.rcb-checkbox-row-container:hover{background-color:#e8f4f8!important;border-color:var(--primaryColor,#107180)!important;box-shadow:0 2px 4px #10718033!important;transform:translateY(-1px)!important}.rcb-checkbox-row-container[data-checked=true]{background-color:var(--primaryColor,#107180)!important;border-color:var(--primaryColor,#107180)!important;color:#fff!important}.rcb-checkbox-row{margin-left:0!important}.rcb-checkbox-mark{height:14px!important;margin-right:6px!important;width:14px!important}.rcb-checkbox-label{font-size:13px!important;margin:0!important;white-space:nowrap!important}.rcb-checkbox-next-button{align-items:center!important;background-color:#fff!important;border:1px solid #d0d0d0!important;border-radius:6px!important;box-sizing:border-box!important;color:var(--secondaryColor,#107180)!important;cursor:pointer!important;display:flex!important;flex:0 0 auto!important;font-size:14px!important;font-weight:400!important;justify-content:center!important;line-height:24px!important;margin:0!important;max-height:auto!important;min-height:auto!important;padding:8px 12px!important;text-align:center!important;transition:all .2s ease!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:auto!important}.rcb-checkbox-next-button:hover{background-color:#e8f4f8!important;border-color:var(--secondaryColor,#107180)!important;box-shadow:0 2px 4px #10718033!important;transform:translateY(-1px)!important}.sr-only{clip:rect(0,0,0,0)!important;border:0!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;white-space:nowrap!important;width:1px!important}.rcb-chat-input-send-button:focus,.rcb-chat-input-textarea:focus{outline:2px solid var(--primaryColor,#107180)!important;outline-offset:2px!important}.rcb-user-message{word-wrap:break-word!important;overflow:hidden!important;word-break:break-word!important}:focus-visible{outline:2px solid var(--primaryColor,#107180)!important;outline-offset:2px!important}.rcb-options-container{display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;gap:8px!important;margin:16px!important;padding:0!important}.rcb-options{background-color:#fff!important;border:1px solid #d0d0d0!important;border-radius:6px!important;box-sizing:border-box!important;color:var(--secondaryColor,#107180)!important;cursor:pointer!important;flex:0 0 auto!important;font-size:14px!important;font-weight:400!important;outline:none!important;padding:8px 12px!important;text-align:center!important;transition:all .2s ease!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:auto!important}.rcb-options:hover{background-color:#e8f4f8!important;border-color:var(--secondaryColor,#107180)!important;box-shadow:0 2px 4px #10718033!important;transform:translateY(-1px)!important}.rcb-checkbox-next-button.keyboard-focused,.rcb-checkbox-next-button:focus,.rcb-checkbox-next-button:focus-visible,.rcb-checkbox-row-container.keyboard-focused,.rcb-checkbox-row-container:focus,.rcb-checkbox-row-container:focus-visible,.rcb-options.keyboard-focused,.rcb-options:focus,.rcb-options:focus-visible{background-color:#e8f4f8!important;border-color:var(--secondaryColor,#107180)!important;outline:none!important}.rcb-options:active{background-color:var(--secondaryColor,#107180)!important;border-color:var(--secondaryColor,#107180)!important;color:#fff!important;transform:translateY(0)!important}.keyboard-nav-hint{color:#666!important;font-size:12px!important;font-style:italic!important;margin-bottom:8px!important}@media (prefers-reduced-motion:reduce){.keyboard-nav-hint{display:none!important}}.rcb-options-container [role=button][tabindex="0"],.rcb-options-container button[tabindex="0"]{position:relative!important}.rcb-options-container [role=button][tabindex="0"]:after,.rcb-options-container button[tabindex="0"]:after{color:var(--secondaryColor,#107180)!important;content:"←"!important;font-size:16px!important;opacity:0!important;position:absolute!important;right:12px!important;top:50%!important;transform:translateY(-50%)!important;transition:opacity .2s ease!important}.rcb-options-container [role=button][tabindex="0"]:focus:after,.rcb-options-container button[tabindex="0"]:focus:after{opacity:1!important}.rcb-chat-input-send-button{cursor:pointer!important;opacity:1!important;pointer-events:auto!important;visibility:visible!important}.rcb-chat-input-send-button:not([tabindex]){-webkit-user-select:none;-moz-user-select:none;user-select:none}.rcb-chat-input-container [onclick],.rcb-chat-input-container [role=button],.rcb-chat-input-container div[style*=cursor],.rcb-chat-input-container svg:last-child,.rcb-chat-input-container>div:last-child{tabindex:0!important;cursor:pointer!important}.rcb-chat-footer{margin-top:4px!important;padding-top:0!important}.rcb-chat-footer-container{align-items:center!important;display:flex!important;margin-top:4px!important;padding-top:4px!important}.rcb-chat-footer-container button{order:1!important}.rcb-chat-footer-container a[href*=qa-bot-core]{tab-index:0!important;order:2!important}.rcb-chat-footer-container a[href*=feedback]{tab-index:0!important;order:3!important}@media (prefers-contrast:high){.rcb-chat-window a{background-color:#fff!important;border:1px solid #000!important;color:#000!important}}@media (prefers-reduced-motion:reduce){*{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}.rcb-chat-input-textarea{user-select:text!important}.rcb-chat-body-container,.rcb-chat-input-textarea,.rcb-chat-window{touch-action:pan-y!important}.embedded-qa-bot,.rcb-chat-window{-webkit-overflow-scrolling:touch!important}.embedded-qa-bot .rcb-chat-input-textarea{touch-action:pan-y!important;user-select:text!important}.embedded-qa-bot .rcb-chat-body-container,.embedded-qa-bot .rcb-chat-window{touch-action:pan-y!important}.rcb-chat-header-container{background:var(--primaryColor,#1a5b6e)!important;background:linear-gradient(135deg,var(--primaryColor,#1a5b6e) 0,var(--secondaryColor,#107180) 100%)!important}.rcb-toggle-button{align-items:center!important;background:var(--primaryColor,#1a5b6e)!important;display:flex!important;justify-content:center!important}.rcb-toggle-button svg{stroke:#fff!important;color:#fff!important}.rcb-toggle-button *,.rcb-toggle-button img,.rcb-toggle-button svg,.rcb-toggle-button>*{box-sizing:border-box!important;height:50px!important;left:0!important;margin:0 auto!important;max-height:50px!important;max-width:50px!important;min-height:50px!important;min-width:50px!important;padding:2px!important;position:relative!important;top:0!important;width:50px!important}.rcb-send-button{background-color:var(--primaryColor,#1a5b6e)!important}',{insertAt:"top"});const Vl=()=>{const[e,t]=h.useState(!1),r=()=>typeof navigator<"u"&&navigator.mediaDevices!==void 0&&typeof navigator.mediaDevices.getDisplayMedia=="function";return{captureScreenshot:async()=>{if(!r())throw new Error("Screen capture is not available in this environment");try{t(!0);const n=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser",cursor:"always",width:{ideal:1920},height:{ideal:1080}},audio:!1}),o=document.createElement("video");o.srcObject=n,await new Promise(l=>{o.onloadedmetadata=()=>{o.play(),l()}});const a=document.createElement("canvas");a.width=o.videoWidth,a.height=o.videoHeight;const A=a.getContext("2d");if(!A)throw new Error("Could not get canvas context");A.drawImage(o,0,0,a.width,a.height);const s=await new Promise(l=>a.toBlob(l,"image/png"));if(!s)throw new Error("Could not create image blob");const i=new Date().toISOString().replace(/[:.]/g,"-"),c=new File([s],"screenshot-".concat(i,".png"),{type:"image/png"});return n.getTracks().forEach(l=>l.stop()),t(!1),c}catch(n){throw lt("Error capturing screenshot:",n),t(!1),n}},isCapturing:e,isScreenCaptureAvailable:r()}},Xl=e=>h.createElement(Ma,e,h.createElement("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),h.createElement("polyline",{points:"17 8 12 3 7 8"}),h.createElement("line",{x1:"12",y1:"3",x2:"12",y2:"15"})),Kl=e=>new Promise((t,r)=>{const n=new FileReader;n.onload=()=>{if(typeof n.result!="string")return void r(new Error("Failed to read file ".concat(e.name)));const o=n.result.split(",")[1];t({fileName:e.name,contentType:e.type,size:e.size,fileData:o})},n.onerror=()=>r(new Error("Failed to read file ".concat(e.name))),n.readAsDataURL(e)}),Jl=e=>Promise.all(e.map(Kl)),Zl=e=>e<1024?"".concat(e," B"):e<1048576?"".concat((e/1024).toFixed(1)," KB"):"".concat((e/1048576).toFixed(1)," MB"),An=e=>{let{onFileUpload:t,maxSizeMB:r=10,acceptedTypes:n="image/*,application/pdf,text/*,.doc,.docx",enableScreenshot:o=!1,className:a}=e;const[A,s]=h.useState(!1),[i,c]=h.useState([]),[l,d]=h.useState(null),u=h.useRef(null),{captureScreenshot:p,isCapturing:f,isScreenCaptureAvailable:y}=Vl(),g=C=>{const S=document.createElement("div");S.setAttribute("aria-live","assertive"),S.setAttribute("aria-atomic","true"),S.className="sr-only",S.textContent=C,document.body.appendChild(S),setTimeout(()=>document.body.removeChild(S),1e3)},v=C=>{if(!C||C.length===0)return void Il("FileUploadComponent: No valid files provided to handleFiles");let S;try{S=Array.from(C)}catch(O){return lt("FileUploadComponent: Error converting files to array:",O),void g("Error processing selected files. Please try again.")}const I=[...i,...S];c(I);const Q=S.length,B=S.map(O=>O.name).join(", ");g("".concat(Q," file").concat(Q>1?"s":""," selected: ").concat(B)),setTimeout(()=>{const O=document.querySelector(".rcb-chat-content");O&&(O.scrollTop=O.scrollHeight)},100),t&&t(I)},x=C=>{C.preventDefault(),C.stopPropagation(),C.type==="dragenter"||C.type==="dragover"?s(!0):C.type==="dragleave"&&s(!1)},m=()=>{try{u.current&&u.current.click()}catch(C){lt("FileUploadComponent: Error in handleButtonClick:",C),g("Error opening file selection dialog. Please try again.")}},E=()=>{d(null)},P=o&&y;return h.createElement("div",{className:"file-upload-container ".concat(a||""),style:{padding:"16px",margin:"8px 0"}},P&&h.createElement("div",{style:{display:"flex",justifyContent:"center",marginBottom:"10px"}},h.createElement("button",{onClick:C=>{C.preventDefault(),(async()=>{try{const S=await p();v([S]),g("Screenshot captured successfully")}catch{g("Error capturing screenshot. Please try again.")}})()},disabled:f,"aria-describedby":"screenshot-help","aria-label":f?"Taking screenshot, please wait":"Take a screenshot to attach",style:{display:"flex",alignItems:"center",gap:"8px",backgroundColor:"#107180",color:"white",border:"none",borderRadius:"5px",padding:"8px 12px",cursor:f?"not-allowed":"pointer",fontSize:"14px",fontWeight:"500",boxShadow:"0 1px 3px rgba(0,0,0,0.2)"}},h.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},h.createElement("path",{d:"M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"}),h.createElement("circle",{cx:"12",cy:"13",r:"4"})),f?"Taking screenshot...":"Take screenshot..."),h.createElement("span",{id:"screenshot-help",className:"sr-only"},"Captures the current screen and adds it as an attachment")),h.createElement("div",{className:"file-upload-dropzone ".concat(A?"active":""),onDragEnter:x,onDragLeave:x,onDragOver:x,onDrop:C=>{var S;C.preventDefault(),C.stopPropagation(),s(!1);try{!((S=C.dataTransfer)===null||S===void 0)&&S.files&&C.dataTransfer.files.length>0&&v(C.dataTransfer.files)}catch(I){lt("FileUploadComponent: Error in handleDrop:",I),g("Error processing dropped files. Please try again.")}},role:"button",tabIndex:0,"aria-label":"File upload area. Click to select files or drag and drop files here.","aria-describedby":"upload-instructions",onKeyDown:C=>{C.key!=="Enter"&&C.key!==" "||(C.preventDefault(),m())},style:{padding:"20px",border:"2px dashed #ccc",borderRadius:"8px",backgroundColor:A?"#f0f8ff":"#fafafa",transition:"all 0.3s ease"}},h.createElement("input",{ref:u,type:"file",className:"file-input",onChange:C=>{var S;try{!((S=C.target)===null||S===void 0)&&S.files&&C.target.files.length>0&&v(C.target.files)}catch(I){lt("FileUploadComponent: Error in handleFileSelect:",I),g("Error processing selected files. Please try again.")}},multiple:!0,style:{display:"none"},"aria-label":"Select files to upload",accept:n}),h.createElement("div",{className:"upload-content",onClick:m,style:{cursor:"pointer",flexDirection:"column",alignItems:"center",display:"flex",textAlign:"center",padding:"12px"}},h.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"}},h.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"10px"}},h.createElement(Xl,null),h.createElement("p",{style:{margin:0,fontWeight:"bold"}},"Upload Files")),h.createElement("p",{id:"upload-instructions",style:{margin:0,fontSize:"14px",color:"#666"}},"Drag and drop files here or click to select. (Max ",r,"MB each)")),i.length>0&&h.createElement("div",{className:"selected-files",style:{display:"flex",flexWrap:"wrap",gap:"8px",marginTop:"12px",alignItems:"center"}},h.createElement("span",{style:{fontWeight:400,color:"#888",fontSize:"13px",marginRight:"8px",alignSelf:"center"}},"Selected files:"),i.map((C,S)=>h.createElement("span",{key:S,style:{background:"#fff",color:"#107180",borderRadius:"5px",padding:"4px 12px",fontSize:"14px",marginRight:"4px",marginBottom:"4px",border:"1px solid #ccc",display:"flex",alignItems:"center",gap:"6px",cursor:"pointer"},onClick:I=>{I.stopPropagation(),(Q=>{d(Q)})(C)}},h.createElement("span",{onClick:I=>{I.stopPropagation(),(Q=>{const B=i.filter((O,D)=>D!==Q);c(B),t&&t(B)})(S)},style:{cursor:"pointer",color:"#888",fontWeight:"bold",fontSize:"15px",marginRight:"4px",userSelect:"none",lineHeight:1},title:"Remove file","aria-label":"Remove ".concat(C.name)},"×"),C.name," (",Zl(C.size),")"))))),(()=>{if(!l)return null;const C=l.type.startsWith("image/"),S=l.type.startsWith("text/"),I=l.type==="application/pdf";return h.createElement("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.7)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1e3},onClick:E},h.createElement("div",{style:{backgroundColor:"white",padding:"20px",borderRadius:"8px",maxWidth:"90%",maxHeight:"90%",overflow:"auto",position:"relative"},onClick:Q=>Q.stopPropagation()},h.createElement("button",{onClick:E,style:{position:"absolute",top:"10px",right:"10px",background:"none",border:"none",fontSize:"24px",cursor:"pointer",color:"#666"}},"×"),h.createElement("h3",{style:{marginTop:0,marginBottom:"16px"}},l.name),C&&h.createElement("img",{src:URL.createObjectURL(l),alt:l.name,style:{maxWidth:"100%",maxHeight:"70vh"}}),S&&h.createElement("pre",{style:{whiteSpace:"pre-wrap",wordWrap:"break-word",maxHeight:"70vh",overflow:"auto",padding:"16px",backgroundColor:"#f5f5f5",borderRadius:"4px"}},URL.createObjectURL(l)),I&&h.createElement("iframe",{src:URL.createObjectURL(l),style:{width:"100%",height:"70vh",border:"none"},title:l.name}),!C&&!S&&!I&&h.createElement("div",{style:{padding:"20px",textAlign:"center"}},"Preview not available for this file type")))})())};function $l(e,t){if(!t||Object.keys(t).length===0)return e;const r={};for(const[n,o]of Object.entries(e)){let a=Object.assign({},o);if(a.chatDisabled===void 0){const A=!(!a.options&&!a.checkboxes);a.chatDisabled=A}r[n]=a}return r}function ln(e){return async t=>{const r=await e(t);await t.injectMessage(r)}}const ec=h.forwardRef((e,t)=>{const[r,n]=h.useState(e.defaultOpen||!1),o=h.useRef(null);return h.useImperativeHandle(t,()=>({addMessage:a=>{var A;(A=o.current)===null||A===void 0||A.addMessage(a)},setBotEnabled:a=>{var A;(A=o.current)===null||A===void 0||A.setBotEnabled(a)},openChat:()=>{var a;n(!0),(a=o.current)===null||a===void 0||a.openChat()},closeChat:()=>{var a;n(!1),(a=o.current)===null||a===void 0||a.closeChat()},toggleChat:()=>{var a;n(A=>!A),(a=o.current)===null||a===void 0||a.toggleChat()}}),[]),h.createElement(ur,{ref:o,apiKey:e.apiKey,qaEndpoint:e.qaEndpoint,ratingEndpoint:e.ratingEndpoint,welcomeMessage:e.welcomeMessage,primaryColor:e.primaryColor,secondaryColor:e.secondaryColor,botName:e.botName,logo:e.logo,placeholder:e.placeholder,errorMessage:e.errorMessage,embedded:e.embedded,isLoggedIn:e.isLoggedIn,allowAnonAccess:e.allowAnonAccess,open:r,onOpenChange:n,footerText:e.footerText,footerLink:e.footerLink,tooltipText:e.tooltipText,onAnalyticsEvent:e.onAnalyticsEvent})});ec.displayName="ProgrammaticQABot";const rt={QA_ENDPOINT:"https://access-ai-grace1-external.ccs.uky.edu/access/chat/api/",RATING_ENDPOINT:"https://access-ai-grace1-external.ccs.uky.edu/access/chat/rating/",METRICS_API_ENDPOINT:"https://access-ai-grace1-external.ccs.uky.edu/access/xdmod/chat/api/",METRICS_RATING_ENDPOINT:"https://access-ai-grace1-external.ccs.uky.edu/access/xdmod/chat/rating/",METRICS_QUESTIONS_URL:"https://metrics.access-ci.org/qa_bot_faq",NETLIFY_BASE_URL:"https://access-jsm-api.netlify.app",DEFAULT_API_KEY:"demo-key"},Ke={BOT_NAME:"ACCESS Q&A",LOGO:"https://support.access-ci.org/themes/contrib/asp-theme/images/icons/ACCESS-arrrow.svg",WELCOME_MESSAGE:"Hello! What can I help you with?",WELCOME_MESSAGE_LOGGED_OUT:"To ask questions, please log in.",LOGIN_URL:"/login",PRIMARY_COLOR:"#1a5b6e",SECONDARY_COLOR:"#107180",TOOLTIP:"Ask me about ACCESS! 😊"},La={SESSION_ID:"access-qa-bot-session-id"};function tc({welcome:e,setTicketForm:t,isLoggedIn:r,trackEvent:n}){return{start:{message:e,options:["Ask a question about ACCESS","Open a Help Ticket","Usage and performance of ACCESS resources (XDMoD)","Report a security issue"],path:o=>(n({type:"chatbot_menu_selected",selection:o.userInput}),o.userInput==="Ask a question about ACCESS"?r?"go_ahead_and_ask":"qa_loop":o.userInput==="Open a Help Ticket"?(t({}),"help_ticket"):o.userInput==="Usage and performance of ACCESS resources (XDMoD)"?"metrics_intro":o.userInput==="Report a security issue"?(t({}),n({type:"chatbot_security_started"}),"security_incident"):"start")},go_ahead_and_ask:{message:`Go ahead and ask your question! I'll do my best to help.
|
|
43
43
|
|
|
44
|
-
<em>This assistant is powered by AI. Responses may not always be accurate. Do not share passwords or secrets.</em> <a href="https://support.access-ci.org/tools/access-qa-tool/privacy">Privacy Notice</a>`,renderHtml:["BOT"],path:"qa_loop"}}}let dr=null;function
|
|
45
|
-
Attachments: ${e.length} file(s) attached`:""}const wt={SUPPORT:17,LOGIN_ACCESS:30,LOGIN_PROVIDER:31,SECURITY:26};async function
|
|
44
|
+
<em>This assistant is powered by AI. Responses may not always be accurate. Do not share passwords or secrets.</em> <a href="https://support.access-ci.org/tools/access-qa-tool/privacy">Privacy Notice</a>`,renderHtml:["BOT"],path:"qa_loop"}}}let dr=null;function nc(e){dr=e}function W(){return dr?dr.ticketForm||{}:(console.warn("Form context not available, returning empty form"),{})}function ye(e={}){const t=W();return{...t,email:e.email||t.email,name:e.name||t.name,accessId:e.accessId||t.accessId}}function pr(e){return e&&e.length>0?`
|
|
45
|
+
Attachments: ${e.length} file(s) attached`:""}const wt={SUPPORT:17,LOGIN_ACCESS:30,LOGIN_PROVIDER:31,SECURITY:26};async function rc(e,t="support",r=[]){const o={support:wt.SUPPORT,general_help:wt.SUPPORT,loginAccess:wt.LOGIN_ACCESS,loginProvider:wt.LOGIN_PROVIDER,security:wt.SECURITY}[t]||wt.SUPPORT,A={serviceDeskId:t==="security"?3:2,requestTypeId:o,requestFieldValues:{...e}};return r.length>0&&(A.attachments=await Jl(r)),A}async function oc(e,t){var o,a;const n=`${rt.NETLIFY_BASE_URL}/api/v1/${t}`;try{const A=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!A.ok){let i="";try{const c=await A.text();try{const l=JSON.parse(c);i=l.message||l.error||c}catch{i=c}}catch{i=`HTTP ${A.status} ${A.statusText}`}return A.status===403?i="The ticket service is temporarily unavailable. Please try again later or contact support directly.":A.status===404?i="Ticket service not found. Please try again later.":A.status===500?i="Server error. Please try again later.":A.status===401&&(i="Authentication error with the ticket service. Please contact support."),{success:!1,status:A.status,error:i}}const s=await A.json();return{success:!0,ticketKey:(o=s.data)==null?void 0:o.ticketKey,ticketUrl:(a=s.data)==null?void 0:a.ticketUrl}}catch(A){return{success:!1,error:A instanceof Error?A.message:"Unknown error"}}}async function cn(e,t,r=[]){try{const n=await rc(e,t,r);return await oc(n,t==="security"?"security-incidents":"tickets")}catch(n){return{success:!1,error:n instanceof Error?n.message:"Unknown error"}}}function fr(e,t="ticket"){return e?e.success?e.ticketUrl&&e.ticketKey?`Your ${t} has been submitted successfully.
|
|
46
46
|
|
|
47
47
|
Ticket: <a href="${e.ticketUrl}" target="_blank">${e.ticketKey}</a>
|
|
48
48
|
|
|
@@ -52,13 +52,13 @@ Our support team will review your request and respond accordingly. Thank you for
|
|
|
52
52
|
|
|
53
53
|
Please try again or contact our support team directly.`:`We apologize, but there was an error submitting your ${t}.
|
|
54
54
|
|
|
55
|
-
Please try again or contact our support team directly.`}function un(e){return!e||e.trim()===""?{success:!1,promptContent:"Email is required",promptDuration:3e3,promptType:"error"}:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)?{success:!0}:{success:!1,promptContent:"Please enter a valid email address",promptDuration:3e3,promptType:"error"}}function _t(){return()=>({success:!0})}function Lt(e){return!e||e.trim()===""||e.trim().toLowerCase()==="skip"?"":e.trim()}function
|
|
55
|
+
Please try again or contact our support team directly.`}function un(e){return!e||e.trim()===""?{success:!1,promptContent:"Email is required",promptDuration:3e3,promptType:"error"}:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)?{success:!0}:{success:!1,promptContent:"Please enter a valid email address",promptDuration:3e3,promptType:"error"}}function _t(){return()=>({success:!0})}function Lt(e){return!e||e.trim()===""||e.trim().toLowerCase()==="skip"?"":e.trim()}function ac({ticketForm:e,setTicketForm:t,userInfo:r,trackEvent:n}){let o=null;const a=async(s,i=[])=>{o=await cn(s,"loginAccess",i),o.success?(t(c=>({...c,ticketKey:o.ticketKey,ticketUrl:o.ticketUrl})),n({type:"chatbot_ticket_submitted",ticketType:"access_login",success:!0,ticketKey:o.ticketKey})):(t(c=>({...c,submissionError:o.error})),n({type:"chatbot_ticket_error",ticketType:"access_login",errorType:o.error||"unknown"}))};return{access_help:{message:`If you're having trouble logging into the ACCESS website, here are some common issues:
|
|
56
56
|
|
|
57
57
|
• Make sure you're using a supported browser (Chrome, Firefox, Safari)
|
|
58
58
|
• Clear your browser cookies and cache
|
|
59
59
|
• Check if you're using the correct identity provider
|
|
60
60
|
|
|
61
|
-
Would you like to submit a help ticket for ACCESS login issues?`,options:["Yes, let's create a ticket","Back to Main Menu"],path:
|
|
61
|
+
Would you like to submit a help ticket for ACCESS login issues?`,options:["Yes, let's create a ticket","Back to Main Menu"],path:s=>s.userInput==="Yes, let's create a ticket"?"access_login_description":"start"},access_login_description:{message:"Describe your login issue.",function:s=>{const i=W();t({...i,description:s.userInput,email:r.email||i.email,name:r.name||i.name,accessId:r.accessId||i.accessId}),n({type:"chatbot_ticket_step",ticketType:"access_login",step:"description"})},path:"access_login_identity"},access_login_identity:{message:"Which identity provider were you using?",options:["ACCESS","Github","Google","Institution","Microsoft","ORCID","Other"],function:s=>{const i=W();t({...i,identityProvider:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"access_login",step:"identity_provider"})},path:"access_login_browser"},access_login_browser:{message:"Which browser were you using?",options:["Chrome","Firefox","Edge","Safari","Other"],function:s=>{const i=W();t({...i,browser:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"access_login",step:"browser"})},path:"access_login_attachment"},access_login_attachment:{message:"Would you like to attach a screenshot?",options:["Yes","No"],function:s=>{const i=W();t({...i,wantsAttachment:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"access_login",step:"attachment_choice"})},path:s=>{if(s.userInput==="Yes")return"access_login_upload";const i=ye(r);return i.email?i.name?i.accessId?"access_login_summary":"access_login_accessid":"access_login_name":"access_login_email"}},access_login_upload:{message:"Please upload your screenshot.",component:k.jsx(An,{onFileUpload:s=>{t(i=>({...i,uploadedFiles:s})),s.forEach(i=>{n({type:"chatbot_file_uploaded",fileType:i.type||"unknown",fileSize:i.size})})},enableScreenshot:!0,maxSizeMB:10}),options:["Continue"],function:()=>{const s=W();t({...s,uploadConfirmed:!0}),n({type:"chatbot_ticket_step",ticketType:"access_login",step:"file_upload"})},path:()=>{const s=ye(r);return s.email?s.name?s.accessId?"access_login_summary":"access_login_accessid":"access_login_name":"access_login_email"}},access_login_email:{message:"What is your email?",validateTextInput:un,function:s=>{const i=W();t({...i,email:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"access_login",step:"email"})},path:()=>{const s=ye(r);return s.name?s.accessId?"access_login_summary":"access_login_accessid":"access_login_name"}},access_login_name:{message:"What is your name?",function:s=>{const i=W();t({...i,name:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"access_login",step:"name"})},path:()=>ye(r).accessId?"access_login_summary":"access_login_accessid"},access_login_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:_t(),function:s=>{const i=W();t({...i,accessId:Lt(s.userInput)}),n({type:"chatbot_ticket_step",ticketType:"access_login",step:"access_id"})},path:"access_login_summary"},access_login_summary:{message:s=>{const i=W(),c=ye(r),l=pr(i.uploadedFiles);let d=c.accessId;return s.prevPath==="access_login_accessid"&&s.userInput&&(d=s.userInput),`Thank you for providing your ACCESS login issue details. Here's a summary:
|
|
62
62
|
|
|
63
63
|
Name: ${c.name||"Not provided"}
|
|
64
64
|
Email: ${c.email||"Not provided"}
|
|
@@ -67,13 +67,13 @@ Identity Provider: ${i.identityProvider||"Not provided"}
|
|
|
67
67
|
Browser: ${i.browser||"Not provided"}
|
|
68
68
|
Issue Description: ${i.description||"Not provided"}${l}
|
|
69
69
|
|
|
70
|
-
Would you like to submit this ticket?`},options:["Submit Ticket","Back to Main Menu"],renderHtml:["BOT","USER"],function:async
|
|
70
|
+
Would you like to submit this ticket?`},options:["Submit Ticket","Back to Main Menu"],renderHtml:["BOT","USER"],function:async s=>{if(s.userInput==="Submit Ticket"){const i=W(),c=ye(r),l={email:c.email||"",name:c.name||"",accessId:c.accessId||"",description:i.description||"",identityProvider:i.identityProvider||"",browser:i.browser||""};await a(l,i.uploadedFiles||[])}},path:s=>s.userInput==="Submit Ticket"?"access_login_success":"start"},access_login_success:{message:ln(()=>fr(o,"ACCESS login ticket")),options:["Back to Main Menu"],renderHtml:["BOT"],path:"start"}}}function ic({ticketForm:e,setTicketForm:t,userInfo:r,trackEvent:n}){let o=null;const a=async(s,i=[])=>{o=await cn(s,"loginProvider",i),o.success?(t(c=>({...c,ticketKey:o.ticketKey,ticketUrl:o.ticketUrl})),n({type:"chatbot_ticket_submitted",ticketType:"resource_login",success:!0,ticketKey:o.ticketKey})):(t(c=>({...c,submissionError:o.error})),n({type:"chatbot_ticket_error",ticketType:"resource_login",errorType:o.error||"unknown"}))};return{resource_help:{message:`If you're having trouble logging into an affiliated infrastructure or resource provider, here are some common issues:
|
|
71
71
|
|
|
72
72
|
• Ensure your allocation is active
|
|
73
73
|
• Confirm you have the correct username for that resource
|
|
74
74
|
• Check <a href="https://operations.access-ci.org/infrastructure_news_view">System Status News</a> to see if the resource is undergoing maintenance
|
|
75
75
|
|
|
76
|
-
Would you like to submit a help ticket for resource provider login issues?`,options:["Yes, let's create a ticket","Back to Main Menu"],renderHtml:["BOT"],path:
|
|
76
|
+
Would you like to submit a help ticket for resource provider login issues?`,options:["Yes, let's create a ticket","Back to Main Menu"],renderHtml:["BOT"],path:s=>s.userInput==="Yes, let's create a ticket"?"resource_login_resource":"start"},resource_login_resource:{message:"Which ACCESS Resource are you trying to access?",options:["ACES","Anvil","Bridges-2","DARWIN","Delta","DeltaAI","Derecho","Expanse","FASTER","Granite","Jetstream2","KyRIC","Launch","Neocortex","Ookami","Open Science Grid","Open Storage Network","Ranch","Stampede3"],function:s=>{const i=W();t({...i,resource:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"resource_login",step:"resource_selection"})},path:"resource_login_userid"},resource_login_userid:{message:"What is your user ID at the resource?",function:s=>{const i=W();t({...i,userIdResource:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"resource_login",step:"user_id"})},path:"resource_login_description"},resource_login_description:{message:"Please describe the issue you're having logging in.",function:s=>{const i=W();t({...i,description:s.userInput,email:r.email||i.email,name:r.name||i.name,accessId:r.accessId||i.accessId}),n({type:"chatbot_ticket_step",ticketType:"resource_login",step:"description"})},path:"resource_login_attachment"},resource_login_attachment:{message:"Would you like to attach a screenshot?",options:["Yes","No"],function:s=>{const i=W();t({...i,wantsAttachment:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"resource_login",step:"attachment_choice"})},path:s=>{if(s.userInput==="Yes")return"resource_login_upload";const i=ye(r);return i.email?i.name?i.accessId?"resource_login_summary":"resource_login_accessid":"resource_login_name":"resource_login_email"}},resource_login_upload:{message:"Please upload your screenshot.",component:k.jsx(An,{onFileUpload:s=>{t(i=>({...i,uploadedFiles:s})),s.forEach(i=>{n({type:"chatbot_file_uploaded",fileType:i.type||"unknown",fileSize:i.size})})},enableScreenshot:!0,maxSizeMB:10}),options:["Continue"],function:()=>{const s=W();t({...s,uploadConfirmed:!0}),n({type:"chatbot_ticket_step",ticketType:"resource_login",step:"file_upload"})},path:()=>{const s=ye(r);return s.email?s.name?s.accessId?"resource_login_summary":"resource_login_accessid":"resource_login_name":"resource_login_email"}},resource_login_email:{message:"What is your email?",validateTextInput:un,function:s=>{const i=W();t({...i,email:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"resource_login",step:"email"})},path:()=>{const s=ye(r);return s.name?s.accessId?"resource_login_summary":"resource_login_accessid":"resource_login_name"}},resource_login_name:{message:"What is your name?",function:s=>{const i=W();t({...i,name:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"resource_login",step:"name"})},path:()=>ye(r).accessId?"resource_login_summary":"resource_login_accessid"},resource_login_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:_t(),function:s=>{const i=W();t({...i,accessId:Lt(s.userInput)}),n({type:"chatbot_ticket_step",ticketType:"resource_login",step:"access_id"})},path:"resource_login_summary"},resource_login_summary:{message:s=>{const i=W(),c=ye(r),l=pr(i.uploadedFiles);let d=c.accessId;return s.prevPath==="resource_login_accessid"&&s.userInput&&(d=s.userInput),`Thank you for providing your resource login issue details. Here's a summary:
|
|
77
77
|
|
|
78
78
|
Name: ${c.name||"Not provided"}
|
|
79
79
|
Email: ${c.email||"Not provided"}
|
|
@@ -82,7 +82,7 @@ Resource: ${i.resource||"Not provided"}
|
|
|
82
82
|
Resource User ID: ${i.userIdResource||"Not provided"}
|
|
83
83
|
Issue Description: ${i.description||"Not provided"}${l}
|
|
84
84
|
|
|
85
|
-
Would you like to submit this ticket?`},options:["Submit Ticket","Back to Main Menu"],function:async A=>{if(A.userInput==="Submit Ticket"){const i=W(),c=ye(r),l={email:c.email||"",name:c.name||"",accessId:c.accessId||"",accessResource:i.resource||"",description:i.description||"",userIdAtResource:i.userIdResource||""};await a(l,i.uploadedFiles||[])}},path:A=>A.userInput==="Submit Ticket"?"resource_login_success":"start"},resource_login_success:{message:ln(()=>fr(o,"resource login ticket")),options:["Back to Main Menu"],renderHtml:["BOT"],path:"start"}}}const ic=[" C, C++","Abaqus","ACCESS","ACCESS-credits","ACCESS-website","Accounts","ACLS","Adding users","Affiliations","Affinity Groups","AI","Algorithms","Allocation extension","Allocation Management","Allocation proposal","Allocation Time","Allocation users","AMBER","AMIE","Anaconda","Analysis","API","Application Status","ARCGIS","Architecture","Archiving","Astrophysics","ATLAS","Authentication","AWS","AZURE","Backup","BASH","Batch Jobs","Benchmarking","Big Data","Bioinformatics","Biology","Ceph","CFD","cgroups","CHARMM","Checkpoint","cilogon","citation","Cloud","Cloud Computing","Cloud Lab","Cloud Storage","Cluster Management","Cluster Support","CMMC","Community Outreach","Compiling","Composible Systems","Computataional Chemistry","COMSOL","Conda","Condo","Containers","Core dump","Core hours","CP2K","CPU architecture","CPU bound","CUDA","Cybersecurity","CYVERSE","Data","Data Storage","Data-access-protocols","Data-analysis","Data-compliance","Data-lifecycle","Data-management","Data-management-software","Data-provenance","Data-reproducibility","Data-retention","Data-science","Data-sharing","Data-transfer","Data-wrangling","Database-update","Debugging","Debugging, Optimizatio and Profiling","Deep-learning","Dependencies","Deployment","DFT","Distributed-computing","DNS","Docker","Documentation","DOI","DTN","Easybuild","Email","Encryption","Environment-modules","Errors","Extension","FastX","Federated-authentication","File transfers","File-formats","File-limits","File-systems","File-transfer","Finite-element-analysis","Firewall","Fortran","Frameworks and IDE's","GAMESS","Gateways","GATK","Gaussian","GCC","Genomics","GIS","Git","Globus","GPFS","GPU","Gravitational-waves","Gridengine","GROMACS","Hadoop","Hardware","Image-processing","Infiniband","Interactive-mode","Interconnect","IO-Issue","ISILON","Java","Jekyll","Jetstream","Job-accounting","Job-array","Job-charging","Job-failure","Job-sizing","Job-submission","Julia","Jupyterhub","Key-management","Kubernetes","KyRIC","LAMMPS","Library-paths","License","Linear-programming","Linux","LMOD","login","LSF","Lustre","Machine-learning","Management","Materials-science","Mathematica","MATLAB","Memory","Metadata","Modules","Molecular-dynamics","Monte-carlo","MPI","NAMD","NetCDF","Networking","Neural-networks","NFS","NLP","NoMachine","Nvidia","Oceanography","OnDemnad","Open-science-grid","Open-storage-network","OpenCV","Openfoam","OpenMP","OpenMPI","OpenSHIFT","Openstack","Optimization","OS","OSG","Parallelization","Parameter-sweeps","Paraview","Particle-physics","password","PBS","Pegasus","Pending-jobs","Performance-tuning","Permissions","Physiology","PIP","PODMAN","Portals","Pre-emption","Professional and Workforce Development","Professional-development","Profile","Profiling","Programming","Programming Languages","Programming-best-practices","Project-management","Project-renewal","Provisioning","Pthreads","Publication-database","Putty","Python","Pytorch","Quantum-computing","Quantum-mechanics","Quota","R","RDP","React","Reporting","Research-facilitation","Research-grants","Resources","Rstudio-server","S3","Samba","SAS","Scaling","Schedulers","Scheduling","Science DMZ","Science Gateways","Scikit-learn","Scratch","screen","scripting","SDN","Secure Computing and Data","Secure-data-architecture","Serverless-hpc","setup","sftp","SGE","Shell Scripting","Shifter","Singularity","SLURM","SMB","Smrtanalysis","Software Installations","Software-carpentry","SPACK","SPARK","Spectrum-scale","SPSS","SQL","SSH","Stampede2","STATA","Storage","Supplement","Support","TCP","Technical-training-for-hpc","Tensorflow","Terminal-emulation-and-window-management","Tickets","Timing-issue","TMUX","Tools","Training","Transfer SUs","Trinity","Tuning","Unix-environment","Upgrading","Vectorization","Version-control","vim","VNC","VPN","Workflow","Workforce-development","X11","Xalt","XDMoD","XML","XSEDE","I don't see a relevant keyword"],Ac=["ACES","Anvil","Bridges-2","DARWIN","Delta","DeltaAI","Derecho","Expanse","FASTER","Granite","Jetstream2","KyRIC","Launch","Neocortex","Ookami","Open Science Grid","Open Storage Network","Ranch","Stampede3"];function sc({ticketForm:e,setTicketForm:t,userInfo:r,trackEvent:n}){let o=null;const a=async(A,i=[])=>{o=await cn(A,"support",i),o.success?(t(c=>({...c,ticketKey:o.ticketKey,ticketUrl:o.ticketUrl})),n({type:"chatbot_ticket_submitted",ticketType:"general_help",success:!0,ticketKey:o.ticketKey})):(t(c=>({...c,submissionError:o.error})),n({type:"chatbot_ticket_error",ticketType:"general_help",errorType:o.error||"unknown"}))};return{general_help_summary_subject:{message:"Provide a short title for your ticket.",function:A=>{const i=W();t({...i,summary:A.userInput,email:r.email||i.email,name:r.name||i.name,accessId:r.accessId||i.accessId}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"title"})},path:"general_help_category"},general_help_category:{message:"What type of issue are you experiencing?",options:["User Account Question","Allocation Question","User Support Question","CSSN/CCEP Question","Training Question","Metrics Question","OnDemand Question","Pegasus Question","XDMoD Question","Some Other Question"],function:A=>{const i=W();t({...i,category:A.userInput}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"category"})},path:"general_help_description"},general_help_description:{message:"Please describe your issue.",function:A=>{const i=W();t({...i,description:A.userInput}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"description"})},path:"general_help_attachment"},general_help_attachment:{message:"Would you like to attach a file to your ticket?",options:["Yes","No"],function:A=>{const i=W();t({...i,wantsAttachment:A.userInput}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"attachment_choice"})},path:A=>A.userInput==="Yes"?"general_help_upload":"general_help_resource"},general_help_upload:{message:"Please upload your file.",component:k.jsx(sn,{onFileUpload:A=>{t(i=>({...i,uploadedFiles:A})),A.forEach(i=>{n({type:"chatbot_file_uploaded",fileType:i.type||"unknown",fileSize:i.size})})},enableScreenshot:!0,maxSizeMB:10}),options:["Continue"],function:()=>{const A=W();t({...A,uploadConfirmed:!0}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"file_upload"})},path:"general_help_resource"},general_help_resource:{message:"Does your problem involve an ACCESS Resource?",options:["Yes","No"],function:A=>{const i=W();t({...i,involvesResource:A.userInput.toLowerCase()}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"resource_choice"})},path:A=>A.userInput==="Yes"?"general_help_resource_details":"general_help_keywords"},general_help_resource_details:{message:"Please select the ACCESS Resource involved with your issue:",options:Ac,function:A=>{const i=W();t({...i,resourceDetails:A.userInput}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"resource_selection"})},path:"general_help_user_id_at_resource"},general_help_user_id_at_resource:{message:"What is your User ID at the selected resource(s)? (Optional - press Enter to skip)",validateTextInput:_t(),function:A=>{const i=W();t({...i,userIdAtResource:Lt(A.userInput)}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"resource_user_id"})},path:"general_help_keywords"},general_help_keywords:{message:"Please add up to 5 keywords to help route your ticket.",checkboxes:{items:ic,min:0,max:5},function:A=>{const i=W();t({...i,keywords:A.userInput}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"keywords"})},path:A=>A.userInput&&A.userInput.includes("I don't see a relevant keyword")?"general_help_additional_keywords":"general_help_priority"},general_help_additional_keywords:{message:"Please enter additional keywords, separated by commas:",function:A=>{const i=W(),c=i.keywords||[],l=A.userInput,u=(Array.isArray(c)?[...c]:String(c).split(",").map(f=>f.trim())).filter(f=>f!=="I don't see a relevant keyword"),p=u.length>0?[...u,l].join(", "):l;t({...i,keywords:p,suggestedKeyword:l}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"additional_keywords"})},path:"general_help_priority"},general_help_priority:{message:"Please select a priority for your issue:",options:["Lowest","Low","Medium","High","Highest"],function:A=>{const i=W();t({...i,priority:A.userInput.toLowerCase()}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"priority"})},path:()=>{const A=ye(r);return A.email?A.name?A.accessId?"general_help_ticket_summary":"general_help_accessid":"general_help_name":"general_help_email"}},general_help_email:{message:"What is your email address?",validateTextInput:un,function:A=>{const i=W();t({...i,email:A.userInput}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"email"})},path:()=>{const A=ye(r);return A.name?A.accessId?"general_help_ticket_summary":"general_help_accessid":"general_help_name"}},general_help_name:{message:"What is your name?",function:A=>{const i=W();t({...i,name:A.userInput}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"name"})},path:()=>ye(r).accessId?"general_help_ticket_summary":"general_help_accessid"},general_help_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:_t(),function:A=>{const i=W();t({...i,accessId:Lt(A.userInput)}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"access_id"})},path:"general_help_ticket_summary"},general_help_ticket_summary:{message:A=>{const i=W(),c=ye(r),l=pr(i.uploadedFiles);let d=c.accessId;A.prevPath==="general_help_accessid"&&A.userInput&&(d=A.userInput);let u="";return i.involvesResource==="yes"&&(u=`
|
|
85
|
+
Would you like to submit this ticket?`},options:["Submit Ticket","Back to Main Menu"],function:async s=>{if(s.userInput==="Submit Ticket"){const i=W(),c=ye(r),l={email:c.email||"",name:c.name||"",accessId:c.accessId||"",accessResource:i.resource||"",description:i.description||"",userIdAtResource:i.userIdResource||""};await a(l,i.uploadedFiles||[])}},path:s=>s.userInput==="Submit Ticket"?"resource_login_success":"start"},resource_login_success:{message:ln(()=>fr(o,"resource login ticket")),options:["Back to Main Menu"],renderHtml:["BOT"],path:"start"}}}const sc=[" C, C++","Abaqus","ACCESS","ACCESS-credits","ACCESS-website","Accounts","ACLS","Adding users","Affiliations","Affinity Groups","AI","Algorithms","Allocation extension","Allocation Management","Allocation proposal","Allocation Time","Allocation users","AMBER","AMIE","Anaconda","Analysis","API","Application Status","ARCGIS","Architecture","Archiving","Astrophysics","ATLAS","Authentication","AWS","AZURE","Backup","BASH","Batch Jobs","Benchmarking","Big Data","Bioinformatics","Biology","Ceph","CFD","cgroups","CHARMM","Checkpoint","cilogon","citation","Cloud","Cloud Computing","Cloud Lab","Cloud Storage","Cluster Management","Cluster Support","CMMC","Community Outreach","Compiling","Composible Systems","Computataional Chemistry","COMSOL","Conda","Condo","Containers","Core dump","Core hours","CP2K","CPU architecture","CPU bound","CUDA","Cybersecurity","CYVERSE","Data","Data Storage","Data-access-protocols","Data-analysis","Data-compliance","Data-lifecycle","Data-management","Data-management-software","Data-provenance","Data-reproducibility","Data-retention","Data-science","Data-sharing","Data-transfer","Data-wrangling","Database-update","Debugging","Debugging, Optimizatio and Profiling","Deep-learning","Dependencies","Deployment","DFT","Distributed-computing","DNS","Docker","Documentation","DOI","DTN","Easybuild","Email","Encryption","Environment-modules","Errors","Extension","FastX","Federated-authentication","File transfers","File-formats","File-limits","File-systems","File-transfer","Finite-element-analysis","Firewall","Fortran","Frameworks and IDE's","GAMESS","Gateways","GATK","Gaussian","GCC","Genomics","GIS","Git","Globus","GPFS","GPU","Gravitational-waves","Gridengine","GROMACS","Hadoop","Hardware","Image-processing","Infiniband","Interactive-mode","Interconnect","IO-Issue","ISILON","Java","Jekyll","Jetstream","Job-accounting","Job-array","Job-charging","Job-failure","Job-sizing","Job-submission","Julia","Jupyterhub","Key-management","Kubernetes","KyRIC","LAMMPS","Library-paths","License","Linear-programming","Linux","LMOD","login","LSF","Lustre","Machine-learning","Management","Materials-science","Mathematica","MATLAB","Memory","Metadata","Modules","Molecular-dynamics","Monte-carlo","MPI","NAMD","NetCDF","Networking","Neural-networks","NFS","NLP","NoMachine","Nvidia","Oceanography","OnDemnad","Open-science-grid","Open-storage-network","OpenCV","Openfoam","OpenMP","OpenMPI","OpenSHIFT","Openstack","Optimization","OS","OSG","Parallelization","Parameter-sweeps","Paraview","Particle-physics","password","PBS","Pegasus","Pending-jobs","Performance-tuning","Permissions","Physiology","PIP","PODMAN","Portals","Pre-emption","Professional and Workforce Development","Professional-development","Profile","Profiling","Programming","Programming Languages","Programming-best-practices","Project-management","Project-renewal","Provisioning","Pthreads","Publication-database","Putty","Python","Pytorch","Quantum-computing","Quantum-mechanics","Quota","R","RDP","React","Reporting","Research-facilitation","Research-grants","Resources","Rstudio-server","S3","Samba","SAS","Scaling","Schedulers","Scheduling","Science DMZ","Science Gateways","Scikit-learn","Scratch","screen","scripting","SDN","Secure Computing and Data","Secure-data-architecture","Serverless-hpc","setup","sftp","SGE","Shell Scripting","Shifter","Singularity","SLURM","SMB","Smrtanalysis","Software Installations","Software-carpentry","SPACK","SPARK","Spectrum-scale","SPSS","SQL","SSH","Stampede2","STATA","Storage","Supplement","Support","TCP","Technical-training-for-hpc","Tensorflow","Terminal-emulation-and-window-management","Tickets","Timing-issue","TMUX","Tools","Training","Transfer SUs","Trinity","Tuning","Unix-environment","Upgrading","Vectorization","Version-control","vim","VNC","VPN","Workflow","Workforce-development","X11","Xalt","XDMoD","XML","XSEDE","I don't see a relevant keyword"],Ac=["ACES","Anvil","Bridges-2","DARWIN","Delta","DeltaAI","Derecho","Expanse","FASTER","Granite","Jetstream2","KyRIC","Launch","Neocortex","Ookami","Open Science Grid","Open Storage Network","Ranch","Stampede3"];function lc({ticketForm:e,setTicketForm:t,userInfo:r,trackEvent:n}){let o=null;const a=async(s,i=[])=>{o=await cn(s,"support",i),o.success?(t(c=>({...c,ticketKey:o.ticketKey,ticketUrl:o.ticketUrl})),n({type:"chatbot_ticket_submitted",ticketType:"general_help",success:!0,ticketKey:o.ticketKey})):(t(c=>({...c,submissionError:o.error})),n({type:"chatbot_ticket_error",ticketType:"general_help",errorType:o.error||"unknown"}))};return{general_help_summary_subject:{message:"Provide a short title for your ticket.",function:s=>{const i=W();t({...i,summary:s.userInput,email:r.email||i.email,name:r.name||i.name,accessId:r.accessId||i.accessId}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"title"})},path:"general_help_category"},general_help_category:{message:"What type of issue are you experiencing?",options:["User Account Question","Allocation Question","User Support Question","CSSN/CCEP Question","Training Question","Metrics Question","OnDemand Question","Pegasus Question","XDMoD Question","Some Other Question"],function:s=>{const i=W();t({...i,category:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"category"})},path:"general_help_description"},general_help_description:{message:"Please describe your issue.",function:s=>{const i=W();t({...i,description:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"description"})},path:"general_help_attachment"},general_help_attachment:{message:"Would you like to attach a file to your ticket?",options:["Yes","No"],function:s=>{const i=W();t({...i,wantsAttachment:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"attachment_choice"})},path:s=>s.userInput==="Yes"?"general_help_upload":"general_help_resource"},general_help_upload:{message:"Please upload your file.",component:k.jsx(An,{onFileUpload:s=>{t(i=>({...i,uploadedFiles:s})),s.forEach(i=>{n({type:"chatbot_file_uploaded",fileType:i.type||"unknown",fileSize:i.size})})},enableScreenshot:!0,maxSizeMB:10}),options:["Continue"],function:()=>{const s=W();t({...s,uploadConfirmed:!0}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"file_upload"})},path:"general_help_resource"},general_help_resource:{message:"Does your problem involve an ACCESS Resource?",options:["Yes","No"],function:s=>{const i=W();t({...i,involvesResource:s.userInput.toLowerCase()}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"resource_choice"})},path:s=>s.userInput==="Yes"?"general_help_resource_details":"general_help_keywords"},general_help_resource_details:{message:"Please select the ACCESS Resource involved with your issue:",options:Ac,function:s=>{const i=W();t({...i,resourceDetails:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"resource_selection"})},path:"general_help_user_id_at_resource"},general_help_user_id_at_resource:{message:"What is your User ID at the selected resource(s)? (Optional - press Enter to skip)",validateTextInput:_t(),function:s=>{const i=W();t({...i,userIdAtResource:Lt(s.userInput)}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"resource_user_id"})},path:"general_help_keywords"},general_help_keywords:{message:"Please add up to 5 keywords to help route your ticket.",checkboxes:{items:sc,min:0,max:5},function:s=>{const i=W();t({...i,keywords:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"keywords"})},path:s=>s.userInput&&s.userInput.includes("I don't see a relevant keyword")?"general_help_additional_keywords":"general_help_priority"},general_help_additional_keywords:{message:"Please enter additional keywords, separated by commas:",function:s=>{const i=W(),c=i.keywords||[],l=s.userInput,u=(Array.isArray(c)?[...c]:String(c).split(",").map(f=>f.trim())).filter(f=>f!=="I don't see a relevant keyword"),p=u.length>0?[...u,l].join(", "):l;t({...i,keywords:p,suggestedKeyword:l}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"additional_keywords"})},path:"general_help_priority"},general_help_priority:{message:"Please select a priority for your issue:",options:["Lowest","Low","Medium","High","Highest"],function:s=>{const i=W();t({...i,priority:s.userInput.toLowerCase()}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"priority"})},path:()=>{const s=ye(r);return s.email?s.name?s.accessId?"general_help_ticket_summary":"general_help_accessid":"general_help_name":"general_help_email"}},general_help_email:{message:"What is your email address?",validateTextInput:un,function:s=>{const i=W();t({...i,email:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"email"})},path:()=>{const s=ye(r);return s.name?s.accessId?"general_help_ticket_summary":"general_help_accessid":"general_help_name"}},general_help_name:{message:"What is your name?",function:s=>{const i=W();t({...i,name:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"name"})},path:()=>ye(r).accessId?"general_help_ticket_summary":"general_help_accessid"},general_help_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:_t(),function:s=>{const i=W();t({...i,accessId:Lt(s.userInput)}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"access_id"})},path:"general_help_ticket_summary"},general_help_ticket_summary:{message:s=>{const i=W(),c=ye(r),l=pr(i.uploadedFiles);let d=c.accessId;s.prevPath==="general_help_accessid"&&s.userInput&&(d=s.userInput);let u="";return i.involvesResource==="yes"&&(u=`
|
|
86
86
|
Resource: ${i.resourceDetails||"Not specified"}`,i.userIdAtResource&&(u+=`
|
|
87
87
|
User ID at Resource: ${i.userIdAtResource}`)),`Thank you for providing your issue details. Here's a summary:
|
|
88
88
|
|
|
@@ -95,7 +95,7 @@ Priority: ${i.priority||"Not provided"}
|
|
|
95
95
|
Keywords: ${i.keywords||"Not provided"}
|
|
96
96
|
Issue Description: ${i.description||"Not provided"}${u}${l}
|
|
97
97
|
|
|
98
|
-
Would you like to submit this ticket?`},options:["Submit Ticket","Back to Main Menu"],function:async
|
|
98
|
+
Would you like to submit this ticket?`},options:["Submit Ticket","Back to Main Menu"],function:async s=>{if(s.userInput==="Submit Ticket"){const i=W(),c=ye(r),l={email:c.email||"",summary:i.summary||"General Support Ticket",description:i.description||"",priority:i.priority||"medium",accessId:c.accessId||"",name:c.name||"",issueType:i.category||"",hasResourceProblem:i.involvesResource==="yes"?"Yes":"No",userIdAtResource:i.userIdAtResource||"",resourceName:i.resourceDetails||"",keywords:i.keywords||"",noRelevantKeyword:i.suggestedKeyword?"checked":"",suggestedKeyword:i.suggestedKeyword||""};await a(l,i.uploadedFiles||[])}},path:s=>s.userInput==="Submit Ticket"?"general_help_success":"start"},general_help_success:{message:ln(()=>fr(o,"support ticket")),options:["Back to Main Menu"],renderHtml:["BOT"],path:"start"}}}const cc={"Logging into ACCESS website":"access_login","Logging into a resource":"resource_login","Another question":"general_help"};function uc({ticketForm:e,setTicketForm:t,userInfo:r,trackEvent:n}){const o=ac({ticketForm:e,setTicketForm:t,userInfo:r,trackEvent:n}),a=ic({ticketForm:e,setTicketForm:t,userInfo:r,trackEvent:n}),A=lc({ticketForm:e,setTicketForm:t,userInfo:r,trackEvent:n});return{help_ticket:{message:"What is your help ticket related to?",options:["Logging into ACCESS website","Logging into a resource","Another question"],function:s=>{t(i=>({...i,ticketType:s.userInput})),n({type:"chatbot_ticket_started",ticketType:cc[s.userInput]||s.userInput})},path:s=>s.userInput==="Logging into ACCESS website"?"access_help":s.userInput==="Logging into a resource"?"resource_help":s.userInput==="Another question"?"general_help_summary_subject":"help_ticket"},...o,...a,...A}}function ct(e){const t=W();return{...t,email:e.email||t.email,name:e.name||t.name,accessId:e.accessId||t.accessId}}function dc(e){return e?e.success?e.ticketUrl&&e.ticketKey?`Your security incident report has been submitted successfully.
|
|
99
99
|
|
|
100
100
|
Ticket: <a href="${e.ticketUrl}" target="_blank">${e.ticketKey}</a>
|
|
101
101
|
|
|
@@ -105,7 +105,7 @@ Our cybersecurity team will review your report and respond accordingly. Thank yo
|
|
|
105
105
|
|
|
106
106
|
Please try again or contact our cybersecurity team directly.`:`We apologize, but there was an error submitting your security incident report.
|
|
107
107
|
|
|
108
|
-
Please try again or contact our cybersecurity team directly.`}function
|
|
108
|
+
Please try again or contact our cybersecurity team directly.`}function pc({ticketForm:e,setTicketForm:t,userInfo:r,trackEvent:n}){let o=null,a=null;const A=async(i,c=[],l)=>{a=await cn(i,"security",c),a.success?(t(d=>({...d,ticketKey:a.ticketKey,ticketUrl:a.ticketUrl})),n({type:"chatbot_security_submitted",success:!0,priority:l||"unknown",ticketKey:a.ticketKey})):(t(d=>({...d,submissionError:a.error})),n({type:"chatbot_ticket_error",ticketType:"security",errorType:a.error||"unknown"}))};return{security_incident:{message:"You're reporting a security incident. Please provide a brief summary of the security concern.",function:i=>{const c=W();t({...c,summary:i.userInput,email:r.email||c.email,name:r.name||c.name,accessId:r.accessId||c.accessId}),n({type:"chatbot_ticket_step",ticketType:"security",step:"summary"})},path:"security_priority"},security_priority:{message:"What is the priority level of this security incident?",options:["Critical","High","Medium","Low"],function:i=>{const c=W();t({...c,priority:i.userInput.toLowerCase()}),n({type:"chatbot_ticket_step",ticketType:"security",step:"priority"})},path:"security_description"},security_description:{message:"Please provide a detailed description of the security incident or concern.",function:i=>{const c=W();t({...c,description:i.userInput}),n({type:"chatbot_ticket_step",ticketType:"security",step:"description"})},path:"security_attachment"},security_attachment:{message:"Do you have any files (screenshots, logs, etc.) that would help with this security incident?",options:["Yes","No"],function:i=>{const c=W();t({...c,wantsAttachment:i.userInput}),n({type:"chatbot_ticket_step",ticketType:"security",step:"attachment_choice"})},path:i=>i.userInput==="Yes"?"security_upload":"security_contact_check"},security_upload:{message:"Please upload your files.",component:k.jsx(An,{onFileUpload:i=>{t(c=>({...c,uploadedFiles:i})),i.forEach(c=>{n({type:"chatbot_file_uploaded",fileType:c.type||"unknown",fileSize:c.size})})},enableScreenshot:!0,maxSizeMB:10}),options:["Continue"],function:()=>{const i=W();t({...i,uploadConfirmed:!0}),n({type:"chatbot_ticket_step",ticketType:"security",step:"file_upload"})},path:"security_contact_check"},security_contact_check:{message:()=>{const i=ct(r);return i.name&&i.email&&i.accessId?`I have your contact information:
|
|
109
109
|
|
|
110
110
|
Name: ${i.name}
|
|
111
111
|
Email: ${i.email}
|
|
@@ -121,9 +121,9 @@ Email: ${l.email||"Not provided"}
|
|
|
121
121
|
ACCESS ID: ${u}
|
|
122
122
|
Description: ${l.description||"Not provided"}${d}
|
|
123
123
|
|
|
124
|
-
Would you like to submit this security incident report?`},options:["Submit Security Report","Back to Main Menu"],function:async i=>{if(i.userInput==="Submit Security Report"){const c=W(),l=ct(r),d={...c,name:l.name||c.name,email:l.email||c.email,accessId:o||l.accessId||c.accessId},u={summary:d.summary||"",priority:d.priority||"",description:d.description||"",name:d.name||"",email:d.email||"",accessId:d.accessId||""};await
|
|
124
|
+
Would you like to submit this security incident report?`},options:["Submit Security Report","Back to Main Menu"],function:async i=>{if(i.userInput==="Submit Security Report"){const c=W(),l=ct(r),d={...c,name:l.name||c.name,email:l.email||c.email,accessId:o||l.accessId||c.accessId},u={summary:d.summary||"",priority:d.priority||"",description:d.description||"",name:d.name||"",email:d.email||"",accessId:d.accessId||""};await A(u,c.uploadedFiles||[],d.priority)}},path:i=>i.userInput==="Submit Security Report"?"security_success":"start"},security_success:{message:ln(()=>dc(a)),options:["Back to Main Menu"],renderHtml:["BOT"],path:"start"}}}const be=[];for(let e=0;e<256;++e)be.push((e+256).toString(16).slice(1));function fc(e,t=0){return(be[e[t+0]]+be[e[t+1]]+be[e[t+2]]+be[e[t+3]]+"-"+be[e[t+4]]+be[e[t+5]]+"-"+be[e[t+6]]+be[e[t+7]]+"-"+be[e[t+8]]+be[e[t+9]]+"-"+be[e[t+10]]+be[e[t+11]]+be[e[t+12]]+be[e[t+13]]+be[e[t+14]]+be[e[t+15]]).toLowerCase()}let hr;const hc=new Uint8Array(16);function gc(){if(!hr){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");hr=crypto.getRandomValues.bind(crypto)}return hr(hc)}const Na={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function gr(e,t,r){var o;if(Na.randomUUID&&!e)return Na.randomUUID();e=e||{};const n=e.random??((o=e.rng)==null?void 0:o.call(e))??gc();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,fc(n)}function Ec(e){return e}function mc({sessionId:e,apiKey:t,trackEvent:r}){let n=null;return{metrics_intro:{message:`Please type your question about usage and performance metrics (XDMoD) below. You can see some <a target="_blank" href="${rt.METRICS_QUESTIONS_URL}">examples here</a>.
|
|
125
125
|
|
|
126
|
-
<em>This assistant is powered by AI. Responses may not always be accurate. Do not share passwords or secrets.</em> <a href="https://support.access-ci.org/tools/access-qa-tool/privacy">Privacy Notice</a>`,renderHtml:["BOT"],path:"metrics_loop"},metrics_loop:{message:async o=>{const{userInput:a}=o;if(a==="👍 Helpful"||a==="👎 Not helpful"){if(t&&e&&n){const
|
|
126
|
+
<em>This assistant is powered by AI. Responses may not always be accurate. Do not share passwords or secrets.</em> <a href="https://support.access-ci.org/tools/access-qa-tool/privacy">Privacy Notice</a>`,renderHtml:["BOT"],path:"metrics_loop"},metrics_loop:{message:async o=>{const{userInput:a}=o;if(a==="👍 Helpful"||a==="👎 Not helpful"){if(t&&e&&n){const s={"Content-Type":"application/json","X-Origin":"metrics","X-API-KEY":t,"X-Session-ID":e,"X-Query-ID":n,"X-Feedback":a==="👍 Helpful"?"1":"0"};try{await fetch(rt.METRICS_RATING_ENDPOINT,{method:"POST",headers:s})}catch(i){console.error("Error sending metrics feedback:",i)}}return"Thanks for the feedback! Ask another question about usage and performance metrics (XDMoD) or start a new chat."}else try{const A=gr();n=A,r({type:"chatbot_metrics_question_sent",queryId:A});const s={"Content-Type":"application/json","X-Origin":"metrics","X-API-KEY":t,"X-Session-ID":e,"X-Query-ID":A},l=(await(await fetch(rt.METRICS_API_ENDPOINT,{method:"POST",headers:s,body:JSON.stringify({query:a})})).json()).response,d=l;return await o.injectMessage(d),setTimeout(async()=>{await o.injectMessage("Ask another question about usage and performance metrics (XDMoD) or start a new chat.")},100),null}catch(A){return console.error("Error in metrics flow:",A),"I'm sorry, there was an error processing your question. Please try again."}},renderMarkdown:["BOT"],options:o=>o.userInput==="👍 Helpful"||o.userInput==="👎 Not helpful"?[]:["👍 Helpful","👎 Not helpful"],chatDisabled:!1,path:"metrics_loop"}}}function yc(){if(typeof window>"u")return gr();let e=localStorage.getItem(La.SESSION_ID);return e||(e=gr(),localStorage.setItem(La.SESSION_ID,e)),e}const Ha="access-qa-bot-shadow-overrides",bc=`
|
|
127
127
|
.rcb-checkbox-container {
|
|
128
128
|
display: flex !important;
|
|
129
129
|
flex-wrap: wrap !important;
|
|
@@ -260,5 +260,5 @@ Would you like to submit this security incident report?`},options:["Submit Secur
|
|
|
260
260
|
opacity: 0.85;
|
|
261
261
|
text-decoration: underline !important;
|
|
262
262
|
}
|
|
263
|
-
`;function
|
|
263
|
+
`;function vc(e){if(!e)return;const t=e.getRootNode();if(!(t instanceof ShadowRoot)||t.getElementById(Ha))return;const r=document.createElement("style");r.id=Ha,r.textContent=bc,t.appendChild(r)}const mr=h.forwardRef((e,t)=>{const{apiKey:r=rt.DEFAULT_API_KEY,isLoggedIn:n=!1,loginUrl:o=Ke.LOGIN_URL,userEmail:a,userName:A,accessId:s,actingUser:i,ringEffect:c,defaultOpen:l,onClose:d,open:u,onOpenChange:p,embedded:f=!1,welcome:y,qaEndpoint:g,ratingEndpoint:v,onAnalyticsEvent:x}=e,m=h.useRef(null),E=h.useRef(null),[P,C]=h.useState({}),S=h.useMemo(()=>({email:a,name:A,accessId:s}),[a,A,s]);h.useEffect(()=>{vc(E.current)},[]),h.useEffect(()=>{nc({ticketForm:P,setTicketForm:C})},[P]),h.useImperativeHandle(t,()=>({addMessage:M=>{var U,L;(L=(U=m.current)==null?void 0:U.addMessage)==null||L.call(U,M)}}));const I=y||(n?Ke.WELCOME_MESSAGE:Ke.WELCOME_MESSAGE_LOGGED_OUT),Q=h.useMemo(()=>yc(),[]),B=h.useCallback(M=>{x&&x({...M,type:M.type,timestamp:M.timestamp??Date.now(),sessionId:M.sessionId??Q})},[x,Q]),O=h.useCallback(M=>{x&&x({...M,type:M.type,timestamp:typeof M.timestamp=="number"?M.timestamp:Date.now(),sessionId:typeof M.sessionId=="string"?M.sessionId:Q})},[x,Q]),D=h.useMemo(()=>{const M=tc({welcome:I,setTicketForm:C,isLoggedIn:n,trackEvent:B}),U=uc({ticketForm:{},setTicketForm:C,userInfo:S,trackEvent:B}),L=pc({ticketForm:{},setTicketForm:C,userInfo:S,trackEvent:B}),F=mc({sessionId:Q,apiKey:r,trackEvent:B}),_={...M,...U,...L,...F};return $l(_,{disableOnOptions:!0})},[I,S,Q,r,n,B]);return k.jsx("div",{ref:E,children:k.jsx(ur,{ref:m,isLoggedIn:n,actingUser:i,onAnalyticsEvent:O,apiKey:r,qaEndpoint:g||rt.QA_ENDPOINT,ratingEndpoint:v||rt.RATING_ENDPOINT,botName:Ke.BOT_NAME,logo:Ke.LOGO,primaryColor:Ke.PRIMARY_COLOR,secondaryColor:Ke.SECONDARY_COLOR,welcomeMessage:I,tooltipText:Ke.TOOLTIP,loginUrl:o,open:u,onOpenChange:p,embedded:f,footerText:"AI-powered · Privacy Notice",footerLink:"https://support.access-ci.org/tools/access-qa-tool/privacy",customFlow:D})})});mr.displayName="AccessQABot",Pe.API_CONFIG=rt,Pe.AccessQABot=mr,Pe.BOT_CONFIG=Ke,Pe.QABot=mr,Object.defineProperty(Pe,Symbol.toStringTag,{value:"Module"})});
|
|
264
264
|
//# sourceMappingURL=access-qa-bot.umd.cjs.map
|