@snf/access-qa-bot 3.5.2 → 3.6.0

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,64 +1,64 @@
1
- (function(Ue,E){typeof exports=="object"&&typeof module<"u"?E(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"],E):(Ue=typeof globalThis<"u"?globalThis:Ue||self,E(Ue.AccessQABot={},Ue.jsxRuntime,Ue.React,Ue.ReactDOMClient,Ue.ReactDOMServer))})(this,function(Ue,E,f,eu,fa){"use strict";function ha(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 he=ha(f);function cn(){return cn=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},cn.apply(null,arguments)}function ga(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function"){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function jr(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))}}typeof SuppressedError=="function"&&SuppressedError,jr('.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 me={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"},qr="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",Gr=f.forwardRef((e,t)=>he.createElement("svg",{viewBox:"0 0 637 637",ref:t,...e},he.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"}),he.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"}))),Yr=f.forwardRef((e,t)=>he.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},he.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"}))),ma=f.forwardRef((e,t)=>he.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},he.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"}))),ya=f.forwardRef((e,t)=>he.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},he.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"}))),ba=f.forwardRef((e,t)=>he.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",ref:t,...e},he.createElement("g",{strokeLinecap:"round",strokeWidth:10},he.createElement("path",{d:"m19 19 61 61M80 19 19 80"})))),va=f.forwardRef((e,t)=>he.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},he.createElement("path",{d:"M94-136v-255l351-93-351-92v-253l816 346L94-136Z"}))),wa=f.forwardRef((e,t)=>he.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},he.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"}))),xa=f.forwardRef((e,t)=>he.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},he.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"}))),Wr=f.forwardRef((e,t)=>he.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},he.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"}))),Ea=f.forwardRef((e,t)=>he.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},he.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"}))),ka=f.forwardRef((e,t)=>he.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},he.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:Gr},header:{title:E.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:qr,buttons:[me.NOTIFICATION_BUTTON,me.AUDIO_BUTTON,me.CLOSE_CHAT_BUTTON],closeChatIcon:ba},notification:{disabled:!1,defaultToggledOn:!0,volume:.2,icon:ma,iconDisabled:ya,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/yMABAACAA0Alf8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QDy/wQA5v/i//b/0P/7/8f/AADh/wMAAAD+/yUAAAA7AAEAOAAAABwAAAD6/wAA1/8CAMr/AADb/+3/5f8BAAIACAAVABcALwAfACgA+/8XAPn/DgDe/+//7v/Q/wMAz/8JAOP/CwDx////EAAHADEAAQArAAIAHQAEAAcAAADr/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:Ea,iconDisabled:ka},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:va,blockSpam:!0,sendOptionOutput:!0,sendCheckboxOutput:!0,buttons:[me.VOICE_MESSAGE_BUTTON,me.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:qr,simulateStream:!1,streamSpeed:30},voice:{disabled:!0,defaultToggledOn:!1,language:"en-US",timeoutPeriod:1e4,autoSendDisabled:!1,autoSendPeriod:1e3,sendAsAudio:!1,icon:wa,iconDisabled:xa},footer:{text:E.jsxs("div",{style:{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",columnGap:3},onClick:()=>window.open("https://react-chatbotify.com","_blank","noopener,noreferrer"),children:[E.jsx("span",{children:"Powered By "},0),E.jsx("div",{style:{borderRadius:"50%",width:14,height:14,display:"flex",justifyContent:"center",alignItems:"center",background:"linear-gradient(to right, #42b0c5, #491d8d)"},children:E.jsx(Gr,{style:{width:"80%",height:"80%",fill:"#fff"}})},1),E.jsx("span",{style:{fontWeight:"bold"},children:" React ChatBotify"},2)]}),buttons:[me.FILE_ATTACHMENT_BUTTON,me.EMOJI_PICKER_BUTTON]},fileAttachment:{disabled:!1,multiple:!0,accept:".png",icon:Yr,iconDisabled:Yr,sendFileName:!0,showMediaDisplay:!1},emoji:{disabled:!1,icon:Wr,iconDisabled:Wr,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}},Vr=f.createContext({settings:{},setSyncedSettings:()=>null,syncedSettingsRef:{current:{}}}),ee=()=>f.useContext(Vr),Ca=({children:e,settings:t=Kr,setSyncedSettings:r,syncedSettingsRef:n})=>E.jsx(Vr.Provider,{value:{settings:t,setSyncedSettings:r,syncedSettingsRef:n},children:e}),Xr={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:{}},Jr=f.createContext({styles:{},setSyncedStyles:()=>null,syncedStylesRef:{current:{}}}),Ae=()=>f.useContext(Jr),Pa=({children:e,styles:t=Xr,setSyncedStyles:r,syncedStylesRef:n})=>E.jsx(Jr.Provider,{value:{styles:t,setSyncedStyles:r,syncedStylesRef:n},children:e}),Sa=({buttons:e})=>{var t,r,n,o,i,A,s;const{settings:a}=ee(),{styles:l}=Ae(),c={backgroundImage:`linear-gradient(to right, ${(t=a.general)==null?void 0:t.secondaryColor},
2
- ${(r=a.general)==null?void 0:r.primaryColor})`,...l.headerStyle};return E.jsxs("div",{style:c,className:"rcb-chat-header-container",children:[E.jsxs("div",{className:"rcb-chat-header",children:[((n=a.header)==null?void 0:n.showAvatar)&&E.jsx("div",{style:{backgroundImage:`url("${(o=a.header)==null?void 0:o.avatar}")`},className:"rcb-bot-avatar"}),f.isValidElement((i=a.header)==null?void 0:i.title)?(A=a.header)==null?void 0:A.title:E.jsx("div",{style:{margin:0,fontSize:20,fontWeight:"bold"},children:(s=a.header)==null?void 0:s.title})]}),E.jsx("div",{className:"rcb-chat-header",children:e==null?void 0:e.map((u,d)=>E.jsx(f.Fragment,{children:u},d))})]})},Zr=f.createContext({}),Ee=()=>f.useContext(Zr),Ba=({children:e,botIdRef:t,flowRef:r})=>{const n=f.useRef(null),o=f.useRef(""),i=f.useRef(null),A=f.useRef(new Map),s=f.useRef(null),a=f.useRef(""),l=f.useRef(!1),c=f.useRef(null),u=f.useRef(null),d=f.useRef(null);return E.jsx(Zr.Provider,{value:{botIdRef:t,flowRef:r,inputRef:n,timeoutIdRef:i,streamMessageMap:A,chatBodyRef:s,paramsInputRef:a,keepVoiceOnRef:l,audioContextRef:c,audioBufferRef:u,gainNodeRef:d,prevInputRef:o},children:e})},Fe=e=>{const[t,r]=f.useState(e),n=f.useRef(e);return[t,o=>{const i=typeof o=="function"?o(n.current):o;n.current=i,r(i)},n]},$r=f.createContext({}),Pe=()=>f.useContext($r),Da=({children:e,settings:t})=>{var r,n,o,i,A,s;const[a,l,c]=Fe(!1),[u,d,p]=Fe(((r=t==null?void 0:t.chatWindow)==null?void 0:r.defaultOpen)??!1),[g,v,h]=Fe(((n=t==null?void 0:t.audio)==null?void 0:n.defaultToggledOn)??!1),[w,x,m]=Fe(((o=t==null?void 0:t.voice)==null?void 0:o.defaultToggledOn)??!1),[k,P,C]=Fe(((i=t==null?void 0:t.notification)==null?void 0:i.defaultToggledOn)??!0),[S,I]=f.useState(!1),[Q,D]=f.useState(!1),[_,B,M]=Fe(!1),[F,N,L]=Fe(!0),[O,U,b]=Fe(!1),[R,y]=f.useState(!1),[G,Z]=f.useState(!1),[K,re]=f.useState(0),[Se,le]=f.useState(0),[Ke,Ce]=f.useState(!1),[j,Y]=f.useState(((A=window.visualViewport)==null?void 0:A.height)??window.innerHeight),[ne,te]=f.useState(((s=window.visualViewport)==null?void 0:s.width)??window.innerWidth);return E.jsx($r.Provider,{value:{isBotTyping:a,setSyncedIsBotTyping:l,syncedIsBotTypingRef:c,isChatWindowOpen:u,setSyncedIsChatWindowOpen:d,syncedIsChatWindowOpenRef:p,audioToggledOn:g,setSyncedAudioToggledOn:v,syncedAudioToggledOnRef:h,voiceToggledOn:w,setSyncedVoiceToggledOn:x,syncedVoiceToggledOnRef:m,notificationsToggledOn:k,setSyncedNotificationsToggledOn:P,syncedNotificationsToggledOnRef:C,isLoadingChatHistory:S,setIsLoadingChatHistory:I,hasChatHistoryLoaded:Q,setHasChatHistoryLoaded:D,isScrolling:_,setSyncedIsScrolling:B,syncedIsScrollingRef:M,textAreaDisabled:F,setSyncedTextAreaDisabled:N,syncedTextAreaDisabledRef:L,textAreaSensitiveMode:O,setSyncedTextAreaSensitiveMode:U,syncedTextAreaSensitiveModeRef:b,hasInteractedPage:R,setHasInteractedPage:y,hasFlowStarted:G,setHasFlowStarted:Z,unreadCount:K,setUnreadCount:re,inputLength:Se,setInputLength:le,blockAllowsAttachment:Ke,setBlockAllowsAttachment:Ce,viewportHeight:j,setViewportHeight:Y,viewportWidth:ne,setViewportWidth:te},children:e})};var q=(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))(q||{});const Ia={[q.START_SPEAK_AUDIO]:!0,[q.TOGGLE_AUDIO]:!0,[q.TOGGLE_VOICE]:!0,[q.TOGGLE_NOTIFICATIONS]:!0,[q.TOGGLE_CHAT_WINDOW]:!0,[q.PRE_INJECT_MESSAGE]:!0,[q.POST_INJECT_MESSAGE]:!1,[q.PRE_LOAD_CHATBOT]:!0,[q.POST_LOAD_CHATBOT]:!1,[q.START_SIMULATE_STREAM_MESSAGE]:!0,[q.STOP_SIMULATE_STREAM_MESSAGE]:!1,[q.START_STREAM_MESSAGE]:!0,[q.CHUNK_STREAM_MESSAGE]:!0,[q.STOP_STREAM_MESSAGE]:!0,[q.REMOVE_MESSAGE]:!0,[q.SAVE_CHAT_HISTORY]:!0,[q.LOAD_CHAT_HISTORY]:!0,[q.CHANGE_PATH]:!0,[q.SHOW_TOAST]:!0,[q.DISMISS_TOAST]:!0,[q.USER_SUBMIT_TEXT]:!0,[q.USER_UPLOAD_FILE]:!0,[q.TEXT_AREA_CHANGE_VALUE]:!0,[q.PRE_PROCESS_BLOCK]:!0,[q.POST_PROCESS_BLOCK]:!0},Fn=async(e,t,r)=>{const n=new CustomEvent(e,{detail:t,cancelable:Ia[e]});return n.data=r,n.promises=[],window.dispatchEvent(n),await Promise.all(n.promises),n},eo=f.createContext({paths:[],setSyncedPaths:()=>{},syncedPathsRef:{current:[]}}),Yt=()=>f.useContext(eo),Ta=({children:e})=>{const[t,r,n]=Fe([]);return E.jsx(eo.Provider,{value:{paths:t,setSyncedPaths:r,syncedPathsRef:n},children:e})},Je=()=>{const{botIdRef:e}=Ee(),{syncedPathsRef:t}=Yt(),r=f.useCallback(()=>t.current.length>0?t.current.at(-1)??null:null,[]),n=f.useCallback(()=>t.current.length>1?t.current.at(-2)??null:null,[]);return{dispatchRcbEvent:f.useCallback(async(o,i)=>{const A={botId:e.current,currPath:r(),prevPath:n()};return await Fn(o,A,i)},[e])}},ze=()=>{const{settings:e}=ee(),{isChatWindowOpen:t,setSyncedIsChatWindowOpen:r,viewportHeight:n,setViewportHeight:o,viewportWidth:i,setViewportWidth:A,setUnreadCount:s,setSyncedIsBotTyping:a,setSyncedIsScrolling:l,syncedIsBotTypingRef:c,syncedIsChatWindowOpenRef:u}=Pe(),{chatBodyRef:d}=Ee(),{dispatchRcbEvent:p}=Je(),g=f.useCallback(()=>{if(!d.current)return!1;const m=d.current.getBoundingClientRect(),k=window.innerHeight??document.documentElement.clientHeight,P=window.innerWidth??document.documentElement.clientWidth;return m.top>=0&&m.left>=0&&m.bottom<=k&&m.right<=P},[d]),v=f.useCallback(async m=>{var k;m!==u.current&&((k=e.event)!=null&&k.rcbToggleChatWindow&&(await p(q.TOGGLE_CHAT_WINDOW,{currState:u.current,newState:!u.current})).defaultPrevented||r(P=>(P||s(0),!P)))},[u]),h=f.useCallback(async m=>{m!==c.current&&a(k=>!k)},[c]),w=f.useCallback((m,k,P,C)=>(m/=C/2)<1?P/2*m*m+k:-P/2*(--m*(m-2)-1)+k,[]),x=f.useCallback((m=0)=>{if(!d.current)return;const k=d.current.scrollHeight-d.current.clientHeight;if(m<=0)return d.current.scrollTop=k,void l(!1);const P=d.current.scrollTop,C=k-P;let S=0;const I=()=>{if(!d.current)return;S+=20;const Q=w(S,P,C,m);d.current.scrollTop=Q,S<m?requestAnimationFrame(I):l(!1)};I()},[d]);return{isChatWindowOpen:t,setSyncedIsChatWindowOpen:r,toggleChatWindow:v,viewportHeight:n,setViewportHeight:o,viewportWidth:i,setViewportWidth:A,toggleIsBotTyping:h,scrollToBottom:x,getIsChatBotVisible:g}},Qa=()=>{var e,t,r;const{settings:n}=ee(),{styles:o}=Ae(),{unreadCount:i,isScrolling:A}=Pe(),{chatBodyRef:s}=Ee(),{scrollToBottom:a}=ze(),[l,c]=f.useState(!1),u={color:(e=n.general)==null?void 0:e.primaryColor,borderColor:(t=n.general)==null?void 0:t.primaryColor,...o.chatMessagePromptHoveredStyle};return E.jsx("div",{className:"rcb-message-prompt-container "+(s.current&&((d=n.chatWindow)!=null&&d.showMessagePrompt)&&A&&i>0?"visible":"hidden"),children:E.jsx("div",{onMouseEnter:()=>{c(!0)},onMouseLeave:()=>{c(!1)},style:l?u:{...o.chatMessagePromptStyle},onMouseDown:p=>{p.preventDefault(),a(600)},className:"rcb-message-prompt-text",children:(r=n.chatWindow)==null?void 0:r.messagePromptText})});var d},to=f.createContext({messages:[],setSyncedMessages:()=>{},syncedMessagesRef:{current:[]}}),zn=()=>f.useContext(to),Ma=({children:e})=>{const[t,r,n]=Fe([]);return E.jsx(to.Provider,{value:{messages:t,setSyncedMessages:r,syncedMessagesRef:n},children:e})},Oa=({message:e,isNewSender:t})=>{var r,n,o,i,A,s;const{settings:a}=ee(),{styles:l}=Ae(),c=typeof e.content=="string",u=e.content,d=e.contentWrapper?E.jsx(e.contentWrapper,{children:u}):u,p={backgroundColor:(r=a.general)==null?void 0:r.primaryColor,color:"#fff",maxWidth:(n=a.userBubble)!=null&&n.showAvatar?"65%":"70%",...l.userBubbleStyle},g=(o=a.userBubble)!=null&&o.animate?"rcb-user-message-entry":"",v=((i=a.userBubble)==null?void 0:i.showAvatar)&&t,h="rcb-user-message"+(!t&&(A=a.userBubble)!=null&&A.showAvatar?" rcb-user-message-offset":"");return E.jsxs("div",{className:"rcb-user-message-container",children:[c?E.jsx("div",{style:p,className:`${h} ${g}`,children:d}):E.jsx(E.Fragment,{children:d}),v&&E.jsx("div",{style:{backgroundImage:`url("${(s=a.userBubble)==null?void 0:s.avatar}")`},className:"rcb-message-user-avatar"})]})},_a=({message:e,isNewSender:t})=>{var r,n,o,i,A,s;const{settings:a}=ee(),{styles:l}=Ae(),c=typeof e.content=="string",u=e.content,d=e.contentWrapper?E.jsx(e.contentWrapper,{children:u}):u,p={backgroundColor:(r=a.general)==null?void 0:r.secondaryColor,color:"#fff",maxWidth:(n=a.botBubble)!=null&&n.showAvatar?"65%":"70%",...l.botBubbleStyle},g=(o=a.botBubble)!=null&&o.animate?"rcb-bot-message-entry":"",v=((i=a.botBubble)==null?void 0:i.showAvatar)&&t,h="rcb-bot-message"+(!t&&(A=a.botBubble)!=null&&A.showAvatar?" rcb-bot-message-offset":"");return E.jsxs("div",{className:"rcb-bot-message-container",children:[v&&E.jsx("div",{style:{backgroundImage:`url("${(s=a.botBubble)==null?void 0:s.avatar}")`},className:"rcb-message-bot-avatar"}),c?E.jsx("div",{style:p,className:`${h} ${g}`,children:d}):E.jsx(E.Fragment,{children:d})]})},Na=()=>{var e,t,r;const{settings:n}=ee(),{styles:o}=Ae(),i=(e=n.botBubble)!=null&&e.animate?"rcb-bot-message-entry":"";return E.jsxs("div",{className:"rcb-bot-message-container",children:[((t=n.botBubble)==null?void 0:t.showAvatar)&&E.jsx("div",{style:{backgroundImage:`url("${(r=n.botBubble)==null?void 0:r.avatar}")`},className:"rcb-message-bot-avatar"}),E.jsx("div",{onMouseDown:A=>{A.preventDefault()},className:`rcb-bot-message ${i}`,children:E.jsxs("div",{className:"rcb-typing-indicator",style:{...o==null?void 0:o.rcbTypingIndicatorContainerStyle},children:[E.jsx("span",{className:"rcb-dot",style:{...o==null?void 0:o.rcbTypingIndicatorDotStyle}}),E.jsx("span",{className:"rcb-dot",style:{...o==null?void 0:o.rcbTypingIndicatorDotStyle}}),E.jsx("span",{className:"rcb-dot",style:{...o==null?void 0:o.rcbTypingIndicatorDotStyle}})]})})]})},La=()=>{var e,t,r;const{settings:n}=ee(),{styles:o}=Ae(),{messages:i}=zn(),{scrollToBottom:A}=ze(),{isBotTyping:s,syncedIsScrollingRef:a}=Pe(),{chatBodyRef:l}=Ee(),c={...o==null?void 0:o.bodyStyle,scrollbarWidth:(e=n.chatWindow)!=null&&e.showScrollbar?"auto":"none"};return f.useEffect(()=>{a.current||A()},[(t=l.current)==null?void 0:t.scrollHeight]),E.jsxs("div",{style:c,className:"rcb-chat-body-container",ref:l,children:[i.map((u,d)=>{const p=(g=>g===0||i[g].sender!==i[g-1].sender)(d);return u.sender.toUpperCase()==="USER"?E.jsx(Oa,{message:u,isNewSender:p},d):u.sender.toUpperCase()==="BOT"?E.jsx(_a,{message:u,isNewSender:p},d):E.jsx("div",{children:u.content},d)}),s&&((r=n.chatWindow)==null?void 0:r.showTypingIndicator)&&E.jsx(Na,{}),E.jsx(Qa,{})]})},Ha=({checkboxes:e,checkedItems:t,path:r})=>{var n,o,i,A,s,a,l,c,u,d,p;const{settings:g}=ee(),{styles:v}=Ae(),{paths:h}=Yt(),{handleSubmitText:w}=Dt(),[x,m]=f.useState(new Set),[k,P]=f.useState(!1),C={cursor:k?`url("${(n=g.general)==null?void 0:n.actionDisabledIcon}"), auto`:"pointer",color:(o=g.general)==null?void 0:o.primaryColor,borderColor:(i=g.general)==null?void 0:i.primaryColor,...v.botCheckboxRowStyle},S={cursor:k||x.size<e.min?`url("${(A=g.general)==null?void 0:A.actionDisabledIcon}"), auto`:"pointer",color:(s=g.general)==null?void 0:s.primaryColor,borderColor:(a=g.general)==null?void 0:a.primaryColor,...v.botCheckboxNextStyle},I={cursor:k?`url("${(l=g.general)==null?void 0:l.actionDisabledIcon}"), auto`:"pointer",color:"transparent",...v.botCheckMarkStyle},Q={cursor:k?`url("${(c=g.general)==null?void 0:c.actionDisabledIcon}"), auto`:"pointer",color:"#fff",borderColor:(u=g.general)==null?void 0:u.primaryColor,backgroundColor:(d=g.general)==null?void 0:d.primaryColor,...v.botCheckMarkSelectedStyle};return f.useEffect(()=>{h.length>0&&h[h.length-1]!==r&&P(!e.reusable)},[h]),E.jsxs("div",{className:"rcb-checkbox-container "+((p=g.botBubble)!=null&&p.showAvatar?"rcb-checkbox-offset":""),children:[e.items.map(D=>E.jsx("div",{onMouseDown:_=>{_.preventDefault(),(B=>{k||m(M=>{const F=new Set(M);if(F.has(B))t.delete(B),F.delete(B);else{if(x.size==e.max)return M;t.add(B),F.add(B)}return F})})(D)},style:C,className:"rcb-checkbox-row-container",children:E.jsxs("div",{className:"rcb-checkbox-row",children:[E.jsx("div",{style:x.has(D)?Q:I,className:"rcb-checkbox-mark"}),E.jsx("div",{className:"rcb-checkbox-label",children:D})]})},D)),E.jsx("div",{style:S,className:"rcb-checkbox-next-button",onMouseDown:D=>{var _;if(D.preventDefault(),k||x.size<e.min)return;const B=Array.from(t).join(", ");let M;P(!e.reusable),M=e.sendOutput!=null?e.sendOutput:((_=g.chatInput)==null?void 0:_.sendCheckboxOutput)??!0,w(B,M)}})]})},Ua=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,i=t.currPath,A=E.jsx(Ha,{checkboxes:n,checkedItems:o,path:i});await t.injectMessage(A)},Fa=async(e,t)=>{const r=e.function;if(!r)return;const n=r(t);return n instanceof Promise?await n:n},za=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))},Ra=({options:e,path:t})=>{var r,n,o,i,A,s;const{settings:a}=ee(),{styles:l}=Ae(),{paths:c}=Yt(),{handleSubmitText:u}=Dt(),[d,p]=f.useState([]),[g,v]=f.useState(!1),h={cursor:g?`url("${(r=a.general)==null?void 0:r.actionDisabledIcon}"), auto`:"pointer",color:(n=a.general)==null?void 0:n.primaryColor,borderColor:(o=a.general)==null?void 0:o.primaryColor,backgroundColor:"#fff",...l.botOptionStyle},w={color:"#fff",borderColor:(i=a.general)==null?void 0:i.primaryColor,backgroundColor:(A=a.general)==null?void 0:A.primaryColor,...l.botOptionHoveredStyle};return f.useEffect(()=>{c.length>0&&c[c.length-1]!==t&&v(!e.reusable)},[c]),E.jsx("div",{className:"rcb-options-container "+((s=a.botBubble)!=null&&s.showAvatar?"rcb-options-offset":""),children:e.items.map((x,m)=>{const k=d[m]&&!g;return E.jsx("div",{className:"rcb-options",style:k?w:h,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(),g)return;let S;v(!e.reusable),S=e.sendOutput!=null?e.sendOutput:((C=a.chatInput)==null?void 0:C.sendOptionOutput)??!0,u(x,S)},children:x},x)})})},ja=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,i=E.jsx(Ra,{options:n,path:o});await t.injectMessage(i)},qa=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)}},Ga=async(e,t,r,n)=>{const o=e.transition;let i;if(typeof o=="function"?(i=o(t),i instanceof Promise&&(i=await i)):i=o,typeof i=="number"&&(i={duration:i}),!i||i instanceof Promise||i.duration==null||typeof i.duration!="number")return;i.interruptable==null&&(i.interruptable=!1);const A=setTimeout(async()=>{const s=await n(e);s&&await ro(s,t)},i.duration);i.interruptable&&(r.current=A)},Ya=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)},no=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)},ro=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 Fa(e,t);r.includes("path")&&await(async(n,o)=>{const i=n.path;if(!i)return!1;if(typeof i=="string")return await o.goToPath(i),!0;let A=i(o);if(A instanceof Promise&&(A=await A),!A)return!1;const s=A;return await o.goToPath(s),!0})(e,t)},Wa=()=>{var e;const{settings:t}=ee(),{styles:r}=Ae();return E.jsx("div",{className:"rcb-line-break-container",children:E.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})})},Ka=()=>{var e;const{settings:t}=ee(),{styles:r}=Ae(),n={borderTop:`4px solid ${(e=t.general)==null?void 0:e.primaryColor}`,...r.loadingSpinnerStyle};return E.jsx("div",{className:"rcb-spinner-container",children:E.jsx("div",{style:n,className:"rcb-spinner"})})},un=()=>{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")}},pt=(e,t)=>({id:un(),content:e,sender:t,type:typeof e=="string"?"string":"object",timestamp:new Date().toUTCString(),tags:[]});let ft,oo=!1,dn="rcb-history",pn=30,io=!1,fn=[];const Wt=()=>fn,Rn=e=>{ao(e),fn=e},ao=e=>{ft&&ft.setItem(dn,JSON.stringify(e))},jn=e=>{var t,r,n,o,i;ft=((r=(t=e.chatHistory)==null?void 0:t.storageType)==null?void 0:r.toUpperCase())==="SESSION_STORAGE"?sessionStorage:localStorage,dn=(n=e.chatHistory)==null?void 0:n.storageKey,pn=(o=e.chatHistory)==null?void 0:o.maxEntries,io=(i=e.chatHistory)==null?void 0:i.disabled,fn=(A=>{if(A!=null)try{return JSON.parse(A)}catch{return[]}return[]})(ft.getItem(dn))},Va=e=>f.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,so=(e,t,r)=>{const n=new DOMParser().parseFromString(e,"text/html");return Array.from(n.body.childNodes).map((o,i)=>{var A;if(o.nodeType===Node.TEXT_NODE)return o.textContent;{const s=o.tagName.toLowerCase();let a=Array.from(o.attributes).reduce((l,c)=>{const u=c.name.toLowerCase();if(u==="style"){const d=c.value.split(";").filter(g=>g.trim()!==""),p={};d.forEach(g=>{const[v,h]=g.split(":").map(x=>x.trim()),w=v.replace(/-([a-z])/g,(x,m)=>m.toUpperCase());p[w]=h}),l[u]=p}else s!=="audio"&&s!=="video"||u!=="controls"||c.value!==""?l[u]=c.value:l[u]="true";return l},{});if(Object.prototype.hasOwnProperty.call(a,"class")){const l=o.classList;a.className=l.toString(),delete a.class,(A=t.botBubble)!=null&&A.showAvatar&&(a=Xa(l,a)),a=Ja(l,a,t,r),a=Za(l,a,t,r),a=$a(l,a,t,r),a=es(l,a,t,r)}if(["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr"].includes(s))return f.createElement(s,{key:i,...a});{const l=so(o.innerHTML,t,r);return f.createElement(s,{key:i,...a},...l)}}})},Xa=(e,t)=>((e.contains("rcb-options-container")||e.contains("rcb-checkbox-container"))&&(t.className=`${e.toString()} rcb-options-offset`),t),Ja=(e,t,r,n)=>{var o,i,A,s,a;return e.contains("rcb-options")&&(t.style={...t.style,color:((o=n.botOptionStyle)==null?void 0:o.color)??((i=r.general)==null?void 0:i.primaryColor),borderColor:((A=n.botOptionStyle)==null?void 0:A.color)??((s=r.general)==null?void 0:s.primaryColor),cursor:`url("${(a=r.general)==null?void 0:a.actionDisabledIcon}"), auto`,...n.botOptionStyle}),t},Za=(e,t,r,n)=>{var o,i,A,s,a;return e.contains("rcb-checkbox-row-container")&&(t.style={...t.style,color:((o=n.botCheckboxRowStyle)==null?void 0:o.color)??((i=r.general)==null?void 0:i.primaryColor),borderColor:((A=n.botCheckboxRowStyle)==null?void 0:A.color)??((s=r.general)==null?void 0:s.primaryColor),cursor:`url("${(a=r.general)==null?void 0:a.actionDisabledIcon}"), auto`,...n.botCheckboxRowStyle}),t},$a=(e,t,r,n)=>{var o,i,A,s,a;return e.contains("rcb-checkbox-next-button")&&(t.style={...t.style,color:((o=n.botCheckboxNextStyle)==null?void 0:o.color)??((i=r.general)==null?void 0:i.primaryColor),borderColor:((A=n.botCheckboxNextStyle)==null?void 0:A.color)??((s=r.general)==null?void 0:s.primaryColor),cursor:`url("${(a=r.general)==null?void 0:a.actionDisabledIcon}"), auto`,...n.botCheckboxNextStyle}),t},es=(e,t,r,n)=>{var o,i;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:(i=r.userBubble)!=null&&i.showAvatar?"65%":"70%",...n.mediaDisplayContainerStyle}),t},qn=()=>{const{settings:e}=ee(),{notificationsToggledOn:t,setSyncedNotificationsToggledOn:r,hasInteractedPage:n,unreadCount:o,setUnreadCount:i,syncedNotificationsToggledOnRef:A}=Pe(),{audioBufferRef:s,audioContextRef:a,gainNodeRef:l}=Ee(),{dispatchRcbEvent:c}=Je(),u=f.useCallback(async()=>{var p,g;const v=(p=e.notification)==null?void 0:p.sound;a.current=new AudioContext;const h=a.current.createGain();let w;if(h.gain.value=((g=e.notification)==null?void 0:g.volume)??.2,l.current=h,v!=null&&v.startsWith("data:audio")){const x=atob(v.split(",")[1]),m=new ArrayBuffer(x.length),k=new Uint8Array(m);for(let P=0;P<x.length;P++)k[P]=x.charCodeAt(P);w=m}else w=await(await fetch(v)).arrayBuffer();s.current=await a.current.decodeAudioData(w)},[e.notification]),d=f.useCallback(()=>{var p;if((p=e.notification)!=null&&p.disabled||!A.current||!n||!a.current||!s.current)return;const g=a.current.createBufferSource();g.buffer=s.current,g.connect(l.current).connect(a.current.destination),g.start()},[e.notification,A,n,a,s,l]);return{unreadCount:o,setUnreadCount:i,notificationsToggledOn:t,toggleNotifications:f.useCallback(async p=>{var g;p!==A.current&&((g=e.event)!=null&&g.rcbToggleNotifications&&(await c(q.TOGGLE_NOTIFICATIONS,{currState:A.current,newState:!A.current})).defaultPrevented||r(v=>!v))},[A]),playNotificationSound:d,setUpNotifications:u}},ts=(e,t)=>{var r,n,o,i;((A,s,a,l,c)=>{if(!window.SpeechSynthesisUtterance)return void console.info("Speech Synthesis API is not supported in this environment.");const u=new window.SpeechSynthesisUtterance;u.text=A,u.lang=s,u.rate=l,u.volume=c;let d=!1;for(const p of a){const g=window.speechSynthesis.getVoices().find(v=>v.name===p);if(g){u.voice=g,window.speechSynthesis.speak(u),d=!0;break}}d||window.speechSynthesis.speak(u)})(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,(i=e.audio)==null?void 0:i.volume)},Ao=()=>{const{settings:e}=ee(),{audioToggledOn:t,setSyncedAudioToggledOn:r,syncedAudioToggledOnRef:n}=Pe(),{dispatchRcbEvent:o}=Je(),i=f.useCallback(async s=>{var a;s!==n.current&&((a=e.event)!=null&&a.rcbToggleAudio&&(await o(q.TOGGLE_AUDIO,{currState:n.current,newState:!n.current})).defaultPrevented||r(l=>!l))},[n]),A=f.useCallback(async s=>{var a,l;if((a=e.audio)!=null&&a.disabled||!n.current)return;let c=s;if((l=e.event)!=null&&l.rcbStartSpeakAudio){const u=await o(q.START_SPEAK_AUDIO,{textToRead:c});if(u.defaultPrevented)return;c=u.data.textToRead}ts(e,c)},[e,n]);return{audioToggledOn:t,speakAudio:A,toggleAudio:i}},xt=()=>{var e,t,r;const{settings:n}=ee(),{messages:o,setSyncedMessages:i,syncedMessagesRef:A}=zn(),{setSyncedIsBotTyping:s,setUnreadCount:a,syncedIsScrollingRef:l,syncedIsChatWindowOpenRef:c}=Pe(),{streamMessageMap:u,chatBodyRef:d,paramsInputRef:p}=Ee(),{scrollToBottom:g,getIsChatBotVisible:v}=ze(),{dispatchRcbEvent:h}=Je(),{speakAudio:w}=Ao(),{playNotificationSound:x}=qn(),m=f.useCallback(async B=>{var M,F;if((M=n.event)!=null&&M.rcbSaveChatHistory){const N=await h(q.SAVE_CHAT_HISTORY,{messages:B});if(N.defaultPrevented)return;B=((F=N.data)==null?void 0:F.messages)??B}await(async N=>{if(io||!ft)return;const L=[];for(let U=N.length-1;U>=0;U--){const b=N[U];if(b.sender.toUpperCase()!=="SYSTEM"&&(b.content!==""&&L.unshift(b),L.length===pn))break}let O=L.map(Va);if(!oo&&O.length<pn){const U=pn-O.length;O=[...fn.slice(-U),...O]}ao(O)})(B)},[h,(e=n.event)==null?void 0:e.rcbSaveChatHistory]),k=f.useCallback((B,M=!1)=>{var F,N;m(B);let L=!0;const O=B[B.length-1];if(!O)return;const U=O.sender.toUpperCase();U==="USER"&&(L=!1),(F=n.general)!=null&&F.embedded&&v()&&(L=!1),(c.current&&!l.current||M)&&(L=!1),L&&x(),!M&&(U!=="USER"&&(N=n.chatWindow)!=null&&N.autoJumpToBottom||U==="USER"||!l.current)&&setTimeout(()=>g(),1)},[n,d,c,l,x,g,v]),P=f.useCallback(async(B,M="BOT",F=null)=>{var N,L,O,U,b;if(typeof B!="string")throw new Error("Content must be of type string to simulate stream.");M=M.toUpperCase();let R=pt(B,M);if((N=n.event)!=null&&N.rcbStartSimulateStreamMessage){const le=await h(q.START_SIMULATE_STREAM_MESSAGE,{message:R});if(le.defaultPrevented)return null;F=le.data.simulateStreamChunker||F,R=le.data.message}s(!1);let y=30;y=M==="BOT"?(L=n.botBubble)==null?void 0:L.streamSpeed:(O=n.userBubble)==null?void 0:O.streamSpeed;const G={...R,content:""};i(le=>[...le,G]),k(A.current);let Z=R.content;F&&(Z=F(Z));let K=0;const re=Z.length;R.sender.toUpperCase()==="BOT"&&(c.current||(U=n.general)!=null&&U.embedded)&&typeof R.content=="string"&&R.content.trim()!==""&&w(R.content);const Se=new Promise(le=>{const Ke=setInterval(()=>{if(K>=re)return clearInterval(Ke),void le();i(Ce=>{const j=[...Ce];for(let Y=j.length-1;Y>=0;Y--)if(j[Y].id===G.id){const ne=Z[K];ne&&(G.content+=ne,j[Y]=G),K++;break}return j})},y)});return(l.current||!c.current)&&a(le=>le+1),await Se,m(A.current),(b=n.event)!=null&&b.rcbStopSimulateStreamMessage&&await h(q.STOP_SIMULATE_STREAM_MESSAGE,{message:R}),M==="USER"&&(p.current=B),R},[n,h,k,A,p,s,a,c,w]),C=f.useCallback(async(B,M="BOT")=>{var F,N,L;M=M.toUpperCase();let O=pt(B,M);if((F=n.event)!=null&&F.rcbPreInjectMessage){const U=await h(q.PRE_INJECT_MESSAGE,{message:O});if(U.defaultPrevented)return null;O=U.data.message}return O.sender.toUpperCase()==="BOT"&&(c.current||(N=n.general)!=null&&N.embedded)&&typeof O.content=="string"&&O.content.trim()!==""&&w(O.content),(l.current||!c.current)&&a(U=>U+1),(L=n.event)!=null&&L.rcbPostInjectMessage&&await h(q.POST_INJECT_MESSAGE,{message:O}),i(U=>[...U,O]),k(A.current),M==="USER"&&typeof B=="string"&&(p.current=B),O},[n,h,k,p,A,c,w,a]),S=f.useCallback(async B=>{var M;let F=A.current.find(O=>O.id===B),N=null,L=!1;return F||(N=Wt(),F=N.find(O=>O.id===B),F&&(L=!0)),!F||(M=n.event)!=null&&M.rcbRemoveMessage&&(await h(q.REMOVE_MESSAGE,{message:F})).defaultPrevented?null:L?(N&&Rn(N.filter(O=>O.id!==B)),F):(i(O=>O.filter(U=>U.id!==B)),k(A.current),a(O=>Math.max(O-1,0)),F)},[h,(t=n.event)==null?void 0:t.rcbRemoveMessage,k,A,a,Wt,Rn]),I=f.useCallback(async(B,M="BOT")=>{var F,N;if(M=M.toUpperCase(),!u.current.has(M)){const O=pt(B,M);return(F=n.event)!=null&&F.rcbStartStreamMessage&&(await h(q.START_STREAM_MESSAGE,{message:O})).defaultPrevented?null:(s(!1),i(U=>[...U,O]),k(A.current),u.current.set(M,O.id),(l.current||!c.current)&&a(U=>U+1),O)}const L={...pt(B,M),id:u.current.get(M)};return(N=n.event)!=null&&N.rcbChunkStreamMessage&&(await h(q.CHUNK_STREAM_MESSAGE,{message:L})).defaultPrevented?null:(i(O=>O.map(U=>U.id===L.id?L:U)),k(A.current,!0),L)},[h,n.event,k,A,s,a,u]),Q=f.useCallback(async(B="BOT")=>{var M;if(B=B.toUpperCase(),!u.current.has(B))return!0;const F=u.current.get(B);let N;for(let L=0;L<3;L++){const O=A.current.find(U=>U.id===F);O&&(N=O),await new Promise(U=>setTimeout(U,20))}return((M=n.event)==null||!M.rcbStopStreamMessage||!(await h(q.STOP_STREAM_MESSAGE,{message:N})).defaultPrevented)&&(u.current.delete(B),m(A.current),B==="USER"&&typeof(N==null?void 0:N.content)=="string"&&(p.current=N.content),!0)},[h,(r=n.event)==null?void 0:r.rcbStopStreamMessage,u,p]),D=f.useCallback(B=>{const M=typeof B=="function"?B(A.current):B;i(M),k(M)},[k,A]),_=f.useCallback((B,M,F=0)=>{var N;const L=A.current,O=B?B.toUpperCase():null,U=[];let b=F;for(let R=L.length-1;R>=0;R--){const y=L[R];if(!O||((N=y==null?void 0:y.sender)==null?void 0:N.toUpperCase())===O){if(b>0){b--;continue}if(U.push(y),M!==void 0&&U.length===M)break}}return U.length>0?U:null},[A]);return{simulateStreamMessage:P,injectMessage:C,removeMessage:S,streamMessage:I,endStreamMessage:Q,replaceMessages:D,getMessages:_,messages:o}};let Gn,Ze,hn,ht=!1,$e=null;const Yn=()=>{if(!Gn){const e=window.SpeechRecognition||window.webkitSpeechRecognition;Gn=e!=null?new e:null}return Gn},ns=(e,t,r,n,o,i)=>{var A,s,a;const l=Yn();if(!l)return;if(!ht)try{ht=!0,l.lang=(A=e.voice)==null?void 0:A.language,l.start()}catch{}const c=(s=e.voice)==null?void 0:s.timeoutPeriod,u=(a=e.voice)==null?void 0:a.autoSendPeriod;l.onresult=d=>{var p,g;clearTimeout(Ze),Ze=null,clearTimeout(hn);const v=d.results[d.results.length-1][0].transcript;if(i.current){const h=(p=e.chatInput)==null?void 0:p.characterLimit,w=i.current.value+v;h!=null&&h>=0&&w.length>h?n(w.slice(0,h)):n(w),o(i.current.value.length)}c&&(Ze=setTimeout(async()=>await Kn(t,i),c)),(g=e.voice)!=null&&g.autoSendDisabled||(hn=setTimeout(r,u))},l.onend=()=>{ht?(l.start(),!Ze&&c&&(Ze=setTimeout(async()=>await Kn(t,i),c))):(clearTimeout(Ze),Ze=null,clearTimeout(hn))},c&&(Ze=setTimeout(async()=>await Kn(t,i),c))},rs=(e,t)=>{navigator.mediaDevices.getUserMedia({audio:!0}).then(r=>{if($e=new MediaRecorder(r),!ht)try{ht=!0,$e.start()}catch{}$e.ondataavailable=n=>{t.current&&t.current.push(n.data)},$e.onstop=()=>{e(),r.getTracks().forEach(n=>n.stop())}}).catch(r=>{console.error("Unable to use microphone:",r)})},Wn=()=>{const e=Yn();e&&(ht=!1,e&&e.stop(),$e&&$e.state!=="inactive"&&($e.stop(),$e=null),clearTimeout(Ze),Ze=null,clearTimeout(hn))},Kn=async(e,t)=>{var r;(r=t.current)!=null&&r.disabled||await e(),Wn()},Vn=()=>{const{settings:e}=ee(),{voiceToggledOn:t,setSyncedVoiceToggledOn:r,syncedVoiceToggledOnRef:n}=Pe(),{dispatchRcbEvent:o}=Je(),i=f.useCallback(async s=>{var a;s!==n.current&&((a=e.event)!=null&&a.rcbToggleVoice&&(await o(q.TOGGLE_VOICE,{currState:n.current,newState:!n.current})).defaultPrevented||r(l=>!l))},[n]),A=f.useCallback(s=>{((a,l)=>{var c,u,d;const p=Yn();(c=l.voice)!=null&&c.disabled||(u=l.chatInput)==null||!u.blockSpam||!p||(a&&!ht?(ht=!0,(d=l.voice)!=null&&d.sendAsAudio?$e==null||$e.start():p.start()):a||Wn())})(s,e)},[e]);return{voiceToggledOn:t,toggleVoice:i,syncVoice:A}},Et=()=>{var e;const{settings:t}=ee(),{inputLength:r,setInputLength:n,textAreaDisabled:o,setSyncedTextAreaDisabled:i,textAreaSensitiveMode:A,setSyncedTextAreaSensitiveMode:s,syncedTextAreaDisabledRef:a,syncedTextAreaSensitiveModeRef:l}=Pe(),{inputRef:c,chatBodyRef:u,prevInputRef:d}=Ee(),{dispatchRcbEvent:p}=Je(),{getIsChatBotVisible:g}=ze(),v=f.useCallback(async C=>{var S,I,Q;if(a.current&&c.current)c.current.value="";else if(c.current&&d.current!==null){const D=(S=t.chatInput)==null?void 0:S.characterLimit,_=(I=t.chatInput)!=null&&I.allowNewline?C:C.replace(/\n/g," ");if(D!=null&&D>=0&&_.length>D?c.current.value=_.slice(0,D):c.current.value=_,(Q=t.event)!=null&&Q.rcbTextAreaChangeValue&&(await p(q.TEXT_AREA_CHANGE_VALUE,{currValue:c.current.value,prevValue:d.current})).defaultPrevented)return void(c.current.value=d.current);d.current=c.current.value}},[a,c,d,t,p]),h=f.useCallback(C=>{var S;(S=c.current)!=null&&S.disabled||setTimeout(()=>{var I,Q,D;(I=t.general)!=null&&I.embedded?g()&&((Q=c.current)==null||Q.focus()):C!=="start"&&((D=c.current)==null||D.focus())},100)},[c,(e=t.general)==null?void 0:e.embedded,u,g]),w=f.useCallback(()=>{c.current&&c.current.focus()},[]),x=f.useCallback(()=>{c.current&&c.current.blur()},[]),m=f.useCallback(()=>c&&c.current?c.current.value:"",[]),k=f.useCallback(C=>{C!==a.current&&i(S=>!S)},[a]),P=f.useCallback(C=>{C!==l.current&&s(S=>!S)},[l]);return{textAreaDisabled:o,setSyncedTextAreaDisabled:i,textAreaSensitiveMode:A,setSyncedTextAreaSensitiveMode:s,inputLength:r,setInputLength:n,getTextAreaValue:m,setTextAreaValue:v,updateTextAreaFocus:h,focusTextArea:w,blurTextArea:x,toggleTextAreaDisabled:k,toggleTextAreaSensitiveMode:P}},lo=f.createContext({toasts:[],setSyncedToasts:()=>{},syncedToastsRef:{current:[]}}),co=()=>f.useContext(lo),os=({children:e})=>{const[t,r,n]=Fe([]);return E.jsx(lo.Provider,{value:{toasts:t,setSyncedToasts:r,syncedToastsRef:n},children:e})},Bt=()=>{const{settings:e}=ee(),{toasts:t,setSyncedToasts:r,syncedToastsRef:n}=co(),{dispatchRcbEvent:o}=Je(),i=f.useCallback(async(a,l)=>{var c,u,d,p;let g=null;if(n.current.length>=(((c=e.toast)==null?void 0:c.maxCount)??3)){if((u=e.toast)!=null&&u.forbidOnMax)return null;g=un();let h={id:g,content:a,timeout:l};if((d=e.event)!=null&&d.rcbShowToast){const w=await o(q.SHOW_TOAST,{toast:h});if(w.defaultPrevented)return null;h=w.data.toast}return r(w=>[...w.slice(1),h]),g}g=un();let v={id:g,content:a,timeout:l};if((p=e.event)!=null&&p.rcbShowToast){const h=await o(q.SHOW_TOAST,{toast:v});if(h.defaultPrevented)return null;v=h.data.toast}return r(h=>[...h,v]),g},[e,o]),A=f.useCallback(async a=>{var l;const c=n.current.find(u=>u.id===a);return!c||(l=e.event)!=null&&l.rcbDismissToast&&(await o(q.DISMISS_TOAST,{toast:c})).defaultPrevented?null:(r(u=>u.filter(d=>d.id!==a)),a)},[o]),s=f.useCallback(a=>{const l=typeof a=="function"?a(n.current):a;r(l)},[n]);return{showToast:i,dismissToast:A,toasts:t,replaceToasts:s}},gn=()=>{var e,t,r,n,o;const{settings:i}=ee(),{paths:A,setSyncedPaths:s,syncedPathsRef:a}=Yt(),{flowRef:l,streamMessageMap:c,paramsInputRef:u,keepVoiceOnRef:d,timeoutIdRef:p}=Ee(),{setSyncedIsBotTyping:g,setSyncedTextAreaDisabled:v,setSyncedTextAreaSensitiveMode:h,blockAllowsAttachment:w,setBlockAllowsAttachment:x}=Pe(),{dispatchRcbEvent:m}=Je(),{endStreamMessage:k,injectMessage:P,removeMessage:C,simulateStreamMessage:S,streamMessage:I}=xt(),{showToast:Q,dismissToast:D}=Bt(),{toggleChatWindow:_}=ze(),{updateTextAreaFocus:B,setTextAreaValue:M}=Et(),{syncVoice:F}=Vn(),N=f.useCallback(async y=>{var G;if((G=i.event)!=null&&G.rcbPostProcessBlock){const Z=await m(q.POST_PROCESS_BLOCK,{block:y});if(Z.defaultPrevented)return null;y=Z.data.block}return y},[(e=i.event)==null?void 0:e.rcbPostProcessBlock,m]),L=f.useCallback(async(y,G)=>{var Z,K,re,Se;if(!y)return;let le=l.current[y];if(!le)return void g(!1);if((Z=i.event)!=null&&Z.rcbPreProcessBlock){const Ce=await m(q.PRE_PROCESS_BLOCK,{block:le});if(Ce.defaultPrevented)return;le=Ce.data.block}g(!0),(K=i.chatInput)!=null&&K.blockSpam&&v(!0),h(!1);const Ke={prevPath:G,currPath:y,goToPath:b,setTextAreaValue:M,userInput:u.current,endStreamMessage:k,injectMessage:P,removeMessage:C,simulateStreamMessage:S,streamMessage:I,toggleChatWindow:_,showToast:Q,dismissToast:D};await(async(Ce,j,Y,ne,te,ie,ce)=>{if(!Ce)throw new Error("Block is not valid.");for(const se of Object.keys(Ce))switch(se){case"message":await za(Ce,j,Y);break;case"options":await ja(Ce,j);break;case"checkboxes":await Ua(Ce,j);break;case"component":await qa(Ce,j);break;case"chatDisabled":await Ya(Ce,j,te);break;case"isSensitive":await no(Ce,j,ie);break;case"transition":await Ga(Ce,j,ne,ce)}})(le,Ke,((re=i.botBubble)==null?void 0:re.simulateStream)??!1,p,v,h,N),g(!1),"chatDisabled"in le||v((Se=i.chatInput)==null?void 0:Se.disabled),"isSensitive"in le||h(!1),x(typeof le.file=="function"),B(y),F(d.current&&!le.chatDisabled),y!==G&&c.current.clear()},[l,B,F,(t=i.botBubble)==null?void 0:t.simulateStream,(r=i.chatInput)==null?void 0:r.disabled,u,k,P,C,S,I,_,Q,D,d,c]),O=f.useCallback(()=>a.current.length>0?a.current.at(-1)??null:null,[]),U=f.useCallback(()=>a.current.length>1?a.current.at(-2)??null:null,[]),b=f.useCallback(async y=>{var G;const Z=O(),K=U();return((G=i.event)==null||!G.rcbChangePath||!(await m(q.CHANGE_PATH,{currPath:Z,prevPath:K,nextPath:y})).defaultPrevented)&&(s(re=>[...re,y]),await L(y,Z),!0)},[(n=i.chatInput)==null?void 0:n.blockSpam,(o=i.event)==null?void 0:o.rcbChangePath,L,m]),R=f.useCallback(y=>{const G=typeof y=="function"?y(a.current):y;s(G)},[a]);return{getCurrPath:O,getPrevPath:U,goToPath:b,blockAllowsAttachment:w,setBlockAllowsAttachment:x,paths:A,replacePaths:R,firePostProcessBlockEvent:N}},Dt=()=>{var e,t,r,n;const{settings:o}=ee(),{endStreamMessage:i,injectMessage:A,removeMessage:s,simulateStreamMessage:a,streamMessage:l}=xt(),{syncedPathsRef:c}=Yt(),{getCurrPath:u,getPrevPath:d,goToPath:p,firePostProcessBlockEvent:g}=gn(),{setSyncedTextAreaSensitiveMode:v,setSyncedTextAreaDisabled:h,setSyncedIsBotTyping:w,setBlockAllowsAttachment:x,setInputLength:m,syncedVoiceToggledOnRef:k,syncedTextAreaSensitiveModeRef:P}=Pe(),{flowRef:C,inputRef:S,keepVoiceOnRef:I,paramsInputRef:Q,timeoutIdRef:D}=Ee(),{showToast:_,dismissToast:B}=Bt(),{dispatchRcbEvent:M}=Je(),{syncVoice:F}=Vn(),{setTextAreaValue:N}=Et(),{toggleChatWindow:L}=ze(),O=f.useCallback(async b=>{var R,y,G,Z,K,re;const Se=u();if(Se&&C.current[Se]){if(P.current){if((R=o==null?void 0:o.sensitiveInput)!=null&&R.hideInUserBubble)return;if((y=o==null?void 0:o.sensitiveInput)!=null&&y.maskInUserBubble)return void((G=o.userBubble)!=null&&G.simulateStream?await a("*".repeat(((Z=o.sensitiveInput)==null?void 0:Z.asterisksCount)??10),"USER"):await A("*".repeat(((K=o.sensitiveInput)==null?void 0:K.asterisksCount)??10),"USER"))}(re=o.userBubble)!=null&&re.simulateStream?await a(b,"USER"):await A(b,"USER")}},[C,u,o,A,a,P]),U=f.useCallback(async(b,R=!0)=>{var y,G;if((b=b.trim())==="")return;R&&await O(b),D.current&&clearTimeout(D.current),S.current&&(N(""),m(0));const Z=u();if(!Z)return;let K=C.current[Z];const re=await g(K);re&&((y=o.chatInput)!=null&&y.blockSpam&&h(!0),I.current=k.current,F(!1),setTimeout(()=>{w(!0)},400),v(!1),setTimeout(async()=>{var Se;const le={prevPath:d(),currPath:u(),goToPath:p,setTextAreaValue:N,userInput:Q.current,injectMessage:A,simulateStreamMessage:a,streamMessage:l,removeMessage:s,endStreamMessage:i,toggleChatWindow:L,showToast:_,dismissToast:B},Ke=c.current.length;await ro(re,le),c.current.length===Ke&&(h("chatDisabled"in K?!!K.chatDisabled:!((Se=o.chatInput)==null||!Se.disabled)),no(K,le,v),x(typeof K.file=="function"),F(I.current),w(!1))},(G=o.chatInput)==null?void 0:G.botDelay))},[D,(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,k,F,O,d,u,p,A,a,l,s,i,L,_,B,C]);return{handleSubmitText:f.useCallback(async(b,R=!0)=>{var y,G;b=b??((y=S.current)==null?void 0:y.value),!((G=o.event)!=null&&G.rcbUserSubmitText&&(await M(q.USER_SUBMIT_TEXT,{inputText:b,sendInChat:R})).defaultPrevented||!u())&&U(b,R)},[M,u,U,S,(n=o.event)==null?void 0:n.rcbUserSubmitText])}},mn=()=>{var e;const{settings:t}=ee();return f.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),i=window.innerWidth>=768;return o&&i},[(e=t.device)==null?void 0:e.applyMobileOptimizations])},is=({buttons:e})=>{var t,r,n,o,i,A,s,a,l,c,u;const d=mn(),{settings:p}=ee(),{styles:g}=Ae(),{textAreaDisabled:v,textAreaSensitiveMode:h,inputLength:w,hasFlowStarted:x,setHasFlowStarted:m,setInputLength:k}=Pe(),{inputRef:P}=Ee(),[C,S]=f.useState(!1),[I,Q]=f.useState(!1),{handleSubmitText:D}=Dt(),{setTextAreaValue:_}=Et(),B={boxSizing:d?"content-box":"border-box",...g.chatInputAreaStyle},M={outline:v?"":"none",boxShadow:v?"":`0 0 5px ${(t=p.general)==null?void 0:t.primaryColor}`,boxSizing:d?"content-box":"border-box",...g.chatInputAreaStyle,...g.chatInputAreaFocusedStyle},F={cursor:`url("${(r=p.general)==null?void 0:r.actionDisabledIcon}"), auto`,caretColor:"transparent",boxSizing:d?"content-box":"border-box",...g.chatInputAreaStyle,...g.chatInputAreaDisabledStyle},N={color:"#989898",...g.characterLimitStyle},L={color:"#ff0000",...g.characterLimitReachedStyle},O=v?(n=p.chatInput)==null?void 0:n.disabledPlaceholderText:(o=p.chatInput)==null?void 0:o.enabledPlaceholderText,U=()=>{v||S(!0)},b=()=>{S(!1)},R=()=>{Q(!0)},y=()=>{Q(!1)},G=async K=>{var re;if(!I&&K.key==="Enter"){if(K.shiftKey)return void((re=p.chatInput)!=null&&re.allowNewline||K.preventDefault());K.preventDefault(),await D()}},Z=K=>{P.current&&(_(K.target.value),k(P.current.value.length))};return E.jsxs("div",{"aria-label":((i=p.ariaLabel)==null?void 0:i.inputTextArea)??"input text area",role:"textbox",onMouseDown:K=>{var re;K.stopPropagation(),!x&&((re=p.general)==null?void 0:re.flowStartTrigger)==="ON_CHATBOT_INTERACT"&&m(!0)},style:{...g.chatInputContainerStyle},className:"rcb-chat-input",children:[h&&(A=p.sensitiveInput)!=null&&A.maskInTextArea?E.jsx("input",{ref:P,type:"password",className:"rcb-chat-input-textarea",style:v?F:C?M:B,placeholder:O,onChange:Z,onKeyDown:G,onFocus:U,onBlur:b,onCompositionStart:R,onCompositionEnd:y}):E.jsx("textarea",{ref:P,style:v?F:C?M:B,rows:1,className:"rcb-chat-input-textarea",placeholder:O,onChange:Z,onKeyDown:G,onFocus:U,onBlur:b,onCompositionStart:R,onCompositionEnd:y}),E.jsxs(E.Fragment,{children:[e==null?void 0:e.map((K,re)=>E.jsx(f.Fragment,{children:K},re)),((s=p.chatInput)==null?void 0:s.showCharacterCount)&&((a=p.chatInput)==null?void 0:a.characterLimit)!=null&&((l=p.chatInput)==null?void 0:l.characterLimit)>0&&E.jsxs("div",{className:"rcb-chat-input-char-counter",style:w>=((c=p.chatInput)==null?void 0:c.characterLimit)?L:N,children:[w,"/",(u=p.chatInput)==null?void 0:u.characterLimit]})]})]})},as=({buttons:e})=>{var t;const{settings:r}=ee(),{styles:n}=Ae();return E.jsxs("div",{"data-testid":"chatbot-footer-container",style:{...n.footerStyle},className:"rcb-chat-footer-container",children:[E.jsx("div",{className:"rcb-chat-footer",children:e==null?void 0:e.map((o,i)=>E.jsx(f.Fragment,{children:o},i))}),E.jsx("span",{children:(t=r.footer)==null?void 0:t.text})]})},ss=()=>{var e,t,r,n,o,i,A;const{settings:s}=ee(),{styles:a}=Ae(),{unreadCount:l}=Pe(),{isChatWindowOpen:c,toggleChatWindow:u}=ze(),[d,p]=f.useState(!1),g={backgroundImage:`linear-gradient(to right, ${(e=s.general)==null?void 0:e.secondaryColor},
3
- ${(t=s.general)==null?void 0:t.primaryColor})`,...a.chatButtonStyle},v={transform:"scale(1.05)",...g,...a.chatButtonHoveredStyle},h={backgroundImage:`url(${(r=s.chatButton)==null?void 0:r.icon})`,fill:"#fff",width:75,height:75,...a.chatIconStyle};return E.jsx(E.Fragment,{children:!((n=s.general)!=null&&n.embedded)&&E.jsxs("div",{"aria-label":((o=s.ariaLabel)==null?void 0:o.chatButton)??"open chat",role:"button",style:d?v:g,className:"rcb-toggle-button "+(c?"rcb-button-hide":"rcb-button-show"),onMouseEnter:()=>{p(!0)},onMouseLeave:()=>{p(!1)},onClick:()=>u(!0),children:[(()=>{var w;const x=(w=s.chatButton)==null?void 0:w.icon;return x&&typeof x!="string"?x&&E.jsx("span",{className:"rcb-toggle-icon",children:E.jsx(x,{style:h})}):E.jsx("span",{className:"rcb-toggle-icon",style:h})})(),!((i=s.notification)!=null&&i.disabled)&&((A=s.notification)==null?void 0:A.showCount)&&E.jsx("span",{style:{...a.notificationBadgeStyle},className:"rcb-badge",children:l})]})})},As=()=>{var e,t,r,n,o,i;const A=mn(),{settings:s}=ee(),{styles:a}=Ae(),{chatBodyRef:l}=Ee(),{isChatWindowOpen:c,toggleChatWindow:u}=ze(),[d,p]=f.useState(!1),[g,v]=f.useState(!1),[h,w]=f.useState(0);f.useEffect(()=>{var k,P,C;const S=(k=s.tooltip)==null?void 0:k.mode;if(S==="ALWAYS")if(A){let I;I=c?(((P=l.current)==null?void 0:P.offsetWidth)??375)-(typeof((C=a.chatButtonStyle)==null?void 0:C.width)=="number"?a.chatButtonStyle.width:75):0,w(I),p(!0)}else p(!c);else S==="NEVER"?p(!1):S==="START"?g?p(!1):(v(!0),p(!0)):S==="CLOSE"&&p(!c)},[c,A,g,(e=a.chatButtonStyle)==null?void 0:e.width,(t=s.tooltip)==null?void 0:t.mode]);const x={transform:`translateX(-${h}px)`,right:(((r=a.chatButtonStyle)==null?void 0:r.width)??75)+40,bottom:30,backgroundColor:(n=s.general)==null?void 0:n.secondaryColor,color:"#fff",...a.tooltipStyle},m={borderColor:`transparent transparent transparent ${x.backgroundColor}`};return E.jsx(E.Fragment,{children:!((o=s.general)!=null&&o.embedded)&&E.jsxs("div",{"data-testid":"chat-tooltip",style:x,className:"rcb-chat-tooltip "+(d?"rcb-tooltip-show":"rcb-tooltip-hide"),onClick:()=>u(!0),children:[E.jsx("span",{children:(i=s.tooltip)==null?void 0:i.text}),E.jsx("span",{className:"rcb-chat-tooltip-tail",style:m})]})})},ls=({id:e,content:t,timeout:r})=>{var n,o;const{settings:i}=ee(),{styles:A}=Ae(),[s]=f.useState({toastPromptStyle:{...A.toastPromptStyle},toastPromptHoveredStyle:{...A.toastPromptHoveredStyle}}),{dismissToast:a}=Bt(),[l,c]=f.useState(!1),u={color:(n=i.general)==null?void 0:n.primaryColor,borderColor:(o=i.general)==null?void 0:o.primaryColor,...s.toastPromptHoveredStyle};return f.useEffect(()=>{if(r){const d=setTimeout(()=>{a(e)},r);return()=>clearTimeout(d)}},[e,a,r]),typeof t=="string"?E.jsx("div",{onMouseEnter:()=>{c(!0)},onMouseLeave:()=>{c(!1)},style:l?u:s.toastPromptStyle,onMouseDown:async d=>{var p;(p=i.toast)!=null&&p.dismissOnClick&&(d.preventDefault(),await a(e))},className:"rcb-toast-prompt",children:t}):E.jsx(E.Fragment,{children:t})},cs=()=>{var e,t,r,n,o,i,A,s,a,l,c,u;const{styles:d}=Ae(),{toasts:p}=co(),g={bottom:`calc(${typeof((e=d.footerStyle)==null?void 0:e.height)=="number"?`${(t=d.footerStyle)==null?void 0:t.height}px`:((r=d.footerStyle)==null?void 0:r.height)??"50px"} + ${typeof((n=d.chatInputContainerStyle)==null?void 0:n.height)=="number"?`${(o=d.chatInputContainerStyle)==null?void 0:o.height}px`:((i=d.chatInputContainerStyle)==null?void 0:i.height)??"70px"} + 20px)`,width:300,minWidth:`calc(${typeof((A=d.chatWindowStyle)==null?void 0:A.width)=="number"?`${(s=d.chatWindowStyle)==null?void 0:s.width}px`:((a=d.chatWindowStyle)==null?void 0:a.width)??"375px"} / 2)`,maxWidth:`calc(${typeof((l=d.chatWindowStyle)==null?void 0:l.width)=="number"?`${(c=d.chatWindowStyle)==null?void 0:c.width}px`:((u=d.chatWindowStyle)==null?void 0:u.width)??"375px"} - 50px)`,...d.toastPromptContainerStyle};return E.jsx("div",{className:"rcb-toast-prompt-container",style:g,children:p.map(v=>E.jsx(ls,{id:v.id,content:v.content,timeout:v.timeout},v.id))})},uo=({file:e,fileType:t,fileUrl:r})=>{var n,o,i;const{settings:A}=ee(),{styles:s}=Ae(),a={backgroundColor:(n=A.general)==null?void 0:n.primaryColor,maxWidth:(o=A.userBubble)!=null&&o.showAvatar?"65%":"70%",...s.mediaDisplayContainerStyle};return E.jsx(E.Fragment,{children:r?E.jsxs(E.Fragment,{children:[t==="image"&&r&&E.jsx("div",{style:a,className:"rcb-media-display-image-container rcb-media-entry","data-testid":"media-display-image-container",children:E.jsx("img",{src:r,alt:"Image Display",className:"rcb-media-display-image"})}),t==="video"&&r&&E.jsx("div",{style:a,className:"rcb-media-display-video-container rcb-media-entry","data-testid":"media-display-video-container",children:E.jsxs("video",{controls:!0,className:"rcb-media-display-video",children:[E.jsx("source",{src:r,type:e.type}),"Your browser does not support the video tag."]})}),t==="audio"&&r&&E.jsxs("audio",{"data-testid":"media-display-audio-container",style:{maxWidth:(i=A.userBubble)!=null&&i.showAvatar?"65%":"70%"},controls:!0,className:"rcb-media-display-audio rcb-media-entry",children:[E.jsx("source",{src:r,type:e.type}),"Your browser does not support the audio tag."]})]}):E.jsx(E.Fragment,{})})},po=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}}},us=()=>{var e,t,r,n,o,i;const{settings:A}=ee(),{styles:s}=Ae(),{injectMessage:a,simulateStreamMessage:l,streamMessage:c,removeMessage:u,endStreamMessage:d}=xt(),{getCurrPath:p,getPrevPath:g,goToPath:v,blockAllowsAttachment:h}=gn(),{flowRef:w,inputRef:x}=Ee(),m=w.current,{showToast:k,dismissToast:P}=Bt(),{dispatchRcbEvent:C}=Je(),{toggleChatWindow:S}=ze(),{setTextAreaValue:I}=Et(),{handleSubmitText:Q}=Dt(),D={cursor:`url("${(e=A.general)==null?void 0:e.actionDisabledIcon}"), auto`,...s.fileAttachmentButtonStyle,...s.fileAttachmentButtonDisabledStyle},_={backgroundImage:`url(${(t=A.fileAttachment)==null?void 0:t.icon})`,fill:"#a6a6a6",...s.fileAttachmentIconStyle},B={backgroundImage:`url(${(r=A.fileAttachment)==null?void 0:r.icon})`,fill:"#a6a6a6",...s.fileAttachmentIconStyle,...s.fileAttachmentIconDisabledStyle};return E.jsxs("label",{"aria-label":((n=A.ariaLabel)==null?void 0:n.fileAttachmentButton)??"upload file",role:"button",className:h?"rcb-attach-button-enabled":"rcb-attach-button-disabled",style:h?{...s.fileAttachmentButtonStyle}:D,children:[E.jsx("input",{className:"rcb-attach-input",role:"file",type:"file",onChange:async M=>{var F,N,L,O;const U=M.target.files;if(!U)return;const b=Array.from(U);if(M.target.value="",(F=A.event)!=null&&F.rcbUserUploadFile&&(await C(q.USER_UPLOAD_FILE,{files:b})).defaultPrevented)return;const R=p();if(!R)return;const y=m[R];if(!y)return;const G=y.file;if(G!=null){const Z=[];for(let K=0;K<b.length;K++){if(Z.push(b[K].name),(N=A.fileAttachment)==null||!N.showMediaDisplay)continue;const re=await po(b[K]);!re.fileType||!re.fileUrl||await a(E.jsx(uo,{file:b[K],fileType:re.fileType,fileUrl:re.fileUrl}),"USER")}await Q("📄 "+Z.join(", "),(L=A.fileAttachment)==null?void 0:L.sendFileName),await G({userInput:(O=x.current)==null?void 0:O.value,prevPath:g(),currPath:p(),goToPath:v,setTextAreaValue:I,injectMessage:a,simulateStreamMessage:l,streamMessage:c,removeMessage:u,endStreamMessage:d,toggleChatWindow:S,showToast:k,dismissToast:P,files:b})}},multiple:(o=A.fileAttachment)==null?void 0:o.multiple,accept:(i=A.fileAttachment)==null?void 0:i.accept,disabled:!h}),(()=>{var M,F;const N=h?(M=A.fileAttachment)==null?void 0:M.icon:(F=A.fileAttachment)==null?void 0:F.iconDisabled;return N&&typeof N!="string"?N&&E.jsx("span",{className:h?"rcb-attach-icon-enabled":"rcb-attach-icon-disabled",children:E.jsx(N,{style:h?_:B})}):E.jsx("span",{className:h?"rcb-attach-icon-enabled":"rcb-attach-icon-disabled",style:h?_:B})})()]})},ds=()=>{var e,t,r,n,o,i;const{settings:A}=ee(),{styles:s}=Ae(),{syncedTextAreaDisabledRef:a}=Pe(),{inputRef:l}=Ee(),{textAreaDisabled:c,setTextAreaValue:u}=Et(),d=f.useRef(null),p=f.useRef(null),[g,v]=f.useState(!1),h={cursor:`url("${(e=A.general)==null?void 0:e.actionDisabledIcon}"), auto`,...s.emojiButtonStyle,...s.emojiButtonDisabledStyle},w={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 f.useEffect(()=>{const m=P=>{const C=P.composedPath();d.current&&!C.includes(d.current)&&p.current&&!C.includes(p.current)&&v(!1)},k=()=>{(()=>{if(d.current&&p.current){const P=p.current.getBoundingClientRect(),C=d.current.offsetHeight,S=P.top-C-8;d.current.style.left=`${P.left}px`,d.current.style.top=`${S}px`}})()};return document.addEventListener("mousedown",m),window.addEventListener("resize",k),()=>{document.removeEventListener("mousedown",m),window.removeEventListener("resize",k)}},[]),E.jsxs(E.Fragment,{children:[E.jsx("div",{"aria-label":((n=A.ariaLabel)==null?void 0:n.emojiButton)??"emoji picker",role:"button",ref:p,className:c?"rcb-emoji-button-disabled":"rcb-emoji-button-enabled",style:c?h:{...s.emojiButtonStyle},onMouseDown:m=>{m.preventDefault(),a.current?v(!1):v(k=>!k)},children:(()=>{var m,k;const P=c?(m=A.emoji)==null?void 0:m.iconDisabled:(k=A.emoji)==null?void 0:k.icon;return P&&typeof P!="string"?P&&E.jsx("span",{className:c?"rcb-emoji-icon-disabled":"rcb-emoji-icon-enabled",children:E.jsx(P,{style:c?x:w})}):E.jsx("span",{className:c?"rcb-emoji-icon-disabled":"rcb-emoji-icon-enabled",style:c?x:w})})()}),g&&E.jsx("div",{className:"rcb-emoji-button-popup",ref:d,children:(i=(o=A.emoji)==null?void 0:o.list)==null?void 0:i.map((m,k)=>E.jsx("span",{className:"rcb-emoji",onMouseDown:P=>((C,S)=>{C.preventDefault(),l.current&&(u(l.current.value+S),setTimeout(()=>{const I=l.current;if(I){I.focus();const Q=I.value.length;I.setSelectionRange(Q,Q)}},50)),v(!1)})(P,m),children:m},k))})]})},ps=()=>{var e,t,r;const{settings:n}=ee(),{styles:o}=Ae(),{audioToggledOn:i,toggleAudio:A}=Ao(),s={backgroundImage:`url(${(e=n.audio)==null?void 0:e.icon})`,fill:"#fcec3d",...o.audioIconStyle},a={backgroundImage:`url(${(t=n.audio)==null?void 0:t.iconDisabled})`,fill:"#e8eaed",...o.audioIconStyle,...o.audioIconDisabledStyle};return E.jsx("div",{"aria-label":((r=n.ariaLabel)==null?void 0:r.audioButton)??"toggle audio",role:"button",onMouseDown:async l=>{l.preventDefault(),await A()},style:i?{...o.audioButtonStyle}:{...o.audioButtonStyle,...o.audioButtonDisabledStyle},children:(()=>{var l,c;const u=i?(l=n.audio)==null?void 0:l.icon:(c=n.audio)==null?void 0:c.iconDisabled;return u&&typeof u!="string"?u&&E.jsx("span",{className:"rcb-audio-icon","data-testid":"rcb-audio-icon",children:E.jsx(u,{style:i?s:a,"data-testid":"rcb-audio-icon-svg"})}):E.jsx("span",{className:"rcb-audio-icon","data-testid":"rcb-audio-icon",style:i?s:a})})()})},fs=()=>{var e,t;const{settings:r}=ee(),{styles:n}=Ae(),{toggleChatWindow:o}=ze(),i={backgroundImage:`url(${(e=r.header)==null?void 0:e.closeChatIcon})`,fill:"#e8eaed",stroke:"#e8eaed",...n.closeChatIconStyle};return E.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&&E.jsx("span",{className:"rcb-close-chat-icon","data-testid":"rcb-close-chat-icon",children:E.jsx(s,{style:i})}):E.jsx("span",{className:"rcb-close-chat-icon","data-testid":"rcb-close-chat-icon",style:i})})()})},hs=()=>{var e,t,r;const{settings:n}=ee(),{styles:o}=Ae(),{notificationsToggledOn:i,toggleNotifications:A}=(()=>{const{notificationsToggledOn:l,toggleNotifications:c,playNotificationSound:u}=qn();return{notificationsToggledOn:l,toggleNotifications:c,playNotificationSound:u}})(),s={backgroundImage:`url(${(e=n.notification)==null?void 0:e.icon})`,fill:"#fcec3d",...o.notificationIconStyle},a={backgroundImage:`url(${(t=n.notification)==null?void 0:t.iconDisabled})`,fill:"#e8eaed",...o.notificationIconStyle,...o.notificationIconDisabledStyle};return E.jsx("div",{"aria-label":((r=n.ariaLabel)==null?void 0:r.notificationButton)??"toggle notifications",role:"button",onMouseDown:async l=>{l.preventDefault(),await A()},style:i?{...o.notificationButtonStyle}:{...o.notificationButtonStyle,...o.notificationButtonDisabledStyle},children:(()=>{var l,c;const u=i?(l=n.notification)==null?void 0:l.icon:(c=n.notification)==null?void 0:c.iconDisabled;return u&&typeof u!="string"?u&&E.jsx("span",{className:"rcb-notification-icon","data-testid":"rcb-notification-icon",children:E.jsx(u,{style:i?s:a,"data-testid":"rcb-notification-icon-svg"})}):E.jsx("span",{className:"rcb-notification-icon","data-testid":"rcb-notification-icon",style:i?s:a})})()})},gs=()=>{var e,t,r;const{settings:n}=ee(),{styles:o}=Ae(),{injectMessage:i}=xt(),{inputRef:A}=Ee(),{voiceToggledOn:s,toggleVoice:a}=Vn(),{setInputLength:l,setTextAreaValue:c,textAreaDisabled:u}=Et(),{handleSubmitText:d}=Dt(),p=f.useRef([]),[g,v]=f.useState(!1);f.useEffect(()=>{var k;(k=n.voice)!=null&&k.sendAsAudio?(m(),p.current=[]):d()},[g]),f.useEffect(()=>{s?((k,P,C,S,I,Q,D)=>{var _;(_=k.voice)!=null&&_.sendAsAudio?rs(C,Q):ns(k,P,C,S,I,D)})(n,a,x,c,l,p,A):Wn()},[s]);const h={backgroundImage:`url(${(e=n.voice)==null?void 0:e.icon})`,fill:"#9aa0a6",...o.voiceIconStyle},w={backgroundImage:`url(${(t=n.voice)==null?void 0:t.iconDisabled})`,fill:"#9aa0a6",...o.voiceIconStyle,...o.voiceIconDisabledStyle},x=()=>{v(k=>!k)},m=async()=>{const k=new Blob(p.current,{type:"audio/wav"}),P=new File([k],"voice-input.wav",{type:"audio/wav"}),C=await po(P);!C.fileType||!C.fileUrl||await i(E.jsx(uo,{file:P,fileType:C.fileType,fileUrl:C.fileUrl}),"USER")};return E.jsx("div",{"aria-label":((r=n.ariaLabel)==null?void 0:r.voiceButton)??"toggle voice",role:"button",onMouseDown:async k=>{k.preventDefault(),!u&&await a()},style:s&&!u?{...o.voiceButtonStyle}:{...o.voiceButtonStyle,...o.voiceButtonDisabledStyle},className:s&&!u?"rcb-voice-button-enabled":"rcb-voice-button-disabled",children:(()=>{var k,P;const C=s?(k=n.voice)==null?void 0:k.icon:(P=n.voice)==null?void 0:P.iconDisabled;return C&&typeof C!="string"?C&&E.jsx("span",{className:"rcb-voice-icon "+(s&&!u?"on":""),children:E.jsx(C,{style:s&&!u?h:w})}):E.jsx("span",{className:"rcb-voice-icon"+(s&&!u?"-on":""),"data-testid":"rcb-voice-icon",style:s&&!u?h:w})})()})},ms=()=>{var e,t,r,n,o,i,A,s;const{settings:a}=ee(),{styles:l}=Ae(),{textAreaDisabled:c}=Pe(),[u,d]=f.useState(!1),{handleSubmitText:p}=Dt(),g={backgroundColor:(e=a.general)==null?void 0:e.primaryColor,...l.sendButtonStyle},v={cursor:`url("${(t=a.general)==null?void 0:t.actionDisabledIcon}"), auto`,backgroundColor:(r=a.general)==null?void 0:r.primaryColor,...l.sendButtonStyle,...l.sendButtonDisabledStyle},h={backgroundColor:(n=a.general)==null?void 0:n.secondaryColor,...l.sendButtonStyle,...l.sendButtonHoveredStyle},w={backgroundImage:`url(${(o=a.chatInput)==null?void 0:o.sendButtonIcon})`,fill:"#fff",...l.sendIconStyle},x={backgroundImage:`url(${(i=a.chatInput)==null?void 0:i.sendButtonIcon})`,fill:"#fff",...l.sendIconStyle,...l.sendIconDisabledStyle},m={backgroundImage:`url(${(A=a.chatInput)==null?void 0:A.sendButtonIcon})`,fill:"#fff",...l.sendIconStyle,...l.sendIconHoveredStyle};return E.jsx("div",{"aria-label":((s=a.ariaLabel)==null?void 0:s.sendButton)??"send message",role:"button",onMouseEnter:()=>{d(!0)},onMouseLeave:()=>{d(!1)},onMouseDown:async k=>{k==null||k.preventDefault(),!c&&await p()},style:c?v:u?h:g,className:"rcb-send-button",children:(()=>{var k;const P=(k=a.chatInput)==null?void 0:k.sendButtonIcon;return P&&typeof P!="string"?P&&E.jsx("span",{className:"rcb-send-icon","data-testid":"rcb-send-icon",children:E.jsx(P,{style:c?x:u?m:w})}):E.jsx("span",{className:"rcb-send-icon","data-testid":"rcb-send-icon",style:c?x:u?m:w})})()})},ys=(e,t)=>{var r,n,o,i,A,s,a,l,c;const u={[me.AUDIO_BUTTON]:(r=e.audio)==null?void 0:r.disabled,[me.CLOSE_CHAT_BUTTON]:(n=e.general)==null?void 0:n.embedded,[me.EMOJI_PICKER_BUTTON]:(o=e.emoji)==null?void 0:o.disabled,[me.FILE_ATTACHMENT_BUTTON]:(i=e.fileAttachment)==null?void 0:i.disabled,[me.NOTIFICATION_BUTTON]:(A=e.notification)==null?void 0:A.disabled,[me.SEND_MESSAGE_BUTTON]:!1,[me.VOICE_MESSAGE_BUTTON]:(s=e.voice)==null?void 0:s.disabled},d={},p=g=>g?g.map(v=>{if(typeof v=="string"){if((h=>Object.values(me).includes(h))(v)&&!u[v]){if(d[v])return d[v];const h=t[v];if(typeof h=="function"){const w=h();return d[v]=w,w}return null}return null}return v}).filter(v=>v!==null):[];return{header:p((a=e.header)==null?void 0:a.buttons),chatInput:p((l=e.chatInput)==null?void 0:l.buttons),footer:p((c=e.footer)==null?void 0:c.buttons)}},bs=()=>{const{settings:e}=ee(),t=f.useMemo(()=>({[me.CLOSE_CHAT_BUTTON]:()=>E.jsx(fs,{}),[me.AUDIO_BUTTON]:()=>E.jsx(ps,{}),[me.NOTIFICATION_BUTTON]:()=>E.jsx(hs,{}),[me.EMOJI_PICKER_BUTTON]:()=>E.jsx(ds,{}),[me.FILE_ATTACHMENT_BUTTON]:()=>E.jsx(us,{}),[me.SEND_MESSAGE_BUTTON]:()=>E.jsx(ms,{}),[me.VOICE_MESSAGE_BUTTON]:()=>E.jsx(gs,{})}),[]),{header:r,chatInput:n,footer:o}=f.useMemo(()=>ys(e,t),[e,t]);return{headerButtons:f.useMemo(()=>r,[r]),chatInputButtons:f.useMemo(()=>n,[n]),footerButtons:f.useMemo(()=>o,[o])}},Xn=()=>{const{settings:e}=ee(),{styles:t}=Ae(),{setSyncedMessages:r,syncedMessagesRef:n}=zn(),{isLoadingChatHistory:o,setIsLoadingChatHistory:i,hasChatHistoryLoaded:A,setHasChatHistoryLoaded:s}=Pe(),{chatBodyRef:a}=Ee(),{dispatchRcbEvent:l}=Je(),c=f.useCallback(async()=>{var u,d;const p=Wt();if(!p||(u=e.event)!=null&&u.rcbLoadChatHistory&&(await l(q.LOAD_CHAT_HISTORY,{})).defaultPrevented)return;i(!0);const g=((d=a.current)==null?void 0:d.scrollHeight)??0;((v,h,w,x,m,k,P,C,S)=>{var I;if(oo=!0,w!=null)try{const Q=pt(E.jsx(Ka,{}),"SYSTEM"),D=m.current.slice(1);x([Q,...D]);const _=w.map(B=>{if(B.type==="object"){const M=so(B.content,v,h);return{...B,content:M}}return B});setTimeout(()=>{var B;const M=m.current.slice(1);let F=(B=v.chatHistory)!=null&&B.autoLoad?pt(E.jsx(E.Fragment,{}),"SYSTEM"):pt(E.jsx(Wa,{}),"SYSTEM");x([..._,F,...M]),S(!0)},500),setTimeout(()=>{if(!k.current)return;const{scrollHeight:B}=k.current,M=B-P;k.current.scrollTop+=M,C(!1)},510)}catch{ft.removeItem((I=v.chatHistory)==null?void 0:I.storageKey)}})(e,t,p,r,n,a,g,i,s)},[e,t,l,n,a,i,s]);return{isLoadingChatHistory:o,setIsLoadingChatHistory:i,hasChatHistoryLoaded:A,showChatHistory:c}},vs=()=>{var e,t,r;const{settings:n}=ee(),{styles:o}=Ae(),{showChatHistory:i}=Xn(),[A,s]=f.useState(!1),a={color:(e=n.general)==null?void 0:e.primaryColor,borderColor:(t=n.general)==null?void 0:t.primaryColor,...o.chatHistoryButtonStyle,...o.chatHistoryButtonHoveredStyle};return E.jsx("div",{className:"rcb-view-history-container",children:E.jsx("div",{onMouseEnter:()=>{s(!0)},onMouseLeave:()=>{s(!1)},style:A?a:{...o.chatHistoryButtonStyle},onMouseDown:l=>{l.preventDefault(),i()},className:"rcb-view-history-button",role:"button",tabIndex:0,children:E.jsx("p",{children:(r=n.chatHistory)==null?void 0:r.viewChatHistoryButtonText})})})},ws=()=>{var e,t,r,n;const o=mn(),{settings:i}=ee(),{replaceMessages:A}=xt(),{isBotTyping:s,isChatWindowOpen:a,setUnreadCount:l,setSyncedIsChatWindowOpen:c,setSyncedTextAreaDisabled:u,setSyncedAudioToggledOn:d,setSyncedVoiceToggledOn:p,setSyncedIsScrolling:g,syncedIsScrollingRef:v,syncedIsChatWindowOpenRef:h}=Pe(),{chatBodyRef:w}=Ee(),{viewportHeight:x,setViewportHeight:m,setViewportWidth:k,scrollToBottom:P}=ze(),{setUpNotifications:C}=qn(),{handleFirstInteraction:S}=(()=>{var _;const{settings:B}=ee(),{hasInteractedPage:M,setHasInteractedPage:F,hasFlowStarted:N,setHasFlowStarted:L}=Pe(),O=f.useCallback(()=>{var U;if(F(!0),!N&&((U=B.general)==null?void 0:U.flowStartTrigger)==="ON_PAGE_INTERACT"&&L(!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",O),window.removeEventListener("keydown",O),window.removeEventListener("touchstart",O)},window.speechSynthesis.speak(b)},[N,(_=B.general)==null?void 0:_.flowStartTrigger]);return{hasInteractedPage:M,handleFirstInteraction:O}})(),{showChatHistory:I}=Xn(),Q=f.useRef(0),D=f.useRef(!1);f.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)}),[]),f.useEffect(()=>{const _=w.current;if(!_)return;const B=()=>{D.current||(D.current=!0,requestAnimationFrame(()=>{var M,F;if(!_)return;const{scrollTop:N,clientHeight:L,scrollHeight:O}=_,U=N+L<O-(((M=i.chatWindow)==null?void 0:M.messagePromptOffset)??30);g(U),v.current=U,U||(N+L>=O-1&&(_.scrollTop=O-L-1),(h.current||(F=i.general)!=null&&F.embedded)&&l(0)),D.current=!1}))};return _.addEventListener("wheel",B,{passive:!0}),_.addEventListener("touchmove",B,{passive:!0}),()=>{_.removeEventListener("wheel",B),_.removeEventListener("touchmove",B)}},[]),f.useEffect(()=>{var _,B,M;u((_=i.chatInput)==null?void 0:_.disabled),c((B=i.chatWindow)==null?void 0:B.defaultOpen),d((M=i.audio)==null?void 0:M.defaultToggledOn),setTimeout(()=>{var F;p((F=i.voice)==null?void 0:F.defaultToggledOn)},1)},[]),f.useEffect(()=>{var _;(_=i.notification)!=null&&_.disabled||C()},[(e=i.notification)==null?void 0:e.disabled]),f.useEffect(()=>{!v.current&&w!=null&&w.current&&P()},[s]),f.useEffect(()=>{var _,B;if((_=i.chatHistory)!=null&&_.disabled)ft&&ft.removeItem(dn);else if(jn(i),Wt().length>0){const M=pt(E.jsx(vs,{}),"SYSTEM");A([M]),(B=i.chatHistory)!=null&&B.autoLoad&&I()}},[(t=i.chatHistory)==null?void 0:t.storageKey,(r=i.chatHistory)==null?void 0:r.maxEntries,(n=i.chatHistory)==null?void 0:n.disabled]),f.useEffect(()=>{var _;o||(_=i.general)!=null&&_.embedded||!navigator.virtualKeyboard||(navigator.virtualKeyboard.overlaysContent=!0,navigator.virtualKeyboard.addEventListener("geometrychange",B=>{if(!B.target)return;const{x:M,y:F,width:N,height:L}=B.target.boundingRect;M==0&&F==0&&N==0&&L==0?(setTimeout(()=>{var O;m((O=window.visualViewport)==null?void 0:O.height)},101),setTimeout(()=>{var O,U;x!=((O=window.visualViewport)==null?void 0:O.height)&&m((U=window.visualViewport)==null?void 0:U.height)},1001)):setTimeout(()=>{var O;m(((O=window.visualViewport)==null?void 0:O.height)-L)},101)}))},[o]),f.useEffect(()=>{var _,B,M,F;if(o)return;a&&(m((_=window.visualViewport)==null?void 0:_.height),k((B=window.visualViewport)==null?void 0:B.width));const N=()=>window.scrollTo({top:0,left:0,behavior:"auto"}),L=()=>Q.current=window.scrollY,O=()=>{var b,R;m((b=window.visualViewport)==null?void 0:b.height),k((R=window.visualViewport)==null?void 0:R.width)},U=()=>{var b;window.removeEventListener("scroll",N),window.removeEventListener("scroll",L),(b=window.visualViewport)==null||b.removeEventListener("resize",O)};return a?(U(),document.body.style.position="fixed",window.addEventListener("scroll",N),(M=window.visualViewport)==null||M.addEventListener("resize",O)):(document.body.style.position="static",U(),window.scrollTo({top:Q.current,left:0,behavior:"auto"}),window.addEventListener("scroll",L),(F=window.visualViewport)==null||F.removeEventListener("resize",O)),U},[a,o])},xs="https://cdn.jsdelivr.net/gh/react-chatbotify/community-themes/themes",Es="2592000",fo="RCB_THEME_CACHE_DATA",ho=async(e,t)=>{const{id:r,version:n,baseUrl:o=xs,cacheDuration:i=Es}=t,A=n||await(async(w,x)=>{const m=`${x}/${w}/meta.json`;try{const k=await fetch(m);return k.ok?(await k.json()).version:(console.error(`Failed to fetch meta.json from ${m}`),null)}catch(k){return console.error(`Failed to fetch meta.json from ${m}`,k),null}})(r,o);if(!A)return console.error(`Unable to find version for theme: ${r}`),{settings:{},inlineStyles:{},cssStylesText:""};const s=((w,x,m)=>{const k=localStorage.getItem(`${fo}_${w}_${x}`);if(!k)return null;try{const P=JSON.parse(k),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 ${w}`,P),null}})(r,A,i);if(s){const w=go(e,s.cssStylesText);return{settings:s.settings,inlineStyles:s.inlineStyles,cssStylesText:w}}const a=`${o}/${r}/${A}/styles.css`,l=`${o}/${r}/${A}/settings.json`,c=`${o}/${r}/${A}/styles.json`;let u="";const d=await fetch(a);d.ok?u=await d.text():console.info(`Could not fetch styles.css from ${a}`);const p=await fetch(l);let g={};p.ok?g=await p.json():console.info(`Could not fetch settings.json from ${l}`);const v=await fetch(c);let h={};return v.ok?h=await v.json():console.info(`Could not fetch styles.json from ${c}`),((w,x,m,k,P)=>{const C=new Date().getTime(),S={settings:m,inlineStyles:k,cssStylesText:P,cacheDate:Math.floor(C/1e3)};localStorage.setItem(`${fo}_${w}_${x}`,JSON.stringify(S))})(r,A,g,h,u),{settings:g,inlineStyles:h,cssStylesText:go(e,u)}},go=(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
- `),ks=async(e,t,r,n)=>{var o,i;let A=yn(Kr),s=yn(Xr),a="";if(n!=null)if(Array.isArray(n))for(const l of n){const c=await ho(e,l);A=et(c.settings,A),s=et(c.inlineStyles,s),a+=c.cssStylesText}else{const l=await ho(e,n);A=et(l.settings,A),s=et(l.inlineStyles,s),a+=l.cssStylesText}return t!=null&&(A=et(t,A)),r!=null&&(s=et(r,s)),((o=A.chatInput)==null?void 0:o.botDelay)!=null&&((i=A.chatInput)==null?void 0:i.botDelay)<500&&(A.chatInput.botDelay=500),{settings:A,inlineStyles:s,cssStylesText:a}},et=(e,t)=>{const r=[{source:e,target:t}];for(;r.length;){const n=r.pop();if(n==null)continue;const{source:o,target:i}=n;for(const A of Object.keys(o)){const s=A;if(f.isValidElement(o[s]))i[s]=o[s];else if(typeof o[s]!="object"||o[s]===null||Array.isArray(o[s]))try{i[s]=o[s]}catch{}else(typeof i[s]!="object"||i[s]===null)&&(i[s]={}),r.push({source:o[s],target:i[s]})}}return t},yn=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:i,target:A}=o;for(const s in i)if(Object.prototype.hasOwnProperty.call(i,s)){const a=i[s];if(a&&typeof a=="object")if(n.has(a))A[s]=n.get(a);else{const l=Array.isArray(a)?[]:{};n.set(a,l),A[s]=l,r.push({source:a,target:l})}else A[s]=a}}return t},mo=()=>{const{settings:e,setSyncedSettings:t,syncedSettingsRef:r}=ee(),n=f.useCallback(i=>{!i||Object.keys(i).length===0||t(yn(et(i,e)))},[e]),o=f.useCallback(i=>{const A=typeof i=="function"?i(r.current):i;t(A)},[r]);return{settings:e,replaceSettings:o,updateSettings:n}},yo=()=>{const{styles:e,setSyncedStyles:t,syncedStylesRef:r}=Ae(),n=f.useCallback(i=>{!i||Object.keys(i).length===0||t(yn(et(i,e)))},[e]),o=f.useCallback(i=>{const A=typeof i=="function"?i(r.current):i;t(A)},[r]);return{styles:e,replaceStyles:o,updateStyles:n}},Cs=({plugins:e,slots:t})=>{var r,n;const o=mn(),{settings:i}=ee(),{styles:A}=Ae(),{hasFlowStarted:s,setHasFlowStarted:a}=Pe(),{inputRef:l}=Ee(),{viewportHeight:c,viewportWidth:u,isChatWindowOpen:d}=ze(),{goToPath:p}=gn(),{headerButtons:g,chatInputButtons:v,footerButtons:h}=bs();ws(),(x=>{const{updateSettings:m}=mo(),{updateStyles:k}=yo(),P=x==null?void 0:x.map(C=>C());f.useEffect(()=>{let C={},S={};P==null||P.forEach(I=>{I!=null&&I.settings&&Object.keys(I==null?void 0:I.settings).length!==0&&(C=et(I.settings,C)),I!=null&&I.styles&&Object.keys(I==null?void 0:I.styles).length!==0&&(S=et(I.styles,S))}),m(C),k(S)},[])})(e),f.useEffect(()=>{var x;(s||((x=i.general)==null?void 0:x.flowStartTrigger)==="ON_LOAD")&&p("start")},[s,(r=i.general)==null?void 0:r.flowStartTrigger]);const w=f.useMemo(()=>{var x;const m="rcb-chatbot-global ";return(x=i.general)!=null&&x.embedded?m+"rcb-window-embedded":d?m+"rcb-window-open":m+"rcb-window-close"},[i,d]);return E.jsx(E.Fragment,{children:(()=>{var x,m;return o&&((x=i.device)==null?void 0:x.desktopEnabled)||!o&&((m=i.device)==null?void 0:m.mobileEnabled)})()&&E.jsxs("div",{onMouseDown:x=>{var m,k;!s&&((m=i.general)==null?void 0:m.flowStartTrigger)==="ON_CHATBOT_INTERACT"&&a(!0),o?(k=l.current)==null||k.blur():x==null||x.preventDefault()},className:w,children:[E.jsx(As,{}),E.jsx(ss,{}),d&&!o&&!((n=i.general)!=null&&n.embedded)&&E.jsxs(E.Fragment,{children:[E.jsx("style",{children:`
1
+ (function(Le,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("react/jsx-runtime"),require("react"),require("react-dom/client"),require("react-dom/server"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom/client","react-dom/server","react-dom"],E):(Le=typeof globalThis<"u"?globalThis:Le||self,E(Le.AccessQABot={},Le.jsxRuntime,Le.React,Le.ReactDOMClient,Le.ReactDOMServer,Le.ReactDOM))})(this,function(Le,E,p,tu,fi,hi){"use strict";function gi(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 ge=gi(p);function cn(){return cn=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},cn.apply(null,arguments)}function mi(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function"){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function jr(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))}}typeof SuppressedError=="function"&&SuppressedError,jr('.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 ye={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"},qr="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",Gr=p.forwardRef((e,t)=>ge.createElement("svg",{viewBox:"0 0 637 637",ref:t,...e},ge.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"}),ge.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"}))),Yr=p.forwardRef((e,t)=>ge.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ge.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"}))),yi=p.forwardRef((e,t)=>ge.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ge.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"}))),bi=p.forwardRef((e,t)=>ge.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ge.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"}))),vi=p.forwardRef((e,t)=>ge.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",ref:t,...e},ge.createElement("g",{strokeLinecap:"round",strokeWidth:10},ge.createElement("path",{d:"m19 19 61 61M80 19 19 80"})))),wi=p.forwardRef((e,t)=>ge.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ge.createElement("path",{d:"M94-136v-255l351-93-351-92v-253l816 346L94-136Z"}))),xi=p.forwardRef((e,t)=>ge.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ge.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"}))),Ei=p.forwardRef((e,t)=>ge.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ge.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"}))),Wr=p.forwardRef((e,t)=>ge.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ge.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"}))),ki=p.forwardRef((e,t)=>ge.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ge.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"}))),Ci=p.forwardRef((e,t)=>ge.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},ge.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:Gr},header:{title:E.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:qr,buttons:[ye.NOTIFICATION_BUTTON,ye.AUDIO_BUTTON,ye.CLOSE_CHAT_BUTTON],closeChatIcon:vi},notification:{disabled:!1,defaultToggledOn:!0,volume:.2,icon:yi,iconDisabled:bi,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//AAA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AALAABAB4A8f8NAOv/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:ki,iconDisabled:Ci},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:wi,blockSpam:!0,sendOptionOutput:!0,sendCheckboxOutput:!0,buttons:[ye.VOICE_MESSAGE_BUTTON,ye.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:qr,simulateStream:!1,streamSpeed:30},voice:{disabled:!0,defaultToggledOn:!1,language:"en-US",timeoutPeriod:1e4,autoSendDisabled:!1,autoSendPeriod:1e3,sendAsAudio:!1,icon:xi,iconDisabled:Ei},footer:{text:E.jsxs("div",{style:{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",columnGap:3},onClick:()=>window.open("https://react-chatbotify.com","_blank","noopener,noreferrer"),children:[E.jsx("span",{children:"Powered By "},0),E.jsx("div",{style:{borderRadius:"50%",width:14,height:14,display:"flex",justifyContent:"center",alignItems:"center",background:"linear-gradient(to right, #42b0c5, #491d8d)"},children:E.jsx(Gr,{style:{width:"80%",height:"80%",fill:"#fff"}})},1),E.jsx("span",{style:{fontWeight:"bold"},children:" React ChatBotify"},2)]}),buttons:[ye.FILE_ATTACHMENT_BUTTON,ye.EMOJI_PICKER_BUTTON]},fileAttachment:{disabled:!1,multiple:!0,accept:".png",icon:Yr,iconDisabled:Yr,sendFileName:!0,showMediaDisplay:!1},emoji:{disabled:!1,icon:Wr,iconDisabled:Wr,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}},Vr=p.createContext({settings:{},setSyncedSettings:()=>null,syncedSettingsRef:{current:{}}}),te=()=>p.useContext(Vr),Pi=({children:e,settings:t=Kr,setSyncedSettings:r,syncedSettingsRef:n})=>E.jsx(Vr.Provider,{value:{settings:t,setSyncedSettings:r,syncedSettingsRef:n},children:e}),Xr={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:{}},Jr=p.createContext({styles:{},setSyncedStyles:()=>null,syncedStylesRef:{current:{}}}),le=()=>p.useContext(Jr),Si=({children:e,styles:t=Xr,setSyncedStyles:r,syncedStylesRef:n})=>E.jsx(Jr.Provider,{value:{styles:t,setSyncedStyles:r,syncedStylesRef:n},children:e}),Di=({buttons:e})=>{var t,r,n,o,a,A,s;const{settings:i}=te(),{styles:l}=le(),c={backgroundImage:`linear-gradient(to right, ${(t=i.general)==null?void 0:t.secondaryColor},
2
+ ${(r=i.general)==null?void 0:r.primaryColor})`,...l.headerStyle};return E.jsxs("div",{style:c,className:"rcb-chat-header-container",children:[E.jsxs("div",{className:"rcb-chat-header",children:[((n=i.header)==null?void 0:n.showAvatar)&&E.jsx("div",{style:{backgroundImage:`url("${(o=i.header)==null?void 0:o.avatar}")`},className:"rcb-bot-avatar"}),p.isValidElement((a=i.header)==null?void 0:a.title)?(A=i.header)==null?void 0:A.title:E.jsx("div",{style:{margin:0,fontSize:20,fontWeight:"bold"},children:(s=i.header)==null?void 0:s.title})]}),E.jsx("div",{className:"rcb-chat-header",children:e==null?void 0:e.map((d,u)=>E.jsx(p.Fragment,{children:d},u))})]})},Zr=p.createContext({}),ke=()=>p.useContext(Zr),Bi=({children:e,botIdRef:t,flowRef:r})=>{const n=p.useRef(null),o=p.useRef(""),a=p.useRef(null),A=p.useRef(new Map),s=p.useRef(null),i=p.useRef(""),l=p.useRef(!1),c=p.useRef(null),d=p.useRef(null),u=p.useRef(null);return E.jsx(Zr.Provider,{value:{botIdRef:t,flowRef:r,inputRef:n,timeoutIdRef:a,streamMessageMap:A,chatBodyRef:s,paramsInputRef:i,keepVoiceOnRef:l,audioContextRef:c,audioBufferRef:d,gainNodeRef:u,prevInputRef:o},children:e})},ze=e=>{const[t,r]=p.useState(e),n=p.useRef(e);return[t,o=>{const a=typeof o=="function"?o(n.current):o;n.current=a,r(a)},n]},$r=p.createContext({}),Se=()=>p.useContext($r),Ii=({children:e,settings:t})=>{var r,n,o,a,A,s;const[i,l,c]=ze(!1),[d,u,f]=ze(((r=t==null?void 0:t.chatWindow)==null?void 0:r.defaultOpen)??!1),[g,b,h]=ze(((n=t==null?void 0:t.audio)==null?void 0:n.defaultToggledOn)??!1),[w,x,m]=ze(((o=t==null?void 0:t.voice)==null?void 0:o.defaultToggledOn)??!1),[k,P,C]=ze(((a=t==null?void 0:t.notification)==null?void 0:a.defaultToggledOn)??!0),[S,I]=p.useState(!1),[Q,B]=p.useState(!1),[O,D,M]=ze(!1),[F,_,U]=ze(!0),[N,L,y]=ze(!1),[W,v]=p.useState(!1),[V,q]=p.useState(!1),[G,X]=p.useState(0),[he,se]=p.useState(0),[Ke,Pe]=p.useState(!1),[R,Y]=p.useState(((A=window.visualViewport)==null?void 0:A.height)??window.innerHeight),[re,ne]=p.useState(((s=window.visualViewport)==null?void 0:s.width)??window.innerWidth);return E.jsx($r.Provider,{value:{isBotTyping:i,setSyncedIsBotTyping:l,syncedIsBotTypingRef:c,isChatWindowOpen:d,setSyncedIsChatWindowOpen:u,syncedIsChatWindowOpenRef:f,audioToggledOn:g,setSyncedAudioToggledOn:b,syncedAudioToggledOnRef:h,voiceToggledOn:w,setSyncedVoiceToggledOn:x,syncedVoiceToggledOnRef:m,notificationsToggledOn:k,setSyncedNotificationsToggledOn:P,syncedNotificationsToggledOnRef:C,isLoadingChatHistory:S,setIsLoadingChatHistory:I,hasChatHistoryLoaded:Q,setHasChatHistoryLoaded:B,isScrolling:O,setSyncedIsScrolling:D,syncedIsScrollingRef:M,textAreaDisabled:F,setSyncedTextAreaDisabled:_,syncedTextAreaDisabledRef:U,textAreaSensitiveMode:N,setSyncedTextAreaSensitiveMode:L,syncedTextAreaSensitiveModeRef:y,hasInteractedPage:W,setHasInteractedPage:v,hasFlowStarted:V,setHasFlowStarted:q,unreadCount:G,setUnreadCount:X,inputLength:he,setInputLength:se,blockAllowsAttachment:Ke,setBlockAllowsAttachment:Pe,viewportHeight:R,setViewportHeight:Y,viewportWidth:re,setViewportWidth:ne},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},Fn=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},eo=p.createContext({paths:[],setSyncedPaths:()=>{},syncedPathsRef:{current:[]}}),Yt=()=>p.useContext(eo),Qi=({children:e})=>{const[t,r,n]=ze([]);return E.jsx(eo.Provider,{value:{paths:t,setSyncedPaths:r,syncedPathsRef:n},children:e})},Je=()=>{const{botIdRef:e}=ke(),{syncedPathsRef:t}=Yt(),r=p.useCallback(()=>t.current.length>0?t.current.at(-1)??null:null,[]),n=p.useCallback(()=>t.current.length>1?t.current.at(-2)??null:null,[]);return{dispatchRcbEvent:p.useCallback(async(o,a)=>{const A={botId:e.current,currPath:r(),prevPath:n()};return await Fn(o,A,a)},[e])}},Re=()=>{const{settings:e}=te(),{isChatWindowOpen:t,setSyncedIsChatWindowOpen:r,viewportHeight:n,setViewportHeight:o,viewportWidth:a,setViewportWidth:A,setUnreadCount:s,setSyncedIsBotTyping:i,setSyncedIsScrolling:l,syncedIsBotTypingRef:c,syncedIsChatWindowOpenRef:d}=Se(),{chatBodyRef:u}=ke(),{dispatchRcbEvent:f}=Je(),g=p.useCallback(()=>{if(!u.current)return!1;const m=u.current.getBoundingClientRect(),k=window.innerHeight??document.documentElement.clientHeight,P=window.innerWidth??document.documentElement.clientWidth;return m.top>=0&&m.left>=0&&m.bottom<=k&&m.right<=P},[u]),b=p.useCallback(async m=>{var k;m!==d.current&&((k=e.event)!=null&&k.rcbToggleChatWindow&&(await f(j.TOGGLE_CHAT_WINDOW,{currState:d.current,newState:!d.current})).defaultPrevented||r(P=>(P||s(0),!P)))},[d]),h=p.useCallback(async m=>{m!==c.current&&i(k=>!k)},[c]),w=p.useCallback((m,k,P,C)=>(m/=C/2)<1?P/2*m*m+k:-P/2*(--m*(m-2)-1)+k,[]),x=p.useCallback((m=0)=>{if(!u.current)return;const k=u.current.scrollHeight-u.current.clientHeight;if(m<=0)return u.current.scrollTop=k,void l(!1);const P=u.current.scrollTop,C=k-P;let S=0;const I=()=>{if(!u.current)return;S+=20;const Q=w(S,P,C,m);u.current.scrollTop=Q,S<m?requestAnimationFrame(I):l(!1)};I()},[u]);return{isChatWindowOpen:t,setSyncedIsChatWindowOpen:r,toggleChatWindow:b,viewportHeight:n,setViewportHeight:o,viewportWidth:a,setViewportWidth:A,toggleIsBotTyping:h,scrollToBottom:x,getIsChatBotVisible:g}},Mi=()=>{var e,t,r;const{settings:n}=te(),{styles:o}=le(),{unreadCount:a,isScrolling:A}=Se(),{chatBodyRef:s}=ke(),{scrollToBottom:i}=Re(),[l,c]=p.useState(!1),d={color:(e=n.general)==null?void 0:e.primaryColor,borderColor:(t=n.general)==null?void 0:t.primaryColor,...o.chatMessagePromptHoveredStyle};return E.jsx("div",{className:"rcb-message-prompt-container "+(s.current&&((u=n.chatWindow)!=null&&u.showMessagePrompt)&&A&&a>0?"visible":"hidden"),children:E.jsx("div",{onMouseEnter:()=>{c(!0)},onMouseLeave:()=>{c(!1)},style:l?d:{...o.chatMessagePromptStyle},onMouseDown:f=>{f.preventDefault(),i(600)},className:"rcb-message-prompt-text",children:(r=n.chatWindow)==null?void 0:r.messagePromptText})});var u},to=p.createContext({messages:[],setSyncedMessages:()=>{},syncedMessagesRef:{current:[]}}),zn=()=>p.useContext(to),Oi=({children:e})=>{const[t,r,n]=ze([]);return E.jsx(to.Provider,{value:{messages:t,setSyncedMessages:r,syncedMessagesRef:n},children:e})},_i=({message:e,isNewSender:t})=>{var r,n,o,a,A,s;const{settings:i}=te(),{styles:l}=le(),c=typeof e.content=="string",d=e.content,u=e.contentWrapper?E.jsx(e.contentWrapper,{children:d}):d,f={backgroundColor:(r=i.general)==null?void 0:r.primaryColor,color:"#fff",maxWidth:(n=i.userBubble)!=null&&n.showAvatar?"65%":"70%",...l.userBubbleStyle},g=(o=i.userBubble)!=null&&o.animate?"rcb-user-message-entry":"",b=((a=i.userBubble)==null?void 0:a.showAvatar)&&t,h="rcb-user-message"+(!t&&(A=i.userBubble)!=null&&A.showAvatar?" rcb-user-message-offset":"");return E.jsxs("div",{className:"rcb-user-message-container",children:[c?E.jsx("div",{style:f,className:`${h} ${g}`,children:u}):E.jsx(E.Fragment,{children:u}),b&&E.jsx("div",{style:{backgroundImage:`url("${(s=i.userBubble)==null?void 0:s.avatar}")`},className:"rcb-message-user-avatar"})]})},Ni=({message:e,isNewSender:t})=>{var r,n,o,a,A,s;const{settings:i}=te(),{styles:l}=le(),c=typeof e.content=="string",d=e.content,u=e.contentWrapper?E.jsx(e.contentWrapper,{children:d}):d,f={backgroundColor:(r=i.general)==null?void 0:r.secondaryColor,color:"#fff",maxWidth:(n=i.botBubble)!=null&&n.showAvatar?"65%":"70%",...l.botBubbleStyle},g=(o=i.botBubble)!=null&&o.animate?"rcb-bot-message-entry":"",b=((a=i.botBubble)==null?void 0:a.showAvatar)&&t,h="rcb-bot-message"+(!t&&(A=i.botBubble)!=null&&A.showAvatar?" rcb-bot-message-offset":"");return E.jsxs("div",{className:"rcb-bot-message-container",children:[b&&E.jsx("div",{style:{backgroundImage:`url("${(s=i.botBubble)==null?void 0:s.avatar}")`},className:"rcb-message-bot-avatar"}),c?E.jsx("div",{style:f,className:`${h} ${g}`,children:u}):E.jsx(E.Fragment,{children:u})]})},Li=()=>{var e,t,r;const{settings:n}=te(),{styles:o}=le(),a=(e=n.botBubble)!=null&&e.animate?"rcb-bot-message-entry":"";return E.jsxs("div",{className:"rcb-bot-message-container",children:[((t=n.botBubble)==null?void 0:t.showAvatar)&&E.jsx("div",{style:{backgroundImage:`url("${(r=n.botBubble)==null?void 0:r.avatar}")`},className:"rcb-message-bot-avatar"}),E.jsx("div",{onMouseDown:A=>{A.preventDefault()},className:`rcb-bot-message ${a}`,children:E.jsxs("div",{className:"rcb-typing-indicator",style:{...o==null?void 0:o.rcbTypingIndicatorContainerStyle},children:[E.jsx("span",{className:"rcb-dot",style:{...o==null?void 0:o.rcbTypingIndicatorDotStyle}}),E.jsx("span",{className:"rcb-dot",style:{...o==null?void 0:o.rcbTypingIndicatorDotStyle}}),E.jsx("span",{className:"rcb-dot",style:{...o==null?void 0:o.rcbTypingIndicatorDotStyle}})]})})]})},Hi=()=>{var e,t,r;const{settings:n}=te(),{styles:o}=le(),{messages:a}=zn(),{scrollToBottom:A}=Re(),{isBotTyping:s,syncedIsScrollingRef:i}=Se(),{chatBodyRef:l}=ke(),c={...o==null?void 0:o.bodyStyle,scrollbarWidth:(e=n.chatWindow)!=null&&e.showScrollbar?"auto":"none"};return p.useEffect(()=>{i.current||A()},[(t=l.current)==null?void 0:t.scrollHeight]),E.jsxs("div",{style:c,className:"rcb-chat-body-container",ref:l,children:[a.map((d,u)=>{const f=(g=>g===0||a[g].sender!==a[g-1].sender)(u);return d.sender.toUpperCase()==="USER"?E.jsx(_i,{message:d,isNewSender:f},u):d.sender.toUpperCase()==="BOT"?E.jsx(Ni,{message:d,isNewSender:f},u):E.jsx("div",{children:d.content},u)}),s&&((r=n.chatWindow)==null?void 0:r.showTypingIndicator)&&E.jsx(Li,{}),E.jsx(Mi,{})]})},Ui=({checkboxes:e,checkedItems:t,path:r})=>{var n,o,a,A,s,i,l,c,d,u,f;const{settings:g}=te(),{styles:b}=le(),{paths:h}=Yt(),{handleSubmitText:w}=It(),[x,m]=p.useState(new Set),[k,P]=p.useState(!1),C={cursor:k?`url("${(n=g.general)==null?void 0:n.actionDisabledIcon}"), auto`:"pointer",color:(o=g.general)==null?void 0:o.primaryColor,borderColor:(a=g.general)==null?void 0:a.primaryColor,...b.botCheckboxRowStyle},S={cursor:k||x.size<e.min?`url("${(A=g.general)==null?void 0:A.actionDisabledIcon}"), auto`:"pointer",color:(s=g.general)==null?void 0:s.primaryColor,borderColor:(i=g.general)==null?void 0:i.primaryColor,...b.botCheckboxNextStyle},I={cursor:k?`url("${(l=g.general)==null?void 0:l.actionDisabledIcon}"), auto`:"pointer",color:"transparent",...b.botCheckMarkStyle},Q={cursor:k?`url("${(c=g.general)==null?void 0:c.actionDisabledIcon}"), auto`:"pointer",color:"#fff",borderColor:(d=g.general)==null?void 0:d.primaryColor,backgroundColor:(u=g.general)==null?void 0:u.primaryColor,...b.botCheckMarkSelectedStyle};return p.useEffect(()=>{h.length>0&&h[h.length-1]!==r&&P(!e.reusable)},[h]),E.jsxs("div",{className:"rcb-checkbox-container "+((f=g.botBubble)!=null&&f.showAvatar?"rcb-checkbox-offset":""),children:[e.items.map(B=>E.jsx("div",{onMouseDown:O=>{O.preventDefault(),(D=>{k||m(M=>{const F=new Set(M);if(F.has(D))t.delete(D),F.delete(D);else{if(x.size==e.max)return M;t.add(D),F.add(D)}return F})})(B)},style:C,className:"rcb-checkbox-row-container",children:E.jsxs("div",{className:"rcb-checkbox-row",children:[E.jsx("div",{style:x.has(B)?Q:I,className:"rcb-checkbox-mark"}),E.jsx("div",{className:"rcb-checkbox-label",children:B})]})},B)),E.jsx("div",{style:S,className:"rcb-checkbox-next-button",onMouseDown:B=>{var O;if(B.preventDefault(),k||x.size<e.min)return;const D=Array.from(t).join(", ");let M;P(!e.reusable),M=e.sendOutput!=null?e.sendOutput:((O=g.chatInput)==null?void 0:O.sendCheckboxOutput)??!0,w(D,M)}})]})},Fi=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=E.jsx(Ui,{checkboxes:n,checkedItems:o,path:a});await t.injectMessage(A)},zi=async(e,t)=>{const r=e.function;if(!r)return;const n=r(t);return n instanceof Promise?await n:n},Ri=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))},ji=({options:e,path:t})=>{var r,n,o,a,A,s;const{settings:i}=te(),{styles:l}=le(),{paths:c}=Yt(),{handleSubmitText:d}=It(),[u,f]=p.useState([]),[g,b]=p.useState(!1),h={cursor:g?`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",...l.botOptionStyle},w={color:"#fff",borderColor:(a=i.general)==null?void 0:a.primaryColor,backgroundColor:(A=i.general)==null?void 0:A.primaryColor,...l.botOptionHoveredStyle};return p.useEffect(()=>{c.length>0&&c[c.length-1]!==t&&b(!e.reusable)},[c]),E.jsx("div",{className:"rcb-options-container "+((s=i.botBubble)!=null&&s.showAvatar?"rcb-options-offset":""),children:e.items.map((x,m)=>{const k=u[m]&&!g;return E.jsx("div",{className:"rcb-options",style:k?w:h,onMouseEnter:()=>(P=>{f(C=>{const S=[...C];return S[P]=!0,S})})(m),onMouseLeave:()=>(P=>{f(C=>{const S=[...C];return S[P]=!1,S})})(m),onMouseDown:P=>{var C;if(P.preventDefault(),g)return;let S;b(!e.reusable),S=e.sendOutput!=null?e.sendOutput:((C=i.chatInput)==null?void 0:C.sendOptionOutput)??!0,d(x,S)},children:x},x)})})},qi=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=E.jsx(ji,{options:n,path:o});await t.injectMessage(a)},Gi=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)}},Yi=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 ro(s,t)},a.duration);a.interruptable&&(r.current=A)},Wi=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)},no=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)},ro=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 zi(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)},Ki=()=>{var e;const{settings:t}=te(),{styles:r}=le();return E.jsx("div",{className:"rcb-line-break-container",children:E.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})})},Vi=()=>{var e;const{settings:t}=te(),{styles:r}=le(),n={borderTop:`4px solid ${(e=t.general)==null?void 0:e.primaryColor}`,...r.loadingSpinnerStyle};return E.jsx("div",{className:"rcb-spinner-container",children:E.jsx("div",{style:n,className:"rcb-spinner"})})},un=()=>{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")}},pt=(e,t)=>({id:un(),content:e,sender:t,type:typeof e=="string"?"string":"object",timestamp:new Date().toUTCString(),tags:[]});let ft,oo=!1,dn="rcb-history",pn=30,ao=!1,fn=[];const Wt=()=>fn,Rn=e=>{io(e),fn=e},io=e=>{ft&&ft.setItem(dn,JSON.stringify(e))},jn=e=>{var t,r,n,o,a;ft=((r=(t=e.chatHistory)==null?void 0:t.storageType)==null?void 0:r.toUpperCase())==="SESSION_STORAGE"?sessionStorage:localStorage,dn=(n=e.chatHistory)==null?void 0:n.storageKey,pn=(o=e.chatHistory)==null?void 0:o.maxEntries,ao=(a=e.chatHistory)==null?void 0:a.disabled,fn=(A=>{if(A!=null)try{return JSON.parse(A)}catch{return[]}return[]})(ft.getItem(dn))},Xi=e=>p.isValidElement(e.content)?structuredClone({id:e.id,content:fi.renderToString(e.content),type:e.type,sender:e.sender.toUpperCase(),timestamp:e.timestamp,tags:e.tags}):e,so=(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((l,c)=>{const d=c.name.toLowerCase();if(d==="style"){const u=c.value.split(";").filter(g=>g.trim()!==""),f={};u.forEach(g=>{const[b,h]=g.split(":").map(x=>x.trim()),w=b.replace(/-([a-z])/g,(x,m)=>m.toUpperCase());f[w]=h}),l[d]=f}else s!=="audio"&&s!=="video"||d!=="controls"||c.value!==""?l[d]=c.value:l[d]="true";return l},{});if(Object.prototype.hasOwnProperty.call(i,"class")){const l=o.classList;i.className=l.toString(),delete i.class,(A=t.botBubble)!=null&&A.showAvatar&&(i=Ji(l,i)),i=Zi(l,i,t,r),i=$i(l,i,t,r),i=es(l,i,t,r),i=ts(l,i,t,r)}if(["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr"].includes(s))return p.createElement(s,{key:a,...i});{const l=so(o.innerHTML,t,r);return p.createElement(s,{key:a,...i},...l)}}})},Ji=(e,t)=>((e.contains("rcb-options-container")||e.contains("rcb-checkbox-container"))&&(t.className=`${e.toString()} rcb-options-offset`),t),Zi=(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},$i=(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},es=(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},ts=(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},qn=()=>{const{settings:e}=te(),{notificationsToggledOn:t,setSyncedNotificationsToggledOn:r,hasInteractedPage:n,unreadCount:o,setUnreadCount:a,syncedNotificationsToggledOnRef:A}=Se(),{audioBufferRef:s,audioContextRef:i,gainNodeRef:l}=ke(),{dispatchRcbEvent:c}=Je(),d=p.useCallback(async()=>{var f,g;const b=(f=e.notification)==null?void 0:f.sound;i.current=new AudioContext;const h=i.current.createGain();let w;if(h.gain.value=((g=e.notification)==null?void 0:g.volume)??.2,l.current=h,b!=null&&b.startsWith("data:audio")){const x=atob(b.split(",")[1]),m=new ArrayBuffer(x.length),k=new Uint8Array(m);for(let P=0;P<x.length;P++)k[P]=x.charCodeAt(P);w=m}else w=await(await fetch(b)).arrayBuffer();s.current=await i.current.decodeAudioData(w)},[e.notification]),u=p.useCallback(()=>{var f;if((f=e.notification)!=null&&f.disabled||!A.current||!n||!i.current||!s.current)return;const g=i.current.createBufferSource();g.buffer=s.current,g.connect(l.current).connect(i.current.destination),g.start()},[e.notification,A,n,i,s,l]);return{unreadCount:o,setUnreadCount:a,notificationsToggledOn:t,toggleNotifications:p.useCallback(async f=>{var g;f!==A.current&&((g=e.event)!=null&&g.rcbToggleNotifications&&(await c(j.TOGGLE_NOTIFICATIONS,{currState:A.current,newState:!A.current})).defaultPrevented||r(b=>!b))},[A]),playNotificationSound:u,setUpNotifications:d}},ns=(e,t)=>{var r,n,o,a;((A,s,i,l,c)=>{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=l,d.volume=c;let u=!1;for(const f of i){const g=window.speechSynthesis.getVoices().find(b=>b.name===f);if(g){d.voice=g,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)},Ao=()=>{const{settings:e}=te(),{audioToggledOn:t,setSyncedAudioToggledOn:r,syncedAudioToggledOnRef:n}=Se(),{dispatchRcbEvent:o}=Je(),a=p.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(l=>!l))},[n]),A=p.useCallback(async s=>{var i,l;if((i=e.audio)!=null&&i.disabled||!n.current)return;let c=s;if((l=e.event)!=null&&l.rcbStartSpeakAudio){const d=await o(j.START_SPEAK_AUDIO,{textToRead:c});if(d.defaultPrevented)return;c=d.data.textToRead}ns(e,c)},[e,n]);return{audioToggledOn:t,speakAudio:A,toggleAudio:a}},Et=()=>{var e,t,r;const{settings:n}=te(),{messages:o,setSyncedMessages:a,syncedMessagesRef:A}=zn(),{setSyncedIsBotTyping:s,setUnreadCount:i,syncedIsScrollingRef:l,syncedIsChatWindowOpenRef:c}=Se(),{streamMessageMap:d,chatBodyRef:u,paramsInputRef:f}=ke(),{scrollToBottom:g,getIsChatBotVisible:b}=Re(),{dispatchRcbEvent:h}=Je(),{speakAudio:w}=Ao(),{playNotificationSound:x}=qn(),m=p.useCallback(async D=>{var M,F;if((M=n.event)!=null&&M.rcbSaveChatHistory){const _=await h(j.SAVE_CHAT_HISTORY,{messages:D});if(_.defaultPrevented)return;D=((F=_.data)==null?void 0:F.messages)??D}await(async _=>{if(ao||!ft)return;const U=[];for(let L=_.length-1;L>=0;L--){const y=_[L];if(y.sender.toUpperCase()!=="SYSTEM"&&(y.content!==""&&U.unshift(y),U.length===pn))break}let N=U.map(Xi);if(!oo&&N.length<pn){const L=pn-N.length;N=[...fn.slice(-L),...N]}io(N)})(D)},[h,(e=n.event)==null?void 0:e.rcbSaveChatHistory]),k=p.useCallback((D,M=!1)=>{var F,_;m(D);let U=!0;const N=D[D.length-1];if(!N)return;const L=N.sender.toUpperCase();L==="USER"&&(U=!1),(F=n.general)!=null&&F.embedded&&b()&&(U=!1),(c.current&&!l.current||M)&&(U=!1),U&&x(),!M&&(L!=="USER"&&(_=n.chatWindow)!=null&&_.autoJumpToBottom||L==="USER"||!l.current)&&setTimeout(()=>g(),1)},[n,u,c,l,x,g,b]),P=p.useCallback(async(D,M="BOT",F=null)=>{var _,U,N,L,y;if(typeof D!="string")throw new Error("Content must be of type string to simulate stream.");M=M.toUpperCase();let W=pt(D,M);if((_=n.event)!=null&&_.rcbStartSimulateStreamMessage){const se=await h(j.START_SIMULATE_STREAM_MESSAGE,{message:W});if(se.defaultPrevented)return null;F=se.data.simulateStreamChunker||F,W=se.data.message}s(!1);let v=30;v=M==="BOT"?(U=n.botBubble)==null?void 0:U.streamSpeed:(N=n.userBubble)==null?void 0:N.streamSpeed;const V={...W,content:""};a(se=>[...se,V]),k(A.current);let q=W.content;F&&(q=F(q));let G=0;const X=q.length;W.sender.toUpperCase()==="BOT"&&(c.current||(L=n.general)!=null&&L.embedded)&&typeof W.content=="string"&&W.content.trim()!==""&&w(W.content);const he=new Promise(se=>{const Ke=setInterval(()=>{if(G>=X)return clearInterval(Ke),void se();a(Pe=>{const R=[...Pe];for(let Y=R.length-1;Y>=0;Y--)if(R[Y].id===V.id){const re=q[G];re&&(V.content+=re,R[Y]=V),G++;break}return R})},v)});return(l.current||!c.current)&&i(se=>se+1),await he,m(A.current),(y=n.event)!=null&&y.rcbStopSimulateStreamMessage&&await h(j.STOP_SIMULATE_STREAM_MESSAGE,{message:W}),M==="USER"&&(f.current=D),W},[n,h,k,A,f,s,i,c,w]),C=p.useCallback(async(D,M="BOT")=>{var F,_,U;M=M.toUpperCase();let N=pt(D,M);if((F=n.event)!=null&&F.rcbPreInjectMessage){const L=await h(j.PRE_INJECT_MESSAGE,{message:N});if(L.defaultPrevented)return null;N=L.data.message}return N.sender.toUpperCase()==="BOT"&&(c.current||(_=n.general)!=null&&_.embedded)&&typeof N.content=="string"&&N.content.trim()!==""&&w(N.content),(l.current||!c.current)&&i(L=>L+1),(U=n.event)!=null&&U.rcbPostInjectMessage&&await h(j.POST_INJECT_MESSAGE,{message:N}),a(L=>[...L,N]),k(A.current),M==="USER"&&typeof D=="string"&&(f.current=D),N},[n,h,k,f,A,c,w,i]),S=p.useCallback(async D=>{var M;let F=A.current.find(N=>N.id===D),_=null,U=!1;return F||(_=Wt(),F=_.find(N=>N.id===D),F&&(U=!0)),!F||(M=n.event)!=null&&M.rcbRemoveMessage&&(await h(j.REMOVE_MESSAGE,{message:F})).defaultPrevented?null:U?(_&&Rn(_.filter(N=>N.id!==D)),F):(a(N=>N.filter(L=>L.id!==D)),k(A.current),i(N=>Math.max(N-1,0)),F)},[h,(t=n.event)==null?void 0:t.rcbRemoveMessage,k,A,i,Wt,Rn]),I=p.useCallback(async(D,M="BOT")=>{var F,_;if(M=M.toUpperCase(),!d.current.has(M)){const N=pt(D,M);return(F=n.event)!=null&&F.rcbStartStreamMessage&&(await h(j.START_STREAM_MESSAGE,{message:N})).defaultPrevented?null:(s(!1),a(L=>[...L,N]),k(A.current),d.current.set(M,N.id),(l.current||!c.current)&&i(L=>L+1),N)}const U={...pt(D,M),id:d.current.get(M)};return(_=n.event)!=null&&_.rcbChunkStreamMessage&&(await h(j.CHUNK_STREAM_MESSAGE,{message:U})).defaultPrevented?null:(a(N=>N.map(L=>L.id===U.id?U:L)),k(A.current,!0),U)},[h,n.event,k,A,s,i,d]),Q=p.useCallback(async(D="BOT")=>{var M;if(D=D.toUpperCase(),!d.current.has(D))return!0;const F=d.current.get(D);let _;for(let U=0;U<3;U++){const N=A.current.find(L=>L.id===F);N&&(_=N),await new Promise(L=>setTimeout(L,20))}return((M=n.event)==null||!M.rcbStopStreamMessage||!(await h(j.STOP_STREAM_MESSAGE,{message:_})).defaultPrevented)&&(d.current.delete(D),m(A.current),D==="USER"&&typeof(_==null?void 0:_.content)=="string"&&(f.current=_.content),!0)},[h,(r=n.event)==null?void 0:r.rcbStopStreamMessage,d,f]),B=p.useCallback(D=>{const M=typeof D=="function"?D(A.current):D;a(M),k(M)},[k,A]),O=p.useCallback((D,M,F=0)=>{var _;const U=A.current,N=D?D.toUpperCase():null,L=[];let y=F;for(let W=U.length-1;W>=0;W--){const v=U[W];if(!N||((_=v==null?void 0:v.sender)==null?void 0:_.toUpperCase())===N){if(y>0){y--;continue}if(L.push(v),M!==void 0&&L.length===M)break}}return L.length>0?L:null},[A]);return{simulateStreamMessage:P,injectMessage:C,removeMessage:S,streamMessage:I,endStreamMessage:Q,replaceMessages:B,getMessages:O,messages:o}};let Gn,Ze,hn,ht=!1,$e=null;const Yn=()=>{if(!Gn){const e=window.SpeechRecognition||window.webkitSpeechRecognition;Gn=e!=null?new e:null}return Gn},rs=(e,t,r,n,o,a)=>{var A,s,i;const l=Yn();if(!l)return;if(!ht)try{ht=!0,l.lang=(A=e.voice)==null?void 0:A.language,l.start()}catch{}const c=(s=e.voice)==null?void 0:s.timeoutPeriod,d=(i=e.voice)==null?void 0:i.autoSendPeriod;l.onresult=u=>{var f,g;clearTimeout(Ze),Ze=null,clearTimeout(hn);const b=u.results[u.results.length-1][0].transcript;if(a.current){const h=(f=e.chatInput)==null?void 0:f.characterLimit,w=a.current.value+b;h!=null&&h>=0&&w.length>h?n(w.slice(0,h)):n(w),o(a.current.value.length)}c&&(Ze=setTimeout(async()=>await Kn(t,a),c)),(g=e.voice)!=null&&g.autoSendDisabled||(hn=setTimeout(r,d))},l.onend=()=>{ht?(l.start(),!Ze&&c&&(Ze=setTimeout(async()=>await Kn(t,a),c))):(clearTimeout(Ze),Ze=null,clearTimeout(hn))},c&&(Ze=setTimeout(async()=>await Kn(t,a),c))},os=(e,t)=>{navigator.mediaDevices.getUserMedia({audio:!0}).then(r=>{if($e=new MediaRecorder(r),!ht)try{ht=!0,$e.start()}catch{}$e.ondataavailable=n=>{t.current&&t.current.push(n.data)},$e.onstop=()=>{e(),r.getTracks().forEach(n=>n.stop())}}).catch(r=>{console.error("Unable to use microphone:",r)})},Wn=()=>{const e=Yn();e&&(ht=!1,e&&e.stop(),$e&&$e.state!=="inactive"&&($e.stop(),$e=null),clearTimeout(Ze),Ze=null,clearTimeout(hn))},Kn=async(e,t)=>{var r;(r=t.current)!=null&&r.disabled||await e(),Wn()},Vn=()=>{const{settings:e}=te(),{voiceToggledOn:t,setSyncedVoiceToggledOn:r,syncedVoiceToggledOnRef:n}=Se(),{dispatchRcbEvent:o}=Je(),a=p.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(l=>!l))},[n]),A=p.useCallback(s=>{((i,l)=>{var c,d,u;const f=Yn();(c=l.voice)!=null&&c.disabled||(d=l.chatInput)==null||!d.blockSpam||!f||(i&&!ht?(ht=!0,(u=l.voice)!=null&&u.sendAsAudio?$e==null||$e.start():f.start()):i||Wn())})(s,e)},[e]);return{voiceToggledOn:t,toggleVoice:a,syncVoice:A}},kt=()=>{var e;const{settings:t}=te(),{inputLength:r,setInputLength:n,textAreaDisabled:o,setSyncedTextAreaDisabled:a,textAreaSensitiveMode:A,setSyncedTextAreaSensitiveMode:s,syncedTextAreaDisabledRef:i,syncedTextAreaSensitiveModeRef:l}=Se(),{inputRef:c,chatBodyRef:d,prevInputRef:u}=ke(),{dispatchRcbEvent:f}=Je(),{getIsChatBotVisible:g}=Re(),b=p.useCallback(async C=>{var S,I,Q;if(i.current&&c.current)c.current.value="";else if(c.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?c.current.value=O.slice(0,B):c.current.value=O,(Q=t.event)!=null&&Q.rcbTextAreaChangeValue&&(await f(j.TEXT_AREA_CHANGE_VALUE,{currValue:c.current.value,prevValue:u.current})).defaultPrevented)return void(c.current.value=u.current);u.current=c.current.value}},[i,c,u,t,f]),h=p.useCallback(C=>{var S;(S=c.current)!=null&&S.disabled||setTimeout(()=>{var I,Q,B;(I=t.general)!=null&&I.embedded?g()&&((Q=c.current)==null||Q.focus()):C!=="start"&&((B=c.current)==null||B.focus())},100)},[c,(e=t.general)==null?void 0:e.embedded,d,g]),w=p.useCallback(()=>{c.current&&c.current.focus()},[]),x=p.useCallback(()=>{c.current&&c.current.blur()},[]),m=p.useCallback(()=>c&&c.current?c.current.value:"",[]),k=p.useCallback(C=>{C!==i.current&&a(S=>!S)},[i]),P=p.useCallback(C=>{C!==l.current&&s(S=>!S)},[l]);return{textAreaDisabled:o,setSyncedTextAreaDisabled:a,textAreaSensitiveMode:A,setSyncedTextAreaSensitiveMode:s,inputLength:r,setInputLength:n,getTextAreaValue:m,setTextAreaValue:b,updateTextAreaFocus:h,focusTextArea:w,blurTextArea:x,toggleTextAreaDisabled:k,toggleTextAreaSensitiveMode:P}},lo=p.createContext({toasts:[],setSyncedToasts:()=>{},syncedToastsRef:{current:[]}}),co=()=>p.useContext(lo),as=({children:e})=>{const[t,r,n]=ze([]);return E.jsx(lo.Provider,{value:{toasts:t,setSyncedToasts:r,syncedToastsRef:n},children:e})},Bt=()=>{const{settings:e}=te(),{toasts:t,setSyncedToasts:r,syncedToastsRef:n}=co(),{dispatchRcbEvent:o}=Je(),a=p.useCallback(async(i,l)=>{var c,d,u,f;let g=null;if(n.current.length>=(((c=e.toast)==null?void 0:c.maxCount)??3)){if((d=e.toast)!=null&&d.forbidOnMax)return null;g=un();let h={id:g,content:i,timeout:l};if((u=e.event)!=null&&u.rcbShowToast){const w=await o(j.SHOW_TOAST,{toast:h});if(w.defaultPrevented)return null;h=w.data.toast}return r(w=>[...w.slice(1),h]),g}g=un();let b={id:g,content:i,timeout:l};if((f=e.event)!=null&&f.rcbShowToast){const h=await o(j.SHOW_TOAST,{toast:b});if(h.defaultPrevented)return null;b=h.data.toast}return r(h=>[...h,b]),g},[e,o]),A=p.useCallback(async i=>{var l;const c=n.current.find(d=>d.id===i);return!c||(l=e.event)!=null&&l.rcbDismissToast&&(await o(j.DISMISS_TOAST,{toast:c})).defaultPrevented?null:(r(d=>d.filter(u=>u.id!==i)),i)},[o]),s=p.useCallback(i=>{const l=typeof i=="function"?i(n.current):i;r(l)},[n]);return{showToast:a,dismissToast:A,toasts:t,replaceToasts:s}},gn=()=>{var e,t,r,n,o;const{settings:a}=te(),{paths:A,setSyncedPaths:s,syncedPathsRef:i}=Yt(),{flowRef:l,streamMessageMap:c,paramsInputRef:d,keepVoiceOnRef:u,timeoutIdRef:f}=ke(),{setSyncedIsBotTyping:g,setSyncedTextAreaDisabled:b,setSyncedTextAreaSensitiveMode:h,blockAllowsAttachment:w,setBlockAllowsAttachment:x}=Se(),{dispatchRcbEvent:m}=Je(),{endStreamMessage:k,injectMessage:P,removeMessage:C,simulateStreamMessage:S,streamMessage:I}=Et(),{showToast:Q,dismissToast:B}=Bt(),{toggleChatWindow:O}=Re(),{updateTextAreaFocus:D,setTextAreaValue:M}=kt(),{syncVoice:F}=Vn(),_=p.useCallback(async v=>{var V;if((V=a.event)!=null&&V.rcbPostProcessBlock){const q=await m(j.POST_PROCESS_BLOCK,{block:v});if(q.defaultPrevented)return null;v=q.data.block}return v},[(e=a.event)==null?void 0:e.rcbPostProcessBlock,m]),U=p.useCallback(async(v,V)=>{var q,G,X,he;if(!v)return;let se=l.current[v];if(!se)return void g(!1);if((q=a.event)!=null&&q.rcbPreProcessBlock){const Pe=await m(j.PRE_PROCESS_BLOCK,{block:se});if(Pe.defaultPrevented)return;se=Pe.data.block}g(!0),(G=a.chatInput)!=null&&G.blockSpam&&b(!0),h(!1);const Ke={prevPath:V,currPath:v,goToPath:y,setTextAreaValue:M,userInput:d.current,endStreamMessage:k,injectMessage:P,removeMessage:C,simulateStreamMessage:S,streamMessage:I,toggleChatWindow:O,showToast:Q,dismissToast:B};await(async(Pe,R,Y,re,ne,ae,ue)=>{if(!Pe)throw new Error("Block is not valid.");for(const Ae of Object.keys(Pe))switch(Ae){case"message":await Ri(Pe,R,Y);break;case"options":await qi(Pe,R);break;case"checkboxes":await Fi(Pe,R);break;case"component":await Gi(Pe,R);break;case"chatDisabled":await Wi(Pe,R,ne);break;case"isSensitive":await no(Pe,R,ae);break;case"transition":await Yi(Pe,R,re,ue)}})(se,Ke,((X=a.botBubble)==null?void 0:X.simulateStream)??!1,f,b,h,_),g(!1),"chatDisabled"in se||b((he=a.chatInput)==null?void 0:he.disabled),"isSensitive"in se||h(!1),x(typeof se.file=="function"),D(v),F(u.current&&!se.chatDisabled),v!==V&&c.current.clear()},[l,D,F,(t=a.botBubble)==null?void 0:t.simulateStream,(r=a.chatInput)==null?void 0:r.disabled,d,k,P,C,S,I,O,Q,B,u,c]),N=p.useCallback(()=>i.current.length>0?i.current.at(-1)??null:null,[]),L=p.useCallback(()=>i.current.length>1?i.current.at(-2)??null:null,[]),y=p.useCallback(async v=>{var V;const q=N(),G=L();return((V=a.event)==null||!V.rcbChangePath||!(await m(j.CHANGE_PATH,{currPath:q,prevPath:G,nextPath:v})).defaultPrevented)&&(s(X=>[...X,v]),await U(v,q),!0)},[(n=a.chatInput)==null?void 0:n.blockSpam,(o=a.event)==null?void 0:o.rcbChangePath,U,m]),W=p.useCallback(v=>{const V=typeof v=="function"?v(i.current):v;s(V)},[i]);return{getCurrPath:N,getPrevPath:L,goToPath:y,blockAllowsAttachment:w,setBlockAllowsAttachment:x,paths:A,replacePaths:W,firePostProcessBlockEvent:_}},It=()=>{var e,t,r,n;const{settings:o}=te(),{endStreamMessage:a,injectMessage:A,removeMessage:s,simulateStreamMessage:i,streamMessage:l}=Et(),{syncedPathsRef:c}=Yt(),{getCurrPath:d,getPrevPath:u,goToPath:f,firePostProcessBlockEvent:g}=gn(),{setSyncedTextAreaSensitiveMode:b,setSyncedTextAreaDisabled:h,setSyncedIsBotTyping:w,setBlockAllowsAttachment:x,setInputLength:m,syncedVoiceToggledOnRef:k,syncedTextAreaSensitiveModeRef:P}=Se(),{flowRef:C,inputRef:S,keepVoiceOnRef:I,paramsInputRef:Q,timeoutIdRef:B}=ke(),{showToast:O,dismissToast:D}=Bt(),{dispatchRcbEvent:M}=Je(),{syncVoice:F}=Vn(),{setTextAreaValue:_}=kt(),{toggleChatWindow:U}=Re(),N=p.useCallback(async y=>{var W,v,V,q,G,X;const he=d();if(he&&C.current[he]){if(P.current){if((W=o==null?void 0:o.sensitiveInput)!=null&&W.hideInUserBubble)return;if((v=o==null?void 0:o.sensitiveInput)!=null&&v.maskInUserBubble)return void((V=o.userBubble)!=null&&V.simulateStream?await i("*".repeat(((q=o.sensitiveInput)==null?void 0:q.asterisksCount)??10),"USER"):await A("*".repeat(((G=o.sensitiveInput)==null?void 0:G.asterisksCount)??10),"USER"))}(X=o.userBubble)!=null&&X.simulateStream?await i(y,"USER"):await A(y,"USER")}},[C,d,o,A,i,P]),L=p.useCallback(async(y,W=!0)=>{var v,V;if((y=y.trim())==="")return;W&&await N(y),B.current&&clearTimeout(B.current),S.current&&(_(""),m(0));const q=d();if(!q)return;let G=C.current[q];const X=await g(G);X&&((v=o.chatInput)!=null&&v.blockSpam&&h(!0),I.current=k.current,F(!1),setTimeout(()=>{w(!0)},400),b(!1),setTimeout(async()=>{var he;const se={prevPath:u(),currPath:d(),goToPath:f,setTextAreaValue:_,userInput:Q.current,injectMessage:A,simulateStreamMessage:i,streamMessage:l,removeMessage:s,endStreamMessage:a,toggleChatWindow:U,showToast:O,dismissToast:D},Ke=c.current.length;await ro(X,se),c.current.length===Ke&&(h("chatDisabled"in G?!!G.chatDisabled:!((he=o.chatInput)==null||!he.disabled)),no(G,se,b),x(typeof G.file=="function"),F(I.current),w(!1))},(V=o.chatInput)==null?void 0:V.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,k,F,N,u,d,f,A,i,l,s,a,U,O,D,C]);return{handleSubmitText:p.useCallback(async(y,W=!0)=>{var v,V;y=y??((v=S.current)==null?void 0:v.value),!((V=o.event)!=null&&V.rcbUserSubmitText&&(await M(j.USER_SUBMIT_TEXT,{inputText:y,sendInChat:W})).defaultPrevented||!d())&&L(y,W)},[M,d,L,S,(n=o.event)==null?void 0:n.rcbUserSubmitText])}},mn=()=>{var e;const{settings:t}=te();return p.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])},is=({buttons:e})=>{var t,r,n,o,a,A,s,i,l,c,d;const u=mn(),{settings:f}=te(),{styles:g}=le(),{textAreaDisabled:b,textAreaSensitiveMode:h,inputLength:w,hasFlowStarted:x,setHasFlowStarted:m,setInputLength:k}=Se(),{inputRef:P}=ke(),[C,S]=p.useState(!1),[I,Q]=p.useState(!1),{handleSubmitText:B}=It(),{setTextAreaValue:O}=kt(),D={boxSizing:u?"content-box":"border-box",...g.chatInputAreaStyle},M={outline:b?"":"none",boxShadow:b?"":`0 0 5px ${(t=f.general)==null?void 0:t.primaryColor}`,boxSizing:u?"content-box":"border-box",...g.chatInputAreaStyle,...g.chatInputAreaFocusedStyle},F={cursor:`url("${(r=f.general)==null?void 0:r.actionDisabledIcon}"), auto`,caretColor:"transparent",boxSizing:u?"content-box":"border-box",...g.chatInputAreaStyle,...g.chatInputAreaDisabledStyle},_={color:"#989898",...g.characterLimitStyle},U={color:"#ff0000",...g.characterLimitReachedStyle},N=b?(n=f.chatInput)==null?void 0:n.disabledPlaceholderText:(o=f.chatInput)==null?void 0:o.enabledPlaceholderText,L=()=>{b||S(!0)},y=()=>{S(!1)},W=()=>{Q(!0)},v=()=>{Q(!1)},V=async G=>{var X;if(!I&&G.key==="Enter"){if(G.shiftKey)return void((X=f.chatInput)!=null&&X.allowNewline||G.preventDefault());G.preventDefault(),await B()}},q=G=>{P.current&&(O(G.target.value),k(P.current.value.length))};return E.jsxs("div",{"aria-label":((a=f.ariaLabel)==null?void 0:a.inputTextArea)??"input text area",role:"textbox",onMouseDown:G=>{var X;G.stopPropagation(),!x&&((X=f.general)==null?void 0:X.flowStartTrigger)==="ON_CHATBOT_INTERACT"&&m(!0)},style:{...g.chatInputContainerStyle},className:"rcb-chat-input",children:[h&&(A=f.sensitiveInput)!=null&&A.maskInTextArea?E.jsx("input",{ref:P,type:"password",className:"rcb-chat-input-textarea",style:b?F:C?M:D,placeholder:N,onChange:q,onKeyDown:V,onFocus:L,onBlur:y,onCompositionStart:W,onCompositionEnd:v}):E.jsx("textarea",{ref:P,style:b?F:C?M:D,rows:1,className:"rcb-chat-input-textarea",placeholder:N,onChange:q,onKeyDown:V,onFocus:L,onBlur:y,onCompositionStart:W,onCompositionEnd:v}),E.jsxs(E.Fragment,{children:[e==null?void 0:e.map((G,X)=>E.jsx(p.Fragment,{children:G},X)),((s=f.chatInput)==null?void 0:s.showCharacterCount)&&((i=f.chatInput)==null?void 0:i.characterLimit)!=null&&((l=f.chatInput)==null?void 0:l.characterLimit)>0&&E.jsxs("div",{className:"rcb-chat-input-char-counter",style:w>=((c=f.chatInput)==null?void 0:c.characterLimit)?U:_,children:[w,"/",(d=f.chatInput)==null?void 0:d.characterLimit]})]})]})},ss=({buttons:e})=>{var t;const{settings:r}=te(),{styles:n}=le();return E.jsxs("div",{"data-testid":"chatbot-footer-container",style:{...n.footerStyle},className:"rcb-chat-footer-container",children:[E.jsx("div",{className:"rcb-chat-footer",children:e==null?void 0:e.map((o,a)=>E.jsx(p.Fragment,{children:o},a))}),E.jsx("span",{children:(t=r.footer)==null?void 0:t.text})]})},As=()=>{var e,t,r,n,o,a,A;const{settings:s}=te(),{styles:i}=le(),{unreadCount:l}=Se(),{isChatWindowOpen:c,toggleChatWindow:d}=Re(),[u,f]=p.useState(!1),g={backgroundImage:`linear-gradient(to right, ${(e=s.general)==null?void 0:e.secondaryColor},
3
+ ${(t=s.general)==null?void 0:t.primaryColor})`,...i.chatButtonStyle},b={transform:"scale(1.05)",...g,...i.chatButtonHoveredStyle},h={backgroundImage:`url(${(r=s.chatButton)==null?void 0:r.icon})`,fill:"#fff",width:75,height:75,...i.chatIconStyle};return E.jsx(E.Fragment,{children:!((n=s.general)!=null&&n.embedded)&&E.jsxs("div",{"aria-label":((o=s.ariaLabel)==null?void 0:o.chatButton)??"open chat",role:"button",style:u?b:g,className:"rcb-toggle-button "+(c?"rcb-button-hide":"rcb-button-show"),onMouseEnter:()=>{f(!0)},onMouseLeave:()=>{f(!1)},onClick:()=>d(!0),children:[(()=>{var w;const x=(w=s.chatButton)==null?void 0:w.icon;return x&&typeof x!="string"?x&&E.jsx("span",{className:"rcb-toggle-icon",children:E.jsx(x,{style:h})}):E.jsx("span",{className:"rcb-toggle-icon",style:h})})(),!((a=s.notification)!=null&&a.disabled)&&((A=s.notification)==null?void 0:A.showCount)&&E.jsx("span",{style:{...i.notificationBadgeStyle},className:"rcb-badge",children:l})]})})},ls=()=>{var e,t,r,n,o,a;const A=mn(),{settings:s}=te(),{styles:i}=le(),{chatBodyRef:l}=ke(),{isChatWindowOpen:c,toggleChatWindow:d}=Re(),[u,f]=p.useState(!1),[g,b]=p.useState(!1),[h,w]=p.useState(0);p.useEffect(()=>{var k,P,C;const S=(k=s.tooltip)==null?void 0:k.mode;if(S==="ALWAYS")if(A){let I;I=c?(((P=l.current)==null?void 0:P.offsetWidth)??375)-(typeof((C=i.chatButtonStyle)==null?void 0:C.width)=="number"?i.chatButtonStyle.width:75):0,w(I),f(!0)}else f(!c);else S==="NEVER"?f(!1):S==="START"?g?f(!1):(b(!0),f(!0)):S==="CLOSE"&&f(!c)},[c,A,g,(e=i.chatButtonStyle)==null?void 0:e.width,(t=s.tooltip)==null?void 0:t.mode]);const x={transform:`translateX(-${h}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 E.jsx(E.Fragment,{children:!((o=s.general)!=null&&o.embedded)&&E.jsxs("div",{"data-testid":"chat-tooltip",style:x,className:"rcb-chat-tooltip "+(u?"rcb-tooltip-show":"rcb-tooltip-hide"),onClick:()=>d(!0),children:[E.jsx("span",{children:(a=s.tooltip)==null?void 0:a.text}),E.jsx("span",{className:"rcb-chat-tooltip-tail",style:m})]})})},cs=({id:e,content:t,timeout:r})=>{var n,o;const{settings:a}=te(),{styles:A}=le(),[s]=p.useState({toastPromptStyle:{...A.toastPromptStyle},toastPromptHoveredStyle:{...A.toastPromptHoveredStyle}}),{dismissToast:i}=Bt(),[l,c]=p.useState(!1),d={color:(n=a.general)==null?void 0:n.primaryColor,borderColor:(o=a.general)==null?void 0:o.primaryColor,...s.toastPromptHoveredStyle};return p.useEffect(()=>{if(r){const u=setTimeout(()=>{i(e)},r);return()=>clearTimeout(u)}},[e,i,r]),typeof t=="string"?E.jsx("div",{onMouseEnter:()=>{c(!0)},onMouseLeave:()=>{c(!1)},style:l?d:s.toastPromptStyle,onMouseDown:async u=>{var f;(f=a.toast)!=null&&f.dismissOnClick&&(u.preventDefault(),await i(e))},className:"rcb-toast-prompt",children:t}):E.jsx(E.Fragment,{children:t})},us=()=>{var e,t,r,n,o,a,A,s,i,l,c,d;const{styles:u}=le(),{toasts:f}=co(),g={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((l=u.chatWindowStyle)==null?void 0:l.width)=="number"?`${(c=u.chatWindowStyle)==null?void 0:c.width}px`:((d=u.chatWindowStyle)==null?void 0:d.width)??"375px"} - 50px)`,...u.toastPromptContainerStyle};return E.jsx("div",{className:"rcb-toast-prompt-container",style:g,children:f.map(b=>E.jsx(cs,{id:b.id,content:b.content,timeout:b.timeout},b.id))})},uo=({file:e,fileType:t,fileUrl:r})=>{var n,o,a;const{settings:A}=te(),{styles:s}=le(),i={backgroundColor:(n=A.general)==null?void 0:n.primaryColor,maxWidth:(o=A.userBubble)!=null&&o.showAvatar?"65%":"70%",...s.mediaDisplayContainerStyle};return E.jsx(E.Fragment,{children:r?E.jsxs(E.Fragment,{children:[t==="image"&&r&&E.jsx("div",{style:i,className:"rcb-media-display-image-container rcb-media-entry","data-testid":"media-display-image-container",children:E.jsx("img",{src:r,alt:"Image Display",className:"rcb-media-display-image"})}),t==="video"&&r&&E.jsx("div",{style:i,className:"rcb-media-display-video-container rcb-media-entry","data-testid":"media-display-video-container",children:E.jsxs("video",{controls:!0,className:"rcb-media-display-video",children:[E.jsx("source",{src:r,type:e.type}),"Your browser does not support the video tag."]})}),t==="audio"&&r&&E.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:[E.jsx("source",{src:r,type:e.type}),"Your browser does not support the audio tag."]})]}):E.jsx(E.Fragment,{})})},po=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}}},ds=()=>{var e,t,r,n,o,a;const{settings:A}=te(),{styles:s}=le(),{injectMessage:i,simulateStreamMessage:l,streamMessage:c,removeMessage:d,endStreamMessage:u}=Et(),{getCurrPath:f,getPrevPath:g,goToPath:b,blockAllowsAttachment:h}=gn(),{flowRef:w,inputRef:x}=ke(),m=w.current,{showToast:k,dismissToast:P}=Bt(),{dispatchRcbEvent:C}=Je(),{toggleChatWindow:S}=Re(),{setTextAreaValue:I}=kt(),{handleSubmitText:Q}=It(),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 E.jsxs("label",{"aria-label":((n=A.ariaLabel)==null?void 0:n.fileAttachmentButton)??"upload file",role:"button",className:h?"rcb-attach-button-enabled":"rcb-attach-button-disabled",style:h?{...s.fileAttachmentButtonStyle}:B,children:[E.jsx("input",{className:"rcb-attach-input",role:"file",type:"file",onChange:async M=>{var F,_,U,N;const L=M.target.files;if(!L)return;const y=Array.from(L);if(M.target.value="",(F=A.event)!=null&&F.rcbUserUploadFile&&(await C(j.USER_UPLOAD_FILE,{files:y})).defaultPrevented)return;const W=f();if(!W)return;const v=m[W];if(!v)return;const V=v.file;if(V!=null){const q=[];for(let G=0;G<y.length;G++){if(q.push(y[G].name),(_=A.fileAttachment)==null||!_.showMediaDisplay)continue;const X=await po(y[G]);!X.fileType||!X.fileUrl||await i(E.jsx(uo,{file:y[G],fileType:X.fileType,fileUrl:X.fileUrl}),"USER")}await Q("📄 "+q.join(", "),(U=A.fileAttachment)==null?void 0:U.sendFileName),await V({userInput:(N=x.current)==null?void 0:N.value,prevPath:g(),currPath:f(),goToPath:b,setTextAreaValue:I,injectMessage:i,simulateStreamMessage:l,streamMessage:c,removeMessage:d,endStreamMessage:u,toggleChatWindow:S,showToast:k,dismissToast:P,files:y})}},multiple:(o=A.fileAttachment)==null?void 0:o.multiple,accept:(a=A.fileAttachment)==null?void 0:a.accept,disabled:!h}),(()=>{var M,F;const _=h?(M=A.fileAttachment)==null?void 0:M.icon:(F=A.fileAttachment)==null?void 0:F.iconDisabled;return _&&typeof _!="string"?_&&E.jsx("span",{className:h?"rcb-attach-icon-enabled":"rcb-attach-icon-disabled",children:E.jsx(_,{style:h?O:D})}):E.jsx("span",{className:h?"rcb-attach-icon-enabled":"rcb-attach-icon-disabled",style:h?O:D})})()]})},ps=()=>{var e,t,r,n,o,a;const{settings:A}=te(),{styles:s}=le(),{syncedTextAreaDisabledRef:i}=Se(),{inputRef:l}=ke(),{textAreaDisabled:c,setTextAreaValue:d}=kt(),u=p.useRef(null),f=p.useRef(null),[g,b]=p.useState(!1),h={cursor:`url("${(e=A.general)==null?void 0:e.actionDisabledIcon}"), auto`,...s.emojiButtonStyle,...s.emojiButtonDisabledStyle},w={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 p.useEffect(()=>{const m=P=>{const C=P.composedPath();u.current&&!C.includes(u.current)&&f.current&&!C.includes(f.current)&&b(!1)},k=()=>{(()=>{if(u.current&&f.current){const P=f.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",k),()=>{document.removeEventListener("mousedown",m),window.removeEventListener("resize",k)}},[]),E.jsxs(E.Fragment,{children:[E.jsx("div",{"aria-label":((n=A.ariaLabel)==null?void 0:n.emojiButton)??"emoji picker",role:"button",ref:f,className:c?"rcb-emoji-button-disabled":"rcb-emoji-button-enabled",style:c?h:{...s.emojiButtonStyle},onMouseDown:m=>{m.preventDefault(),i.current?b(!1):b(k=>!k)},children:(()=>{var m,k;const P=c?(m=A.emoji)==null?void 0:m.iconDisabled:(k=A.emoji)==null?void 0:k.icon;return P&&typeof P!="string"?P&&E.jsx("span",{className:c?"rcb-emoji-icon-disabled":"rcb-emoji-icon-enabled",children:E.jsx(P,{style:c?x:w})}):E.jsx("span",{className:c?"rcb-emoji-icon-disabled":"rcb-emoji-icon-enabled",style:c?x:w})})()}),g&&E.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,k)=>E.jsx("span",{className:"rcb-emoji",onMouseDown:P=>((C,S)=>{C.preventDefault(),l.current&&(d(l.current.value+S),setTimeout(()=>{const I=l.current;if(I){I.focus();const Q=I.value.length;I.setSelectionRange(Q,Q)}},50)),b(!1)})(P,m),children:m},k))})]})},fs=()=>{var e,t,r;const{settings:n}=te(),{styles:o}=le(),{audioToggledOn:a,toggleAudio:A}=Ao(),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 E.jsx("div",{"aria-label":((r=n.ariaLabel)==null?void 0:r.audioButton)??"toggle audio",role:"button",onMouseDown:async l=>{l.preventDefault(),await A()},style:a?{...o.audioButtonStyle}:{...o.audioButtonStyle,...o.audioButtonDisabledStyle},children:(()=>{var l,c;const d=a?(l=n.audio)==null?void 0:l.icon:(c=n.audio)==null?void 0:c.iconDisabled;return d&&typeof d!="string"?d&&E.jsx("span",{className:"rcb-audio-icon","data-testid":"rcb-audio-icon",children:E.jsx(d,{style:a?s:i,"data-testid":"rcb-audio-icon-svg"})}):E.jsx("span",{className:"rcb-audio-icon","data-testid":"rcb-audio-icon",style:a?s:i})})()})},hs=()=>{var e,t;const{settings:r}=te(),{styles:n}=le(),{toggleChatWindow:o}=Re(),a={backgroundImage:`url(${(e=r.header)==null?void 0:e.closeChatIcon})`,fill:"#e8eaed",stroke:"#e8eaed",...n.closeChatIconStyle};return E.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&&E.jsx("span",{className:"rcb-close-chat-icon","data-testid":"rcb-close-chat-icon",children:E.jsx(s,{style:a})}):E.jsx("span",{className:"rcb-close-chat-icon","data-testid":"rcb-close-chat-icon",style:a})})()})},gs=()=>{var e,t,r;const{settings:n}=te(),{styles:o}=le(),{notificationsToggledOn:a,toggleNotifications:A}=(()=>{const{notificationsToggledOn:l,toggleNotifications:c,playNotificationSound:d}=qn();return{notificationsToggledOn:l,toggleNotifications:c,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 E.jsx("div",{"aria-label":((r=n.ariaLabel)==null?void 0:r.notificationButton)??"toggle notifications",role:"button",onMouseDown:async l=>{l.preventDefault(),await A()},style:a?{...o.notificationButtonStyle}:{...o.notificationButtonStyle,...o.notificationButtonDisabledStyle},children:(()=>{var l,c;const d=a?(l=n.notification)==null?void 0:l.icon:(c=n.notification)==null?void 0:c.iconDisabled;return d&&typeof d!="string"?d&&E.jsx("span",{className:"rcb-notification-icon","data-testid":"rcb-notification-icon",children:E.jsx(d,{style:a?s:i,"data-testid":"rcb-notification-icon-svg"})}):E.jsx("span",{className:"rcb-notification-icon","data-testid":"rcb-notification-icon",style:a?s:i})})()})},ms=()=>{var e,t,r;const{settings:n}=te(),{styles:o}=le(),{injectMessage:a}=Et(),{inputRef:A}=ke(),{voiceToggledOn:s,toggleVoice:i}=Vn(),{setInputLength:l,setTextAreaValue:c,textAreaDisabled:d}=kt(),{handleSubmitText:u}=It(),f=p.useRef([]),[g,b]=p.useState(!1);p.useEffect(()=>{var k;(k=n.voice)!=null&&k.sendAsAudio?(m(),f.current=[]):u()},[g]),p.useEffect(()=>{s?((k,P,C,S,I,Q,B)=>{var O;(O=k.voice)!=null&&O.sendAsAudio?os(C,Q):rs(k,P,C,S,I,B)})(n,i,x,c,l,f,A):Wn()},[s]);const h={backgroundImage:`url(${(e=n.voice)==null?void 0:e.icon})`,fill:"#9aa0a6",...o.voiceIconStyle},w={backgroundImage:`url(${(t=n.voice)==null?void 0:t.iconDisabled})`,fill:"#9aa0a6",...o.voiceIconStyle,...o.voiceIconDisabledStyle},x=()=>{b(k=>!k)},m=async()=>{const k=new Blob(f.current,{type:"audio/wav"}),P=new File([k],"voice-input.wav",{type:"audio/wav"}),C=await po(P);!C.fileType||!C.fileUrl||await a(E.jsx(uo,{file:P,fileType:C.fileType,fileUrl:C.fileUrl}),"USER")};return E.jsx("div",{"aria-label":((r=n.ariaLabel)==null?void 0:r.voiceButton)??"toggle voice",role:"button",onMouseDown:async k=>{k.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 k,P;const C=s?(k=n.voice)==null?void 0:k.icon:(P=n.voice)==null?void 0:P.iconDisabled;return C&&typeof C!="string"?C&&E.jsx("span",{className:"rcb-voice-icon "+(s&&!d?"on":""),children:E.jsx(C,{style:s&&!d?h:w})}):E.jsx("span",{className:"rcb-voice-icon"+(s&&!d?"-on":""),"data-testid":"rcb-voice-icon",style:s&&!d?h:w})})()})},ys=()=>{var e,t,r,n,o,a,A,s;const{settings:i}=te(),{styles:l}=le(),{textAreaDisabled:c}=Se(),[d,u]=p.useState(!1),{handleSubmitText:f}=It(),g={backgroundColor:(e=i.general)==null?void 0:e.primaryColor,...l.sendButtonStyle},b={cursor:`url("${(t=i.general)==null?void 0:t.actionDisabledIcon}"), auto`,backgroundColor:(r=i.general)==null?void 0:r.primaryColor,...l.sendButtonStyle,...l.sendButtonDisabledStyle},h={backgroundColor:(n=i.general)==null?void 0:n.secondaryColor,...l.sendButtonStyle,...l.sendButtonHoveredStyle},w={backgroundImage:`url(${(o=i.chatInput)==null?void 0:o.sendButtonIcon})`,fill:"#fff",...l.sendIconStyle},x={backgroundImage:`url(${(a=i.chatInput)==null?void 0:a.sendButtonIcon})`,fill:"#fff",...l.sendIconStyle,...l.sendIconDisabledStyle},m={backgroundImage:`url(${(A=i.chatInput)==null?void 0:A.sendButtonIcon})`,fill:"#fff",...l.sendIconStyle,...l.sendIconHoveredStyle};return E.jsx("div",{"aria-label":((s=i.ariaLabel)==null?void 0:s.sendButton)??"send message",role:"button",onMouseEnter:()=>{u(!0)},onMouseLeave:()=>{u(!1)},onMouseDown:async k=>{k==null||k.preventDefault(),!c&&await f()},style:c?b:d?h:g,className:"rcb-send-button",children:(()=>{var k;const P=(k=i.chatInput)==null?void 0:k.sendButtonIcon;return P&&typeof P!="string"?P&&E.jsx("span",{className:"rcb-send-icon","data-testid":"rcb-send-icon",children:E.jsx(P,{style:c?x:d?m:w})}):E.jsx("span",{className:"rcb-send-icon","data-testid":"rcb-send-icon",style:c?x:d?m:w})})()})},bs=(e,t)=>{var r,n,o,a,A,s,i,l,c;const d={[ye.AUDIO_BUTTON]:(r=e.audio)==null?void 0:r.disabled,[ye.CLOSE_CHAT_BUTTON]:(n=e.general)==null?void 0:n.embedded,[ye.EMOJI_PICKER_BUTTON]:(o=e.emoji)==null?void 0:o.disabled,[ye.FILE_ATTACHMENT_BUTTON]:(a=e.fileAttachment)==null?void 0:a.disabled,[ye.NOTIFICATION_BUTTON]:(A=e.notification)==null?void 0:A.disabled,[ye.SEND_MESSAGE_BUTTON]:!1,[ye.VOICE_MESSAGE_BUTTON]:(s=e.voice)==null?void 0:s.disabled},u={},f=g=>g?g.map(b=>{if(typeof b=="string"){if((h=>Object.values(ye).includes(h))(b)&&!d[b]){if(u[b])return u[b];const h=t[b];if(typeof h=="function"){const w=h();return u[b]=w,w}return null}return null}return b}).filter(b=>b!==null):[];return{header:f((i=e.header)==null?void 0:i.buttons),chatInput:f((l=e.chatInput)==null?void 0:l.buttons),footer:f((c=e.footer)==null?void 0:c.buttons)}},vs=()=>{const{settings:e}=te(),t=p.useMemo(()=>({[ye.CLOSE_CHAT_BUTTON]:()=>E.jsx(hs,{}),[ye.AUDIO_BUTTON]:()=>E.jsx(fs,{}),[ye.NOTIFICATION_BUTTON]:()=>E.jsx(gs,{}),[ye.EMOJI_PICKER_BUTTON]:()=>E.jsx(ps,{}),[ye.FILE_ATTACHMENT_BUTTON]:()=>E.jsx(ds,{}),[ye.SEND_MESSAGE_BUTTON]:()=>E.jsx(ys,{}),[ye.VOICE_MESSAGE_BUTTON]:()=>E.jsx(ms,{})}),[]),{header:r,chatInput:n,footer:o}=p.useMemo(()=>bs(e,t),[e,t]);return{headerButtons:p.useMemo(()=>r,[r]),chatInputButtons:p.useMemo(()=>n,[n]),footerButtons:p.useMemo(()=>o,[o])}},Xn=()=>{const{settings:e}=te(),{styles:t}=le(),{setSyncedMessages:r,syncedMessagesRef:n}=zn(),{isLoadingChatHistory:o,setIsLoadingChatHistory:a,hasChatHistoryLoaded:A,setHasChatHistoryLoaded:s}=Se(),{chatBodyRef:i}=ke(),{dispatchRcbEvent:l}=Je(),c=p.useCallback(async()=>{var d,u;const f=Wt();if(!f||(d=e.event)!=null&&d.rcbLoadChatHistory&&(await l(j.LOAD_CHAT_HISTORY,{})).defaultPrevented)return;a(!0);const g=((u=i.current)==null?void 0:u.scrollHeight)??0;((b,h,w,x,m,k,P,C,S)=>{var I;if(oo=!0,w!=null)try{const Q=pt(E.jsx(Vi,{}),"SYSTEM"),B=m.current.slice(1);x([Q,...B]);const O=w.map(D=>{if(D.type==="object"){const M=so(D.content,b,h);return{...D,content:M}}return D});setTimeout(()=>{var D;const M=m.current.slice(1);let F=(D=b.chatHistory)!=null&&D.autoLoad?pt(E.jsx(E.Fragment,{}),"SYSTEM"):pt(E.jsx(Ki,{}),"SYSTEM");x([...O,F,...M]),S(!0)},500),setTimeout(()=>{if(!k.current)return;const{scrollHeight:D}=k.current,M=D-P;k.current.scrollTop+=M,C(!1)},510)}catch{ft.removeItem((I=b.chatHistory)==null?void 0:I.storageKey)}})(e,t,f,r,n,i,g,a,s)},[e,t,l,n,i,a,s]);return{isLoadingChatHistory:o,setIsLoadingChatHistory:a,hasChatHistoryLoaded:A,showChatHistory:c}},ws=()=>{var e,t,r;const{settings:n}=te(),{styles:o}=le(),{showChatHistory:a}=Xn(),[A,s]=p.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 E.jsx("div",{className:"rcb-view-history-container",children:E.jsx("div",{onMouseEnter:()=>{s(!0)},onMouseLeave:()=>{s(!1)},style:A?i:{...o.chatHistoryButtonStyle},onMouseDown:l=>{l.preventDefault(),a()},className:"rcb-view-history-button",role:"button",tabIndex:0,children:E.jsx("p",{children:(r=n.chatHistory)==null?void 0:r.viewChatHistoryButtonText})})})},xs=()=>{var e,t,r,n;const o=mn(),{settings:a}=te(),{replaceMessages:A}=Et(),{isBotTyping:s,isChatWindowOpen:i,setUnreadCount:l,setSyncedIsChatWindowOpen:c,setSyncedTextAreaDisabled:d,setSyncedAudioToggledOn:u,setSyncedVoiceToggledOn:f,setSyncedIsScrolling:g,syncedIsScrollingRef:b,syncedIsChatWindowOpenRef:h}=Se(),{chatBodyRef:w}=ke(),{viewportHeight:x,setViewportHeight:m,setViewportWidth:k,scrollToBottom:P}=Re(),{setUpNotifications:C}=qn(),{handleFirstInteraction:S}=(()=>{var O;const{settings:D}=te(),{hasInteractedPage:M,setHasInteractedPage:F,hasFlowStarted:_,setHasFlowStarted:U}=Se(),N=p.useCallback(()=>{var L;if(F(!0),!_&&((L=D.general)==null?void 0:L.flowStartTrigger)==="ON_PAGE_INTERACT"&&U(!0),!window.SpeechSynthesisUtterance)return void console.info("Speech Synthesis API is not supported in this environment.");const y=new window.SpeechSynthesisUtterance;y.text="",y.onend=()=>{window.removeEventListener("click",N),window.removeEventListener("keydown",N),window.removeEventListener("touchstart",N)},window.speechSynthesis.speak(y)},[_,(O=D.general)==null?void 0:O.flowStartTrigger]);return{hasInteractedPage:M,handleFirstInteraction:N}})(),{showChatHistory:I}=Xn(),Q=p.useRef(0),B=p.useRef(!1);p.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)}),[]),p.useEffect(()=>{const O=w.current;if(!O)return;const D=()=>{B.current||(B.current=!0,requestAnimationFrame(()=>{var M,F;if(!O)return;const{scrollTop:_,clientHeight:U,scrollHeight:N}=O,L=_+U<N-(((M=a.chatWindow)==null?void 0:M.messagePromptOffset)??30);g(L),b.current=L,L||(_+U>=N-1&&(O.scrollTop=N-U-1),(h.current||(F=a.general)!=null&&F.embedded)&&l(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)}},[]),p.useEffect(()=>{var O,D,M;d((O=a.chatInput)==null?void 0:O.disabled),c((D=a.chatWindow)==null?void 0:D.defaultOpen),u((M=a.audio)==null?void 0:M.defaultToggledOn),setTimeout(()=>{var F;f((F=a.voice)==null?void 0:F.defaultToggledOn)},1)},[]),p.useEffect(()=>{var O;(O=a.notification)!=null&&O.disabled||C()},[(e=a.notification)==null?void 0:e.disabled]),p.useEffect(()=>{!b.current&&w!=null&&w.current&&P()},[s]),p.useEffect(()=>{var O,D;if((O=a.chatHistory)!=null&&O.disabled)ft&&ft.removeItem(dn);else if(jn(a),Wt().length>0){const M=pt(E.jsx(ws,{}),"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]),p.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:F,width:_,height:U}=D.target.boundingRect;M==0&&F==0&&_==0&&U==0?(setTimeout(()=>{var N;m((N=window.visualViewport)==null?void 0:N.height)},101),setTimeout(()=>{var N,L;x!=((N=window.visualViewport)==null?void 0:N.height)&&m((L=window.visualViewport)==null?void 0:L.height)},1001)):setTimeout(()=>{var N;m(((N=window.visualViewport)==null?void 0:N.height)-U)},101)}))},[o]),p.useEffect(()=>{var O,D,M,F;if(o)return;i&&(m((O=window.visualViewport)==null?void 0:O.height),k((D=window.visualViewport)==null?void 0:D.width));const _=()=>window.scrollTo({top:0,left:0,behavior:"auto"}),U=()=>Q.current=window.scrollY,N=()=>{var y,W;m((y=window.visualViewport)==null?void 0:y.height),k((W=window.visualViewport)==null?void 0:W.width)},L=()=>{var y;window.removeEventListener("scroll",_),window.removeEventListener("scroll",U),(y=window.visualViewport)==null||y.removeEventListener("resize",N)};return i?(L(),document.body.style.position="fixed",window.addEventListener("scroll",_),(M=window.visualViewport)==null||M.addEventListener("resize",N)):(document.body.style.position="static",L(),window.scrollTo({top:Q.current,left:0,behavior:"auto"}),window.addEventListener("scroll",U),(F=window.visualViewport)==null||F.removeEventListener("resize",N)),L},[i,o])},Es="https://cdn.jsdelivr.net/gh/react-chatbotify/community-themes/themes",ks="2592000",fo="RCB_THEME_CACHE_DATA",ho=async(e,t)=>{const{id:r,version:n,baseUrl:o=Es,cacheDuration:a=ks}=t,A=n||await(async(w,x)=>{const m=`${x}/${w}/meta.json`;try{const k=await fetch(m);return k.ok?(await k.json()).version:(console.error(`Failed to fetch meta.json from ${m}`),null)}catch(k){return console.error(`Failed to fetch meta.json from ${m}`,k),null}})(r,o);if(!A)return console.error(`Unable to find version for theme: ${r}`),{settings:{},inlineStyles:{},cssStylesText:""};const s=((w,x,m)=>{const k=localStorage.getItem(`${fo}_${w}_${x}`);if(!k)return null;try{const P=JSON.parse(k),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 ${w}`,P),null}})(r,A,a);if(s){const w=go(e,s.cssStylesText);return{settings:s.settings,inlineStyles:s.inlineStyles,cssStylesText:w}}const i=`${o}/${r}/${A}/styles.css`,l=`${o}/${r}/${A}/settings.json`,c=`${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 f=await fetch(l);let g={};f.ok?g=await f.json():console.info(`Could not fetch settings.json from ${l}`);const b=await fetch(c);let h={};return b.ok?h=await b.json():console.info(`Could not fetch styles.json from ${c}`),((w,x,m,k,P)=>{const C=new Date().getTime(),S={settings:m,inlineStyles:k,cssStylesText:P,cacheDate:Math.floor(C/1e3)};localStorage.setItem(`${fo}_${w}_${x}`,JSON.stringify(S))})(r,A,g,h,d),{settings:g,inlineStyles:h,cssStylesText:go(e,d)}},go=(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
+ `),Cs=async(e,t,r,n)=>{var o,a;let A=yn(Kr),s=yn(Xr),i="";if(n!=null)if(Array.isArray(n))for(const l of n){const c=await ho(e,l);A=et(c.settings,A),s=et(c.inlineStyles,s),i+=c.cssStylesText}else{const l=await ho(e,n);A=et(l.settings,A),s=et(l.inlineStyles,s),i+=l.cssStylesText}return t!=null&&(A=et(t,A)),r!=null&&(s=et(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}},et=(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(p.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},yn=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 l=Array.isArray(i)?[]:{};n.set(i,l),A[s]=l,r.push({source:i,target:l})}else A[s]=i}}return t},mo=()=>{const{settings:e,setSyncedSettings:t,syncedSettingsRef:r}=te(),n=p.useCallback(a=>{!a||Object.keys(a).length===0||t(yn(et(a,e)))},[e]),o=p.useCallback(a=>{const A=typeof a=="function"?a(r.current):a;t(A)},[r]);return{settings:e,replaceSettings:o,updateSettings:n}},yo=()=>{const{styles:e,setSyncedStyles:t,syncedStylesRef:r}=le(),n=p.useCallback(a=>{!a||Object.keys(a).length===0||t(yn(et(a,e)))},[e]),o=p.useCallback(a=>{const A=typeof a=="function"?a(r.current):a;t(A)},[r]);return{styles:e,replaceStyles:o,updateStyles:n}},Ps=({plugins:e,slots:t})=>{var r,n;const o=mn(),{settings:a}=te(),{styles:A}=le(),{hasFlowStarted:s,setHasFlowStarted:i}=Se(),{inputRef:l}=ke(),{viewportHeight:c,viewportWidth:d,isChatWindowOpen:u}=Re(),{goToPath:f}=gn(),{headerButtons:g,chatInputButtons:b,footerButtons:h}=vs();xs(),(x=>{const{updateSettings:m}=mo(),{updateStyles:k}=yo(),P=x==null?void 0:x.map(C=>C());p.useEffect(()=>{let C={},S={};P==null||P.forEach(I=>{I!=null&&I.settings&&Object.keys(I==null?void 0:I.settings).length!==0&&(C=et(I.settings,C)),I!=null&&I.styles&&Object.keys(I==null?void 0:I.styles).length!==0&&(S=et(I.styles,S))}),m(C),k(S)},[])})(e),p.useEffect(()=>{var x;(s||((x=a.general)==null?void 0:x.flowStartTrigger)==="ON_LOAD")&&f("start")},[s,(r=a.general)==null?void 0:r.flowStartTrigger]);const w=p.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 E.jsx(E.Fragment,{children:(()=>{var x,m;return o&&((x=a.device)==null?void 0:x.desktopEnabled)||!o&&((m=a.device)==null?void 0:m.mobileEnabled)})()&&E.jsxs("div",{onMouseDown:x=>{var m,k;!s&&((m=a.general)==null?void 0:m.flowStartTrigger)==="ON_CHATBOT_INTERACT"&&i(!0),o?(k=l.current)==null||k.blur():x==null||x.preventDefault()},className:w,children:[E.jsx(ls,{}),E.jsx(As,{}),u&&!o&&!((n=a.general)!=null&&n.embedded)&&E.jsxs(E.Fragment,{children:[E.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
- `}),E.jsx("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"#fff",zIndex:9999}})]}),E.jsx("div",{style:(()=>{var x,m;return o||(x=i.general)!=null&&x.embedded?(m=i.general)!=null&&m.embedded?{...A.chatWindowStyle}:{...A.chatWindowStyle,zIndex:1e4}:{...A.chatWindowStyle,borderRadius:"0px",left:"0px",right:"auto",top:"0px",bottom:"auto",width:`${u}px`,height:`${c}px`,zIndex:1e4}})(),className:"rcb-chat-window",children:(()=>{var x,m,k;const P=(t==null?void 0:t.chatBotHeader)||Sa,C=(t==null?void 0:t.chatBotBody)||La,S=(t==null?void 0:t.chatBotInput)||is,I=(t==null?void 0:t.chatBotFooter)||as;return E.jsxs(E.Fragment,{children:[((x=i.general)==null?void 0:x.showHeader)&&E.jsx(P,{buttons:g}),E.jsx(C,{}),E.jsx(cs,{}),((m=i.general)==null?void 0:m.showInputRow)&&E.jsx(S,{buttons:v}),((k=i.general)==null?void 0:k.showFooter)&&E.jsx(I,{buttons:h})]})})()})]})})},bo=f.createContext(void 0),vo=()=>f.useContext(bo),wo=({children:e})=>{var t;const r=f.useRef(""),n=f.useRef({}),[o,i,A]=Fe({}),[s,a,l]=Fe({}),[c,u]=f.useState(!1);return f.useEffect(()=>{u(!0)},[]),c?E.jsx("div",{style:{fontFamily:(t=o.general)==null?void 0:t.fontFamily},children:E.jsx(bo.Provider,{value:{loadConfig:async(d,p,g,v,h,w)=>{r.current=d,n.current=p;const x=await ks(d,g,v,h);w.current&&(w.current.textContent=x.cssStylesText),i(x.settings),a(x.inlineStyles)}},children:E.jsx(Ca,{settings:o,setSyncedSettings:i,syncedSettingsRef:A,children:E.jsx(Pa,{styles:s,setSyncedStyles:a,syncedStylesRef:l,children:E.jsx(os,{children:E.jsx(Ba,{botIdRef:r,flowRef:n,children:E.jsx(Ta,{children:E.jsx(Da,{settings:o,children:E.jsx(Ma,{children:e})})})})})})})})}):null},Ps=({id:e,flow:t,settings:r,styles:n,themes:o,plugins:i,setConfigLoaded:A,styleRootRef:s})=>{const a=f.useMemo(()=>e,[]),l=vo(),{flowRef:c}=Ee();return c&&c.current!==t&&(c.current=t),f.useEffect(()=>{(async()=>{var u,d;(u=r.event)!=null&&u.rcbPreLoadChatBot&&(await Fn(q.PRE_LOAD_CHATBOT,{botId:a,currPath:null,prevPath:null},{flow:t,settings:r,styles:n,themes:o,plugins:i})).defaultPrevented||(l!=null&&l.loadConfig&&(await l.loadConfig(a,t,r,n,o,s),A(!0)),(d=r.event)!=null&&d.rcbPostLoadChatBot&&Fn(q.POST_LOAD_CHATBOT,{botId:a,currPath:null,prevPath:null},{flow:t,settings:r,styles:n,themes:o,plugins:i}))})()},[o]),null},Jn=["Quickstart","API Docs","Examples","Github","Discord"],Ss={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:Jn,path:"process_options"},prompt_again:{message:"Do you need any other help?",options:Jn,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:Jn,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"}},Bs=({id:e,flow:t,settings:r,styles:n,themes:o,plugins:i,slots:A})=>{const s=f.useMemo(()=>e||"rcb-"+un(),[]),a=t&&Object.keys(t).length!==0?t:Ss,l=r||{},c=n||{},u=i||[],[d,p]=f.useState(!1),g=vo(),v=f.useRef(null),[h,w]=f.useState(o||[]);f.useEffect(()=>{o&&w(o)},[o]);const x=()=>E.jsxs(E.Fragment,{children:[E.jsx(Ps,{styleRootRef:v,id:s,flow:a,settings:l,styles:c,themes:h,plugins:u,setConfigLoaded:p}),d&&E.jsx(Cs,{plugins:i,slots:A})]});return E.jsxs(g==null?wo:E.Fragment,{children:[E.jsx("style",{ref:v}),E.jsx("div",{id:s,children:x()})]})},Ds=()=>{const{getBotId:e}=(()=>{const{botIdRef:t}=Ee();return{getBotId:f.useCallback(()=>t.current,[t])}})();return{getBotId:e}},bn=()=>{const{hasFlowStarted:e,restartFlow:t,getFlow:r}=(()=>{const{replaceMessages:n}=xt(),{replacePaths:o,goToPath:i}=gn(),{replaceToasts:A}=Bt(),{hasFlowStarted:s}=Pe(),{flowRef:a,timeoutIdRef:l}=Ee(),{settings:c}=ee();return{hasFlowStarted:s,restartFlow:f.useCallback(async()=>{jn(c),l.current&&clearTimeout(l.current),n([]),A([]),o([]),await i("start")},[l,c,n,A,o,jn,i]),getFlow:f.useCallback(()=>(a==null?void 0:a.current)??{},[a])}})();return{hasFlowStarted:e,restartFlow:t,getFlow:r}},Kt=()=>{const{endStreamMessage:e,injectMessage:t,removeMessage:r,simulateStreamMessage:n,streamMessage:o,messages:i,replaceMessages:A,getMessages:s}=xt();return{endStreamMessage:e,injectMessage:t,removeMessage:r,simulateStreamMessage:n,streamMessage:o,messages:i,replaceMessages:A,getMessages:s}},Ge=(e,t)=>{const{getBotId:r}=Ds();f.useEffect(()=>{const n=o=>{o.detail.botId===r()&&t(o)};return window.addEventListener(e,n),()=>{window.removeEventListener(e,n)}},[r,e,t])},xo=()=>{const{settings:e,replaceSettings:t,updateSettings:r}=mo();return{settings:e,replaceSettings:t,updateSettings:r}},Eo=()=>{const{textAreaDisabled:e,toggleTextAreaDisabled:t,textAreaSensitiveMode:r,toggleTextAreaSensitiveMode:n,getTextAreaValue:o,setTextAreaValue:i,focusTextArea:A,blurTextArea:s}=Et();return{textAreaDisabled:e,toggleTextAreaDisabled:t,textAreaSensitiveMode:r,toggleTextAreaSensitiveMode:n,getTextAreaValue:o,setTextAreaValue:i,focusTextArea:A,blurTextArea:s}},ko=()=>{const{showChatHistory:e,hasChatHistoryLoaded:t}=Xn();return{showChatHistory:e,getHistoryMessages:Wt,setHistoryMessages:Rn,hasChatHistoryLoaded:t}},Zn={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 kt(e){return t=>{Zn[t]={...e,...Zn[t]}}}["address","main","div","figure","p","pre"].forEach(kt({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(kt({content:8,type:73})),["p","pre"].forEach(kt({content:8,type:65})),["s","small","span","del","ins"].forEach(kt({content:8,type:9})),["article","aside","footer","header","nav","section","blockquote"].forEach(kt({content:1,type:67})),["h1","h2","h3","h4","h5","h6"].forEach(kt({content:8,type:69})),["audio","canvas","iframe","img","video"].forEach(kt({type:89}));const $n=Object.freeze(Zn),Is=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],Ts=Object.keys($n).filter(e=>e!=="canvas"&&e!=="iframe"),Co=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}),Qs=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function vn(){return vn=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},vn.apply(this,arguments)}function Po({attributes:e={},className:t,children:r=null,selfClose:n=!1,tagName:o}){const i=o;return n?f.createElement(i,vn({className:t},e)):f.createElement(i,vn({className:t},e),r)}class Ms{attribute(t,r){return r}node(t,r){return r}}function Os(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}/*!
10
+ `}),E.jsx("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"#fff",zIndex:9999}})]}),E.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:`${c}px`,zIndex:1e4}})(),className:"rcb-chat-window",children:(()=>{var x,m,k;const P=(t==null?void 0:t.chatBotHeader)||Di,C=(t==null?void 0:t.chatBotBody)||Hi,S=(t==null?void 0:t.chatBotInput)||is,I=(t==null?void 0:t.chatBotFooter)||ss;return E.jsxs(E.Fragment,{children:[((x=a.general)==null?void 0:x.showHeader)&&E.jsx(P,{buttons:g}),E.jsx(C,{}),E.jsx(us,{}),((m=a.general)==null?void 0:m.showInputRow)&&E.jsx(S,{buttons:b}),((k=a.general)==null?void 0:k.showFooter)&&E.jsx(I,{buttons:h})]})})()})]})})},bo=p.createContext(void 0),vo=()=>p.useContext(bo),wo=({children:e})=>{var t;const r=p.useRef(""),n=p.useRef({}),[o,a,A]=ze({}),[s,i,l]=ze({}),[c,d]=p.useState(!1);return p.useEffect(()=>{d(!0)},[]),c?E.jsx("div",{style:{fontFamily:(t=o.general)==null?void 0:t.fontFamily},children:E.jsx(bo.Provider,{value:{loadConfig:async(u,f,g,b,h,w)=>{r.current=u,n.current=f;const x=await Cs(u,g,b,h);w.current&&(w.current.textContent=x.cssStylesText),a(x.settings),i(x.inlineStyles)}},children:E.jsx(Pi,{settings:o,setSyncedSettings:a,syncedSettingsRef:A,children:E.jsx(Si,{styles:s,setSyncedStyles:i,syncedStylesRef:l,children:E.jsx(as,{children:E.jsx(Bi,{botIdRef:r,flowRef:n,children:E.jsx(Qi,{children:E.jsx(Ii,{settings:o,children:E.jsx(Oi,{children:e})})})})})})})})}):null},Ss=({id:e,flow:t,settings:r,styles:n,themes:o,plugins:a,setConfigLoaded:A,styleRootRef:s})=>{const i=p.useMemo(()=>e,[]),l=vo(),{flowRef:c}=ke();return c&&c.current!==t&&(c.current=t),p.useEffect(()=>{(async()=>{var d,u;(d=r.event)!=null&&d.rcbPreLoadChatBot&&(await Fn(j.PRE_LOAD_CHATBOT,{botId:i,currPath:null,prevPath:null},{flow:t,settings:r,styles:n,themes:o,plugins:a})).defaultPrevented||(l!=null&&l.loadConfig&&(await l.loadConfig(i,t,r,n,o,s),A(!0)),(u=r.event)!=null&&u.rcbPostLoadChatBot&&Fn(j.POST_LOAD_CHATBOT,{botId:i,currPath:null,prevPath:null},{flow:t,settings:r,styles:n,themes:o,plugins:a}))})()},[o]),null},Jn=["Quickstart","API Docs","Examples","Github","Discord"],Ds={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:Jn,path:"process_options"},prompt_again:{message:"Do you need any other help?",options:Jn,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:Jn,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"}},Bs=({id:e,flow:t,settings:r,styles:n,themes:o,plugins:a,slots:A})=>{const s=p.useMemo(()=>e||"rcb-"+un(),[]),i=t&&Object.keys(t).length!==0?t:Ds,l=r||{},c=n||{},d=a||[],[u,f]=p.useState(!1),g=vo(),b=p.useRef(null),[h,w]=p.useState(o||[]);p.useEffect(()=>{o&&w(o)},[o]);const x=()=>E.jsxs(E.Fragment,{children:[E.jsx(Ss,{styleRootRef:b,id:s,flow:i,settings:l,styles:c,themes:h,plugins:d,setConfigLoaded:f}),u&&E.jsx(Ps,{plugins:a,slots:A})]});return E.jsxs(g==null?wo:E.Fragment,{children:[E.jsx("style",{ref:b}),E.jsx("div",{id:s,children:x()})]})},Is=()=>{const{getBotId:e}=(()=>{const{botIdRef:t}=ke();return{getBotId:p.useCallback(()=>t.current,[t])}})();return{getBotId:e}},bn=()=>{const{hasFlowStarted:e,restartFlow:t,getFlow:r}=(()=>{const{replaceMessages:n}=Et(),{replacePaths:o,goToPath:a}=gn(),{replaceToasts:A}=Bt(),{hasFlowStarted:s}=Se(),{flowRef:i,timeoutIdRef:l}=ke(),{settings:c}=te();return{hasFlowStarted:s,restartFlow:p.useCallback(async()=>{jn(c),l.current&&clearTimeout(l.current),n([]),A([]),o([]),await a("start")},[l,c,n,A,o,jn,a]),getFlow:p.useCallback(()=>(i==null?void 0:i.current)??{},[i])}})();return{hasFlowStarted:e,restartFlow:t,getFlow:r}},Kt=()=>{const{endStreamMessage:e,injectMessage:t,removeMessage:r,simulateStreamMessage:n,streamMessage:o,messages:a,replaceMessages:A,getMessages:s}=Et();return{endStreamMessage:e,injectMessage:t,removeMessage:r,simulateStreamMessage:n,streamMessage:o,messages:a,replaceMessages:A,getMessages:s}},Ge=(e,t)=>{const{getBotId:r}=Is();p.useEffect(()=>{const n=o=>{o.detail.botId===r()&&t(o)};return window.addEventListener(e,n),()=>{window.removeEventListener(e,n)}},[r,e,t])},xo=()=>{const{settings:e,replaceSettings:t,updateSettings:r}=mo();return{settings:e,replaceSettings:t,updateSettings:r}},Eo=()=>{const{textAreaDisabled:e,toggleTextAreaDisabled:t,textAreaSensitiveMode:r,toggleTextAreaSensitiveMode:n,getTextAreaValue:o,setTextAreaValue:a,focusTextArea:A,blurTextArea:s}=kt();return{textAreaDisabled:e,toggleTextAreaDisabled:t,textAreaSensitiveMode:r,toggleTextAreaSensitiveMode:n,getTextAreaValue:o,setTextAreaValue:a,focusTextArea:A,blurTextArea:s}},ko=()=>{const{showChatHistory:e,hasChatHistoryLoaded:t}=Xn();return{showChatHistory:e,getHistoryMessages:Wt,setHistoryMessages:Rn,hasChatHistoryLoaded:t}},Zn={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 Ct(e){return t=>{Zn[t]={...e,...Zn[t]}}}["address","main","div","figure","p","pre"].forEach(Ct({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(Ct({content:8,type:73})),["p","pre"].forEach(Ct({content:8,type:65})),["s","small","span","del","ins"].forEach(Ct({content:8,type:9})),["article","aside","footer","header","nav","section","blockquote"].forEach(Ct({content:1,type:67})),["h1","h2","h3","h4","h5","h6"].forEach(Ct({content:8,type:69})),["audio","canvas","iframe","img","video"].forEach(Ct({type:89}));const $n=Object.freeze(Zn),Ts=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],Qs=Object.keys($n).filter(e=>e!=="canvas"&&e!=="iframe"),Co=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}),Ms=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function vn(){return vn=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},vn.apply(this,arguments)}function Po({attributes:e={},className:t,children:r=null,selfClose:n=!1,tagName:o}){const a=o;return n?p.createElement(a,vn({className:t},e)):p.createElement(a,vn({className:t},e),r)}class Os{attribute(t,r){return r}node(t,r){return r}}function _s(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 So,Bo;const _s=Os(function(){if(Bo)return So;Bo=1;var e=/["'&<>]/;return So=function(t){var r=""+t,n=e.exec(r);if(!n)return r;var o,i="",A=0,s=0;for(A=n.index;A<r.length;A++){switch(r.charCodeAt(A)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 39:o="&#39;";break;case 60:o="&lt;";break;case 62:o="&gt;";break;default:continue}s!==A&&(i+=r.substring(s,A)),s=A+1,i+=o}return s!==A?i+r.substring(s,A):i}}());function ct(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Ns=/(url|image|image-set)\(/i;class Ls extends Ms{attribute(t,r){return t==="style"&&Object.keys(r).forEach(n=>{String(r[n]).match(Ns)&&delete r[n]}),r}}const Hs=/^<(!doctype|(html|head|body)(\s|>))/i,Us=/^(aria-|data-|\w+:)/iu,Fs=/{{{(\w+)\/?}}}/;function zs(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}let Do=class{constructor(e,t={},r=[],n=[]){var o;if(ct(this,"allowed",void 0),ct(this,"banned",void 0),ct(this,"blocked",void 0),ct(this,"container",void 0),ct(this,"content",[]),ct(this,"props",void 0),ct(this,"matchers",void 0),ct(this,"filters",void 0),ct(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 Ls],this.keyIndex=-1,this.container=this.createContainer(e||""),this.allowed=new Set((o=t.allowList)!==null&&o!==void 0?o:Ts),this.banned=new Set(Is),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,i=0,A=null;return this.matchers.forEach(s=>{const a=s.asTag().toLowerCase(),l=this.getTagConfig(a);if(n[s.inverseName]||!this.isTagAllowed(a)||!this.canRenderChild(t,l))return;let c="";for(;o&&(A=s.match(o));){const{index:u,length:d,match:p,valid:g,void:v,...h}=A,w=s.propName+String(i);u>0&&(c+=o.slice(0,u)),g?(c+=v?`{{{${w}/}}}`:`{{{${w}}}}${p}{{{/${w}}}}`,this.keyIndex+=1,i+=1,r[w]={children:p,matcher:s,props:{...n,...h,key:this.keyIndex}}):c+=p,s.greedy?(o=c+o.slice(u+d),c=""):o=o.slice(u+(d||p.length))}s.greedy||(o=c+o)}),i===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,`
16
+ */var So,Do;const Ns=_s(function(){if(Do)return So;Do=1;var e=/["'&<>]/;return So=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="&quot;";break;case 38:o="&amp;";break;case 39:o="&#39;";break;case 60:o="&lt;";break;case 62:o="&gt;";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 ct(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Ls=/(url|image|image-set)\(/i;class Hs extends Os{attribute(t,r){return t==="style"&&Object.keys(r).forEach(n=>{String(r[n]).match(Ls)&&delete r[n]}),r}}const Us=/^<(!doctype|(html|head|body)(\s|>))/i,Fs=/^(aria-|data-|\w+:)/iu,zs=/{{{(\w+)\/?}}}/;function Rs(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}let Bo=class{constructor(e,t={},r=[],n=[]){var o;if(ct(this,"allowed",void 0),ct(this,"banned",void 0),ct(this,"blocked",void 0),ct(this,"container",void 0),ct(this,"content",[]),ct(this,"props",void 0),ct(this,"matchers",void 0),ct(this,"filters",void 0),ct(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 Hs],this.keyIndex=-1,this.container=this.createContainer(e||""),this.allowed=new Set((o=t.allowList)!==null&&o!==void 0?o:Qs),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(),l=this.getTagConfig(i);if(n[s.inverseName]||!this.isTagAllowed(i)||!this.canRenderChild(t,l))return;let c="";for(;o&&(A=s.match(o));){const{index:d,length:u,match:f,valid:g,void:b,...h}=A,w=s.propName+String(a);d>0&&(c+=o.slice(0,d)),g?(c+=b?`{{{${w}/}}}`:`{{{${w}}}}${f}{{{/${w}}}}`,this.keyIndex+=1,a+=1,r[w]={children:f,matcher:s,props:{...n,...h,key:this.keyIndex}}):c+=f,s.greedy?(o=c+o.slice(d+u),c=""):o=o.slice(d+(u||f.length))}s.greedy||(o=c+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||zs)();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(Hs)){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?_s(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:i,value:A}=o,s=i.toLowerCase(),a=Co[s]||Co[i];if(!this.isSafe(e)||!s.match(Us)&&(!t&&(!a||a===2)||s.startsWith("on")||A.replace(/(\s|\0|&#x0([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let l=s==="style"?this.extractStyleAttribute(e):A;a===4?l=!0:a===3?l=Number.parseFloat(String(l)):a!==5&&(l=String(l)),r[Qs[s]||s]=this.applyAttributeFilters(s,l),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,i)=>String(i).toUpperCase())]=n)}),t}getTagConfig(e){const t={children:[],content:0,invalid:[],parent:[],self:!0,tagName:"",type:0,void:!1};return $n[e]?{...t,...$n[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:i,transformOnlyAllowList:A}=this.props;let s=[],a="";return[...e.childNodes].forEach(l=>{if(l.nodeType===1){const u=l.nodeName.toLowerCase(),d=this.getTagConfig(u);a&&(s.push(a),a="");const p=this.applyNodeFilters(u,l);if(!p)return;let g;if(i&&(!A||this.isTagAllowed(u))){this.keyIndex+=1;const v=this.keyIndex;g=this.parseNode(p,d);const h=i(p,g,d);if(h===null)return;if(typeof h<"u")return void s.push(f.cloneElement(h,{key:v}));this.keyIndex=v-1}if(this.banned.has(u))return;if(r||n&&u!=="br"||!this.isTagAllowed(u)||!o&&!this.canRenderChild(t,d))s=[...s,...this.parseNode(p,d.tagName?d:t)];else{var c;this.keyIndex+=1;const v=this.extractAttributes(p),h={tagName:u};v&&(h.attributes=v),d.void&&(h.selfClose=d.void),s.push(f.createElement(Po,{...h,key:this.keyIndex},(c=g)!==null&&c!==void 0?c:this.parseNode(p,d)))}}else if(l.nodeType===3){const u=r&&!n?l.textContent:this.applyMatchers(l.textContent||"",t);Array.isArray(u)?s=[...s,...u]:a+=u}}),a&&s.push(a),s}replaceTokens(e,t){if(!e.includes("{{{"))return e;const r=[];let n=e,o=null;for(;o=n.match(Fs);){const[i,A]=o,s=o.index,a=i.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:l,matcher:c,props:u}=t[A];let d;if(a)d=i.length,r.push(c.createElement(l,u));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}".`);d=p.index+p[0].length,r.push(c.createElement(this.replaceTokens(n.slice(i.length,p.index),t),u))}n=n.slice(d)}return n.length>0&&r.push(n),r.length===0?"":r.length===1&&typeof r[0]=="string"?r[0]:r}};function Rs(e){var t;const{attributes:r,className:n,containerTagName:o,content:i,emptyContent:A,parsedContent:s,tagName:a,noWrap:l}=e,c=(t=o??a)!==null&&t!==void 0?t:"span",u=c==="fragment"||l;let d;if(s)d=s;else{const p=new Do(i??"",e).parse();p.length>0&&(d=p)}return d||(d=A),u?f.createElement(f.Fragment,null,d):f.createElement(Po,{attributes:r,className:n,tagName:c},d)}function js(e){const{attributes:t,className:r,content:n="",disableFilters:o=!1,disableMatchers:i=!1,emptyContent:A=null,filters:s=[],matchers:a=[],onAfterParse:l=null,onBeforeParse:c=null,tagName:u="span",noWrap:d=!1,...p}=e,g=i?[]:a,v=o?[]:s,h=c?[c]:[],w=l?[l]:[];g.forEach(P=>{P.onBeforeParse&&h.push(P.onBeforeParse.bind(P)),P.onAfterParse&&w.push(P.onAfterParse.bind(P))});const x=h.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 Do(x,p,g,v),k=w.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 f.createElement(Rs,{attributes:t,className:r,containerTagName:e.containerTagName,emptyContent:A,noWrap:d,parsedContent:k.length===0?void 0:k,tagName:u})}const qs=({children:e})=>E.jsx("div",{style:{whiteSpace:"normal"},children:E.jsx(js,{content:typeof e=="string"?e:""})}),Gs={autoConfig:!0},Io=(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(i=>i.toUpperCase()).includes(r))??!1)},Ys=e=>{const t=[];let r="",n=!1;for(let o=0;o<e.length;o++){const i=e[o];i==="<"?n?(t.push(r),r=i):(n=!0,r=i):i===">"?(r+=i,t.push(r),r="",n=!1):n?r+=i:t.push(i)}return r!==""&&t.push(r),t},Ws=e=>{const{getFlow:t}=bn(),{messages:r,replaceMessages:n}=Kt(),{settings:o}=xo(),{hasChatHistoryLoaded:i}=ko(),A={...e,...Gs},s=A.htmlComponent?A.htmlComponent:qs;f.useEffect(()=>{var c,u;if(i){const d=[...r];for(let p=0;p<d.length&&p<(((c=o.chatHistory)==null?void 0:c.maxEntries)??30);p++){const g=d[p];(u=g.tags)!=null&&u.includes("rcb-html-renderer-plugin:parsed")&&(g.contentWrapper=s)}n(d)}},[i]);const a=async c=>{var u;const d=(u=c.data.message)==null?void 0:u.sender.toUpperCase();typeof c.data.message.content=="string"&&Io(c,t(),d)&&(c.type==="rcb-start-simulate-stream-message"&&(c.data.simulateStreamChunker=Ys),c.data.message.contentWrapper=s,c.data.message.tags||(c.data.message.tags=[]),c.data.message.tags.push("rcb-html-renderer-plugin:parsed"))};Ge(q.PRE_INJECT_MESSAGE,a),Ge(q.CHUNK_STREAM_MESSAGE,a),Ge(q.START_STREAM_MESSAGE,a),Ge(q.START_SIMULATE_STREAM_MESSAGE,a),Ge(q.START_SPEAK_AUDIO,async c=>{Io(c,t(),"BOT")&&(c.data.textToRead=(u=>typeof window.DOMParser<"u"?new DOMParser().parseFromString(u,"text/html").body.textContent||"":u.replace(/<\/?[^>]+(>|$)/g,""))(c.data.textToRead))});const l={name:"@rcb-plugins/html-renderer"};return A!=null&&A.autoConfig&&(l.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0,rcbStartSpeakAudio:!0}}),l},Ks=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Vs=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Xs={};function To(e,t){return(Xs.jsx?Vs:Ks).test(e)}const Js=/[ \t\n\f\r]/g;function Qo(e){return e.replace(Js,"")===""}class Vt{constructor(t,r,n){this.property=t,this.normal=r,n&&(this.space=n)}}function Mo(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 Vt(r,n,t)}function er(e){return e.toLowerCase()}Vt.prototype.property={},Vt.prototype.normal={},Vt.prototype.space=null;class Ye{constructor(t,r){this.property=t,this.attribute=r}}Ye.prototype.space=null,Ye.prototype.boolean=!1,Ye.prototype.booleanish=!1,Ye.prototype.overloadedBoolean=!1,Ye.prototype.number=!1,Ye.prototype.commaSeparated=!1,Ye.prototype.spaceSeparated=!1,Ye.prototype.commaOrSpaceSeparated=!1,Ye.prototype.mustUseProperty=!1,Ye.prototype.defined=!1;let Zs=0;const $=Ct(),ke=Ct(),Oo=Ct(),H=Ct(),pe=Ct(),It=Ct(),Re=Ct();function Ct(){return 2**++Zs}const tr=Object.freeze(Object.defineProperty({__proto__:null,boolean:$,booleanish:ke,commaOrSpaceSeparated:Re,commaSeparated:It,number:H,overloadedBoolean:Oo,spaceSeparated:pe},Symbol.toStringTag,{value:"Module"})),nr=Object.keys(tr);class rr extends Ye{constructor(t,r,n,o){let i=-1;if(super(t,r),_o(this,"space",o),typeof n=="number")for(;++i<nr.length;){const A=nr[i];_o(this,nr[i],(n&tr[A])===tr[A])}}}function _o(e,t,r){r&&(e[t]=r)}rr.prototype.defined=!0;const $s={}.hasOwnProperty;function Tt(e){const t={},r={};let n;for(n in e.properties)if($s.call(e.properties,n)){const o=e.properties[n],i=new rr(n,e.transform(e.attributes||{},n),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(i.mustUseProperty=!0),t[n]=i,r[er(n)]=n,r[er(i.attribute)]=n}return new Vt(t,r,e.space)}const No=Tt({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}}),Lo=Tt({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Ho(e,t){return t in e?e[t]:t}function Uo(e,t){return Ho(e,t.toLowerCase())}const Fo=Tt({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Uo,properties:{xmlns:null,xmlnsXLink:null}}),zo=Tt({transform:(e,t)=>t==="role"?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:ke,ariaAutoComplete:null,ariaBusy:ke,ariaChecked:ke,ariaColCount:H,ariaColIndex:H,ariaColSpan:H,ariaControls:pe,ariaCurrent:null,ariaDescribedBy:pe,ariaDetails:null,ariaDisabled:ke,ariaDropEffect:pe,ariaErrorMessage:null,ariaExpanded:ke,ariaFlowTo:pe,ariaGrabbed:ke,ariaHasPopup:null,ariaHidden:ke,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:pe,ariaLevel:H,ariaLive:null,ariaModal:ke,ariaMultiLine:ke,ariaMultiSelectable:ke,ariaOrientation:null,ariaOwns:pe,ariaPlaceholder:null,ariaPosInSet:H,ariaPressed:ke,ariaReadOnly:ke,ariaRelevant:null,ariaRequired:ke,ariaRoleDescription:pe,ariaRowCount:H,ariaRowIndex:H,ariaRowSpan:H,ariaSelected:ke,ariaSetSize:H,ariaSort:null,ariaValueMax:H,ariaValueMin:H,ariaValueNow:H,ariaValueText:null,role:null}}),eA=Tt({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Uo,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:It,acceptCharset:pe,accessKey:pe,action:null,allow:null,allowFullScreen:$,allowPaymentRequest:$,allowUserMedia:$,alt:null,as:null,async:$,autoCapitalize:null,autoComplete:pe,autoFocus:$,autoPlay:$,blocking:pe,capture:null,charSet:null,checked:$,cite:null,className:pe,cols:H,colSpan:null,content:null,contentEditable:ke,controls:$,controlsList:pe,coords:H|It,crossOrigin:null,data:null,dateTime:null,decoding:null,default:$,defer:$,dir:null,dirName:null,disabled:$,download:Oo,draggable:ke,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:$,formTarget:null,headers:pe,height:H,hidden:$,high:H,href:null,hrefLang:null,htmlFor:pe,httpEquiv:pe,id:null,imageSizes:null,imageSrcSet:null,inert:$,inputMode:null,integrity:null,is:null,isMap:$,itemId:null,itemProp:pe,itemRef:pe,itemScope:$,itemType:pe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:$,low:H,manifest:null,max:null,maxLength:H,media:null,method:null,min:null,minLength:H,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:H,pattern:null,ping:pe,placeholder:null,playsInline:$,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:$,referrerPolicy:null,rel:pe,required:$,reversed:$,rows:H,rowSpan:H,sandbox:pe,scope:null,scoped:$,seamless:$,selected:$,shadowRootClonable:$,shadowRootDelegatesFocus:$,shadowRootMode:null,shape:null,size:H,sizes:null,slot:null,span:H,spellCheck:ke,src:null,srcDoc:null,srcLang:null,srcSet:null,start:H,step:null,style:null,tabIndex:H,target:null,title:null,translate:null,type:null,typeMustMatch:$,useMap:null,value:ke,width:H,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:pe,axis:null,background:null,bgColor:null,border:H,borderColor:null,bottomMargin:H,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:H,leftMargin:H,link:null,longDesc:null,lowSrc:null,marginHeight:H,marginWidth:H,noResize:$,noHref:$,noShade:$,noWrap:$,object:null,profile:null,prompt:null,rev:null,rightMargin:H,rules:null,scheme:null,scrolling:ke,standby:null,summary:null,text:null,topMargin:H,valueType:null,version:null,vAlign:null,vLink:null,vSpace:H,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:$,disableRemotePlayback:$,prefix:null,property:null,results:H,security:null,unselectable:null}}),tA=Tt({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:Ho,properties:{about:Re,accentHeight:H,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:H,amplitude:H,arabicForm:null,ascent:H,attributeName:null,attributeType:null,azimuth:H,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:H,by:null,calcMode:null,capHeight:H,className:pe,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:H,diffuseConstant:H,direction:null,display:null,dur:null,divisor:H,dominantBaseline:null,download:$,dx:null,dy:null,edgeMode:null,editable:null,elevation:H,enableBackground:null,end:null,event:null,exponent:H,externalResourcesRequired:null,fill:null,fillOpacity:H,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:It,g2:It,glyphName:It,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:H,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:H,horizOriginX:H,horizOriginY:H,id:null,ideographic:H,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:H,k:H,k1:H,k2:H,k3:H,k4:H,kernelMatrix:Re,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:H,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:H,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:H,overlineThickness:H,paintOrder:null,panose1:null,path:null,pathLength:H,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:pe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:H,pointsAtY:H,pointsAtZ:H,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Re,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Re,rev:Re,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Re,requiredFeatures:Re,requiredFonts:Re,requiredFormats:Re,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:H,specularExponent:H,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:H,strikethroughThickness:H,string:null,stroke:null,strokeDashArray:Re,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:H,strokeOpacity:H,strokeWidth:null,style:null,surfaceScale:H,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Re,tabIndex:H,tableValues:null,target:null,targetX:H,targetY:H,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Re,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:H,underlineThickness:H,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:H,values:null,vAlphabetic:H,vMathematical:H,vectorEffect:null,vHanging:H,vIdeographic:H,version:null,vertAdvY:H,vertOriginX:H,vertOriginY:H,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:H,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),nA=/^data[-\w.:]+$/i,Ro=/-[a-z]/g,rA=/[A-Z]/g;function oA(e){return"-"+e.toLowerCase()}function iA(e){return e.charAt(1).toUpperCase()}const aA={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"},sA=Mo([Lo,No,Fo,zo,eA],"html"),or=Mo([Lo,No,Fo,zo,tA],"svg");function jo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ir,qo,Go,Qt={},AA=function(){if(Go)return Qt;Go=1;var e=Qt&&Qt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.default=function(r,n){var o=null;if(!r||typeof r!="string")return o;var i=(0,t.default)(r),A=typeof n=="function";return i.forEach(function(s){if(s.type==="declaration"){var a=s.property,l=s.value;A?n(a,l,s):l&&((o=o||{})[a]=l)}}),o};var t=e(function(){if(qo)return ir;qo=1;var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,A=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function u(d){return d?d.replace(l,c):c}return ir=function(d,p){if(typeof d!="string")throw new TypeError("First argument must be a string");if(!d)return[];p=p||{};var g=1,v=1;function h(Q){var D=Q.match(n);D&&(g+=D.length);var _=Q.lastIndexOf(`
21
- `);v=~_?Q.length-_:v+Q.length}function w(){var Q={line:g,column:v};return function(D){return D.position=new x(Q),P(),D}}function x(Q){this.start=Q,this.end={line:g,column:v},this.source=p.source}function m(Q){var D=new Error(p.source+":"+g+":"+v+": "+Q);if(D.reason=Q,D.filename=p.source,D.line=g,D.column=v,D.source=d,!p.silent)throw D}function k(Q){var D=Q.exec(d);if(D){var _=D[0];return h(_),d=d.slice(_.length),D}}function P(){k(o)}function C(Q){var D;for(Q=Q||[];D=S();)D!==!1&&Q.push(D);return Q}function S(){var Q=w();if(d.charAt(0)=="/"&&d.charAt(1)=="*"){for(var D=2;c!=d.charAt(D)&&(d.charAt(D)!="*"||d.charAt(D+1)!="/");)++D;if(D+=2,c===d.charAt(D-1))return m("End of comment missing");var _=d.slice(2,D-2);return v+=2,h(_),d=d.slice(D),v+=2,Q({type:"comment",comment:_})}}function I(){var Q=w(),D=k(i);if(D){if(S(),!k(A))return m("property missing ':'");var _=k(s),B=Q({type:"declaration",property:u(D[0].replace(r,c)),value:_?u(_[0].replace(r,c)):c});return k(a),B}}return x.prototype.content=d,P(),function(){var Q,D=[];for(C(D);Q=I();)Q!==!1&&(D.push(Q),C(D));return D}()},ir}());return Qt}();const Yo=jo(AA),lA=Yo.default||Yo,Wo=Ko("end"),ar=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 Xt(e){return e&&typeof e=="object"?"position"in e||"type"in e?Vo(e.position):"start"in e||"end"in e?Vo(e):"line"in e||"column"in e?sr(e):"":""}function sr(e){return Xo(e&&e.line)+":"+Xo(e&&e.column)}function Vo(e){return sr(e&&e.start)+"-"+sr(e&&e.end)}function Xo(e){return e&&typeof e=="number"?e:1}class Oe extends Error{constructor(t,r,n){super(),typeof r=="string"&&(n=r,r=void 0);let o="",i={},A=!1;if(r&&(i="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:!i.cause&&t&&(A=!0,o=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof n=="string"){const a=n.indexOf(":");a===-1?i.ruleId=n:(i.source=n.slice(0,a),i.ruleId=n.slice(a+1))}if(!i.place&&i.ancestors&&i.ancestors){const a=i.ancestors[i.ancestors.length-1];a&&(i.place=a.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.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=Xt(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=A&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual,this.expected,this.note,this.url}}Oe.prototype.file="",Oe.prototype.name="",Oe.prototype.reason="",Oe.prototype.message="",Oe.prototype.stack="",Oe.prototype.column=void 0,Oe.prototype.line=void 0,Oe.prototype.ancestors=void 0,Oe.prototype.cause=void 0,Oe.prototype.fatal=void 0,Oe.prototype.place=void 0,Oe.prototype.ruleId=void 0,Oe.prototype.source=void 0;const Ar={}.hasOwnProperty,cA=new Map,uA=/[A-Z]/g,dA=/-([a-z])/g,pA=new Set(["table","tbody","thead","tfoot","tr"]),fA=new Set(["td","th"]),Jo="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function hA(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 a;function a(l,c,u,d){const p=Array.isArray(u.children),g=ar(l);return s(c,u,d,p,{columnNumber:g?g.column-1:void 0,fileName:A,lineNumber:g?g.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,a){return l;function l(c,u,d,p){const g=Array.isArray(d.children)?a:s;return p?g(u,d,p):g(u,d)}}(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"?or:sA,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=Zo(o,e,void 0);return i&&typeof i!="string"?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function Zo(e,t,r){return t.type==="element"?function(n,o,i){const A=n.schema;let s=A;o.tagName.toLowerCase()==="svg"&&A.space==="html"&&(s=or,n.schema=s),n.ancestors.push(o);const a=ei(n,o.tagName,!1),l=function(u,d){const p={};let g,v;for(v in d.properties)if(v!=="children"&&Ar.call(d.properties,v)){const h=gA(u,v,d.properties[v]);if(h){const[w,x]=h;u.tableCellAlignToStyle&&w==="align"&&typeof x=="string"&&fA.has(d.tagName)?g=x:p[w]=x}}return g&&((p.style||(p.style={}))[u.stylePropertyNameCase==="css"?"text-align":"textAlign"]=g),p}(n,o);let c=cr(n,o);return pA.has(o.tagName)&&(c=c.filter(function(u){return typeof u!="string"||!function(d){return typeof d=="object"?d.type==="text"&&Qo(d.value):Qo(d)}(u)})),$o(n,l,a,o),lr(l,c),n.ancestors.pop(),n.schema=A,n.create(o,a,l,i)}(e,t,r):t.type==="mdxFlowExpression"||t.type==="mdxTextExpression"?function(n,o){if(o.data&&o.data.estree&&n.evaluater){const i=o.data.estree.body[0];return i.type,n.evaluater.evaluateExpression(i.expression)}Jt(n,o.position)}(e,t):t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement"?function(n,o,i){const A=n.schema;let s=A;o.name==="svg"&&A.space==="html"&&(s=or,n.schema=s),n.ancestors.push(o);const a=o.name===null?n.Fragment:ei(n,o.name,!0),l=function(u,d){const p={};for(const g of d.attributes)if(g.type==="mdxJsxExpressionAttribute")if(g.data&&g.data.estree&&u.evaluater){const v=g.data.estree.body[0];v.type;const h=v.expression;h.type;const w=h.properties[0];w.type,Object.assign(p,u.evaluater.evaluateExpression(w.argument))}else Jt(u,d.position);else{const v=g.name;let h;if(g.value&&typeof g.value=="object")if(g.value.data&&g.value.data.estree&&u.evaluater){const w=g.value.data.estree.body[0];w.type,h=u.evaluater.evaluateExpression(w.expression)}else Jt(u,d.position);else h=g.value===null||g.value;p[v]=h}return p}(n,o),c=cr(n,o);return $o(n,l,a,o),lr(l,c),n.ancestors.pop(),n.schema=A,n.create(o,a,l,i)}(e,t,r):t.type==="mdxjsEsm"?function(n,o){if(o.data&&o.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(o.data.estree);Jt(n,o.position)}(e,t):t.type==="root"?function(n,o,i){const A={};return lr(A,cr(n,o)),n.create(o,n.Fragment,A,i)}(e,t,r):t.type==="text"?function(n,o){return o.value}(0,t):void 0}function $o(e,t,r,n){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=n)}function lr(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function cr(e,t){const r=[];let n=-1;const o=e.passKeys?new Map:cA;for(;++n<t.children.length;){const i=t.children[n];let A;if(e.passKeys){const a=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(a){const l=o.get(a)||0;A=a+"-"+l,o.set(a,l+1)}}const s=Zo(e,i,A);s!==void 0&&r.push(s)}return r}function gA(e,t,r){const n=function(o,i){const A=er(i);let s=i,a=Ye;if(A in o.normal)return o.property[o.normal[A]];if(A.length>4&&A.slice(0,4)==="data"&&nA.test(i)){if(i.charAt(4)==="-"){const l=i.slice(5).replace(Ro,iA);s="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=i.slice(4);if(!Ro.test(l)){let c=l.replace(rA,oA);c.charAt(0)!=="-"&&(c="-"+c),i="data"+c}}a=rr}return new a(s,i)}(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=n.commaSeparated?function(o){const i={};return(o[o.length-1]===""?[...o,""]:o).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}(r):function(o){return o.join(" ").trim()}(r)),n.property==="style"){let o=typeof r=="object"?r:function(i,A){const s={};try{lA(A,a)}catch(l){if(!i.ignoreInvalidStyle){const c=l,u=new Oe("Cannot parse `style` attribute",{ancestors:i.ancestors,cause:c,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw u.file=i.filePath||void 0,u.url=Jo+"#cannot-parse-style-attribute",u}}return s;function a(l,c){let u=l;u.slice(0,2)!=="--"&&(u.slice(0,4)==="-ms-"&&(u="ms-"+u.slice(4)),u=u.replace(dA,yA)),s[u]=c}}(e,String(r));return e.stylePropertyNameCase==="css"&&(o=function(i){const A={};let s;for(s in i)Ar.call(i,s)&&(A[mA(s)]=i[s]);return A}(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&n.space?aA[n.property]||n.property:n.attribute,r]}}function ei(e,t,r){let n;if(r)if(t.includes(".")){const o=t.split(".");let i,A=-1;for(;++A<o.length;){const s=To(o[A])?{type:"Identifier",name:o[A]}:{type:"Literal",value:o[A]};i=i?{type:"MemberExpression",object:i,property:s,computed:!(!A||s.type!=="Literal"),optional:!1}:s}n=i}else n=To(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 Ar.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(n);Jt(e)}function Jt(e,t){const r=new Oe("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=Jo+"#cannot-handle-mdx-estrees-without-createevaluater",r}function mA(e){let t=e.replace(uA,bA);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function yA(e,t){return t.toUpperCase()}function bA(e){return"-"+e.toLowerCase()}const ur={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"]},wn={};function ti(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 ni(e.children,t,r)}return Array.isArray(e)?ni(e,t,r):""}function ni(e,t,r){const n=[];let o=-1;for(;++o<e.length;)n[o]=ti(e[o],t,r);return n.join("")}const ri=document.createElement("i");function dr(e){const t="&"+e+";";ri.innerHTML=t;const r=ri.textContent;return(r.charCodeAt(r.length-1)!==59||e==="semi")&&r!==t&&r}function tt(e,t,r,n){const o=e.length;let i,A=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,r=r>0?r:0,n.length<1e4)i=Array.from(n),i.unshift(t,r),e.splice(...i);else for(r&&e.splice(t,r);A<n.length;)i=n.slice(A,A+1e4),i.unshift(t,0),e.splice(...i),A+=1e4,t+=1e4}function We(e,t){return e.length>0?(tt(e,e.length,0,t),e):t}const oi={}.hasOwnProperty;function vA(e){const t={};let r=-1;for(;++r<e.length;)wA(t,e[r]);return t}function wA(e,t){let r;for(r in t){const n=(oi.call(e,r)?e[r]:void 0)||(e[r]={}),o=t[r];let i;if(o)for(i in o){oi.call(n,i)||(n[i]=[]);const A=o[i];xA(n[i],Array.isArray(A)?A:A?[A]:[])}}}function xA(e,t){let r=-1;const n=[];for(;++r<t.length;)(t[r].add==="after"?e:n).push(t[r]);tt(e,0,0,n)}function ii(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 Mt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const nt=gt(/[A-Za-z]/),je=gt(/[\dA-Za-z]/),EA=gt(/[#-'*+\--9=?A-Z^-~]/);function pr(e){return e!==null&&(e<32||e===127)}const fr=gt(/\d/),kA=gt(/[\dA-Fa-f]/),CA=gt(/[!-/:-@[-`{-~]/);function J(e){return e!==null&&e<-2}function Ne(e){return e!==null&&(e<0||e===32)}function ae(e){return e===-2||e===-1||e===32}const PA=gt(new RegExp("\\p{P}|\\p{S}","u")),SA=gt(/\s/);function gt(e){return function(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Ot(e){const t=[];let r=-1,n=0,o=0;for(;++r<e.length;){const i=e.charCodeAt(r);let A="";if(i===37&&je(e.charCodeAt(r+1))&&je(e.charCodeAt(r+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(A=String.fromCharCode(i));else if(i>55295&&i<57344){const s=e.charCodeAt(r+1);i<56320&&s>56319&&s<57344?(A=String.fromCharCode(i,s),o=1):A="�"}else A=String.fromCharCode(i);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 fe(e,t,r,n){const o=n?n-1:Number.POSITIVE_INFINITY;let i=0;return function(s){return ae(s)?(e.enter(r),A(s)):t(s)};function A(s){return ae(s)&&i++<o?(e.consume(s),A):(e.exit(r),t(s))}}const BA={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(i){return i===null?void e.consume(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),fe(e,t,"linePrefix"))},function(i){return e.enter("paragraph"),n(i)});let r;return t;function n(i){const A=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=A),r=A,o(i)}function o(i){return i===null?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(i)):J(i)?(e.consume(i),e.exit("chunkText"),n):(e.consume(i),o)}}},DA={tokenize:function(e){const t=this,r=[];let n,o,i,A=0;return s;function s(m){if(A<r.length){const k=r[A];return t.containerState=k[1],e.attempt(k[0].continuation,a,l)(m)}return l(m)}function a(m){if(A++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,n&&x();const k=t.events.length;let P,C=k;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){P=t.events[C][1].end;break}w(A);let S=k;for(;S<t.events.length;)t.events[S][1].end={...P},S++;return tt(t.events,C+1,0,t.events.slice(k)),t.events.length=S,l(m)}return s(m)}function l(m){if(A===r.length){if(!n)return d(m);if(n.currentConstruct&&n.currentConstruct.concrete)return g(m);t.interrupt=!(!n.currentConstruct||n._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ai,c,u)(m)}function c(m){return n&&x(),w(A),d(m)}function u(m){return t.parser.lazy[t.now().line]=A!==r.length,i=t.now().offset,g(m)}function d(m){return t.containerState={},e.attempt(ai,p,g)(m)}function p(m){return A++,r.push([t.currentConstruct,t.containerState]),d(m)}function g(m){return m===null?(n&&x(),w(0),void e.consume(m)):(n=n||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:n,contentType:"flow",previous:o}),v(m))}function v(m){return m===null?(h(e.exit("chunkFlow"),!0),w(0),void e.consume(m)):J(m)?(e.consume(m),h(e.exit("chunkFlow")),A=0,t.interrupt=void 0,s):(e.consume(m),v)}function h(m,k){const P=t.sliceStream(m);if(k&&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<i&&(!n.events[C][1].end||n.events[C][1].end.offset>i))return;const S=t.events.length;let I,Q,D=S;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){if(I){Q=t.events[D][1].end;break}I=!0}for(w(A),C=S;C<t.events.length;)t.events[C][1].end={...Q},C++;tt(t.events,D+1,0,t.events.slice(S)),t.events.length=C}}function w(m){let k=r.length;for(;k-- >m;){const P=r[k];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}}},ai={tokenize:function(e,t,r){return fe(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function si(e){return e===null||Ne(e)||SA(e)?1:PA(e)?2:void 0}function hr(e,t,r){const n=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!n.includes(i)&&(t=i(t,r),n.push(i))}return t}const gr={name:"attention",resolveAll:function(e,t){let r,n,o,i,A,s,a,l,c=-1;for(;++c<e.length;)if(e[c][0]==="enter"&&e[c][1].type==="attentionSequence"&&e[c][1]._close){for(r=c;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[c][1]).charCodeAt(0)){if((e[r][1]._close||e[c][1]._open)&&(e[c][1].end.offset-e[c][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[c][1].end.offset-e[c][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[c][1].end.offset-e[c][1].start.offset>1?2:1;const u={...e[r][1].end},d={...e[c][1].start};Ai(u,-s),Ai(d,s),i={type:s>1?"strongSequence":"emphasisSequence",start:u,end:{...e[r][1].end}},A={type:s>1?"strongSequence":"emphasisSequence",start:{...e[c][1].start},end:d},o={type:s>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[c][1].start}},n={type:s>1?"strong":"emphasis",start:{...i.start},end:{...A.end}},e[r][1].end={...i.start},e[c][1].start={...A.end},a=[],e[r][1].end.offset-e[r][1].start.offset&&(a=We(a,[["enter",e[r][1],t],["exit",e[r][1],t]])),a=We(a,[["enter",n,t],["enter",i,t],["exit",i,t],["enter",o,t]]),a=We(a,hr(t.parser.constructs.insideSpan.null,e.slice(r+1,c),t)),a=We(a,[["exit",o,t],["enter",A,t],["exit",A,t],["exit",n,t]]),e[c][1].end.offset-e[c][1].start.offset?(l=2,a=We(a,[["enter",e[c][1],t],["exit",e[c][1],t]])):l=0,tt(e,r-1,c-r+3,a),c=r+a.length-l-2;break}}for(c=-1;++c<e.length;)e[c][1].type==="attentionSequence"&&(e[c][1].type="data");return e},tokenize:function(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,o=si(n);let i;return function(s){return i=s,e.enter("attentionSequence"),A(s)};function A(s){if(s===i)return e.consume(s),A;const a=e.exit("attentionSequence"),l=si(s),c=!l||l===2&&o||r.includes(s),u=!o||o===2&&l||r.includes(n);return a._open=!!(i===42?c:c&&(o||!u)),a._close=!!(i===42?u:u&&(l||!c)),t(s)}}};function Ai(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const IA={name:"autolink",tokenize:function(e,t,r){let n=0;return function(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(d){return nt(d)?(e.consume(d),i):d===64?r(d):a(d)}function i(d){return d===43||d===45||d===46||je(d)?(n=1,A(d)):a(d)}function A(d){return d===58?(e.consume(d),n=0,s):(d===43||d===45||d===46||je(d))&&n++<32?(e.consume(d),A):(n=0,a(d))}function s(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||pr(d)?r(d):(e.consume(d),s)}function a(d){return d===64?(e.consume(d),l):EA(d)?(e.consume(d),a):r(d)}function l(d){return je(d)?c(d):r(d)}function c(d){return d===46?(e.consume(d),n=0,l):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):u(d)}function u(d){if((d===45||je(d))&&n++<63){const p=d===45?u:c;return e.consume(d),p}return r(d)}}},xn={partial:!0,tokenize:function(e,t,r){return function(o){return ae(o)?fe(e,n,"linePrefix")(o):n(o)};function n(o){return o===null||J(o)?t(o):r(o)}}},li={continuation:{tokenize:function(e,t,r){const n=this;return function(i){return ae(i)?fe(e,o,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i):o(i)};function o(i){return e.attempt(li,t,r)(i)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,r){const n=this;return function(i){if(i===62){const A=n.containerState;return A.open||(e.enter("blockQuote",{_container:!0}),A.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(i),e.exit("blockQuoteMarker"),o}return r(i)};function o(i){return ae(i)?(e.enter("blockQuotePrefixWhitespace"),e.consume(i),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(i))}}},ci={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 CA(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(o)}}},ui={name:"characterReference",tokenize:function(e,t,r){const n=this;let o,i,A=0;return function(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),s};function s(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),a):(e.enter("characterReferenceValue"),o=31,i=je,l(c))}function a(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=kA,l):(e.enter("characterReferenceValue"),o=7,i=fr,l(c))}function l(c){if(c===59&&A){const u=e.exit("characterReferenceValue");return i!==je||dr(n.sliceSerialize(u))?(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):r(c)}return i(c)&&A++<o?(e.consume(c),l):r(c)}}},di={partial:!0,tokenize:function(e,t,r){const n=this;return function(i){return i===null?r(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),o)};function o(i){return n.parser.lazy[n.now().line]?r(i):t(i)}}},pi={concrete:!0,name:"codeFenced",tokenize:function(e,t,r){const n=this,o={partial:!0,tokenize:function(m,k,P){let C=0;return S;function S(B){return m.enter("lineEnding"),m.consume(B),m.exit("lineEnding"),I}function I(B){return m.enter("codeFencedFence"),ae(B)?fe(m,Q,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):Q(B)}function Q(B){return B===i?(m.enter("codeFencedFenceSequence"),D(B)):P(B)}function D(B){return B===i?(C++,m.consume(B),D):C>=s?(m.exit("codeFencedFenceSequence"),ae(B)?fe(m,_,"whitespace")(B):_(B)):P(B)}function _(B){return B===null||J(B)?(m.exit("codeFencedFence"),k(B)):P(B)}}};let i,A=0,s=0;return function(m){return function(k){const P=n.events[n.events.length-1];return A=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,i=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),a(k)}(m)};function a(m){return m===i?(s++,e.consume(m),a):s<3?r(m):(e.exit("codeFencedFenceSequence"),ae(m)?fe(e,l,"whitespace")(m):l(m))}function l(m){return m===null||J(m)?(e.exit("codeFencedFence"),n.interrupt?t(m):e.check(di,p,x)(m)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),c(m))}function c(m){return m===null||J(m)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),l(m)):ae(m)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),fe(e,u,"whitespace")(m)):m===96&&m===i?r(m):(e.consume(m),c)}function u(m){return m===null||J(m)?l(m):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===null||J(m)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),l(m)):m===96&&m===i?r(m):(e.consume(m),d)}function p(m){return e.attempt(o,x,g)(m)}function g(m){return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),v}function v(m){return A>0&&ae(m)?fe(e,h,"linePrefix",A+1)(m):h(m)}function h(m){return m===null||J(m)?e.check(di,p,x)(m):(e.enter("codeFlowValue"),w(m))}function w(m){return m===null||J(m)?(e.exit("codeFlowValue"),h(m)):(e.consume(m),w)}function x(m){return e.exit("codeFenced"),t(m)}}},mr={name:"codeIndented",tokenize:function(e,t,r){const n=this;return function(a){return e.enter("codeIndented"),fe(e,o,"linePrefix",5)(a)};function o(a){const l=n.events[n.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?i(a):r(a)}function i(a){return a===null?s(a):J(a)?e.attempt(TA,i,s)(a):(e.enter("codeFlowValue"),A(a))}function A(a){return a===null||J(a)?(e.exit("codeFlowValue"),i(a)):(e.consume(a),A)}function s(a){return e.exit("codeIndented"),t(a)}}},TA={partial:!0,tokenize:function(e,t,r){const n=this;return o;function o(A){return n.parser.lazy[n.now().line]?r(A):J(A)?(e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),o):fe(e,i,"linePrefix",5)(A)}function i(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):J(A)?o(A):r(A)}}},QA={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,i=0;return function(c){return e.enter("codeText"),e.enter("codeTextSequence"),A(c)};function A(c){return c===96?(e.consume(c),i++,A):(e.exit("codeTextSequence"),s(c))}function s(c){return c===null?r(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),s):c===96?(o=e.enter("codeTextSequence"),n=0,l(c)):J(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):(e.enter("codeTextData"),a(c))}function a(c){return c===null||c===32||c===96||J(c)?(e.exit("codeTextData"),s(c)):(e.consume(c),a)}function l(c){return c===96?(e.consume(c),n++,l):n===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(o.type="codeTextData",a(c))}}};class MA{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 i=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return n&&Zt(this.left,n),i.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),Zt(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Zt(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);Zt(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Zt(this.left,r.reverse())}}}function Zt(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 fi(e){const t={};let r,n,o,i,A,s,a,l=-1;const c=new MA(e);for(;++l<c.length;){for(;l in t;)l=t[l];if(r=c.get(l),l&&r[1].type==="chunkFlow"&&c.get(l-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,OA(c,l)),l=t[l],a=!0);else if(r[1]._container){for(o=l,n=void 0;o--;)if(i=c.get(o),i[1].type==="lineEnding"||i[1].type==="lineEndingBlank")i[0]==="enter"&&(n&&(c.get(n)[1].type="lineEndingBlank"),i[1].type="lineEnding",n=o);else if(i[1].type!=="linePrefix")break;n&&(r[1].end={...c.get(n)[1].start},A=c.slice(n,l),A.unshift(r),c.splice(n,l-n+1,A))}}return tt(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!a}function OA(e,t){const r=e.get(t)[1],n=e.get(t)[2];let o=t-1;const i=[],A=r._tokenizer||n.parser[r.contentType](r.start),s=A.events,a=[],l={};let c,u,d=-1,p=r,g=0,v=0;const h=[v];for(;p;){for(;e.get(++o)[1]!==p;);i.push(o),p._tokenizer||(c=n.sliceStream(p),p.next||c.push(null),u&&A.defineSkip(p.start),p._isInFirstContentOfListItem&&(A._gfmTasklistFirstContentOfListItem=!0),A.write(c),p._isInFirstContentOfListItem&&(A._gfmTasklistFirstContentOfListItem=void 0)),u=p,p=p.next}for(p=r;++d<s.length;)s[d][0]==="exit"&&s[d-1][0]==="enter"&&s[d][1].type===s[d-1][1].type&&s[d][1].start.line!==s[d][1].end.line&&(v=d+1,h.push(v),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(A.events=[],p?(p._tokenizer=void 0,p.previous=void 0):h.pop(),d=h.length;d--;){const w=s.slice(h[d],h[d+1]),x=i.pop();a.push([x,x+w.length-1]),e.splice(x,2,w)}for(a.reverse(),d=-1;++d<a.length;)l[g+a[d][0]]=g+a[d][1],g+=a[d][1]-a[d][0]-1;return l}const _A={resolve:function(e){return fi(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):J(A)?e.check(NA,i,o)(A):(e.consume(A),n)}function o(A){return e.exit("chunkContent"),e.exit("content"),t(A)}function i(A){return e.consume(A),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,n}}},NA={partial:!0,tokenize:function(e,t,r){const n=this;return function(i){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),fe(e,o,"linePrefix")};function o(i){if(i===null||J(i))return r(i);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(i):e.interrupt(n.parser.constructs.flow,r,t)(i)}}};function hi(e,t,r,n,o,i,A,s,a){const l=a||Number.POSITIVE_INFINITY;let c=0;return function(h){return h===60?(e.enter(n),e.enter(o),e.enter(i),e.consume(h),e.exit(i),u):h===null||h===32||h===41||pr(h)?r(h):(e.enter(n),e.enter(A),e.enter(s),e.enter("chunkString",{contentType:"string"}),g(h))};function u(h){return h===62?(e.enter(i),e.consume(h),e.exit(i),e.exit(o),e.exit(n),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===62?(e.exit("chunkString"),e.exit(s),u(h)):h===null||h===60||J(h)?r(h):(e.consume(h),h===92?p:d)}function p(h){return h===60||h===62||h===92?(e.consume(h),d):d(h)}function g(h){return c||h!==null&&h!==41&&!Ne(h)?c<l&&h===40?(e.consume(h),c++,g):h===41?(e.consume(h),c--,g):h===null||h===32||h===40||pr(h)?r(h):(e.consume(h),h===92?v:g):(e.exit("chunkString"),e.exit(s),e.exit(A),e.exit(n),t(h))}function v(h){return h===40||h===41||h===92?(e.consume(h),g):g(h)}}function gi(e,t,r,n,o,i){const A=this;let s,a=0;return function(d){return e.enter(n),e.enter(o),e.consume(d),e.exit(o),e.enter(i),l};function l(d){return a>999||d===null||d===91||d===93&&!s||d===94&&!a&&"_hiddenFootnoteSupport"in A.parser.constructs?r(d):d===93?(e.exit(i),e.enter(o),e.consume(d),e.exit(o),e.exit(n),t):J(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===null||d===91||d===93||J(d)||a++>999?(e.exit("chunkString"),l(d)):(e.consume(d),s||(s=!ae(d)),d===92?u:c)}function u(d){return d===91||d===92||d===93?(e.consume(d),a++,c):c(d)}}function mi(e,t,r,n,o,i){let A;return function(u){return u===34||u===39||u===40?(e.enter(n),e.enter(o),e.consume(u),e.exit(o),A=u===40?41:u,s):r(u)};function s(u){return u===A?(e.enter(o),e.consume(u),e.exit(o),e.exit(n),t):(e.enter(i),a(u))}function a(u){return u===A?(e.exit(i),s(A)):u===null?r(u):J(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),fe(e,a,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),l(u))}function l(u){return u===A||u===null||J(u)?(e.exit("chunkString"),a(u)):(e.consume(u),u===92?c:l)}function c(u){return u===A||u===92?(e.consume(u),l):l(u)}}function $t(e,t){let r;return function n(o){return J(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r=!0,n):ae(o)?fe(e,n,r?"linePrefix":"lineSuffix")(o):t(o)}}const LA={name:"definition",tokenize:function(e,t,r){const n=this;let o;return function(u){return e.enter("definition"),function(d){return gi.call(n,e,i,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}(u)};function i(u){return o=Mt(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),u===58?(e.enter("definitionMarker"),e.consume(u),e.exit("definitionMarker"),A):r(u)}function A(u){return Ne(u)?$t(e,s)(u):s(u)}function s(u){return hi(e,a,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(u)}function a(u){return e.attempt(HA,l,l)(u)}function l(u){return ae(u)?fe(e,c,"whitespace")(u):c(u)}function c(u){return u===null||J(u)?(e.exit("definition"),n.parser.defined.push(o),t(u)):r(u)}}},HA={partial:!0,tokenize:function(e,t,r){return function(A){return Ne(A)?$t(e,n)(A):r(A)};function n(A){return mi(e,o,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(A)}function o(A){return ae(A)?fe(e,i,"whitespace")(A):i(A)}function i(A){return A===null||J(A)?t(A):r(A)}}},UA={name:"hardBreakEscape",tokenize:function(e,t,r){return function(o){return e.enter("hardBreakEscape"),e.consume(o),n};function n(o){return J(o)?(e.exit("hardBreakEscape"),t(o)):r(o)}}},FA={name:"headingAtx",resolve:function(e,t){let r,n,o=e.length-2,i=3;return e[i][1].type==="whitespace"&&(i+=2),o-2>i&&e[o][1].type==="whitespace"&&(o-=2),e[o][1].type==="atxHeadingSequence"&&(i===o-1||o-4>i&&e[o-2][1].type==="whitespace")&&(o-=i+1===o?2:4),o>i&&(r={type:"atxHeadingText",start:e[i][1].start,end:e[o][1].end},n={type:"chunkText",start:e[i][1].start,end:e[o][1].end,contentType:"text"},tt(e,i,o-i+1,[["enter",r,t],["enter",n,t],["exit",n,t],["exit",r,t]])),e},tokenize:function(e,t,r){let n=0;return function(a){return e.enter("atxHeading"),function(l){return e.enter("atxHeadingSequence"),o(l)}(a)};function o(a){return a===35&&n++<6?(e.consume(a),o):a===null||Ne(a)?(e.exit("atxHeadingSequence"),i(a)):r(a)}function i(a){return a===35?(e.enter("atxHeadingSequence"),A(a)):a===null||J(a)?(e.exit("atxHeading"),t(a)):ae(a)?fe(e,i,"whitespace")(a):(e.enter("atxHeadingText"),s(a))}function A(a){return a===35?(e.consume(a),A):(e.exit("atxHeadingSequence"),i(a))}function s(a){return a===null||a===35||Ne(a)?(e.exit("atxHeadingText"),i(a)):(e.consume(a),s)}}},zA=["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"],yi=["pre","script","style","textarea"],RA={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,i,A,s,a;return function(y){return function(G){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(G),l}(y)};function l(y){return y===33?(e.consume(y),c):y===47?(e.consume(y),i=!0,p):y===63?(e.consume(y),o=3,n.interrupt?t:U):nt(y)?(e.consume(y),A=String.fromCharCode(y),g):r(y)}function c(y){return y===45?(e.consume(y),o=2,u):y===91?(e.consume(y),o=5,s=0,d):nt(y)?(e.consume(y),o=4,n.interrupt?t:U):r(y)}function u(y){return y===45?(e.consume(y),n.interrupt?t:U):r(y)}function d(y){return y==="CDATA[".charCodeAt(s++)?(e.consume(y),s===6?n.interrupt?t:D:d):r(y)}function p(y){return nt(y)?(e.consume(y),A=String.fromCharCode(y),g):r(y)}function g(y){if(y===null||y===47||y===62||Ne(y)){const G=y===47,Z=A.toLowerCase();return G||i||!yi.includes(Z)?zA.includes(A.toLowerCase())?(o=6,G?(e.consume(y),v):n.interrupt?t(y):D(y)):(o=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(y):i?h(y):w(y)):(o=1,n.interrupt?t(y):D(y))}return y===45||je(y)?(e.consume(y),A+=String.fromCharCode(y),g):r(y)}function v(y){return y===62?(e.consume(y),n.interrupt?t:D):r(y)}function h(y){return ae(y)?(e.consume(y),h):I(y)}function w(y){return y===47?(e.consume(y),I):y===58||y===95||nt(y)?(e.consume(y),x):ae(y)?(e.consume(y),w):I(y)}function x(y){return y===45||y===46||y===58||y===95||je(y)?(e.consume(y),x):m(y)}function m(y){return y===61?(e.consume(y),k):ae(y)?(e.consume(y),m):w(y)}function k(y){return y===null||y===60||y===61||y===62||y===96?r(y):y===34||y===39?(e.consume(y),a=y,P):ae(y)?(e.consume(y),k):C(y)}function P(y){return y===a?(e.consume(y),a=null,S):y===null||J(y)?r(y):(e.consume(y),P)}function C(y){return y===null||y===34||y===39||y===47||y===60||y===61||y===62||y===96||Ne(y)?m(y):(e.consume(y),C)}function S(y){return y===47||y===62||ae(y)?w(y):r(y)}function I(y){return y===62?(e.consume(y),Q):r(y)}function Q(y){return y===null||J(y)?D(y):ae(y)?(e.consume(y),Q):r(y)}function D(y){return y===45&&o===2?(e.consume(y),F):y===60&&o===1?(e.consume(y),N):y===62&&o===4?(e.consume(y),b):y===63&&o===3?(e.consume(y),U):y===93&&o===5?(e.consume(y),O):!J(y)||o!==6&&o!==7?y===null||J(y)?(e.exit("htmlFlowData"),_(y)):(e.consume(y),D):(e.exit("htmlFlowData"),e.check(jA,R,_)(y))}function _(y){return e.check(qA,B,R)(y)}function B(y){return e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),M}function M(y){return y===null||J(y)?_(y):(e.enter("htmlFlowData"),D(y))}function F(y){return y===45?(e.consume(y),U):D(y)}function N(y){return y===47?(e.consume(y),A="",L):D(y)}function L(y){if(y===62){const G=A.toLowerCase();return yi.includes(G)?(e.consume(y),b):D(y)}return nt(y)&&A.length<8?(e.consume(y),A+=String.fromCharCode(y),L):D(y)}function O(y){return y===93?(e.consume(y),U):D(y)}function U(y){return y===62?(e.consume(y),b):y===45&&o===2?(e.consume(y),U):D(y)}function b(y){return y===null||J(y)?(e.exit("htmlFlowData"),R(y)):(e.consume(y),b)}function R(y){return e.exit("htmlFlow"),t(y)}}},jA={partial:!0,tokenize:function(e,t,r){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),e.attempt(xn,t,r)}}},qA={partial:!0,tokenize:function(e,t,r){const n=this;return function(i){return J(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),o):r(i)};function o(i){return n.parser.lazy[n.now().line]?r(i):t(i)}}},GA={name:"htmlText",tokenize:function(e,t,r){const n=this;let o,i,A;return function(b){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(b),s};function s(b){return b===33?(e.consume(b),a):b===47?(e.consume(b),k):b===63?(e.consume(b),x):nt(b)?(e.consume(b),S):r(b)}function a(b){return b===45?(e.consume(b),l):b===91?(e.consume(b),i=0,p):nt(b)?(e.consume(b),w):r(b)}function l(b){return b===45?(e.consume(b),d):r(b)}function c(b){return b===null?r(b):b===45?(e.consume(b),u):J(b)?(A=c,L(b)):(e.consume(b),c)}function u(b){return b===45?(e.consume(b),d):c(b)}function d(b){return b===62?N(b):b===45?u(b):c(b)}function p(b){return b==="CDATA[".charCodeAt(i++)?(e.consume(b),i===6?g:p):r(b)}function g(b){return b===null?r(b):b===93?(e.consume(b),v):J(b)?(A=g,L(b)):(e.consume(b),g)}function v(b){return b===93?(e.consume(b),h):g(b)}function h(b){return b===62?N(b):b===93?(e.consume(b),h):g(b)}function w(b){return b===null||b===62?N(b):J(b)?(A=w,L(b)):(e.consume(b),w)}function x(b){return b===null?r(b):b===63?(e.consume(b),m):J(b)?(A=x,L(b)):(e.consume(b),x)}function m(b){return b===62?N(b):x(b)}function k(b){return nt(b)?(e.consume(b),P):r(b)}function P(b){return b===45||je(b)?(e.consume(b),P):C(b)}function C(b){return J(b)?(A=C,L(b)):ae(b)?(e.consume(b),C):N(b)}function S(b){return b===45||je(b)?(e.consume(b),S):b===47||b===62||Ne(b)?I(b):r(b)}function I(b){return b===47?(e.consume(b),N):b===58||b===95||nt(b)?(e.consume(b),Q):J(b)?(A=I,L(b)):ae(b)?(e.consume(b),I):N(b)}function Q(b){return b===45||b===46||b===58||b===95||je(b)?(e.consume(b),Q):D(b)}function D(b){return b===61?(e.consume(b),_):J(b)?(A=D,L(b)):ae(b)?(e.consume(b),D):I(b)}function _(b){return b===null||b===60||b===61||b===62||b===96?r(b):b===34||b===39?(e.consume(b),o=b,B):J(b)?(A=_,L(b)):ae(b)?(e.consume(b),_):(e.consume(b),M)}function B(b){return b===o?(e.consume(b),o=void 0,F):b===null?r(b):J(b)?(A=B,L(b)):(e.consume(b),B)}function M(b){return b===null||b===34||b===39||b===60||b===61||b===96?r(b):b===47||b===62||Ne(b)?I(b):(e.consume(b),M)}function F(b){return b===47||b===62||Ne(b)?I(b):r(b)}function N(b){return b===62?(e.consume(b),e.exit("htmlTextData"),e.exit("htmlText"),t):r(b)}function L(b){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),O}function O(b){return ae(b)?fe(e,U,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):U(b)}function U(b){return e.enter("htmlTextData"),A(b)}}},yr={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&&tt(e,0,e.length,r),e},resolveTo:function(e,t){let r,n,o,i,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 a={type:e[n][1].type==="labelLink"?"link":"image",start:{...e[n][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[n][1].start},end:{...e[o][1].end}},c={type:"labelText",start:{...e[n+s+2][1].end},end:{...e[o-2][1].start}};return i=[["enter",a,t],["enter",l,t]],i=We(i,e.slice(n+1,n+s+3)),i=We(i,[["enter",c,t]]),i=We(i,hr(t.parser.constructs.insideSpan.null,e.slice(n+s+4,o-3),t)),i=We(i,[["exit",c,t],e[o-2],e[o-1],["exit",l,t]]),i=We(i,e.slice(o+1)),i=We(i,[["exit",a,t]]),tt(e,n,e.length,i),e},tokenize:function(e,t,r){const n=this;let o,i,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(u){return o?o._inactive?c(u):(i=n.parser.defined.includes(Mt(n.sliceSerialize({start:o.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelEnd"),s):r(u)};function s(u){return u===40?e.attempt(YA,l,i?l:c)(u):u===91?e.attempt(WA,l,i?a:c)(u):i?l(u):c(u)}function a(u){return e.attempt(KA,l,c)(u)}function l(u){return t(u)}function c(u){return o._balanced=!0,r(u)}}},YA={tokenize:function(e,t,r){return function(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),n};function n(c){return Ne(c)?$t(e,o)(c):o(c)}function o(c){return c===41?l(c):hi(e,i,A,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function i(c){return Ne(c)?$t(e,s)(c):l(c)}function A(c){return r(c)}function s(c){return c===34||c===39||c===40?mi(e,a,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):l(c)}function a(c){return Ne(c)?$t(e,l)(c):l(c)}function l(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):r(c)}}},WA={tokenize:function(e,t,r){const n=this;return function(A){return gi.call(n,e,o,i,"reference","referenceMarker","referenceString")(A)};function o(A){return n.parser.defined.includes(Mt(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(A):r(A)}function i(A){return r(A)}}},KA={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:yr.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"),i):r(A)}function i(A){return A===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(A):t(A)}}},XA={name:"labelStartLink",resolveAll:yr.resolveAll,tokenize:function(e,t,r){const n=this;return function(i){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(i),e.exit("labelMarker"),e.exit("labelLink"),o};function o(i){return i===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(i):t(i)}}},br={name:"lineEnding",tokenize:function(e,t){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),fe(e,t,"linePrefix")}}},En={name:"thematicBreak",tokenize:function(e,t,r){let n,o=0;return function(s){return e.enter("thematicBreak"),function(a){return n=a,i(a)}(s)};function i(s){return s===n?(e.enter("thematicBreakSequence"),A(s)):o>=3&&(s===null||J(s))?(e.exit("thematicBreak"),t(s)):r(s)}function A(s){return s===n?(e.consume(s),o++,A):(e.exit("thematicBreakSequence"),ae(s)?fe(e,i,"whitespace")(s):i(s))}}},Le={continuation:{tokenize:function(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(xn,function(i){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,fe(e,t,"listItemIndent",n.containerState.size+1)(i)},function(i){return n.containerState.furtherBlankLines||!ae(i)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,o(i)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(ZA,t,o)(i))});function o(i){return n.containerState._closeFlow=!0,n.interrupt=void 0,fe(e,e.attempt(Le,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},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 i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,A=0;return function(d){const p=n.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!n.containerState.marker||d===n.containerState.marker:fr(d)){if(n.containerState.type||(n.containerState.type=p,e.enter(p,{_container:!0})),p==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(En,r,a)(d):a(d);if(!n.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(d)}return r(d)};function s(d){return fr(d)&&++A<10?(e.consume(d),s):(!n.interrupt||A<2)&&(n.containerState.marker?d===n.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),a(d)):r(d)}function a(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||d,e.check(xn,n.interrupt?r:l,e.attempt(JA,u,c))}function l(d){return n.containerState.initialBlankLine=!0,i++,u(d)}function c(d){return ae(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),u):r(d)}function u(d){return n.containerState.size=i+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}},JA={partial:!0,tokenize:function(e,t,r){const n=this;return fe(e,function(o){const i=n.events[n.events.length-1];return!ae(o)&&i&&i[1].type==="listItemPrefixWhitespace"?t(o):r(o)},"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},ZA={partial:!0,tokenize:function(e,t,r){const n=this;return fe(e,function(o){const i=n.events[n.events.length-1];return i&&i[1].type==="listItemIndent"&&i[2].sliceSerialize(i[1],!0).length===n.containerState.size?t(o):r(o)},"listItemIndent",n.containerState.size+1)}},bi={name:"setextUnderline",resolveTo:function(e,t){let r,n,o,i=e.length;for(;i--;)if(e[i][0]==="enter"){if(e[i][1].type==="content"){r=i;break}e[i][1].type==="paragraph"&&(n=i)}else e[i][1].type==="content"&&e.splice(i,1),!o&&e[i][1].type==="definition"&&(o=i);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 a,l=n.events.length;for(;l--;)if(n.events[l][1].type!=="lineEnding"&&n.events[l][1].type!=="linePrefix"&&n.events[l][1].type!=="content"){a=n.events[l][1].type==="paragraph";break}return n.parser.lazy[n.now().line]||!n.interrupt&&!a?r(s):(e.enter("setextHeadingLine"),o=s,function(c){return e.enter("setextHeadingLineSequence"),i(c)}(s))};function i(s){return s===o?(e.consume(s),i):(e.exit("setextHeadingLineSequence"),ae(s)?fe(e,A,"lineSuffix")(s):A(s))}function A(s){return s===null||J(s)?(e.exit("setextHeadingLine"),t(s)):r(s)}}},$A={tokenize:function(e){const t=this,r=e.attempt(xn,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,fe(e,e.attempt(this.parser.constructs.flow,n,e.attempt(_A,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)}}},el={resolveAll:wi()},tl=vi("string"),nl=vi("text");function vi(e){return{resolveAll:wi(e==="text"?rl:void 0),tokenize:function(t){const r=this,n=this.parser.constructs[e],o=t.attempt(n,i,A);return i;function i(l){return a(l)?o(l):A(l)}function A(l){if(l!==null)return t.enter("data"),t.consume(l),s;t.consume(l)}function s(l){return a(l)?(t.exit("data"),o(l)):(t.consume(l),s)}function a(l){if(l===null)return!0;const c=n[l];let u=-1;if(c)for(;++u<c.length;){const d=c[u];if(!d.previous||d.previous.call(r,r.previous))return!0}return!1}}}}function wi(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 rl(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 i,A=o.length,s=-1,a=0;for(;A--;){const l=o[A];if(typeof l=="string"){for(s=l.length;l.charCodeAt(s-1)===32;)a++,s--;if(s)break;s=-1}else if(l===-2)i=!0,a++;else if(l!==-1){A++;break}}if(a){const l={type:r===e.length||i||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:A?s:n.start._bufferIndex+s,_index:n.start._index+A,line:n.end.line,column:n.end.column-a,offset:n.end.offset-a},end:{...n.end}};n.end={...l.start},n.start.offset===n.end.offset?Object.assign(n,l):(e.splice(r,0,["enter",l,t],["exit",l,t]),r+=2)}r++}return e}const ol={42:Le,43:Le,45:Le,48:Le,49:Le,50:Le,51:Le,52:Le,53:Le,54:Le,55:Le,56:Le,57:Le,62:li},il={91:LA},al={[-2]:mr,[-1]:mr,32:mr},sl={35:FA,42:En,45:[bi,En],60:RA,61:bi,95:En,96:pi,126:pi},Al={38:ui,92:ci},ll={[-5]:br,[-4]:br,[-3]:br,33:VA,38:ui,42:gr,60:[IA,GA],91:XA,92:[UA,ci],93:yr,95:gr,96:QA},cl={null:[gr,el]},ul=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:il,disable:{null:[]},document:ol,flow:sl,flowInitial:al,insideSpan:cl,string:Al,text:ll},Symbol.toStringTag,{value:"Module"}));function dl(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={},i=[];let A=[],s=[];const a={attempt:v(function(x,m){h(x,m.from)}),check:v(g),consume:function(x){J(x)?(n.line++,n.column=1,n.offset+=x===-3?2:1,w()):x!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===A[n._index].length&&(n._bufferIndex=-1,n._index++)),l.previous=x},enter:function(x,m){const k=m||{};return k.type=x,k.start=d(),l.events.push(["enter",k,l]),s.push(k),k},exit:function(x){const m=s.pop();return m.end=d(),l.events.push(["exit",m,l]),m},interrupt:v(g,{interrupt:!0})},l={code:null,containerState:{},defineSkip:function(x){o[x.line]=x.column,w()},events:[],now:d,parser:e,previous:null,sliceSerialize:function(x,m){return function(k,P){let C=-1;const S=[];let I;for(;++C<k.length;){const Q=k[C];let D;if(typeof Q=="string")D=Q;else switch(Q){case-5:D="\r";break;case-4:D=`
22
- `;break;case-3:D=`\r
23
- `;break;case-2:D=P?" ":" ";break;case-1:if(!P&&I)continue;D=" ";break;default:D=String.fromCharCode(Q)}I=Q===-2,S.push(D)}return S.join("")}(u(x),m)},sliceStream:u,write:function(x){return A=We(A,x),function(){let m;for(;n._index<A.length;){const k=A[n._index];if(typeof k=="string")for(m=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===m&&n._bufferIndex<k.length;)p(k.charCodeAt(n._bufferIndex));else p(k)}}(),A[A.length-1]!==null?[]:(h(t,0),l.events=hr(i,l.events,l),l.events)}};let c=t.tokenize.call(l,a);return t.resolveAll&&i.push(t),l;function u(x){return function(m,k){const P=k.start._index,C=k.start._bufferIndex,S=k.end._index,I=k.end._bufferIndex;let Q;if(P===S)Q=[m[P].slice(C,I)];else{if(Q=m.slice(P,S),C>-1){const D=Q[0];typeof D=="string"?Q[0]=D.slice(C):Q.shift()}I>0&&Q.push(m[S].slice(0,I))}return Q}(A,x)}function d(){const{_bufferIndex:x,_index:m,line:k,column:P,offset:C}=n;return{_bufferIndex:x,_index:m,line:k,column:P,offset:C}}function p(x){c=c(x)}function g(x,m){m.restore()}function v(x,m){return function(k,P,C){let S,I,Q,D;return Array.isArray(k)?_(k):"tokenize"in k?_([k]):function(N){return L;function L(O){const U=O!==null&&N[O],b=O!==null&&N.null;return _([...Array.isArray(U)?U:U?[U]:[],...Array.isArray(b)?b:b?[b]:[]])(O)}}(k);function _(N){return S=N,I=0,N.length===0?C:B(N[I])}function B(N){return function(L){return D=function(){const O=d(),U=l.previous,b=l.currentConstruct,R=l.events.length,y=Array.from(s);return{from:R,restore:G};function G(){n=O,l.previous=U,l.currentConstruct=b,l.events.length=R,s=y,w()}}(),Q=N,N.partial||(l.currentConstruct=N),N.name&&l.parser.constructs.disable.null.includes(N.name)?F():N.tokenize.call(m?Object.assign(Object.create(l),m):l,a,M,F)(L)}}function M(N){return x(Q,D),P}function F(N){return D.restore(),++I<S.length?B(S[I]):C}}}function h(x,m){x.resolveAll&&!i.includes(x)&&i.push(x),x.resolve&&tt(l.events,m,l.events.length-m,x.resolve(l.events.slice(m),l)),x.resolveTo&&(l.events=x.resolveTo(l.events,l))}function w(){n.line in o&&n.column<2&&(n.column=o[n.line],n.offset+=o[n.line]-1)}}const xi=/[\0\t\n\r]/g,pl=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function fl(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const n=r.charCodeAt(1),o=n===120||n===88;return ii(r.slice(o?2:1),o?16:10)}return dr(r)||e}const Ei={}.hasOwnProperty;function hl(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:a(ge),autolinkProtocol:B,autolinkEmail:B,atxHeading:a(He),blockQuote:a(te),characterEscape:B,characterReference:B,codeFenced:a(ie),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:a(ie,l),codeText:a(ce,l),codeTextData:B,data:B,codeFlowValue:B,definition:a(se),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:a(Me),hardBreakEscape:a(be),hardBreakTrailing:a(be),htmlFlow:a(it,l),htmlFlowData:B,htmlText:a(it,l),htmlTextData:B,image:a(Lt),label:l,link:a(ge),listItem:a(Ht),listItemValue:v,listOrdered:a(An,g),listUnordered:a(An),paragraph:a(Ut),reference:Se,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:a(He),strong:a(Ft),thematicBreak:a(at)},exit:{atxHeading:u(),atxHeadingSequence:I,autolink:u(),autolinkEmail:ne,autolinkProtocol:Y,blockQuote:u(),characterEscapeValue:M,characterReferenceMarkerHexadecimal:Ke,characterReferenceMarkerNumeric:Ke,characterReferenceValue:Ce,characterReference:j,codeFenced:u(m),codeFencedFence:x,codeFencedFenceInfo:h,codeFencedFenceMeta:w,codeFlowValue:M,codeIndented:u(k),codeText:u(U),codeTextData:M,data:M,definition:u(),definitionDestinationString:S,definitionLabelString:P,definitionTitleString:C,emphasis:u(),hardBreakEscape:u(N),hardBreakTrailing:u(N),htmlFlow:u(L),htmlFlowData:M,htmlText:u(O),htmlTextData:M,image:u(R),label:G,labelText:y,lineEnding:F,link:u(b),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:le,resourceDestinationString:Z,resourceTitleString:K,resource:re,setextHeading:u(_),setextHeadingLineSequence:D,setextHeadingText:Q,strong:u(),thematicBreak:u()}};ki(o,(n||{}).mdastExtensions||[]);const i={};return A;function A(T){let z={type:"root",children:[]};const W={stack:[z],tokenStack:[],config:o,enter:c,exit:d,buffer:l,resume:p,data:i},X=[];let oe=-1;for(;++oe<T.length;)(T[oe][1].type==="listOrdered"||T[oe][1].type==="listUnordered")&&(T[oe][0]==="enter"?X.push(oe):oe=s(T,X.pop(),oe));for(oe=-1;++oe<T.length;){const ue=o[T[oe][0]];Ei.call(ue,T[oe][1].type)&&ue[T[oe][1].type].call(Object.assign({sliceSerialize:T[oe][2].sliceSerialize},W),T[oe][1])}if(W.tokenStack.length>0){const ue=W.tokenStack[W.tokenStack.length-1];(ue[1]||Ci).call(W,void 0,ue[0])}for(z.position={start:mt(T.length>0?T[0][1].start:{line:1,column:1,offset:0}),end:mt(T.length>0?T[T.length-2][1].end:{line:1,column:1,offset:0})},oe=-1;++oe<o.transforms.length;)z=o.transforms[oe](z)||z;return z}function s(T,z,W){let X,oe,ue,de,ve=z-1,ye=-1,we=!1;for(;++ve<=W;){const xe=T[ve];switch(xe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":xe[0]==="enter"?ye++:ye--,de=void 0;break;case"lineEndingBlank":xe[0]==="enter"&&(X&&!de&&!ye&&!ue&&(ue=ve),de=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:de=void 0}if(!ye&&xe[0]==="enter"&&xe[1].type==="listItemPrefix"||ye===-1&&xe[0]==="exit"&&(xe[1].type==="listUnordered"||xe[1].type==="listOrdered")){if(X){let Xe=ve;for(oe=void 0;Xe--;){const Be=T[Xe];if(Be[1].type==="lineEnding"||Be[1].type==="lineEndingBlank"){if(Be[0]==="exit")continue;oe&&(T[oe][1].type="lineEndingBlank",we=!0),Be[1].type="lineEnding",oe=Xe}else if(Be[1].type!=="linePrefix"&&Be[1].type!=="blockQuotePrefix"&&Be[1].type!=="blockQuotePrefixWhitespace"&&Be[1].type!=="blockQuoteMarker"&&Be[1].type!=="listItemIndent")break}ue&&(!oe||ue<oe)&&(X._spread=!0),X.end=Object.assign({},oe?T[oe][1].start:xe[1].end),T.splice(oe||ve,0,["exit",X,xe[2]]),ve++,W++}if(xe[1].type==="listItemPrefix"){const Xe={type:"listItem",_spread:!1,start:Object.assign({},xe[1].start),end:void 0};X=Xe,T.splice(ve,0,["enter",Xe,xe[2]]),ve++,W++,ue=void 0,de=!0}}}return T[z][1]._spread=we,W}function a(T,z){return W;function W(X){c.call(this,T(X),X),z&&z.call(this,X)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(T,z,W){this.stack[this.stack.length-1].children.push(T),this.stack.push(T),this.tokenStack.push([z,W||void 0]),T.position={start:mt(z.start),end:void 0}}function u(T){return z;function z(W){T&&T.call(this,W),d.call(this,W)}}function d(T,z){const W=this.stack.pop(),X=this.tokenStack.pop();if(!X)throw new Error("Cannot close `"+T.type+"` ("+Xt({start:T.start,end:T.end})+"): it’s not open");X[0].type!==T.type&&(z?z.call(this,T,X[0]):(X[1]||Ci).call(this,T,X[0])),W.position.end=mt(T.end)}function p(){return function(T){return ti(T,typeof wn.includeImageAlt!="boolean"||wn.includeImageAlt,typeof wn.includeHtml!="boolean"||wn.includeHtml)}(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function v(T){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(T),10),this.data.expectingFirstListItemValue=void 0)}function h(){const T=this.resume();this.stack[this.stack.length-1].lang=T}function w(){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 k(){const T=this.resume();this.stack[this.stack.length-1].value=T.replace(/(\r?\n|\r)$/g,"")}function P(T){const z=this.resume(),W=this.stack[this.stack.length-1];W.label=z,W.identifier=Mt(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 z=this.stack[this.stack.length-1];if(!z.depth){const W=this.sliceSerialize(T).length;z.depth=W}}function Q(){this.data.setextHeadingSlurpLineEnding=!0}function D(T){this.stack[this.stack.length-1].depth=this.sliceSerialize(T).codePointAt(0)===61?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function B(T){const z=this.stack[this.stack.length-1].children;let W=z[z.length-1];(!W||W.type!=="text")&&(W=Ve(),W.position={start:mt(T.start),end:void 0},z.push(W)),this.stack.push(W)}function M(T){const z=this.stack.pop();z.value+=this.sliceSerialize(T),z.position.end=mt(T.end)}function F(T){const z=this.stack[this.stack.length-1];if(this.data.atHardBreak)return z.children[z.children.length-1].position.end=mt(T.end),void(this.data.atHardBreak=void 0);!this.data.setextHeadingSlurpLineEnding&&o.canContainEols.includes(z.type)&&(B.call(this,T),M.call(this,T))}function N(){this.data.atHardBreak=!0}function L(){const T=this.resume();this.stack[this.stack.length-1].value=T}function O(){const T=this.resume();this.stack[this.stack.length-1].value=T}function U(){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 z=this.data.referenceType||"shortcut";T.type+="Reference",T.referenceType=z,delete T.url,delete T.title}else delete T.identifier,delete T.label;this.data.referenceType=void 0}function R(){const T=this.stack[this.stack.length-1];if(this.data.inReference){const z=this.data.referenceType||"shortcut";T.type+="Reference",T.referenceType=z,delete T.url,delete T.title}else delete T.identifier,delete T.label;this.data.referenceType=void 0}function y(T){const z=this.sliceSerialize(T),W=this.stack[this.stack.length-2];W.label=function(X){return X.replace(pl,fl)}(z),W.identifier=Mt(z).toLowerCase()}function G(){const T=this.stack[this.stack.length-1],z=this.resume(),W=this.stack[this.stack.length-1];if(this.data.inReference=!0,W.type==="link"){const X=T.children;W.children=X}else W.alt=z}function Z(){const T=this.resume();this.stack[this.stack.length-1].url=T}function K(){const T=this.resume();this.stack[this.stack.length-1].title=T}function re(){this.data.inReference=void 0}function Se(){this.data.referenceType="collapsed"}function le(T){const z=this.resume(),W=this.stack[this.stack.length-1];W.label=z,W.identifier=Mt(this.sliceSerialize(T)).toLowerCase(),this.data.referenceType="full"}function Ke(T){this.data.characterReferenceType=T.type}function Ce(T){const z=this.sliceSerialize(T),W=this.data.characterReferenceType;let X;W?(X=ii(z,W==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):X=dr(z),this.stack[this.stack.length-1].value+=X}function j(T){this.stack.pop().position.end=mt(T.end)}function Y(T){M.call(this,T),this.stack[this.stack.length-1].url=this.sliceSerialize(T)}function ne(T){M.call(this,T),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(T)}function te(){return{type:"blockquote",children:[]}}function ie(){return{type:"code",lang:null,meta:null,value:""}}function ce(){return{type:"inlineCode",value:""}}function se(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Me(){return{type:"emphasis",children:[]}}function He(){return{type:"heading",depth:0,children:[]}}function be(){return{type:"break"}}function it(){return{type:"html",value:""}}function Lt(){return{type:"image",title:null,url:"",alt:null}}function ge(){return{type:"link",title:null,url:"",children:[]}}function An(T){return{type:"list",ordered:T.type==="listOrdered",start:null,spread:T._spread,children:[]}}function Ht(T){return{type:"listItem",spread:T._spread,checked:null,children:[]}}function Ut(){return{type:"paragraph",children:[]}}function Ft(){return{type:"strong",children:[]}}function Ve(){return{type:"text",value:""}}function at(){return{type:"thematicBreak"}}}(r)(function(n){for(;!fi(n););return n}(function(n){const o={constructs:vA([ul,...(n||{}).extensions||[]]),content:i(BA),defined:[],document:i(DA),flow:i($A),lazy:{},string:i(tl),text:i(nl)};return o;function i(A){return function(s){return dl(o,A,s)}}}(r).document().write(function(){let n,o=1,i="",A=!0;return function(s,a,l){const c=[];let u,d,p,g,v;for(s=i+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),p=0,i="",A&&(s.charCodeAt(0)===65279&&p++,A=void 0);p<s.length;){if(xi.lastIndex=p,u=xi.exec(s),g=u&&u.index!==void 0?u.index:s.length,v=s.charCodeAt(g),!u){i=s.slice(p);break}if(v===10&&p===g&&n)c.push(-3),n=void 0;else switch(n&&(c.push(-5),n=void 0),p<g&&(c.push(s.slice(p,g)),o+=g-p),v){case 0:c.push(65533),o++;break;case 9:for(d=4*Math.ceil(o/4),c.push(-2);o++<d;)c.push(-1);break;case 10:c.push(-4),o=1;break;default:n=!0,o=1}p=g+1}return l&&(n&&c.push(-5),i&&c.push(i),c.push(null)),c}}()(e,t,!0))))}function mt(e){return{line:e.line,column:e.column,offset:e.offset}}function ki(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?ki(e,n):gl(e,n)}}function gl(e,t){let r;for(r in t)if(Ei.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 Ci(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Xt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Xt({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Xt({start:t.start,end:t.end})+") is still open")}function ml(e){const t=this;t.parser=function(r){return hl(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Pi(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),i=o[0];i&&i.type==="text"?i.value="["+i.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 Si(e){return e.spread??e.children.length>1}function yl(e){const t=String(e),r=/\r?\n|\r/g;let n=r.exec(t),o=0;const i=[];for(;n;)i.push(Bi(t.slice(o,n.index),o>0,!0),n[0]),o=n.index+n[0].length,n=r.exec(t);return i.push(Bi(t.slice(o),o>0,!1)),i.join("")}function Bi(e,t,r){let n=0,o=e.length;if(t){let i=e.codePointAt(n);for(;i===9||i===32;)n++,i=e.codePointAt(n)}if(r){let i=e.codePointAt(o-1);for(;i===9||i===32;)o--,i=e.codePointAt(o-1)}return o>n?e.slice(n,o):""}const bl={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:`
20
+ `),n=n.replace(/\n/g,"<br/>"),n}createContainer(e){var t;const r=(typeof global<"u"&&global.INTERWEAVE_SSR_POLYFILL||Rs)();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(Us)){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?Ns(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=Co[s]||Co[a];if(!this.isSafe(e)||!s.match(Fs)&&(!t&&(!i||i===2)||s.startsWith("on")||A.replace(/(\s|\0|&#x0([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let l=s==="style"?this.extractStyleAttribute(e):A;i===4?l=!0:i===3?l=Number.parseFloat(String(l)):i!==5&&(l=String(l)),r[Ms[s]||s]=this.applyAttributeFilters(s,l),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 $n[e]?{...t,...$n[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(l=>{if(l.nodeType===1){const d=l.nodeName.toLowerCase(),u=this.getTagConfig(d);i&&(s.push(i),i="");const f=this.applyNodeFilters(d,l);if(!f)return;let g;if(a&&(!A||this.isTagAllowed(d))){this.keyIndex+=1;const b=this.keyIndex;g=this.parseNode(f,u);const h=a(f,g,u);if(h===null)return;if(typeof h<"u")return void s.push(p.cloneElement(h,{key:b}));this.keyIndex=b-1}if(this.banned.has(d))return;if(r||n&&d!=="br"||!this.isTagAllowed(d)||!o&&!this.canRenderChild(t,u))s=[...s,...this.parseNode(f,u.tagName?u:t)];else{var c;this.keyIndex+=1;const b=this.extractAttributes(f),h={tagName:d};b&&(h.attributes=b),u.void&&(h.selfClose=u.void),s.push(p.createElement(Po,{...h,key:this.keyIndex},(c=g)!==null&&c!==void 0?c:this.parseNode(f,u)))}}else if(l.nodeType===3){const d=r&&!n?l.textContent:this.applyMatchers(l.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(zs);){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:l,matcher:c,props:d}=t[A];let u;if(i)u=a.length,r.push(c.createElement(l,d));else{const f=n.match(new RegExp(`{{{/${A}}}}`));if(process.env.NODE_ENV!=="production"&&!f)throw new Error(`Closing token missing for interpolated element "${A}".`);u=f.index+f[0].length,r.push(c.createElement(this.replaceTokens(n.slice(a.length,f.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 js(e){var t;const{attributes:r,className:n,containerTagName:o,content:a,emptyContent:A,parsedContent:s,tagName:i,noWrap:l}=e,c=(t=o??i)!==null&&t!==void 0?t:"span",d=c==="fragment"||l;let u;if(s)u=s;else{const f=new Bo(a??"",e).parse();f.length>0&&(u=f)}return u||(u=A),d?p.createElement(p.Fragment,null,u):p.createElement(Po,{attributes:r,className:n,tagName:c},u)}function qs(e){const{attributes:t,className:r,content:n="",disableFilters:o=!1,disableMatchers:a=!1,emptyContent:A=null,filters:s=[],matchers:i=[],onAfterParse:l=null,onBeforeParse:c=null,tagName:d="span",noWrap:u=!1,...f}=e,g=a?[]:i,b=o?[]:s,h=c?[c]:[],w=l?[l]:[];g.forEach(P=>{P.onBeforeParse&&h.push(P.onBeforeParse.bind(P)),P.onAfterParse&&w.push(P.onAfterParse.bind(P))});const x=h.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 Bo(x,f,g,b),k=w.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 p.createElement(js,{attributes:t,className:r,containerTagName:e.containerTagName,emptyContent:A,noWrap:u,parsedContent:k.length===0?void 0:k,tagName:d})}const Gs=({children:e})=>E.jsx("div",{style:{whiteSpace:"normal"},children:E.jsx(qs,{content:typeof e=="string"?e:""})}),Ys={autoConfig:!0},Io=(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)},Ws=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},Ks=e=>{const{getFlow:t}=bn(),{messages:r,replaceMessages:n}=Kt(),{settings:o}=xo(),{hasChatHistoryLoaded:a}=ko(),A={...e,...Ys},s=A.htmlComponent?A.htmlComponent:Gs;p.useEffect(()=>{var c,d;if(a){const u=[...r];for(let f=0;f<u.length&&f<(((c=o.chatHistory)==null?void 0:c.maxEntries)??30);f++){const g=u[f];(d=g.tags)!=null&&d.includes("rcb-html-renderer-plugin:parsed")&&(g.contentWrapper=s)}n(u)}},[a]);const i=async c=>{var d;const u=(d=c.data.message)==null?void 0:d.sender.toUpperCase();typeof c.data.message.content=="string"&&Io(c,t(),u)&&(c.type==="rcb-start-simulate-stream-message"&&(c.data.simulateStreamChunker=Ws),c.data.message.contentWrapper=s,c.data.message.tags||(c.data.message.tags=[]),c.data.message.tags.push("rcb-html-renderer-plugin:parsed"))};Ge(j.PRE_INJECT_MESSAGE,i),Ge(j.CHUNK_STREAM_MESSAGE,i),Ge(j.START_STREAM_MESSAGE,i),Ge(j.START_SIMULATE_STREAM_MESSAGE,i),Ge(j.START_SPEAK_AUDIO,async c=>{Io(c,t(),"BOT")&&(c.data.textToRead=(d=>typeof window.DOMParser<"u"?new DOMParser().parseFromString(d,"text/html").body.textContent||"":d.replace(/<\/?[^>]+(>|$)/g,""))(c.data.textToRead))});const l={name:"@rcb-plugins/html-renderer"};return A!=null&&A.autoConfig&&(l.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0,rcbStartSpeakAudio:!0}}),l},Vs=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Xs=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Js={};function To(e,t){return(Js.jsx?Xs:Vs).test(e)}const Zs=/[ \t\n\f\r]/g;function Qo(e){return e.replace(Zs,"")===""}class Vt{constructor(t,r,n){this.property=t,this.normal=r,n&&(this.space=n)}}function Mo(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 Vt(r,n,t)}function er(e){return e.toLowerCase()}Vt.prototype.property={},Vt.prototype.normal={},Vt.prototype.space=null;class Ye{constructor(t,r){this.property=t,this.attribute=r}}Ye.prototype.space=null,Ye.prototype.boolean=!1,Ye.prototype.booleanish=!1,Ye.prototype.overloadedBoolean=!1,Ye.prototype.number=!1,Ye.prototype.commaSeparated=!1,Ye.prototype.spaceSeparated=!1,Ye.prototype.commaOrSpaceSeparated=!1,Ye.prototype.mustUseProperty=!1,Ye.prototype.defined=!1;let $s=0;const ee=Pt(),Ce=Pt(),Oo=Pt(),H=Pt(),pe=Pt(),Tt=Pt(),je=Pt();function Pt(){return 2**++$s}const tr=Object.freeze(Object.defineProperty({__proto__:null,boolean:ee,booleanish:Ce,commaOrSpaceSeparated:je,commaSeparated:Tt,number:H,overloadedBoolean:Oo,spaceSeparated:pe},Symbol.toStringTag,{value:"Module"})),nr=Object.keys(tr);class rr extends Ye{constructor(t,r,n,o){let a=-1;if(super(t,r),_o(this,"space",o),typeof n=="number")for(;++a<nr.length;){const A=nr[a];_o(this,nr[a],(n&tr[A])===tr[A])}}}function _o(e,t,r){r&&(e[t]=r)}rr.prototype.defined=!0;const eA={}.hasOwnProperty;function Qt(e){const t={},r={};let n;for(n in e.properties)if(eA.call(e.properties,n)){const o=e.properties[n],a=new rr(n,e.transform(e.attributes||{},n),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(a.mustUseProperty=!0),t[n]=a,r[er(n)]=n,r[er(a.attribute)]=n}return new Vt(t,r,e.space)}const No=Qt({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}}),Lo=Qt({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Ho(e,t){return t in e?e[t]:t}function Uo(e,t){return Ho(e,t.toLowerCase())}const Fo=Qt({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Uo,properties:{xmlns:null,xmlnsXLink:null}}),zo=Qt({transform:(e,t)=>t==="role"?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:Ce,ariaAutoComplete:null,ariaBusy:Ce,ariaChecked:Ce,ariaColCount:H,ariaColIndex:H,ariaColSpan:H,ariaControls:pe,ariaCurrent:null,ariaDescribedBy:pe,ariaDetails:null,ariaDisabled:Ce,ariaDropEffect:pe,ariaErrorMessage:null,ariaExpanded:Ce,ariaFlowTo:pe,ariaGrabbed:Ce,ariaHasPopup:null,ariaHidden:Ce,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:pe,ariaLevel:H,ariaLive:null,ariaModal:Ce,ariaMultiLine:Ce,ariaMultiSelectable:Ce,ariaOrientation:null,ariaOwns:pe,ariaPlaceholder:null,ariaPosInSet:H,ariaPressed:Ce,ariaReadOnly:Ce,ariaRelevant:null,ariaRequired:Ce,ariaRoleDescription:pe,ariaRowCount:H,ariaRowIndex:H,ariaRowSpan:H,ariaSelected:Ce,ariaSetSize:H,ariaSort:null,ariaValueMax:H,ariaValueMin:H,ariaValueNow:H,ariaValueText:null,role:null}}),tA=Qt({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Uo,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Tt,acceptCharset:pe,accessKey:pe,action:null,allow:null,allowFullScreen:ee,allowPaymentRequest:ee,allowUserMedia:ee,alt:null,as:null,async:ee,autoCapitalize:null,autoComplete:pe,autoFocus:ee,autoPlay:ee,blocking:pe,capture:null,charSet:null,checked:ee,cite:null,className:pe,cols:H,colSpan:null,content:null,contentEditable:Ce,controls:ee,controlsList:pe,coords:H|Tt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ee,defer:ee,dir:null,dirName:null,disabled:ee,download:Oo,draggable:Ce,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ee,formTarget:null,headers:pe,height:H,hidden:ee,high:H,href:null,hrefLang:null,htmlFor:pe,httpEquiv:pe,id:null,imageSizes:null,imageSrcSet:null,inert:ee,inputMode:null,integrity:null,is:null,isMap:ee,itemId:null,itemProp:pe,itemRef:pe,itemScope:ee,itemType:pe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ee,low:H,manifest:null,max:null,maxLength:H,media:null,method:null,min:null,minLength:H,multiple:ee,muted:ee,name:null,nonce:null,noModule:ee,noValidate:ee,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:ee,optimum:H,pattern:null,ping:pe,placeholder:null,playsInline:ee,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ee,referrerPolicy:null,rel:pe,required:ee,reversed:ee,rows:H,rowSpan:H,sandbox:pe,scope:null,scoped:ee,seamless:ee,selected:ee,shadowRootClonable:ee,shadowRootDelegatesFocus:ee,shadowRootMode:null,shape:null,size:H,sizes:null,slot:null,span:H,spellCheck:Ce,src:null,srcDoc:null,srcLang:null,srcSet:null,start:H,step:null,style:null,tabIndex:H,target:null,title:null,translate:null,type:null,typeMustMatch:ee,useMap:null,value:Ce,width:H,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:pe,axis:null,background:null,bgColor:null,border:H,borderColor:null,bottomMargin:H,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ee,declare:ee,event:null,face:null,frame:null,frameBorder:null,hSpace:H,leftMargin:H,link:null,longDesc:null,lowSrc:null,marginHeight:H,marginWidth:H,noResize:ee,noHref:ee,noShade:ee,noWrap:ee,object:null,profile:null,prompt:null,rev:null,rightMargin:H,rules:null,scheme:null,scrolling:Ce,standby:null,summary:null,text:null,topMargin:H,valueType:null,version:null,vAlign:null,vLink:null,vSpace:H,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ee,disableRemotePlayback:ee,prefix:null,property:null,results:H,security:null,unselectable:null}}),nA=Qt({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:Ho,properties:{about:je,accentHeight:H,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:H,amplitude:H,arabicForm:null,ascent:H,attributeName:null,attributeType:null,azimuth:H,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:H,by:null,calcMode:null,capHeight:H,className:pe,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:H,diffuseConstant:H,direction:null,display:null,dur:null,divisor:H,dominantBaseline:null,download:ee,dx:null,dy:null,edgeMode:null,editable:null,elevation:H,enableBackground:null,end:null,event:null,exponent:H,externalResourcesRequired:null,fill:null,fillOpacity:H,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:Tt,g2:Tt,glyphName:Tt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:H,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:H,horizOriginX:H,horizOriginY:H,id:null,ideographic:H,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:H,k:H,k1:H,k2:H,k3:H,k4:H,kernelMatrix:je,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:H,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:H,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:H,overlineThickness:H,paintOrder:null,panose1:null,path:null,pathLength:H,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:pe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:H,pointsAtY:H,pointsAtZ:H,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:je,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:je,rev:je,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:je,requiredFeatures:je,requiredFonts:je,requiredFormats:je,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:H,specularExponent:H,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:H,strikethroughThickness:H,string:null,stroke:null,strokeDashArray:je,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:H,strokeOpacity:H,strokeWidth:null,style:null,surfaceScale:H,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:je,tabIndex:H,tableValues:null,target:null,targetX:H,targetY:H,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:je,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:H,underlineThickness:H,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:H,values:null,vAlphabetic:H,vMathematical:H,vectorEffect:null,vHanging:H,vIdeographic:H,version:null,vertAdvY:H,vertOriginX:H,vertOriginY:H,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:H,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),rA=/^data[-\w.:]+$/i,Ro=/-[a-z]/g,oA=/[A-Z]/g;function aA(e){return"-"+e.toLowerCase()}function iA(e){return e.charAt(1).toUpperCase()}const sA={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"},AA=Mo([Lo,No,Fo,zo,tA],"html"),or=Mo([Lo,No,Fo,zo,nA],"svg");function jo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ar,qo,Go,Mt={},lA=function(){if(Go)return Mt;Go=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,l=s.value;A?n(i,l,s):l&&((o=o||{})[i]=l)}}),o};var t=e(function(){if(qo)return ar;qo=1;var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,A=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,i=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function d(u){return u?u.replace(l,c):c}return ar=function(u,f){if(typeof u!="string")throw new TypeError("First argument must be a string");if(!u)return[];f=f||{};var g=1,b=1;function h(Q){var B=Q.match(n);B&&(g+=B.length);var O=Q.lastIndexOf(`
21
+ `);b=~O?Q.length-O:b+Q.length}function w(){var Q={line:g,column:b};return function(B){return B.position=new x(Q),P(),B}}function x(Q){this.start=Q,this.end={line:g,column:b},this.source=f.source}function m(Q){var B=new Error(f.source+":"+g+":"+b+": "+Q);if(B.reason=Q,B.filename=f.source,B.line=g,B.column=b,B.source=u,!f.silent)throw B}function k(Q){var B=Q.exec(u);if(B){var O=B[0];return h(O),u=u.slice(O.length),B}}function P(){k(o)}function C(Q){var B;for(Q=Q||[];B=S();)B!==!1&&Q.push(B);return Q}function S(){var Q=w();if(u.charAt(0)=="/"&&u.charAt(1)=="*"){for(var B=2;c!=u.charAt(B)&&(u.charAt(B)!="*"||u.charAt(B+1)!="/");)++B;if(B+=2,c===u.charAt(B-1))return m("End of comment missing");var O=u.slice(2,B-2);return b+=2,h(O),u=u.slice(B),b+=2,Q({type:"comment",comment:O})}}function I(){var Q=w(),B=k(a);if(B){if(S(),!k(A))return m("property missing ':'");var O=k(s),D=Q({type:"declaration",property:d(B[0].replace(r,c)),value:O?d(O[0].replace(r,c)):c});return k(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}()},ar}());return Mt}();const Yo=jo(lA),cA=Yo.default||Yo,Wo=Ko("end"),ir=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 Xt(e){return e&&typeof e=="object"?"position"in e||"type"in e?Vo(e.position):"start"in e||"end"in e?Vo(e):"line"in e||"column"in e?sr(e):"":""}function sr(e){return Xo(e&&e.line)+":"+Xo(e&&e.column)}function Vo(e){return sr(e&&e.start)+"-"+sr(e&&e.end)}function Xo(e){return e&&typeof e=="number"?e:1}class Oe 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=Xt(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}}Oe.prototype.file="",Oe.prototype.name="",Oe.prototype.reason="",Oe.prototype.message="",Oe.prototype.stack="",Oe.prototype.column=void 0,Oe.prototype.line=void 0,Oe.prototype.ancestors=void 0,Oe.prototype.cause=void 0,Oe.prototype.fatal=void 0,Oe.prototype.place=void 0,Oe.prototype.ruleId=void 0,Oe.prototype.source=void 0;const Ar={}.hasOwnProperty,uA=new Map,dA=/[A-Z]/g,pA=/-([a-z])/g,fA=new Set(["table","tbody","thead","tfoot","tr"]),hA=new Set(["td","th"]),Jo="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function gA(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(l,c,d,u){const f=Array.isArray(d.children),g=ir(l);return s(c,d,u,f,{columnNumber:g?g.column-1:void 0,fileName:A,lineNumber:g?g.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 l;function l(c,d,u,f){const g=Array.isArray(u.children)?i:s;return f?g(d,u,f):g(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"?or:AA,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Zo(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function Zo(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=or,n.schema=s),n.ancestors.push(o);const i=ea(n,o.tagName,!1),l=function(d,u){const f={};let g,b;for(b in u.properties)if(b!=="children"&&Ar.call(u.properties,b)){const h=mA(d,b,u.properties[b]);if(h){const[w,x]=h;d.tableCellAlignToStyle&&w==="align"&&typeof x=="string"&&hA.has(u.tagName)?g=x:f[w]=x}}return g&&((f.style||(f.style={}))[d.stylePropertyNameCase==="css"?"text-align":"textAlign"]=g),f}(n,o);let c=cr(n,o);return fA.has(o.tagName)&&(c=c.filter(function(d){return typeof d!="string"||!function(u){return typeof u=="object"?u.type==="text"&&Qo(u.value):Qo(u)}(d)})),$o(n,l,i,o),lr(l,c),n.ancestors.pop(),n.schema=A,n.create(o,i,l,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)}Jt(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=or,n.schema=s),n.ancestors.push(o);const i=o.name===null?n.Fragment:ea(n,o.name,!0),l=function(d,u){const f={};for(const g of u.attributes)if(g.type==="mdxJsxExpressionAttribute")if(g.data&&g.data.estree&&d.evaluater){const b=g.data.estree.body[0];b.type;const h=b.expression;h.type;const w=h.properties[0];w.type,Object.assign(f,d.evaluater.evaluateExpression(w.argument))}else Jt(d,u.position);else{const b=g.name;let h;if(g.value&&typeof g.value=="object")if(g.value.data&&g.value.data.estree&&d.evaluater){const w=g.value.data.estree.body[0];w.type,h=d.evaluater.evaluateExpression(w.expression)}else Jt(d,u.position);else h=g.value===null||g.value;f[b]=h}return f}(n,o),c=cr(n,o);return $o(n,l,i,o),lr(l,c),n.ancestors.pop(),n.schema=A,n.create(o,i,l,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);Jt(n,o.position)}(e,t):t.type==="root"?function(n,o,a){const A={};return lr(A,cr(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 $o(e,t,r,n){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=n)}function lr(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function cr(e,t){const r=[];let n=-1;const o=e.passKeys?new Map:uA;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 l=o.get(i)||0;A=i+"-"+l,o.set(i,l+1)}}const s=Zo(e,a,A);s!==void 0&&r.push(s)}return r}function mA(e,t,r){const n=function(o,a){const A=er(a);let s=a,i=Ye;if(A in o.normal)return o.property[o.normal[A]];if(A.length>4&&A.slice(0,4)==="data"&&rA.test(a)){if(a.charAt(4)==="-"){const l=a.slice(5).replace(Ro,iA);s="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=a.slice(4);if(!Ro.test(l)){let c=l.replace(oA,aA);c.charAt(0)!=="-"&&(c="-"+c),a="data"+c}}i=rr}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{cA(A,i)}catch(l){if(!a.ignoreInvalidStyle){const c=l,d=new Oe("Cannot parse `style` attribute",{ancestors:a.ancestors,cause:c,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw d.file=a.filePath||void 0,d.url=Jo+"#cannot-parse-style-attribute",d}}return s;function i(l,c){let d=l;d.slice(0,2)!=="--"&&(d.slice(0,4)==="-ms-"&&(d="ms-"+d.slice(4)),d=d.replace(pA,bA)),s[d]=c}}(e,String(r));return e.stylePropertyNameCase==="css"&&(o=function(a){const A={};let s;for(s in a)Ar.call(a,s)&&(A[yA(s)]=a[s]);return A}(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&n.space?sA[n.property]||n.property:n.attribute,r]}}function ea(e,t,r){let n;if(r)if(t.includes(".")){const o=t.split(".");let a,A=-1;for(;++A<o.length;){const s=To(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=To(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 Ar.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(n);Jt(e)}function Jt(e,t){const r=new Oe("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=Jo+"#cannot-handle-mdx-estrees-without-createevaluater",r}function yA(e){let t=e.replace(dA,vA);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function bA(e,t){return t.toUpperCase()}function vA(e){return"-"+e.toLowerCase()}const ur={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"]},wn={};function ta(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 na(e.children,t,r)}return Array.isArray(e)?na(e,t,r):""}function na(e,t,r){const n=[];let o=-1;for(;++o<e.length;)n[o]=ta(e[o],t,r);return n.join("")}const ra=document.createElement("i");function dr(e){const t="&"+e+";";ra.innerHTML=t;const r=ra.textContent;return(r.charCodeAt(r.length-1)!==59||e==="semi")&&r!==t&&r}function tt(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 We(e,t){return e.length>0?(tt(e,e.length,0,t),e):t}const oa={}.hasOwnProperty;function wA(e){const t={};let r=-1;for(;++r<e.length;)xA(t,e[r]);return t}function xA(e,t){let r;for(r in t){const n=(oa.call(e,r)?e[r]:void 0)||(e[r]={}),o=t[r];let a;if(o)for(a in o){oa.call(n,a)||(n[a]=[]);const A=o[a];EA(n[a],Array.isArray(A)?A:A?[A]:[])}}}function EA(e,t){let r=-1;const n=[];for(;++r<t.length;)(t[r].add==="after"?e:n).push(t[r]);tt(e,0,0,n)}function aa(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 Ot(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const nt=gt(/[A-Za-z]/),qe=gt(/[\dA-Za-z]/),kA=gt(/[#-'*+\--9=?A-Z^-~]/);function pr(e){return e!==null&&(e<32||e===127)}const fr=gt(/\d/),CA=gt(/[\dA-Fa-f]/),PA=gt(/[!-/:-@[-`{-~]/);function $(e){return e!==null&&e<-2}function He(e){return e!==null&&(e<0||e===32)}function ie(e){return e===-2||e===-1||e===32}const SA=gt(new RegExp("\\p{P}|\\p{S}","u")),DA=gt(/\s/);function gt(e){return function(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function _t(e){const t=[];let r=-1,n=0,o=0;for(;++r<e.length;){const a=e.charCodeAt(r);let A="";if(a===37&&qe(e.charCodeAt(r+1))&&qe(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 fe(e,t,r,n){const o=n?n-1:Number.POSITIVE_INFINITY;let a=0;return function(s){return ie(s)?(e.enter(r),A(s)):t(s)};function A(s){return ie(s)&&a++<o?(e.consume(s),A):(e.exit(r),t(s))}}const BA={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"),fe(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)):$(a)?(e.consume(a),e.exit("chunkText"),n):(e.consume(a),o)}}},IA={tokenize:function(e){const t=this,r=[];let n,o,a,A=0;return s;function s(m){if(A<r.length){const k=r[A];return t.containerState=k[1],e.attempt(k[0].continuation,i,l)(m)}return l(m)}function i(m){if(A++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,n&&x();const k=t.events.length;let P,C=k;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){P=t.events[C][1].end;break}w(A);let S=k;for(;S<t.events.length;)t.events[S][1].end={...P},S++;return tt(t.events,C+1,0,t.events.slice(k)),t.events.length=S,l(m)}return s(m)}function l(m){if(A===r.length){if(!n)return u(m);if(n.currentConstruct&&n.currentConstruct.concrete)return g(m);t.interrupt=!(!n.currentConstruct||n._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ia,c,d)(m)}function c(m){return n&&x(),w(A),u(m)}function d(m){return t.parser.lazy[t.now().line]=A!==r.length,a=t.now().offset,g(m)}function u(m){return t.containerState={},e.attempt(ia,f,g)(m)}function f(m){return A++,r.push([t.currentConstruct,t.containerState]),u(m)}function g(m){return m===null?(n&&x(),w(0),void e.consume(m)):(n=n||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:n,contentType:"flow",previous:o}),b(m))}function b(m){return m===null?(h(e.exit("chunkFlow"),!0),w(0),void e.consume(m)):$(m)?(e.consume(m),h(e.exit("chunkFlow")),A=0,t.interrupt=void 0,s):(e.consume(m),b)}function h(m,k){const P=t.sliceStream(m);if(k&&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(w(A),C=S;C<t.events.length;)t.events[C][1].end={...Q},C++;tt(t.events,B+1,0,t.events.slice(S)),t.events.length=C}}function w(m){let k=r.length;for(;k-- >m;){const P=r[k];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}}},ia={tokenize:function(e,t,r){return fe(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function sa(e){return e===null||He(e)||DA(e)?1:SA(e)?2:void 0}function hr(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 gr={name:"attention",resolveAll:function(e,t){let r,n,o,a,A,s,i,l,c=-1;for(;++c<e.length;)if(e[c][0]==="enter"&&e[c][1].type==="attentionSequence"&&e[c][1]._close){for(r=c;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[c][1]).charCodeAt(0)){if((e[r][1]._close||e[c][1]._open)&&(e[c][1].end.offset-e[c][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[c][1].end.offset-e[c][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[c][1].end.offset-e[c][1].start.offset>1?2:1;const d={...e[r][1].end},u={...e[c][1].start};Aa(d,-s),Aa(u,s),a={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},A={type:s>1?"strongSequence":"emphasisSequence",start:{...e[c][1].start},end:u},o={type:s>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[c][1].start}},n={type:s>1?"strong":"emphasis",start:{...a.start},end:{...A.end}},e[r][1].end={...a.start},e[c][1].start={...A.end},i=[],e[r][1].end.offset-e[r][1].start.offset&&(i=We(i,[["enter",e[r][1],t],["exit",e[r][1],t]])),i=We(i,[["enter",n,t],["enter",a,t],["exit",a,t],["enter",o,t]]),i=We(i,hr(t.parser.constructs.insideSpan.null,e.slice(r+1,c),t)),i=We(i,[["exit",o,t],["enter",A,t],["exit",A,t],["exit",n,t]]),e[c][1].end.offset-e[c][1].start.offset?(l=2,i=We(i,[["enter",e[c][1],t],["exit",e[c][1],t]])):l=0,tt(e,r-1,c-r+3,i),c=r+i.length-l-2;break}}for(c=-1;++c<e.length;)e[c][1].type==="attentionSequence"&&(e[c][1].type="data");return e},tokenize:function(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,o=sa(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"),l=sa(s),c=!l||l===2&&o||r.includes(s),d=!o||o===2&&l||r.includes(n);return i._open=!!(a===42?c:c&&(o||!d)),i._close=!!(a===42?d:d&&(l||!c)),t(s)}}};function Aa(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 nt(u)?(e.consume(u),a):u===64?r(u):i(u)}function a(u){return u===43||u===45||u===46||qe(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||qe(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||pr(u)?r(u):(e.consume(u),s)}function i(u){return u===64?(e.consume(u),l):kA(u)?(e.consume(u),i):r(u)}function l(u){return qe(u)?c(u):r(u)}function c(u){return u===46?(e.consume(u),n=0,l):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||qe(u))&&n++<63){const f=u===45?d:c;return e.consume(u),f}return r(u)}}},xn={partial:!0,tokenize:function(e,t,r){return function(o){return ie(o)?fe(e,n,"linePrefix")(o):n(o)};function n(o){return o===null||$(o)?t(o):r(o)}}},la={continuation:{tokenize:function(e,t,r){const n=this;return function(a){return ie(a)?fe(e,o,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)};function o(a){return e.attempt(la,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 ie(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}},ca={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 PA(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(o)}}},ua={name:"characterReference",tokenize:function(e,t,r){const n=this;let o,a,A=0;return function(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),s};function s(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),i):(e.enter("characterReferenceValue"),o=31,a=qe,l(c))}function i(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=CA,l):(e.enter("characterReferenceValue"),o=7,a=fr,l(c))}function l(c){if(c===59&&A){const d=e.exit("characterReferenceValue");return a!==qe||dr(n.sliceSerialize(d))?(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):r(c)}return a(c)&&A++<o?(e.consume(c),l):r(c)}}},da={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)}}},pa={concrete:!0,name:"codeFenced",tokenize:function(e,t,r){const n=this,o={partial:!0,tokenize:function(m,k,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"),ie(D)?fe(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"),ie(D)?fe(m,O,"whitespace")(D):O(D)):P(D)}function O(D){return D===null||$(D)?(m.exit("codeFencedFence"),k(D)):P(D)}}};let a,A=0,s=0;return function(m){return function(k){const P=n.events[n.events.length-1];return A=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,a=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),i(k)}(m)};function i(m){return m===a?(s++,e.consume(m),i):s<3?r(m):(e.exit("codeFencedFenceSequence"),ie(m)?fe(e,l,"whitespace")(m):l(m))}function l(m){return m===null||$(m)?(e.exit("codeFencedFence"),n.interrupt?t(m):e.check(da,f,x)(m)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),c(m))}function c(m){return m===null||$(m)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),l(m)):ie(m)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),fe(e,d,"whitespace")(m)):m===96&&m===a?r(m):(e.consume(m),c)}function d(m){return m===null||$(m)?l(m):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),u(m))}function u(m){return m===null||$(m)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),l(m)):m===96&&m===a?r(m):(e.consume(m),u)}function f(m){return e.attempt(o,x,g)(m)}function g(m){return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),b}function b(m){return A>0&&ie(m)?fe(e,h,"linePrefix",A+1)(m):h(m)}function h(m){return m===null||$(m)?e.check(da,f,x)(m):(e.enter("codeFlowValue"),w(m))}function w(m){return m===null||$(m)?(e.exit("codeFlowValue"),h(m)):(e.consume(m),w)}function x(m){return e.exit("codeFenced"),t(m)}}},mr={name:"codeIndented",tokenize:function(e,t,r){const n=this;return function(i){return e.enter("codeIndented"),fe(e,o,"linePrefix",5)(i)};function o(i){const l=n.events[n.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?a(i):r(i)}function a(i){return i===null?s(i):$(i)?e.attempt(QA,a,s)(i):(e.enter("codeFlowValue"),A(i))}function A(i){return i===null||$(i)?(e.exit("codeFlowValue"),a(i)):(e.consume(i),A)}function s(i){return e.exit("codeIndented"),t(i)}}},QA={partial:!0,tokenize:function(e,t,r){const n=this;return o;function o(A){return n.parser.lazy[n.now().line]?r(A):$(A)?(e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),o):fe(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):$(A)?o(A):r(A)}}},MA={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(c){return e.enter("codeText"),e.enter("codeTextSequence"),A(c)};function A(c){return c===96?(e.consume(c),a++,A):(e.exit("codeTextSequence"),s(c))}function s(c){return c===null?r(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),s):c===96?(o=e.enter("codeTextSequence"),n=0,l(c)):$(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):(e.enter("codeTextData"),i(c))}function i(c){return c===null||c===32||c===96||$(c)?(e.exit("codeTextData"),s(c)):(e.consume(c),i)}function l(c){return c===96?(e.consume(c),n++,l):n===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(o.type="codeTextData",i(c))}}};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&&Zt(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),Zt(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Zt(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);Zt(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Zt(this.left,r.reverse())}}}function Zt(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 fa(e){const t={};let r,n,o,a,A,s,i,l=-1;const c=new OA(e);for(;++l<c.length;){for(;l in t;)l=t[l];if(r=c.get(l),l&&r[1].type==="chunkFlow"&&c.get(l-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,_A(c,l)),l=t[l],i=!0);else if(r[1]._container){for(o=l,n=void 0;o--;)if(a=c.get(o),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(n&&(c.get(n)[1].type="lineEndingBlank"),a[1].type="lineEnding",n=o);else if(a[1].type!=="linePrefix")break;n&&(r[1].end={...c.get(n)[1].start},A=c.slice(n,l),A.unshift(r),c.splice(n,l-n+1,A))}}return tt(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!i}function _A(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=[],l={};let c,d,u=-1,f=r,g=0,b=0;const h=[b];for(;f;){for(;e.get(++o)[1]!==f;);a.push(o),f._tokenizer||(c=n.sliceStream(f),f.next||c.push(null),d&&A.defineSkip(f.start),f._isInFirstContentOfListItem&&(A._gfmTasklistFirstContentOfListItem=!0),A.write(c),f._isInFirstContentOfListItem&&(A._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=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&&(b=u+1,h.push(b),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(A.events=[],f?(f._tokenizer=void 0,f.previous=void 0):h.pop(),u=h.length;u--;){const w=s.slice(h[u],h[u+1]),x=a.pop();i.push([x,x+w.length-1]),e.splice(x,2,w)}for(i.reverse(),u=-1;++u<i.length;)l[g+i[u][0]]=g+i[u][1],g+=i[u][1]-i[u][0]-1;return l}const NA={resolve:function(e){return fa(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):$(A)?e.check(LA,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}}},LA={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"),fe(e,o,"linePrefix")};function o(a){if(a===null||$(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 ha(e,t,r,n,o,a,A,s,i){const l=i||Number.POSITIVE_INFINITY;let c=0;return function(h){return h===60?(e.enter(n),e.enter(o),e.enter(a),e.consume(h),e.exit(a),d):h===null||h===32||h===41||pr(h)?r(h):(e.enter(n),e.enter(A),e.enter(s),e.enter("chunkString",{contentType:"string"}),g(h))};function d(h){return h===62?(e.enter(a),e.consume(h),e.exit(a),e.exit(o),e.exit(n),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),u(h))}function u(h){return h===62?(e.exit("chunkString"),e.exit(s),d(h)):h===null||h===60||$(h)?r(h):(e.consume(h),h===92?f:u)}function f(h){return h===60||h===62||h===92?(e.consume(h),u):u(h)}function g(h){return c||h!==null&&h!==41&&!He(h)?c<l&&h===40?(e.consume(h),c++,g):h===41?(e.consume(h),c--,g):h===null||h===32||h===40||pr(h)?r(h):(e.consume(h),h===92?b:g):(e.exit("chunkString"),e.exit(s),e.exit(A),e.exit(n),t(h))}function b(h){return h===40||h===41||h===92?(e.consume(h),g):g(h)}}function ga(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),l};function l(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):$(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),l):(e.enter("chunkString",{contentType:"string"}),c(u))}function c(u){return u===null||u===91||u===93||$(u)||i++>999?(e.exit("chunkString"),l(u)):(e.consume(u),s||(s=!ie(u)),u===92?d:c)}function d(u){return u===91||u===92||u===93?(e.consume(u),i++,c):c(u)}}function ma(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):$(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),fe(e,i,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),l(d))}function l(d){return d===A||d===null||$(d)?(e.exit("chunkString"),i(d)):(e.consume(d),d===92?c:l)}function c(d){return d===A||d===92?(e.consume(d),l):l(d)}}function $t(e,t){let r;return function n(o){return $(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r=!0,n):ie(o)?fe(e,n,r?"linePrefix":"lineSuffix")(o):t(o)}}const HA={name:"definition",tokenize:function(e,t,r){const n=this;let o;return function(d){return e.enter("definition"),function(u){return ga.call(n,e,a,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(u)}(d)};function a(d){return o=Ot(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 He(d)?$t(e,s)(d):s(d)}function s(d){return ha(e,i,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function i(d){return e.attempt(UA,l,l)(d)}function l(d){return ie(d)?fe(e,c,"whitespace")(d):c(d)}function c(d){return d===null||$(d)?(e.exit("definition"),n.parser.defined.push(o),t(d)):r(d)}}},UA={partial:!0,tokenize:function(e,t,r){return function(A){return He(A)?$t(e,n)(A):r(A)};function n(A){return ma(e,o,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(A)}function o(A){return ie(A)?fe(e,a,"whitespace")(A):a(A)}function a(A){return A===null||$(A)?t(A):r(A)}}},FA={name:"hardBreakEscape",tokenize:function(e,t,r){return function(o){return e.enter("hardBreakEscape"),e.consume(o),n};function n(o){return $(o)?(e.exit("hardBreakEscape"),t(o)):r(o)}}},zA={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"},tt(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(l){return e.enter("atxHeadingSequence"),o(l)}(i)};function o(i){return i===35&&n++<6?(e.consume(i),o):i===null||He(i)?(e.exit("atxHeadingSequence"),a(i)):r(i)}function a(i){return i===35?(e.enter("atxHeadingSequence"),A(i)):i===null||$(i)?(e.exit("atxHeading"),t(i)):ie(i)?fe(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||He(i)?(e.exit("atxHeadingText"),a(i)):(e.consume(i),s)}}},RA=["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"],ya=["pre","script","style","textarea"],jA={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(v){return function(V){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(V),l}(v)};function l(v){return v===33?(e.consume(v),c):v===47?(e.consume(v),a=!0,f):v===63?(e.consume(v),o=3,n.interrupt?t:L):nt(v)?(e.consume(v),A=String.fromCharCode(v),g):r(v)}function c(v){return v===45?(e.consume(v),o=2,d):v===91?(e.consume(v),o=5,s=0,u):nt(v)?(e.consume(v),o=4,n.interrupt?t:L):r(v)}function d(v){return v===45?(e.consume(v),n.interrupt?t:L):r(v)}function u(v){return v==="CDATA[".charCodeAt(s++)?(e.consume(v),s===6?n.interrupt?t:B:u):r(v)}function f(v){return nt(v)?(e.consume(v),A=String.fromCharCode(v),g):r(v)}function g(v){if(v===null||v===47||v===62||He(v)){const V=v===47,q=A.toLowerCase();return V||a||!ya.includes(q)?RA.includes(A.toLowerCase())?(o=6,V?(e.consume(v),b):n.interrupt?t(v):B(v)):(o=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(v):a?h(v):w(v)):(o=1,n.interrupt?t(v):B(v))}return v===45||qe(v)?(e.consume(v),A+=String.fromCharCode(v),g):r(v)}function b(v){return v===62?(e.consume(v),n.interrupt?t:B):r(v)}function h(v){return ie(v)?(e.consume(v),h):I(v)}function w(v){return v===47?(e.consume(v),I):v===58||v===95||nt(v)?(e.consume(v),x):ie(v)?(e.consume(v),w):I(v)}function x(v){return v===45||v===46||v===58||v===95||qe(v)?(e.consume(v),x):m(v)}function m(v){return v===61?(e.consume(v),k):ie(v)?(e.consume(v),m):w(v)}function k(v){return v===null||v===60||v===61||v===62||v===96?r(v):v===34||v===39?(e.consume(v),i=v,P):ie(v)?(e.consume(v),k):C(v)}function P(v){return v===i?(e.consume(v),i=null,S):v===null||$(v)?r(v):(e.consume(v),P)}function C(v){return v===null||v===34||v===39||v===47||v===60||v===61||v===62||v===96||He(v)?m(v):(e.consume(v),C)}function S(v){return v===47||v===62||ie(v)?w(v):r(v)}function I(v){return v===62?(e.consume(v),Q):r(v)}function Q(v){return v===null||$(v)?B(v):ie(v)?(e.consume(v),Q):r(v)}function B(v){return v===45&&o===2?(e.consume(v),F):v===60&&o===1?(e.consume(v),_):v===62&&o===4?(e.consume(v),y):v===63&&o===3?(e.consume(v),L):v===93&&o===5?(e.consume(v),N):!$(v)||o!==6&&o!==7?v===null||$(v)?(e.exit("htmlFlowData"),O(v)):(e.consume(v),B):(e.exit("htmlFlowData"),e.check(qA,W,O)(v))}function O(v){return e.check(GA,D,W)(v)}function D(v){return e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),M}function M(v){return v===null||$(v)?O(v):(e.enter("htmlFlowData"),B(v))}function F(v){return v===45?(e.consume(v),L):B(v)}function _(v){return v===47?(e.consume(v),A="",U):B(v)}function U(v){if(v===62){const V=A.toLowerCase();return ya.includes(V)?(e.consume(v),y):B(v)}return nt(v)&&A.length<8?(e.consume(v),A+=String.fromCharCode(v),U):B(v)}function N(v){return v===93?(e.consume(v),L):B(v)}function L(v){return v===62?(e.consume(v),y):v===45&&o===2?(e.consume(v),L):B(v)}function y(v){return v===null||$(v)?(e.exit("htmlFlowData"),W(v)):(e.consume(v),y)}function W(v){return e.exit("htmlFlow"),t(v)}}},qA={partial:!0,tokenize:function(e,t,r){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),e.attempt(xn,t,r)}}},GA={partial:!0,tokenize:function(e,t,r){const n=this;return function(a){return $(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)}}},YA={name:"htmlText",tokenize:function(e,t,r){const n=this;let o,a,A;return function(y){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(y),s};function s(y){return y===33?(e.consume(y),i):y===47?(e.consume(y),k):y===63?(e.consume(y),x):nt(y)?(e.consume(y),S):r(y)}function i(y){return y===45?(e.consume(y),l):y===91?(e.consume(y),a=0,f):nt(y)?(e.consume(y),w):r(y)}function l(y){return y===45?(e.consume(y),u):r(y)}function c(y){return y===null?r(y):y===45?(e.consume(y),d):$(y)?(A=c,U(y)):(e.consume(y),c)}function d(y){return y===45?(e.consume(y),u):c(y)}function u(y){return y===62?_(y):y===45?d(y):c(y)}function f(y){return y==="CDATA[".charCodeAt(a++)?(e.consume(y),a===6?g:f):r(y)}function g(y){return y===null?r(y):y===93?(e.consume(y),b):$(y)?(A=g,U(y)):(e.consume(y),g)}function b(y){return y===93?(e.consume(y),h):g(y)}function h(y){return y===62?_(y):y===93?(e.consume(y),h):g(y)}function w(y){return y===null||y===62?_(y):$(y)?(A=w,U(y)):(e.consume(y),w)}function x(y){return y===null?r(y):y===63?(e.consume(y),m):$(y)?(A=x,U(y)):(e.consume(y),x)}function m(y){return y===62?_(y):x(y)}function k(y){return nt(y)?(e.consume(y),P):r(y)}function P(y){return y===45||qe(y)?(e.consume(y),P):C(y)}function C(y){return $(y)?(A=C,U(y)):ie(y)?(e.consume(y),C):_(y)}function S(y){return y===45||qe(y)?(e.consume(y),S):y===47||y===62||He(y)?I(y):r(y)}function I(y){return y===47?(e.consume(y),_):y===58||y===95||nt(y)?(e.consume(y),Q):$(y)?(A=I,U(y)):ie(y)?(e.consume(y),I):_(y)}function Q(y){return y===45||y===46||y===58||y===95||qe(y)?(e.consume(y),Q):B(y)}function B(y){return y===61?(e.consume(y),O):$(y)?(A=B,U(y)):ie(y)?(e.consume(y),B):I(y)}function O(y){return y===null||y===60||y===61||y===62||y===96?r(y):y===34||y===39?(e.consume(y),o=y,D):$(y)?(A=O,U(y)):ie(y)?(e.consume(y),O):(e.consume(y),M)}function D(y){return y===o?(e.consume(y),o=void 0,F):y===null?r(y):$(y)?(A=D,U(y)):(e.consume(y),D)}function M(y){return y===null||y===34||y===39||y===60||y===61||y===96?r(y):y===47||y===62||He(y)?I(y):(e.consume(y),M)}function F(y){return y===47||y===62||He(y)?I(y):r(y)}function _(y){return y===62?(e.consume(y),e.exit("htmlTextData"),e.exit("htmlText"),t):r(y)}function U(y){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),N}function N(y){return ie(y)?fe(e,L,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):L(y)}function L(y){return e.enter("htmlTextData"),A(y)}}},yr={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&&tt(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}},l={type:"label",start:{...e[n][1].start},end:{...e[o][1].end}},c={type:"labelText",start:{...e[n+s+2][1].end},end:{...e[o-2][1].start}};return a=[["enter",i,t],["enter",l,t]],a=We(a,e.slice(n+1,n+s+3)),a=We(a,[["enter",c,t]]),a=We(a,hr(t.parser.constructs.insideSpan.null,e.slice(n+s+4,o-3),t)),a=We(a,[["exit",c,t],e[o-2],e[o-1],["exit",l,t]]),a=We(a,e.slice(o+1)),a=We(a,[["exit",i,t]]),tt(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?c(d):(a=n.parser.defined.includes(Ot(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(WA,l,a?l:c)(d):d===91?e.attempt(KA,l,a?i:c)(d):a?l(d):c(d)}function i(d){return e.attempt(VA,l,c)(d)}function l(d){return t(d)}function c(d){return o._balanced=!0,r(d)}}},WA={tokenize:function(e,t,r){return function(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),n};function n(c){return He(c)?$t(e,o)(c):o(c)}function o(c){return c===41?l(c):ha(e,a,A,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function a(c){return He(c)?$t(e,s)(c):l(c)}function A(c){return r(c)}function s(c){return c===34||c===39||c===40?ma(e,i,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):l(c)}function i(c){return He(c)?$t(e,l)(c):l(c)}function l(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):r(c)}}},KA={tokenize:function(e,t,r){const n=this;return function(A){return ga.call(n,e,o,a,"reference","referenceMarker","referenceString")(A)};function o(A){return n.parser.defined.includes(Ot(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(A):r(A)}function a(A){return r(A)}}},VA={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)}}},XA={name:"labelStartImage",resolveAll:yr.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)}}},JA={name:"labelStartLink",resolveAll:yr.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)}}},br={name:"lineEnding",tokenize:function(e,t){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),fe(e,t,"linePrefix")}}},En={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||$(s))?(e.exit("thematicBreak"),t(s)):r(s)}function A(s){return s===n?(e.consume(s),o++,A):(e.exit("thematicBreakSequence"),ie(s)?fe(e,a,"whitespace")(s):a(s))}}},Ue={continuation:{tokenize:function(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(xn,function(a){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,fe(e,t,"listItemIndent",n.containerState.size+1)(a)},function(a){return n.containerState.furtherBlankLines||!ie(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($A,t,o)(a))});function o(a){return n.containerState._closeFlow=!0,n.interrupt=void 0,fe(e,e.attempt(Ue,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 f=n.containerState.type||(u===42||u===43||u===45?"listUnordered":"listOrdered");if(f==="listUnordered"?!n.containerState.marker||u===n.containerState.marker:fr(u)){if(n.containerState.type||(n.containerState.type=f,e.enter(f,{_container:!0})),f==="listUnordered")return e.enter("listItemPrefix"),u===42||u===45?e.check(En,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 fr(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(xn,n.interrupt?r:l,e.attempt(ZA,d,c))}function l(u){return n.containerState.initialBlankLine=!0,a++,d(u)}function c(u){return ie(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)}}},ZA={partial:!0,tokenize:function(e,t,r){const n=this;return fe(e,function(o){const a=n.events[n.events.length-1];return!ie(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):r(o)},"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},$A={partial:!0,tokenize:function(e,t,r){const n=this;return fe(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)}},ba={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,l=n.events.length;for(;l--;)if(n.events[l][1].type!=="lineEnding"&&n.events[l][1].type!=="linePrefix"&&n.events[l][1].type!=="content"){i=n.events[l][1].type==="paragraph";break}return n.parser.lazy[n.now().line]||!n.interrupt&&!i?r(s):(e.enter("setextHeadingLine"),o=s,function(c){return e.enter("setextHeadingLineSequence"),a(c)}(s))};function a(s){return s===o?(e.consume(s),a):(e.exit("setextHeadingLineSequence"),ie(s)?fe(e,A,"lineSuffix")(s):A(s))}function A(s){return s===null||$(s)?(e.exit("setextHeadingLine"),t(s)):r(s)}}},el={tokenize:function(e){const t=this,r=e.attempt(xn,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,fe(e,e.attempt(this.parser.constructs.flow,n,e.attempt(NA,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)}}},tl={resolveAll:wa()},nl=va("string"),rl=va("text");function va(e){return{resolveAll:wa(e==="text"?ol:void 0),tokenize:function(t){const r=this,n=this.parser.constructs[e],o=t.attempt(n,a,A);return a;function a(l){return i(l)?o(l):A(l)}function A(l){if(l!==null)return t.enter("data"),t.consume(l),s;t.consume(l)}function s(l){return i(l)?(t.exit("data"),o(l)):(t.consume(l),s)}function i(l){if(l===null)return!0;const c=n[l];let d=-1;if(c)for(;++d<c.length;){const u=c[d];if(!u.previous||u.previous.call(r,r.previous))return!0}return!1}}}}function wa(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 ol(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 l=o[A];if(typeof l=="string"){for(s=l.length;l.charCodeAt(s-1)===32;)i++,s--;if(s)break;s=-1}else if(l===-2)a=!0,i++;else if(l!==-1){A++;break}}if(i){const l={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={...l.start},n.start.offset===n.end.offset?Object.assign(n,l):(e.splice(r,0,["enter",l,t],["exit",l,t]),r+=2)}r++}return e}const al={42:Ue,43:Ue,45:Ue,48:Ue,49:Ue,50:Ue,51:Ue,52:Ue,53:Ue,54:Ue,55:Ue,56:Ue,57:Ue,62:la},il={91:HA},sl={[-2]:mr,[-1]:mr,32:mr},Al={35:zA,42:En,45:[ba,En],60:jA,61:ba,95:En,96:pa,126:pa},ll={38:ua,92:ca},cl={[-5]:br,[-4]:br,[-3]:br,33:XA,38:ua,42:gr,60:[TA,YA],91:JA,92:[FA,ca],93:yr,95:gr,96:MA},ul={null:[gr,tl]},dl=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:il,disable:{null:[]},document:al,flow:Al,flowInitial:sl,insideSpan:ul,string:ll,text:cl},Symbol.toStringTag,{value:"Module"}));function pl(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:b(function(x,m){h(x,m.from)}),check:b(g),consume:function(x){$(x)?(n.line++,n.column=1,n.offset+=x===-3?2:1,w()):x!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===A[n._index].length&&(n._bufferIndex=-1,n._index++)),l.previous=x},enter:function(x,m){const k=m||{};return k.type=x,k.start=u(),l.events.push(["enter",k,l]),s.push(k),k},exit:function(x){const m=s.pop();return m.end=u(),l.events.push(["exit",m,l]),m},interrupt:b(g,{interrupt:!0})},l={code:null,containerState:{},defineSkip:function(x){o[x.line]=x.column,w()},events:[],now:u,parser:e,previous:null,sliceSerialize:function(x,m){return function(k,P){let C=-1;const S=[];let I;for(;++C<k.length;){const Q=k[C];let B;if(typeof Q=="string")B=Q;else switch(Q){case-5:B="\r";break;case-4:B=`
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 A=We(A,x),function(){let m;for(;n._index<A.length;){const k=A[n._index];if(typeof k=="string")for(m=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===m&&n._bufferIndex<k.length;)f(k.charCodeAt(n._bufferIndex));else f(k)}}(),A[A.length-1]!==null?[]:(h(t,0),l.events=hr(a,l.events,l),l.events)}};let c=t.tokenize.call(l,i);return t.resolveAll&&a.push(t),l;function d(x){return function(m,k){const P=k.start._index,C=k.start._bufferIndex,S=k.end._index,I=k.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:k,column:P,offset:C}=n;return{_bufferIndex:x,_index:m,line:k,column:P,offset:C}}function f(x){c=c(x)}function g(x,m){m.restore()}function b(x,m){return function(k,P,C){let S,I,Q,B;return Array.isArray(k)?O(k):"tokenize"in k?O([k]):function(_){return U;function U(N){const L=N!==null&&_[N],y=N!==null&&_.null;return O([...Array.isArray(L)?L:L?[L]:[],...Array.isArray(y)?y:y?[y]:[]])(N)}}(k);function O(_){return S=_,I=0,_.length===0?C:D(_[I])}function D(_){return function(U){return B=function(){const N=u(),L=l.previous,y=l.currentConstruct,W=l.events.length,v=Array.from(s);return{from:W,restore:V};function V(){n=N,l.previous=L,l.currentConstruct=y,l.events.length=W,s=v,w()}}(),Q=_,_.partial||(l.currentConstruct=_),_.name&&l.parser.constructs.disable.null.includes(_.name)?F():_.tokenize.call(m?Object.assign(Object.create(l),m):l,i,M,F)(U)}}function M(_){return x(Q,B),P}function F(_){return B.restore(),++I<S.length?D(S[I]):C}}}function h(x,m){x.resolveAll&&!a.includes(x)&&a.push(x),x.resolve&&tt(l.events,m,l.events.length-m,x.resolve(l.events.slice(m),l)),x.resolveTo&&(l.events=x.resolveTo(l.events,l))}function w(){n.line in o&&n.column<2&&(n.column=o[n.line],n.offset+=o[n.line]-1)}}const xa=/[\0\t\n\r]/g,fl=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function hl(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const n=r.charCodeAt(1),o=n===120||n===88;return aa(r.slice(o?2:1),o?16:10)}return dr(r)||e}const Ea={}.hasOwnProperty;function gl(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(me),autolinkProtocol:D,autolinkEmail:D,atxHeading:i(Fe),blockQuote:i(ne),characterEscape:D,characterReference:D,codeFenced:i(ae),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:i(ae,l),codeText:i(ue,l),codeTextData:D,data:D,codeFlowValue:D,definition:i(Ae),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:i(Me),hardBreakEscape:i(we),hardBreakTrailing:i(we),htmlFlow:i(at,l),htmlFlowData:D,htmlText:i(at,l),htmlTextData:D,image:i(Ht),label:l,link:i(me),listItem:i(Ut),listItemValue:b,listOrdered:i(An,g),listUnordered:i(An),paragraph:i(Ft),reference:he,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:i(Fe),strong:i(bt),thematicBreak:i(it)},exit:{atxHeading:d(),atxHeadingSequence:I,autolink:d(),autolinkEmail:re,autolinkProtocol:Y,blockQuote:d(),characterEscapeValue:M,characterReferenceMarkerHexadecimal:Ke,characterReferenceMarkerNumeric:Ke,characterReferenceValue:Pe,characterReference:R,codeFenced:d(m),codeFencedFence:x,codeFencedFenceInfo:h,codeFencedFenceMeta:w,codeFlowValue:M,codeIndented:d(k),codeText:d(L),codeTextData:M,data:M,definition:d(),definitionDestinationString:S,definitionLabelString:P,definitionTitleString:C,emphasis:d(),hardBreakEscape:d(_),hardBreakTrailing:d(_),htmlFlow:d(U),htmlFlowData:M,htmlText:d(N),htmlTextData:M,image:d(W),label:V,labelText:v,lineEnding:F,link:d(y),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:se,resourceDestinationString:q,resourceTitleString:G,resource:X,setextHeading:d(O),setextHeadingLineSequence:B,setextHeadingText:Q,strong:d(),thematicBreak:d()}};ka(o,(n||{}).mdastExtensions||[]);const a={};return A;function A(T){let z={type:"root",children:[]};const K={stack:[z],tokenStack:[],config:o,enter:c,exit:u,buffer:l,resume:f,data:a},Z=[];let oe=-1;for(;++oe<T.length;)(T[oe][1].type==="listOrdered"||T[oe][1].type==="listUnordered")&&(T[oe][0]==="enter"?Z.push(oe):oe=s(T,Z.pop(),oe));for(oe=-1;++oe<T.length;){const ce=o[T[oe][0]];Ea.call(ce,T[oe][1].type)&&ce[T[oe][1].type].call(Object.assign({sliceSerialize:T[oe][2].sliceSerialize},K),T[oe][1])}if(K.tokenStack.length>0){const ce=K.tokenStack[K.tokenStack.length-1];(ce[1]||Ca).call(K,void 0,ce[0])}for(z.position={start:mt(T.length>0?T[0][1].start:{line:1,column:1,offset:0}),end:mt(T.length>0?T[T.length-2][1].end:{line:1,column:1,offset:0})},oe=-1;++oe<o.transforms.length;)z=o.transforms[oe](z)||z;return z}function s(T,z,K){let Z,oe,ce,de,be=z-1,ve=-1,xe=!1;for(;++be<=K;){const Ee=T[be];switch(Ee[1].type){case"listUnordered":case"listOrdered":case"blockQuote":Ee[0]==="enter"?ve++:ve--,de=void 0;break;case"lineEndingBlank":Ee[0]==="enter"&&(Z&&!de&&!ve&&!ce&&(ce=be),de=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:de=void 0}if(!ve&&Ee[0]==="enter"&&Ee[1].type==="listItemPrefix"||ve===-1&&Ee[0]==="exit"&&(Ee[1].type==="listUnordered"||Ee[1].type==="listOrdered")){if(Z){let Xe=be;for(oe=void 0;Xe--;){const Be=T[Xe];if(Be[1].type==="lineEnding"||Be[1].type==="lineEndingBlank"){if(Be[0]==="exit")continue;oe&&(T[oe][1].type="lineEndingBlank",xe=!0),Be[1].type="lineEnding",oe=Xe}else if(Be[1].type!=="linePrefix"&&Be[1].type!=="blockQuotePrefix"&&Be[1].type!=="blockQuotePrefixWhitespace"&&Be[1].type!=="blockQuoteMarker"&&Be[1].type!=="listItemIndent")break}ce&&(!oe||ce<oe)&&(Z._spread=!0),Z.end=Object.assign({},oe?T[oe][1].start:Ee[1].end),T.splice(oe||be,0,["exit",Z,Ee[2]]),be++,K++}if(Ee[1].type==="listItemPrefix"){const Xe={type:"listItem",_spread:!1,start:Object.assign({},Ee[1].start),end:void 0};Z=Xe,T.splice(be,0,["enter",Xe,Ee[2]]),be++,K++,ce=void 0,de=!0}}}return T[z][1]._spread=xe,K}function i(T,z){return K;function K(Z){c.call(this,T(Z),Z),z&&z.call(this,Z)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(T,z,K){this.stack[this.stack.length-1].children.push(T),this.stack.push(T),this.tokenStack.push([z,K||void 0]),T.position={start:mt(z.start),end:void 0}}function d(T){return z;function z(K){T&&T.call(this,K),u.call(this,K)}}function u(T,z){const K=this.stack.pop(),Z=this.tokenStack.pop();if(!Z)throw new Error("Cannot close `"+T.type+"` ("+Xt({start:T.start,end:T.end})+"): it’s not open");Z[0].type!==T.type&&(z?z.call(this,T,Z[0]):(Z[1]||Ca).call(this,T,Z[0])),K.position.end=mt(T.end)}function f(){return function(T){return ta(T,typeof wn.includeImageAlt!="boolean"||wn.includeImageAlt,typeof wn.includeHtml!="boolean"||wn.includeHtml)}(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function b(T){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(T),10),this.data.expectingFirstListItemValue=void 0)}function h(){const T=this.resume();this.stack[this.stack.length-1].lang=T}function w(){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 k(){const T=this.resume();this.stack[this.stack.length-1].value=T.replace(/(\r?\n|\r)$/g,"")}function P(T){const z=this.resume(),K=this.stack[this.stack.length-1];K.label=z,K.identifier=Ot(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 z=this.stack[this.stack.length-1];if(!z.depth){const K=this.sliceSerialize(T).length;z.depth=K}}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 z=this.stack[this.stack.length-1].children;let K=z[z.length-1];(!K||K.type!=="text")&&(K=Ve(),K.position={start:mt(T.start),end:void 0},z.push(K)),this.stack.push(K)}function M(T){const z=this.stack.pop();z.value+=this.sliceSerialize(T),z.position.end=mt(T.end)}function F(T){const z=this.stack[this.stack.length-1];if(this.data.atHardBreak)return z.children[z.children.length-1].position.end=mt(T.end),void(this.data.atHardBreak=void 0);!this.data.setextHeadingSlurpLineEnding&&o.canContainEols.includes(z.type)&&(D.call(this,T),M.call(this,T))}function _(){this.data.atHardBreak=!0}function U(){const T=this.resume();this.stack[this.stack.length-1].value=T}function N(){const T=this.resume();this.stack[this.stack.length-1].value=T}function L(){const T=this.resume();this.stack[this.stack.length-1].value=T}function y(){const T=this.stack[this.stack.length-1];if(this.data.inReference){const z=this.data.referenceType||"shortcut";T.type+="Reference",T.referenceType=z,delete T.url,delete T.title}else delete T.identifier,delete T.label;this.data.referenceType=void 0}function W(){const T=this.stack[this.stack.length-1];if(this.data.inReference){const z=this.data.referenceType||"shortcut";T.type+="Reference",T.referenceType=z,delete T.url,delete T.title}else delete T.identifier,delete T.label;this.data.referenceType=void 0}function v(T){const z=this.sliceSerialize(T),K=this.stack[this.stack.length-2];K.label=function(Z){return Z.replace(fl,hl)}(z),K.identifier=Ot(z).toLowerCase()}function V(){const T=this.stack[this.stack.length-1],z=this.resume(),K=this.stack[this.stack.length-1];if(this.data.inReference=!0,K.type==="link"){const Z=T.children;K.children=Z}else K.alt=z}function q(){const T=this.resume();this.stack[this.stack.length-1].url=T}function G(){const T=this.resume();this.stack[this.stack.length-1].title=T}function X(){this.data.inReference=void 0}function he(){this.data.referenceType="collapsed"}function se(T){const z=this.resume(),K=this.stack[this.stack.length-1];K.label=z,K.identifier=Ot(this.sliceSerialize(T)).toLowerCase(),this.data.referenceType="full"}function Ke(T){this.data.characterReferenceType=T.type}function Pe(T){const z=this.sliceSerialize(T),K=this.data.characterReferenceType;let Z;K?(Z=aa(z,K==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Z=dr(z),this.stack[this.stack.length-1].value+=Z}function R(T){this.stack.pop().position.end=mt(T.end)}function Y(T){M.call(this,T),this.stack[this.stack.length-1].url=this.sliceSerialize(T)}function re(T){M.call(this,T),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(T)}function ne(){return{type:"blockquote",children:[]}}function ae(){return{type:"code",lang:null,meta:null,value:""}}function ue(){return{type:"inlineCode",value:""}}function Ae(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Me(){return{type:"emphasis",children:[]}}function Fe(){return{type:"heading",depth:0,children:[]}}function we(){return{type:"break"}}function at(){return{type:"html",value:""}}function Ht(){return{type:"image",title:null,url:"",alt:null}}function me(){return{type:"link",title:null,url:"",children:[]}}function An(T){return{type:"list",ordered:T.type==="listOrdered",start:null,spread:T._spread,children:[]}}function Ut(T){return{type:"listItem",spread:T._spread,checked:null,children:[]}}function Ft(){return{type:"paragraph",children:[]}}function bt(){return{type:"strong",children:[]}}function Ve(){return{type:"text",value:""}}function it(){return{type:"thematicBreak"}}}(r)(function(n){for(;!fa(n););return n}(function(n){const o={constructs:wA([dl,...(n||{}).extensions||[]]),content:a(BA),defined:[],document:a(IA),flow:a(el),lazy:{},string:a(nl),text:a(rl)};return o;function a(A){return function(s){return pl(o,A,s)}}}(r).document().write(function(){let n,o=1,a="",A=!0;return function(s,i,l){const c=[];let d,u,f,g,b;for(s=a+(typeof s=="string"?s.toString():new TextDecoder(i||void 0).decode(s)),f=0,a="",A&&(s.charCodeAt(0)===65279&&f++,A=void 0);f<s.length;){if(xa.lastIndex=f,d=xa.exec(s),g=d&&d.index!==void 0?d.index:s.length,b=s.charCodeAt(g),!d){a=s.slice(f);break}if(b===10&&f===g&&n)c.push(-3),n=void 0;else switch(n&&(c.push(-5),n=void 0),f<g&&(c.push(s.slice(f,g)),o+=g-f),b){case 0:c.push(65533),o++;break;case 9:for(u=4*Math.ceil(o/4),c.push(-2);o++<u;)c.push(-1);break;case 10:c.push(-4),o=1;break;default:n=!0,o=1}f=g+1}return l&&(n&&c.push(-5),a&&c.push(a),c.push(null)),c}}()(e,t,!0))))}function mt(e){return{line:e.line,column:e.column,offset:e.offset}}function ka(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?ka(e,n):ml(e,n)}}function ml(e,t){let r;for(r in t)if(Ea.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 Ca(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Xt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Xt({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Xt({start:t.start,end:t.end})+") is still open")}function yl(e){const t=this;t.parser=function(r){return gl(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Pa(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 Sa(e){return e.spread??e.children.length>1}function bl(e){const t=String(e),r=/\r?\n|\r/g;let n=r.exec(t),o=0;const a=[];for(;n;)a.push(Da(t.slice(o,n.index),o>0,!0),n[0]),o=n.index+n[0].length,n=r.exec(t);return a.push(Da(t.slice(o),o>0,!1)),a.join("")}function Da(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 vl={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=Ot(n.toLowerCase()),i=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=i+1,s+=1,e.footnoteCounts.set(n,s);const a={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,a);const l={type:"element",tagName:"sup",properties:{},children:[a]};return e.patch(t,l),e.applyData(t,l)},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 Pi(e,t);const o={src:Ot(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(o.title=n.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)},image:function(e,t){const r={src:Ot(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 Pi(e,t);const o={href:Ot(n.url||"")};n.title!==null&&n.title!==void 0&&(o.title=n.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)},link:function(e,t){const r={href:Ot(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(c){let u=!1;if(c.type==="list"){u=c.spread||!1;const d=c.children;let p=-1;for(;!u&&++p<d.length;)u=Si(d[p])}return u}(r):Si(t),i={},A=[];if(typeof t.checked=="boolean"){const c=n[0];let u;c&&c.type==="element"&&c.tagName==="p"?u=c:(u={type:"element",tagName:"p",properties:{},children:[]},n.unshift(u)),u.children.length>0&&u.children.unshift({type:"text",value:" "}),u.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let s=-1;for(;++s<n.length;){const c=n[s];(o||s!==0||c.type!=="element"||c.tagName!=="p")&&A.push({type:"text",value:`
26
- `}),c.type!=="element"||c.tagName!=="p"||o?A.push(c):A.push(...c.children)}const a=n[n.length-1];a&&(o||a.type!=="element"||a.tagName!=="p")&&A.push({type:"text",value:`
27
- `});const l={type:"element",tagName:"li",properties:i,children:A};return e.patch(t,l),e.applyData(t,l)},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 i={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(n,!0)};return e.patch(t,i),e.applyData(t,i)},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=ar(t.children[1]),a=Wo(t.children[t.children.length-1]);s&&a&&(A.position={start:s,end:a}),o.push(A)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)},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",i=r&&r.type==="table"?r.align:void 0,A=i?i.length:t.children.length;let s=-1;const a=[];for(;++s<A;){const c=t.children[s],u={},d=i?i[s]:void 0;d&&(u.align=d);let p={type:"element",tagName:o,properties:u,children:[]};c&&(p.children=e.all(c),e.patch(c,p),p=e.applyData(c,p)),a.push(p)}const l={type:"element",tagName:"tr",properties:{},children:e.wrap(a,!0)};return e.patch(t,l),e.applyData(t,l)},text:function(e,t){const r={type:"text",value:yl(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:kn,yaml:kn,definition:kn,footnoteDefinition:kn};function kn(){}const Di=typeof self=="object"?self:globalThis,Ii=e=>((t,r)=>{const n=(i,A)=>(t.set(A,i),i),o=i=>{if(t.has(i))return t.get(i);const[A,s]=r[i];switch(A){case 0:case-1:return n(s,i);case 1:{const a=n([],i);for(const l of s)a.push(o(l));return a}case 2:{const a=n({},i);for(const[l,c]of s)a[o(l)]=o(c);return a}case 3:return n(new Date(s),i);case 4:{const{source:a,flags:l}=s;return n(new RegExp(a,l),i)}case 5:{const a=n(new Map,i);for(const[l,c]of s)a.set(o(l),o(c));return a}case 6:{const a=n(new Set,i);for(const l of s)a.add(o(l));return a}case 7:{const{name:a,message:l}=s;return n(new Di[a](l),i)}case 8:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:a}=new Uint8Array(s);return n(new DataView(a),s)}}return n(new Di[A](s),i)};return o})(new Map,e)(0),_t="",{toString:vl}={},{keys:wl}=Object,en=e=>{const t=typeof e;if(t!=="object"||!e)return[0,t];const r=vl.call(e).slice(8,-1);switch(r){case"Array":return[1,_t];case"Object":return[2,_t];case"Date":return[3,_t];case"RegExp":return[4,_t];case"Map":return[5,_t];case"Set":return[6,_t];case"DataView":return[1,r]}return r.includes("Array")?[1,r]:r.includes("Error")?[7,r]:[2,r]},Cn=([e,t])=>e===0&&(t==="function"||t==="symbol"),Ti=(e,{json:t,lossy:r}={})=>{const n=[];return((o,i,A,s)=>{const a=(c,u)=>{const d=s.push(c)-1;return A.set(u,d),d},l=c=>{if(A.has(c))return A.get(c);let[u,d]=en(c);switch(u){case 0:{let g=c;switch(d){case"bigint":u=8,g=c.toString();break;case"function":case"symbol":if(o)throw new TypeError("unable to serialize "+d);g=null;break;case"undefined":return a([-1],c)}return a([u,g],c)}case 1:{if(d){let h=c;return d==="DataView"?h=new Uint8Array(c.buffer):d==="ArrayBuffer"&&(h=new Uint8Array(c)),a([d,[...h]],c)}const g=[],v=a([u,g],c);for(const h of c)g.push(l(h));return v}case 2:{if(d)switch(d){case"BigInt":return a([d,c.toString()],c);case"Boolean":case"Number":case"String":return a([d,c.valueOf()],c)}if(i&&"toJSON"in c)return l(c.toJSON());const g=[],v=a([u,g],c);for(const h of wl(c))(o||!Cn(en(c[h])))&&g.push([l(h),l(c[h])]);return v}case 3:return a([u,c.toISOString()],c);case 4:{const{source:g,flags:v}=c;return a([u,{source:g,flags:v}],c)}case 5:{const g=[],v=a([u,g],c);for(const[h,w]of c)(o||!Cn(en(h))&&!Cn(en(w)))&&g.push([l(h),l(w)]);return v}case 6:{const g=[],v=a([u,g],c);for(const h of c)(o||!Cn(en(h)))&&g.push(l(h));return v}}const{message:p}=c;return a([u,{name:d,message:p}],c)};return l})(!(t||r),!!t,new Map,n)(e),n},Pn=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Ii(Ti(e,t)):structuredClone(e):(e,t)=>Ii(Ti(e,t));function xl(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 El(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const Qi=function(e){if(e==null)return kl;if(typeof e=="function")return Sn(e);if(typeof e=="object")return Array.isArray(e)?function(t){const r=[];let n=-1;for(;++n<t.length;)r[n]=Qi(t[n]);return Sn(o);function o(...i){let A=-1;for(;++A<r.length;)if(r[A].apply(this,i))return!0;return!1}}(e):function(t){const r=t;return Sn(n);function n(o){const i=o;let A;for(A in t)if(i[A]!==r[A])return!1;return!0}}(e);if(typeof e=="string")return function(t){return Sn(r);function r(n){return n&&n.type===t}}(e);throw new Error("Expected function, string, or object as test")};function Sn(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 kl(){return!0}const Mi=[],Cl=!0,Oi=!1;function Pl(e,t,r,n){let o;typeof t=="function"&&typeof r!="function"?(n=r,r=t):o=t;const i=Qi(o),A=n?-1:1;(function s(a,l,c){const u=a&&typeof a=="object"?a:{};if(typeof u.type=="string"){const p=typeof u.tagName=="string"?u.tagName:typeof u.name=="string"?u.name:void 0;Object.defineProperty(d,"name",{value:"node ("+a.type+(p?"<"+p+">":"")+")"})}return d;function d(){let p,g,v,h=Mi;if((!t||i(a,l,c[c.length-1]||void 0))&&(h=function(w){return Array.isArray(w)?w:typeof w=="number"?[Cl,w]:w==null?Mi:[w]}(r(a,c)),h[0]===Oi))return h;if("children"in a&&a.children){const w=a;if(w.children&&h[0]!=="skip")for(g=(n?w.children.length:-1)+A,v=c.concat(w);g>-1&&g<w.children.length;){const x=w.children[g];if(p=s(x,g,v)(),p[0]===Oi)return p;g=typeof p[1]=="number"?p[1]:g+A}}return h}})(e,void 0,[])()}function _i(e,t,r,n){let o,i,A;typeof t=="function"?(i=void 0,A=t,o=r):(i=t,A=r,o=n),Pl(e,i,function(s,a){const l=a[a.length-1],c=l?l.children.indexOf(s):void 0;return A(s,c,l)},o)}const vr={}.hasOwnProperty,Sl={};function Bl(e,t){const r=t||Sl,n=new Map,o=new Map,i=new Map,A={...bl,...r.handlers},s={all:function(a){const l=[];if("children"in a){const c=a.children;let u=-1;for(;++u<c.length;){const d=s.one(c[u],a);if(d){if(u&&c[u-1].type==="break"&&(!Array.isArray(d)&&d.type==="text"&&(d.value=Ni(d.value)),!Array.isArray(d)&&d.type==="element")){const p=d.children[0];p&&p.type==="text"&&(p.value=Ni(p.value))}Array.isArray(d)?l.push(...d):l.push(d)}}}return l},applyData:Il,definitionById:n,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:A,one:function(a,l){const c=a.type,u=s.handlers[c];if(vr.call(s.handlers,c)&&u)return u(s,a,l);if(s.options.passThrough&&s.options.passThrough.includes(c)){if("children"in a){const{children:d,...p}=a,g=Pn(p);return g.children=s.all(a),g}return Pn(a)}return(s.options.unknownHandler||Tl)(s,a,l)},options:r,patch:Dl,wrap:Ql};return _i(e,function(a){if(a.type==="definition"||a.type==="footnoteDefinition"){const l=a.type==="definition"?n:o,c=String(a.identifier).toUpperCase();l.has(c)||l.set(c,a)}}),s}function Dl(e,t){e.position&&(t.position=function(r){const n=ar(r),o=Wo(r);if(n&&o)return{start:n,end:o}}(e))}function Il(e,t){let r=t;if(e&&e.data){const n=e.data.hName,o=e.data.hChildren,i=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"&&i&&Object.assign(r.properties,Pn(i)),"children"in r&&r.children&&o!=null&&(r.children=o)}return r}function Tl(e,t){const r=t.data||{},n=!("value"in t)||vr.call(r,"hProperties")||vr.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 Ql(e,t){const r=[];let n=-1;for(t&&r.push({type:"text",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=_t(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 l={type:"element",tagName:"sup",properties:{},children:[i]};return e.patch(t,l),e.applyData(t,l)},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 Pa(e,t);const o={src:_t(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:_t(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 Pa(e,t);const o={href:_t(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:_t(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(c){let d=!1;if(c.type==="list"){d=c.spread||!1;const u=c.children;let f=-1;for(;!d&&++f<u.length;)d=Sa(u[f])}return d}(r):Sa(t),a={},A=[];if(typeof t.checked=="boolean"){const c=n[0];let d;c&&c.type==="element"&&c.tagName==="p"?d=c:(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 c=n[s];(o||s!==0||c.type!=="element"||c.tagName!=="p")&&A.push({type:"text",value:`
26
+ `}),c.type!=="element"||c.tagName!=="p"||o?A.push(c):A.push(...c.children)}const i=n[n.length-1];i&&(o||i.type!=="element"||i.tagName!=="p")&&A.push({type:"text",value:`
27
+ `});const l={type:"element",tagName:"li",properties:a,children:A};return e.patch(t,l),e.applyData(t,l)},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=ir(t.children[1]),i=Wo(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 c=t.children[s],d={},u=a?a[s]:void 0;u&&(d.align=u);let f={type:"element",tagName:o,properties:d,children:[]};c&&(f.children=e.all(c),e.patch(c,f),f=e.applyData(c,f)),i.push(f)}const l={type:"element",tagName:"tr",properties:{},children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)},text:function(e,t){const r={type:"text",value:bl(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:kn,yaml:kn,definition:kn,footnoteDefinition:kn};function kn(){}const Ba=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 l of s)i.push(o(l));return i}case 2:{const i=n({},a);for(const[l,c]of s)i[o(l)]=o(c);return i}case 3:return n(new Date(s),a);case 4:{const{source:i,flags:l}=s;return n(new RegExp(i,l),a)}case 5:{const i=n(new Map,a);for(const[l,c]of s)i.set(o(l),o(c));return i}case 6:{const i=n(new Set,a);for(const l of s)i.add(o(l));return i}case 7:{const{name:i,message:l}=s;return n(new Ba[i](l),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 Ba[A](s),a)};return o})(new Map,e)(0),Nt="",{toString:wl}={},{keys:xl}=Object,en=e=>{const t=typeof e;if(t!=="object"||!e)return[0,t];const r=wl.call(e).slice(8,-1);switch(r){case"Array":return[1,Nt];case"Object":return[2,Nt];case"Date":return[3,Nt];case"RegExp":return[4,Nt];case"Map":return[5,Nt];case"Set":return[6,Nt];case"DataView":return[1,r]}return r.includes("Array")?[1,r]:r.includes("Error")?[7,r]:[2,r]},Cn=([e,t])=>e===0&&(t==="function"||t==="symbol"),Ta=(e,{json:t,lossy:r}={})=>{const n=[];return((o,a,A,s)=>{const i=(c,d)=>{const u=s.push(c)-1;return A.set(d,u),u},l=c=>{if(A.has(c))return A.get(c);let[d,u]=en(c);switch(d){case 0:{let g=c;switch(u){case"bigint":d=8,g=c.toString();break;case"function":case"symbol":if(o)throw new TypeError("unable to serialize "+u);g=null;break;case"undefined":return i([-1],c)}return i([d,g],c)}case 1:{if(u){let h=c;return u==="DataView"?h=new Uint8Array(c.buffer):u==="ArrayBuffer"&&(h=new Uint8Array(c)),i([u,[...h]],c)}const g=[],b=i([d,g],c);for(const h of c)g.push(l(h));return b}case 2:{if(u)switch(u){case"BigInt":return i([u,c.toString()],c);case"Boolean":case"Number":case"String":return i([u,c.valueOf()],c)}if(a&&"toJSON"in c)return l(c.toJSON());const g=[],b=i([d,g],c);for(const h of xl(c))(o||!Cn(en(c[h])))&&g.push([l(h),l(c[h])]);return b}case 3:return i([d,c.toISOString()],c);case 4:{const{source:g,flags:b}=c;return i([d,{source:g,flags:b}],c)}case 5:{const g=[],b=i([d,g],c);for(const[h,w]of c)(o||!Cn(en(h))&&!Cn(en(w)))&&g.push([l(h),l(w)]);return b}case 6:{const g=[],b=i([d,g],c);for(const h of c)(o||!Cn(en(h)))&&g.push(l(h));return b}}const{message:f}=c;return i([d,{name:u,message:f}],c)};return l})(!(t||r),!!t,new Map,n)(e),n},Pn=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Ia(Ta(e,t)):structuredClone(e):(e,t)=>Ia(Ta(e,t));function El(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 kl(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const Qa=function(e){if(e==null)return Cl;if(typeof e=="function")return Sn(e);if(typeof e=="object")return Array.isArray(e)?function(t){const r=[];let n=-1;for(;++n<t.length;)r[n]=Qa(t[n]);return Sn(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 Sn(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 Sn(r);function r(n){return n&&n.type===t}}(e);throw new Error("Expected function, string, or object as test")};function Sn(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 Cl(){return!0}const Ma=[],Pl=!0,Oa=!1;function Sl(e,t,r,n){let o;typeof t=="function"&&typeof r!="function"?(n=r,r=t):o=t;const a=Qa(o),A=n?-1:1;(function s(i,l,c){const d=i&&typeof i=="object"?i:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(u,"name",{value:"node ("+i.type+(f?"<"+f+">":"")+")"})}return u;function u(){let f,g,b,h=Ma;if((!t||a(i,l,c[c.length-1]||void 0))&&(h=function(w){return Array.isArray(w)?w:typeof w=="number"?[Pl,w]:w==null?Ma:[w]}(r(i,c)),h[0]===Oa))return h;if("children"in i&&i.children){const w=i;if(w.children&&h[0]!=="skip")for(g=(n?w.children.length:-1)+A,b=c.concat(w);g>-1&&g<w.children.length;){const x=w.children[g];if(f=s(x,g,b)(),f[0]===Oa)return f;g=typeof f[1]=="number"?f[1]:g+A}}return h}})(e,void 0,[])()}function _a(e,t,r,n){let o,a,A;typeof t=="function"?(a=void 0,A=t,o=r):(a=t,A=r,o=n),Sl(e,a,function(s,i){const l=i[i.length-1],c=l?l.children.indexOf(s):void 0;return A(s,c,l)},o)}const vr={}.hasOwnProperty,Dl={};function Bl(e,t){const r=t||Dl,n=new Map,o=new Map,a=new Map,A={...vl,...r.handlers},s={all:function(i){const l=[];if("children"in i){const c=i.children;let d=-1;for(;++d<c.length;){const u=s.one(c[d],i);if(u){if(d&&c[d-1].type==="break"&&(!Array.isArray(u)&&u.type==="text"&&(u.value=Na(u.value)),!Array.isArray(u)&&u.type==="element")){const f=u.children[0];f&&f.type==="text"&&(f.value=Na(f.value))}Array.isArray(u)?l.push(...u):l.push(u)}}}return l},applyData:Tl,definitionById:n,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:A,one:function(i,l){const c=i.type,d=s.handlers[c];if(vr.call(s.handlers,c)&&d)return d(s,i,l);if(s.options.passThrough&&s.options.passThrough.includes(c)){if("children"in i){const{children:u,...f}=i,g=Pn(f);return g.children=s.all(i),g}return Pn(i)}return(s.options.unknownHandler||Ql)(s,i,l)},options:r,patch:Il,wrap:Ml};return _a(e,function(i){if(i.type==="definition"||i.type==="footnoteDefinition"){const l=i.type==="definition"?n:o,c=String(i.identifier).toUpperCase();l.has(c)||l.set(c,i)}}),s}function Il(e,t){e.position&&(t.position=function(r){const n=ir(r),o=Wo(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,Pn(a)),"children"in r&&r.children&&o!=null&&(r.children=o)}return r}function Ql(e,t){const r=t.data||{},n=!("value"in t)||vr.call(r,"hProperties")||vr.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 Ml(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 Ni(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function Li(e,t){const r=Bl(e,t),n=r.one(e,void 0),o=function(A){const s=typeof A.options.clobberPrefix=="string"?A.options.clobberPrefix:"user-content-",a=A.options.footnoteBackContent||xl,l=A.options.footnoteBackLabel||El,c=A.options.footnoteLabel||"Footnotes",u=A.options.footnoteLabelTagName||"h2",d=A.options.footnoteLabelProperties||{className:["sr-only"]},p=[];let g=-1;for(;++g<A.footnoteOrder.length;){const v=A.footnoteById.get(A.footnoteOrder[g]);if(!v)continue;const h=A.all(v),w=String(v.identifier).toUpperCase(),x=Ot(w.toLowerCase());let m=0;const k=[],P=A.footnoteCounts.get(w);for(;P!==void 0&&++m<=P;){k.length>0&&k.push({type:"text",value:" "});let I=typeof a=="string"?a:a(g,m);typeof I=="string"&&(I={type:"text",value:I}),k.push({type:"element",tagName:"a",properties:{href:"#"+s+"fnref-"+x+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof l=="string"?l:l(g,m),className:["data-footnote-backref"]},children:Array.isArray(I)?I:[I]})}const C=h[h.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(...k)}else h.push(...k);const S={type:"element",tagName:"li",properties:{id:s+"fn-"+x},children:A.wrap(h,!0)};A.patch(v,S),p.push(S)}if(p.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...Pn(d),id:"footnote-label"},children:[{type:"text",value:c}]},{type:"text",value:`
31
- `},{type:"element",tagName:"ol",properties:{},children:A.wrap(p,!0)},{type:"text",value:`
32
- `}]}}(r),i=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return o&&i.children.push({type:"text",value:`
33
- `},o),i}function Ml(e,t){return e&&"run"in e?async function(r,n){const o=Li(r,{file:n,...t});await e.run(o,n)}:function(r,n){return Li(r,{file:n,...e||t})}}function Hi(e){if(e)throw e}var wr,Ui,Ol=function(){if(Ui)return wr;Ui=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,o=function(a){return typeof Array.isArray=="function"?Array.isArray(a):t.call(a)==="[object Array]"},i=function(a){if(!a||t.call(a)!=="[object Object]")return!1;var l,c=e.call(a,"constructor"),u=a.constructor&&a.constructor.prototype&&e.call(a.constructor.prototype,"isPrototypeOf");if(a.constructor&&!c&&!u)return!1;for(l in a);return typeof l>"u"||e.call(a,l)},A=function(a,l){r&&l.name==="__proto__"?r(a,l.name,{enumerable:!0,configurable:!0,value:l.newValue,writable:!0}):a[l.name]=l.newValue},s=function(a,l){if(l==="__proto__"){if(!e.call(a,l))return;if(n)return n(a,l).value}return a[l]};return wr=function a(){var l,c,u,d,p,g,v=arguments[0],h=1,w=arguments.length,x=!1;for(typeof v=="boolean"&&(x=v,v=arguments[1]||{},h=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});h<w;++h)if((l=arguments[h])!=null)for(c in l)u=s(v,c),v!==(d=s(l,c))&&(x&&d&&(i(d)||(p=o(d)))?(p?(p=!1,g=u&&o(u)?u:[]):g=u&&i(u)?u:{},A(v,{name:c,newValue:a(x,g,d)})):typeof d<"u"&&A(v,{name:c,newValue:d}));return v},wr}();const xr=jo(Ol);function Er(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 _l(){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 i(A,...s){const a=e[++n];let l=-1;if(A)o(A);else{for(;++l<r.length;)(s[l]===null||s[l]===void 0)&&(s[l]=r[l]);r=s,a?function(c,u){let d;return p;function p(...h){const w=c.length>h.length;let x;w&&h.push(g);try{x=c.apply(this,h)}catch(m){if(w&&d)throw m;return g(m)}w||(x&&x.then&&typeof x.then=="function"?x.then(v,g):x instanceof Error?g(x):v(x))}function g(h,...w){d||(d=!0,u(h,...w))}function v(h){g(null,h)}}(a,i)(...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 rt={basename:function(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');tn(e);let r,n=0,o=-1,i=e.length;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(r){n=i+1;break}}else o<0&&(r=!0,o=i+1);return o<0?"":e.slice(n,o)}if(t===e)return"";let A=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(r){n=i+1;break}}else A<0&&(r=!0,A=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(o=i):(s=-1,o=A));return n===o?o=A:o<0&&(o=e.length),e.slice(n,o)},dirname:function(e){if(tn(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){tn(e);let t,r=e.length,n=-1,o=0,i=-1,A=0;for(;r--;){const s=e.codePointAt(r);if(s!==47)n<0&&(t=!0,n=r+1),s===46?i<0?i=r:A!==1&&(A=1):i>-1&&(A=-1);else if(t){o=r+1;break}}return i<0||n<0||A===0||A===1&&i===n-1&&i===o+1?"":e.slice(i,n)},join:function(...e){let t,r=-1;for(;++r<e.length;)tn(e[r]),e[r]&&(t=t===void 0?e[r]:t+"/"+e[r]);return t===void 0?".":function(n){tn(n);const o=n.codePointAt(0)===47;let i=function(A,s){let a,l,c="",u=0,d=-1,p=0,g=-1;for(;++g<=A.length;){if(g<A.length)a=A.codePointAt(g);else{if(a===47)break;a=47}if(a===47){if(d!==g-1&&p!==1)if(d!==g-1&&p===2){if(c.length<2||u!==2||c.codePointAt(c.length-1)!==46||c.codePointAt(c.length-2)!==46){if(c.length>2){if(l=c.lastIndexOf("/"),l!==c.length-1){l<0?(c="",u=0):(c=c.slice(0,l),u=c.length-1-c.lastIndexOf("/")),d=g,p=0;continue}}else if(c.length>0){c="",u=0,d=g,p=0;continue}}s&&(c=c.length>0?c+"/..":"..",u=2)}else c.length>0?c+="/"+A.slice(d+1,g):c=A.slice(d+1,g),u=g-d-1;d=g,p=0}else a===46&&p>-1?p++:p=-1}return c}(n,!o);return i.length===0&&!o&&(i="."),i.length>0&&n.codePointAt(n.length-1)===47&&(i+="/"),o?"/"+i:i}(t)},sep:"/"};function tn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Nl={cwd:function(){return"/"}};function kr(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Ll(e){if(typeof e=="string")e=new URL(e);else if(!kr(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 i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(r)}(e)}const Cr=["history","path","basename","stem","extname","dirname"];class Fi{constructor(t){let r;var n;r=t?kr(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?"":Nl.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o,i=-1;for(;++i<Cr.length;){const A=Cr[i];A in r&&r[A]!==void 0&&r[A]!==null&&(this[A]=A==="history"?[...r[A]]:r[A])}for(o in r)Cr.includes(o)||(this[o]=r[o])}get basename(){return typeof this.path=="string"?rt.basename(this.path):void 0}set basename(t){Sr(t,"basename"),Pr(t,"basename"),this.path=rt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?rt.dirname(this.path):void 0}set dirname(t){zi(this.basename,"dirname"),this.path=rt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?rt.extname(this.path):void 0}set extname(t){if(Pr(t,"extname"),zi(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=rt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){kr(t)&&(t=Ll(t)),Sr(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?rt.basename(this.path,this.extname):void 0}set stem(t){Sr(t,"stem"),Pr(t,"stem"),this.path=rt.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 Oe(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 Pr(e,t){if(e&&e.includes(rt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+rt.sep+"`")}function Sr(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function zi(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const Hl=function(e){const t=this.constructor.prototype,r=t[e],n=function(){return r.apply(n,arguments)};return Object.setPrototypeOf(n,t),n},Ul={}.hasOwnProperty;class Br extends Hl{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=_l()}copy(){const t=new Br;let r=-1;for(;++r<this.attachers.length;){const n=this.attachers[r];t.use(...n)}return t.data(xr(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(Tr("data",this.frozen),this.namespace[t]=r,this):Ul.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Tr("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=Bn(t),n=this.parser||this.Parser;return Dr("parse",n),n(String(r),r)}process(t,r){const n=this;return this.freeze(),Dr("process",this.parser||this.Parser),Ir("process",this.compiler||this.Compiler),r?o(void 0,r):new Promise(o);function o(i,A){const s=Bn(t),a=n.parse(s);function l(c,u){c||!u?A(c):i?i(u):r(void 0,u)}n.run(a,s,function(c,u,d){if(c||!u||!d)return l(c);const p=u,g=n.stringify(p,d);var v;typeof(v=g)=="string"||function(h){return!!(h&&typeof h=="object"&&"byteLength"in h&&"byteOffset"in h)}(v)?d.value=g:d.result=g,l(c,d)})}}processSync(t){let r,n=!1;return this.freeze(),Dr("processSync",this.parser||this.Parser),Ir("processSync",this.compiler||this.Compiler),this.process(t,function(o,i){n=!0,Hi(o),r=i}),ji("processSync","process",n),r}run(t,r,n){Ri(t),this.freeze();const o=this.transformers;return!n&&typeof r=="function"&&(n=r,r=void 0),n?i(void 0,n):new Promise(i);function i(A,s){const a=Bn(r);o.run(t,a,function(l,c,u){const d=c||t;l?s(l):A?A(d):n(void 0,d,u)})}}runSync(t,r){let n,o=!1;return this.run(t,r,function(i,A){Hi(i),n=A,o=!0}),ji("runSync","run",o),n}stringify(t,r){this.freeze();const n=Bn(r),o=this.compiler||this.Compiler;return Ir("stringify",o),Ri(t),o(t,n)}use(t,...r){const n=this.attachers,o=this.namespace;if(Tr("use",this.frozen),t!=null)if(typeof t=="function")a(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 i(l){if(typeof l=="function")a(l,[]);else{if(typeof l!="object")throw new TypeError("Expected usable value, not `"+l+"`");if(Array.isArray(l)){const[c,...u]=l;a(c,u)}else A(l)}}function A(l){if(!("plugins"in l)&&!("settings"in l))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(l.plugins),l.settings&&(o.settings=xr(!0,o.settings,l.settings))}function s(l){let c=-1;if(l!=null){if(!Array.isArray(l))throw new TypeError("Expected a list of plugins, not `"+l+"`");for(;++c<l.length;)i(l[c])}}function a(l,c){let u=-1,d=-1;for(;++u<n.length;)if(n[u][0]===l){d=u;break}if(d===-1)n.push([l,...c]);else if(c.length>0){let[p,...g]=c;const v=n[d][1];Er(v)&&Er(p)&&(p=xr(!0,v,p)),n[d]=[l,p,...g]}}}}const Fl=new Br().freeze();function Dr(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ir(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Tr(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 Ri(e){if(!Er(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ji(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Bn(e){return function(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}(e)?e:new Fi(e)}const qi=[],Gi={allowDangerousHtml:!0},zl=/^(https?|ircs?|mailto|xmpp)$/i,Rl=[{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 jl(e){const t=e.allowedElements,r=e.allowElement,n=e.children||"",o=e.className,i=e.components,A=e.disallowedElements,s=e.rehypePlugins||qi,a=e.remarkPlugins||qi,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Gi}:Gi,c=e.skipHtml,u=e.unwrapDisallowed,d=e.urlTransform||ql,p=Fl().use(ml).use(a).use(Ml,l).use(s),g=new Fi;typeof n=="string"&&(g.value=n);for(const w of Rl)Object.hasOwn(e,w.from)&&(w.from,w.to&&w.to,w.id);const v=p.parse(g);let h=p.runSync(v,g);return o&&(h={type:"element",tagName:"div",properties:{className:o},children:h.type==="root"?h.children:[h]}),_i(h,function(w,x,m){if(w.type==="raw"&&m&&typeof x=="number")return c?m.children.splice(x,1):m.children[x]={type:"text",value:w.value},x;if(w.type==="element"){let k;for(k in ur)if(Object.hasOwn(ur,k)&&Object.hasOwn(w.properties,k)){const P=w.properties[k],C=ur[k];(C===null||C.includes(w.tagName))&&(w.properties[k]=d(String(P||""),k,w))}}if(w.type==="element"){let k=t?!t.includes(w.tagName):!!A&&A.includes(w.tagName);if(!k&&r&&typeof x=="number"&&(k=!r(w,x,m)),k&&m&&typeof x=="number")return u&&w.children?m.children.splice(x,1,...w.children):m.children.splice(x,1),x}}),hA(h,{Fragment:E.Fragment,components:i,ignoreInvalidStyle:!0,jsx:E.jsx,jsxs:E.jsxs,passKeys:!0,passNode:!0})}function ql(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||zl.test(e.slice(0,t))?e:""}const Gl=({children:e})=>E.jsx("div",{style:{whiteSpace:"normal"},children:E.jsx(jl,{components:{p:({...t})=>E.jsx("p",{style:{margin:0,marginBottom:"0.5em",lineHeight:1.4,textAlign:"left"},children:t.children}),ul:({...t})=>E.jsx("ul",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:t.children}),ol:({...t})=>E.jsx("ol",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:t.children}),li:({...t})=>E.jsx("li",{style:{marginBottom:"1px",lineHeight:1.4},children:t.children}),code:({inline:t,children:r})=>t?E.jsx("code",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"2px 4px",borderRadius:"4px",fontFamily:"inherit",fontSize:"0.95em"},children:r}):E.jsx("pre",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"8px",borderRadius:"4px",overflowX:"auto",margin:"0.5em 0",whiteSpace:"pre-wrap"},children:E.jsx("code",{children:r})}),blockquote:({...t})=>E.jsx("blockquote",{style:{margin:0,paddingLeft:"10px",borderLeft:"2px solid #ccc",color:"#666",fontStyle:"italic"},children:t.children})},children:typeof e=="string"?e:""})}),Yl={autoConfig:!0},Wl=e=>()=>(t=>{const{getFlow:r}=bn(),{messages:n,replaceMessages:o}=Kt(),{settings:i}=xo(),{hasChatHistoryLoaded:A}=ko(),s={...t,...Yl},a=s.markdownComponent?s.markdownComponent:Gl;f.useEffect(()=>{var u,d;if(A){const p=[...n];for(let g=0;g<p.length&&g<(((u=i.chatHistory)==null?void 0:u.maxEntries)??30);g++){const v=p[g];(d=v.tags)!=null&&d.includes("rcb-markdown-renderer-plugin:parsed")&&(v.contentWrapper=a)}o(p)}},[A]);const l=async u=>{var d;const p=(d=u.data.message)==null?void 0:d.sender.toUpperCase();((g,v,h)=>{var w;if(typeof g.data.message.content!="string"||!g.detail.currPath)return!1;const x=v[g.detail.currPath];return!!x&&(((w=x.renderMarkdown)==null?void 0:w.map(m=>m.toUpperCase()).includes(h))??!1)})(u,r(),p)&&(u.data.message.contentWrapper=a,u.data.message.tags||(u.data.message.tags=[]),u.data.message.tags.push("rcb-markdown-renderer-plugin:parsed"))};Ge(q.PRE_INJECT_MESSAGE,l),Ge(q.CHUNK_STREAM_MESSAGE,l),Ge(q.START_STREAM_MESSAGE,l),Ge(q.START_SIMULATE_STREAM_MESSAGE,l);const c={name:"@rcb-plugins/markdown-renderer"};return s!=null&&s.autoConfig&&(c.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0}}),c})(e),Dn={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"}},Yi=(e,t,r="validateTextInput")=>{var n;if((n=e.detail)==null||!n.currPath)return;const o=t[e.detail.currPath];if(!o)return;const i=o[r];return typeof i=="function"?i:void 0},Kl=e=>{const{showToast:t}=(()=>{const{showToast:u,dismissToast:d,toasts:p,replaceToasts:g}=Bt();return{showToast:u,dismissToast:d,toasts:p,replaceToasts:g}})(),{getFlow:r}=bn(),{styles:n,updateStyles:o,replaceStyles:i}=(()=>{const{styles:u,replaceStyles:d,updateStyles:p}=yo();return{styles:u,replaceStyles:d,updateStyles:p}})(),A=(u=>({...Dn,...u,promptBaseColors:{...Dn.promptBaseColors},promptHoveredColors:{...Dn.promptHoveredColors},textAreaHighlightColors:{...Dn.textAreaHighlightColors}}))(e),[s,a]=f.useState(0),l=f.useRef({});Ge(q.USER_SUBMIT_TEXT,u=>{const d=u,p=Yi(d,r(),"validateTextInput");if(!p)return;const g=p(d.data.inputText);if(g!=null&&g.success||u.preventDefault(),!g.promptContent)return;s===0&&(l.current=structuredClone(n));const v=((h,w)=>{const x=h.promptType??"info";let m={};return w.advancedStyles&&(m=w.advancedStyles[x]),w.promptBaseColors&&(m.toastPromptStyle={color:w.promptBaseColors[x],borderColor:w.promptBaseColors[x]}),w.promptHoveredColors&&(m.toastPromptHoveredStyle={color:w.promptHoveredColors[x],borderColor:w.promptHoveredColors[x]}),w.textAreaHighlightColors&&(h.highlightTextArea??!0)&&(m.chatInputAreaStyle={boxShadow:`${w.textAreaHighlightColors[x]} 0px 0px 5px`}),m})(g,A);o(v),t(g.promptContent,g.promptDuration??3e3),a(h=>h+1)}),Ge(q.USER_UPLOAD_FILE,u=>{var d,p;const g=u,v=(p=(d=g.data)==null?void 0:d.files)==null?void 0:p[0];if(!v)return console.error("No file uploaded."),void u.preventDefault();const h=Yi(g,r(),"validateFileInput");if(!h)return void console.error("Validator not found for file input.");const w=h(v);if(!w.success)return console.error("Validation failed:",w),w.promptContent&&t(w.promptContent,w.promptDuration??3e3),void u.preventDefault();console.log("Validation successful:",w)}),Ge(q.DISMISS_TOAST,()=>{a(u=>u-1)}),f.useEffect(()=>{s===0&&setTimeout(()=>{i(l.current)})},[s,i]);const c={name:"@rcb-plugins/input-validator"};return A.autoConfig&&(c.settings={event:{rcbUserSubmitText:!0,rcbUserUploadFile:!0,rcbDismissToast:!0}}),c},Wi=f.forwardRef((e,t)=>{let{embedded:r,currentOpen:n,enabled:o,onSetEnabled:i}=e;const A=Kt(),s=(()=>{const{isChatWindowOpen:c,toggleChatWindow:u,toggleIsBotTyping:d,scrollToBottom:p,getIsChatBotVisible:g}=ze();return{isChatWindowOpen:c,toggleChatWindow:u,toggleIsBotTyping:d,scrollToBottom:p,getIsChatBotVisible:g}})(),a=f.useRef(!1),l=f.useRef(!1);return f.useEffect(()=>{!r&&s&&s.toggleChatWindow&&(a.current===n||l.current||(setTimeout(()=>{s&&s.toggleChatWindow&&s.toggleChatWindow(n)},0),a.current=n!=null&&n),l.current=!1)},[n,r,s]),f.useEffect(()=>{const c=()=>{l.current=!0};return window.addEventListener("rcb-toggle-chat-window",c),()=>window.removeEventListener("rcb-toggle-chat-window",c)}),f.useImperativeHandle(t,()=>({addMessage:c=>{A&&A.injectMessage&&A.injectMessage(c)},openChat:()=>{!r&&s&&s.toggleChatWindow&&s.toggleChatWindow(!0)},closeChat:()=>{!r&&s&&s.toggleChatWindow&&s.toggleChatWindow(!1)},toggleChat:()=>{!r&&s&&s.toggleChatWindow&&s.toggleChatWindow()},setBotEnabled:c=>{i&&i(c)}}),[A,s,r,i]),null});Wi.displayName="BotController";const Ki=f.createContext(null),Vl=e=>{let{trackEvent:t,children:r}=e;const n=f.useRef(t);return n.current=t,f.createElement(Ki.Provider,{value:{trackEvent:o=>n.current(o)}},r)},Vi=()=>f.useContext(Ki)||{trackEvent:()=>{}},Xi=e=>{let{loginUrl:t,className:r="",style:n,isHeaderButton:o=!1}=e;const{trackEvent:i}=Vi(),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 f.createElement(f.Fragment,null,o&&f.createElement("style",null,`
30
+ `}),r}function Na(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function La(e,t){const r=Bl(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||El,l=A.options.footnoteBackLabel||kl,c=A.options.footnoteLabel||"Footnotes",d=A.options.footnoteLabelTagName||"h2",u=A.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let g=-1;for(;++g<A.footnoteOrder.length;){const b=A.footnoteById.get(A.footnoteOrder[g]);if(!b)continue;const h=A.all(b),w=String(b.identifier).toUpperCase(),x=_t(w.toLowerCase());let m=0;const k=[],P=A.footnoteCounts.get(w);for(;P!==void 0&&++m<=P;){k.length>0&&k.push({type:"text",value:" "});let I=typeof i=="string"?i:i(g,m);typeof I=="string"&&(I={type:"text",value:I}),k.push({type:"element",tagName:"a",properties:{href:"#"+s+"fnref-"+x+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof l=="string"?l:l(g,m),className:["data-footnote-backref"]},children:Array.isArray(I)?I:[I]})}const C=h[h.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(...k)}else h.push(...k);const S={type:"element",tagName:"li",properties:{id:s+"fn-"+x},children:A.wrap(h,!0)};A.patch(b,S),f.push(S)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:d,properties:{...Pn(u),id:"footnote-label"},children:[{type:"text",value:c}]},{type:"text",value:`
31
+ `},{type:"element",tagName:"ol",properties:{},children:A.wrap(f,!0)},{type:"text",value:`
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 Ol(e,t){return e&&"run"in e?async function(r,n){const o=La(r,{file:n,...t});await e.run(o,n)}:function(r,n){return La(r,{file:n,...e||t})}}function Ha(e){if(e)throw e}var wr,Ua,_l=function(){if(Ua)return wr;Ua=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 l,c=e.call(i,"constructor"),d=i.constructor&&i.constructor.prototype&&e.call(i.constructor.prototype,"isPrototypeOf");if(i.constructor&&!c&&!d)return!1;for(l in i);return typeof l>"u"||e.call(i,l)},A=function(i,l){r&&l.name==="__proto__"?r(i,l.name,{enumerable:!0,configurable:!0,value:l.newValue,writable:!0}):i[l.name]=l.newValue},s=function(i,l){if(l==="__proto__"){if(!e.call(i,l))return;if(n)return n(i,l).value}return i[l]};return wr=function i(){var l,c,d,u,f,g,b=arguments[0],h=1,w=arguments.length,x=!1;for(typeof b=="boolean"&&(x=b,b=arguments[1]||{},h=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});h<w;++h)if((l=arguments[h])!=null)for(c in l)d=s(b,c),b!==(u=s(l,c))&&(x&&u&&(a(u)||(f=o(u)))?(f?(f=!1,g=d&&o(d)?d:[]):g=d&&a(d)?d:{},A(b,{name:c,newValue:i(x,g,u)})):typeof u<"u"&&A(b,{name:c,newValue:u}));return b},wr}();const xr=jo(_l);function Er(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 Nl(){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 l=-1;if(A)o(A);else{for(;++l<r.length;)(s[l]===null||s[l]===void 0)&&(s[l]=r[l]);r=s,i?function(c,d){let u;return f;function f(...h){const w=c.length>h.length;let x;w&&h.push(g);try{x=c.apply(this,h)}catch(m){if(w&&u)throw m;return g(m)}w||(x&&x.then&&typeof x.then=="function"?x.then(b,g):x instanceof Error?g(x):b(x))}function g(h,...w){u||(u=!0,d(h,...w))}function b(h){g(null,h)}}(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 rt={basename:function(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');tn(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(tn(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){tn(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;)tn(e[r]),e[r]&&(t=t===void 0?e[r]:t+"/"+e[r]);return t===void 0?".":function(n){tn(n);const o=n.codePointAt(0)===47;let a=function(A,s){let i,l,c="",d=0,u=-1,f=0,g=-1;for(;++g<=A.length;){if(g<A.length)i=A.codePointAt(g);else{if(i===47)break;i=47}if(i===47){if(u!==g-1&&f!==1)if(u!==g-1&&f===2){if(c.length<2||d!==2||c.codePointAt(c.length-1)!==46||c.codePointAt(c.length-2)!==46){if(c.length>2){if(l=c.lastIndexOf("/"),l!==c.length-1){l<0?(c="",d=0):(c=c.slice(0,l),d=c.length-1-c.lastIndexOf("/")),u=g,f=0;continue}}else if(c.length>0){c="",d=0,u=g,f=0;continue}}s&&(c=c.length>0?c+"/..":"..",d=2)}else c.length>0?c+="/"+A.slice(u+1,g):c=A.slice(u+1,g),d=g-u-1;u=g,f=0}else i===46&&f>-1?f++:f=-1}return c}(n,!o);return a.length===0&&!o&&(a="."),a.length>0&&n.codePointAt(n.length-1)===47&&(a+="/"),o?"/"+a:a}(t)},sep:"/"};function tn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Ll={cwd:function(){return"/"}};function kr(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Hl(e){if(typeof e=="string")e=new URL(e);else if(!kr(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 Cr=["history","path","basename","stem","extname","dirname"];class Fa{constructor(t){let r;var n;r=t?kr(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?"":Ll.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o,a=-1;for(;++a<Cr.length;){const A=Cr[a];A in r&&r[A]!==void 0&&r[A]!==null&&(this[A]=A==="history"?[...r[A]]:r[A])}for(o in r)Cr.includes(o)||(this[o]=r[o])}get basename(){return typeof this.path=="string"?rt.basename(this.path):void 0}set basename(t){Sr(t,"basename"),Pr(t,"basename"),this.path=rt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?rt.dirname(this.path):void 0}set dirname(t){za(this.basename,"dirname"),this.path=rt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?rt.extname(this.path):void 0}set extname(t){if(Pr(t,"extname"),za(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=rt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){kr(t)&&(t=Hl(t)),Sr(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?rt.basename(this.path,this.extname):void 0}set stem(t){Sr(t,"stem"),Pr(t,"stem"),this.path=rt.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 Oe(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 Pr(e,t){if(e&&e.includes(rt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+rt.sep+"`")}function Sr(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function za(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const Ul=function(e){const t=this.constructor.prototype,r=t[e],n=function(){return r.apply(n,arguments)};return Object.setPrototypeOf(n,t),n},Fl={}.hasOwnProperty;class Dr extends Ul{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=Nl()}copy(){const t=new Dr;let r=-1;for(;++r<this.attachers.length;){const n=this.attachers[r];t.use(...n)}return t.data(xr(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(Tr("data",this.frozen),this.namespace[t]=r,this):Fl.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Tr("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=Dn(t),n=this.parser||this.Parser;return Br("parse",n),n(String(r),r)}process(t,r){const n=this;return this.freeze(),Br("process",this.parser||this.Parser),Ir("process",this.compiler||this.Compiler),r?o(void 0,r):new Promise(o);function o(a,A){const s=Dn(t),i=n.parse(s);function l(c,d){c||!d?A(c):a?a(d):r(void 0,d)}n.run(i,s,function(c,d,u){if(c||!d||!u)return l(c);const f=d,g=n.stringify(f,u);var b;typeof(b=g)=="string"||function(h){return!!(h&&typeof h=="object"&&"byteLength"in h&&"byteOffset"in h)}(b)?u.value=g:u.result=g,l(c,u)})}}processSync(t){let r,n=!1;return this.freeze(),Br("processSync",this.parser||this.Parser),Ir("processSync",this.compiler||this.Compiler),this.process(t,function(o,a){n=!0,Ha(o),r=a}),ja("processSync","process",n),r}run(t,r,n){Ra(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=Dn(r);o.run(t,i,function(l,c,d){const u=c||t;l?s(l):A?A(u):n(void 0,u,d)})}}runSync(t,r){let n,o=!1;return this.run(t,r,function(a,A){Ha(a),n=A,o=!0}),ja("runSync","run",o),n}stringify(t,r){this.freeze();const n=Dn(r),o=this.compiler||this.Compiler;return Ir("stringify",o),Ra(t),o(t,n)}use(t,...r){const n=this.attachers,o=this.namespace;if(Tr("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(l){if(typeof l=="function")i(l,[]);else{if(typeof l!="object")throw new TypeError("Expected usable value, not `"+l+"`");if(Array.isArray(l)){const[c,...d]=l;i(c,d)}else A(l)}}function A(l){if(!("plugins"in l)&&!("settings"in l))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(l.plugins),l.settings&&(o.settings=xr(!0,o.settings,l.settings))}function s(l){let c=-1;if(l!=null){if(!Array.isArray(l))throw new TypeError("Expected a list of plugins, not `"+l+"`");for(;++c<l.length;)a(l[c])}}function i(l,c){let d=-1,u=-1;for(;++d<n.length;)if(n[d][0]===l){u=d;break}if(u===-1)n.push([l,...c]);else if(c.length>0){let[f,...g]=c;const b=n[u][1];Er(b)&&Er(f)&&(f=xr(!0,b,f)),n[u]=[l,f,...g]}}}}const zl=new Dr().freeze();function Br(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ir(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Tr(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 Ra(e){if(!Er(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ja(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Dn(e){return function(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}(e)?e:new Fa(e)}const qa=[],Ga={allowDangerousHtml:!0},Rl=/^(https?|ircs?|mailto|xmpp)$/i,jl=[{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 ql(e){const t=e.allowedElements,r=e.allowElement,n=e.children||"",o=e.className,a=e.components,A=e.disallowedElements,s=e.rehypePlugins||qa,i=e.remarkPlugins||qa,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Ga}:Ga,c=e.skipHtml,d=e.unwrapDisallowed,u=e.urlTransform||Gl,f=zl().use(yl).use(i).use(Ol,l).use(s),g=new Fa;typeof n=="string"&&(g.value=n);for(const w of jl)Object.hasOwn(e,w.from)&&(w.from,w.to&&w.to,w.id);const b=f.parse(g);let h=f.runSync(b,g);return o&&(h={type:"element",tagName:"div",properties:{className:o},children:h.type==="root"?h.children:[h]}),_a(h,function(w,x,m){if(w.type==="raw"&&m&&typeof x=="number")return c?m.children.splice(x,1):m.children[x]={type:"text",value:w.value},x;if(w.type==="element"){let k;for(k in ur)if(Object.hasOwn(ur,k)&&Object.hasOwn(w.properties,k)){const P=w.properties[k],C=ur[k];(C===null||C.includes(w.tagName))&&(w.properties[k]=u(String(P||""),k,w))}}if(w.type==="element"){let k=t?!t.includes(w.tagName):!!A&&A.includes(w.tagName);if(!k&&r&&typeof x=="number"&&(k=!r(w,x,m)),k&&m&&typeof x=="number")return d&&w.children?m.children.splice(x,1,...w.children):m.children.splice(x,1),x}}),gA(h,{Fragment:E.Fragment,components:a,ignoreInvalidStyle:!0,jsx:E.jsx,jsxs:E.jsxs,passKeys:!0,passNode:!0})}function Gl(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||Rl.test(e.slice(0,t))?e:""}const Yl=({children:e})=>E.jsx("div",{style:{whiteSpace:"normal"},children:E.jsx(ql,{components:{p:({...t})=>E.jsx("p",{style:{margin:0,marginBottom:"0.5em",lineHeight:1.4,textAlign:"left"},children:t.children}),ul:({...t})=>E.jsx("ul",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:t.children}),ol:({...t})=>E.jsx("ol",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:t.children}),li:({...t})=>E.jsx("li",{style:{marginBottom:"1px",lineHeight:1.4},children:t.children}),code:({inline:t,children:r})=>t?E.jsx("code",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"2px 4px",borderRadius:"4px",fontFamily:"inherit",fontSize:"0.95em"},children:r}):E.jsx("pre",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"8px",borderRadius:"4px",overflowX:"auto",margin:"0.5em 0",whiteSpace:"pre-wrap"},children:E.jsx("code",{children:r})}),blockquote:({...t})=>E.jsx("blockquote",{style:{margin:0,paddingLeft:"10px",borderLeft:"2px solid #ccc",color:"#666",fontStyle:"italic"},children:t.children})},children:typeof e=="string"?e:""})}),Wl={autoConfig:!0},Kl=e=>()=>(t=>{const{getFlow:r}=bn(),{messages:n,replaceMessages:o}=Kt(),{settings:a}=xo(),{hasChatHistoryLoaded:A}=ko(),s={...t,...Wl},i=s.markdownComponent?s.markdownComponent:Yl;p.useEffect(()=>{var d,u;if(A){const f=[...n];for(let g=0;g<f.length&&g<(((d=a.chatHistory)==null?void 0:d.maxEntries)??30);g++){const b=f[g];(u=b.tags)!=null&&u.includes("rcb-markdown-renderer-plugin:parsed")&&(b.contentWrapper=i)}o(f)}},[A]);const l=async d=>{var u;const f=(u=d.data.message)==null?void 0:u.sender.toUpperCase();((g,b,h)=>{var w;if(typeof g.data.message.content!="string"||!g.detail.currPath)return!1;const x=b[g.detail.currPath];return!!x&&(((w=x.renderMarkdown)==null?void 0:w.map(m=>m.toUpperCase()).includes(h))??!1)})(d,r(),f)&&(d.data.message.contentWrapper=i,d.data.message.tags||(d.data.message.tags=[]),d.data.message.tags.push("rcb-markdown-renderer-plugin:parsed"))};Ge(j.PRE_INJECT_MESSAGE,l),Ge(j.CHUNK_STREAM_MESSAGE,l),Ge(j.START_STREAM_MESSAGE,l),Ge(j.START_SIMULATE_STREAM_MESSAGE,l);const c={name:"@rcb-plugins/markdown-renderer"};return s!=null&&s.autoConfig&&(c.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0}}),c})(e),Bn={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"}},Ya=(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},Vl=e=>{const{showToast:t}=(()=>{const{showToast:d,dismissToast:u,toasts:f,replaceToasts:g}=Bt();return{showToast:d,dismissToast:u,toasts:f,replaceToasts:g}})(),{getFlow:r}=bn(),{styles:n,updateStyles:o,replaceStyles:a}=(()=>{const{styles:d,replaceStyles:u,updateStyles:f}=yo();return{styles:d,replaceStyles:u,updateStyles:f}})(),A=(d=>({...Bn,...d,promptBaseColors:{...Bn.promptBaseColors},promptHoveredColors:{...Bn.promptHoveredColors},textAreaHighlightColors:{...Bn.textAreaHighlightColors}}))(e),[s,i]=p.useState(0),l=p.useRef({});Ge(j.USER_SUBMIT_TEXT,d=>{const u=d,f=Ya(u,r(),"validateTextInput");if(!f)return;const g=f(u.data.inputText);if(g!=null&&g.success||d.preventDefault(),!g.promptContent)return;s===0&&(l.current=structuredClone(n));const b=((h,w)=>{const x=h.promptType??"info";let m={};return w.advancedStyles&&(m=w.advancedStyles[x]),w.promptBaseColors&&(m.toastPromptStyle={color:w.promptBaseColors[x],borderColor:w.promptBaseColors[x]}),w.promptHoveredColors&&(m.toastPromptHoveredStyle={color:w.promptHoveredColors[x],borderColor:w.promptHoveredColors[x]}),w.textAreaHighlightColors&&(h.highlightTextArea??!0)&&(m.chatInputAreaStyle={boxShadow:`${w.textAreaHighlightColors[x]} 0px 0px 5px`}),m})(g,A);o(b),t(g.promptContent,g.promptDuration??3e3),i(h=>h+1)}),Ge(j.USER_UPLOAD_FILE,d=>{var u,f;const g=d,b=(f=(u=g.data)==null?void 0:u.files)==null?void 0:f[0];if(!b)return console.error("No file uploaded."),void d.preventDefault();const h=Ya(g,r(),"validateFileInput");if(!h)return void console.error("Validator not found for file input.");const w=h(b);if(!w.success)return console.error("Validation failed:",w),w.promptContent&&t(w.promptContent,w.promptDuration??3e3),void d.preventDefault();console.log("Validation successful:",w)}),Ge(j.DISMISS_TOAST,()=>{i(d=>d-1)}),p.useEffect(()=>{s===0&&setTimeout(()=>{a(l.current)})},[s,a]);const c={name:"@rcb-plugins/input-validator"};return A.autoConfig&&(c.settings={event:{rcbUserSubmitText:!0,rcbUserUploadFile:!0,rcbDismissToast:!0}}),c},Wa=p.forwardRef((e,t)=>{let{embedded:r,currentOpen:n,enabled:o,onSetEnabled:a}=e;const A=Kt(),s=(()=>{const{isChatWindowOpen:c,toggleChatWindow:d,toggleIsBotTyping:u,scrollToBottom:f,getIsChatBotVisible:g}=Re();return{isChatWindowOpen:c,toggleChatWindow:d,toggleIsBotTyping:u,scrollToBottom:f,getIsChatBotVisible:g}})(),i=p.useRef(!1),l=p.useRef(!1);return p.useEffect(()=>{!r&&s&&s.toggleChatWindow&&(i.current===n||l.current||(setTimeout(()=>{s&&s.toggleChatWindow&&s.toggleChatWindow(n)},0),i.current=n!=null&&n),l.current=!1)},[n,r,s]),p.useEffect(()=>{const c=()=>{l.current=!0};return window.addEventListener("rcb-toggle-chat-window",c),()=>window.removeEventListener("rcb-toggle-chat-window",c)}),p.useImperativeHandle(t,()=>({addMessage:c=>{A&&A.injectMessage&&A.injectMessage(c)},openChat:()=>{!r&&s&&s.toggleChatWindow&&s.toggleChatWindow(!0)},closeChat:()=>{!r&&s&&s.toggleChatWindow&&s.toggleChatWindow(!1)},toggleChat:()=>{!r&&s&&s.toggleChatWindow&&s.toggleChatWindow()},setBotEnabled:c=>{a&&a(c)}}),[A,s,r,a]),null});Wa.displayName="BotController";const Ka=p.createContext(null),Xl=e=>{let{trackEvent:t,children:r}=e;const n=p.useRef(t);return n.current=t,p.createElement(Ka.Provider,{value:{trackEvent:o=>n.current(o)}},r)},Va=()=>p.useContext(Ka)||{trackEvent:()=>{}},Xa=e=>{let{loginUrl:t,className:r="",style:n,isHeaderButton:o=!1}=e;const{trackEvent:a}=Va(),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 p.createElement(p.Fragment,null,o&&p.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
- `),f.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:()=>{i({type:"chatbot_login_clicked",loginUrl:t})}},"Log In"))},Xl=()=>f.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"},f.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"},f.createElement("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),f.createElement("circle",{cx:"12",cy:"7",r:"4"}))),De=[];for(let e=0;e<256;++e)De.push((e+256).toString(16).slice(1));let Qr;const Jl=new Uint8Array(16);var Ji={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Zi(e,t,r){var o;if(Ji.randomUUID&&!e)return Ji.randomUUID();const n=(e=e||{}).random??((o=e.rng)==null?void 0:o.call(e))??function(){if(!Qr){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Qr=crypto.getRandomValues.bind(crypto)}return Qr(Jl)}();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(i,A=0){return(De[i[A+0]]+De[i[A+1]]+De[i[A+2]]+De[i[A+3]]+"-"+De[i[A+4]]+De[i[A+5]]+"-"+De[i[A+6]]+De[i[A+7]]+"-"+De[i[A+8]]+De[i[A+9]]+"-"+De[i[A+10]]+De[i[A+11]]+De[i[A+12]]+De[i[A+13]]+De[i[A+14]]+De[i[A+15]]).toLowerCase()}(n)}function Pt(){return typeof localStorage<"u"&&localStorage.getItem("QA_BOT_DEBUG")==="true"}const Zl="background: #1a5b6e; color: white; padding: 2px 6px; border-radius: 3px;",$l="background: #7c3aed; color: white; padding: 2px 6px; border-radius: 3px;",ec="background: #059669; color: white; padding: 2px 6px; border-radius: 3px;",tc="background: #f97316; color: white; padding: 2px 6px; border-radius: 3px;",nc="background: #f59e0b; color: #000; padding: 2px 6px; border-radius: 3px 0 0 3px; font-weight: bold;",rc="background: #fbbf24; color: #000; padding: 2px 6px; border-radius: 0 3px 3px 0;",oc=()=>{Pt()&&console.log("%c QA Bot Core %c v".concat("0.2.35"," "),nc,rc)},In=function(e){if(Pt()){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),Zl,"",...r)}},ot=function(e){if(Pt()){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),$l,"",...r)}},ic=(e,t)=>{Pt()&&console.log("%c[Message]%c ".concat(e),ec,"",t)},nn=function(e){if(Pt()){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[Turnstile]%c ".concat(e),tc,"",...r)}},$i=function(){console.warn(...arguments)},Ie=function(){console.error(...arguments)},ea="qa_bot_session_messages",ta=()=>"qa_bot_session_".concat(Zi()),rn=()=>{try{const e=localStorage.getItem(ea);return e?JSON.parse(e):{}}catch{return{}}},ac=(e,t,r,n,o)=>{const i=rn();if(!i[e]&&(i[e]={messages:[],startedAt:new Date().toISOString(),preview:""},ot("NEW session created",{sessionId:e.slice(-12)})),i[e].messages.some(l=>l.id===t))return void ot("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()};i[e].messages.push(A),ot("MESSAGE added",{sessionId:e.slice(-12),messageId:t.slice(-8),sender:n,totalInSession:i[e].messages.length});const s=i[e].messages,a=s.find(l=>{var c;return l.sender.toLowerCase()==="bot"&&((c=l.content)===null||c===void 0?void 0:c.trim())&&l.content.length>=100});if(a){const l=a.content;i[e].preview=l.slice(0,50)+(l.length>50?"...":"")}else{const l=s.find(c=>{var u;return c.sender.toLowerCase()==="user"&&((u=c.content)===null||u===void 0?void 0:u.trim())});if(l&&!i[e].preview){const c=l.content;i[e].preview=c.slice(0,50)+(c.length>50?"...":"")}}(l=>{var c;const u=()=>Object.values(l).reduce((d,p)=>d+p.messages.length,0);for(;u()>100&&Object.keys(l).length>1;){const d=(c=Object.entries(l).sort((p,g)=>{let[,v]=p,[,h]=g;return new Date(v.startedAt).getTime()-new Date(h.startedAt).getTime()})[0])===null||c===void 0?void 0:c[0];if(!d)break;delete l[d]}localStorage.setItem(ea,JSON.stringify(l))})(i),ot("STORAGE state",{ourSessions:Object.keys(i).length,ourTotalMessages:Object.values(i).reduce((l,c)=>l+c.messages.length,0)})},na=e=>{var t,r;return(r=(t=rn()[e])===null||t===void 0?void 0:t.messages.length)!==null&&r!==void 0?r:0},sc=e=>{const t=rn()[e];return t!=null&&t.startedAt?Date.now()-new Date(t.startedAt).getTime():0},ra=f.createContext(void 0),Ac=e=>{let{children:t,getSessionId:r,setSessionId:n,resetSession:o,clearResettingFlag:i}=e;return f.createElement(ra.Provider,{value:{getSessionId:r,setSessionId:n,resetSession:o,clearResettingFlag:i}},t)},Mr=()=>{const e=f.useContext(ra);if(!e)throw new Error("useSession must be used within a SessionProvider");return e},lc=()=>{const[e,t]=f.useState(!1),[r,n]=f.useState([]),[o,i]=f.useState(null),[A,s]=f.useState(0),a=f.useRef(null),l=f.useRef(null),{replaceMessages:c}=Kt(),{toggleTextAreaDisabled:u}=Eo(),{setSessionId:d,getSessionId:p}=Mr();f.useEffect(()=>{var v,h;const w=m=>{a.current&&!a.current.contains(m.target)&&l.current&&!l.current.contains(m.target)&&t(!1)},x=(h=(v=a.current)===null||v===void 0?void 0:v.getRootNode())!==null&&h!==void 0?h:document;return e&&x.addEventListener("mousedown",w),()=>{x.removeEventListener("mousedown",w)}},[e]);const g=v=>{var h;const w=p();if(ot("RESTORE requested",{targetSession:v.slice(-12),currentSession:w==null?void 0:w.slice(-12)}),v===w)return ot("RESTORE skipped - already on this session"),void t(!1);const x=(P=>{var C;return((C=rn()[P])===null||C===void 0?void 0:C.messages)||[]})(v).filter(P=>{var C;return(C=P.content)===null||C===void 0?void 0:C.trim()});ot("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 k;d(v),ot("Session ID updated",{newSession:v.slice(-12)}),c(m),ot("replaceMessages called",{count:m.length}),k=(h=l.current)===null||h===void 0?void 0:h.getRootNode(),setTimeout(()=>{const P=(k||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("&lt;a href=")&&(I=I.replace(/&lt;a\s+href=["']([^"']+)["'][^&]*&gt;([^&]+)&lt;\/a&gt;/gi,'<a href="$1" target="_blank" rel="noopener noreferrer">$2</a>'),Q=!0),(I.includes("&lt;a ")||!((S=C.textContent)===null||S===void 0)&&S.includes("<a href="))&&(C.textContent||"").includes("<a href=")&&(I=I.replace(/&lt;a\s+href="([^"]+)"[^&]*&gt;([^&]+)&lt;\/a&gt;/gi,'<a href="$1" target="_blank" rel="noopener noreferrer">$2</a>'),Q=!0),Q&&(C.innerHTML=I)})},50),u(!1),ot("Chat input enabled after restore"),t(!1)};return f.createElement("div",{style:{position:"relative"}},f.createElement("button",{ref:l,className:"history-button",onClick:()=>{if(!e&&(n((()=>{const v=rn();return Object.entries(v).map(h=>{let[w,x]=h;return Object.assign({sessionId:w},x)}).sort((h,w)=>new Date(w.startedAt).getTime()-new Date(h.startedAt).getTime())})()),l.current)){const v=l.current.closest(".rcb-chat-window");if(v){const h=v.getBoundingClientRect(),w=l.current.getBoundingClientRect();i(h.width+3),s(h.right-w.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"},f.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"},f.createElement("circle",{cx:"12",cy:"12",r:"10"}),f.createElement("polyline",{points:"12 6 12 12 16 14"}))),e&&f.createElement("div",{ref:a,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?f.createElement("div",{style:{padding:"12px 16px",color:"#666",fontSize:"14px",textAlign:"center"}},"No chat history"):r.map(v=>f.createElement("button",{key:v.sessionId,role:"menuitem",onClick:()=>g(v.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:h=>{h.currentTarget.style.backgroundColor="#f5f5f5"},onMouseLeave:h=>{h.currentTarget.style.backgroundColor="transparent"}},f.createElement("span",{style:{fontSize:"14px",color:"#333",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},v.preview||"New conversation"),f.createElement("span",{style:{fontSize:"12px",color:"#888"}},(h=>{const w=new Date(h),x=new Date().getTime()-w.getTime(),m=Math.floor(x/864e5);return m===0?w.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):m===1?"Yesterday":m<7?w.toLocaleDateString([],{weekday:"short"}):w.toLocaleDateString([],{month:"short",day:"numeric"})})(v.startedAt))))))},oa=({width:e=24,height:t=24,color:r="currentColor",children:n,...o})=>f.createElement("svg",cn({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),cc=e=>f.createElement(oa,e,f.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"})),uc=()=>{const{restartFlow:e}=bn(),{setTextAreaValue:t}=Eo(),{messages:r}=Kt(),{getSessionId:n,resetSession:o,clearResettingFlag:i}=Mr(),{trackEvent:A}=Vi();return f.createElement("button",{onClick:async()=>{const s=n(),a=s?na(s):0;A({type:"chatbot_new_chat",previousMessageCount:a}),o(),await t(""),await e(),setTimeout(()=>{i()},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)"}},f.createElement(cc,{width:16,height:16}),"New Chat")};function Or(e){if(typeof e=="string")return e;if(typeof e=="number")return String(e);if(!e)return"";if(Array.isArray(e))return e.map(Or).join("");if(typeof e=="object"&&e!==null&&"props"in e){const t=e.props;if(t&&"children"in t)return Or(t.children)}return""}const dc=()=>{const{getSessionId:e}=Mr(),t=f.useCallback(r=>{var n;const o=(n=r.data)===null||n===void 0?void 0:n.message;if(!(o!=null&&o.id))return;const i=o.sender,A=o.type||"string";let s;if(s=typeof o.content=="string"?o.content:Or(o.content),ic("TRACKED",{id:o.id,sender:i,content:s.substring(0,50)+(s.length>50?"...":"")}),s.includes("rcb-options-container")||!s.trim())return;const a=e();ac(a,o.id,s,i,A)},[e]);return f.useEffect(()=>(window.addEventListener("rcb-pre-inject-message",t),()=>{window.removeEventListener("rcb-pre-inject-message",t)}),[t]),null},pc=()=>(f.useEffect(()=>{const e=i=>{if(!["ArrowDown","ArrowUp","ArrowLeft","ArrowRight","Enter"," ","Home","End"].includes(i.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 s=document.querySelector(".rcb-chat-window");if(!s)return;const a=Array.from(s.querySelectorAll(".rcb-message-container, .rcb-bot-message-container, .rcb-user-message-container")).filter(u=>u.offsetParent!==null);if(a.length>0){const u=a[a.length-1].querySelector(".rcb-checkbox-container");if(u&&u.offsetParent!==null){const d=Array.from(u.querySelectorAll(".rcb-checkbox-row-container")),p=u.querySelector(".rcb-checkbox-next-button");if(d.length>0){const g=[...d];return p&&g.push(p),void((v,h)=>{v.preventDefault();let w=-1;for(let m=0;m<h.length;m++)if(h[m]===document.activeElement||h[m].contains(document.activeElement)){w=m;break}w===-1&&(w=0);let x=w;switch(v.key){case"ArrowDown":case"ArrowRight":x=w<h.length-1?w+1:0;break;case"ArrowUp":case"ArrowLeft":x=w>0?w-1:h.length-1;break;case"Home":x=0;break;case"End":x=h.length-1;break;case"Enter":case" ":{const m=h[w],k=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});return void m.dispatchEvent(k)}default:return}h[x].focus(),h[x].setAttribute("tabindex","0"),h[x].classList.add("keyboard-focused"),h.forEach((m,k)=>{k!==x&&(m.setAttribute("tabindex","-1"),m.classList.remove("keyboard-focused"))})})(i,g)}}}let l=[];if(a.length>0){const u=a[a.length-1],d=Array.from(u.querySelectorAll(".rcb-options-container")).filter(p=>p.offsetParent!==null);if(d.length>0){const p=d[d.length-1];l=Array.from(p.querySelectorAll(".rcb-options"))}}if(l.length===0)return;const c=l.findIndex(u=>u===document.activeElement);switch(i.key){case"ArrowDown":case"ArrowRight":{let u;i.preventDefault(),u=c<l.length-1?c+1:0,l[u].setAttribute("tabindex","0"),l.forEach((d,p)=>{p!==u&&(d.setAttribute("tabindex","-1"),d.classList.remove("keyboard-focused"))}),l[u].classList.add("keyboard-focused"),l[u].focus();break}case"ArrowUp":case"ArrowLeft":{let u;i.preventDefault(),u=c>0?c-1:l.length-1,l[u].setAttribute("tabindex","0"),l.forEach((d,p)=>{p!==u&&(d.setAttribute("tabindex","-1"),d.classList.remove("keyboard-focused"))}),l[u].classList.add("keyboard-focused"),l[u].focus();break}case"Enter":case" ":if(i.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 d=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});u.dispatchEvent(d);const p=u.querySelector(".rcb-checkbox-label"),g=p?p.textContent:u.textContent||"checkbox",v=u.querySelector(".rcb-checkbox-mark"),h=v&&v.style.backgroundColor?"checked":"unchecked";t("".concat(g," ").concat(h))}else{const d=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});u.dispatchEvent(d);const p=u.textContent||u.innerText;t("Selected: ".concat(p))}}break;case"Home":i.preventDefault(),l.length>0&&(l[0].setAttribute("tabindex","0"),l.forEach((u,d)=>{d!==0&&(u.setAttribute("tabindex","-1"),u.classList.remove("keyboard-focused"))}),l[0].classList.add("keyboard-focused"),l[0].focus());break;case"End":if(i.preventDefault(),l.length>0){const u=l.length-1;l[u].setAttribute("tabindex","0"),l.forEach((d,p)=>{p!==u&&(d.setAttribute("tabindex","-1"),d.classList.remove("keyboard-focused"))}),l[u].classList.add("keyboard-focused"),l[u].focus()}}},t=i=>{const A=document.createElement("div");A.setAttribute("aria-live","assertive"),A.setAttribute("aria-atomic","true"),A.className="sr-only",A.textContent=i,document.body.appendChild(A),setTimeout(()=>{document.body.contains(A)&&document.body.removeChild(A)},1e3)},r=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;if(i||(i=document.querySelector(".rcb-chat-window"),i||(i=document.querySelector('[class*="rcb-chat"]')),i||(i=document.querySelector(".qa-bot"))),!i)return;const A=i.closest(".embedded-qa-bot")!==null,s=Array.from(i.querySelectorAll(".rcb-message-container, .rcb-bot-message-container, .rcb-user-message-container")).filter(u=>u.offsetParent!==null);if(s.length===0)return;const a=s[s.length-1],l=Array.from(a.querySelectorAll(".rcb-options-container")).filter(u=>u.offsetParent!==null);let c=[];if(l.length>0){const u=l[l.length-1];c=Array.from(u.querySelectorAll(".rcb-options"))}if(c.length===0){let u=a.querySelector(".rcb-checkbox-container");if(!u&&i&&(u=i.querySelector(".rcb-checkbox-container")),u&&u.offsetParent!==null){const d=Array.from(u.querySelectorAll(".rcb-checkbox-row-container")).filter(p=>p.offsetParent!==null&&p.style.display!=="none");if(d.length>0){const p=u.querySelector(".rcb-checkbox-next-button"),g=[...d];if(p&&p.offsetParent!==null&&g.push(p),g.forEach((v,h)=>{v.setAttribute("tabindex",h===0?"0":"-1"),h===0?v.classList.add("keyboard-focused"):v.classList.remove("keyboard-focused")}),d.length>1){u.querySelectorAll(".keyboard-nav-hint").forEach(h=>h.remove());const v=document.createElement("div");v.className="keyboard-nav-hint",v.textContent="Use arrow keys ↕ to navigate, Enter to select/deselect, or click any option",v.style.cssText="font-size: 12px !important; color: #666 !important; margin-bottom: 8px !important; font-style: italic !important; display: block !important;",u.insertBefore(v,u.firstChild)}return void setTimeout(()=>{g[0]&&g[0].offsetParent!==null&&!A&&g[0].focus()},150)}}}if(c.length>0){if(c.forEach((u,d)=>{const p=d===0?"0":"-1";u.setAttribute("tabindex",p),u.setAttribute("role","option"),u.setAttribute("aria-posinset",d+1),u.setAttribute("aria-setsize",c.length),d===0?u.classList.add("keyboard-focused"):u.classList.remove("keyboard-focused")}),c.length>1){const u=l.length>0?l[l.length-1]:null;if(u){u.querySelectorAll(".keyboard-nav-hint").forEach(p=>p.remove());const d=document.createElement("div");d.className="keyboard-nav-hint",d.textContent="Use arrow keys ↕ to navigate, Enter to select, or click any option",d.style.cssText="font-size: 12px !important; color: #666 !important; margin-bottom: 8px !important; font-style: italic !important; display: block !important;",u.insertBefore(d,u.firstChild)}}else{const u=l.length>0?l[l.length-1]:null;u&&u.querySelectorAll(".keyboard-nav-hint").forEach(d=>d.remove())}setTimeout(()=>{c[0]&&c[0].offsetParent!==null&&!A&&(c[0].focus(),c.length>1&&t("".concat(c.length," options available. Use arrow keys to navigate.")))},200)}},n=new MutationObserver(i=>{i.forEach(A=>{if(A.type==="childList"){const l=Array.from(A.addedNodes),c=l.some(d=>{var p,g,v,h;return d.nodeType===Node.ELEMENT_NODE&&(((p=d.classList)===null||p===void 0?void 0:p.contains("rcb-options-container"))||((g=d.classList)===null||g===void 0?void 0:g.contains("rcb-options"))||((v=d.querySelector)===null||v===void 0?void 0:v.call(d,".rcb-options-container"))||((h=d.querySelector)===null||h===void 0?void 0:h.call(d,".rcb-options")))}),u=l.some(d=>{var p,g;return d.nodeType===Node.ELEMENT_NODE&&(((p=d.classList)===null||p===void 0?void 0:p.contains("rcb-checkbox-container"))||((g=d.querySelector)===null||g===void 0?void 0:g.call(d,".rcb-checkbox-container")))});if(c||u){let d=A.target;for(;d&&((s=d.classList)===null||s===void 0||!s.contains("qa-bot"))&&((a=d.classList)===null||a===void 0||!a.contains("rcb-chat-window"));){var s,a;d=d.parentElement}(d||document).querySelectorAll(".rcb-options[tabindex], .rcb-checkbox-row-container[tabindex], .rcb-checkbox-next-button[tabindex]").forEach(p=>{p.setAttribute("tabindex","-1"),p.classList.remove("keyboard-focused")}),setTimeout(()=>r(d),100)}}})});n.observe(document.body,{childList:!0,subtree:!0}),document.addEventListener("keydown",e),r();const o=setInterval(()=>{document.querySelectorAll(".qa-bot").forEach(i=>{const A=i.querySelectorAll(".rcb-options-container .rcb-options").length>0,s=i.querySelectorAll(".rcb-checkbox-row-container").length>0;if(A){const a=i.querySelectorAll(".rcb-options[tabindex]").length;i.querySelectorAll(".rcb-options").length>a&&r(i)}if(s){const a=i.querySelectorAll(".rcb-checkbox-row-container[tabindex]").length;i.querySelectorAll(".rcb-checkbox-row-container").length>a&&r(i)}})},1e3);return()=>{document.removeEventListener("keydown",e),n.disconnect(),clearInterval(o)}},[]),null);let ia=!1,Tn=null;function aa(){return ia?Promise.resolve():Tn||(Tn=new Promise((e,t)=>{const r=document.createElement("script");r.src="https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit",r.async=!0,r.onload=()=>{ia=!0,nn("Script loaded"),e()},r.onerror=()=>{Tn=null,t(new Error("Failed to load Turnstile script"))},document.head.appendChild(r)}),Tn)}const on=e=>{if(!e||typeof e!="string")return e;let t=e.replace(/\[(https?:\/\/[^\s]+?)\]/gi,"[$1]($1)");return t=t.replace(new RegExp(`(?<!\\]\\(|href=["']|\\[)https?:\\/\\/[^\\s[\\]()]+`,"gi"),r=>{let n=r,o="";const i=n.match(/([.,;:!?]+)$/);return i&&(o=i[1],n=n.slice(0,-o.length)),"[".concat(n,"](").concat(n,")").concat(o)}),t},fc=e=>{let{siteKey:t,onVerify:r,onError:n}=e;const o=f.useRef(null),i=f.useRef(!1);return f.useEffect(()=>{!i.current&&o.current&&(i.current=!0,aa().then(()=>{const A=window.turnstile;if(!A||!o.current)return Ie("Turnstile API not available after script load"),void(n==null||n());A.render(o.current,{sitekey:t,callback:s=>{nn("Visible challenge completed"),r(s)},"error-callback":()=>{Ie("Turnstile challenge failed"),n==null||n()},"expired-callback":()=>{Ie("Turnstile token expired"),n==null||n()}})}).catch(A=>{Ie("Failed to load Turnstile script:",A),n==null||n()}))},[t,r,n]),f.createElement("div",{style:{padding:"8px 16px"}},f.createElement("div",{ref:o,style:{borderRadius:"8px",overflow:"hidden"}}))};function sa(e){const{confidence:t,tools_used:r,metadata:n}=e;if(!(t||r&&r.length!==0))return"";const o=[];return t&&o.push("• Confidence: ".concat(t)),r&&r.length>0&&o.push("• Tools used: ".concat(r.join(", "))),n!=null&&n.agent&&o.push("• Agent: ".concat(n.agent)),`---
38
+ `),p.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"))},Jl=()=>p.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"},p.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"},p.createElement("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),p.createElement("circle",{cx:"12",cy:"7",r:"4"}))),Ie=[];for(let e=0;e<256;++e)Ie.push((e+256).toString(16).slice(1));let Qr;const Zl=new Uint8Array(16);var Ja={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Za(e,t,r){var o;if(Ja.randomUUID&&!e)return Ja.randomUUID();const n=(e=e||{}).random??((o=e.rng)==null?void 0:o.call(e))??function(){if(!Qr){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Qr=crypto.getRandomValues.bind(crypto)}return Qr(Zl)}();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(Ie[a[A+0]]+Ie[a[A+1]]+Ie[a[A+2]]+Ie[a[A+3]]+"-"+Ie[a[A+4]]+Ie[a[A+5]]+"-"+Ie[a[A+6]]+Ie[a[A+7]]+"-"+Ie[a[A+8]]+Ie[a[A+9]]+"-"+Ie[a[A+10]]+Ie[a[A+11]]+Ie[a[A+12]]+Ie[a[A+13]]+Ie[a[A+14]]+Ie[a[A+15]]).toLowerCase()}(n)}function St(){return typeof localStorage<"u"&&localStorage.getItem("QA_BOT_DEBUG")==="true"}const $l="background: #1a5b6e; color: white; padding: 2px 6px; border-radius: 3px;",ec="background: #7c3aed; color: white; padding: 2px 6px; border-radius: 3px;",tc="background: #059669; color: white; padding: 2px 6px; border-radius: 3px;",nc="background: #f97316; color: white; padding: 2px 6px; border-radius: 3px;",rc="background: #f59e0b; color: #000; padding: 2px 6px; border-radius: 3px 0 0 3px; font-weight: bold;",oc="background: #fbbf24; color: #000; padding: 2px 6px; border-radius: 0 3px 3px 0;",ac=()=>{St()&&console.log("%c QA Bot Core %c v".concat("0.2.35"," "),rc,oc)},In=function(e){if(St()){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),$l,"",...r)}},ot=function(e){if(St()){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),ec,"",...r)}},ic=(e,t)=>{St()&&console.log("%c[Message]%c ".concat(e),tc,"",t)},nn=function(e){if(St()){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[Turnstile]%c ".concat(e),nc,"",...r)}},$a=function(){console.warn(...arguments)},De=function(){console.error(...arguments)},ei="qa_bot_session_messages",ti=()=>"qa_bot_session_".concat(Za()),rn=()=>{try{const e=localStorage.getItem(ei);return e?JSON.parse(e):{}}catch{return{}}},sc=(e,t,r,n,o)=>{const a=rn();if(!a[e]&&(a[e]={messages:[],startedAt:new Date().toISOString(),preview:""},ot("NEW session created",{sessionId:e.slice(-12)})),a[e].messages.some(l=>l.id===t))return void ot("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),ot("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(l=>{var c;return l.sender.toLowerCase()==="bot"&&((c=l.content)===null||c===void 0?void 0:c.trim())&&l.content.length>=100});if(i){const l=i.content;a[e].preview=l.slice(0,50)+(l.length>50?"...":"")}else{const l=s.find(c=>{var d;return c.sender.toLowerCase()==="user"&&((d=c.content)===null||d===void 0?void 0:d.trim())});if(l&&!a[e].preview){const c=l.content;a[e].preview=c.slice(0,50)+(c.length>50?"...":"")}}(l=>{var c;const d=()=>Object.values(l).reduce((u,f)=>u+f.messages.length,0);for(;d()>100&&Object.keys(l).length>1;){const u=(c=Object.entries(l).sort((f,g)=>{let[,b]=f,[,h]=g;return new Date(b.startedAt).getTime()-new Date(h.startedAt).getTime()})[0])===null||c===void 0?void 0:c[0];if(!u)break;delete l[u]}localStorage.setItem(ei,JSON.stringify(l))})(a),ot("STORAGE state",{ourSessions:Object.keys(a).length,ourTotalMessages:Object.values(a).reduce((l,c)=>l+c.messages.length,0)})},ni=e=>{var t,r;return(r=(t=rn()[e])===null||t===void 0?void 0:t.messages.length)!==null&&r!==void 0?r:0},Ac=e=>{const t=rn()[e];return t!=null&&t.startedAt?Date.now()-new Date(t.startedAt).getTime():0},ri=p.createContext(void 0),lc=e=>{let{children:t,getSessionId:r,setSessionId:n,resetSession:o,clearResettingFlag:a}=e;return p.createElement(ri.Provider,{value:{getSessionId:r,setSessionId:n,resetSession:o,clearResettingFlag:a}},t)},Mr=()=>{const e=p.useContext(ri);if(!e)throw new Error("useSession must be used within a SessionProvider");return e},cc=()=>{const[e,t]=p.useState(!1),[r,n]=p.useState([]),[o,a]=p.useState(null),[A,s]=p.useState(0),i=p.useRef(null),l=p.useRef(null),{replaceMessages:c}=Kt(),{toggleTextAreaDisabled:d}=Eo(),{setSessionId:u,getSessionId:f}=Mr();p.useEffect(()=>{var b,h;const w=m=>{i.current&&!i.current.contains(m.target)&&l.current&&!l.current.contains(m.target)&&t(!1)},x=(h=(b=i.current)===null||b===void 0?void 0:b.getRootNode())!==null&&h!==void 0?h:document;return e&&x.addEventListener("mousedown",w),()=>{x.removeEventListener("mousedown",w)}},[e]);const g=b=>{var h;const w=f();if(ot("RESTORE requested",{targetSession:b.slice(-12),currentSession:w==null?void 0:w.slice(-12)}),b===w)return ot("RESTORE skipped - already on this session"),void t(!1);const x=(P=>{var C;return((C=rn()[P])===null||C===void 0?void 0:C.messages)||[]})(b).filter(P=>{var C;return(C=P.content)===null||C===void 0?void 0:C.trim()});ot("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 k;u(b),ot("Session ID updated",{newSession:b.slice(-12)}),c(m),ot("replaceMessages called",{count:m.length}),k=(h=l.current)===null||h===void 0?void 0:h.getRootNode(),setTimeout(()=>{const P=(k||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("&lt;a href=")&&(I=I.replace(/&lt;a\s+href=["']([^"']+)["'][^&]*&gt;([^&]+)&lt;\/a&gt;/gi,'<a href="$1" target="_blank" rel="noopener noreferrer">$2</a>'),Q=!0),(I.includes("&lt;a ")||!((S=C.textContent)===null||S===void 0)&&S.includes("<a href="))&&(C.textContent||"").includes("<a href=")&&(I=I.replace(/&lt;a\s+href="([^"]+)"[^&]*&gt;([^&]+)&lt;\/a&gt;/gi,'<a href="$1" target="_blank" rel="noopener noreferrer">$2</a>'),Q=!0),Q&&(C.innerHTML=I)})},50),d(!1),ot("Chat input enabled after restore"),t(!1)};return p.createElement("div",{style:{position:"relative"}},p.createElement("button",{ref:l,className:"history-button",onClick:()=>{if(!e&&(n((()=>{const b=rn();return Object.entries(b).map(h=>{let[w,x]=h;return Object.assign({sessionId:w},x)}).sort((h,w)=>new Date(w.startedAt).getTime()-new Date(h.startedAt).getTime())})()),l.current)){const b=l.current.closest(".rcb-chat-window");if(b){const h=b.getBoundingClientRect(),w=l.current.getBoundingClientRect();a(h.width+3),s(h.right-w.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"},p.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"},p.createElement("circle",{cx:"12",cy:"12",r:"10"}),p.createElement("polyline",{points:"12 6 12 12 16 14"}))),e&&p.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?p.createElement("div",{style:{padding:"12px 16px",color:"#666",fontSize:"14px",textAlign:"center"}},"No chat history"):r.map(b=>p.createElement("button",{key:b.sessionId,role:"menuitem",onClick:()=>g(b.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:h=>{h.currentTarget.style.backgroundColor="#f5f5f5"},onMouseLeave:h=>{h.currentTarget.style.backgroundColor="transparent"}},p.createElement("span",{style:{fontSize:"14px",color:"#333",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},b.preview||"New conversation"),p.createElement("span",{style:{fontSize:"12px",color:"#888"}},(h=>{const w=new Date(h),x=new Date().getTime()-w.getTime(),m=Math.floor(x/864e5);return m===0?w.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):m===1?"Yesterday":m<7?w.toLocaleDateString([],{weekday:"short"}):w.toLocaleDateString([],{month:"short",day:"numeric"})})(b.startedAt))))))},oi=({width:e=24,height:t=24,color:r="currentColor",children:n,...o})=>p.createElement("svg",cn({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),uc=e=>p.createElement(oi,e,p.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"})),dc=()=>{const{restartFlow:e}=bn(),{setTextAreaValue:t}=Eo(),{messages:r}=Kt(),{getSessionId:n,resetSession:o,clearResettingFlag:a}=Mr(),{trackEvent:A}=Va();return p.createElement("button",{onClick:async()=>{const s=n(),i=s?ni(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)"}},p.createElement(uc,{width:16,height:16}),"New Chat")};function Or(e){if(typeof e=="string")return e;if(typeof e=="number")return String(e);if(!e)return"";if(Array.isArray(e))return e.map(Or).join("");if(typeof e=="object"&&e!==null&&"props"in e){const t=e.props;if(t&&"children"in t)return Or(t.children)}return""}const pc=()=>{const{getSessionId:e}=Mr(),t=p.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:Or(o.content),ic("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();sc(i,o.id,s,a,A)},[e]);return p.useEffect(()=>(window.addEventListener("rcb-pre-inject-message",t),()=>{window.removeEventListener("rcb-pre-inject-message",t)}),[t]),null},fc=()=>(p.useEffect(()=>{const e=a=>{if(!["ArrowDown","ArrowUp","ArrowLeft","ArrowRight","Enter"," ","Home","End"].includes(a.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 s=document.querySelector(".rcb-chat-window");if(!s)return;const i=Array.from(s.querySelectorAll(".rcb-message-container, .rcb-bot-message-container, .rcb-user-message-container")).filter(d=>d.offsetParent!==null);if(i.length>0){const d=i[i.length-1].querySelector(".rcb-checkbox-container");if(d&&d.offsetParent!==null){const u=Array.from(d.querySelectorAll(".rcb-checkbox-row-container")),f=d.querySelector(".rcb-checkbox-next-button");if(u.length>0){const g=[...u];return f&&g.push(f),void((b,h)=>{b.preventDefault();let w=-1;for(let m=0;m<h.length;m++)if(h[m]===document.activeElement||h[m].contains(document.activeElement)){w=m;break}w===-1&&(w=0);let x=w;switch(b.key){case"ArrowDown":case"ArrowRight":x=w<h.length-1?w+1:0;break;case"ArrowUp":case"ArrowLeft":x=w>0?w-1:h.length-1;break;case"Home":x=0;break;case"End":x=h.length-1;break;case"Enter":case" ":{const m=h[w],k=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});return void m.dispatchEvent(k)}default:return}h[x].focus(),h[x].setAttribute("tabindex","0"),h[x].classList.add("keyboard-focused"),h.forEach((m,k)=>{k!==x&&(m.setAttribute("tabindex","-1"),m.classList.remove("keyboard-focused"))})})(a,g)}}}let l=[];if(i.length>0){const d=i[i.length-1],u=Array.from(d.querySelectorAll(".rcb-options-container")).filter(f=>f.offsetParent!==null);if(u.length>0){const f=u[u.length-1];l=Array.from(f.querySelectorAll(".rcb-options"))}}if(l.length===0)return;const c=l.findIndex(d=>d===document.activeElement);switch(a.key){case"ArrowDown":case"ArrowRight":{let d;a.preventDefault(),d=c<l.length-1?c+1:0,l[d].setAttribute("tabindex","0"),l.forEach((u,f)=>{f!==d&&(u.setAttribute("tabindex","-1"),u.classList.remove("keyboard-focused"))}),l[d].classList.add("keyboard-focused"),l[d].focus();break}case"ArrowUp":case"ArrowLeft":{let d;a.preventDefault(),d=c>0?c-1:l.length-1,l[d].setAttribute("tabindex","0"),l.forEach((u,f)=>{f!==d&&(u.setAttribute("tabindex","-1"),u.classList.remove("keyboard-focused"))}),l[d].classList.add("keyboard-focused"),l[d].focus();break}case"Enter":case" ":if(a.preventDefault(),document.activeElement&&l.includes(document.activeElement)){const d=document.activeElement;if(d.classList.contains("rcb-checkbox-row-container")||d.closest(".rcb-checkbox-row-container")){const u=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});d.dispatchEvent(u);const f=d.querySelector(".rcb-checkbox-label"),g=f?f.textContent:d.textContent||"checkbox",b=d.querySelector(".rcb-checkbox-mark"),h=b&&b.style.backgroundColor?"checked":"unchecked";t(`${g} ${h}`)}else{const u=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});d.dispatchEvent(u);const f=d.textContent||d.innerText;t(`Selected: ${f}`)}}break;case"Home":a.preventDefault(),l.length>0&&(l[0].setAttribute("tabindex","0"),l.forEach((d,u)=>{u!==0&&(d.setAttribute("tabindex","-1"),d.classList.remove("keyboard-focused"))}),l[0].classList.add("keyboard-focused"),l[0].focus());break;case"End":if(a.preventDefault(),l.length>0){const d=l.length-1;l[d].setAttribute("tabindex","0"),l.forEach((u,f)=>{f!==d&&(u.setAttribute("tabindex","-1"),u.classList.remove("keyboard-focused"))}),l[d].classList.add("keyboard-focused"),l[d].focus()}}},t=a=>{const A=document.createElement("div");A.setAttribute("aria-live","assertive"),A.setAttribute("aria-atomic","true"),A.className="sr-only",A.textContent=a,document.body.appendChild(A),setTimeout(()=>{document.body.contains(A)&&document.body.removeChild(A)},1e3)},r=(a=null)=>{let A=a;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 l=i[i.length-1],c=Array.from(l.querySelectorAll(".rcb-options-container")).filter(u=>u.offsetParent!==null);let d=[];if(c.length>0){const u=c[c.length-1];d=Array.from(u.querySelectorAll(".rcb-options"))}if(d.length===0){let u=l.querySelector(".rcb-checkbox-container");if(!u&&A&&(u=A.querySelector(".rcb-checkbox-container")),u&&u.offsetParent!==null){const f=Array.from(u.querySelectorAll(".rcb-checkbox-row-container")).filter(g=>g.offsetParent!==null&&g.style.display!=="none");if(f.length>0){const g=u.querySelector(".rcb-checkbox-next-button"),b=[...f];if(g&&g.offsetParent!==null&&b.push(g),b.forEach((h,w)=>{h.setAttribute("tabindex",w===0?"0":"-1"),w===0?h.classList.add("keyboard-focused"):h.classList.remove("keyboard-focused")}),f.length>1){u.querySelectorAll(".keyboard-nav-hint").forEach(w=>w.remove());const h=document.createElement("div");h.className="keyboard-nav-hint",h.textContent="Use arrow keys ↕ to navigate, Enter to select/deselect, or click any option",h.style.cssText="font-size: 12px !important; color: #666 !important; margin-bottom: 8px !important; font-style: italic !important; display: block !important;",u.insertBefore(h,u.firstChild)}return void setTimeout(()=>{b[0]&&b[0].offsetParent!==null&&!s&&b[0].focus()},150)}}}if(d.length>0){if(d.forEach((u,f)=>{const g=f===0?"0":"-1";u.setAttribute("tabindex",g),u.setAttribute("role","option"),u.setAttribute("aria-posinset",f+1),u.setAttribute("aria-setsize",d.length),f===0?u.classList.add("keyboard-focused"):u.classList.remove("keyboard-focused")}),d.length>1){const u=c.length>0?c[c.length-1]:null;if(u){u.querySelectorAll(".keyboard-nav-hint").forEach(g=>g.remove());const f=document.createElement("div");f.className="keyboard-nav-hint",f.textContent="Use arrow keys ↕ to navigate, Enter to select, or click any option",f.style.cssText="font-size: 12px !important; color: #666 !important; margin-bottom: 8px !important; font-style: italic !important; display: block !important;",u.insertBefore(f,u.firstChild)}}else{const u=c.length>0?c[c.length-1]:null;u&&u.querySelectorAll(".keyboard-nav-hint").forEach(f=>f.remove())}setTimeout(()=>{d[0]&&d[0].offsetParent!==null&&!s&&(d[0].focus(),d.length>1&&t(`${d.length} options available. Use arrow keys to navigate.`))},200)}},n=new MutationObserver(a=>{a.forEach(A=>{var s,i;if(A.type==="childList"){const l=Array.from(A.addedNodes),c=l.some(u=>{var f,g,b,h;return u.nodeType===Node.ELEMENT_NODE&&(((f=u.classList)==null?void 0:f.contains("rcb-options-container"))||((g=u.classList)==null?void 0:g.contains("rcb-options"))||((b=u.querySelector)==null?void 0:b.call(u,".rcb-options-container"))||((h=u.querySelector)==null?void 0:h.call(u,".rcb-options")))}),d=l.some(u=>{var f,g;return u.nodeType===Node.ELEMENT_NODE&&(((f=u.classList)==null?void 0:f.contains("rcb-checkbox-container"))||((g=u.querySelector)==null?void 0:g.call(u,".rcb-checkbox-container")))});if(c||d){let u=A.target;for(;u&&!((s=u.classList)!=null&&s.contains("qa-bot"))&&!((i=u.classList)!=null&&i.contains("rcb-chat-window"));)u=u.parentElement;(u||document).querySelectorAll(".rcb-options[tabindex], .rcb-checkbox-row-container[tabindex], .rcb-checkbox-next-button[tabindex]").forEach(f=>{f.setAttribute("tabindex","-1"),f.classList.remove("keyboard-focused")}),setTimeout(()=>r(u),100)}}})});n.observe(document.body,{childList:!0,subtree:!0}),document.addEventListener("keydown",e),r();const o=setInterval(()=>{document.querySelectorAll(".qa-bot").forEach(a=>{const A=a.querySelectorAll(".rcb-options-container .rcb-options").length>0,s=a.querySelectorAll(".rcb-checkbox-row-container").length>0;if(A){const i=a.querySelectorAll(".rcb-options[tabindex]").length;a.querySelectorAll(".rcb-options").length>i&&r(a)}if(s){const i=a.querySelectorAll(".rcb-checkbox-row-container[tabindex]").length;a.querySelectorAll(".rcb-checkbox-row-container").length>i&&r(a)}})},1e3);return()=>{document.removeEventListener("keydown",e),n.disconnect(),clearInterval(o)}},[]),null);let ai=!1,Tn=null;function ii(){return ai?Promise.resolve():Tn||(Tn=new Promise((e,t)=>{const r=document.createElement("script");r.src="https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit",r.async=!0,r.onload=()=>{ai=!0,nn("Script loaded"),e()},r.onerror=()=>{Tn=null,t(new Error("Failed to load Turnstile script"))},document.head.appendChild(r)}),Tn)}const on=e=>{if(!e||typeof e!="string")return e;let t=e.replace(/\[(https?:\/\/[^\s]+?)\]/gi,"[$1]($1)");return t=t.replace(new RegExp(`(?<!\\]\\(|href=["']|\\[)https?:\\/\\/[^\\s[\\]()]+`,"gi"),r=>{let n=r,o="";const a=n.match(/([.,;:!?]+)$/);return a&&(o=a[1],n=n.slice(0,-o.length)),"[".concat(n,"](").concat(n,")").concat(o)}),t},hc=e=>{let{siteKey:t,onVerify:r,onError:n,loginUrl:o}=e;const a=p.useRef(null),A=p.useRef(null),s=p.useRef(!1),i=p.useRef(null),l=p.useRef(null),[c,d]=p.useState(!1),u=o&&o!=="/login",f=p.useCallback(()=>{const h=window.turnstile;if(i.current&&(h!=null&&h.remove)){try{h.remove(i.current)}catch{}i.current=null}},[]),g=p.useCallback(()=>{f(),n==null||n()},[n,f]);p.useEffect(()=>()=>{f()},[f]),p.useEffect(()=>{var h;return l.current=document.activeElement,(h=A.current)===null||h===void 0||h.focus(),()=>{l.current&&typeof l.current.focus=="function"&&l.current.focus()}},[]),p.useEffect(()=>{const h=w=>{if(w.key==="Escape")return w.preventDefault(),void g();if(w.key==="Tab"&&A.current){const x=A.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(x.length===0)return;const m=x[0],k=x[x.length-1];w.shiftKey&&document.activeElement===m?(w.preventDefault(),k.focus()):w.shiftKey||document.activeElement!==k||(w.preventDefault(),m.focus())}};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[g]),p.useEffect(()=>{s.current||!a.current||c||(s.current=!0,ii().then(()=>{const h=window.turnstile;if(!h||!a.current)return De("Turnstile API not available after script load"),void d(!0);i.current=h.render(a.current,{sitekey:t,callback:w=>{nn("Visible challenge completed"),r(w)},"error-callback":()=>{De("Turnstile challenge failed"),f(),d(!0)},"expired-callback":()=>{De("Turnstile token expired"),f(),d(!0)}})}).catch(h=>{De("Failed to load Turnstile script:",h),d(!0)}))},[t,r,c]);const b=p.createElement(p.Fragment,null,p.createElement("div",{"aria-hidden":"true",style:{position:"fixed",inset:0,background:"rgba(0, 0, 0, 0.5)",zIndex:999998}}),p.createElement("div",{ref:A,role:"dialog","aria-modal":"true","aria-labelledby":"qa-bot-turnstile-label",tabIndex:-1,style:{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:999999,background:"white",padding:"24px",borderRadius:"8px",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.3)",maxWidth:"90vw",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'}},p.createElement("span",{id:"qa-bot-turnstile-label",className:"sr-only",style:{position:"absolute",width:"1px",height:"1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap"}},"Verification challenge"),c?p.createElement("div",{style:{fontSize:"14px",lineHeight:"1.5",color:"#333"}},p.createElement("p",{style:{margin:"0 0 16px 0"}},"Verification failed. You can try again",u&&p.createElement(p.Fragment,null,", or"," ",p.createElement("a",{href:o,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--primaryColor, #107180)",fontWeight:"bold"}},"log in")," ","to skip verification"),"."),p.createElement("div",{style:{display:"flex",gap:"8px"}},p.createElement("button",{type:"button",onClick:()=>{f(),s.current=!1,d(!1)},style:{padding:"8px 16px",background:"var(--primaryColor, #107180)",color:"white",border:"none",borderRadius:"4px",cursor:"pointer",fontSize:"14px"}},"Try again"),p.createElement("button",{type:"button",onClick:g,style:{padding:"8px 16px",background:"#f0f0f0",border:"1px solid #ccc",borderRadius:"4px",cursor:"pointer",fontSize:"14px"}},"Close"))):p.createElement(p.Fragment,null,p.createElement("div",{ref:a,style:{borderRadius:"8px",overflow:"hidden"}}),p.createElement("button",{type:"button",onClick:g,style:{marginTop:"16px",padding:"8px 16px",background:"#f0f0f0",border:"1px solid #ccc",borderRadius:"4px",cursor:"pointer",fontSize:"14px"}},"Cancel"))));return hi.createPortal(b,document.body)};function si(e){const{confidence:t,tools_used:r,metadata:n}=e;if(!(t||r&&r.length!==0))return"";const o=[];return t&&o.push("• Confidence: ".concat(t)),r&&r.length>0&&o.push("• Tools used: ".concat(r.join(", "))),n!=null&&n.agent&&o.push("• Agent: ".concat(n.agent)),`---
39
39
  `.concat(o.join(`
40
- `))}function hc(e){let{getState:t,onResubmit:r,trackEvent:n,loginUrl:o}=e;const[i,A]=f.useState(!1),s=t();if(!s.siteKey)return null;if(i){const a=o&&o!=="/login";return f.createElement("div",{style:{padding:"8px 16px",fontSize:"14px",lineHeight:"1.5"}},f.createElement("p",{style:{margin:0}},"I'm having trouble verifying your session. Please try"," ",f.createElement("a",{href:"",onClick:l=>{l.preventDefault(),window.location.reload()},style:{color:"var(--primaryColor, #107180)"}},"refreshing the page"),a&&f.createElement(f.Fragment,null,", or"," ",f.createElement("a",{href:o,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--primaryColor, #107180)",fontWeight:"bold"}},"log in")),"."))}return f.createElement(fc,{siteKey:s.siteKey,onVerify:a=>{s.token=a,n==null||n({type:"chatbot_turnstile_completed"}),r(a)},onError:()=>{A(!0),n==null||n({type:"chatbot_turnstile_error"})}})}const gc="#1a5b6e",mc="#107180",yc="Arial, sans-serif",Aa="Q&A Bot",bc="/chat-icon.svg",vc="Type your question here...",wc="Select an option to continue",xc=!1,Ec="Ask me a question!",la="/login",kc={general:{showHeader:!0,showFooter:!0},tooltip:{mode:"CLOSE"},chatInput:{disabled:!1,characterLimit:5e3,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}},_r=f.forwardRef((e,t)=>{var r,n,o;const{apiKey:i,qaEndpoint:A,ratingEndpoint:s,capabilitiesEndpoint:a,agentRatingEndpoint:l,welcomeMessage:c,open:u,onOpenChange:d,isLoggedIn:p,allowAnonAccess:g=!1,actingUser:v,primaryColor:h,secondaryColor:w,botName:x,logo:m,placeholder:k,errorMessage:P,embedded:C,footerText:S,footerLink:I,tooltipText:Q,loginUrl:D,turnstileSiteKey:_,resourceContext:B,customFlow:M,onAnalyticsEvent:F}=e,N=f.useRef("bot_".concat(Math.random().toString(36).substr(2,9)));f.useEffect(()=>{oc()},[]);const L=f.useRef(null);L.current===null&&(L.current=ta(),In("CREATED",L.current));const O=f.useRef(!1),U=f.useRef({getSessionId:()=>L.current,isResetting:()=>O.current}),b=function(j){const[Y,ne]=f.useState(null),[te,ie]=f.useState("idle"),ce=f.useRef(null),se=f.useRef(null),Me=f.useRef(!0),He=f.useCallback(()=>{const be=window.turnstile;if(se.current&&(be!=null&&be.remove)){try{be.remove(se.current)}catch{}se.current=null}ce.current&&(ce.current.remove(),ce.current=null)},[]);return f.useEffect(()=>{if(Me.current=!0,!j)return ie("idle"),void ne(null);ie("loading");const be=document.createElement("div");return be.style.position="fixed",be.style.left="-9999px",be.style.top="-9999px",be.style.width="0",be.style.height="0",be.style.overflow="hidden",be.setAttribute("aria-hidden","true"),document.body.appendChild(be),ce.current=be,aa().then(()=>{if(!Me.current)return;const it=window.turnstile;if(!it||!ce.current)return Ie("Turnstile API not available for silent verification"),void ie("failed");const Lt=it.render(ce.current,{sitekey:j,execution:"render","refresh-expired":"auto",callback:ge=>{Me.current&&(nn("Silent verification succeeded"),ne(ge),ie("verified"))},"error-callback":()=>{Me.current&&(Ie("Turnstile silent verification failed"),ie("failed"))},"expired-callback":()=>{Me.current&&(nn("Token expired, awaiting refresh"),ne(null),ie("loading"))}});se.current=Lt}).catch(it=>{Me.current&&(Ie("Failed to load Turnstile script for silent verification:",it),ie("failed"))}),()=>{Me.current=!1,He()}},[j,He]),{token:Y,status:te,reset:f.useCallback(()=>{const be=window.turnstile;se.current&&(be!=null&&be.reset)&&(ne(null),ie("loading"),be.reset(se.current),nn("Token consumed, resetting widget for fresh token"))},[])}}(_),R=f.useRef(null);R.current=b.token;const[y,G]=f.useState(p);f.useEffect(()=>{G(p)},[p]);const Z=C!==void 0?C:xc,K=f.useCallback(j=>{var Y;F&&F(Object.assign(Object.assign({},j),{timestamp:Date.now(),sessionId:(Y=L.current)!==null&&Y!==void 0?Y:void 0,pageUrl:typeof window<"u"?window.location.href:void 0,isEmbedded:Z}))},[F,Z]),re=f.useMemo(()=>{const j=Object.assign({},kc);j.general=Object.assign(Object.assign({},j.general),{primaryColor:h||gc,secondaryColor:w||mc,fontFamily:yc,embedded:Z});const Y=y===!1?[f.createElement(Xi,{key:"login-button",loginUrl:D||la,isHeaderButton:!0})]:[f.createElement(lc,{key:"history-button"}),f.createElement(Xl,{key:"user-icon"})];j.header={title:f.createElement("span",{style:{fontSize:14,fontWeight:500}},x||Aa),showAvatar:!0,avatar:m||bc,buttons:[...Y,me.CLOSE_CHAT_BUTTON]},j.chatInput=Object.assign(Object.assign({},j.chatInput),{disabled:!1,enabledPlaceholderText:k||vc,disabledPlaceholderText:P||wc}),j.tooltip=Object.assign(Object.assign({},j.tooltip),{text:Q||Ec});const ne=S?I?f.createElement("a",{href:I,target:"_blank",rel:"noopener noreferrer",key:"footer-link"},S):f.createElement("span",{key:"footer-text"},S):null;return j.footer={text:ne,buttons:[f.createElement(uc,{key:"new-chat-button"})]},j.chatWindow=Object.assign(Object.assign({},j.chatWindow),{defaultOpen:!!Z}),j.event={rcbPreInjectMessage:!0,rcbPostInjectMessage:!0,rcbUserSubmitText:!0,rcbChangePath:!0,rcbToggleChatWindow:!0},j},[h,w,x,m,k,P,Z,Q,y,D,S,I]),Se=f.useRef(null),le=function(j){let Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return f.useMemo(()=>{const ne=(te,ie)=>{if(j.current){const ce=getComputedStyle(j.current).getPropertyValue(te);if(ce&&ce.trim()!=="")return ce.trim();if(j.current.parentElement){const se=getComputedStyle(j.current.parentElement).getPropertyValue(te);if(se&&se.trim()!=="")return se.trim()}}return ie};return{primaryColor:ne("--primaryColor",Y.primaryColor),secondaryColor:ne("--secondaryColor",Y.secondaryColor),fontFamily:ne("--fontFamily",Y.fontFamily)}},[j,Y])}(Se,re.general);((j,Y)=>{f.useEffect(()=>{Y.current&&(j?Y.current.classList.add("bot-logged-in"):Y.current.classList.remove("bot-logged-in"))},[j,Y])})(y!==!1,Se),(j=>{let{settings:Y,themeColors:ne}=j;f.useEffect(()=>{ne&&(Object.entries(ne).forEach(te=>{let[ie,ce]=te;ce&&document.documentElement.style.setProperty("--".concat(ie),ce)}),ne.primaryColor&&document.documentElement.style.setProperty("--rcb-header-background",ne.primaryColor),ne.secondaryColor&&document.documentElement.style.setProperty("--rcb-header-background-hover",ne.secondaryColor))},[ne]),f.useEffect(()=>{var te,ie;!((te=Y.header)===null||te===void 0)&&te.title&&typeof Y.header.title=="string"&&(Y.header.title=f.createElement("div",{key:"header-title"},f.createElement("h1",{className:"sr-only"},Y.header.title),f.createElement("span",{"aria-hidden":"true"},Y.header.title))),Y.device={desktopEnabled:!0,mobileEnabled:!0,applyMobileOptimizations:!1},Y.chatHistory={disabled:!0},Y.chatButton=Object.assign(Object.assign({},Y.chatButton),{icon:(ie=Y.header)===null||ie===void 0?void 0:ie.avatar}),Y.event=Object.assign(Object.assign({},Y.event),{rcbToggleChatWindow:!0})},[Y])})({settings:re,themeColors:le});const Ke=f.useMemo(()=>{const j=(ne=>{let{endpoint:te,ratingEndpoint:ie,agentRatingEndpoint:ce,apiKey:se,sessionId:Me,isResetting:He=()=>!1,isLoggedIn:be,allowAnonAccess:it=!1,loginUrl:Lt="/login",trackEvent:ge,getTurnstileToken:An,resetTurnstileToken:Ht,backendId:Ut,resourceContext:Ft}=ne;if(be===!1&&!it)return ge==null||ge({type:"chatbot_login_prompt_shown"}),{qa_loop:{message:"To ask questions, please log in first.",component:f.createElement(Xi,{loginUrl:Lt}),chatDisabled:!0,path:"qa_loop"}};let Ve=null,at=null,T=!1;const z={siteKey:null,token:null,pendingQuery:null,needsChallenge:!1};let W=null;if(!te)throw new Error("Q&A endpoint is required");return{qa_loop:{message:async X=>{var oe;W=X.injectMessage.bind(X);const{userInput:ue}=X;if(He&&He()||!ue||ue.trim()==="")return null;if(ue==="👍 Helpful"||ue==="👎 Not helpful"){if(Ve){const de=ue==="👍 Helpful",ve=at==="agent"?ce:ie;if(ve)try{const ye={"Content-Type":"application/json"};se&&(ye["X-API-KEY"]=se);const we=Me();we&&(ye["X-Session-ID"]=we,ye["X-Query-ID"]=Ve),await fetch(ve,{method:"POST",headers:ye,credentials:"include",body:JSON.stringify(at==="agent"?{query_id:Ve,rating:de?"helpful":"not_helpful",session_id:we}:{sessionId:we,queryId:Ve,rating:de?1:0})}),ge==null||ge({type:"chatbot_rating_sent",queryId:Ve,rating:de?"helpful":"not_helpful"})}catch(ye){Ie("Error sending feedback:",ye)}}return"Thanks for the feedback!"}try{const de=Zi();Ve=de,ge==null||ge({type:"chatbot_question_sent",queryId:de,questionLength:ue.length});const ve={"Content-Type":"application/json"};se&&(ve["X-API-KEY"]=se);const ye=Me();ye&&(ve["X-Session-ID"]=ye,ve["X-Query-ID"]=de);const we={query:ue,session_id:ye,question_id:de};Ut&&(we._backend=Ut),Ft&&(we.resource_context=Ft);const xe=An==null?void 0:An();xe&&(we.turnstile_token=xe),In("SENT to API",{session_id:ye,question_id:de});const Xe=Date.now(),Be=await fetch(te,{method:"POST",headers:ve,credentials:"include",body:JSON.stringify(we)});if(!Be.ok)throw new Error("API returned ".concat(Be.status));if((Be.headers.get("content-type")||"").includes("text/event-stream")){Ht==null||Ht();const Hn=(oe=Be.body)===null||oe===void 0?void 0:oe.getReader();if(!Hn)throw new Error("Response body is not readable");const Rr=new TextDecoder;let At="",dt="",vt=!1;try{for(;;){const{done:wt,value:lt}=await Hn.read();if(wt)break;At+=Rr.decode(lt,{stream:!0});let jt=At.indexOf(`
40
+ `))}function gc(e){let{getState:t,onResubmit:r,trackEvent:n,loginUrl:o}=e;const[a,A]=p.useState(!1),[s,i]=p.useState(0),l=t();return!l.siteKey||a?null:p.createElement(hc,{key:s,siteKey:l.siteKey,loginUrl:o,onVerify:async c=>{l.token=c,n==null||n({type:"chatbot_turnstile_completed"}),await r(c)==="needs_another_challenge"?i(d=>d+1):A(!0)},onError:()=>{A(!0),n==null||n({type:"chatbot_turnstile_error"})}})}const mc="#1a5b6e",yc="#107180",bc="Arial, sans-serif",Ai="Q&A Bot",vc="/chat-icon.svg",wc="Type your question here...",xc="Select an option to continue",Ec=!1,kc="Ask me a question!",li="/login",Cc={general:{showHeader:!0,showFooter:!0},tooltip:{mode:"CLOSE"},chatInput:{disabled:!1,characterLimit:5e3,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}},_r=p.forwardRef((e,t)=>{var r,n,o;const{apiKey:a,qaEndpoint:A,ratingEndpoint:s,capabilitiesEndpoint:i,agentRatingEndpoint:l,welcomeMessage:c,open:d,onOpenChange:u,isLoggedIn:f,allowAnonAccess:g=!1,actingUser:b,primaryColor:h,secondaryColor:w,botName:x,logo:m,placeholder:k,errorMessage:P,embedded:C,footerText:S,footerLink:I,tooltipText:Q,loginUrl:B,turnstileSiteKey:O,resourceContext:D,customFlow:M,onAnalyticsEvent:F}=e,_=p.useRef("bot_".concat(Math.random().toString(36).substr(2,9)));p.useEffect(()=>{ac()},[]);const U=p.useRef(null);U.current===null&&(U.current=ti(),In("CREATED",U.current));const N=p.useRef(!1),L=p.useRef({getSessionId:()=>U.current,isResetting:()=>N.current}),y=function(R){const[Y,re]=p.useState(null),[ne,ae]=p.useState("idle"),ue=p.useRef(null),Ae=p.useRef(null),Me=p.useRef(!0),Fe=p.useCallback(()=>{const we=window.turnstile;if(Ae.current&&(we!=null&&we.remove)){try{we.remove(Ae.current)}catch{}Ae.current=null}ue.current&&(ue.current.remove(),ue.current=null)},[]);return p.useEffect(()=>{if(Me.current=!0,!R)return ae("idle"),void re(null);ae("loading");const we=document.createElement("div");return we.style.position="fixed",we.style.left="-9999px",we.style.top="-9999px",we.style.width="0",we.style.height="0",we.style.overflow="hidden",we.setAttribute("aria-hidden","true"),document.body.appendChild(we),ue.current=we,ii().then(()=>{if(!Me.current)return;const at=window.turnstile;if(!at||!ue.current)return De("Turnstile API not available for silent verification"),void ae("failed");const Ht=at.render(ue.current,{sitekey:R,execution:"render","refresh-expired":"auto",callback:me=>{Me.current&&(nn("Silent verification succeeded"),re(me),ae("verified"))},"error-callback":()=>{Me.current&&(De("Turnstile silent verification failed"),re(null),ae("failed"))},"expired-callback":()=>{Me.current&&(nn("Token expired, awaiting refresh"),re(null),ae("loading"))}});Ae.current=Ht}).catch(at=>{Me.current&&(De("Failed to load Turnstile script for silent verification:",at),ae("failed"))}),()=>{Me.current=!1,Fe()}},[R,Fe]),{token:Y,status:ne,reset:p.useCallback(()=>{const we=window.turnstile;Ae.current&&(we!=null&&we.reset)&&(re(null),ae("loading"),we.reset(Ae.current),nn("Token consumed, resetting widget for fresh token"))},[])}}(O),W=p.useRef(null);W.current=y.token;const[v,V]=p.useState(f);p.useEffect(()=>{V(f)},[f]);const q=C!==void 0?C:Ec,G=p.useCallback(R=>{var Y;F&&F(Object.assign(Object.assign({},R),{timestamp:Date.now(),sessionId:(Y=U.current)!==null&&Y!==void 0?Y:void 0,pageUrl:typeof window<"u"?window.location.href:void 0,isEmbedded:q}))},[F,q]),X=p.useMemo(()=>{const R=Object.assign({},Cc);R.general=Object.assign(Object.assign({},R.general),{primaryColor:h||mc,secondaryColor:w||yc,fontFamily:bc,embedded:q});const Y=v===!1?[p.createElement(Xa,{key:"login-button",loginUrl:B||li,isHeaderButton:!0})]:[p.createElement(cc,{key:"history-button"}),p.createElement(Jl,{key:"user-icon"})];R.header={title:p.createElement("span",{style:{fontSize:14,fontWeight:500}},x||Ai),showAvatar:!0,avatar:m||vc,buttons:[...Y,ye.CLOSE_CHAT_BUTTON]},R.chatInput=Object.assign(Object.assign({},R.chatInput),{disabled:!1,enabledPlaceholderText:k||wc,disabledPlaceholderText:P||xc}),R.tooltip=Object.assign(Object.assign({},R.tooltip),{text:Q||kc});const re=S?I?p.createElement("a",{href:I,target:"_blank",rel:"noopener noreferrer",key:"footer-link"},S):p.createElement("span",{key:"footer-text"},S):null;return R.footer={text:re,buttons:[p.createElement(dc,{key:"new-chat-button"})]},R.chatWindow=Object.assign(Object.assign({},R.chatWindow),{defaultOpen:!!q}),R.event={rcbPreInjectMessage:!0,rcbPostInjectMessage:!0,rcbUserSubmitText:!0,rcbChangePath:!0,rcbToggleChatWindow:!0},R},[h,w,x,m,k,P,q,Q,v,B,S,I]),he=p.useRef(null),se=function(R){let Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return p.useMemo(()=>{const re=(ne,ae)=>{if(R.current){const ue=getComputedStyle(R.current).getPropertyValue(ne);if(ue&&ue.trim()!=="")return ue.trim();if(R.current.parentElement){const Ae=getComputedStyle(R.current.parentElement).getPropertyValue(ne);if(Ae&&Ae.trim()!=="")return Ae.trim()}}return ae};return{primaryColor:re("--primaryColor",Y.primaryColor),secondaryColor:re("--secondaryColor",Y.secondaryColor),fontFamily:re("--fontFamily",Y.fontFamily)}},[R,Y])}(he,X.general);((R,Y)=>{p.useEffect(()=>{Y.current&&(R?Y.current.classList.add("bot-logged-in"):Y.current.classList.remove("bot-logged-in"))},[R,Y])})(v!==!1,he),(R=>{let{settings:Y,themeColors:re}=R;p.useEffect(()=>{re&&(Object.entries(re).forEach(ne=>{let[ae,ue]=ne;ue&&document.documentElement.style.setProperty("--".concat(ae),ue)}),re.primaryColor&&document.documentElement.style.setProperty("--rcb-header-background",re.primaryColor),re.secondaryColor&&document.documentElement.style.setProperty("--rcb-header-background-hover",re.secondaryColor))},[re]),p.useEffect(()=>{var ne,ae;!((ne=Y.header)===null||ne===void 0)&&ne.title&&typeof Y.header.title=="string"&&(Y.header.title=p.createElement("div",{key:"header-title"},p.createElement("h1",{className:"sr-only"},Y.header.title),p.createElement("span",{"aria-hidden":"true"},Y.header.title))),Y.device={desktopEnabled:!0,mobileEnabled:!0,applyMobileOptimizations:!1},Y.chatHistory={disabled:!0},Y.chatButton=Object.assign(Object.assign({},Y.chatButton),{icon:(ae=Y.header)===null||ae===void 0?void 0:ae.avatar}),Y.event=Object.assign(Object.assign({},Y.event),{rcbToggleChatWindow:!0})},[Y])})({settings:X,themeColors:se});const Ke=p.useMemo(()=>{const R=(re=>{let{endpoint:ne,ratingEndpoint:ae,agentRatingEndpoint:ue,apiKey:Ae,sessionId:Me,isResetting:Fe=()=>!1,isLoggedIn:we,allowAnonAccess:at=!1,loginUrl:Ht="/login",trackEvent:me,getTurnstileToken:An,resetTurnstileToken:Ut,backendId:Ft,resourceContext:bt}=re;if(we===!1&&!at)return me==null||me({type:"chatbot_login_prompt_shown"}),{qa_loop:{message:"To ask questions, please log in first.",component:p.createElement(Xa,{loginUrl:Ht}),chatDisabled:!0,path:"qa_loop"}};let Ve=null,it=null,T=!1;const z={siteKey:null,token:null,pendingQuery:null,needsChallenge:!1};let K=null;if(!ne)throw new Error("Q&A endpoint is required");return{qa_loop:{message:async Z=>{var oe;K=Z.injectMessage.bind(Z);const{userInput:ce}=Z;if(Fe&&Fe()||!ce||ce.trim()==="")return null;if(ce==="👍 Helpful"||ce==="👎 Not helpful"){if(Ve){const de=ce==="👍 Helpful",be=it==="agent"?ue:ae;if(be)try{const ve={"Content-Type":"application/json"};Ae&&(ve["X-API-KEY"]=Ae);const xe=Me();xe&&(ve["X-Session-ID"]=xe,ve["X-Query-ID"]=Ve),await fetch(be,{method:"POST",headers:ve,credentials:"include",body:JSON.stringify(it==="agent"?{query_id:Ve,rating:de?"helpful":"not_helpful",session_id:xe}:{sessionId:xe,queryId:Ve,rating:de?1:0})}),me==null||me({type:"chatbot_rating_sent",queryId:Ve,rating:de?"helpful":"not_helpful"})}catch(ve){De("Error sending feedback:",ve)}}return"Thanks for the feedback!"}try{const de=Za();Ve=de,me==null||me({type:"chatbot_question_sent",queryId:de,questionLength:ce.length});const be={"Content-Type":"application/json"};Ae&&(be["X-API-KEY"]=Ae);const ve=Me();ve&&(be["X-Session-ID"]=ve,be["X-Query-ID"]=de),be["X-Origin"]=bt||"access";const xe={query:ce,session_id:ve,question_id:de};Ft&&(xe._backend=Ft),bt&&(xe.rp_name=bt);const Ee=An==null?void 0:An();Ee&&(xe.turnstile_token=Ee),In("SENT to API",{session_id:ve,question_id:de});const Xe=Date.now(),Be=await fetch(ne,{method:"POST",headers:be,credentials:"include",body:JSON.stringify(xe)});if(!Be.ok)throw new Error("API returned ".concat(Be.status));if((Be.headers.get("content-type")||"").includes("text/event-stream")){Ut==null||Ut();const Hn=(oe=Be.body)===null||oe===void 0?void 0:oe.getReader();if(!Hn)throw new Error("Response body is not readable");const Rr=new TextDecoder;let At="",dt="",wt=!1;try{for(;;){const{done:xt,value:lt}=await Hn.read();if(xt)break;At+=Rr.decode(lt,{stream:!0});let jt=At.indexOf(`
41
41
 
42
- `);for(;jt!==-1;){const Zc=At.slice(0,jt);At=At.slice(jt+2);let qt,Gt="",Un="";for(const _e of Zc.split(`
43
- `))_e.startsWith("event: ")?Gt=_e.slice(7):_e.startsWith("data: ")&&(Un=_e.slice(6));if(Gt&&Un){try{qt=JSON.parse(Un)}catch{$i("Failed to parse SSE data:",Un),jt=At.indexOf(`
42
+ `);for(;jt!==-1;){const $c=At.slice(0,jt);At=At.slice(jt+2);let qt,Gt="",Un="";for(const _e of $c.split(`
43
+ `))_e.startsWith("event: ")?Gt=_e.slice(7):_e.startsWith("data: ")&&(Un=_e.slice(6));if(Gt&&Un){try{qt=JSON.parse(Un)}catch{$a("Failed to parse SSE data:",Un),jt=At.indexOf(`
44
44
 
45
- `);continue}if(Gt==="status"){const _e=qt.message||"Processing...";await X.streamMessage("_".concat(_e,"_"),"BOT"),vt=!0}else if(Gt==="token"){dt+=qt.content||"";const _e=on(dt);await X.streamMessage(_e,"BOT")}else if(Gt==="done"){const _e=qt.metadata||{};if(at=_e.rating_target||null,T=_e.is_final_response===!0,dt)console.log("[SSE DEBUG] done: tokenContent exists, skipping streamMessage, calling endStreamMessage"),await X.endStreamMessage("BOT");else{const pa=qt.response||"";if(pa){const $c=on(pa);await X.streamMessage($c,"BOT"),vt=!0}vt&&await X.endStreamMessage("BOT")}}else if(Gt==="error"){const _e=qt.message||"An error occurred";Ie("SSE error event:",_e),vt?(await X.streamMessage(_e,"BOT"),await X.endStreamMessage("BOT")):await X.injectMessage(_e)}jt=At.indexOf(`
45
+ `);continue}if(Gt==="status"){const _e=qt.message||"Processing...";await Z.streamMessage("_".concat(_e,"_"),"BOT"),wt=!0}else if(Gt==="token"){dt+=qt.content||"";const _e=on(dt);await Z.streamMessage(_e,"BOT")}else if(Gt==="done"){const _e=qt.metadata||{};if(it=_e.rating_target||null,T=_e.is_final_response===!0,dt)console.log("[SSE DEBUG] done: tokenContent exists, skipping streamMessage, calling endStreamMessage"),await Z.endStreamMessage("BOT");else{const pi=qt.response||"";if(pi){const eu=on(pi);await Z.streamMessage(eu,"BOT"),wt=!0}wt&&await Z.endStreamMessage("BOT")}}else if(Gt==="error"){const _e=qt.message||"An error occurred";De("SSE error event:",_e),wt?(await Z.streamMessage(_e,"BOT"),await Z.endStreamMessage("BOT")):await Z.injectMessage(_e)}jt=At.indexOf(`
46
46
 
47
47
  `)}else jt=At.indexOf(`
48
48
 
49
- `)}}vt&&await X.endStreamMessage("BOT")}catch(wt){if(Ie("Error reading SSE stream:",wt),!vt)throw wt;await X.streamMessage("I had trouble completing the response. Please try again.","BOT"),await X.endStreamMessage("BOT")}const Rt=Date.now()-Xe;return ge==null||ge({type:"chatbot_answer_received",queryId:de,responseTimeMs:Rt,success:!0,responseLength:dt.length}),null}const Nn=Date.now()-Xe,st=await Be.json();if(st.requires_turnstile)return ge==null||ge({type:"chatbot_turnstile_shown",queryId:de}),z.siteKey=st.site_key,z.pendingQuery={query:ue,sessionId:ye,queryId:de},z.needsChallenge=!0,"One moment — verifying your session…";Ht==null||Ht();const zt=st.response||st.answer||st.text||st.message;if(!zt)throw new Error("Invalid response format from API");const Ln=st.metadata||{};at=Ln.rating_target||null,T=Ln.is_final_response===!0;const ut=on(zt),bt=Pt()?sa(st):"",ln=bt?"".concat(ut,`
49
+ `)}}wt&&await Z.endStreamMessage("BOT")}catch(xt){if(De("Error reading SSE stream:",xt),!wt)throw xt;await Z.streamMessage("I had trouble completing the response. Please try again.","BOT"),await Z.endStreamMessage("BOT")}const Rt=Date.now()-Xe;return me==null||me({type:"chatbot_answer_received",queryId:de,responseTimeMs:Rt,success:!0,responseLength:dt.length}),null}const Nn=Date.now()-Xe,st=await Be.json();if(st.requires_turnstile)return me==null||me({type:"chatbot_turnstile_shown",queryId:de}),z.siteKey=st.site_key,z.pendingQuery={query:ce,sessionId:ve,queryId:de},z.needsChallenge=!0,"One moment — verifying your session…";Ut==null||Ut();const zt=st.response||st.answer||st.text||st.message;if(!zt)throw new Error("Invalid response format from API");const Ln=st.metadata||{};it=Ln.rating_target||null,T=Ln.is_final_response===!0;const ut=on(zt),vt=St()?si(st):"",ln=vt?"".concat(ut,`
50
50
 
51
- `).concat(bt):ut;return await X.injectMessage(ln),ge==null||ge({type:"chatbot_answer_received",queryId:de,responseTimeMs:Nn,success:!0,responseLength:zt.length,hasMetadata:!!bt}),null}catch(de){return Ie("Error in Q&A flow:",de),ge==null||ge({type:"chatbot_answer_error",queryId:Ve??void 0,errorType:de instanceof Error?de.message:"unknown"}),"I apologize, but I'm having trouble processing your question. Please try again later."}},options:X=>He&&He()||X.userInput==="👍 Helpful"||X.userInput==="👎 Not helpful"||z.needsChallenge?[]:T&&at&&(at==="agent"?ce:ie)?["👍 Helpful","👎 Not helpful"]:[],renderMarkdown:["BOT"],chatDisabled:!1,component:f.createElement(hc,{getState:()=>z,onResubmit:async X=>{var oe;if(z.pendingQuery&&W)try{const ue={"Content-Type":"application/json"};se&&(ue["X-API-KEY"]=se),z.pendingQuery.sessionId&&(ue["X-Session-ID"]=z.pendingQuery.sessionId,ue["X-Query-ID"]=z.pendingQuery.queryId);const de={query:z.pendingQuery.query,session_id:z.pendingQuery.sessionId,question_id:z.pendingQuery.queryId,turnstile_token:X};Ut&&(de._backend=Ut),Ft&&(de.resource_context=Ft);const ve=await fetch(te,{method:"POST",headers:ue,credentials:"include",body:JSON.stringify(de)}),ye=z.pendingQuery.queryId;if(!ve.ok)throw new Error("API returned ".concat(ve.status," after Turnstile"));if((ve.headers.get("content-type")||"").includes("text/event-stream")){const zt=(oe=ve.body)===null||oe===void 0?void 0:oe.getReader();if(!zt)throw new Error("Response body is not readable");const Ln=new TextDecoder;let ut="",bt="",ln={};for(;;){const{done:Rr,value:At}=await zt.read();if(Rr)break;ut+=Ln.decode(At,{stream:!0});let dt=ut.indexOf(`
51
+ `).concat(vt):ut;return await Z.injectMessage(ln),me==null||me({type:"chatbot_answer_received",queryId:de,responseTimeMs:Nn,success:!0,responseLength:zt.length,hasMetadata:!!vt}),null}catch(de){return De("Error in Q&A flow:",de),me==null||me({type:"chatbot_answer_error",queryId:Ve??void 0,errorType:de instanceof Error?de.message:"unknown"}),"I apologize, but I'm having trouble processing your question. Please try again later."}},options:Z=>Fe&&Fe()||Z.userInput==="👍 Helpful"||Z.userInput==="👎 Not helpful"||z.needsChallenge?[]:T&&it&&(it==="agent"?ue:ae)?["👍 Helpful","👎 Not helpful"]:[],renderMarkdown:["BOT"],chatDisabled:!1,component:p.createElement(gc,{getState:()=>z,onResubmit:async Z=>{var oe;if(!z.pendingQuery||!K)return De("Turnstile resubmit called without pending query or injectMessage"),"error";try{const ce={"Content-Type":"application/json"};Ae&&(ce["X-API-KEY"]=Ae),z.pendingQuery.sessionId&&(ce["X-Session-ID"]=z.pendingQuery.sessionId,ce["X-Query-ID"]=z.pendingQuery.queryId),ce["X-Origin"]=bt||"access";const de={query:z.pendingQuery.query,session_id:z.pendingQuery.sessionId,question_id:z.pendingQuery.queryId,turnstile_token:Z};Ft&&(de._backend=Ft),bt&&(de.rp_name=bt);const be=await fetch(ne,{method:"POST",headers:ce,credentials:"include",body:JSON.stringify(de)}),ve=z.pendingQuery.queryId;if(!be.ok)throw new Error("API returned ".concat(be.status," after Turnstile"));if((be.headers.get("content-type")||"").includes("text/event-stream")){const zt=(oe=be.body)===null||oe===void 0?void 0:oe.getReader();if(!zt)throw new Error("Response body is not readable");const Ln=new TextDecoder;let ut="",vt="",ln={};for(;;){const{done:Rr,value:At}=await zt.read();if(Rr)break;ut+=Ln.decode(At,{stream:!0});let dt=ut.indexOf(`
52
52
 
53
- `);for(;dt!==-1;){const vt=ut.slice(0,dt);ut=ut.slice(dt+2);let Rt="",wt="";for(const lt of vt.split(`
54
- `))lt.startsWith("event: ")?Rt=lt.slice(7):lt.startsWith("data: ")&&(wt=lt.slice(6));if(Rt&&wt)try{const lt=JSON.parse(wt);Rt==="token"?bt+=lt.content||"":Rt==="done"&&(ln=lt.metadata||{})}catch{}dt=ut.indexOf(`
53
+ `);for(;dt!==-1;){const wt=ut.slice(0,dt);ut=ut.slice(dt+2);let Rt="",xt="";for(const lt of wt.split(`
54
+ `))lt.startsWith("event: ")?Rt=lt.slice(7):lt.startsWith("data: ")&&(xt=lt.slice(6));if(Rt&&xt)try{const lt=JSON.parse(xt);Rt==="token"?vt+=lt.content||"":Rt==="done"&&(ln=lt.metadata||{})}catch{}dt=ut.indexOf(`
55
55
 
56
- `)}}if(z.token=null,z.pendingQuery=null,z.needsChallenge=!1,z.siteKey=null,!bt)throw new Error("No content received from stream");at=ln.rating_target||null,T=ln.is_final_response===!0,Ve=ye;const Hn=on(bt);return await W(Hn),void(ge==null||ge({type:"chatbot_answer_received",queryId:ye,success:!0,responseLength:bt.length}))}const we=await ve.json();if(we.requires_turnstile)return z.siteKey=we.site_key,z.token=null,void await W("Still verifying — please complete the challenge again.");z.token=null,z.pendingQuery=null,z.needsChallenge=!1,z.siteKey=null;const xe=we.response||we.answer||we.text||we.message;if(!xe)throw new Error("Invalid response format from API");const Xe=we.metadata||{};at=Xe.rating_target||null,T=Xe.is_final_response===!0,Ve=ye;const Be=on(xe),Nn=Pt()?sa(we):"",st=Nn?"".concat(Be,`
56
+ `)}}if(z.token=null,z.pendingQuery=null,z.needsChallenge=!1,z.siteKey=null,!vt)throw new Error("No content received from stream");it=ln.rating_target||null,T=ln.is_final_response===!0,Ve=ve;const Hn=on(vt);return await K(Hn),me==null||me({type:"chatbot_answer_received",queryId:ve,success:!0,responseLength:vt.length}),"success"}const xe=await be.json();if(xe.requires_turnstile)return z.siteKey=xe.site_key,z.token=null,await K("Still verifying — please complete the challenge again."),"needs_another_challenge";z.token=null,z.pendingQuery=null,z.needsChallenge=!1,z.siteKey=null;const Ee=xe.response||xe.answer||xe.text||xe.message;if(!Ee)throw new Error("Invalid response format from API");const Xe=xe.metadata||{};it=Xe.rating_target||null,T=Xe.is_final_response===!0,Ve=ve;const Be=on(Ee),Nn=St()?si(xe):"",st=Nn?"".concat(Be,`
57
57
 
58
- `).concat(Nn):Be;await W(st),ge==null||ge({type:"chatbot_answer_received",queryId:ye,success:!0,responseLength:xe.length})}catch(ue){Ie("Error resubmitting after Turnstile:",ue),z.token=null,z.pendingQuery=null,z.needsChallenge=!1,z.siteKey=null,await(W==null?void 0:W("I had trouble processing your question after verification. Please try again."))}},trackEvent:ge,loginUrl:Lt}),path:"qa_loop"}}})({endpoint:A,ratingEndpoint:s,agentRatingEndpoint:l,apiKey:i,sessionId:U.current.getSessionId,isResetting:U.current.isResetting,isLoggedIn:y,allowAnonAccess:g,loginUrl:D||la,trackEvent:K,getTurnstileToken:()=>R.current,resetTurnstileToken:()=>b.reset(),backendId:e.backendId,resourceContext:B});return Object.assign(Object.assign({start:{message:c,renderMarkdown:["BOT"],transition:{duration:0},path:"qa_loop"}},j),M||{})},[i,A,s,l,c,y,g,D,M,v,K,B]),Ce=f.useMemo(()=>{return[()=>Ws(Y),Wl(),()=>Kl(j)];var j,Y},[]);return f.useEffect(()=>{const j=()=>{const ne=document.querySelector(".rcb-chat-window");if(!ne)return;const te=ne.querySelector(".rcb-send-button");te&&(te.hasAttribute("tabindex")||te.setAttribute("tabindex","0"),te.hasAttribute("data-keyboard-enabled")||(te.setAttribute("data-keyboard-enabled","true"),te.addEventListener("keydown",ie=>{if(ie.key==="Enter"||ie.key===" "){ie.preventDefault();const ce=te&&Object.keys(te).find(Me=>Me.startsWith("__reactProps"));if(ce){const Me=te[ce],He=Me==null?void 0:Me.onMouseDown;if(He&&typeof He=="function")return void He(ie)}const se=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});te.dispatchEvent(se)}})))},Y=setInterval(j,1e3);return j(),()=>clearInterval(Y)},[]),pc(),f.useEffect(()=>{const j=Se.current;if(!j)return;const Y=ne=>{var te,ie,ce;const se=(ie=(te=ne.target).closest)===null||ie===void 0?void 0:ie.call(te,"a");se&&se.closest(".rcb-chat-body-container")&&(se.classList.contains("qa-bot-login-button")||se.closest(".rcb-options-container")||K({type:"chatbot_link_clicked",linkUrl:se.href,linkText:((ce=se.textContent)===null||ce===void 0?void 0:ce.trim())||""}))};return j.addEventListener("click",Y),()=>j.removeEventListener("click",Y)},[K]),f.useEffect(()=>{if(!Z){const j=Y=>{const ne=Y.data.newState;d==null||d(ne);const te=L.current;K(ne?{type:"chatbot_open"}:{type:"chatbot_close",messageCount:te?na(te):0,durationMs:te?sc(te):0})};return window.addEventListener("rcb-toggle-chat-window",j),()=>{window.removeEventListener("rcb-toggle-chat-window",j)}}},[Z,d,K]),f.createElement("div",{className:"qa-bot ".concat(!((r=re.general)===null||r===void 0)&&r.embedded?"embedded-qa-bot":""),ref:Se,role:"region","aria-label":"".concat(x||Aa).concat(!((n=re.general)===null||n===void 0)&&n.embedded?" - Embedded":"")},f.createElement(Ac,{getSessionId:()=>L.current,setSessionId:j=>{const Y=L.current;L.current=j,In("RESTORED","".concat(Y==null?void 0:Y.slice(-12)," -> ").concat(j.slice(-12)))},resetSession:()=>{const j=L.current;O.current=!0,L.current=ta(),In("RESET","".concat(j==null?void 0:j.slice(-12)," -> ").concat(L.current.slice(-12)))},clearResettingFlag:()=>{O.current=!1}},f.createElement(Vl,{trackEvent:K},f.createElement(wo,null,f.createElement("div",null,f.createElement(dc,null),f.createElement(Wi,{ref:t,embedded:((o=re.general)===null||o===void 0?void 0:o.embedded)||!1,currentOpen:u||!1,enabled:y!==!1,onSetEnabled:j=>G(!!j&&void 0)}),f.createElement(Bs,{key:"chatbot-".concat(N.current,"-").concat(y),settings:re,flow:Ke,plugins:Ce}),f.createElement("div",{role:"status","aria-live":"polite","aria-label":"Bot response updates",className:"sr-only",id:"bot-live-region",style:{position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap",border:0}}),f.createElement("div",{id:"chat-input-help",className:"sr-only",style:{position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap",border:0}},"Type your message and press Enter to send. Use arrow keys to navigate through response options."))))))});_r.displayName="QABot",jr('.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%}.rcb-chat-tooltip{background-color:#1a5b6e;color:#fff}.rcb-chat-tooltip-tail{border-color:#0000 #0000 #0000 #1a5b6e}@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-bot-message ol,.rcb-bot-message ul{list-style-position:outside!important;margin:.5em 0!important;padding-left:1.5em!important}.rcb-bot-message li{margin-bottom:.25em!important}.rcb-bot-message li>p{display:inline!important;margin:0!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 Cc=()=>{const[e,t]=f.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(c=>{o.onloadedmetadata=()=>{o.play(),c()}});const i=document.createElement("canvas");i.width=o.videoWidth,i.height=o.videoHeight;const A=i.getContext("2d");if(!A)throw new Error("Could not get canvas context");A.drawImage(o,0,0,i.width,i.height);const s=await new Promise(c=>i.toBlob(c,"image/png"));if(!s)throw new Error("Could not create image blob");const a=new Date().toISOString().replace(/[:.]/g,"-"),l=new File([s],"screenshot-".concat(a,".png"),{type:"image/png"});return n.getTracks().forEach(c=>c.stop()),t(!1),l}catch(n){throw Ie("Error capturing screenshot:",n),t(!1),n}},isCapturing:e,isScreenCaptureAvailable:r()}},Pc=e=>f.createElement(oa,e,f.createElement("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),f.createElement("polyline",{points:"17 8 12 3 7 8"}),f.createElement("line",{x1:"12",y1:"3",x2:"12",y2:"15"})),Sc=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)}),Bc=e=>Promise.all(e.map(Sc)),Dc=e=>e<1024?"".concat(e," B"):e<1048576?"".concat((e/1024).toFixed(1)," KB"):"".concat((e/1048576).toFixed(1)," MB"),Qn=e=>{let{onFileUpload:t,maxSizeMB:r=10,acceptedTypes:n="image/*,application/pdf,text/*,.doc,.docx",enableScreenshot:o=!1,className:i}=e;const[A,s]=f.useState(!1),[a,l]=f.useState([]),[c,u]=f.useState(null),d=f.useRef(null),{captureScreenshot:p,isCapturing:g,isScreenCaptureAvailable:v}=Cc(),h=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)},w=C=>{if(!C||C.length===0)return void $i("FileUploadComponent: No valid files provided to handleFiles");let S;try{S=Array.from(C)}catch(_){return Ie("FileUploadComponent: Error converting files to array:",_),void h("Error processing selected files. Please try again.")}const I=[...a,...S];l(I);const Q=S.length,D=S.map(_=>_.name).join(", ");h("".concat(Q," file").concat(Q>1?"s":""," selected: ").concat(D)),setTimeout(()=>{const _=document.querySelector(".rcb-chat-content");_&&(_.scrollTop=_.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{d.current&&d.current.click()}catch(C){Ie("FileUploadComponent: Error in handleButtonClick:",C),h("Error opening file selection dialog. Please try again.")}},k=()=>{u(null)},P=o&&v;return f.createElement("div",{className:"file-upload-container ".concat(i||""),style:{padding:"16px",margin:"8px 0"}},P&&f.createElement("div",{style:{display:"flex",justifyContent:"center",marginBottom:"10px"}},f.createElement("button",{onClick:C=>{C.preventDefault(),(async()=>{try{const S=await p();w([S]),h("Screenshot captured successfully")}catch{h("Error capturing screenshot. Please try again.")}})()},disabled:g,"aria-describedby":"screenshot-help","aria-label":g?"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:g?"not-allowed":"pointer",fontSize:"14px",fontWeight:"500",boxShadow:"0 1px 3px rgba(0,0,0,0.2)"}},f.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"},f.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"}),f.createElement("circle",{cx:"12",cy:"13",r:"4"})),g?"Taking screenshot...":"Take screenshot..."),f.createElement("span",{id:"screenshot-help",className:"sr-only"},"Captures the current screen and adds it as an attachment")),f.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&&w(C.dataTransfer.files)}catch(I){Ie("FileUploadComponent: Error in handleDrop:",I),h("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"}},f.createElement("input",{ref:d,type:"file",className:"file-input",onChange:C=>{var S;try{!((S=C.target)===null||S===void 0)&&S.files&&C.target.files.length>0&&w(C.target.files)}catch(I){Ie("FileUploadComponent: Error in handleFileSelect:",I),h("Error processing selected files. Please try again.")}},multiple:!0,style:{display:"none"},"aria-label":"Select files to upload",accept:n}),f.createElement("div",{className:"upload-content",onClick:m,style:{cursor:"pointer",flexDirection:"column",alignItems:"center",display:"flex",textAlign:"center",padding:"12px"}},f.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"}},f.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"10px"}},f.createElement(Pc,null),f.createElement("p",{style:{margin:0,fontWeight:"bold"}},"Upload Files")),f.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)")),a.length>0&&f.createElement("div",{className:"selected-files",style:{display:"flex",flexWrap:"wrap",gap:"8px",marginTop:"12px",alignItems:"center"}},f.createElement("span",{style:{fontWeight:400,color:"#888",fontSize:"13px",marginRight:"8px",alignSelf:"center"}},"Selected files:"),a.map((C,S)=>f.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=>{u(Q)})(C)}},f.createElement("span",{onClick:I=>{I.stopPropagation(),(Q=>{const D=a.filter((_,B)=>B!==Q);l(D),t&&t(D)})(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," (",Dc(C.size),")"))))),(()=>{if(!c)return null;const C=c.type.startsWith("image/"),S=c.type.startsWith("text/"),I=c.type==="application/pdf";return f.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:k},f.createElement("div",{style:{backgroundColor:"white",padding:"20px",borderRadius:"8px",maxWidth:"90%",maxHeight:"90%",overflow:"auto",position:"relative"},onClick:Q=>Q.stopPropagation()},f.createElement("button",{onClick:k,style:{position:"absolute",top:"10px",right:"10px",background:"none",border:"none",fontSize:"24px",cursor:"pointer",color:"#666"}},"×"),f.createElement("h3",{style:{marginTop:0,marginBottom:"16px"}},c.name),C&&f.createElement("img",{src:URL.createObjectURL(c),alt:c.name,style:{maxWidth:"100%",maxHeight:"70vh"}}),S&&f.createElement("pre",{style:{whiteSpace:"pre-wrap",wordWrap:"break-word",maxHeight:"70vh",overflow:"auto",padding:"16px",backgroundColor:"#f5f5f5",borderRadius:"4px"}},URL.createObjectURL(c)),I&&f.createElement("iframe",{src:URL.createObjectURL(c),style:{width:"100%",height:"70vh",border:"none"},title:c.name}),!C&&!S&&!I&&f.createElement("div",{style:{padding:"20px",textAlign:"center"}},"Preview not available for this file type")))})())};function Ic(e,t){if(!t||Object.keys(t).length===0)return e;const r={};for(const[n,o]of Object.entries(e)){let i=Object.assign({},o);if(i.chatDisabled===void 0){const A=!(!i.options&&!i.checkboxes);i.chatDisabled=A}r[n]=i}return r}function Mn(e){return async t=>{const r=await e(t);await t.injectMessage(r)}}const Tc=f.forwardRef((e,t)=>{var{defaultOpen:r}=e,n=ga(e,["defaultOpen"]);const[o,i]=f.useState(r||!1),A=f.useRef(null);return f.useImperativeHandle(t,()=>({addMessage:s=>{var a;(a=A.current)===null||a===void 0||a.addMessage(s)},setBotEnabled:s=>{var a;(a=A.current)===null||a===void 0||a.setBotEnabled(s)},openChat:()=>{var s;i(!0),(s=A.current)===null||s===void 0||s.openChat()},closeChat:()=>{var s;i(!1),(s=A.current)===null||s===void 0||s.closeChat()},toggleChat:()=>{var s;i(a=>!a),(s=A.current)===null||s===void 0||s.toggleChat()}}),[]),f.createElement(_r,cn({ref:A},n,{open:o,onOpenChange:i}))});Tc.displayName="ProgrammaticQABot";const qe={QA_ENDPOINT:"http://localhost:8000/api/v1/query",RATING_ENDPOINT:"https://access-ai-grace1-external.ccs.uky.edu/access/chat/rating/",AGENT_ENDPOINT:"http://localhost:8000/api/v1",get CAPABILITIES_ENDPOINT(){return`${this.AGENT_ENDPOINT}/capabilities`},get AGENT_RATING_ENDPOINT(){return`${this.AGENT_ENDPOINT}/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:"4nn5l4T4TnkMdzsK0AwAtnGRcheBDnjawuAT42LaOLc",TURNSTILE_SITE_KEY:"1x00000000000000000000BB",ALLOW_ANON_ACCESS:!0},yt={BOT_NAME:"ACCESS Q&A",LOGO:"https://support.access-ci.org/themes/contrib/asp-theme/images/icons/ACCESS-arrrow.svg",WELCOME_MESSAGE:`Hello! I can answer questions about ACCESS resources, allocations, software, system status, events, and more. Click <strong>Show my options</strong> to see example queries, or just type your question.
58
+ `).concat(Nn):Be;return await K(st),me==null||me({type:"chatbot_answer_received",queryId:ve,success:!0,responseLength:Ee.length}),"success"}catch(ce){return De("Error resubmitting after Turnstile:",ce),z.token=null,z.pendingQuery=null,z.needsChallenge=!1,z.siteKey=null,await(K==null?void 0:K("I had trouble processing your question after verification. Please try again.")),"error"}},trackEvent:me,loginUrl:Ht}),path:"qa_loop"}}})({endpoint:A,ratingEndpoint:s,agentRatingEndpoint:l,apiKey:a,sessionId:L.current.getSessionId,isResetting:L.current.isResetting,isLoggedIn:v,allowAnonAccess:g,loginUrl:B||li,trackEvent:G,getTurnstileToken:()=>W.current,resetTurnstileToken:()=>y.reset(),backendId:e.backendId,resourceContext:D});return Object.assign(Object.assign({start:{message:c,renderMarkdown:["BOT"],transition:{duration:0},path:"qa_loop"}},R),M||{})},[a,A,s,l,c,v,g,B,M,b,G,D]),Pe=p.useMemo(()=>{return[()=>Ks(Y),Kl(),()=>Vl(R)];var R,Y},[]);return p.useEffect(()=>{const R=()=>{const re=document.querySelector(".rcb-chat-window");if(!re)return;const ne=re.querySelector(".rcb-send-button");ne&&(ne.hasAttribute("tabindex")||ne.setAttribute("tabindex","0"),ne.hasAttribute("data-keyboard-enabled")||(ne.setAttribute("data-keyboard-enabled","true"),ne.addEventListener("keydown",ae=>{if(ae.key==="Enter"||ae.key===" "){ae.preventDefault();const ue=ne&&Object.keys(ne).find(Me=>Me.startsWith("__reactProps"));if(ue){const Me=ne[ue],Fe=Me==null?void 0:Me.onMouseDown;if(Fe&&typeof Fe=="function")return void Fe(ae)}const Ae=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});ne.dispatchEvent(Ae)}})))},Y=setInterval(R,1e3);return R(),()=>clearInterval(Y)},[]),fc(),p.useEffect(()=>{const R=he.current;if(!R)return;const Y=re=>{var ne,ae,ue;const Ae=(ae=(ne=re.target).closest)===null||ae===void 0?void 0:ae.call(ne,"a");Ae&&Ae.closest(".rcb-chat-body-container")&&(Ae.classList.contains("qa-bot-login-button")||Ae.closest(".rcb-options-container")||G({type:"chatbot_link_clicked",linkUrl:Ae.href,linkText:((ue=Ae.textContent)===null||ue===void 0?void 0:ue.trim())||""}))};return R.addEventListener("click",Y),()=>R.removeEventListener("click",Y)},[G]),p.useEffect(()=>{if(!q){const R=Y=>{const re=Y.data.newState;u==null||u(re);const ne=U.current;G(re?{type:"chatbot_open"}:{type:"chatbot_close",messageCount:ne?ni(ne):0,durationMs:ne?Ac(ne):0})};return window.addEventListener("rcb-toggle-chat-window",R),()=>{window.removeEventListener("rcb-toggle-chat-window",R)}}},[q,u,G]),p.createElement("div",{className:"qa-bot ".concat(!((r=X.general)===null||r===void 0)&&r.embedded?"embedded-qa-bot":""),ref:he,role:"region","aria-label":"".concat(x||Ai).concat(!((n=X.general)===null||n===void 0)&&n.embedded?" - Embedded":"")},p.createElement(lc,{getSessionId:()=>U.current,setSessionId:R=>{const Y=U.current;U.current=R,In("RESTORED","".concat(Y==null?void 0:Y.slice(-12)," -> ").concat(R.slice(-12)))},resetSession:()=>{const R=U.current;N.current=!0,U.current=ti(),In("RESET","".concat(R==null?void 0:R.slice(-12)," -> ").concat(U.current.slice(-12)))},clearResettingFlag:()=>{N.current=!1}},p.createElement(Xl,{trackEvent:G},p.createElement(wo,null,p.createElement("div",null,p.createElement(pc,null),p.createElement(Wa,{ref:t,embedded:((o=X.general)===null||o===void 0?void 0:o.embedded)||!1,currentOpen:d||!1,enabled:v!==!1,onSetEnabled:R=>V(!!R&&void 0)}),p.createElement(Bs,{key:"chatbot-".concat(_.current,"-").concat(v),settings:X,flow:Ke,plugins:Pe}),p.createElement("div",{role:"status","aria-live":"polite","aria-label":"Bot response updates",className:"sr-only",id:"bot-live-region",style:{position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap",border:0}}),p.createElement("div",{id:"chat-input-help",className:"sr-only",style:{position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap",border:0}},"Type your message and press Enter to send. Use arrow keys to navigate through response options."))))))});_r.displayName="QABot",jr('.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%}.rcb-chat-tooltip{background-color:#1a5b6e;color:#fff}.rcb-chat-tooltip-tail{border-color:#0000 #0000 #0000 #1a5b6e}@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-bot-message ol,.rcb-bot-message ul{list-style-position:outside!important;margin:.5em 0!important;padding-left:1.5em!important}.rcb-bot-message li{margin-bottom:.25em!important}.rcb-bot-message li>p{display:inline!important;margin:0!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 Pc=()=>{const[e,t]=p.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(c=>{o.onloadedmetadata=()=>{o.play(),c()}});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(c=>a.toBlob(c,"image/png"));if(!s)throw new Error("Could not create image blob");const i=new Date().toISOString().replace(/[:.]/g,"-"),l=new File([s],"screenshot-".concat(i,".png"),{type:"image/png"});return n.getTracks().forEach(c=>c.stop()),t(!1),l}catch(n){throw De("Error capturing screenshot:",n),t(!1),n}},isCapturing:e,isScreenCaptureAvailable:r()}},Sc=e=>p.createElement(oi,e,p.createElement("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),p.createElement("polyline",{points:"17 8 12 3 7 8"}),p.createElement("line",{x1:"12",y1:"3",x2:"12",y2:"15"})),Dc=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)}),Bc=e=>Promise.all(e.map(Dc)),Ic=e=>e<1024?"".concat(e," B"):e<1048576?"".concat((e/1024).toFixed(1)," KB"):"".concat((e/1048576).toFixed(1)," MB"),Qn=e=>{let{onFileUpload:t,maxSizeMB:r=10,acceptedTypes:n="image/*,application/pdf,text/*,.doc,.docx",enableScreenshot:o=!1,className:a}=e;const[A,s]=p.useState(!1),[i,l]=p.useState([]),[c,d]=p.useState(null),u=p.useRef(null),{captureScreenshot:f,isCapturing:g,isScreenCaptureAvailable:b}=Pc(),h=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)},w=C=>{if(!C||C.length===0)return void $a("FileUploadComponent: No valid files provided to handleFiles");let S;try{S=Array.from(C)}catch(O){return De("FileUploadComponent: Error converting files to array:",O),void h("Error processing selected files. Please try again.")}const I=[...i,...S];l(I);const Q=S.length,B=S.map(O=>O.name).join(", ");h("".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){De("FileUploadComponent: Error in handleButtonClick:",C),h("Error opening file selection dialog. Please try again.")}},k=()=>{d(null)},P=o&&b;return p.createElement("div",{className:"file-upload-container ".concat(a||""),style:{padding:"16px",margin:"8px 0"}},P&&p.createElement("div",{style:{display:"flex",justifyContent:"center",marginBottom:"10px"}},p.createElement("button",{onClick:C=>{C.preventDefault(),(async()=>{try{const S=await f();w([S]),h("Screenshot captured successfully")}catch{h("Error capturing screenshot. Please try again.")}})()},disabled:g,"aria-describedby":"screenshot-help","aria-label":g?"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:g?"not-allowed":"pointer",fontSize:"14px",fontWeight:"500",boxShadow:"0 1px 3px rgba(0,0,0,0.2)"}},p.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"},p.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"}),p.createElement("circle",{cx:"12",cy:"13",r:"4"})),g?"Taking screenshot...":"Take screenshot..."),p.createElement("span",{id:"screenshot-help",className:"sr-only"},"Captures the current screen and adds it as an attachment")),p.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&&w(C.dataTransfer.files)}catch(I){De("FileUploadComponent: Error in handleDrop:",I),h("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"}},p.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&&w(C.target.files)}catch(I){De("FileUploadComponent: Error in handleFileSelect:",I),h("Error processing selected files. Please try again.")}},multiple:!0,style:{display:"none"},"aria-label":"Select files to upload",accept:n}),p.createElement("div",{className:"upload-content",onClick:m,style:{cursor:"pointer",flexDirection:"column",alignItems:"center",display:"flex",textAlign:"center",padding:"12px"}},p.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"}},p.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"10px"}},p.createElement(Sc,null),p.createElement("p",{style:{margin:0,fontWeight:"bold"}},"Upload Files")),p.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&&p.createElement("div",{className:"selected-files",style:{display:"flex",flexWrap:"wrap",gap:"8px",marginTop:"12px",alignItems:"center"}},p.createElement("span",{style:{fontWeight:400,color:"#888",fontSize:"13px",marginRight:"8px",alignSelf:"center"}},"Selected files:"),i.map((C,S)=>p.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)}},p.createElement("span",{onClick:I=>{I.stopPropagation(),(Q=>{const B=i.filter((O,D)=>D!==Q);l(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," (",Ic(C.size),")"))))),(()=>{if(!c)return null;const C=c.type.startsWith("image/"),S=c.type.startsWith("text/"),I=c.type==="application/pdf";return p.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:k},p.createElement("div",{style:{backgroundColor:"white",padding:"20px",borderRadius:"8px",maxWidth:"90%",maxHeight:"90%",overflow:"auto",position:"relative"},onClick:Q=>Q.stopPropagation()},p.createElement("button",{onClick:k,style:{position:"absolute",top:"10px",right:"10px",background:"none",border:"none",fontSize:"24px",cursor:"pointer",color:"#666"}},"×"),p.createElement("h3",{style:{marginTop:0,marginBottom:"16px"}},c.name),C&&p.createElement("img",{src:URL.createObjectURL(c),alt:c.name,style:{maxWidth:"100%",maxHeight:"70vh"}}),S&&p.createElement("pre",{style:{whiteSpace:"pre-wrap",wordWrap:"break-word",maxHeight:"70vh",overflow:"auto",padding:"16px",backgroundColor:"#f5f5f5",borderRadius:"4px"}},URL.createObjectURL(c)),I&&p.createElement("iframe",{src:URL.createObjectURL(c),style:{width:"100%",height:"70vh",border:"none"},title:c.name}),!C&&!S&&!I&&p.createElement("div",{style:{padding:"20px",textAlign:"center"}},"Preview not available for this file type")))})())};function Tc(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 Mn(e){return async t=>{const r=await e(t);await t.injectMessage(r)}}const Qc=p.forwardRef((e,t)=>{var{defaultOpen:r}=e,n=mi(e,["defaultOpen"]);const[o,a]=p.useState(r||!1),A=p.useRef(null);return p.useImperativeHandle(t,()=>({addMessage:s=>{var i;(i=A.current)===null||i===void 0||i.addMessage(s)},setBotEnabled:s=>{var i;(i=A.current)===null||i===void 0||i.setBotEnabled(s)},openChat:()=>{var s;a(!0),(s=A.current)===null||s===void 0||s.openChat()},closeChat:()=>{var s;a(!1),(s=A.current)===null||s===void 0||s.closeChat()},toggleChat:()=>{var s;a(i=>!i),(s=A.current)===null||s===void 0||s.toggleChat()}}),[]),p.createElement(_r,cn({ref:A},n,{open:o,onOpenChange:a}))});Qc.displayName="ProgrammaticQABot";const Ne={QA_ENDPOINT:"https://qa-bot-proxy.netlify.app/api/chat",RATING_ENDPOINT:"https://access-ai-grace1-external.ccs.uky.edu/access/chat/rating/",BACKEND_ID:"access",AGENT_ENABLED:!1,AGENT_ENDPOINT:"http://localhost:8000/api/v1",get CAPABILITIES_ENDPOINT(){return`${this.AGENT_ENDPOINT}/capabilities`},get AGENT_RATING_ENDPOINT(){return`${this.AGENT_ENDPOINT}/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",TURNSTILE_SITE_KEY:"0x4AAAAAACyJamk8FS7-RSMr",ALLOW_ANON_ACCESS:!0},yt={BOT_NAME:"ACCESS Q&A",LOGO:"https://support.access-ci.org/themes/contrib/asp-theme/images/icons/ACCESS-arrrow.svg",WELCOME_MESSAGE:`Hello! I can answer questions about ACCESS resources, allocations, and more. Choose an option below or just type your question.
59
59
 
60
- <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>`,LOGIN_URL:"/login",PRIMARY_COLOR:"#1a5b6e",SECONDARY_COLOR:"#107180",TOOLTIP:"Ask me about ACCESS! 😊"},ca={SESSION_ID:"access-qa-bot-session-id"};function Qc({welcome:e,trackEvent:t}){return{start:{message:e,renderHtml:["BOT"],options:["Show my options"],chatDisabled:!1,path:r=>(t({type:"chatbot_menu_selected",selection:r.userInput}),"qa_loop")}}}let Nr=null;function Mc(e){Nr=e}function V(){return Nr?Nr.ticketForm||{}:(console.warn("Form context not available, returning empty form"),{})}function Te(e={}){const t=V();return{...t,email:e.email||t.email,name:e.name||t.name,accessId:e.accessId||t.accessId}}function Lr(e){return e&&e.length>0?`
61
- Attachments: ${e.length} file(s) attached`:""}const Nt={SUPPORT:17,LOGIN_ACCESS:30,LOGIN_PROVIDER:31,SECURITY:26};async function Oc(e,t="support",r=[]){const o={support:Nt.SUPPORT,general_help:Nt.SUPPORT,loginAccess:Nt.LOGIN_ACCESS,loginProvider:Nt.LOGIN_PROVIDER,security:Nt.SECURITY}[t]||Nt.SUPPORT,A={serviceDeskId:t==="security"?3:2,requestTypeId:o,requestFieldValues:{...e}};return r.length>0&&(A.attachments=await Bc(r)),A}async function _c(e,t){var o,i;const n=`${qe.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 a="";try{const l=await A.text();try{const c=JSON.parse(l);a=c.message||c.error||l}catch{a=l}}catch{a=`HTTP ${A.status} ${A.statusText}`}return A.status===403?a="The ticket service is temporarily unavailable. Please try again later or contact support directly.":A.status===404?a="Ticket service not found. Please try again later.":A.status===500?a="Server error. Please try again later.":A.status===401&&(a="Authentication error with the ticket service. Please contact support."),{success:!1,status:A.status,error:a}}const s=await A.json();return{success:!0,ticketKey:(o=s.data)==null?void 0:o.ticketKey,ticketUrl:(i=s.data)==null?void 0:i.ticketUrl}}catch(A){return{success:!1,error:A instanceof Error?A.message:"Unknown error"}}}async function On(e,t,r=[]){try{const n=await Oc(e,t,r);return await _c(n,t==="security"?"security-incidents":"tickets")}catch(n){return{success:!1,error:n instanceof Error?n.message:"Unknown error"}}}function Hr(e,t="ticket"){return e?e.success?e.ticketUrl&&e.ticketKey?`Your ${t} has been submitted successfully.
60
+ <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>`,LOGIN_URL:"/login",PRIMARY_COLOR:"#1a5b6e",SECONDARY_COLOR:"#107180",TOOLTIP:"Ask me about ACCESS! 😊"},ci={SESSION_ID:"access-qa-bot-session-id"};function Mc({welcome:e,setTicketForm:t,trackEvent:r}){return{start:{message:e,renderHtml:["BOT"],options:["Ask a question","Open a help ticket","Report a security issue","Ask about metrics"],chatDisabled:!1,path:n=>{const o=n.userInput;switch(r({type:"chatbot_menu_selected",selection:o}),o){case"Open a help ticket":return t({}),"help_ticket";case"Report a security issue":return t({}),r({type:"chatbot_security_started"}),"security_incident";case"Ask about metrics":return"metrics_intro";default:return"qa_loop"}}}}}let Nr=null;function Oc(e){Nr=e}function J(){return Nr?Nr.ticketForm||{}:(console.warn("Form context not available, returning empty form"),{})}function Te(e={}){const t=J();return{...t,email:e.email||t.email,name:e.name||t.name,accessId:e.accessId||t.accessId}}function Lr(e){return e&&e.length>0?`
61
+ Attachments: ${e.length} file(s) attached`:""}const Lt={SUPPORT:17,LOGIN_ACCESS:30,LOGIN_PROVIDER:31,SECURITY:26};async function _c(e,t="support",r=[]){const o={support:Lt.SUPPORT,general_help:Lt.SUPPORT,loginAccess:Lt.LOGIN_ACCESS,loginProvider:Lt.LOGIN_PROVIDER,security:Lt.SECURITY}[t]||Lt.SUPPORT,A={serviceDeskId:t==="security"?3:2,requestTypeId:o,requestFieldValues:{...e}};return r.length>0&&(A.attachments=await Bc(r)),A}async function Nc(e,t){var o,a;const n=`${Ne.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 l=await A.text();try{const c=JSON.parse(l);i=c.message||c.error||l}catch{i=l}}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 On(e,t,r=[]){try{const n=await _c(e,t,r);return await Nc(n,t==="security"?"security-incidents":"tickets")}catch(n){return{success:!1,error:n instanceof Error?n.message:"Unknown error"}}}function Hr(e,t="ticket"){return e?e.success?e.ticketUrl&&e.ticketKey?`Your ${t} has been submitted successfully.
62
62
 
63
63
  Ticket: <a href="${e.ticketUrl}" target="_blank">${e.ticketKey}</a>
64
64
 
@@ -68,50 +68,50 @@ Our support team will review your request and respond accordingly. Thank you for
68
68
 
69
69
  Please try again or contact our support team directly.`:`We apologize, but there was an error submitting your ${t}.
70
70
 
71
- Please try again or contact our support team directly.`}function _n(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 an(){return()=>({success:!0})}function sn(e){return!e||e.trim()===""||e.trim().toLowerCase()==="skip"?"":e.trim()}function Nc({ticketForm:e,setTicketForm:t,userInfo:r,trackEvent:n}){let o=null;const i=async(s,a=[])=>{o=await On(s,"loginAccess",a),o.success?(t(l=>({...l,ticketKey:o.ticketKey,ticketUrl:o.ticketUrl})),n({type:"chatbot_ticket_submitted",ticketType:"access_login",success:!0,ticketKey:o.ticketKey})):(t(l=>({...l,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:
71
+ Please try again or contact our support team directly.`}function _n(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 an(){return()=>({success:!0})}function sn(e){return!e||e.trim()===""||e.trim().toLowerCase()==="skip"?"":e.trim()}function Lc({ticketForm:e,setTicketForm:t,userInfo:r,trackEvent:n}){let o=null;const a=async(s,i=[])=>{o=await On(s,"loginAccess",i),o.success?(t(l=>({...l,ticketKey:o.ticketKey,ticketUrl:o.ticketUrl})),n({type:"chatbot_ticket_submitted",ticketType:"access_login",success:!0,ticketKey:o.ticketKey})):(t(l=>({...l,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:
72
72
 
73
73
  • Make sure you're using a supported browser (Chrome, Firefox, Safari)
74
74
  • Clear your browser cookies and cache
75
75
  • Check if you're using the correct identity provider
76
76
 
77
- 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 a=V();t({...a,description:s.userInput,email:r.email||a.email,name:r.name||a.name,accessId:r.accessId||a.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 a=V();t({...a,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 a=V();t({...a,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 a=V();t({...a,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 a=Te(r);return a.email?a.name?a.accessId?"access_login_summary":"access_login_accessid":"access_login_name":"access_login_email"}},access_login_upload:{message:"Please upload your screenshot.",component:E.jsx(Qn,{onFileUpload:s=>{t(a=>({...a,uploadedFiles:s})),s.forEach(a=>{n({type:"chatbot_file_uploaded",fileType:a.type||"unknown",fileSize:a.size})})},enableScreenshot:!0,maxSizeMB:10}),options:["Continue"],function:()=>{const s=V();t({...s,uploadConfirmed:!0}),n({type:"chatbot_ticket_step",ticketType:"access_login",step:"file_upload"})},path:()=>{const s=Te(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:_n,function:s=>{const a=V();t({...a,email:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"access_login",step:"email"})},path:()=>{const s=Te(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 a=V();t({...a,name:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"access_login",step:"name"})},path:()=>Te(r).accessId?"access_login_summary":"access_login_accessid"},access_login_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:an(),function:s=>{const a=V();t({...a,accessId:sn(s.userInput)}),n({type:"chatbot_ticket_step",ticketType:"access_login",step:"access_id"})},path:"access_login_summary"},access_login_summary:{message:s=>{const a=V(),l=Te(r),c=Lr(a.uploadedFiles);let u=l.accessId;return s.prevPath==="access_login_accessid"&&s.userInput&&(u=s.userInput),`Thank you for providing your ACCESS login issue details. Here's a summary:
77
+ 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=J();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=J();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=J();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=J();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=Te(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:E.jsx(Qn,{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=J();t({...s,uploadConfirmed:!0}),n({type:"chatbot_ticket_step",ticketType:"access_login",step:"file_upload"})},path:()=>{const s=Te(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:_n,function:s=>{const i=J();t({...i,email:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"access_login",step:"email"})},path:()=>{const s=Te(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=J();t({...i,name:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"access_login",step:"name"})},path:()=>Te(r).accessId?"access_login_summary":"access_login_accessid"},access_login_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:an(),function:s=>{const i=J();t({...i,accessId:sn(s.userInput)}),n({type:"chatbot_ticket_step",ticketType:"access_login",step:"access_id"})},path:"access_login_summary"},access_login_summary:{message:s=>{const i=J(),l=Te(r),c=Lr(i.uploadedFiles);let d=l.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:
78
78
 
79
79
  Name: ${l.name||"Not provided"}
80
80
  Email: ${l.email||"Not provided"}
81
- ACCESS ID: ${u||"Not provided"}
82
- Identity Provider: ${a.identityProvider||"Not provided"}
83
- Browser: ${a.browser||"Not provided"}
84
- Issue Description: ${a.description||"Not provided"}${c}
81
+ ACCESS ID: ${d||"Not provided"}
82
+ Identity Provider: ${i.identityProvider||"Not provided"}
83
+ Browser: ${i.browser||"Not provided"}
84
+ Issue Description: ${i.description||"Not provided"}${c}
85
85
 
86
- 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 a=V(),l=Te(r),c={email:l.email||"",name:l.name||"",accessId:l.accessId||"",description:a.description||"",identityProvider:a.identityProvider||"",browser:a.browser||""};await i(c,a.uploadedFiles||[])}},path:s=>s.userInput==="Submit Ticket"?"access_login_success":"start"},access_login_success:{message:Mn(()=>Hr(o,"ACCESS login ticket")),options:["Back to Main Menu"],renderHtml:["BOT"],path:"start"}}}function Lc({ticketForm:e,setTicketForm:t,userInfo:r,trackEvent:n}){let o=null;const i=async(s,a=[])=>{o=await On(s,"loginProvider",a),o.success?(t(l=>({...l,ticketKey:o.ticketKey,ticketUrl:o.ticketUrl})),n({type:"chatbot_ticket_submitted",ticketType:"resource_login",success:!0,ticketKey:o.ticketKey})):(t(l=>({...l,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:
86
+ 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=J(),l=Te(r),c={email:l.email||"",name:l.name||"",accessId:l.accessId||"",description:i.description||"",identityProvider:i.identityProvider||"",browser:i.browser||""};await a(c,i.uploadedFiles||[])}},path:s=>s.userInput==="Submit Ticket"?"access_login_success":"start"},access_login_success:{message:Mn(()=>Hr(o,"ACCESS login ticket")),options:["Back to Main Menu"],renderHtml:["BOT"],path:"start"}}}function Hc({ticketForm:e,setTicketForm:t,userInfo:r,trackEvent:n}){let o=null;const a=async(s,i=[])=>{o=await On(s,"loginProvider",i),o.success?(t(l=>({...l,ticketKey:o.ticketKey,ticketUrl:o.ticketUrl})),n({type:"chatbot_ticket_submitted",ticketType:"resource_login",success:!0,ticketKey:o.ticketKey})):(t(l=>({...l,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:
87
87
 
88
88
  • Ensure your allocation is active
89
89
  • Confirm you have the correct username for that resource
90
90
  • Check <a href="https://operations.access-ci.org/infrastructure_news_view">System Status News</a> to see if the resource is undergoing maintenance
91
91
 
92
- 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 a=V();t({...a,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 a=V();t({...a,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 a=V();t({...a,description:s.userInput,email:r.email||a.email,name:r.name||a.name,accessId:r.accessId||a.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 a=V();t({...a,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 a=Te(r);return a.email?a.name?a.accessId?"resource_login_summary":"resource_login_accessid":"resource_login_name":"resource_login_email"}},resource_login_upload:{message:"Please upload your screenshot.",component:E.jsx(Qn,{onFileUpload:s=>{t(a=>({...a,uploadedFiles:s})),s.forEach(a=>{n({type:"chatbot_file_uploaded",fileType:a.type||"unknown",fileSize:a.size})})},enableScreenshot:!0,maxSizeMB:10}),options:["Continue"],function:()=>{const s=V();t({...s,uploadConfirmed:!0}),n({type:"chatbot_ticket_step",ticketType:"resource_login",step:"file_upload"})},path:()=>{const s=Te(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:_n,function:s=>{const a=V();t({...a,email:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"resource_login",step:"email"})},path:()=>{const s=Te(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 a=V();t({...a,name:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"resource_login",step:"name"})},path:()=>Te(r).accessId?"resource_login_summary":"resource_login_accessid"},resource_login_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:an(),function:s=>{const a=V();t({...a,accessId:sn(s.userInput)}),n({type:"chatbot_ticket_step",ticketType:"resource_login",step:"access_id"})},path:"resource_login_summary"},resource_login_summary:{message:s=>{const a=V(),l=Te(r),c=Lr(a.uploadedFiles);let u=l.accessId;return s.prevPath==="resource_login_accessid"&&s.userInput&&(u=s.userInput),`Thank you for providing your resource login issue details. Here's a summary:
92
+ 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=J();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=J();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=J();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=J();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=Te(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:E.jsx(Qn,{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=J();t({...s,uploadConfirmed:!0}),n({type:"chatbot_ticket_step",ticketType:"resource_login",step:"file_upload"})},path:()=>{const s=Te(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:_n,function:s=>{const i=J();t({...i,email:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"resource_login",step:"email"})},path:()=>{const s=Te(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=J();t({...i,name:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"resource_login",step:"name"})},path:()=>Te(r).accessId?"resource_login_summary":"resource_login_accessid"},resource_login_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:an(),function:s=>{const i=J();t({...i,accessId:sn(s.userInput)}),n({type:"chatbot_ticket_step",ticketType:"resource_login",step:"access_id"})},path:"resource_login_summary"},resource_login_summary:{message:s=>{const i=J(),l=Te(r),c=Lr(i.uploadedFiles);let d=l.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:
93
93
 
94
94
  Name: ${l.name||"Not provided"}
95
95
  Email: ${l.email||"Not provided"}
96
- ACCESS ID: ${u||"Not provided"}
97
- Resource: ${a.resource||"Not provided"}
98
- Resource User ID: ${a.userIdResource||"Not provided"}
99
- Issue Description: ${a.description||"Not provided"}${c}
96
+ ACCESS ID: ${d||"Not provided"}
97
+ Resource: ${i.resource||"Not provided"}
98
+ Resource User ID: ${i.userIdResource||"Not provided"}
99
+ Issue Description: ${i.description||"Not provided"}${c}
100
100
 
101
- Would you like to submit this ticket?`},options:["Submit Ticket","Back to Main Menu"],function:async s=>{if(s.userInput==="Submit Ticket"){const a=V(),l=Te(r),c={email:l.email||"",name:l.name||"",accessId:l.accessId||"",accessResource:a.resource||"",description:a.description||"",userIdAtResource:a.userIdResource||""};await i(c,a.uploadedFiles||[])}},path:s=>s.userInput==="Submit Ticket"?"resource_login_success":"start"},resource_login_success:{message:Mn(()=>Hr(o,"resource login ticket")),options:["Back to Main Menu"],renderHtml:["BOT"],path:"start"}}}const Hc=[" 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"],Uc=["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 Fc({ticketForm:e,setTicketForm:t,userInfo:r,trackEvent:n}){let o=null;const i=async(s,a=[])=>{o=await On(s,"support",a),o.success?(t(l=>({...l,ticketKey:o.ticketKey,ticketUrl:o.ticketUrl})),n({type:"chatbot_ticket_submitted",ticketType:"general_help",success:!0,ticketKey:o.ticketKey})):(t(l=>({...l,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 a=V();t({...a,summary:s.userInput,email:r.email||a.email,name:r.name||a.name,accessId:r.accessId||a.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 a=V();t({...a,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 a=V();t({...a,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 a=V();t({...a,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:E.jsx(Qn,{onFileUpload:s=>{t(a=>({...a,uploadedFiles:s})),s.forEach(a=>{n({type:"chatbot_file_uploaded",fileType:a.type||"unknown",fileSize:a.size})})},enableScreenshot:!0,maxSizeMB:10}),options:["Continue"],function:()=>{const s=V();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 a=V();t({...a,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:Uc,function:s=>{const a=V();t({...a,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:an(),function:s=>{const a=V();t({...a,userIdAtResource:sn(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:Hc,min:0,max:5},function:s=>{const a=V();t({...a,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 a=V(),l=a.keywords||[],c=s.userInput,d=(Array.isArray(l)?[...l]:String(l).split(",").map(g=>g.trim())).filter(g=>g!=="I don't see a relevant keyword"),p=d.length>0?[...d,c].join(", "):c;t({...a,keywords:p,suggestedKeyword:c}),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 a=V();t({...a,priority:s.userInput.toLowerCase()}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"priority"})},path:()=>{const s=Te(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:_n,function:s=>{const a=V();t({...a,email:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"email"})},path:()=>{const s=Te(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 a=V();t({...a,name:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"name"})},path:()=>Te(r).accessId?"general_help_ticket_summary":"general_help_accessid"},general_help_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:an(),function:s=>{const a=V();t({...a,accessId:sn(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 a=V(),l=Te(r),c=Lr(a.uploadedFiles);let u=l.accessId;s.prevPath==="general_help_accessid"&&s.userInput&&(u=s.userInput);let d="";return a.involvesResource==="yes"&&(d=`
102
- Resource: ${a.resourceDetails||"Not specified"}`,a.userIdAtResource&&(d+=`
103
- User ID at Resource: ${a.userIdAtResource}`)),`Thank you for providing your issue details. Here's a summary:
101
+ Would you like to submit this ticket?`},options:["Submit Ticket","Back to Main Menu"],function:async s=>{if(s.userInput==="Submit Ticket"){const i=J(),l=Te(r),c={email:l.email||"",name:l.name||"",accessId:l.accessId||"",accessResource:i.resource||"",description:i.description||"",userIdAtResource:i.userIdResource||""};await a(c,i.uploadedFiles||[])}},path:s=>s.userInput==="Submit Ticket"?"resource_login_success":"start"},resource_login_success:{message:Mn(()=>Hr(o,"resource login ticket")),options:["Back to Main Menu"],renderHtml:["BOT"],path:"start"}}}const Uc=[" 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"],Fc=["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 zc({ticketForm:e,setTicketForm:t,userInfo:r,trackEvent:n}){let o=null;const a=async(s,i=[])=>{o=await On(s,"support",i),o.success?(t(l=>({...l,ticketKey:o.ticketKey,ticketUrl:o.ticketUrl})),n({type:"chatbot_ticket_submitted",ticketType:"general_help",success:!0,ticketKey:o.ticketKey})):(t(l=>({...l,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=J();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=J();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=J();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=J();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:E.jsx(Qn,{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=J();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=J();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:Fc,function:s=>{const i=J();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:an(),function:s=>{const i=J();t({...i,userIdAtResource:sn(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:Uc,min:0,max:5},function:s=>{const i=J();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=J(),l=i.keywords||[],c=s.userInput,u=(Array.isArray(l)?[...l]:String(l).split(",").map(g=>g.trim())).filter(g=>g!=="I don't see a relevant keyword"),f=u.length>0?[...u,c].join(", "):c;t({...i,keywords:f,suggestedKeyword:c}),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=J();t({...i,priority:s.userInput.toLowerCase()}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"priority"})},path:()=>{const s=Te(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:_n,function:s=>{const i=J();t({...i,email:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"email"})},path:()=>{const s=Te(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=J();t({...i,name:s.userInput}),n({type:"chatbot_ticket_step",ticketType:"general_help",step:"name"})},path:()=>Te(r).accessId?"general_help_ticket_summary":"general_help_accessid"},general_help_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:an(),function:s=>{const i=J();t({...i,accessId:sn(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=J(),l=Te(r),c=Lr(i.uploadedFiles);let d=l.accessId;s.prevPath==="general_help_accessid"&&s.userInput&&(d=s.userInput);let u="";return i.involvesResource==="yes"&&(u=`
102
+ Resource: ${i.resourceDetails||"Not specified"}`,i.userIdAtResource&&(u+=`
103
+ User ID at Resource: ${i.userIdAtResource}`)),`Thank you for providing your issue details. Here's a summary:
104
104
 
105
105
  Name: ${l.name||"Not provided"}
106
106
  Email: ${l.email||"Not provided"}
107
- ACCESS ID: ${u||"Not provided"}
108
- Issue Summary: ${a.summary||"Not provided"}
109
- Category: ${a.category||"Not provided"}
110
- Priority: ${a.priority||"Not provided"}
111
- Keywords: ${a.keywords||"Not provided"}
112
- Issue Description: ${a.description||"Not provided"}${d}${c}
107
+ ACCESS ID: ${d||"Not provided"}
108
+ Issue Summary: ${i.summary||"Not provided"}
109
+ Category: ${i.category||"Not provided"}
110
+ Priority: ${i.priority||"Not provided"}
111
+ Keywords: ${i.keywords||"Not provided"}
112
+ Issue Description: ${i.description||"Not provided"}${u}${c}
113
113
 
114
- Would you like to submit this ticket?`},options:["Submit Ticket","Back to Main Menu"],function:async s=>{if(s.userInput==="Submit Ticket"){const a=V(),l=Te(r),c={email:l.email||"",summary:a.summary||"General Support Ticket",description:a.description||"",priority:a.priority||"medium",accessId:l.accessId||"",name:l.name||"",issueType:a.category||"",hasResourceProblem:a.involvesResource==="yes"?"Yes":"No",userIdAtResource:a.userIdAtResource||"",resourceName:a.resourceDetails||"",keywords:a.keywords||"",noRelevantKeyword:a.suggestedKeyword?"checked":"",suggestedKeyword:a.suggestedKeyword||""};await i(c,a.uploadedFiles||[])}},path:s=>s.userInput==="Submit Ticket"?"general_help_success":"start"},general_help_success:{message:Mn(()=>Hr(o,"support ticket")),options:["Back to Main Menu"],renderHtml:["BOT"],path:"start"}}}const zc={"Logging into ACCESS website":"access_login","Logging into a resource":"resource_login","Another question":"general_help"};function Rc({ticketForm:e,setTicketForm:t,userInfo:r,trackEvent:n}){const o=Nc({ticketForm:e,setTicketForm:t,userInfo:r,trackEvent:n}),i=Lc({ticketForm:e,setTicketForm:t,userInfo:r,trackEvent:n}),A=Fc({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(a=>({...a,ticketType:s.userInput})),n({type:"chatbot_ticket_started",ticketType:zc[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,...i,...A}}function St(e){const t=V();return{...t,email:e.email||t.email,name:e.name||t.name,accessId:e.accessId||t.accessId}}function jc(e){return e?e.success?e.ticketUrl&&e.ticketKey?`Your security incident report has been submitted successfully.
114
+ Would you like to submit this ticket?`},options:["Submit Ticket","Back to Main Menu"],function:async s=>{if(s.userInput==="Submit Ticket"){const i=J(),l=Te(r),c={email:l.email||"",summary:i.summary||"General Support Ticket",description:i.description||"",priority:i.priority||"medium",accessId:l.accessId||"",name:l.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(c,i.uploadedFiles||[])}},path:s=>s.userInput==="Submit Ticket"?"general_help_success":"start"},general_help_success:{message:Mn(()=>Hr(o,"support ticket")),options:["Back to Main Menu"],renderHtml:["BOT"],path:"start"}}}const Rc={"Logging into ACCESS website":"access_login","Logging into a resource":"resource_login","Another question":"general_help"};function jc({ticketForm:e,setTicketForm:t,userInfo:r,trackEvent:n}){const o=Lc({ticketForm:e,setTicketForm:t,userInfo:r,trackEvent:n}),a=Hc({ticketForm:e,setTicketForm:t,userInfo:r,trackEvent:n}),A=zc({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:Rc[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 Dt(e){const t=J();return{...t,email:e.email||t.email,name:e.name||t.name,accessId:e.accessId||t.accessId}}function qc(e){return e?e.success?e.ticketUrl&&e.ticketKey?`Your security incident report has been submitted successfully.
115
115
 
116
116
  Ticket: <a href="${e.ticketUrl}" target="_blank">${e.ticketKey}</a>
117
117
 
@@ -121,25 +121,25 @@ Our cybersecurity team will review your report and respond accordingly. Thank yo
121
121
 
122
122
  Please try again or contact our cybersecurity team directly.`:`We apologize, but there was an error submitting your security incident report.
123
123
 
124
- Please try again or contact our cybersecurity team directly.`}function qc({ticketForm:e,setTicketForm:t,userInfo:r,trackEvent:n}){let o=null,i=null;const A=async(a,l=[],c)=>{i=await On(a,"security",l),i.success?(t(u=>({...u,ticketKey:i.ticketKey,ticketUrl:i.ticketUrl})),n({type:"chatbot_security_submitted",success:!0,priority:c||"unknown",ticketKey:i.ticketKey})):(t(u=>({...u,submissionError:i.error})),n({type:"chatbot_ticket_error",ticketType:"security",errorType:i.error||"unknown"}))};return{security_incident:{message:"You're reporting a security incident. Please provide a brief summary of the security concern.",function:a=>{const l=V();t({...l,summary:a.userInput,email:r.email||l.email,name:r.name||l.name,accessId:r.accessId||l.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:a=>{const l=V();t({...l,priority:a.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:a=>{const l=V();t({...l,description:a.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:a=>{const l=V();t({...l,wantsAttachment:a.userInput}),n({type:"chatbot_ticket_step",ticketType:"security",step:"attachment_choice"})},path:a=>a.userInput==="Yes"?"security_upload":"security_contact_check"},security_upload:{message:"Please upload your files.",component:E.jsx(Qn,{onFileUpload:a=>{t(l=>({...l,uploadedFiles:a})),a.forEach(l=>{n({type:"chatbot_file_uploaded",fileType:l.type||"unknown",fileSize:l.size})})},enableScreenshot:!0,maxSizeMB:10}),options:["Continue"],function:()=>{const a=V();t({...a,uploadConfirmed:!0}),n({type:"chatbot_ticket_step",ticketType:"security",step:"file_upload"})},path:"security_contact_check"},security_contact_check:{message:()=>{const a=St(r);return a.name&&a.email&&a.accessId?`I have your contact information:
124
+ Please try again or contact our cybersecurity team directly.`}function Gc({ticketForm:e,setTicketForm:t,userInfo:r,trackEvent:n}){let o=null,a=null;const A=async(i,l=[],c)=>{a=await On(i,"security",l),a.success?(t(d=>({...d,ticketKey:a.ticketKey,ticketUrl:a.ticketUrl})),n({type:"chatbot_security_submitted",success:!0,priority:c||"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 l=J();t({...l,summary:i.userInput,email:r.email||l.email,name:r.name||l.name,accessId:r.accessId||l.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 l=J();t({...l,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 l=J();t({...l,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 l=J();t({...l,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:E.jsx(Qn,{onFileUpload:i=>{t(l=>({...l,uploadedFiles:i})),i.forEach(l=>{n({type:"chatbot_file_uploaded",fileType:l.type||"unknown",fileSize:l.size})})},enableScreenshot:!0,maxSizeMB:10}),options:["Continue"],function:()=>{const i=J();t({...i,uploadConfirmed:!0}),n({type:"chatbot_ticket_step",ticketType:"security",step:"file_upload"})},path:"security_contact_check"},security_contact_check:{message:()=>{const i=Dt(r);return i.name&&i.email&&i.accessId?`I have your contact information:
125
125
 
126
- Name: ${a.name}
127
- Email: ${a.email}
128
- ACCESS ID: ${a.accessId}
126
+ Name: ${i.name}
127
+ Email: ${i.email}
128
+ ACCESS ID: ${i.accessId}
129
129
 
130
- Is this correct?`:"I need your contact information."},options:()=>{const a=St(r);return a.name&&a.email&&a.accessId?["Yes, that's correct","Let me update it"]:[]},chatDisabled:()=>{const a=St(r);return!!(a.name&&a.email&&a.accessId)},path:a=>a.userInput==="Yes, that's correct"?"security_summary":a.userInput==="Let me update it"?"security_name":"security_email"},security_email:{message:"What is your email address?",validateTextInput:_n,function:a=>{const l=V();t({...l,email:a.userInput}),n({type:"chatbot_ticket_step",ticketType:"security",step:"email"})},path:()=>{const a=St(r);return a.name?a.accessId?"security_summary":"security_accessid":"security_name"}},security_name:{message:"What is your name?",function:a=>{const l=V();t({...l,name:a.userInput}),n({type:"chatbot_ticket_step",ticketType:"security",step:"name"})},path:()=>{const a=St(r);return a.email?a.accessId?"security_summary":"security_accessid":"security_email"}},security_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:an(),function:a=>{const l=sn(a.userInput);o=l;const c=V();t({...c,accessId:l}),n({type:"chatbot_ticket_step",ticketType:"security",step:"access_id"})},path:"security_summary"},security_summary:{message:()=>{const a=V(),l=St(r),c={...a,name:l.name||a.name,email:l.email||a.email,accessId:o||l.accessId||a.accessId};let u="";a.uploadedFiles&&a.uploadedFiles.length>0&&(u=`
131
- Attachments: ${a.uploadedFiles.length} file(s) attached`);const d=c.accessId||"Not provided";return`Here's a summary of your security incident report:
130
+ Is this correct?`:"I need your contact information."},options:()=>{const i=Dt(r);return i.name&&i.email&&i.accessId?["Yes, that's correct","Let me update it"]:[]},chatDisabled:()=>{const i=Dt(r);return!!(i.name&&i.email&&i.accessId)},path:i=>i.userInput==="Yes, that's correct"?"security_summary":i.userInput==="Let me update it"?"security_name":"security_email"},security_email:{message:"What is your email address?",validateTextInput:_n,function:i=>{const l=J();t({...l,email:i.userInput}),n({type:"chatbot_ticket_step",ticketType:"security",step:"email"})},path:()=>{const i=Dt(r);return i.name?i.accessId?"security_summary":"security_accessid":"security_name"}},security_name:{message:"What is your name?",function:i=>{const l=J();t({...l,name:i.userInput}),n({type:"chatbot_ticket_step",ticketType:"security",step:"name"})},path:()=>{const i=Dt(r);return i.email?i.accessId?"security_summary":"security_accessid":"security_email"}},security_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:an(),function:i=>{const l=sn(i.userInput);o=l;const c=J();t({...c,accessId:l}),n({type:"chatbot_ticket_step",ticketType:"security",step:"access_id"})},path:"security_summary"},security_summary:{message:()=>{const i=J(),l=Dt(r),c={...i,name:l.name||i.name,email:l.email||i.email,accessId:o||l.accessId||i.accessId};let d="";i.uploadedFiles&&i.uploadedFiles.length>0&&(d=`
131
+ Attachments: ${i.uploadedFiles.length} file(s) attached`);const u=c.accessId||"Not provided";return`Here's a summary of your security incident report:
132
132
 
133
133
  Summary: ${c.summary||"Not provided"}
134
134
  Priority: ${c.priority||"Not provided"}
135
135
  Name: ${c.name||"Not provided"}
136
136
  Email: ${c.email||"Not provided"}
137
- ACCESS ID: ${d}
138
- Description: ${c.description||"Not provided"}${u}
137
+ ACCESS ID: ${u}
138
+ Description: ${c.description||"Not provided"}${d}
139
139
 
140
- Would you like to submit this security incident report?`},options:["Submit Security Report","Back to Main Menu"],function:async a=>{if(a.userInput==="Submit Security Report"){const l=V(),c=St(r),u={...l,name:c.name||l.name,email:c.email||l.email,accessId:o||c.accessId||l.accessId},d={summary:u.summary||"",priority:u.priority||"",description:u.description||"",name:u.name||"",email:u.email||"",accessId:u.accessId||""};await A(d,l.uploadedFiles||[],u.priority)}},path:a=>a.userInput==="Submit Security Report"?"security_success":"start"},security_success:{message:Mn(()=>jc(i)),options:["Back to Main Menu"],renderHtml:["BOT"],path:"start"}}}const Qe=[];for(let e=0;e<256;++e)Qe.push((e+256).toString(16).slice(1));function Gc(e,t=0){return(Qe[e[t+0]]+Qe[e[t+1]]+Qe[e[t+2]]+Qe[e[t+3]]+"-"+Qe[e[t+4]]+Qe[e[t+5]]+"-"+Qe[e[t+6]]+Qe[e[t+7]]+"-"+Qe[e[t+8]]+Qe[e[t+9]]+"-"+Qe[e[t+10]]+Qe[e[t+11]]+Qe[e[t+12]]+Qe[e[t+13]]+Qe[e[t+14]]+Qe[e[t+15]]).toLowerCase()}let Ur;const Yc=new Uint8Array(16);function Wc(){if(!Ur){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Ur=crypto.getRandomValues.bind(crypto)}return Ur(Yc)}const ua={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Fr(e,t,r){var o;if(ua.randomUUID&&!e)return ua.randomUUID();e=e||{};const n=e.random??((o=e.rng)==null?void 0:o.call(e))??Wc();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,Gc(n)}function nu(e){return e}function Kc({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="${qe.METRICS_QUESTIONS_URL}">examples here</a>.
140
+ 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 l=J(),c=Dt(r),d={...l,name:c.name||l.name,email:c.email||l.email,accessId:o||c.accessId||l.accessId},u={summary:d.summary||"",priority:d.priority||"",description:d.description||"",name:d.name||"",email:d.email||"",accessId:d.accessId||""};await A(u,l.uploadedFiles||[],d.priority)}},path:i=>i.userInput==="Submit Security Report"?"security_success":"start"},security_success:{message:Mn(()=>qc(a)),options:["Back to Main Menu"],renderHtml:["BOT"],path:"start"}}}const Qe=[];for(let e=0;e<256;++e)Qe.push((e+256).toString(16).slice(1));function Yc(e,t=0){return(Qe[e[t+0]]+Qe[e[t+1]]+Qe[e[t+2]]+Qe[e[t+3]]+"-"+Qe[e[t+4]]+Qe[e[t+5]]+"-"+Qe[e[t+6]]+Qe[e[t+7]]+"-"+Qe[e[t+8]]+Qe[e[t+9]]+"-"+Qe[e[t+10]]+Qe[e[t+11]]+Qe[e[t+12]]+Qe[e[t+13]]+Qe[e[t+14]]+Qe[e[t+15]]).toLowerCase()}let Ur;const Wc=new Uint8Array(16);function Kc(){if(!Ur){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Ur=crypto.getRandomValues.bind(crypto)}return Ur(Wc)}const ui={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Fr(e,t,r){var o;if(ui.randomUUID&&!e)return ui.randomUUID();e=e||{};const n=e.random??((o=e.rng)==null?void 0:o.call(e))??Kc();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,Yc(n)}function ru(e){return e}function Vc({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="${Ne.METRICS_QUESTIONS_URL}">examples here</a>.
141
141
 
142
- <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:i}=o;if(i==="👍 Helpful"||i==="👎 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":i==="👍 Helpful"?"1":"0"};try{await fetch(qe.METRICS_RATING_ENDPOINT,{method:"POST",headers:s})}catch(a){console.error("Error sending metrics feedback:",a)}}return"Thanks for the feedback! Ask another question about usage and performance metrics (XDMoD) or start a new chat."}else try{const A=Fr();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},c=(await(await fetch(qe.METRICS_API_ENDPOINT,{method:"POST",headers:s,body:JSON.stringify({query:i})})).json()).response,u=c;return await o.injectMessage(u),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 Vc(){if(typeof window>"u")return Fr();let e=localStorage.getItem(ca.SESSION_ID);return e||(e=Fr(),localStorage.setItem(ca.SESSION_ID,e)),e}const da="access-qa-bot-shadow-overrides",Xc=`
142
+ <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(Ne.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=Fr();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},c=(await(await fetch(Ne.METRICS_API_ENDPOINT,{method:"POST",headers:s,body:JSON.stringify({query:a})})).json()).response,d=c;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 Xc(){if(typeof window>"u")return Fr();let e=localStorage.getItem(ci.SESSION_ID);return e||(e=Fr(),localStorage.setItem(ci.SESSION_ID,e)),e}const di="access-qa-bot-shadow-overrides",Jc=`
143
143
  .rcb-checkbox-container {
144
144
  display: flex !important;
145
145
  flex-wrap: wrap !important;
@@ -292,5 +292,5 @@ Would you like to submit this security incident report?`},options:["Submit Secur
292
292
  display: inline !important;
293
293
  margin: 0 !important;
294
294
  }
295
- `;function Jc(e){if(!e)return;const t=e.getRootNode();if(!(t instanceof ShadowRoot)||t.getElementById(da))return;const r=document.createElement("style");r.id=da,r.textContent=Xc,t.appendChild(r)}const zr=f.forwardRef((e,t)=>{const{apiKey:r=qe.DEFAULT_API_KEY,isLoggedIn:n=!1,loginUrl:o=yt.LOGIN_URL,userEmail:i,userName:A,accessId:s,actingUser:a,ringEffect:l,defaultOpen:c,onClose:u,open:d,onOpenChange:p,embedded:g=!1,welcome:v,qaEndpoint:h,ratingEndpoint:w,agentEndpoint:x,resourceContext:m,onAnalyticsEvent:k}=e,P=f.useRef(null),C=f.useRef(null),[S,I]=f.useState({}),[Q,D]=f.useState(null),_=f.useMemo(()=>({email:i,name:A,accessId:s}),[i,A,s]);f.useEffect(()=>{Jc(C.current)},[]),f.useEffect(()=>{Mc({ticketForm:S,setTicketForm:I})},[S]);const B=x||qe.AGENT_ENDPOINT,M=m?`${B}/capabilities?resource_context=${encodeURIComponent(m)}`:`${B}/capabilities`,F=`${B}/rating`;f.useEffect(()=>{B.includes("localhost")&&!window.location.hostname.includes("localhost")&&console.warn("[AccessQABot] VITE_AGENT_ENDPOINT not set — agent requests will go to localhost. Set VITE_AGENT_ENDPOINT in your environment."),qe.ALLOW_ANON_ACCESS&&!qe.TURNSTILE_SITE_KEY&&console.warn("[AccessQABot] Anonymous access is enabled without Turnstile. Set VITE_TURNSTILE_SITE_KEY for bot protection, or disable VITE_ALLOW_ANON_ACCESS.")},[B]),f.useEffect(()=>{let R=!1;async function y(){try{const G=await fetch(M,{credentials:"include"});if(!G.ok)throw new Error(`Capabilities API returned ${G.status}`);const Z=await G.json();R||D(Z)}catch(G){console.warn("Failed to fetch capabilities:",G),R||D({categories:[],is_authenticated:!1})}}return y(),()=>{R=!0}},[M,n]),f.useEffect(()=>{if(!n)return;let R=!1;const y=`${B}/capabilities/personalized`;async function G(){try{const Z=await fetch(y,{credentials:"include"});if(!Z.ok)return;const K=await Z.json();R||console.debug("Personalized context loaded:",K)}catch{}}return G(),()=>{R=!0}},[B,n]),f.useImperativeHandle(t,()=>({addMessage:R=>{var y,G;(G=(y=P.current)==null?void 0:y.addMessage)==null||G.call(y,R)}}));const N=v||(Q==null?void 0:Q.welcome_message)||yt.WELCOME_MESSAGE,L=f.useMemo(()=>Vc(),[]),O=f.useCallback(R=>{k&&k({...R,type:R.type,timestamp:R.timestamp??Date.now(),sessionId:R.sessionId??L})},[k,L]),U=f.useCallback(R=>{k&&k({...R,type:R.type,timestamp:typeof R.timestamp=="number"?R.timestamp:Date.now(),sessionId:typeof R.sessionId=="string"?R.sessionId:L})},[k,L]),b=f.useMemo(()=>{const R=Qc({welcome:N,trackEvent:O}),y=Rc({ticketForm:{},setTicketForm:I,userInfo:_,trackEvent:O}),G=qc({ticketForm:{},setTicketForm:I,userInfo:_,trackEvent:O}),Z=Kc({sessionId:L,apiKey:r,trackEvent:O}),K={...R,...y,...G,...Z};return Ic(K,{disableOnOptions:!0})},[N,_,L,r,n,O,Q]);return Q?E.jsx("div",{ref:C,children:E.jsx(_r,{ref:P,isLoggedIn:n,allowAnonAccess:qe.ALLOW_ANON_ACCESS,actingUser:a,onAnalyticsEvent:U,apiKey:r,qaEndpoint:h||qe.QA_ENDPOINT,ratingEndpoint:w||qe.RATING_ENDPOINT,capabilitiesEndpoint:M,agentRatingEndpoint:F,botName:yt.BOT_NAME,logo:yt.LOGO,primaryColor:yt.PRIMARY_COLOR,secondaryColor:yt.SECONDARY_COLOR,welcomeMessage:N,tooltipText:yt.TOOLTIP,turnstileSiteKey:qe.TURNSTILE_SITE_KEY||void 0,loginUrl:o,open:d,onOpenChange:p,embedded:g,footerText:"AI-powered · Privacy Notice",footerLink:"https://support.access-ci.org/tools/access-qa-tool/privacy",resourceContext:m,customFlow:b})}):E.jsx("div",{ref:C})});zr.displayName="AccessQABot",Ue.API_CONFIG=qe,Ue.AccessQABot=zr,Ue.BOT_CONFIG=yt,Ue.QABot=zr,Object.defineProperty(Ue,Symbol.toStringTag,{value:"Module"})});
295
+ `;function Zc(e){if(!e)return;const t=e.getRootNode();if(!(t instanceof ShadowRoot)||t.getElementById(di))return;const r=document.createElement("style");r.id=di,r.textContent=Jc,t.appendChild(r)}const zr=p.forwardRef((e,t)=>{const{apiKey:r=Ne.DEFAULT_API_KEY,isLoggedIn:n=!1,loginUrl:o=yt.LOGIN_URL,userEmail:a,userName:A,accessId:s,actingUser:i,ringEffect:l,defaultOpen:c,onClose:d,open:u,onOpenChange:f,embedded:g=!1,welcome:b,qaEndpoint:h,ratingEndpoint:w,agentEndpoint:x,backendId:m,resourceContext:k,onAnalyticsEvent:P}=e,C=Ne.AGENT_ENABLED,S=m||Ne.BACKEND_ID,I=p.useRef(null),Q=p.useRef(null),[B,O]=p.useState({}),[D,M]=p.useState(()=>C?null:{categories:[],is_authenticated:!1}),F=p.useMemo(()=>({email:a,name:A,accessId:s}),[a,A,s]);p.useEffect(()=>{Zc(Q.current)},[]),p.useEffect(()=>{Oc({ticketForm:B,setTicketForm:O})},[B]);const _=x||Ne.AGENT_ENDPOINT,U=k?`${_}/capabilities?resource_context=${encodeURIComponent(k)}`:`${_}/capabilities`,N=`${_}/rating`;p.useEffect(()=>{C&&_.includes("localhost")&&!window.location.hostname.includes("localhost")&&console.warn("[AccessQABot] VITE_AGENT_ENDPOINT not set — agent requests will go to localhost. Set VITE_AGENT_ENDPOINT in your environment."),Ne.ALLOW_ANON_ACCESS&&!Ne.TURNSTILE_SITE_KEY&&console.warn("[AccessQABot] Anonymous access is enabled without Turnstile. Set VITE_TURNSTILE_SITE_KEY for bot protection, or disable VITE_ALLOW_ANON_ACCESS.")},[_,C]),p.useEffect(()=>{if(!C)return;let q=!1;async function G(){try{const X=await fetch(U,{credentials:"include"});if(!X.ok)throw new Error(`Capabilities API returned ${X.status}`);const he=await X.json();q||M(he)}catch(X){console.warn("Failed to fetch capabilities:",X),q||M({categories:[],is_authenticated:!1})}}return G(),()=>{q=!0}},[C,U,n]),p.useEffect(()=>{if(!C||!n)return;let q=!1;const G=`${_}/capabilities/personalized`;async function X(){try{const he=await fetch(G,{credentials:"include"});if(!he.ok)return;const se=await he.json();q||console.debug("Personalized context loaded:",se)}catch{}}return X(),()=>{q=!0}},[C,_,n]),p.useImperativeHandle(t,()=>({addMessage:q=>{var G,X;(X=(G=I.current)==null?void 0:G.addMessage)==null||X.call(G,q)}}));const L=b||(D==null?void 0:D.welcome_message)||yt.WELCOME_MESSAGE,y=p.useMemo(()=>Xc(),[]),W=p.useCallback(q=>{P&&P({...q,type:q.type,timestamp:q.timestamp??Date.now(),sessionId:q.sessionId??y})},[P,y]),v=p.useCallback(q=>{P&&P({...q,type:q.type,timestamp:typeof q.timestamp=="number"?q.timestamp:Date.now(),sessionId:typeof q.sessionId=="string"?q.sessionId:y})},[P,y]),V=p.useMemo(()=>{const q=Mc({welcome:L,setTicketForm:O,trackEvent:W}),G=jc({ticketForm:{},setTicketForm:O,userInfo:F,trackEvent:W}),X=Gc({ticketForm:{},setTicketForm:O,userInfo:F,trackEvent:W}),he=Vc({sessionId:y,apiKey:r,trackEvent:W}),se={...q,...G,...X,...he};return Tc(se,{disableOnOptions:!0})},[L,F,y,r,n,W,D]);return D?E.jsx("div",{ref:Q,children:E.jsx(_r,{ref:I,isLoggedIn:n,allowAnonAccess:Ne.ALLOW_ANON_ACCESS,actingUser:i,onAnalyticsEvent:v,apiKey:r,qaEndpoint:h||Ne.QA_ENDPOINT,ratingEndpoint:w||Ne.RATING_ENDPOINT,backendId:S,...C?{capabilitiesEndpoint:U,agentRatingEndpoint:N}:{},botName:yt.BOT_NAME,logo:yt.LOGO,primaryColor:yt.PRIMARY_COLOR,secondaryColor:yt.SECONDARY_COLOR,welcomeMessage:L,tooltipText:yt.TOOLTIP,turnstileSiteKey:Ne.TURNSTILE_SITE_KEY||void 0,loginUrl:o,open:u,onOpenChange:f,embedded:g,footerText:"AI-powered · Privacy Notice",footerLink:"https://support.access-ci.org/tools/access-qa-tool/privacy",resourceContext:k,customFlow:V})}):E.jsx("div",{ref:Q})});zr.displayName="AccessQABot",Le.API_CONFIG=Ne,Le.AccessQABot=zr,Le.BOT_CONFIG=yt,Le.QABot=zr,Object.defineProperty(Le,Symbol.toStringTag,{value:"Module"})});
296
296
  //# sourceMappingURL=access-qa-bot.umd.cjs.map