@botfabrik/engine-webclient 4.96.1 → 4.96.3

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.
@@ -0,0 +1 @@
1
+ ._app_1rj0t_1{display:flex;flex-direction:row;height:100vh;height:100svh;background-color:var(--body-background-color)}._container_q2uun_1{height:100%;position:relative}._chatcontent_q2uun_6{display:flex;flex-flow:column nowrap;height:100%}._accessabilityHidden_q2uun_12{visibility:hidden}._messageContainer_ofi0g_1{flex:1;overflow-y:scroll;overscroll-behavior:contain;padding-top:1rem;position:relative;-webkit-overflow-scrolling:touch}._messages_ofi0g_12{position:relative;list-style:none;font-size:.9rem;line-height:1.4;padding:0 1rem;margin:0;overflow-wrap:break-word;word-wrap:break-word}@media screen and (min-width: 1024px){._messageContainer_ofi0g_1{margin-bottom:1rem}._messages_ofi0g_12{padding-left:0}}@media (min-width: 36rem){._messageContainer_ofi0g_1{padding-top:2rem;padding-bottom:2rem}._messages_ofi0g_12{font-size:1rem;line-height:1.8}}._generalConditionsContainer_55hjg_1{margin-bottom:1.2rem;margin-left:1rem;margin-right:1rem}._generalConditions_55hjg_1{transition:all .5s linear;background-color:var(--bot-bubble-background-color);color:var(--bot-bubble-text-color);padding:.9em 1.3em;font-size:.9rem}._generalConditionsHeader_55hjg_15{display:flex;align-items:flex-end;justify-content:space-between;cursor:pointer}._generalConditionsHeader_55hjg_15:focus{outline:none}._generalConditionsBody_55hjg_26{display:flex;align-items:flex-end}._generalConditionsBody_55hjg_26:focus{outline:none}._generalConditionsAccept_55hjg_35{padding:.9em 1.3em;font-size:.9rem}._generalConditionsAccept_55hjg_35:focus{outline:none}._message_1sw52_1{--bubble-margin: var(--bubble-margin-small);margin-bottom:var(--bubble-margin);transition:border-radius .5s;position:relative}._messageBot_1sw52_9{--bot-bubble-user-actions-display: none;display:flex;align-items:flex-end}._messageBot_1sw52_9:focus-within,._messageBot_1sw52_9:hover{--bot-bubble-user-actions-display: flex}._messageBot_1sw52_9:not(._messageBotLast_1sw52_19) ._avatar_1sw52_19{visibility:hidden}._messageBot_1sw52_9 img{display:var(--bot-avatar-display)}._messageBotFirst_1sw52_28{--bot-bubble-top-left-radius: var(--bubble-radius-large);--bot-bubble-top-right-radius: var(--bubble-radius-large);--bot-bubble-bottom-right-radius: var(--bubble-radius-large)}._messageBotLast_1sw52_19{--bot-bubble-top-right-radius: var(--bubble-radius-large);--bot-bubble-bottom-left-radius: var(--bubble-radius-large);--bot-bubble-bottom-right-radius: var(--bubble-radius-large);--bubble-margin: var(--bubble-margin-large)}._messageBotAnimated_1sw52_41{animation-duration:.25s;animation-timing-function:ease-in;animation-delay:0s;animation-iteration-count:1;animation-direction:normal;animation-fill-mode:forwards;animation-play-state:running;animation-name:_fadeInLeft_1sw52_1}._messageGuest_1sw52_52{display:flex;align-items:flex-end;justify-content:flex-end}._messageGuestFirst_1sw52_58{--guest-bubble-top-left-radius: var(--bubble-radius-large);--guest-bubble-top-right-radius: var(--bubble-radius-large);--guest-bubble-bottom-left-radius: var(--bubble-radius-large)}._messageGuestLast_1sw52_64{--guest-bubble-top-left-radius: var(--bubble-radius-large);--guest-bubble-bottom-left-radius: var(--bubble-radius-large);--guest-bubble-bottom-right-radius: var(--bubble-radius-large);--bubble-margin: var(--bubble-margin-large);margin-bottom:var(--bubble-margin)}._avatar_1sw52_19{width:var(--avatar-size);height:var(--avatar-size);border-radius:var(--avatar-radius, 50%)}._botAvatar_1sw52_78{background-color:var(--bot-avatar-background-color)}._agentAvatar_1sw52_82{background-color:var(--agent-avatar-background-color)}._bubble_1sw52_86{display:inline-block;max-width:calc(100% - 4.3rem);position:relative}._bubbleContent_1sw52_92{padding:var(--bubble-padding);color:inherit;font-size:inherit}._bubbleContent_1sw52_92 *>:first-child{margin-top:0}._bubbleContent_1sw52_92 *>:last-child{margin-bottom:0}._bubbleLeft_1sw52_106{border-radius:var(--bot-bubble-top-left-radius) var(--bot-bubble-top-right-radius) var(--bot-bubble-bottom-right-radius) var(--bot-bubble-bottom-left-radius);border-color:var(--bot-bubble-border-color);border-width:var(--bot-bubble-border-width);border-style:solid;background-color:var(--bot-bubble-background-color);margin-left:.5rem}._leftText_1sw52_117{color:var(--bot-bubble-text-color)}._leftText_1sw52_117 a{color:var(--bot-bubble-text-color)!important}._bubbleRight_1sw52_124{border-radius:var(--guest-bubble-top-left-radius) var(--guest-bubble-top-right-radius) var(--guest-bubble-bottom-right-radius) var(--guest-bubble-bottom-left-radius);border-color:var(--guest-bubble-border-color);border-width:var(--guest-bubble-border-width);border-style:solid;background-color:var(--guest-bubble-background-color)}._rightText_1sw52_134,._rightText_1sw52_134 a{color:var(--guest-bubble-text-color)}@keyframes _fadeInLeft_1sw52_1{0%{transform:translate(-100vw)}to{transform:translate(0)}}.source-info-reference{--footnote-padding: .2em}.source-info-reference:first-of-type{margin-left:var(--footnote-padding)}.source-info-reference:last-of-type{margin-right:var(--footnote-padding)}.source-info-reference.source-info-reference--before-space{margin-left:-.1em}.source-info-reference.source-info-reference--after-space{margin-right:-.1em}._sourceInfoReference_1sw52_166 a{--bot-bubble-text-color: black;background:color-mix(in srgb,var(--brand-primary-color) 20%,transparent);padding:3px 6px;border-radius:6px;text-decoration:none!important;font-size:.75rem;font-family:monospace}._sourceInfoReferenceActive_1sw52_178 a{--bot-bubble-text-color: white;background:var(--brand-primary-color)}._botMessageActions_m0f8n_1{--bot-bubble-user-actions-container-bg-opacity: 1;--bot-bubble-user-actions-container-padding: .25rem;color:var(--text-secondary-color);padding:var(--bot-bubble-user-actions-container-padding);vertical-align:middle;background-color:rgb(var(--bot-bubble-user-actions-container-bg, 255 255 255) / var(--bot-bubble-user-actions-container-bg-opacity));border-color:var(--color-gray-200);border-style:solid;border-width:1px;border-radius:.5rem;margin-top:-.75rem;margin-left:calc(-1 * var(--bot-bubble-user-actions-container-padding));top:100%;left:1rem;position:absolute;z-index:10;display:var(--bot-bubble-user-actions-display);gap:.15rem}._alwaysVisible_m0f8n_27{--bot-bubble-user-actions-display: flex;--bot-bubble-user-actions-container-bg-opacity: 0;border-width:0;top:calc(100% + .75rem)}._reported_m0f8n_34{display:flex}._action_m0f8n_38{display:var(--bot-bubble-user-actions-display);font-size:.875rem;line-height:1.25rem;padding-left:.25rem;padding-right:.25rem;border-radius:.375rem;white-space:nowrap;justify-content:center;align-items:center;height:1.5rem;text-transform:none;border:0;cursor:pointer;color:inherit;background-color:rgb(var(--bot-bubble-user-actions-container-bg, 255 255 255) / var(--bot-bubble-user-actions-container-bg-opacity))}._action_m0f8n_38:hover{background-color:var(--color-gray-200)}._action_m0f8n_38._reported_m0f8n_34{display:flex}._sourceList_1n31h_1{display:flex;flex-direction:column;flex-wrap:wrap;gap:.5rem;list-style-type:none!important;margin:0;padding:0;padding-top:1rem}._source_1n31h_1{font-size:.7rem;width:fit-content;cursor:pointer;max-width:100%}._source_1n31h_1 a{display:flex;align-items:center;flex-direction:row;gap:.25rem;padding:3px 6px;border-radius:6px;color:var(--bot-bubble-source-text-color)!important;background-color:var(--bot-bubble-source-background-color)}._source_1n31h_1 a:hover{background:color-mix(in srgb,var(--bot-bubble-source-background-color) 75%,transparent)}._source_1n31h_1 a ._label_1n31h_37{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;overflow:hidden}._source_1n31h_1 a svg{font-size:1rem;flex-shrink:0}._button_3ui4g_1{display:inline-block;font-family:inherit;font-size:1em;padding:.5em 1em;border-radius:.2rem;background-color:#fff;cursor:pointer;transition:all .2s linear;text-align:center}._buttonDefault_3ui4g_13{color:#000000d9;background-color:#fff;border:2px solid;border-color:color-mix(in srgb,var(--brand-primary-color) 20%,transparent)}._buttonDefault_3ui4g_13:hover{color:var(--brand-primary-color);border-color:var(--brand-primary-color)}._buttonDefault_3ui4g_13:disabled{cursor:not-allowed;opacity:.3}._buttonPrimary_3ui4g_28{color:var(--brand-secondary-color);background-color:var(--brand-primary-color);border:2px solid var(--brand-primary-color)}._buttonPrimary_3ui4g_28:hover{color:var(--brand-primary-color);background-color:var(--brand-secondary-color);border:2px solid var(--brand-primary-color)}._buttonPrimary_3ui4g_28:disabled{cursor:not-allowed;opacity:.3;color:var(--brand-secondary-color);background-color:var(--brand-primary-color)}._title_137pi_1{margin-top:0;margin-block-start:0}._buttons_137pi_6{margin-top:1rem;display:flex;flex-direction:row;flex-wrap:wrap;gap:.5rem}._button_137pi_6{font-size:.9em;margin:0;background-color:var(--bot-bubble-text-color);color:var(--bot-bubble-background-color);border:2px solid var(--bot-bubble-text-color);width:100%}._button_137pi_6:hover{color:var(--bot-bubble-text-color);background-color:var(--bot-bubble-background-color);border:2px solid var(--bot-bubble-text-color)}._imageContainer_137pi_29{display:flex}._image_137pi_29{height:100%;width:100%;object-fit:cover;border-radius:calc(var(--bot-bubble-top-left-radius) - var(--bot-bubble-border-width)) calc(var(--bot-bubble-top-right-radius) - var(--bot-bubble-border-width)) 0 0}._video_container_137pi_44{display:flex}._video_137pi_44{width:100%;height:100%;border-radius:calc(var(--bot-bubble-top-left-radius) - var(--bot-bubble-border-width)) calc(var(--bot-bubble-top-right-radius) - var(--bot-bubble-border-width)) 0 0}._only_137pi_58{border-radius:calc(var(--bot-bubble-top-left-radius) - var(--bot-bubble-border-width)) calc(var(--bot-bubble-top-right-radius) - var(--bot-bubble-border-width)) calc(var(--bot-bubble-bottom-right-radius) - var(--bot-bubble-border-width)) calc(var(--bot-bubble-bottom-left-radius) - var(--bot-bubble-border-width))}._markdown_nw7vg_1 h1,._markdown_nw7vg_1 h2,._markdown_nw7vg_1 h3,._markdown_nw7vg_1 h4,._markdown_nw7vg_1 h5,._markdown_nw7vg_1 p,._markdown_nw7vg_1 a,._markdown_nw7vg_1 ul,._markdown_nw7vg_1 ol{color:inherit;margin-block-start:.4em;margin-block-end:.4em;margin-inline-start:0px;margin-inline-end:0px}._markdown_nw7vg_1 h1{font-size:1.2rem;white-space:pre-wrap}._markdown_nw7vg_1 h2{font-size:1.1rem;white-space:pre-wrap}._markdown_nw7vg_1 h3,._markdown_nw7vg_1 h4,._markdown_nw7vg_1 h5{font-size:1rem;white-space:pre-wrap}._markdown_nw7vg_1 a{color:var(--text-link-color);text-decoration:underline;cursor:pointer}._markdown_nw7vg_1 a:hover{color:var(--text-link-color-hover);opacity:.8}._markdown_nw7vg_1 a:active{color:var(--text-link-color-hover)}._markdown_nw7vg_1 a:visited{color:var(--text-link-color)}._markdown_nw7vg_1 img{max-width:100%;margin-block-start:0;margin-block-end:0}._markdown_nw7vg_1 ul{padding:0 0 0 1.1em}._markdown_nw7vg_1 ul>li{list-style-type:disc}._markdown_nw7vg_1 ul>li ul{margin-block-start:0}._markdown_nw7vg_1 ul>li p{margin-bottom:0}._markdown_nw7vg_1 ol{padding:0 0 0 1.1em}._markdown_nw7vg_1 ol>li{list-style-type:decimal}._markdown_nw7vg_1 table,._markdown_nw7vg_1 td,._markdown_nw7vg_1 th{border:1px solid}._markdown_nw7vg_1 table{width:100%;border-collapse:collapse;margin-bottom:1rem;-webkit-hyphens:auto;hyphens:auto}._markdown_nw7vg_1 table th{text-align:left;padding:5px}._markdown_nw7vg_1 table td{padding:5px}._markdown_nw7vg_1 hr{margin-top:1rem;margin-bottom:1rem;border-top:1px solid;border-left:0;border-bottom:0;border-right:0}._text_gp0s0_1{overflow-wrap:break-word}._command_gp0s0_5{padding:3px 6px;margin-right:3px;border-radius:6px;font-size:.75rem;font-family:monospace;background-color:var( --guest-bubble-command-background-color, rgba(255, 255, 255, .3) )}._ticontainer_xg0dn_1{padding:var(--bubble-padding)}._tiblock_xg0dn_5{align-items:center;display:flex;height:1rem;margin:2.1px}._tidot_xg0dn_12{background-color:var(--bot-bubble-text-color);animation:_mercuryTypingAnimation_xg0dn_1 1s infinite ease-in-out;border-radius:3px;display:inline-block;height:6px;margin-right:3px;width:6px}@keyframes _mercuryTypingAnimation_xg0dn_1{0%{transform:translateY(0)}28%{transform:translateY(-5px)}44%{transform:translateY(0)}}._tidot_xg0dn_12:nth-child(1){animation-delay:50ms}._tidot_xg0dn_12:nth-child(2){animation-delay:.15s}._tidot_xg0dn_12:nth-child(3){animation-delay:.25s}._bottomSheet_jp8dl_1{visibility:hidden;position:absolute;z-index:3000;height:100%;width:100%;background-color:var(--body-background-color);top:0;bottom:0;transform:translateY(100%);overflow-y:auto;overscroll-behavior:contain}._bottomSheetOpen_jp8dl_15{animation:_slide-in_jp8dl_1 .2s forwards;visibility:visible}._bottomSheetClose_jp8dl_20{animation:_slide-out_jp8dl_1 .2s forwards;visibility:hidden}@keyframes _slide-in_jp8dl_1{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes _slide-out_jp8dl_1{0%{transform:translateY(0)}to{transform:translateY(100%)}}._container_xc2nx_1{overflow:hidden}._container_xc2nx_1 iframe{width:100%;height:100%;border:none}._container_z787n_1{padding:.25rem;display:flex;justify-content:center;align-items:center;border-top:1px solid var(--color-gray-200);background-color:#fff;font-size:.5rem;color:var(--text-secondary-color)}._container_z787n_1 a{color:var(--brand-primary-color);text-decoration:none}@media screen and (min-width: 1024px){._container_z787n_1{padding:.75rem 0 0;background-color:transparent;border-top:unset}}._container_h23mk_1{padding:1rem}._container_h23mk_1 h1{font-size:1.6em}._container_h23mk_1 h2{font-size:1em}._container_h23mk_1 p{line-height:1.5}._formContainer_h23mk_17{display:flex;flex-direction:column}._emailInput_h23mk_22{box-sizing:border-box;margin:1rem 0 0;font-variant:tabular-nums;list-style:none;font-feature-settings:"tnum";position:relative;display:inline-block;width:100%;min-width:0;padding:4px 11px;color:#000000a6;font-size:14px;line-height:1.5715;background-color:#fff;background-image:none;border:1px solid #d9d9d9;border-radius:2px;transition:all .3s;outline:none}._emailInput_h23mk_22:hover{border:1px solid var(--brand-primary-color)}._emailInput_h23mk_22:focus{border:1px solid var(--brand-primary-color)}._description_h23mk_52{font-size:.9rem;-webkit-hyphens:auto;hyphens:auto}._actions_h23mk_57{margin-top:1rem;padding-bottom:3rem;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-end;gap:.5rem}._validationError_h23mk_67{padding-top:.5em;color:var(--danger-color);font-size:.8em;height:1rem}._submitted_h23mk_74{margin-top:3rem;padding:1rem;border:1px solid var(--brand-primary-color);border-radius:2px}._inputContainer_fi5ao_1{z-index:2000}._blockUserInput_pot9c_1{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:left;position:relative;color:var(--text-secondary-color);font-size:.9rem;padding:.6rem 1rem;animation:_append-animate_pot9c_1 .2s ease-in;z-index:0}@keyframes _append-animate_pot9c_1{0%{opacity:0;top:6rem}to{opacity:1;top:0}}._commandsDropdown_5ytuv_1{position:relative}._commandsDropdown_5ytuv_1 ._commands_5ytuv_1{position:absolute;bottom:calc(100% - 3px);left:0;right:0;padding:1rem;margin:0;width:100%;overflow-y:auto;max-height:30em;border-radius:20px 20px 0 0;box-shadow:0 -8px 24px #0006;background-color:var( --commands-background-color, var(--brand-primary-color) );list-style-type:none}._commandsDropdown_5ytuv_1 ._command_5ytuv_1{display:flex;flex-direction:column;gap:.25rem;cursor:pointer;padding:1rem;border-radius:10px;color:var(--commands-text-color, white)}._commandsDropdown_5ytuv_1 ._command_5ytuv_1 h1{font-size:1.1rem;margin-block:0}._commandsDropdown_5ytuv_1 ._command_5ytuv_1 p{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;margin:0}._commandsDropdown_5ytuv_1 ._commandActive_5ytuv_46{color:var(--commands-active-text-color, white);background-color:var( --commands-active-background-color, rgba(255, 255, 255, .3) )}._commandsSelections_5ytuv_55{display:none}@media screen and (min-width: 1024px){._commandsSelections_5ytuv_55{display:flex;justify-content:center;flex-wrap:wrap;gap:.5rem;padding-inline:1rem;margin-top:1rem}._commandsSelections_5ytuv_55 button{background:transparent;color:var(--text-secondary-color);border:1px solid var(--text-secondary-color);border-radius:20px;padding:.5rem 1rem;cursor:pointer}._commandsSelections_5ytuv_55 button:hover{background:var(--brand-primary-color);border-color:var(--brand-primary-color);color:#fff}}._callToActionContainer_1pojq_1{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;position:relative;padding:.6rem 1rem .3rem;animation:_append-animate_1pojq_1 .2s ease-in;z-index:0}@keyframes _append-animate_1pojq_1{0%{opacity:0;top:6rem}to{opacity:1;top:0}}._callToActionTitle_1pojq_23{font-size:.9rem;color:var(--text-secondary-color);margin-bottom:.2rem;padding-right:.5rem}._rateOverlay_1pojq_30{display:flex;flex-direction:column;justify-content:space-between}._rateOverlay_1pojq_30 h2{font-size:1em;text-align:center}._rateOverlay_1pojq_30 p{line-height:1.5}._rateOverlay_1pojq_30 form{display:flex;flex:1;flex-direction:column;justify-content:space-between}._body_1pojq_52{height:100%;display:flex;flex-direction:column;justify-content:space-between;padding:1rem}._footer_1pojq_60 input{font-size:1rem;border:none;box-sizing:border-box;width:100%;outline-width:0;padding:1.3rem 1rem 1rem;text-overflow:ellipsis;color:var(--text-primary-color)}._actions_1pojq_73{display:flex;justify-content:flex-end;align-items:center;line-height:0}._actions_1pojq_73 button{width:100%;border-radius:0}@media screen and (min-width: 1024px){._footer_1pojq_60 input{border-radius:20px}._actions_1pojq_73{margin-top:.5rem}._actions_1pojq_73 button{border-radius:.2rem}}._bubbles_1pojq_101{display:flex;flex-direction:column}@keyframes _appear_1pojq_1{0%{opacity:0}66%{opacity:0}to{opacity:1}}@keyframes _fadeInLeft_1pojq_1{0%{transform:translate(-3rem)}80%{transform:translate(-3rem)}to{transform:translate(0)}}._rateFeedbackBotBubble_1pojq_130{display:flex;align-items:flex-end;margin:1rem 0}._rateFeedbackGuestBubble_1pojq_136{display:flex;align-items:flex-end;justify-content:flex-end}._avatar_1pojq_142{width:var(--avatar-size);height:var(--avatar-size);animation-duration:.5s;animation-timing-function:ease-in;animation-delay:0s;animation-iteration-count:1;animation-direction:normal;animation-fill-mode:forwards;animation-play-state:running;animation-name:_fadeInLeft_1pojq_1}._bubble_1pojq_101{padding:var(--bubble-padding);font-size:.9rem;animation-duration:1s;animation-delay:0s;animation-timing-function:ease;animation-iteration-count:1;animation-direction:normal;animation-fill-mode:forwards;animation-play-state:running;animation-name:_appear_1pojq_1}._botBubble_1pojq_168{border-radius:var(--bubble-radius-large);background-color:var(--bot-bubble-background-color);margin-left:1rem;color:var(--bot-bubble-text-color)}._botBubble_1pojq_168 a{color:var(--bot-bubble-text-color)!important}._guestBubble_1pojq_179{animation-duration:.25s;align-self:end;border-radius:var(--bubble-radius-large);background-color:var(--guest-bubble-background-color);color:var(--guest-bubble-text-color);margin-left:1rem;display:box;line-clamp:3;box-orient:vertical;overflow:hidden}._guestBubble_1pojq_179 a{color:var(--guest-bubble-text-color)}._rateText_1pojq_198{padding:.75rem;font-size:.9rem}._stars_1pojq_203{display:flex;justify-content:space-between;width:100%;margin:0;padding:0;box-sizing:border-box;line-height:unset;list-style:none;outline:none;font-variant:tabular-nums;font-feature-settings:"tnum"}._starsSmall_1pojq_217{flex:0;justify-content:flex-start;font-size:1.2rem}._starsLarge_1pojq_223{font-size:2rem}._star_1pojq_203{display:inline-block;color:inherit;cursor:pointer}._star_1pojq_203:not(:last-child){margin-right:8px}._starReadonly_1pojq_237{cursor:inherit}._star_1pojq_203>div{transition:all .3s,outline 0s}._starIcon_1pojq_247{display:inline-block;color:inherit;font-style:normal;line-height:0;text-align:center;text-transform:none;text-rendering:optimizelegibility}._star_1pojq_203 [aria-checked=true]{color:var(--brand-primary-color, #fadb14)}._star_1pojq_203 [aria-checked=false]{color:var(--color-gray-400)}._starsDescriptionContainer_1pojq_265{display:flex;flex-direction:column;width:100%;padding-top:1rem;padding-bottom:1rem;margin:auto}._starsDescription_1pojq_265{display:flex;flex-direction:row;justify-content:space-between;font-size:.7rem;color:var(--text-secondary-color)}@media (max-width: 350px){._starsLarge_1pojq_223{font-size:1.5rem}}._inputWrapper_e3h44_1{display:flex;justify-content:center;align-items:center;line-height:0;background-color:#fff}@media screen and (min-width: 1024px){._inputWrapper_e3h44_1{border-radius:20px}._withOpenCommands_e3h44_14{border-top-left-radius:0;border-top-right-radius:0}}._messageInputWrapper_e3h44_20{flex:1;margin-right:.5rem;border-radius:inherit}._messageInput_e3h44_20{resize:none;font-size:1rem;font-family:inherit;border:none;border-radius:inherit;height:calc(1em + 3rem);box-sizing:border-box;width:100%;outline-width:0;padding:1.3rem 1rem;text-overflow:ellipsis}._messageInput_e3h44_20:focus{outline:none}._buttons_e3h44_44{padding-right:.5rem;display:flex;justify-content:center;align-items:center}._button_e3h44_44[disabled]{opacity:.4}._button_e3h44_44{display:flex;align-items:center;justify-content:center;width:40px;height:40px;font-family:inherit;color:var(--brand-primary-color);background-color:var(--brand-secondary-color);cursor:pointer;-webkit-user-select:none;user-select:none;border-radius:50%;border:none;text-align:center}._button_e3h44_44 svg{margin:2px;height:2em;width:2em;fill:currentColor}._button_e3h44_44:hover,._button_e3h44_44:active,._button_e3h44_44:focus{border:none;outline:none;color:var(--brand-secondary-color);background-color:var(--brand-primary-color)}._button_e3h44_44:not(:last-child){margin-right:.5em}._audioRecorder_g845f_1{display:flex;margin-left:-5px}._audioButton_g845f_6{display:flex;align-items:center;justify-content:center;cursor:pointer;-webkit-user-select:none;user-select:none;width:40px;height:40px;border-radius:50%;border:none;text-align:center;color:var(--brand-primary-color);background-color:var(--brand-secondary-color)}._audioButton_g845f_6:hover,._audioButton_g845f_6:active,._audioButton_g845f_6:focus{background-color:var(--brand-primary-color);color:var(--brand-secondary-color);border:none;outline:none}._audioButton_g845f_6 svg{margin:2px;height:2em;width:2em;fill:currentColor}._recorderIcon_g845f_37{width:1.3em;height:1.3em;border-radius:50%;animation:_pulse_g845f_1 2s infinite;margin:auto .6em}@keyframes _pulse_g845f_1{0%{background-color:#fff}40%{background-color:var(--danger-color)}60%{background-color:var(--danger-color)}to{background-color:#fff}}._spinning_g845f_60{width:40px;height:40px;padding:5px;display:block;margin:auto;color:var(--brand-primary-color);animation:_spin_g845f_60 1.2s linear infinite}@keyframes _spin_g845f_60{to{transform:rotate(360deg)}}._quickReplies_83npe_1{display:flex;flex-flow:row wrap;justify-content:flex-end;padding:.4rem 1rem;gap:.5rem}._quickReply_83npe_9{font-size:.8rem;background-color:var(--brand-secondary-color);color:var(--brand-primary-color);border:1px solid var(--brand-primary-color)}._quickReply_83npe_9:active,._quickReply_83npe_9:focus,._quickReply_83npe_9:hover{background-color:var(--brand-primary-color);color:var(--brand-secondary-color);border:1px solid var(--brand-secondary-color);outline:none}._header_3gvbz_1{display:flex;justify-content:space-between;align-items:center;height:var(--header-height);position:relative;background-color:var( --header-background-color, var(--brand-primary-color, white) )}._logoContainer_3gvbz_14{height:inherit;flex:1;padding:var(--header-logo-padding)}._logo_3gvbz_14{height:100%;background-image:var(--header-logo-url);background-repeat:no-repeat;background-size:contain;background-position:left center}._actions_3gvbz_28{display:flex;align-items:center;padding:var(--header-icons-padding);color:var(--header-icon-color, white)}._actions_3gvbz_28 button{background-color:transparent;color:inherit;border:none;cursor:pointer;border-radius:50%;padding:calc(var(--header-icon-size) / 3);margin:4px}._actions_3gvbz_28 button._active_3gvbz_43,._actions_3gvbz_28 button:hover{background-color:rgb(from var(--header-icon-color, white) r g b / 20%)}._actions_3gvbz_28 button svg{width:var(--header-icon-size);height:var(--header-icon-size);display:block}._menuContainer_3gvbz_56{position:relative;display:inline-block}._menu_3gvbz_56{position:absolute;margin-top:.5rem;top:calc(100% - 8px);right:0;left:auto;width:max-content;max-width:300px;padding:.5rem;background-color:var(--header-menu-background-color);box-shadow:var(--header-menu-box-shadow);border-radius:var(--header-menu-border-radius);display:flex;z-index:4000}._menu_3gvbz_56 ul{list-style-type:none;padding:0;margin:0}._menu_3gvbz_56 ul li{display:flex;align-items:center;cursor:pointer}._menu_3gvbz_56 ul li._divider_3gvbz_86{border-bottom:1px solid var(--header-menu-item-divider-color);margin-bottom:5px;padding-bottom:5px}._menu_3gvbz_56 ul li a{display:flex;align-items:center;padding:.5rem;text-decoration:none;border-radius:var(--header-menu-item-border-radius);color:var(--header-menu-item-color);width:100%;transition:background .2s}._menu_3gvbz_56 ul li a:hover,._menu_3gvbz_56 ul li a:focus{background-color:var(--header-menu-item-background-color-hover);outline:none}._menu_3gvbz_56 ul li a svg{margin-right:.5rem;width:1em;height:1em;flex-shrink:0}@media screen and (min-width: 1024px){._header_3gvbz_1{background-color:transparent;border-top-left-radius:0;border-top-right-radius:0}._actions_3gvbz_28 button{font-size:2rem}._actions_3gvbz_28 button:hover{background-color:var(--brand-primary-color);color:#fff}}._chatwindow_rkbir_1{display:flex;flex-direction:column;position:relative;width:100%;height:100vh;height:100svh;overflow:hidden}._chatwindow_rkbir_1 main{flex:1;overflow:hidden}._chatwindow_rkbir_1 aside{display:none}._chatwindowWithAside_rkbir_21{display:grid;position:relative;grid-template-rows:auto 1fr;grid-column-gap:6rem;grid-template-areas:"header" "main"}._chatwindowWithAside_rkbir_21 header{grid-area:header;display:block}._chatwindowWithAside_rkbir_21 main{position:relative;grid-area:main;flex:1}._chatwindowWithAside_rkbir_21 aside{display:flex;flex-direction:column;justify-content:flex-end;position:absolute;inset:0;z-index:1000000;grid-area:main;overflow:hidden;container-type:inline-size;background-color:#00000080}._chatwindowWithAside_rkbir_21 aside:empty{display:none}@media screen and (min-width: 1024px){._chatwindow_rkbir_1{justify-content:center}._chatwindow_rkbir_1 header{padding-inline:2rem;grid-area:header}._chatwindow_rkbir_1 main{grid-area:header;flex:none;overflow:hidden}._chatwindow_rkbir_1 header,._chatwindow_rkbir_1 main{display:block;max-width:50em;width:100%;margin-left:auto;margin-right:auto}._chatwindowWithAside_rkbir_21{grid-template-columns:2fr 1fr;grid-template-areas:"header aside" "main aside"}._chatwindowWithAside_rkbir_21 header{margin-right:unset;padding:1rem 2rem}._chatwindowWithAside_rkbir_21 main{grid-area:main;flex:1;margin-right:unset;padding:0 2rem 1rem}._chatwindowWithAside_rkbir_21 aside{grid-area:aside;animation:none;background-color:unset}}.chat__cms-integration header{display:none}._sourceInfos_vei0l_1{position:relative;display:flex;flex-direction:column;max-height:calc(100svh - var(--header-height) - 2rem);max-height:calc(100% - var(--header-height) - 2rem);height:auto;border-top-left-radius:.6rem;border-top-right-radius:.6rem;background-color:#fff;box-shadow:#00000059 0 5px 15px;transition:max-height .3s linear;border:none;inset:auto 0 0;margin:0;padding:0;width:100%;max-width:100%}._sourceInfos_vei0l_1._waitForLoading_vei0l_24{max-height:0}._sourceInfos_vei0l_1._loadingContent_vei0l_28{max-height:50%}._sourceInfos_vei0l_1 svg{display:block}._sourceHeader_vei0l_37{display:flex;align-items:center;justify-content:space-between;gap:.5rem;touch-action:none;padding:0 .5rem 0 1rem;border-bottom:1px solid var(--color-gray-200)}._sourceHeader_vei0l_37 p{display:-webkit-box;overflow-wrap:break-word;word-break:break-all;line-clamp:1;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}._sourceHeaderIcon_vei0l_57{font-size:2rem}._sourceContent_vei0l_61{flex:1;padding:1rem 1rem 0;line-height:1.5;overflow-y:auto;overflow-wrap:break-word}._openSourceButton_vei0l_69{margin:1rem;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:1rem;border-radius:5rem;text-decoration:none}._openSourceButton_vei0l_69 ._sourceButtonLabel_vei0l_79{display:flex;align-items:center;gap:.5rem}._openSourceButton_vei0l_69 ._sourceButtonLabel_vei0l_79 p{display:-webkit-box;font-size:1rem;margin-block:.5rem;line-clamp:1;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-align:left}._openSourceButton_vei0l_69 svg{font-size:1.5rem}._closeSourceInfosButton_vei0l_101{background-color:transparent;border:none;cursor:pointer;font-size:1.5rem;margin:0;padding:.25rem;border-radius:50%}._closeSourceInfosButton_vei0l_101:hover{background-color:var(--brand-primary-color);color:#fff}@keyframes _rotate_vei0l_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}._loadingSourceInfos_vei0l_125{display:flex;align-items:center;justify-content:center;font-size:5rem;margin:5rem 7rem 7rem;color:var(--color-gray-700)}._loading_vei0l_28{animation:_rotate_vei0l_1 2s linear infinite;transform-origin:center}._loadingError_vei0l_139{display:flex;flex-direction:column;gap:2rem;padding:1rem 2rem 2rem}._loadingError_vei0l_139 h1,._loadingError_vei0l_139 p{text-align:center}._loadingError_vei0l_139 img{width:100%}._highlightLoadingInfo_vei0l_155{position:absolute;width:calc(100% - 2rem);bottom:5rem;margin-bottom:1rem;padding:.5rem;border:1px solid var(--color-gray-200);border-radius:.5rem;color:var(--color-gray-700);background-color:#fff;font-size:.875rem;box-shadow:#0000001a 0 0 30px 15px;cursor:pointer}._highlightLoadingInfo_vei0l_155 ._highlightLoadingInfoInnerContainer_vei0l_169{display:flex;gap:1rem;justify-content:center;align-items:center;padding:.5rem 0 .5rem .5rem;color:var(--color-gray-700);font-size:.875rem}._highlightLoadingInfo_vei0l_155 ._highlightLoadingInfoInnerContainer_vei0l_169 ._highlightLoadingInfoContent_vei0l_178{display:flex;flex-direction:column}._highlightLoadingInfo_vei0l_155 ._highlightLoadingInfoInnerContainer_vei0l_169 ._highlightLoadingInfoContent_vei0l_178 h3{margin:0}._highlightLoadingInfo_vei0l_155 ._highlightLoadingInfoInnerContainer_vei0l_169 ._highlightLoadingInfoContent_vei0l_178 p{margin:0;line-height:1.5}._highlightLoadingInfo_vei0l_155 ._highlightLoadingInfoInnerContainer_vei0l_169 svg{flex-shrink:0;font-size:2rem}._highlightLoadingInfo_vei0l_155 ._highlightLoadingInfoCloseIcon_vei0l_198{float:right}._highlightLoader_vei0l_203{position:relative;width:100%;height:2px;overflow:hidden}._highlightLoaderLoading_vei0l_210{position:absolute;height:100%;width:50%;background:linear-gradient(to right,transparent,var(--color-gray-700),transparent);border-radius:4px;animation:_loadingAnim_vei0l_1 5s ease-in-out infinite}@keyframes _loadingAnim_vei0l_1{0%{left:-30%}50%{left:70%}to{left:-30%}}@media screen and (min-width: 1024px){._sourceInfos_vei0l_1{height:100%;max-height:unset;max-width:35rem;width:unset;margin-top:0;margin-left:1rem;border-radius:unset;animation:none;transition:none;top:unset;right:unset;bottom:unset;left:unset}._sourceInfos_vei0l_1._loadingContent_vei0l_28{max-height:100%}._sourceHeader_vei0l_37{padding:0 .5rem 0 2rem}._sourceContent_vei0l_61{padding:2rem 2rem 0}._openSourceButton_vei0l_69{margin:2rem;border-radius:.2rem}._openSourceButton_vei0l_69 p{margin-block:revert}._loadingSourceInfos_vei0l_125{margin:7rem 0 0}._highlightLoader_vei0l_203{height:1px}._highlightLoadingInfo_vei0l_155{width:calc(100% - 4rem);bottom:6rem}@container (min-width: 30rem){._sourceInfos_vei0l_1{margin:2rem;height:calc(100% - 4rem)}}}._container_114wy_1{display:flex;flex-direction:column;height:100%}._body_114wy_7{padding:1rem;overflow-y:auto;flex:1;color:var(--text-primary-color)}._intro_114wy_14{margin-bottom:1em}._intro_114wy_14 h1{font-size:1.3em}._intro_114wy_14 h2{font-size:1em}._intro_114wy_14 p{line-height:1.4}._intro_114wy_14 ul{padding-left:1em}._intro_114wy_14 li{padding-top:.3em;padding-bottom:.3em;line-height:1.4}._footer_114wy_39{padding:1rem}._footnote_114wy_43{margin-top:.75rem;text-align:center;font-size:.8em;color:var(--text-secondary-color)}@media screen and (min-width: 1024px){._container_114wy_1{justify-content:center;background:#fff;border-radius:20px;padding:2rem}._containerWithFootnote_114wy_58{padding-bottom:1rem}._body_114wy_7{max-height:60vh;padding:0 0 1rem;margin-bottom:1rem}._footer_114wy_39{padding:0}}._startChatButton_114wy_73{width:100%}._formFields_114wy_77{display:flex;flex-direction:column;gap:.75em}._formField_114wy_77{display:flex;flex-direction:column;gap:8px}._radio_114wy_89{display:flex;align-items:flex-start;gap:6px;accent-color:var(--brand-primary-color)}._checkbox_114wy_96{display:flex;align-items:flex-start;gap:6px;padding:6px 0;accent-color:var(--brand-primary-color)}._input_114wy_104 input{border-width:1px;border-style:solid;border-color:#d9d9d9;box-sizing:border-box;margin:0;padding:4px 11px;color:#000000e0;font-size:1em;line-height:1.57;list-style:none;font-family:inherit;position:relative;display:inline-block;width:100%;min-width:0;border-radius:6px;transition:all .2s;accent-color:var(--brand-primary-color)}._input_114wy_104 input:focus,._input_114wy_104 input:focus-within{border-color:var(--brand-primary-color);box-shadow:0 0 0 2px #0591ff1a;outline:0;background-color:#fff}._input_114wy_104 input:hover{border-color:var(--brand-primary-color)}._inputLabel_114wy_138{margin-bottom:8px}._selectWrapper_114wy_142{position:relative}._selectWrapper_114wy_142:after{content:"⌄";font-size:1rem;top:2px;right:14px;position:absolute}._select_114wy_142 select{border-width:1px;border-style:solid;border-color:#d9d9d9;box-sizing:border-box;margin:0;padding:4px 11px;color:#000000e0;font-size:1em;line-height:1.57;list-style:none;font-family:inherit;position:relative;display:inline-block;width:100%;min-width:0;border-radius:6px;transition:all .2s;accent-color:var(--brand-primary-color);appearance:none}._select_114wy_142 select:focus,._select_114wy_142 select:focus-within{border-color:var(--brand-primary-color);box-shadow:0 0 0 2px #0591ff1a;outline:0;background-color:#fff}._select_114wy_142 select:hover{border-color:var(--brand-primary-color)}._selectLabel_114wy_188{margin-bottom:8px}:root{--aspect-ratio: calc(16 / 9);--color-gray-100: #e9eff6;--color-gray-200: #d6d6d6;--color-gray-300: #bfbfbf;--color-gray-400: #999999;--color-gray-500: #707070;--color-gray-600: #565656;--color-gray-700: #434343;--color-gray-800: #2e2e2e;--color-gray-900: #1a1a1a;--body-background-color: white;--brand-primary-color: rgb(4, 47, 97);--brand-secondary-color: white;--text-primary-color: var(--color-gray-800);--text-secondary-color: var(--color-gray-500);--text-link-color: var(--text-primary-color);--text-link-color-hover: var(--brand-primary-color);--danger-color: #b11106;--scrollbar-thumb-color: var(--color-gray-300);--header-height: 4em;--header-icon-size: 1.5rem;--header-icons-padding: 1rem .75rem;--header-icon-color: white;--header-logo-padding: 1em;--header-logo-url: url(../logo.svg);--header-menu-border-radius: 10px;--header-menu-background-color: white;--header-menu-box-shadow: 0 6px 16px 0 rgba(0, 0, 0, .08), 0 3px 6px -4px rgba(0, 0, 0, .12), 0 9px 28px 8px rgba(0, 0, 0, .05);--header-menu-item-border-radius: 5px;--header-menu-item-background-color-hover: var(--color-gray-100);--header-menu-item-color: var(--text-primary-color);--header-menu-item-divider-color: var(--color-gray-200);--avatar-size: 2rem;--avatar-radius: 50%;--bot-avatar-display: initial;--bot-avatar-background-color: var(--color-gray-100);--agent-avatar-background-color: var(--color-gray-100);--bubble-padding: .9em 1.3em;--bubble-margin-small: 3px;--bubble-margin-large: 1.2rem;--bubble-radius-large: 20px;--bubble-radius-small: 4px;--bot-bubble-background-color: white;--bot-bubble-text-color: var(--text-primary-color);--bot-bubble-border-color: var(--color-gray-700);--bot-bubble-border-width: 2px;--bot-bubble-top-left-radius: var(--bubble-radius-small);--bot-bubble-top-right-radius: var(--bubble-radius-large);--bot-bubble-bottom-right-radius: var(--bubble-radius-large);--bot-bubble-bottom-left-radius: var(--bubble-radius-small);--bot-bubble-source-background-color: var(--body-background-color);--bot-bubble-source-text-color: var(--bot-bubble-text-color);--guest-bubble-background-color: var(--brand-primary-color);--guest-bubble-text-color: white;--guest-bubble-border-color: white;--guest-bubble-border-width: 0px;--guest-bubble-top-left-radius: var(--bubble-radius-large);--guest-bubble-top-right-radius: var(--bubble-radius-small);--guest-bubble-bottom-right-radius: var(--bubble-radius-small);--guest-bubble-bottom-left-radius: var(--bubble-radius-large)}.chat__large{--header-icon-color: var(--color-gray-800);--header-logo-padding: .5em 1em .5em 0}[data-title]{--tooltip-min-width: 120px;--tooltip-max-width: min(400px, 80vw);--tooltip-tick-position-top: -10px;--tooltip-tick-position-bottom: unset;--tooltip-position-top: -42px;--tooltip-position-bottom: auto;--tooltip-position-left: auto;--tooltip-position-right: -.5em;--tooltip-border-color: #1f1f1f;--tooltip-border-color-top: var(--tooltip-border-color);--tooltip-border-color-bottom: transparent;position:relative;opacity:1}[data-title]:before{content:"";position:absolute;top:var(--tooltip-tick-position-top);bottom:var(--tooltip-tick-position-bottom);right:35%;border:6px solid transparent;border-top-color:var(--tooltip-border-color-top);border-bottom-color:var(--tooltip-border-color-bottom);z-index:999999;visibility:hidden}[data-title]:after{content:attr(data-title);position:absolute;top:var(--tooltip-position-top);bottom:var(--tooltip-position-bottom);right:var(--tooltip-position-right);left:var(--tooltip-position-left);font-size:14px;line-height:16px;padding:8px 10px;font-family:inherit;white-space:nowrap;border-radius:5px;background-color:#1f1f1f;color:#fafafa;box-shadow:1px 6px 16px #1f1f1f;z-index:99999;visibility:hidden}[data-title]:hover:before,[data-title]:hover:after{opacity:1;transition:all .1s ease .5s;visibility:visible}.tooltip-hidden[data-title]:before,.tooltip-hidden[data-title]:after{transition:inherit;visibility:hidden;display:none}.tooltip--top-right[data-title]{--tooltip-position-left: -1em;--tooltip-position-right: auto}.tooltip--top-center[data-title]{--tooltip-position-top: auto;--tooltip-position-bottom: calc(100% + 1rem) ;--tooltip-tick-position-top: auto;--tooltip-tick-position-bottom: calc(100% + 4px) }.tooltip--top-center[data-title]:after{left:50%;transform:translate(-50%);min-width:var(--tooltip-min-width);max-width:var(--tooltip-max-width);width:max-content;white-space:normal;word-break:break-word;text-align:center;bottom:var(--tooltip-position-bottom);top:var(--tooltip-position-top)}.tooltip--bottom-left[data-title]{--tooltip-position-top: auto;--tooltip-position-bottom: -3em;--tooltip-tick-position-top: unset;--tooltip-tick-position-bottom: -10px;--tooltip-border-color-top: transparent;--tooltip-border-color-bottom: var(--tooltip-border-color)}@supports (scrollbar-color: auto){*{scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb-color) transparent}}@supports not (scrollbar-color: auto){::-webkit-scrollbar{width:7px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{border-radius:4px;background:var(--scrollbar-thumb-color)}}*{box-sizing:border-box}body{margin:0}input::placeholder,textarea::placeholder{color:#666;opacity:1}svg{fill:currentColor}
@@ -106,7 +106,7 @@ For more details see https://formatjs.github.io/docs/getting-started/message-dis
106
106
  `)===-1)return null;let S="";E.split(`
107
107
  `).every(x=>(x+=`
108
108
  `,!c.some(Z=>Z.test(x))&&(S+=x,!!x.trim())));const I=Ks(S);return I===""?null:[S,,I]}),i:3,u:lh,l:(E,w,S)=>d("p",{key:S.key},w(E.children,S))},22:{t:["["],o:na(nR),i:0,u:E=>(_[E[1]]={target:E[2],title:E[4]},{}),l:uh},23:{t:["!["],o:ra(rR),i:0,u:E=>({alt:E[1]?Zn(E[1]):void 0,ref:E[2]}),l:(E,w,S)=>_[E.ref]?d("img",{key:S.key,alt:E.alt,src:s(_[E.ref].target,"img","src"),title:_[E.ref].title}):null},24:{t:["["],o:na(aR),i:0,u:(E,w,S)=>({children:w(E[1],S),fallbackChildren:E[0],ref:E[2]}),l:(E,w,S)=>_[E.ref]?d("a",{key:S.key,href:s(_[E.ref].target,"a","href"),title:_[E.ref].title},w(E.children,S)):d("span",{key:S.key},E.fallbackChildren)},25:{t:["|"],o:Er(bv),i:1,u:CR,l(E,w,S){const I=E;return d("table",{key:S.key},d("thead",null,d("tr",null,I.header.map(function(x,Z){return d("th",{key:Z,style:Sv(I,Z)},w(x,S))}))),d("tbody",null,I.cells.map(function(x,Z){return d("tr",{key:Z},x.map(function($,ie){return d("td",{key:ie,style:Sv(I,ie)},w($,S))}))})))}},27:{o:Is(yR),i:4,u(E){const w=E[0];return{text:w.indexOf("&")===-1?w:w.replace(ZO,(S,I)=>r.namedCodesToUnicode[I]||S)}},l:E=>E.text},28:{t:["**","__"],o:ra(fR),i:2,u:(E,w,S)=>({children:w(E[2],S)}),l:(E,w,S)=>d("strong",{key:S.key},w(E.children,S))},29:{t:E=>{const w=E[0];return(w==="*"||w==="_")&&E[1]!==w},o:ra(hR),i:3,u:(E,w,S)=>({children:w(E[2],S)}),l:(E,w,S)=>d("em",{key:S.key},w(E.children,S))},30:{t:["\\"],o:ra(pR),i:1,u:E=>({text:E[1],type:"27"})},31:{t:["=="],o:ra(dR),i:3,u:lh,l:(E,w,S)=>d("mark",{key:S.key},w(E.children,S))},32:{t:["~~"],o:ra(mR),i:3,u:lh,l:(E,w,S)=>d("del",{key:S.key},w(E.children,S))}};r.disableParsingRawHTML===!0&&(delete T[11],delete T[13]);const L=function(E){var w=Object.keys(E);function S(I,x){var Z=[];if(x.prevCapture=x.prevCapture||"",I.trim())for(;I;)for(var $=0;$<w.length;){var ie=w[$],_e=E[ie];if(!_e.t||RR(I,x,_e.t)){var Re=_e.o(I,x);if(Re&&Re[0]){I=I.substring(Re[0].length);var se=_e.u(Re,S,x);x.prevCapture+=Re[0],se.type||(se.type=ie),Z.push(se);break}$++}else $++}return x.prevCapture="",Z}return w.sort(function(I,x){return E[I].i-E[x].i||(I<x?-1:1)}),function(I,x){return S(function(Z){return Z.replace(qO,`
109
- `).replace(VO,"").replace(sR," ")}(I),x)}}(T),N=(V=function(E,w){return function(S,I,x){const Z=E[S.type].l;return w?w(()=>Z(S,I,x),S,I,x):Z(S,I,x)}}(T,r.renderRule),function E(w,S={}){if(Array.isArray(w)){const I=S.key,x=[];let Z=!1;for(let $=0;$<w.length;$++){S.key=$;const ie=E(w[$],S),_e=typeof ie=="string";_e&&Z?x[x.length-1]+=ie:ie!==null&&x.push(ie),Z=_e}return S.key=I,x}return V(w,E,S)});var V;const G=m(n);return y.length?d("div",null,G,d("footer",{key:"footer"},y.map(function(E){return d("div",{id:i(E.identifier,js),key:E.identifier},E.identifier,N(L(E.footnote,{inline:!0})))}))):G}const xr=n=>{let{children:r="",options:i}=n,s=function(u,c){if(u==null)return{};var h,d,m={},g=Object.keys(u);for(d=0;d<g.length;d++)c.indexOf(h=g[d])>=0||(m[h]=u[h]);return m}(n,CO);return H.cloneElement(UR(r,i),s)},HR="_generalConditionsContainer_55hjg_1",jR="_generalConditions_55hjg_1",IR="_generalConditionsHeader_55hjg_15",zR="_generalConditionsBody_55hjg_26",GR="_generalConditionsAccept_55hjg_35",zs={generalConditionsContainer:HR,generalConditions:jR,generalConditionsHeader:IR,generalConditionsBody:zR,generalConditionsAccept:GR},kR=()=>v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"currentColor",viewBox:"0 0 256 256",children:v.jsx("path",{d:"M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z"})}),qR=()=>v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"currentColor",viewBox:"0 0 256 256",children:v.jsx("path",{d:"M212.24,164.24a6,6,0,0,1-8.48,0L128,88.49,52.24,164.24a6,6,0,0,1-8.48-8.48l80-80a6,6,0,0,1,8.48,0l80,80A6,6,0,0,1,212.24,164.24Z"})}),FR="general-conditions.header",PR="general-conditions.body",Tv="general-conditions.accept-conditions-note",VR=()=>{const n=tt(),[r,i]=H.useState(!1),s=()=>i(!r),u=d=>{d.key==="ArrowDown"||d.key==="ArrowRight"?i(!0):d.key==="ArrowUp"||d.key==="ArrowLeft"||d.key==="Escape"?i(!1):(d.key==="Enter"||d.key==="Space"||d.key===" ")&&s()},c=n(FR),h=n(Tv);return v.jsxs("div",{className:Q(zs.generalConditionsContainer,"chat__generalConditions"),children:[!!c?.length&&v.jsxs("div",{className:zs.generalConditions,children:[v.jsxs("div",{role:"button",onClick:s,onKeyDown:u,tabIndex:0,className:Q(zs.generalConditionsHeader,"chat__generalConditions__header"),"aria-controls":"general-conditions-body","aria-expanded":r?"true":"false","aria-pressed":r?"true":"false",children:[v.jsx(xr,{children:c}),r?v.jsx(qR,{}):v.jsx(kR,{})]}),v.jsx("div",{className:Q(zs.generalConditionsBody,"chat__generalConditions__body"),id:"general-conditions-body",role:"region",tabIndex:-1,children:r&&v.jsx(xr,{children:n(PR)||""})})]}),!!h?.length&&v.jsx("div",{className:Q(zs.generalConditionsAccept,"chat__generalConditions__accept"),tabIndex:0,children:v.jsx(xr,{children:n(Tv)||""})})]})},YR="_message_1sw52_1",XR="_messageBot_1sw52_9",ZR="_messageBotLast_1sw52_19",QR="_avatar_1sw52_19",KR="_messageBotFirst_1sw52_28",$R="_messageBotAnimated_1sw52_41",WR="_messageGuest_1sw52_52",JR="_messageGuestFirst_1sw52_58",ew="_messageGuestLast_1sw52_64",tw="_botAvatar_1sw52_78",nw="_agentAvatar_1sw52_82",rw="_bubble_1sw52_86",aw="_bubbleContent_1sw52_92",iw="_bubbleLeft_1sw52_106",sw="_leftText_1sw52_117",lw="_bubbleRight_1sw52_124",ow="_rightText_1sw52_134",uw="_sourceInfoReference_1sw52_166",cw="_sourceInfoReferenceActive_1sw52_178",ge={message:YR,messageBot:XR,messageBotLast:ZR,avatar:QR,messageBotFirst:KR,messageBotAnimated:$R,messageGuest:WR,messageGuestFirst:JR,messageGuestLast:ew,botAvatar:tw,agentAvatar:nw,bubble:rw,bubbleContent:aw,bubbleLeft:iw,leftText:sw,bubbleRight:lw,rightText:ow,sourceInfoReference:uw,sourceInfoReferenceActive:cw},fw="_botMessageActions_19z1f_1",hw="_alwaysVisible_19z1f_25",dw="_reported_19z1f_32",mw="_action_19z1f_36",aa={botMessageActions:fw,alwaysVisible:hw,reported:dw,action:mw},pw=({alwaysVisible:n,senderType:r,reaction:i,botMessageRef:s,onReaction:u})=>{const c=tt(),[h,d]=H.useState(!1),m=y=>()=>u(y),g=H.useCallback(async()=>{if(s.current)try{d(!0);const y=s.current.innerHTML,_=s.current.innerText;await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([y],{type:"text/html"}),"text/plain":new Blob([_],{type:"text/plain"})})]),await new Promise(T=>setTimeout(T,1500))}finally{d(!1)}},[s]);return v.jsxs("div",{className:Q(aa.botMessageActions,n&&aa.alwaysVisible,i&&aa.reported),children:[r===tu.BOT&&v.jsx("button",{className:Q(aa.action,i==="GOOD"&&aa.reported,"tooltip--top-right"),tabIndex:0,"aria-label":c(i==="GOOD"?"bot-bubble.reaction.remove":"bot-bubble.reaction.good"),"data-title":c(i==="GOOD"?"bot-bubble.reaction.remove":"bot-bubble.reaction.good"),onClick:m(i==="GOOD"?null:"GOOD"),children:v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:i==="GOOD"?v.jsx("path",{d:"M234,80.12A24,24,0,0,0,216,72H160V56a40,40,0,0,0-40-40,8,8,0,0,0-7.16,4.42L75.06,96H32a16,16,0,0,0-16,16v88a16,16,0,0,0,16,16H204a24,24,0,0,0,23.82-21l12-96A24,24,0,0,0,234,80.12ZM32,112H72v88H32Z"}):v.jsx("path",{d:"M234,80.12A24,24,0,0,0,216,72H160V56a40,40,0,0,0-40-40,8,8,0,0,0-7.16,4.42L75.06,96H32a16,16,0,0,0-16,16v88a16,16,0,0,0,16,16H204a24,24,0,0,0,23.82-21l12-96A24,24,0,0,0,234,80.12ZM32,112H72v88H32ZM223.94,97l-12,96a8,8,0,0,1-7.94,7H88V105.89l36.71-73.43A24,24,0,0,1,144,56V80a8,8,0,0,0,8,8h64a8,8,0,0,1,7.94,9Z"})})}),r===tu.BOT&&v.jsx("button",{className:Q(aa.action,i==="BAD"&&aa.reported,"tooltip--top-right"),tabIndex:0,"aria-label":c(i==="BAD"?"bot-bubble.reaction.remove":"bot-bubble.reaction.bad"),"data-title":c(i==="BAD"?"bot-bubble.reaction.remove":"bot-bubble.reaction.bad"),onClick:m(i==="BAD"?null:"BAD"),children:v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:i==="BAD"?v.jsx("path",{d:"M239.82,157l-12-96A24,24,0,0,0,204,40H32A16,16,0,0,0,16,56v88a16,16,0,0,0,16,16H75.06l37.78,75.58A8,8,0,0,0,120,240a40,40,0,0,0,40-40V184h56a24,24,0,0,0,23.82-27ZM72,144H32V56H72Z"}):v.jsx("path",{d:"M239.82,157l-12-96A24,24,0,0,0,204,40H32A16,16,0,0,0,16,56v88a16,16,0,0,0,16,16H75.06l37.78,75.58A8,8,0,0,0,120,240a40,40,0,0,0,40-40V184h56a24,24,0,0,0,23.82-27ZM72,144H32V56H72Zm150,21.29a7.88,7.88,0,0,1-6,2.71H152a8,8,0,0,0-8,8v24a24,24,0,0,1-19.29,23.54L88,150.11V56H204a8,8,0,0,1,7.94,7l12,96A7.87,7.87,0,0,1,222,165.29Z"})})}),v.jsx("button",{className:Q(aa.action,"tooltip--top-right"),tabIndex:0,"aria-label":c("bot-bubble.copy"),"data-title":c("bot-bubble.copy"),onClick:g,children:v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:h?v.jsx("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}):v.jsx("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"})})})]})},Ib=H.forwardRef(({message:n,isAnimated:r,isLastMessage:i,isFirstMessageBySender:s,isLastMessageBySender:u,children:c,onReaction:h},d)=>{const m=tt(),g=H.useRef(null),y=n.sender.type===Oe.UserType.BOT;return v.jsxs("li",{ref:d,className:Q(ge.message,ge.messageBot,i&&ge.lastMessage,s&&ge.messageBotFirst,u&&ge.messageBotLast,"chat__bubbleContainer",r&&ge.messageBotAnimated,r&&"chat__bubbleContainer--animated",y?"chat__botBubbleContainer":"chat__agentBubbleContainer",s&&"chat__bubbleContainer--first",u&&"chat__bubbleContainer--last"),children:[v.jsx("img",{className:Q(ge.avatar,y?ge.botAvatar:ge.agentAvatar,"chat__avatar",y?"chat__botAvatar":"chat__agentAvatar"),src:`${n.sender.avatar}`,alt:y?"Bot":"Agent",referrerPolicy:"no-referrer"}),v.jsxs("div",{ref:g,className:Q(ge.bubble,ge.bubbleLeft,"chat__bubble",y?"chat__botBubble":"chat__agentBubble"),tabIndex:0,"aria-label":m(y?"bot-bubble.label":"agent-bubble.label"),children:[v.jsx("div",{className:Q(ge.leftText),children:c}),h&&v.jsx(pw,{alwaysVisible:i&&u,senderType:n.sender.type,reaction:n.reaction,botMessageRef:g,onReaction:h})]})]})}),gw="_sourceList_1n31h_1",yw="_source_1n31h_1",vw="_label_1n31h_37",fh={sourceList:gw,source:yw,label:vw},zb=n=>v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",...n,children:v.jsx("path",{d:"M52,146H36a6,6,0,0,0-6,6v56a6,6,0,0,0,6,6H52a34,34,0,0,0,0-68Zm0,56H42V158H52a22,22,0,0,1,0,44Zm168.15-5.46a6,6,0,0,1,.18,8.48A28.06,28.06,0,0,1,200,214c-16.54,0-30-15.25-30-34s13.46-34,30-34a28.06,28.06,0,0,1,20.33,9,6,6,0,0,1-8.66,8.3A16.23,16.23,0,0,0,200,158c-9.93,0-18,9.87-18,22s8.07,22,18,22a16.23,16.23,0,0,0,11.67-5.28A6,6,0,0,1,220.15,196.54ZM128,146c-16.54,0-30,15.25-30,34s13.46,34,30,34,30-15.25,30-34S144.54,146,128,146Zm0,56c-9.93,0-18-9.87-18-22s8.07-22,18-22,18,9.87,18,22S137.93,202,128,202ZM48,118a6,6,0,0,0,6-6V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50v18a6,6,0,0,0,12,0V88a6,6,0,0,0-1.76-4.24l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72A6,6,0,0,0,48,118ZM158,46.48,193.52,82H158Z"})}),Gb=n=>v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",...n,children:v.jsx("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM200,218H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216A2,2,0,0,1,200,218Z"})}),kb=n=>v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",...n,children:v.jsx("path",{d:"M222,152a6,6,0,0,1-6,6H190v20h18a6,6,0,0,1,0,12H190v18a6,6,0,0,1-12,0V152a6,6,0,0,1,6-6h32A6,6,0,0,1,222,152ZM90,172a26,26,0,0,1-26,26H54v10a6,6,0,0,1-12,0V152a6,6,0,0,1,6-6H64A26,26,0,0,1,90,172Zm-12,0a14,14,0,0,0-14-14H54v28H64A14,14,0,0,0,78,172Zm84,8a34,34,0,0,1-34,34H112a6,6,0,0,1-6-6V152a6,6,0,0,1,6-6h16A34,34,0,0,1,162,180Zm-12,0a22,22,0,0,0-22-22H118v44h10A22,22,0,0,0,150,180ZM42,112V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.25,1.76l56,56A6,6,0,0,1,214,88v24a6,6,0,0,1-12,0V94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2v72a6,6,0,0,1-12,0ZM158,82h35.52L158,46.48Z"})}),qb=n=>v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",...n,children:v.jsx("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm81.57,64H169.19a132.58,132.58,0,0,0-25.73-50.67A90.29,90.29,0,0,1,209.57,90ZM218,128a89.7,89.7,0,0,1-3.83,26H171.81a155.43,155.43,0,0,0,0-52h42.36A89.7,89.7,0,0,1,218,128Zm-90,87.83a110,110,0,0,1-15.19-19.45A124.24,124.24,0,0,1,99.35,166h57.3a124.24,124.24,0,0,1-13.46,30.38A110,110,0,0,1,128,215.83ZM96.45,154a139.18,139.18,0,0,1,0-52h63.1a139.18,139.18,0,0,1,0,52ZM38,128a89.7,89.7,0,0,1,3.83-26H84.19a155.43,155.43,0,0,0,0,52H41.83A89.7,89.7,0,0,1,38,128Zm90-87.83a110,110,0,0,1,15.19,19.45A124.24,124.24,0,0,1,156.65,90H99.35a124.24,124.24,0,0,1,13.46-30.38A110,110,0,0,1,128,40.17Zm-15.46-.84A132.58,132.58,0,0,0,86.81,90H46.43A90.29,90.29,0,0,1,112.54,39.33ZM46.43,166H86.81a132.58,132.58,0,0,0,25.73,50.67A90.29,90.29,0,0,1,46.43,166Zm97,50.67A132.58,132.58,0,0,0,169.19,166h40.38A90.29,90.29,0,0,1,143.46,216.67Z"})}),bw=({type:n,...r})=>{switch(n){case"WEBSITE":return v.jsx(qb,{...r});case"PDF":return v.jsx(kb,{...r});case"DOCX":return v.jsx(zb,{...r});default:return v.jsx(Gb,{...r})}},Pd=({sources:n,onLinkClick:r})=>{const i=tt(),s=c=>()=>{r(c.url)},u=c=>h=>{(h.key==="Enter"||h.key===" ")&&r(c.url)};return n.length?v.jsx("ul",{className:fh.sourceList,"aria-label":i("bot-bubble.sources"),children:n.map(c=>v.jsx("li",{className:fh.source,children:v.jsxs("a",{role:"button",tabIndex:0,"aria-label":`${i("bot-bubble.source.open")}: ${c.label}`,onClick:s(c),onKeyDown:u(c),children:[v.jsx(bw,{type:c.type,"aria-hidden":"true"}),v.jsx("div",{className:fh.label,children:c.label})]})},c.url))}):null},_w="_button_3ui4g_1",Ew="_buttonDefault_3ui4g_13",Sw="_buttonPrimary_3ui4g_28",Js={button:_w,buttonDefault:Ew,buttonPrimary:Sw},gu=({className:n,children:r,...i})=>v.jsx("button",{className:Q(Js.button,n),type:"button",role:"button",...i,children:r}),Tw="_title_137pi_1",Aw="_buttons_137pi_6",xw="_button_137pi_6",Ow="_imageContainer_137pi_29",Rw="_image_137pi_29",ww="_video_container_137pi_44",Cw="_video_137pi_44",Nw="_only_137pi_58",ln={title:Tw,buttons:Aw,button:xw,imageContainer:Ow,image:Rw,video_container:ww,video:Cw,only:Nw},Mw=({buttons:n,onButtonClick:r})=>v.jsx("div",{className:Q(ln.buttons,"chat__bubbleButtons"),children:n.map((i,s)=>v.jsx(gu,{className:Q(ln.button,"chat__bubbleButton"),onClick:()=>r(i),children:i.title},s))}),Av="newtab#",Fb=({markdown:n,markdownOptions:r={},onLinkClick:i})=>{const s=c=>h=>(h.preventDefault(),c&&i(c),!1),u=({title:c,href:h,children:d})=>h.indexOf(Av)===0?v.jsx("a",{href:h.slice(Av.length),title:c,target:"_blank",rel:"noopener noreferrer",children:d}):v.jsx("a",{onClick:s(h),title:c,href:h,children:d});return v.jsx(xr,{options:{...r,overrides:{a:u}},children:n})},Dw=({text:n,onLinkClick:r})=>n?v.jsx("div",{children:v.jsx(Fb,{markdown:n,onLinkClick:r})}):null,Bw=({title:n})=>n?v.jsx("h1",{className:ln.title,children:n}):null,Lw=({title:n,text:r,buttons:i,onButtonClick:s,onLinkClick:u})=>n?.length||r?.length||i?.length?v.jsxs("div",{className:Q(ge.bubbleContent),children:[v.jsx(Bw,{title:n}),v.jsx(Dw,{text:r,onLinkClick:u}),v.jsx(Mw,{buttons:i,onButtonClick:s})]}):null,Uw=({alt:n,imageUrl:r,itemUrl:i,hasBody:s})=>r?i?i.indexOf("youtube.com")>-1?v.jsx("div",{className:ln.video_container,children:v.jsx("iframe",{className:Q(ln.video,{[ln.only]:!s}),title:"Youtube",width:"100%",src:i+"?rel=0",frameBorder:"0",allowFullScreen:!0})}):v.jsx("a",{href:i,target:"_blank",rel:"noopener noreferrer",children:v.jsx("div",{className:ln.imageContainer,children:v.jsx("img",{className:Q(ln.image,{[ln.only]:!s}),src:r,alt:n})})}):v.jsx("div",{className:ln.imageContainer,children:v.jsx("img",{className:Q(ln.image,{[ln.only]:!s}),src:r,alt:n})}):null,Hw=({title:n,text:r,imageUrl:i,itemUrl:s,buttons:u,sources:c,onButtonClick:h,onLinkClick:d})=>{const m=!!n?.length||!!r?.length||!!u?.length;return v.jsxs("div",{className:Q(ln.detailMessage),children:[v.jsx(Uw,{hasBody:m,imageUrl:i,itemUrl:s,alt:n||""}),m&&v.jsx(Lw,{title:n,text:r,buttons:u,onLinkClick:d,onButtonClick:h}),v.jsx(Pd,{sources:c,onLinkClick:d})]})},jw=H.forwardRef(({isFirstMessageBySender:n,isLastMessageBySender:r,children:i},s)=>{const u=tt();return v.jsx("li",{ref:s,className:Q(ge.message,ge.messageGuest,n&&ge.messageGuestFirst,r&&ge.messageGuestLast,"chat__bubbleContainer","chat__guestBubbleContainer",n&&"chat__bubbleContainer--first",r&&"chat__bubbleContainer--last"),children:v.jsx("div",{className:Q(ge.bubble,ge.bubbleRight,"chat__bubble","chat__guestBubble"),tabIndex:0,"aria-label":u("guest-bubble.label"),children:v.jsx("div",{className:Q(ge.rightText),children:i})})})}),Iw="_markdown_nw7vg_1",Pb={markdown:Iw},Vb=()=>zw(window.location.pathname),zw=n=>{const r=n.split("/"),i=n.endsWith("/");return r[r.length-(i?2:1)]},Vd=()=>H.useMemo(()=>Vb(),[]),Ho="source-info-reference",Gw=({actionId:n,markdown:r,sources:i,onLinkClick:s})=>{const u=Vd(),c=ka(),h=kw(),d=Zt(y=>{const _=y.chat.sourceInfos;if(_?.type==="loaded"||_?.type==="loading")return _.chunkId}),m=y=>_=>{const T=_.key;(T==="ArrowDown"||T==="ArrowRight"||T==="Enter"||T===" "||T==="Space")&&(_.stopPropagation(),c(lv(u,n,y)))},g=y=>()=>{c(lv(u,n,y))};return H.useLayoutEffect(()=>{document.querySelectorAll(`.${Ho}`).forEach(y=>{const _=y.previousSibling;_&&_.nodeType===Node.TEXT_NODE&&_.textContent?.endsWith(" ")&&_.textContent?.trim().length&&y.classList.add(`${Ho}--before-space`);const T=y.nextSibling;T&&T.nodeType===Node.TEXT_NODE&&T.textContent?.startsWith(" ")&&T.textContent?.trim().length&&y.classList.add(`${Ho}--after-space`)})},[r]),v.jsxs("div",{className:ge.bubbleContent,children:[v.jsx("div",{className:Pb.markdown,children:v.jsx(Fb,{markdown:r,onLinkClick:s,markdownOptions:{renderRule(y,_,T,L){if(_.type===NO.footnoteReference){const N=_.text===d;return v.jsx("span",{className:Q(ge.sourceInfoReference,N&&ge.sourceInfoReferenceActive,Ho),children:v.jsx("a",{type:"button",tabIndex:0,onClick:g(_.text),onKeyDown:m(_.text),children:h(_.text)})},L.key)}return y()}}})}),v.jsx(Pd,{sources:i,onLinkClick:s})]})},kw=()=>{const n=[];return i=>{const s=n.indexOf(i);return s>-1?s+1:(n.push(i),n.length)}},qw="_text_gp0s0_1",Fw="_command_gp0s0_5",xv={text:qw,command:Fw},Pw=({text:n,commands:r=[]})=>{const i=r.find(u=>n.startsWith(`/${u}`)),s=i?n.slice(i.length+1):n;return v.jsxs("div",{children:[i&&v.jsxs("code",{className:xv.command,children:["/",i]}),s.split(`
109
+ `).replace(VO,"").replace(sR," ")}(I),x)}}(T),N=(V=function(E,w){return function(S,I,x){const Z=E[S.type].l;return w?w(()=>Z(S,I,x),S,I,x):Z(S,I,x)}}(T,r.renderRule),function E(w,S={}){if(Array.isArray(w)){const I=S.key,x=[];let Z=!1;for(let $=0;$<w.length;$++){S.key=$;const ie=E(w[$],S),_e=typeof ie=="string";_e&&Z?x[x.length-1]+=ie:ie!==null&&x.push(ie),Z=_e}return S.key=I,x}return V(w,E,S)});var V;const G=m(n);return y.length?d("div",null,G,d("footer",{key:"footer"},y.map(function(E){return d("div",{id:i(E.identifier,js),key:E.identifier},E.identifier,N(L(E.footnote,{inline:!0})))}))):G}const xr=n=>{let{children:r="",options:i}=n,s=function(u,c){if(u==null)return{};var h,d,m={},g=Object.keys(u);for(d=0;d<g.length;d++)c.indexOf(h=g[d])>=0||(m[h]=u[h]);return m}(n,CO);return H.cloneElement(UR(r,i),s)},HR="_generalConditionsContainer_55hjg_1",jR="_generalConditions_55hjg_1",IR="_generalConditionsHeader_55hjg_15",zR="_generalConditionsBody_55hjg_26",GR="_generalConditionsAccept_55hjg_35",zs={generalConditionsContainer:HR,generalConditions:jR,generalConditionsHeader:IR,generalConditionsBody:zR,generalConditionsAccept:GR},kR=()=>v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"currentColor",viewBox:"0 0 256 256",children:v.jsx("path",{d:"M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z"})}),qR=()=>v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"currentColor",viewBox:"0 0 256 256",children:v.jsx("path",{d:"M212.24,164.24a6,6,0,0,1-8.48,0L128,88.49,52.24,164.24a6,6,0,0,1-8.48-8.48l80-80a6,6,0,0,1,8.48,0l80,80A6,6,0,0,1,212.24,164.24Z"})}),FR="general-conditions.header",PR="general-conditions.body",Tv="general-conditions.accept-conditions-note",VR=()=>{const n=tt(),[r,i]=H.useState(!1),s=()=>i(!r),u=d=>{d.key==="ArrowDown"||d.key==="ArrowRight"?i(!0):d.key==="ArrowUp"||d.key==="ArrowLeft"||d.key==="Escape"?i(!1):(d.key==="Enter"||d.key==="Space"||d.key===" ")&&s()},c=n(FR),h=n(Tv);return v.jsxs("div",{className:Q(zs.generalConditionsContainer,"chat__generalConditions"),children:[!!c?.length&&v.jsxs("div",{className:zs.generalConditions,children:[v.jsxs("div",{role:"button",onClick:s,onKeyDown:u,tabIndex:0,className:Q(zs.generalConditionsHeader,"chat__generalConditions__header"),"aria-controls":"general-conditions-body","aria-expanded":r?"true":"false","aria-pressed":r?"true":"false",children:[v.jsx(xr,{children:c}),r?v.jsx(qR,{}):v.jsx(kR,{})]}),v.jsx("div",{className:Q(zs.generalConditionsBody,"chat__generalConditions__body"),id:"general-conditions-body",role:"region",tabIndex:-1,children:r&&v.jsx(xr,{children:n(PR)||""})})]}),!!h?.length&&v.jsx("div",{className:Q(zs.generalConditionsAccept,"chat__generalConditions__accept"),tabIndex:0,children:v.jsx(xr,{children:n(Tv)||""})})]})},YR="_message_1sw52_1",XR="_messageBot_1sw52_9",ZR="_messageBotLast_1sw52_19",QR="_avatar_1sw52_19",KR="_messageBotFirst_1sw52_28",$R="_messageBotAnimated_1sw52_41",WR="_messageGuest_1sw52_52",JR="_messageGuestFirst_1sw52_58",ew="_messageGuestLast_1sw52_64",tw="_botAvatar_1sw52_78",nw="_agentAvatar_1sw52_82",rw="_bubble_1sw52_86",aw="_bubbleContent_1sw52_92",iw="_bubbleLeft_1sw52_106",sw="_leftText_1sw52_117",lw="_bubbleRight_1sw52_124",ow="_rightText_1sw52_134",uw="_sourceInfoReference_1sw52_166",cw="_sourceInfoReferenceActive_1sw52_178",ge={message:YR,messageBot:XR,messageBotLast:ZR,avatar:QR,messageBotFirst:KR,messageBotAnimated:$R,messageGuest:WR,messageGuestFirst:JR,messageGuestLast:ew,botAvatar:tw,agentAvatar:nw,bubble:rw,bubbleContent:aw,bubbleLeft:iw,leftText:sw,bubbleRight:lw,rightText:ow,sourceInfoReference:uw,sourceInfoReferenceActive:cw},fw="_botMessageActions_m0f8n_1",hw="_alwaysVisible_m0f8n_27",dw="_reported_m0f8n_34",mw="_action_m0f8n_38",aa={botMessageActions:fw,alwaysVisible:hw,reported:dw,action:mw},pw=({alwaysVisible:n,senderType:r,reaction:i,botMessageRef:s,onReaction:u})=>{const c=tt(),[h,d]=H.useState(!1),m=y=>()=>u(y),g=H.useCallback(async()=>{if(s.current)try{d(!0);const y=s.current.innerHTML,_=s.current.innerText;await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([y],{type:"text/html"}),"text/plain":new Blob([_],{type:"text/plain"})})]),await new Promise(T=>setTimeout(T,1500))}finally{d(!1)}},[s]);return v.jsxs("div",{className:Q(aa.botMessageActions,n&&aa.alwaysVisible,i&&aa.reported),children:[r===tu.BOT&&v.jsx("button",{className:Q(aa.action,i==="GOOD"&&aa.reported,"tooltip--top-right"),tabIndex:0,"aria-label":c(i==="GOOD"?"bot-bubble.reaction.remove":"bot-bubble.reaction.good"),"data-title":c(i==="GOOD"?"bot-bubble.reaction.remove":"bot-bubble.reaction.good"),onClick:m(i==="GOOD"?null:"GOOD"),children:v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:i==="GOOD"?v.jsx("path",{d:"M234,80.12A24,24,0,0,0,216,72H160V56a40,40,0,0,0-40-40,8,8,0,0,0-7.16,4.42L75.06,96H32a16,16,0,0,0-16,16v88a16,16,0,0,0,16,16H204a24,24,0,0,0,23.82-21l12-96A24,24,0,0,0,234,80.12ZM32,112H72v88H32Z"}):v.jsx("path",{d:"M234,80.12A24,24,0,0,0,216,72H160V56a40,40,0,0,0-40-40,8,8,0,0,0-7.16,4.42L75.06,96H32a16,16,0,0,0-16,16v88a16,16,0,0,0,16,16H204a24,24,0,0,0,23.82-21l12-96A24,24,0,0,0,234,80.12ZM32,112H72v88H32ZM223.94,97l-12,96a8,8,0,0,1-7.94,7H88V105.89l36.71-73.43A24,24,0,0,1,144,56V80a8,8,0,0,0,8,8h64a8,8,0,0,1,7.94,9Z"})})}),r===tu.BOT&&v.jsx("button",{className:Q(aa.action,i==="BAD"&&aa.reported,"tooltip--top-right"),tabIndex:0,"aria-label":c(i==="BAD"?"bot-bubble.reaction.remove":"bot-bubble.reaction.bad"),"data-title":c(i==="BAD"?"bot-bubble.reaction.remove":"bot-bubble.reaction.bad"),onClick:m(i==="BAD"?null:"BAD"),children:v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:i==="BAD"?v.jsx("path",{d:"M239.82,157l-12-96A24,24,0,0,0,204,40H32A16,16,0,0,0,16,56v88a16,16,0,0,0,16,16H75.06l37.78,75.58A8,8,0,0,0,120,240a40,40,0,0,0,40-40V184h56a24,24,0,0,0,23.82-27ZM72,144H32V56H72Z"}):v.jsx("path",{d:"M239.82,157l-12-96A24,24,0,0,0,204,40H32A16,16,0,0,0,16,56v88a16,16,0,0,0,16,16H75.06l37.78,75.58A8,8,0,0,0,120,240a40,40,0,0,0,40-40V184h56a24,24,0,0,0,23.82-27ZM72,144H32V56H72Zm150,21.29a7.88,7.88,0,0,1-6,2.71H152a8,8,0,0,0-8,8v24a24,24,0,0,1-19.29,23.54L88,150.11V56H204a8,8,0,0,1,7.94,7l12,96A7.87,7.87,0,0,1,222,165.29Z"})})}),v.jsx("button",{className:Q(aa.action,"tooltip--top-right"),tabIndex:0,"aria-label":c("bot-bubble.copy"),"data-title":c("bot-bubble.copy"),onClick:g,children:v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:h?v.jsx("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}):v.jsx("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"})})})]})},Ib=H.forwardRef(({message:n,isAnimated:r,isLastMessage:i,isFirstMessageBySender:s,isLastMessageBySender:u,children:c,onReaction:h},d)=>{const m=tt(),g=H.useRef(null),y=n.sender.type===Oe.UserType.BOT;return v.jsxs("li",{ref:d,className:Q(ge.message,ge.messageBot,i&&ge.lastMessage,s&&ge.messageBotFirst,u&&ge.messageBotLast,"chat__bubbleContainer",r&&ge.messageBotAnimated,r&&"chat__bubbleContainer--animated",y?"chat__botBubbleContainer":"chat__agentBubbleContainer",s&&"chat__bubbleContainer--first",u&&"chat__bubbleContainer--last"),children:[v.jsx("img",{className:Q(ge.avatar,y?ge.botAvatar:ge.agentAvatar,"chat__avatar",y?"chat__botAvatar":"chat__agentAvatar"),src:`${n.sender.avatar}`,alt:y?"Bot":"Agent",referrerPolicy:"no-referrer"}),v.jsxs("div",{ref:g,className:Q(ge.bubble,ge.bubbleLeft,"chat__bubble",y?"chat__botBubble":"chat__agentBubble"),tabIndex:0,"aria-label":m(y?"bot-bubble.label":"agent-bubble.label"),children:[v.jsx("div",{className:Q(ge.leftText),children:c}),h&&v.jsx(pw,{alwaysVisible:i&&u,senderType:n.sender.type,reaction:n.reaction,botMessageRef:g,onReaction:h})]})]})}),gw="_sourceList_1n31h_1",yw="_source_1n31h_1",vw="_label_1n31h_37",fh={sourceList:gw,source:yw,label:vw},zb=n=>v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",...n,children:v.jsx("path",{d:"M52,146H36a6,6,0,0,0-6,6v56a6,6,0,0,0,6,6H52a34,34,0,0,0,0-68Zm0,56H42V158H52a22,22,0,0,1,0,44Zm168.15-5.46a6,6,0,0,1,.18,8.48A28.06,28.06,0,0,1,200,214c-16.54,0-30-15.25-30-34s13.46-34,30-34a28.06,28.06,0,0,1,20.33,9,6,6,0,0,1-8.66,8.3A16.23,16.23,0,0,0,200,158c-9.93,0-18,9.87-18,22s8.07,22,18,22a16.23,16.23,0,0,0,11.67-5.28A6,6,0,0,1,220.15,196.54ZM128,146c-16.54,0-30,15.25-30,34s13.46,34,30,34,30-15.25,30-34S144.54,146,128,146Zm0,56c-9.93,0-18-9.87-18-22s8.07-22,18-22,18,9.87,18,22S137.93,202,128,202ZM48,118a6,6,0,0,0,6-6V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50v18a6,6,0,0,0,12,0V88a6,6,0,0,0-1.76-4.24l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72A6,6,0,0,0,48,118ZM158,46.48,193.52,82H158Z"})}),Gb=n=>v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",...n,children:v.jsx("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM200,218H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216A2,2,0,0,1,200,218Z"})}),kb=n=>v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",...n,children:v.jsx("path",{d:"M222,152a6,6,0,0,1-6,6H190v20h18a6,6,0,0,1,0,12H190v18a6,6,0,0,1-12,0V152a6,6,0,0,1,6-6h32A6,6,0,0,1,222,152ZM90,172a26,26,0,0,1-26,26H54v10a6,6,0,0,1-12,0V152a6,6,0,0,1,6-6H64A26,26,0,0,1,90,172Zm-12,0a14,14,0,0,0-14-14H54v28H64A14,14,0,0,0,78,172Zm84,8a34,34,0,0,1-34,34H112a6,6,0,0,1-6-6V152a6,6,0,0,1,6-6h16A34,34,0,0,1,162,180Zm-12,0a22,22,0,0,0-22-22H118v44h10A22,22,0,0,0,150,180ZM42,112V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.25,1.76l56,56A6,6,0,0,1,214,88v24a6,6,0,0,1-12,0V94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2v72a6,6,0,0,1-12,0ZM158,82h35.52L158,46.48Z"})}),qb=n=>v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",...n,children:v.jsx("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm81.57,64H169.19a132.58,132.58,0,0,0-25.73-50.67A90.29,90.29,0,0,1,209.57,90ZM218,128a89.7,89.7,0,0,1-3.83,26H171.81a155.43,155.43,0,0,0,0-52h42.36A89.7,89.7,0,0,1,218,128Zm-90,87.83a110,110,0,0,1-15.19-19.45A124.24,124.24,0,0,1,99.35,166h57.3a124.24,124.24,0,0,1-13.46,30.38A110,110,0,0,1,128,215.83ZM96.45,154a139.18,139.18,0,0,1,0-52h63.1a139.18,139.18,0,0,1,0,52ZM38,128a89.7,89.7,0,0,1,3.83-26H84.19a155.43,155.43,0,0,0,0,52H41.83A89.7,89.7,0,0,1,38,128Zm90-87.83a110,110,0,0,1,15.19,19.45A124.24,124.24,0,0,1,156.65,90H99.35a124.24,124.24,0,0,1,13.46-30.38A110,110,0,0,1,128,40.17Zm-15.46-.84A132.58,132.58,0,0,0,86.81,90H46.43A90.29,90.29,0,0,1,112.54,39.33ZM46.43,166H86.81a132.58,132.58,0,0,0,25.73,50.67A90.29,90.29,0,0,1,46.43,166Zm97,50.67A132.58,132.58,0,0,0,169.19,166h40.38A90.29,90.29,0,0,1,143.46,216.67Z"})}),bw=({type:n,...r})=>{switch(n){case"WEBSITE":return v.jsx(qb,{...r});case"PDF":return v.jsx(kb,{...r});case"DOCX":return v.jsx(zb,{...r});default:return v.jsx(Gb,{...r})}},Pd=({sources:n,onLinkClick:r})=>{const i=tt(),s=c=>()=>{r(c.url)},u=c=>h=>{(h.key==="Enter"||h.key===" ")&&r(c.url)};return n.length?v.jsx("ul",{className:fh.sourceList,"aria-label":i("bot-bubble.sources"),children:n.map(c=>v.jsx("li",{className:fh.source,children:v.jsxs("a",{role:"button",tabIndex:0,"aria-label":`${i("bot-bubble.source.open")}: ${c.label}`,onClick:s(c),onKeyDown:u(c),children:[v.jsx(bw,{type:c.type,"aria-hidden":"true"}),v.jsx("div",{className:fh.label,children:c.label})]})},c.url))}):null},_w="_button_3ui4g_1",Ew="_buttonDefault_3ui4g_13",Sw="_buttonPrimary_3ui4g_28",Js={button:_w,buttonDefault:Ew,buttonPrimary:Sw},gu=({className:n,children:r,...i})=>v.jsx("button",{className:Q(Js.button,n),type:"button",role:"button",...i,children:r}),Tw="_title_137pi_1",Aw="_buttons_137pi_6",xw="_button_137pi_6",Ow="_imageContainer_137pi_29",Rw="_image_137pi_29",ww="_video_container_137pi_44",Cw="_video_137pi_44",Nw="_only_137pi_58",ln={title:Tw,buttons:Aw,button:xw,imageContainer:Ow,image:Rw,video_container:ww,video:Cw,only:Nw},Mw=({buttons:n,onButtonClick:r})=>v.jsx("div",{className:Q(ln.buttons,"chat__bubbleButtons"),children:n.map((i,s)=>v.jsx(gu,{className:Q(ln.button,"chat__bubbleButton"),onClick:()=>r(i),children:i.title},s))}),Av="newtab#",Fb=({markdown:n,markdownOptions:r={},onLinkClick:i})=>{const s=c=>h=>(h.preventDefault(),c&&i(c),!1),u=({title:c,href:h,children:d})=>h.indexOf(Av)===0?v.jsx("a",{href:h.slice(Av.length),title:c,target:"_blank",rel:"noopener noreferrer",children:d}):v.jsx("a",{onClick:s(h),title:c,href:h,children:d});return v.jsx(xr,{options:{...r,overrides:{a:u}},children:n})},Dw=({text:n,onLinkClick:r})=>n?v.jsx("div",{children:v.jsx(Fb,{markdown:n,onLinkClick:r})}):null,Bw=({title:n})=>n?v.jsx("h1",{className:ln.title,children:n}):null,Lw=({title:n,text:r,buttons:i,onButtonClick:s,onLinkClick:u})=>n?.length||r?.length||i?.length?v.jsxs("div",{className:Q(ge.bubbleContent),children:[v.jsx(Bw,{title:n}),v.jsx(Dw,{text:r,onLinkClick:u}),v.jsx(Mw,{buttons:i,onButtonClick:s})]}):null,Uw=({alt:n,imageUrl:r,itemUrl:i,hasBody:s})=>r?i?i.indexOf("youtube.com")>-1?v.jsx("div",{className:ln.video_container,children:v.jsx("iframe",{className:Q(ln.video,{[ln.only]:!s}),title:"Youtube",width:"100%",src:i+"?rel=0",frameBorder:"0",allowFullScreen:!0})}):v.jsx("a",{href:i,target:"_blank",rel:"noopener noreferrer",children:v.jsx("div",{className:ln.imageContainer,children:v.jsx("img",{className:Q(ln.image,{[ln.only]:!s}),src:r,alt:n})})}):v.jsx("div",{className:ln.imageContainer,children:v.jsx("img",{className:Q(ln.image,{[ln.only]:!s}),src:r,alt:n})}):null,Hw=({title:n,text:r,imageUrl:i,itemUrl:s,buttons:u,sources:c,onButtonClick:h,onLinkClick:d})=>{const m=!!n?.length||!!r?.length||!!u?.length;return v.jsxs("div",{className:Q(ln.detailMessage),children:[v.jsx(Uw,{hasBody:m,imageUrl:i,itemUrl:s,alt:n||""}),m&&v.jsx(Lw,{title:n,text:r,buttons:u,onLinkClick:d,onButtonClick:h}),v.jsx(Pd,{sources:c,onLinkClick:d})]})},jw=H.forwardRef(({isFirstMessageBySender:n,isLastMessageBySender:r,children:i},s)=>{const u=tt();return v.jsx("li",{ref:s,className:Q(ge.message,ge.messageGuest,n&&ge.messageGuestFirst,r&&ge.messageGuestLast,"chat__bubbleContainer","chat__guestBubbleContainer",n&&"chat__bubbleContainer--first",r&&"chat__bubbleContainer--last"),children:v.jsx("div",{className:Q(ge.bubble,ge.bubbleRight,"chat__bubble","chat__guestBubble"),tabIndex:0,"aria-label":u("guest-bubble.label"),children:v.jsx("div",{className:Q(ge.rightText),children:i})})})}),Iw="_markdown_nw7vg_1",Pb={markdown:Iw},Vb=()=>zw(window.location.pathname),zw=n=>{const r=n.split("/"),i=n.endsWith("/");return r[r.length-(i?2:1)]},Vd=()=>H.useMemo(()=>Vb(),[]),Ho="source-info-reference",Gw=({actionId:n,markdown:r,sources:i,onLinkClick:s})=>{const u=Vd(),c=ka(),h=kw(),d=Zt(y=>{const _=y.chat.sourceInfos;if(_?.type==="loaded"||_?.type==="loading")return _.chunkId}),m=y=>_=>{const T=_.key;(T==="ArrowDown"||T==="ArrowRight"||T==="Enter"||T===" "||T==="Space")&&(_.stopPropagation(),c(lv(u,n,y)))},g=y=>()=>{c(lv(u,n,y))};return H.useLayoutEffect(()=>{document.querySelectorAll(`.${Ho}`).forEach(y=>{const _=y.previousSibling;_&&_.nodeType===Node.TEXT_NODE&&_.textContent?.endsWith(" ")&&_.textContent?.trim().length&&y.classList.add(`${Ho}--before-space`);const T=y.nextSibling;T&&T.nodeType===Node.TEXT_NODE&&T.textContent?.startsWith(" ")&&T.textContent?.trim().length&&y.classList.add(`${Ho}--after-space`)})},[r]),v.jsxs("div",{className:ge.bubbleContent,children:[v.jsx("div",{className:Pb.markdown,children:v.jsx(Fb,{markdown:r,onLinkClick:s,markdownOptions:{renderRule(y,_,T,L){if(_.type===NO.footnoteReference){const N=_.text===d;return v.jsx("span",{className:Q(ge.sourceInfoReference,N&&ge.sourceInfoReferenceActive,Ho),children:v.jsx("a",{type:"button",tabIndex:0,onClick:g(_.text),onKeyDown:m(_.text),children:h(_.text)})},L.key)}return y()}}})}),v.jsx(Pd,{sources:i,onLinkClick:s})]})},kw=()=>{const n=[];return i=>{const s=n.indexOf(i);return s>-1?s+1:(n.push(i),n.length)}},qw="_text_gp0s0_1",Fw="_command_gp0s0_5",xv={text:qw,command:Fw},Pw=({text:n,commands:r=[]})=>{const i=r.find(u=>n.startsWith(`/${u}`)),s=i?n.slice(i.length+1):n;return v.jsxs("div",{children:[i&&v.jsxs("code",{className:xv.command,children:["/",i]}),s.split(`
110
110
  `).map((u,c)=>v.jsxs("span",{className:xv.text,children:[u,v.jsx("br",{})]},c))]})},Vw=({text:n,commands:r,sources:i,onLinkClick:s})=>v.jsxs("div",{className:ge.bubbleContent,children:[v.jsx(Pw,{text:n,commands:r}),v.jsx(Pd,{sources:i,onLinkClick:s})]}),Yw=H.forwardRef(({message:n,commands:r,isLastMessage:i,isFirstMessageBySender:s,isLastMessageBySender:u,onReaction:c,onButtonClick:h,onLinkClick:d},m)=>{const g=Xw(n._id,n,r,h,d);switch(n.sender.type){case Oe.UserType.GUEST:return v.jsx(jw,{ref:m,isFirstMessageBySender:s,isLastMessageBySender:u,children:g});default:{const y=_=>c(n._id,_);return v.jsx(Ib,{ref:m,message:n,isAnimated:!1,isLastMessage:i,isFirstMessageBySender:s,isLastMessageBySender:u,onReaction:y,children:g})}}}),Xw=(n,r,i,s,u)=>{switch(r.type){case Oe.MessageTypeEnum.TEXT:{const c=r;return v.jsx(Vw,{text:c.text,commands:i,sources:r.sources||[],onLinkClick:u})}case Oe.MessageTypeEnum.DETAIL:{const c=r;return v.jsx(Hw,{title:c.title,text:c.text,imageUrl:c.imageUrl,itemUrl:c.itemUrl,buttons:c.buttons,sources:r.sources||[],onButtonClick:s,onLinkClick:u})}case Oe.MessageTypeEnum.MARKDOWN:{const c=r;return v.jsx(Gw,{actionId:n,markdown:c.markdown,sources:c.sources||[],onLinkClick:u})}}},Zw=(n,r)=>n.message._id===r.message._id&&n.message.reaction===r.message.reaction&&n.isLastMessage===r.isLastMessage&&n.isFirstMessageBySender===r.isFirstMessageBySender&&n.isLastMessageBySender===r.isLastMessageBySender,Qw=g1.memo(Yw,Zw),Kw="_ticontainer_xg0dn_1",$w="_tiblock_xg0dn_5",Ww="_tidot_xg0dn_12",Gs={ticontainer:Kw,tiblock:$w,tidot:Ww},Jw=({isTyping:n=!1})=>v.jsx("div",{className:Gs.ticontainer,children:v.jsx("div",{className:Gs.tiblock,children:n?v.jsxs(v.Fragment,{children:[v.jsx("div",{className:Q(Gs.tidot,"chat__typingIndicator")}),v.jsx("div",{className:Q(Gs.tidot,"chat__typingIndicator")}),v.jsx("div",{className:Q(Gs.tidot,"chat__typingIndicator")})]}):null})}),eC=Object.assign({_id:"typing-indicator"},new Oe.TextMessage("",new Oe.BotUser)),tC=({messages:n,isBotTyping:r,commands:i,onTranscriptItemReaction:s,onButtonClick:u,onLinkClick:c})=>{const h=H.useRef(0),d=H.useRef(!0),m=H.useRef(null),g=H.useRef(null),y=H.useRef(null),_=Zt(N=>N.settings.enableGeneralConditions);H.useLayoutEffect(()=>{if(n.length&&m.current&&(h.current<n.length||r)){if(g.current){const N=g.current.offsetTop;m.current.scrollTop=N}else if(y.current){const N=y.current.offsetTop;m.current.scrollTop=N}d.current&&(d.current=!1),h.current=n.length}},[n,d,r]);let T;const L=n.length;return v.jsxs("div",{ref:m,className:Q(uv.messageContainer,"chat__messageContainer"),style:{scrollBehavior:n.length&&d.current?"auto":"smooth"},id:"MessageContainer",role:"log","aria-live":"polite",children:[_&&v.jsx(VR,{}),v.jsxs("ul",{className:uv.messages,children:[n.map((N,V)=>{const G=nC(N,T),E=rC(N,V,n,r);T=N.sender.type;const w=V+1===L,S=N._id||`added-${V}`;return v.jsx(Qw,{ref:w?y:null,message:N,commands:i,isLastMessage:w,isFirstMessageBySender:G,isLastMessageBySender:E,onButtonClick:u,onLinkClick:c,onReaction:s},w&&!r?"last":S)}),r&&v.jsx(Ib,{ref:g,message:eC,isLastMessage:!1,isAnimated:!0,isFirstMessageBySender:T!==Oe.UserType.BOT,isLastMessageBySender:!0,children:v.jsx(Jw,{isTyping:!0})},"last")]})]})},nC=(n,r)=>!r||r!==n.sender.type,rC=(n,r,i,s)=>{const u=n.sender.type,c=i.length;return r+1===c?!(u===Oe.UserType.BOT&&s):u!==i.at(r+1)?.sender.type},aC="_bottomSheet_jp8dl_1",iC="_bottomSheetOpen_jp8dl_15",sC="_bottomSheetClose_jp8dl_20",Or={bottomSheet:aC,bottomSheetOpen:iC,bottomSheetClose:sC},lC="_container_xc2nx_1",Ov={container:lC},oC=({contentUrl:n})=>{const r=Zt(c=>c.connection.sessionId),[i,s]=H.useState(!1);H.useEffect(()=>{s(c=>c||!!n)},[n]);const u=H.useMemo(()=>{if(n&&r){const c=new URL(n,document.baseURI);return c.searchParams.set("sessionId",r),c.toString()}else return},[n,r]);return v.jsx("div",{className:Q(Ov.container,Or.bottomSheet,{[Or.bottomSheetOpen]:!!n,[Or.bottomSheetClose]:i&&!n}),children:u&&v.jsx("iframe",{title:"Drawer",src:u,className:Ov.iframe})})},uC="_container_z787n_1",cC={container:uC},fC=({title:n,href:r,children:i})=>v.jsx("a",{href:r,title:n,target:"_blank",rel:"noopener noreferrer",children:i}),hC=()=>{const r=tt()("powered-by");return r&&r.length?v.jsx("div",{className:Q(cC.container,"chat__poweredBy"),children:v.jsx(xr,{options:{overrides:{a:fC}},children:r})}):null},dC=({className:n,children:r,...i})=>v.jsx(gu,{className:Q(Js.buttonDefault,n),type:"button",...i,children:r}),nu=({className:n,children:r,...i})=>v.jsx(gu,{className:Q(Js.buttonPrimary,n),...i,children:r}),mC="_container_h23mk_1",pC="_formContainer_h23mk_17",gC="_emailInput_h23mk_22",yC="_description_h23mk_52",vC="_actions_h23mk_57",bC="_validationError_h23mk_67",_C="_submitted_h23mk_74",Da={container:mC,formContainer:pC,emailInput:gC,description:yC,actions:vC,validationError:bC,submitted:_C},EC=({visible:n,onEmailExport:r,onClose:i})=>{const s=tt(),[u,c]=H.useState(void 0),[h,d]=H.useState(!1),[m,g]=H.useState(void 0),y=H.useRef(null);H.useEffect(()=>{n?(y.current?.focus(),d(!1),c(n)):u===!0&&c(!1)},[n,u]);const _=L=>{L.preventDefault(),m&&m.length>0&&(r(m),d(!0),setTimeout(i,3*1e3))},T=L=>{const N=L.target.value.trim(),V=/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(N);g(V?N:"")};return v.jsxs("div",{className:Q(Da.container,Or.bottomSheet,{[Or.bottomSheetOpen]:u===!0,[Or.bottomSheetClose]:u===!1}),children:[v.jsx("h2",{children:s("export-transcript.email.title")}),v.jsx(xr,{className:Da.description,children:s("export-transcript.email.description")||""}),v.jsxs("form",{onSubmit:_,className:Da.formContainer,children:[v.jsxs("div",{children:[v.jsx("input",{disabled:h,ref:y,type:"email",placeholder:s("export-transcript.email.placeholder"),className:Da.emailInput,onChange:T}),m?.length===0?v.jsx("div",{className:Da.validationError,children:s("export-transcript.email.invalid")}):null]}),v.jsxs("div",{className:Da.actions,children:[v.jsx(dC,{onClick:i,children:s("export-transcript.email.cancel")}),v.jsx(nu,{type:"submit",disabled:h||m===void 0||m.length===0,children:s("export-transcript.email.send")})]})]}),h&&v.jsx("div",{className:Da.submitted,children:s("export-transcript.email.success")})]})},SC="_inputContainer_fi5ao_1",TC={inputContainer:SC},AC="_blockUserInput_pot9c_1",xC={blockUserInput:AC},OC=({visible:n})=>{const r=tt();return n?v.jsx("div",{className:Q(xC.blockUserInput,"chat__blockUserInput"),children:r("block-user-input.title")}):null},RC="_commandsDropdown_5ytuv_1",wC="_commands_5ytuv_1",CC="_command_5ytuv_1",NC="_commandActive_5ytuv_46",MC="_commandsSelections_5ytuv_55",Zs={commandsDropdown:RC,commands:wC,command:CC,commandActive:NC,commandsSelections:MC},Yb=(n,r)=>{H.useEffect(()=>{const i=s=>{n.current&&!n.current.contains(s.target)&&r()};return document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)},[n,r])},DC=(n,r,i,s,u)=>{H.useEffect(()=>{const c=h=>{if(n.length)switch(h.key){case"Enter":i(n[r]);break;case"ArrowUp":s(d=>d>0?d-1:n.length-1);break;case"ArrowDown":s(d=>d<n.length-1?d+1:0);break;case"Escape":u([]);break}};return document.addEventListener("keydown",c),()=>{document.removeEventListener("keydown",c)}},[n,r,i,s,u])},BC=({text:n,commands:r,onSelectCommand:i,onVisibilityChange:s})=>{const u=H.useRef(null),c=tt(),[h,d]=H.useState([]),[m,g]=H.useState(Rv(r)),[y,_]=H.useState(0),T=L=>i(`/${L}`);return Yb(u,()=>d([])),DC(h,y,T,_,d),H.useEffect(()=>{g(Rv(r))},[r]),H.useEffect(()=>{const L=n.length||0;L===0||L>m||!n.startsWith("/")?d([]):d(r.filter(LC(n))),_(0)},[r,n,m]),H.useEffect(()=>{s(!!h.length)},[h,s]),h.length?v.jsx("div",{ref:u,className:Zs.commandsDropdown,children:v.jsx("ul",{id:"command-list",className:Zs.commands,role:"listbox",children:h.map((L,N)=>v.jsxs("li",{className:Q([Zs.command,y===N&&Zs.commandActive]),role:"option",onClick:()=>T(L),onMouseOver:()=>_(N),children:[v.jsxs("h1",{children:["/",L]}),v.jsx("p",{children:c(`commands.${L}`)})]},L))})}):null},Rv=n=>Math.max(...n.map(r=>r.length+1)),LC=n=>r=>{const i=`/${r}`;return i.startsWith(n)&&i.length>=n.length},wv=3,UC=({commands:n,onSelectCommand:r})=>{const i=tt(),[s,u]=H.useState(!1),c=g=>()=>{r(`/${g}`),u(!1)},h=()=>{u(!0)},d=()=>{u(!1)},m=s?n:n.slice(0,wv);return v.jsxs("div",{className:Zs.commandsSelections,children:[m.map(g=>v.jsxs("button",{className:"tooltip--top-center","aria-label":i(`commands.${g}`),"data-title":i(`commands.${g}`),tabIndex:0,onClick:c(g),children:["/",g]},g)),m.length<n.length?v.jsx("button",{"aria-label":i("commands.show-more.tooltip"),"data-title":i("commands.show-more.tooltip"),tabIndex:0,onClick:h,children:i("commands.show-more.action")},"show-more"):m.length>wv?v.jsx("button",{"aria-label":i("commands.show-less.tooltip"),"data-title":i("commands.show-less.tooltip"),tabIndex:0,onClick:d,children:i("commands.show-less.action")},"show-less"):null]})},HC="_callToActionContainer_1pojq_1",jC="_callToActionTitle_1pojq_23",IC="_rateOverlay_1pojq_30",zC="_body_1pojq_52",GC="_footer_1pojq_60",kC="_actions_1pojq_73",qC="_bubbles_1pojq_101",FC="_stars_1pojq_203",PC="_starsSmall_1pojq_217",VC="_starsLarge_1pojq_223",YC="_star_1pojq_203",XC="_starReadonly_1pojq_237",ZC="_starIcon_1pojq_247",QC="_starsDescriptionContainer_1pojq_265",KC="_starsDescription_1pojq_265",jt={callToActionContainer:HC,callToActionTitle:jC,rateOverlay:IC,body:zC,footer:GC,actions:kC,bubbles:qC,stars:FC,starsSmall:PC,starsLarge:VC,star:YC,starReadonly:XC,starIcon:ZC,starsDescriptionContainer:QC,starsDescription:KC},$C=({value:n,index:r,count:i,readonly:s,onHover:u,onClick:c})=>{const h=d=>{c&&d.key==="Enter"&&c()};return v.jsx("li",{className:Q(jt.star,{[jt.starReadonly]:s},"chat__conversationRating__star"),children:v.jsx("div",{role:"radio","aria-checked":n>r?"true":"false","aria-posinset":r+1,"aria-setsize":i,tabIndex:0,onMouseOver:u,onKeyDown:h,onClick:c,children:v.jsx("span",{role:"img","aria-label":"Star",className:Q(jt.starIcon),children:v.jsx("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"star",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:v.jsx("path",{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z"})})})})})},Cv=5,Xb=({value:n,size:r,readonly:i=!1,onChange:s})=>{const[u,c]=H.useState(void 0),h=()=>{c(void 0)},d=g=>()=>{if(!i){const y=g+1;c(y)}},m=g=>()=>{s&&!i&&(s(g===0&&n===1?0:g+1),c(void 0))};return v.jsx("ul",{tabIndex:0,role:"radiogroup",className:Q(jt.stars,{[jt.starsSmall]:r==="small",[jt.starsLarge]:r==="large"},"chat__conversationRating__stars",{chat__conversationRating__stars__small:r==="small",chat__conversationRating__stars__large:r==="large"}),onMouseOut:h,children:Array(Cv).fill(0).map((g,y)=>v.jsx($C,{value:u===void 0?n:u,index:y,count:Cv,readonly:i,onHover:d(y),onClick:m(y)},y))})},WC=({visible:n,onRate:r})=>{const i=tt();return n?v.jsxs("div",{className:Q(jt.callToActionContainer,"chat__conversationRating__callToAction"),children:[v.jsx("div",{className:Q(jt.callToActionTitle,"chat__conversationRating__callToAction__title"),children:i("conversation-rating.call-to-action.title")}),v.jsx(Xb,{value:0,size:"small",onChange:r})]}):null},hh=({isFirstMessageBySender:n,isLastMessageBySender:r,children:i})=>v.jsxs("div",{className:Q(ge.message,ge.messageBot,n&&ge.messageBotFirst,r&&ge.messageBotLast,"chat__bubbleContainer","chat__botBubbleContainer",n&&"chat__bubbleContainer--first",r&&"chat__bubbleContainer--last"),children:[v.jsx("img",{className:Q(ge.avatar,ge.botAvatar),src:"bot.svg",alt:"Bot"}),v.jsx("div",{className:Q(ge.bubble,ge.bubbleLeft,"chat__bubble","chat__botBubble"),children:v.jsx("div",{className:Q(ge.leftText,ge.bubbleContent),children:i})})]}),JC=({children:n})=>v.jsx("div",{className:Q(ge.message,ge.messageGuest,ge.messageGuestFirst,ge.messageGuestLast,"chat__bubbleContainer","chat__guestBubbleContainer","chat__bubbleContainer--first","chat__bubbleContainer--last"),children:v.jsx("div",{className:Q(ge.bubble,ge.bubbleRight,"chat__bubble","chat__guestBubble"),children:v.jsx("div",{className:Q(ge.rightText,ge.bubbleContent),children:n})})}),e6=({visible:n,rating:r,onRate:i,onClose:s})=>{const u=tt(),[c,h]=H.useState(r),[d,m]=H.useState(void 0),[g,y]=H.useState(void 0),[_,T]=H.useState({submitted:!1,feedback:""}),[L,N]=H.useState(!1),V=H.useRef(null);H.useEffect(()=>{n?(T({submitted:!1,feedback:""}),y(n)):g===!0&&y(!1)},[n,g]),H.useEffect(()=>{h(r)},[r]),H.useEffect(()=>{const E=c>0?u(`conversation-rating.overlay.bot-message.rate-feedback.value-${c}`):void 0;m(E?.length?E:void 0)},[c,u]),H.useEffect(()=>{_.submitted?setTimeout(()=>N(!0),_.feedback.length?500:0):N(!1)},[_]);const G=E=>{E.preventDefault();const w=V.current?.value?.trim()||"";i(c,w),T({submitted:!0,feedback:w})};return v.jsx("div",{className:Q(jt.rateOverlay,Or.bottomSheet,"chat__conversationRating__overlay",{[Or.bottomSheetOpen]:g===!0,[Or.bottomSheetClose]:g===!1}),children:v.jsxs("form",{onSubmit:G,children:[v.jsxs("div",{className:Q(jt.body,"chat__conversationRating__overlay__body"),children:[v.jsx("div",{}),v.jsx("div",{className:Q(jt.bubbles),children:n&&d&&v.jsxs(v.Fragment,{children:[v.jsxs(hh,{isFirstMessageBySender:!0,isLastMessageBySender:!1,children:[v.jsx("h2",{children:u("conversation-rating.overlay.title")}),v.jsxs("div",{className:Q(jt.starsDescriptionContainer),children:[v.jsx(Xb,{value:c,size:"large",readonly:_.submitted,onChange:h}),v.jsxs("div",{className:Q(jt.starsDescription),children:[v.jsx("div",{children:u("conversation-rating.overlay.star.very-bad")}),v.jsx("div",{children:u("conversation-rating.overlay.star.very-good")})]})]})]}),v.jsx(hh,{isFirstMessageBySender:!1,isLastMessageBySender:!L||!!_.feedback.length,children:v.jsx("div",{children:d})}),!!_.feedback.length&&v.jsx(JC,{children:_.feedback}),L&&v.jsx(hh,{isFirstMessageBySender:!!_.feedback.length,isLastMessageBySender:!0,children:v.jsx("div",{children:u("conversation-rating.overlay.bot-message.submit-feedback")})})]})})]}),v.jsxs("div",{className:Q(jt.footer,"chat__conversationRating__overlay__footer"),children:[!_.submitted&&v.jsx("input",{ref:V,placeholder:u("conversation-rating.overlay.guest-feedback.input-placeholder")}),v.jsx("div",{className:Q(jt.actions,"chat__conversationRating__overlay__footer__actions"),children:_.submitted?v.jsx(nu,{type:"button",onClick:s,children:u("conversation-rating.overlay.action.close")}):v.jsx(nu,{type:"submit",children:u("conversation-rating.overlay.action.submit")})})]})]})})},t6=({conversationRating:{enabled:n,rating:r},numberOfMessagesFromGuest:i,showRatingOverlay:s,setShowRatingOverlay:u,onRate:c})=>{const[h,d]=H.useState(0),m=_=>{d(_),u(!0)},g=()=>u(!1),y=!r&&i>=1;return n?v.jsxs(v.Fragment,{children:[v.jsx(WC,{visible:y,onRate:m}),v.jsx(e6,{visible:s,rating:h,onRate:c,onClose:g})]}):null},n6=H.memo(t6),r6="_inputWrapper_e3h44_1",a6="_withOpenCommands_e3h44_14",i6="_messageInputWrapper_e3h44_20",s6="_messageInput_e3h44_20",l6="_buttons_e3h44_44",o6="_button_e3h44_44",xi={inputWrapper:r6,withOpenCommands:a6,messageInputWrapper:i6,messageInput:s6,buttons:l6,button:o6},u6="_audioRecorder_g845f_1",c6="_audioButton_g845f_6",f6="_recorderIcon_g845f_37",h6="_spinning_g845f_60",Ba={audioRecorder:u6,audioButton:c6,recorderIcon:f6,spinning:h6},Nv=2048,ru=16e3;class d6 extends g1.Component{audioInput=null;volume=null;leftchannel=[];recorder=null;recordingLength=0;sampleRate=null;mediaStream=null;constructor(r){super(r),this.state={recordingState:"none"},this.triggerAudioRecording=this.triggerAudioRecording.bind(this),this.triggerAudioRecordingSuccess=this.triggerAudioRecordingSuccess.bind(this),this.initRecording=this.initRecording.bind(this),this.processRecordingInput=this.processRecordingInput.bind(this),this.handleClickSubmitAudio=this.handleClickSubmitAudio.bind(this),this.handleClickStopAudio=this.handleClickStopAudio.bind(this)}triggerAudioRecording(){this.setState({recordingState:"connecting"}),navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(this.triggerAudioRecordingSuccess)}triggerAudioRecordingSuccess(r){this.mediaStream=r,this.leftchannel.length=0,this.recordingLength=0,this.initRecording(r)}initRecording(r){const i=window.AudioContext||window.webkitAudioContext,s=new i;this.sampleRate=s.sampleRate,this.volume=s.createGain(),this.audioInput=s.createMediaStreamSource(r),this.audioInput.connect(this.volume),this.recorder=s.createScriptProcessor(Nv,1,1),this.recorder.onaudioprocess=this.processRecordingInput,this.volume.connect(this.recorder),this.recorder.connect(s.destination)}processRecordingInput(r){if(this.state.recordingState==="connecting"&&this.setState({recordingState:"recording"}),this.state.recordingState!=="none"){const i=r.inputBuffer.getChannelData(0);this.leftchannel.push(new Float32Array(i)),this.recordingLength+=Nv}}handleClickSubmitAudio(){const r=p6(this.leftchannel,this.recordingLength),i=g6(r,this.sampleRate||0),s=m6(i);this.props.onAudioRecorded(s),this.handleClickStopAudio()}handleClickStopAudio(){this.setState({recordingState:"none"}),this.audioInput?.disconnect(),this.volume?.disconnect(),this.recorder?.disconnect(),this.mediaStream&&this.mediaStream?.getAudioTracks().forEach(r=>{r.stop()})}render(){return v.jsxs("div",{className:Ba.audioRecorder,children:[this.state.recordingState==="none"&&v.jsx("button",{className:Q(Ba.audioButton,"chat__button"),type:"submit","aria-label":this.props.translate("message-input.actions.start-audio-recording.label"),"data-title":this.props.translate("message-input.actions.start-audio-recording.label"),tabIndex:0,onClick:this.triggerAudioRecording,children:v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[v.jsx("path",{d:"M12 14c1.66 0 2.99-1.34 2.99-3L15 5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3zm5.3-3c0 3-2.54 5.1-5.3 5.1S6.7 14 6.7 11H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c3.28-.48 6-3.3 6-6.72h-1.7z"}),v.jsx("path",{d:"M0 0h24v24H0z",fill:"none"})]})}),this.state.recordingState==="connecting"&&v.jsxs("svg",{className:Ba.spinning,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[v.jsx("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"}),v.jsx("path",{d:"M0 0h24v24H0z",fill:"none"})]}),this.state.recordingState==="recording"&&v.jsxs("div",{className:Ba.audioRecorder,children:[v.jsx("button",{className:Q(Ba.audioButton),onClick:this.handleClickStopAudio,"aria-label":this.props.translate("message-input.actions.stop-audio-recording.label"),tabIndex:0,children:v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[v.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),v.jsx("path",{d:"M0 0h24v24H0z",fill:"none"})]})}),v.jsx("div",{className:Ba.recorderIcon}),v.jsx("button",{className:Q(Ba.audioButton),type:"submit",onClick:this.handleClickSubmitAudio,"aria-label":this.props.translate("message-input.actions.submit-audio-recording.label"),tabIndex:0,autoFocus:!0,children:v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[v.jsx("path",{d:"M0 0h24v24H0z",fill:"none"}),v.jsx("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})]})})]})]})}}const m6=n=>{const r=new ArrayBuffer(44+n.length*2),i=new DataView(r);jo(i,0,"RIFF"),i.setUint32(4,44+n.length*2,!0),jo(i,8,"WAVE"),jo(i,12,"fmt "),i.setUint32(16,16,!0),i.setUint16(20,1,!0),i.setUint16(22,1,!0),i.setUint32(24,ru,!0),i.setUint32(28,ru*4,!0),i.setUint16(32,4,!0),i.setUint16(34,16,!0),jo(i,36,"data"),i.setUint32(40,n.length*2,!0);const s=n.length;let u=44;const c=1;for(let h=0;h<s;h++)i.setInt16(u,n[h]*(32767*c),!0),u+=2;return new Blob([i],{type:"audio/wav"})},jo=(n,r,i)=>{for(let s=0;s<i.length;s++)n.setUint8(r+s,i.charCodeAt(s))},p6=(n,r)=>{const i=new Float32Array(r);let s=0;const u=n.length;for(let c=0;c<u;c++){const h=n[c];i.set(h,s),s+=h.length}return i},g6=(n,r)=>{if(ru===r)return n;const i=r/ru,s=Math.round(n.length/i),u=new Float32Array(s);let c=0,h=0;for(;c<u.length;){const d=Math.round((c+1)*i);let m=0,g=0;for(let y=h;y<d&&y<n.length;y++)m+=n[y],g++;u[c]=m/g,c++,h=d}return u},y6=({disabled:n,textInput:r,commandsVisible:i,hasCommands:s,onTextInput:u,onTextInputSubmit:c,onAudioRecorded:h})=>{const d=tt(),m=H.useRef(null),{enableSpeechSupport:g}=Zt(N=>N.settings);H.useEffect(()=>{m.current?.focus()},[r]);const y=()=>{const N=m.current;N&&r.trim().length>=1&&c(r.trim())&&(N.value="",N.style.height="",N.focus())},_=N=>{N.preventDefault(),y()},T=N=>{const V=N.target.value;u(V),N.target.style.height="";const{scrollHeight:G}=N.target;N.target.style.height=`${G>150?150:G}px`},L=N=>{N.code==="Enter"&&!N.shiftKey?(N.repeat||y(),N.preventDefault()):i&&(N.code==="ArrowUp"||N.code==="ArrowDown")&&N.preventDefault()};return v.jsxs("form",{className:Q(xi.inputWrapper,i&&xi.withOpenCommands,"chat__textInput"),onSubmit:_,children:[v.jsx("div",{className:xi.messageInputWrapper,children:v.jsx("textarea",{id:"user_input",ref:m,className:xi.messageInput,tabIndex:0,placeholder:d("message-input-placeholder"),value:r,onChange:T,onKeyDown:L,"aria-label":d("message-input-label"),"aria-controls":s?"command-list":void 0,"aria-haspopup":s?"listbox":void 0})}),v.jsx("div",{className:Q(xi.buttons,"chat__buttons"),children:r.length||!g||navigator.mediaDevices===void 0?v.jsx("button",{className:Q(xi.button,"chat__button"),type:"submit","aria-label":d("message-input.actions.submit.label"),"data-title":d("message-input.actions.submit.label"),tabIndex:0,disabled:n,children:v.jsx("svg",{viewBox:"64 64 896 896",focusable:"false",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:v.jsx("path",{d:"M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z"})})}):g&&navigator.mediaDevices!==void 0&&v.jsx(d6,{translate:d,onAudioRecorded:h})})]})},v6="_quickReplies_83npe_1",b6="_quickReply_83npe_9",Mv={quickReplies:v6,quickReply:b6},_6=({quickReplies:n,onQuickReplyClick:r})=>n.length?v.jsx("div",{className:Q(Mv.quickReplies,"chat__quickReplies"),children:n.map(i=>v.jsx(gu,{tabIndex:0,className:Q(Mv.quickReply,"chat__button","chat__quickReply"),onClick:()=>r(i),children:i.label},i.label))}):null,Dv=5e3,E6=1e3,S6=({isBotTyping:n,quickReplies:r,conversationRating:i,numberOfMessagesFromGuest:s,showRatingOverlay:u,commands:c,setShowRatingOverlay:h,onTextInput:d,onRate:m,onQuickReplyClick:g,onAudioRecorded:y})=>{const[_,T]=H.useState(""),[L,N]=H.useState(!1),[V,G]=H.useState(!1),E=H.useRef(0),w=H.useRef(0);H.useEffect(()=>{if(L&&!n){const x=E.current?Date.now()-E.current:0;x>Dv?N(!1):setTimeout(()=>{N(!1)},Dv-x)}},[L,n]),H.useEffect(()=>{L&&(E.current=Date.now())},[L]);const S=x=>{const Z=Date.now()-w.current<E6;return V?!1:n||Z?(N(!0),!1):(d(x),T(""),w.current=Date.now(),!0)},I=x=>{T(x+" ")};return v.jsxs("div",{className:Q(TC.inputContainer),children:[v.jsx(_6,{quickReplies:r,onQuickReplyClick:g}),v.jsx(OC,{visible:L}),!L&&v.jsx(n6,{conversationRating:i,numberOfMessagesFromGuest:s,onRate:m,showRatingOverlay:u,setShowRatingOverlay:h}),!!c?.length&&v.jsx(BC,{text:_,commands:c,onSelectCommand:I,onVisibilityChange:G}),v.jsx(y6,{textInput:_,disabled:L,commandsVisible:V,hasCommands:!!c?.length,onTextInput:T,onTextInputSubmit:S,onAudioRecorded:y}),!!c?.length&&v.jsx(UC,{commands:c,onSelectCommand:T})]})},T6=({clientName:n,messages:r,quickReplies:i,isBotTyping:s,drawerContentUrl:u,conversationRating:c,onMessageFromUser:h,onRate:d,onQuickReplyClick:m,onButtonClick:g,onLinkClick:y,onAudioRecorded:_,onTranscriptExport:T,onTranscriptItemReaction:L})=>{const N=ka(),V=Zt($=>$.connection.connectionState),{enableTranscriptExportEmail:G,commands:E}=Zt($=>$.settings),{showTranscriptMailOverlay:w}=Zt($=>$.chat),[S,I]=H.useState(!1),x=r.filter($=>$.sender.type===tu.GUEST).length;H.useEffect(()=>{if(V===ja.CONNECTED){const $=lu.parse(window.location.search);N(Cb(n,$))}},[n,V,N]);const Z=()=>{N(wb())};return v.jsxs("div",{className:ah.container,children:[v.jsxs("div",{className:Q([ah.chatcontent,(w||S)&&ah.accessabilityHidden]),children:[v.jsx(tC,{messages:r,isBotTyping:s,commands:E,onButtonClick:g,onLinkClick:y,onTranscriptItemReaction:L}),v.jsx(S6,{isBotTyping:s,quickReplies:s?[]:i,numberOfMessagesFromGuest:x,conversationRating:c,showRatingOverlay:S,setShowRatingOverlay:I,commands:E,onRate:d,onQuickReplyClick:m,onTextInput:h,onAudioRecorded:_}),v.jsx(hC,{})]}),G&&v.jsx(EC,{visible:!!w,onEmailExport:T,onClose:Z}),v.jsx(oC,{contentUrl:u})]})},A6=n=>{const{messages:r,quickReplies:i,isBotTyping:s,drawerContentUrl:u,conversationRating:c}=n.chat;return{messages:r,quickReplies:i,isBotTyping:s,drawerContentUrl:u,conversationRating:c}},x6=n=>({onRestartChat:(r,i)=>n(mu(r,i)),onMessageFromUser:r=>n(ib(r)),onRate:(r,i)=>n(_x(r,i)),onAudioRecorded:r=>n(px(r)),onActionFromUser:r=>n(r),onQuickReplyClick:r=>n(ab(r)),onNluEvent:r=>n(cb(r)),onButtonClick:r=>n(Sx(r)),onLinkClick:r=>n(fb(r)),onTranscriptExport:r=>n(yx(r)),onTranscriptItemReaction:(r,i)=>n(Oe.Actions.transcriptItemGuestReaction(r,i||null))}),O6=H2(A6,x6)(T6),Zb=()=>{const[n,r]=H.useState(!1);return H.useEffect(()=>{r((()=>{try{return window.self!==window.top}catch{return!0}})())},[]),n},R6=n=>r=>{const i=r.key;(i==="ArrowDown"||i==="ArrowRight"||i==="Enter"||i===" "||i==="Space")&&(r.stopPropagation(),n())},w6=({onClick:n})=>{const r=tt();return Zb()?v.jsx("button",{className:"tooltip--bottom-left","aria-label":r("header.close-chat"),"data-title":r("header.close-chat"),tabIndex:0,onClick:n,onKeyDown:R6(n),children:v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:v.jsx("path",{d:"M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"})})}):null},C6="_header_3gvbz_1",N6="_logoContainer_3gvbz_14",M6="_logo_3gvbz_14",D6="_actions_3gvbz_28",B6="_active_3gvbz_43",L6="_menuContainer_3gvbz_56",U6="_menu_3gvbz_56",H6="_divider_3gvbz_86",ia={header:C6,logoContainer:N6,logo:M6,actions:D6,active:B6,menuContainer:L6,menu:U6,divider:H6},j6=({icon:n})=>{switch(n){case"arrow-counter-clockwise":return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:v.jsx("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"})});case"download":return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:v.jsx("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z"})});case"expand":return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:v.jsx("path",{d:"M214,48V96a6,6,0,0,1-12,0V62.48l-53.76,53.76a6,6,0,0,1-8.48-8.48L193.52,54H160a6,6,0,0,1,0-12h48A6,6,0,0,1,214,48ZM107.76,139.76,54,193.52V160a6,6,0,0,0-12,0v48a6,6,0,0,0,6,6H96a6,6,0,0,0,0-12H62.48l53.76-53.76a6,6,0,0,0-8.48-8.48Z"})});case"mail":return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:v.jsx("path",{d:"M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48ZM203.43,64,128,133.15,52.57,64ZM216,192H40V74.19l82.59,75.71a8,8,0,0,0,10.82,0L216,74.19V192Z"})});case"phone":return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:v.jsx("path",{d:"M144.27,45.93a8,8,0,0,1,9.8-5.66,86.22,86.22,0,0,1,61.66,61.66,8,8,0,0,1-5.66,9.8A8.23,8.23,0,0,1,208,112a8,8,0,0,1-7.73-5.94,70.35,70.35,0,0,0-50.33-50.33A8,8,0,0,1,144.27,45.93Zm-2.33,41.8c13.79,3.68,22.65,12.54,26.33,26.33A8,8,0,0,0,176,120a8.23,8.23,0,0,0,2.07-.27,8,8,0,0,0,5.66-9.8c-5.12-19.16-18.5-32.54-37.66-37.66a8,8,0,1,0-4.13,15.46Zm81.94,95.35A56.26,56.26,0,0,1,168,232C88.6,232,24,167.4,24,88A56.26,56.26,0,0,1,72.92,32.12a16,16,0,0,1,16.62,9.52l21.12,47.15,0,.12A16,16,0,0,1,109.39,104c-.18.27-.37.52-.57.77L88,129.45c7.49,15.22,23.41,31,38.83,38.51l24.34-20.71a8.12,8.12,0,0,1,.75-.56,16,16,0,0,1,15.17-1.4l.13.06,47.11,21.11A16,16,0,0,1,223.88,183.08Zm-15.88-2s-.07,0-.11,0h0l-47-21.05-24.35,20.71a8.44,8.44,0,0,1-.74.56,16,16,0,0,1-15.75,1.14c-18.73-9.05-37.4-27.58-46.46-46.11a16,16,0,0,1,1-15.7,6.13,6.13,0,0,1,.57-.77L96,95.15l-21-47a.61.61,0,0,1,0-.12A40.2,40.2,0,0,0,40,88,128.14,128.14,0,0,0,168,216,40.21,40.21,0,0,0,208,181.07Z"})});case"scroll":return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:v.jsx("path",{d:"M96,104a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H104A8,8,0,0,1,96,104Zm8,40h64a8,8,0,0,0,0-16H104a8,8,0,0,0,0,16Zm128,48a32,32,0,0,1-32,32H88a32,32,0,0,1-32-32V64a16,16,0,0,0-32,0c0,5.74,4.83,9.62,4.88,9.66h0A8,8,0,0,1,24,88a7.89,7.89,0,0,1-4.79-1.61h0C18.05,85.54,8,77.61,8,64A32,32,0,0,1,40,32H176a32,32,0,0,1,32,32V168h8a8,8,0,0,1,4.8,1.6C222,170.46,232,178.39,232,192ZM96.26,173.48A8.07,8.07,0,0,1,104,168h88V64a16,16,0,0,0-16-16H67.69A31.71,31.71,0,0,1,72,64V192a16,16,0,0,0,32,0c0-5.74-4.83-9.62-4.88-9.66A7.82,7.82,0,0,1,96.26,173.48ZM216,192a12.58,12.58,0,0,0-3.23-8h-94a26.92,26.92,0,0,1,1.21,8,31.82,31.82,0,0,1-4.29,16H200A16,16,0,0,0,216,192Z"})});case"link":return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:v.jsx("path",{d:"M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z"})});default:return v.jsx("div",{})}},I6=H.forwardRef(({selected:n,item:r,onClick:i},s)=>{const u=tt(),c=h=>{h.preventDefault(),i()};return v.jsx("li",{"aria-selected":n,role:"option",className:r.withDivider?ia.divider:void 0,children:v.jsxs("a",{ref:s,type:"button",role:"button",tabIndex:-1,onClick:c,children:[v.jsx(j6,{icon:r.icon}),v.jsx("span",{children:u(`header.menu.${r.id}`)})]})})}),z6=n=>{const r=Zb(),{menuItems:i,enableStandaloneView:s,enableTranscriptExportPdf:u,enableTranscriptExportEmail:c}=Zt(d=>d.settings);return H.useMemo(()=>{const d=[];if(n&&(d.push({id:"restart-chat",type:"restart-chat",icon:"arrow-counter-clockwise",visibility:"chat-only"}),r&&s&&d.push({id:"expand-chat-window",type:"expand-chat-window",icon:"expand",visibility:"always"}),u&&d.push({id:"download-transcript",type:"download-transcript",icon:"download",visibility:"chat-only"}),c&&d.push({id:"send-transcript",type:"send-transcript",icon:"mail",visibility:"chat-only"}),d.length>1)){const m=d.pop();m&&i.length&&d.push({...m,withDivider:!0})}return d.push(...i),d.filter(({visibility:m})=>n?m==="always"||m==="chat-only":m==="always"||m==="start-screen-only")},[n,u,c,s,r,i])},G6=({chatStarted:n})=>{const r=ka(),i=Vd(),s=tt(),[u,c]=H.useState(!1),[h,d]=H.useState(-1),m=H.useRef(null),g=H.useRef(null),y=H.useRef([]),_=z6(n);H.useEffect(()=>{y.current[h]?.focus()},[h]);const T=H.useCallback(()=>{const G=lu.parse(window.location.search);r(mu(i,G)),c(!1),d(0)},[r,i]),L=H.useCallback(G=>{switch(G.type){case"restart-chat":T();break;case"expand-chat-window":window.open(window.location.href,"_blank");break;case"download-transcript":r(vx());break;case"send-transcript":r(wb());break;case"link":r(fb(G.url));break;case"action":r(JSON.parse(JSON.stringify(G.action)));break}c(!1)},[r,T,c]);H.useEffect(()=>{const G=E=>{if(u)switch(E.key){case"Enter":E.preventDefault(),L(_[h]);break;case"ArrowUp":d(w=>w>0?w-1:_.length-1);break;case"ArrowDown":d(w=>w<_.length-1?w+1:0);break;case"Escape":c(!1);break;case"Tab":h>-1&&c(!1);break}};return document.addEventListener("keydown",G),()=>{document.removeEventListener("keydown",G)}},[u,h,_,d,c,L]),H.useEffect(()=>{u||d(-1)},[u,h]),Yb(g,()=>c(!1));const N=()=>{c(G=>!G)},V=()=>{setTimeout(()=>{const G=document.activeElement;g.current&&!g.current.contains(G)&&c(!1)},0)};return _.length?v.jsxs("div",{className:Q(ia.menuContainer),ref:g,children:[v.jsx("button",{ref:m,className:Q(u&&ia.active,u?"tooltip-hidden":"tooltip--bottom-left"),"aria-label":s("header.menu.title"),"data-title":s("header.menu.title"),onClick:N,onBlur:V,children:v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:v.jsx("path",{d:"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z"})})}),u&&v.jsx("nav",{className:ia.menu,"aria-label":s("header.menu.title"),children:v.jsx("ul",{tabIndex:0,children:_.map((G,E)=>v.jsx(I6,{ref:w=>{y.current[E]=w},selected:h===E,item:G,onClick:()=>L(G)},G.id))})})]}):null},Bv=({className:n,chatStarted:r,...i})=>{const s=ka(),u=()=>{s(dO())};return v.jsxs("div",{className:Q([ia.header,n]),...i,children:[v.jsx("div",{className:ia.logoContainer,children:v.jsx("div",{className:ia.logo})}),v.jsxs("div",{className:ia.actions,children:[v.jsx(G6,{chatStarted:r}),v.jsx(w6,{onClick:u})]})]})},k6="_chatwindow_rkbir_1",q6="_chatwindowWithAside_rkbir_21",Lv={chatwindow:k6,chatwindowWithAside:q6},Qb=()=>{const[n,r]=H.useState(!1);return H.useEffect(()=>{const i=window.matchMedia("(max-width: 1023px)"),s=()=>r(i.matches);return s(),i.addEventListener("change",s),()=>i.removeEventListener("change",s)},[]),n},F6="_sourceInfos_vei0l_1",P6="_waitForLoading_vei0l_24",V6="_loadingContent_vei0l_28",Y6="_sourceHeader_vei0l_37",X6="_sourceHeaderIcon_vei0l_57",Z6="_sourceContent_vei0l_61",Q6="_openSourceButton_vei0l_69",K6="_sourceButtonLabel_vei0l_79",$6="_closeSourceInfosButton_vei0l_101",W6="_loadingSourceInfos_vei0l_125",J6="_loading_vei0l_28",eN="_loadingError_vei0l_139",tN="_highlightLoadingInfo_vei0l_155",nN="_highlightLoadingInfoInnerContainer_vei0l_169",rN="_highlightLoadingInfoContent_vei0l_178",aN="_highlightLoadingInfoCloseIcon_vei0l_198",iN="_highlightLoader_vei0l_203",sN="_highlightLoaderLoading_vei0l_210",vt={sourceInfos:F6,waitForLoading:P6,loadingContent:V6,sourceHeader:Y6,sourceHeaderIcon:X6,sourceContent:Z6,openSourceButton:Q6,sourceButtonLabel:K6,closeSourceInfosButton:$6,loadingSourceInfos:W6,loading:J6,loadingError:eN,highlightLoadingInfo:tN,highlightLoadingInfoInnerContainer:nN,highlightLoadingInfoContent:rN,highlightLoadingInfoCloseIcon:aN,highlightLoader:iN,highlightLoaderLoading:sN},lN=({onClick:n})=>{const r=tt();return v.jsx("button",{className:Q(vt.closeSourceInfosButton,"tooltip--bottom-left"),"aria-label":r("source-infos.close"),"data-title":r("source-infos.close"),tabIndex:0,onClick:n,children:v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:v.jsx("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"})})})},oN=H.forwardRef(({sourceInfos:n,onClose:r,...i},s)=>v.jsxs("div",{className:vt.sourceHeader,...i,ref:s,children:[v.jsx("div",{children:n?v.jsx("p",{id:"source-info-title",children:n.title}):v.jsx("p",{children:" "})}),v.jsx(lN,{onClick:r})]})),uN=({loading:n})=>v.jsx("div",{className:vt.highlightLoader,children:n&&v.jsx("div",{className:vt.highlightLoaderLoading})});/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:Kb,setPrototypeOf:Uv,isFrozen:cN,getPrototypeOf:fN,getOwnPropertyDescriptor:hN}=Object;let{freeze:It,seal:Sn,create:$b}=Object,{apply:id,construct:sd}=typeof Reflect<"u"&&Reflect;It||(It=function(r){return r});Sn||(Sn=function(r){return r});id||(id=function(r,i,s){return r.apply(i,s)});sd||(sd=function(r,i){return new r(...i)});const Io=zt(Array.prototype.forEach),dN=zt(Array.prototype.lastIndexOf),Hv=zt(Array.prototype.pop),ks=zt(Array.prototype.push),mN=zt(Array.prototype.splice),Po=zt(String.prototype.toLowerCase),dh=zt(String.prototype.toString),jv=zt(String.prototype.match),qs=zt(String.prototype.replace),pN=zt(String.prototype.indexOf),gN=zt(String.prototype.trim),Hn=zt(Object.prototype.hasOwnProperty),Ut=zt(RegExp.prototype.test),Fs=yN(TypeError);function zt(n){return function(r){r instanceof RegExp&&(r.lastIndex=0);for(var i=arguments.length,s=new Array(i>1?i-1:0),u=1;u<i;u++)s[u-1]=arguments[u];return id(n,r,s)}}function yN(n){return function(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return sd(n,i)}}function xe(n,r){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Po;Uv&&Uv(n,null);let s=r.length;for(;s--;){let u=r[s];if(typeof u=="string"){const c=i(u);c!==u&&(cN(r)||(r[s]=c),u=c)}n[u]=!0}return n}function vN(n){for(let r=0;r<n.length;r++)Hn(n,r)||(n[r]=null);return n}function Sr(n){const r=$b(null);for(const[i,s]of Kb(n))Hn(n,i)&&(Array.isArray(s)?r[i]=vN(s):s&&typeof s=="object"&&s.constructor===Object?r[i]=Sr(s):r[i]=s);return r}function Ps(n,r){for(;n!==null;){const s=hN(n,r);if(s){if(s.get)return zt(s.get);if(typeof s.value=="function")return zt(s.value)}n=fN(n)}function i(){return null}return i}const Iv=It(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),mh=It(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ph=It(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),bN=It(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),gh=It(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),_N=It(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),zv=It(["#text"]),Gv=It(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),yh=It(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),kv=It(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),zo=It(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),EN=Sn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),SN=Sn(/<%[\w\W]*|[\w\W]*%>/gm),TN=Sn(/\$\{[\w\W]*/gm),AN=Sn(/^data-[\-\w.\u00B7-\uFFFF]+$/),xN=Sn(/^aria-[\-\w]+$/),Wb=Sn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ON=Sn(/^(?:\w+script|data):/i),RN=Sn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Jb=Sn(/^html$/i),wN=Sn(/^[a-z][.\w]*(-[.\w]+)+$/i);var qv=Object.freeze({__proto__:null,ARIA_ATTR:xN,ATTR_WHITESPACE:RN,CUSTOM_ELEMENT:wN,DATA_ATTR:AN,DOCTYPE_NAME:Jb,ERB_EXPR:SN,IS_ALLOWED_URI:Wb,IS_SCRIPT_OR_DATA:ON,MUSTACHE_EXPR:EN,TMPLIT_EXPR:TN});const Vs={element:1,text:3,progressingInstruction:7,comment:8,document:9},CN=function(){return typeof window>"u"?null:window},NN=function(r,i){if(typeof r!="object"||typeof r.createPolicy!="function")return null;let s=null;const u="data-tt-policy-suffix";i&&i.hasAttribute(u)&&(s=i.getAttribute(u));const c="dompurify"+(s?"#"+s:"");try{return r.createPolicy(c,{createHTML(h){return h},createScriptURL(h){return h}})}catch{return console.warn("TrustedTypes policy "+c+" could not be created."),null}},Fv=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function e_(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:CN();const r=le=>e_(le);if(r.version="3.2.6",r.removed=[],!n||!n.document||n.document.nodeType!==Vs.document||!n.Element)return r.isSupported=!1,r;let{document:i}=n;const s=i,u=s.currentScript,{DocumentFragment:c,HTMLTemplateElement:h,Node:d,Element:m,NodeFilter:g,NamedNodeMap:y=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:_,DOMParser:T,trustedTypes:L}=n,N=m.prototype,V=Ps(N,"cloneNode"),G=Ps(N,"remove"),E=Ps(N,"nextSibling"),w=Ps(N,"childNodes"),S=Ps(N,"parentNode");if(typeof h=="function"){const le=i.createElement("template");le.content&&le.content.ownerDocument&&(i=le.content.ownerDocument)}let I,x="";const{implementation:Z,createNodeIterator:$,createDocumentFragment:ie,getElementsByTagName:_e}=i,{importNode:Re}=s;let se=Fv();r.isSupported=typeof Kb=="function"&&typeof S=="function"&&Z&&Z.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:me,ERB_EXPR:ce,TMPLIT_EXPR:Ve,DATA_ATTR:ve,ARIA_ATTR:z,IS_SCRIPT_OR_DATA:K,ATTR_WHITESPACE:ee,CUSTOM_ELEMENT:Se}=qv;let{IS_ALLOWED_URI:O}=qv,k=null;const W=xe({},[...Iv,...mh,...ph,...gh,...zv]);let Y=null;const te=xe({},[...Gv,...yh,...kv,...zo]);let re=Object.seal($b(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ue=null,$e=null,Ue=!0,bt=!0,zn=!1,Cr=!0,Ze=!1,Gt=!0,xn=!1,Mi=!1,Di=!1,_t=!1,qa=!1,oa=!1,Bi=!0,ua=!1;const bu="user-content-";let Fa=!0,ca=!1,Nr={},fn=null;const wt=xe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let On=null;const Ct=xe({},["audio","video","img","source","image","track"]);let Li=null;const al=xe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Pa="http://www.w3.org/1998/Math/MathML",tr="http://www.w3.org/2000/svg",kt="http://www.w3.org/1999/xhtml";let qt=kt,Mr=!1,nr=null;const _u=xe({},[Pa,tr,kt],dh);let fa=xe({},["mi","mo","mn","ms","mtext"]),ha=xe({},["annotation-xml"]);const Ui=xe({},["title","style","font","a","script"]);let Rn=null;const Eu=["application/xhtml+xml","text/html"],il="text/html";let nt=null,Gn=null;const Hi=i.createElement("form"),ji=function(C){return C instanceof RegExp||C instanceof Function},Ii=function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Gn&&Gn===C)){if((!C||typeof C!="object")&&(C={}),C=Sr(C),Rn=Eu.indexOf(C.PARSER_MEDIA_TYPE)===-1?il:C.PARSER_MEDIA_TYPE,nt=Rn==="application/xhtml+xml"?dh:Po,k=Hn(C,"ALLOWED_TAGS")?xe({},C.ALLOWED_TAGS,nt):W,Y=Hn(C,"ALLOWED_ATTR")?xe({},C.ALLOWED_ATTR,nt):te,nr=Hn(C,"ALLOWED_NAMESPACES")?xe({},C.ALLOWED_NAMESPACES,dh):_u,Li=Hn(C,"ADD_URI_SAFE_ATTR")?xe(Sr(al),C.ADD_URI_SAFE_ATTR,nt):al,On=Hn(C,"ADD_DATA_URI_TAGS")?xe(Sr(Ct),C.ADD_DATA_URI_TAGS,nt):Ct,fn=Hn(C,"FORBID_CONTENTS")?xe({},C.FORBID_CONTENTS,nt):wt,ue=Hn(C,"FORBID_TAGS")?xe({},C.FORBID_TAGS,nt):Sr({}),$e=Hn(C,"FORBID_ATTR")?xe({},C.FORBID_ATTR,nt):Sr({}),Nr=Hn(C,"USE_PROFILES")?C.USE_PROFILES:!1,Ue=C.ALLOW_ARIA_ATTR!==!1,bt=C.ALLOW_DATA_ATTR!==!1,zn=C.ALLOW_UNKNOWN_PROTOCOLS||!1,Cr=C.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ze=C.SAFE_FOR_TEMPLATES||!1,Gt=C.SAFE_FOR_XML!==!1,xn=C.WHOLE_DOCUMENT||!1,_t=C.RETURN_DOM||!1,qa=C.RETURN_DOM_FRAGMENT||!1,oa=C.RETURN_TRUSTED_TYPE||!1,Di=C.FORCE_BODY||!1,Bi=C.SANITIZE_DOM!==!1,ua=C.SANITIZE_NAMED_PROPS||!1,Fa=C.KEEP_CONTENT!==!1,ca=C.IN_PLACE||!1,O=C.ALLOWED_URI_REGEXP||Wb,qt=C.NAMESPACE||kt,fa=C.MATHML_TEXT_INTEGRATION_POINTS||fa,ha=C.HTML_INTEGRATION_POINTS||ha,re=C.CUSTOM_ELEMENT_HANDLING||{},C.CUSTOM_ELEMENT_HANDLING&&ji(C.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(re.tagNameCheck=C.CUSTOM_ELEMENT_HANDLING.tagNameCheck),C.CUSTOM_ELEMENT_HANDLING&&ji(C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(re.attributeNameCheck=C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),C.CUSTOM_ELEMENT_HANDLING&&typeof C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(re.allowCustomizedBuiltInElements=C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ze&&(bt=!1),qa&&(_t=!0),Nr&&(k=xe({},zv),Y=[],Nr.html===!0&&(xe(k,Iv),xe(Y,Gv)),Nr.svg===!0&&(xe(k,mh),xe(Y,yh),xe(Y,zo)),Nr.svgFilters===!0&&(xe(k,ph),xe(Y,yh),xe(Y,zo)),Nr.mathMl===!0&&(xe(k,gh),xe(Y,kv),xe(Y,zo))),C.ADD_TAGS&&(k===W&&(k=Sr(k)),xe(k,C.ADD_TAGS,nt)),C.ADD_ATTR&&(Y===te&&(Y=Sr(Y)),xe(Y,C.ADD_ATTR,nt)),C.ADD_URI_SAFE_ATTR&&xe(Li,C.ADD_URI_SAFE_ATTR,nt),C.FORBID_CONTENTS&&(fn===wt&&(fn=Sr(fn)),xe(fn,C.FORBID_CONTENTS,nt)),Fa&&(k["#text"]=!0),xn&&xe(k,["html","head","body"]),k.table&&(xe(k,["tbody"]),delete ue.tbody),C.TRUSTED_TYPES_POLICY){if(typeof C.TRUSTED_TYPES_POLICY.createHTML!="function")throw Fs('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof C.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Fs('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');I=C.TRUSTED_TYPES_POLICY,x=I.createHTML("")}else I===void 0&&(I=NN(L,u)),I!==null&&typeof x=="string"&&(x=I.createHTML(""));It&&It(C),Gn=C}},wn=xe({},[...mh,...ph,...bN]),ft=xe({},[...gh,..._N]),Nt=function(C){let X=S(C);(!X||!X.tagName)&&(X={namespaceURI:qt,tagName:"template"});const J=Po(C.tagName),Fe=Po(X.tagName);return nr[C.namespaceURI]?C.namespaceURI===tr?X.namespaceURI===kt?J==="svg":X.namespaceURI===Pa?J==="svg"&&(Fe==="annotation-xml"||fa[Fe]):!!wn[J]:C.namespaceURI===Pa?X.namespaceURI===kt?J==="math":X.namespaceURI===tr?J==="math"&&ha[Fe]:!!ft[J]:C.namespaceURI===kt?X.namespaceURI===tr&&!ha[Fe]||X.namespaceURI===Pa&&!fa[Fe]?!1:!ft[J]&&(Ui[J]||!wn[J]):!!(Rn==="application/xhtml+xml"&&nr[C.namespaceURI]):!1},Et=function(C){ks(r.removed,{element:C});try{S(C).removeChild(C)}catch{G(C)}},kn=function(C,X){try{ks(r.removed,{attribute:X.getAttributeNode(C),from:X})}catch{ks(r.removed,{attribute:null,from:X})}if(X.removeAttribute(C),C==="is")if(_t||qa)try{Et(X)}catch{}else try{X.setAttribute(C,"")}catch{}},sl=function(C){let X=null,J=null;if(Di)C="<remove></remove>"+C;else{const We=jv(C,/^[\r\n\t ]+/);J=We&&We[0]}Rn==="application/xhtml+xml"&&qt===kt&&(C='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+C+"</body></html>");const Fe=I?I.createHTML(C):C;if(qt===kt)try{X=new T().parseFromString(Fe,Rn)}catch{}if(!X||!X.documentElement){X=Z.createDocument(qt,"template",null);try{X.documentElement.innerHTML=Mr?x:Fe}catch{}}const ht=X.body||X.documentElement;return C&&J&&ht.insertBefore(i.createTextNode(J),ht.childNodes[0]||null),qt===kt?_e.call(X,xn?"html":"body")[0]:xn?X.documentElement:ht},ll=function(C){return $.call(C.ownerDocument||C,C,g.SHOW_ELEMENT|g.SHOW_COMMENT|g.SHOW_TEXT|g.SHOW_PROCESSING_INSTRUCTION|g.SHOW_CDATA_SECTION,null)},Va=function(C){return C instanceof _&&(typeof C.nodeName!="string"||typeof C.textContent!="string"||typeof C.removeChild!="function"||!(C.attributes instanceof y)||typeof C.removeAttribute!="function"||typeof C.setAttribute!="function"||typeof C.namespaceURI!="string"||typeof C.insertBefore!="function"||typeof C.hasChildNodes!="function")},Dr=function(C){return typeof d=="function"&&C instanceof d};function Qt(le,C,X){Io(le,J=>{J.call(r,C,X,Gn)})}const rr=function(C){let X=null;if(Qt(se.beforeSanitizeElements,C,null),Va(C))return Et(C),!0;const J=nt(C.nodeName);if(Qt(se.uponSanitizeElement,C,{tagName:J,allowedTags:k}),Gt&&C.hasChildNodes()&&!Dr(C.firstElementChild)&&Ut(/<[/\w!]/g,C.innerHTML)&&Ut(/<[/\w!]/g,C.textContent)||C.nodeType===Vs.progressingInstruction||Gt&&C.nodeType===Vs.comment&&Ut(/<[/\w]/g,C.data))return Et(C),!0;if(!k[J]||ue[J]){if(!ue[J]&&Br(J)&&(re.tagNameCheck instanceof RegExp&&Ut(re.tagNameCheck,J)||re.tagNameCheck instanceof Function&&re.tagNameCheck(J)))return!1;if(Fa&&!fn[J]){const Fe=S(C)||C.parentNode,ht=w(C)||C.childNodes;if(ht&&Fe){const We=ht.length;for(let Mt=We-1;Mt>=0;--Mt){const Ft=V(ht[Mt],!0);Ft.__removalCount=(C.__removalCount||0)+1,Fe.insertBefore(Ft,E(C))}}}return Et(C),!0}return C instanceof m&&!Nt(C)||(J==="noscript"||J==="noembed"||J==="noframes")&&Ut(/<\/no(script|embed|frames)/i,C.innerHTML)?(Et(C),!0):(Ze&&C.nodeType===Vs.text&&(X=C.textContent,Io([me,ce,Ve],Fe=>{X=qs(X,Fe," ")}),C.textContent!==X&&(ks(r.removed,{element:C.cloneNode()}),C.textContent=X)),Qt(se.afterSanitizeElements,C,null),!1)},ar=function(C,X,J){if(Bi&&(X==="id"||X==="name")&&(J in i||J in Hi))return!1;if(!(bt&&!$e[X]&&Ut(ve,X))){if(!(Ue&&Ut(z,X))){if(!Y[X]||$e[X]){if(!(Br(C)&&(re.tagNameCheck instanceof RegExp&&Ut(re.tagNameCheck,C)||re.tagNameCheck instanceof Function&&re.tagNameCheck(C))&&(re.attributeNameCheck instanceof RegExp&&Ut(re.attributeNameCheck,X)||re.attributeNameCheck instanceof Function&&re.attributeNameCheck(X))||X==="is"&&re.allowCustomizedBuiltInElements&&(re.tagNameCheck instanceof RegExp&&Ut(re.tagNameCheck,J)||re.tagNameCheck instanceof Function&&re.tagNameCheck(J))))return!1}else if(!Li[X]){if(!Ut(O,qs(J,ee,""))){if(!((X==="src"||X==="xlink:href"||X==="href")&&C!=="script"&&pN(J,"data:")===0&&On[C])){if(!(zn&&!Ut(K,qs(J,ee,"")))){if(J)return!1}}}}}}return!0},Br=function(C){return C!=="annotation-xml"&&jv(C,Se)},ir=function(C){Qt(se.beforeSanitizeAttributes,C,null);const{attributes:X}=C;if(!X||Va(C))return;const J={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Y,forceKeepAttr:void 0};let Fe=X.length;for(;Fe--;){const ht=X[Fe],{name:We,namespaceURI:Mt,value:Ft}=ht,qn=nt(We),Kt=Ft;let st=We==="value"?Kt:gN(Kt);if(J.attrName=qn,J.attrValue=st,J.keepAttr=!0,J.forceKeepAttr=void 0,Qt(se.uponSanitizeAttribute,C,J),st=J.attrValue,ua&&(qn==="id"||qn==="name")&&(kn(We,C),st=bu+st),Gt&&Ut(/((--!?|])>)|<\/(style|title)/i,st)){kn(We,C);continue}if(J.forceKeepAttr)continue;if(!J.keepAttr){kn(We,C);continue}if(!Cr&&Ut(/\/>/i,st)){kn(We,C);continue}Ze&&Io([me,ce,Ve],sr=>{st=qs(st,sr," ")});const zi=nt(C.nodeName);if(!ar(zi,qn,st)){kn(We,C);continue}if(I&&typeof L=="object"&&typeof L.getAttributeType=="function"&&!Mt)switch(L.getAttributeType(zi,qn)){case"TrustedHTML":{st=I.createHTML(st);break}case"TrustedScriptURL":{st=I.createScriptURL(st);break}}if(st!==Kt)try{Mt?C.setAttributeNS(Mt,We,st):C.setAttribute(We,st),Va(C)?Et(C):Hv(r.removed)}catch{kn(We,C)}}Qt(se.afterSanitizeAttributes,C,null)},it=function le(C){let X=null;const J=ll(C);for(Qt(se.beforeSanitizeShadowDOM,C,null);X=J.nextNode();)Qt(se.uponSanitizeShadowNode,X,null),rr(X),ir(X),X.content instanceof c&&le(X.content);Qt(se.afterSanitizeShadowDOM,C,null)};return r.sanitize=function(le){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},X=null,J=null,Fe=null,ht=null;if(Mr=!le,Mr&&(le="<!-->"),typeof le!="string"&&!Dr(le))if(typeof le.toString=="function"){if(le=le.toString(),typeof le!="string")throw Fs("dirty is not a string, aborting")}else throw Fs("toString is not a function");if(!r.isSupported)return le;if(Mi||Ii(C),r.removed=[],typeof le=="string"&&(ca=!1),ca){if(le.nodeName){const Ft=nt(le.nodeName);if(!k[Ft]||ue[Ft])throw Fs("root node is forbidden and cannot be sanitized in-place")}}else if(le instanceof d)X=sl("<!---->"),J=X.ownerDocument.importNode(le,!0),J.nodeType===Vs.element&&J.nodeName==="BODY"||J.nodeName==="HTML"?X=J:X.appendChild(J);else{if(!_t&&!Ze&&!xn&&le.indexOf("<")===-1)return I&&oa?I.createHTML(le):le;if(X=sl(le),!X)return _t?null:oa?x:""}X&&Di&&Et(X.firstChild);const We=ll(ca?le:X);for(;Fe=We.nextNode();)rr(Fe),ir(Fe),Fe.content instanceof c&&it(Fe.content);if(ca)return le;if(_t){if(qa)for(ht=ie.call(X.ownerDocument);X.firstChild;)ht.appendChild(X.firstChild);else ht=X;return(Y.shadowroot||Y.shadowrootmode)&&(ht=Re.call(s,ht,!0)),ht}let Mt=xn?X.outerHTML:X.innerHTML;return xn&&k["!doctype"]&&X.ownerDocument&&X.ownerDocument.doctype&&X.ownerDocument.doctype.name&&Ut(Jb,X.ownerDocument.doctype.name)&&(Mt="<!DOCTYPE "+X.ownerDocument.doctype.name+`>
111
111
  `+Mt),Ze&&Io([me,ce,Ve],Ft=>{Mt=qs(Mt,Ft," ")}),I&&oa?I.createHTML(Mt):Mt},r.setConfig=function(){let le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ii(le),Mi=!0},r.clearConfig=function(){Gn=null,Mi=!1},r.isValidAttribute=function(le,C,X){Gn||Ii({});const J=nt(le),Fe=nt(C);return ar(J,Fe,X)},r.addHook=function(le,C){typeof C=="function"&&ks(se[le],C)},r.removeHook=function(le,C){if(C!==void 0){const X=dN(se[le],C);return X===-1?void 0:mN(se[le],X,1)[0]}return Hv(se[le])},r.removeHooks=function(le){se[le]=[]},r.removeAllHooks=function(){se=Fv()},r}var MN=e_();const DN=({onClose:n})=>{const r=tt();return v.jsxs("div",{className:vt.highlightLoadingInfo,onClick:n,children:[v.jsx("div",{className:vt.highlightLoadingInfoCloseIcon,children:v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:v.jsx("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"})})}),v.jsxs("div",{className:vt.highlightLoadingInfoInnerContainer,children:[v.jsxs("div",{className:vt.highlightLoadingInfoContent,children:[v.jsx("h3",{children:r("source-infos.highlight-loading.title")}),v.jsx("p",{children:r("source-infos.highlight-loading.description")})]}),v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"#000000",viewBox:"0 0 256 256",children:v.jsx("path",{d:"M253.66,106.34a8,8,0,0,0-11.32,0L192,156.69,107.31,72l50.35-50.34a8,8,0,1,0-11.32-11.32L96,60.69A16,16,0,0,0,93.18,79.5L72,100.69a16,16,0,0,0,0,22.62L76.69,128,18.34,186.34a8,8,0,0,0,3.13,13.25l72,24A7.88,7.88,0,0,0,96,224a8,8,0,0,0,5.66-2.34L136,187.31l4.69,4.69a16,16,0,0,0,22.62,0l21.19-21.18A16,16,0,0,0,203.31,168l50.35-50.34A8,8,0,0,0,253.66,106.34ZM93.84,206.85l-55-18.35L88,139.31,124.69,176ZM152,180.69,83.31,112,104,91.31,172.69,160Z"})})]})]})},BN=({title:n,href:r,children:i})=>v.jsx("a",{href:r,title:n,target:"_blank",rel:"noopener noreferrer",children:i}),LN=({className:n,children:r,...i})=>v.jsx("a",{className:Q(Js.button,Js.buttonDefault,n),type:"button",role:"button",...i,children:r}),UN=n=>v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",...n,children:v.jsx("path",{d:"M52,146H36a6,6,0,0,0-6,6v56a6,6,0,0,0,6,6H52a34,34,0,0,0,0-68Zm0,56H42V158H52a22,22,0,0,1,0,44Zm168.15-5.46a6,6,0,0,1,.18,8.48A28.06,28.06,0,0,1,200,214c-16.54,0-30-15.25-30-34s13.46-34,30-34a28.06,28.06,0,0,1,20.33,9,6,6,0,0,1-8.66,8.3A16.23,16.23,0,0,0,200,158c-9.93,0-18,9.87-18,22s8.07,22,18,22a16.23,16.23,0,0,0,11.67-5.28A6,6,0,0,1,220.15,196.54ZM128,146c-16.54,0-30,15.25-30,34s13.46,34,30,34,30-15.25,30-34S144.54,146,128,146Zm0,56c-9.93,0-18-9.87-18-22s8.07-22,18-22,18,9.87,18,22S137.93,202,128,202ZM48,118a6,6,0,0,0,6-6V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50v18a6,6,0,0,0,12,0V88a6,6,0,0,0-1.76-4.24l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72A6,6,0,0,0,48,118ZM158,46.48,193.52,82H158Z"})}),HN=({type:n,...r})=>{switch(n){case"WEBSITE":return v.jsx(qb,{...r});case"PDF":return v.jsx(kb,{...r});case"DOCX":return v.jsx(zb,{...r});case"TEXT":return v.jsx(UN,{...r});default:return v.jsx(Gb,{...r})}},jN=({url:n,knowledgeBaseType:r})=>{const i=tt();return v.jsx(LN,{className:vt.openSourceButton,href:n,target:"_blank",children:v.jsxs("div",{className:vt.sourceButtonLabel,children:[v.jsx("div",{className:vt.sourceHeaderIcon,children:v.jsx(HN,{type:r})}),v.jsx("p",{children:i("source-infos.open-source")})]})})},IN=({sourceInfos:{content:n,url:r,knowledgeBaseType:i,highlighted:s}})=>{const[u,c]=H.useState(!s);H.useEffect(()=>{s&&c(!1)},[s]);const h=MN.sanitize(n,{USE_PROFILES:{html:!0}});return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:Q(vt.sourceContent,Pb.markdown),children:[v.jsx(xr,{options:{overrides:{a:BN}},children:h}),u&&v.jsx(DN,{onClose:()=>c(!1)})]}),v.jsx(jN,{url:r,knowledgeBaseType:i})]})},zN=""+new URL("undraw_fixing-bugs-D_eYxJc6.svg",import.meta.url).href,GN=()=>{const n=tt();return v.jsxs("div",{className:vt.loadingError,children:[v.jsx("h1",{children:n("source-infos.error.title")}),v.jsx("img",{src:zN,title:n("source-infos.error.title")}),v.jsx("p",{children:n("source-infos.error.info")})]})},kN=()=>v.jsx("div",{className:vt.loadingSourceInfos,children:v.jsx("svg",{className:vt.loading,xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:v.jsx("path",{d:"M230,128a102,102,0,0,1-204,0c0-40.18,23.35-76.86,59.5-93.45a6,6,0,0,1,5,10.9C58.61,60.09,38,92.49,38,128a90,90,0,0,0,180,0c0-35.51-20.61-67.91-52.5-82.55a6,6,0,0,1,5-10.9C206.65,51.14,230,87.82,230,128Z"})})});function qN({sourceInfos:n,onClose:r,threshold:i=100}){const s=H.useRef(null),[u,c]=H.useState(0),[h,d]=H.useState(!1),m=H.useRef(null),g=H.useRef(null),y=H.useCallback(N=>{m.current=N,d(!0)},[]),_=H.useCallback(N=>{if(m.current!==null&&h){const V=N-m.current;V>0&&c(V)}},[h]),T=H.useCallback(()=>{d(!1),u>i&&r(),c(0),m.current=null},[u,i,r]),L=H.useCallback(N=>{const V=x=>y(x.touches[0].clientY),G=x=>_(x.touches[0].clientY),E=()=>T(),w=x=>{x.preventDefault(),y(x.clientY),window.addEventListener("mousemove",S),window.addEventListener("mouseup",I)},S=x=>_(x.clientY),I=()=>{T(),window.removeEventListener("mousemove",S),window.removeEventListener("mouseup",I)};N.addEventListener("touchstart",V),N.addEventListener("touchmove",G),N.addEventListener("touchend",E),N.addEventListener("mousedown",w),g.current=()=>{N.removeEventListener("touchstart",V),N.removeEventListener("touchmove",G),N.removeEventListener("touchend",E),N.removeEventListener("mousedown",w),window.removeEventListener("mousemove",S),window.removeEventListener("mouseup",I)}},[y,_,T]);return H.useEffect(()=>{let N;return(()=>{s.current?(g.current?.(),L(s.current)):(N=new MutationObserver(()=>{s.current&&(g.current?.(),L(s.current),N?.disconnect())}),N.observe(document.body,{childList:!0,subtree:!0}))})(),()=>{N?.disconnect(),g.current?.()}},[L,n]),{ref:s,dragOffsetY:u,isDragging:h}}const FN=n=>{const[r,i]=H.useState(!0);return H.useEffect(()=>{let s=null;return n?.type==="loading"?(i(!0),s=setTimeout(()=>{i(!1)},300)):i(!n),()=>{s&&clearTimeout(s)}},[n]),r},PN=()=>{const n=ka(),r=Zt(m=>m.chat.sourceInfos),i=Qb(),s=H.useRef(null),u=FN(r);H.useEffect(()=>{s.current&&r?.type==="loading"&&(i?s.current.showModal():(s.current.setAttribute("open","true"),s.current?.focus()))},[r,i]);const c=H.useCallback(()=>{s.current&&(i?s.current.close():s.current.removeAttribute("open"),n(pO()))},[n,i]),{ref:h,dragOffsetY:d}=qN({onClose:c,sourceInfos:r});return r?v.jsx("dialog",{ref:s,className:Q(vt.sourceInfos,u?vt.waitForLoading:r.type==="loading"?vt.loadingContent:""),style:i&&d?{transform:`translateY(${d}px)`}:{},onClose:c,autoFocus:!0,role:"dialog","aria-labelledby":"source-info-title",children:u?null:v.jsxs(v.Fragment,{children:[v.jsx(oN,{ref:h,tabIndex:-1,sourceInfos:r.type==="loaded"?r:void 0,onClose:c}),r.type==="loading"?v.jsx(kN,{}):r.type==="loading-error"?v.jsx(GN,{}):v.jsxs(v.Fragment,{children:[v.jsx(uN,{loading:!r.highlighted}),v.jsx(IN,{sourceInfos:r})]})]})}):null},VN="_container_114wy_1",YN="_body_114wy_7",XN="_intro_114wy_14",ZN="_footer_114wy_39",QN="_footnote_114wy_43",KN="_containerWithFootnote_114wy_58",$N="_startChatButton_114wy_73",WN="_formFields_114wy_77",JN="_formField_114wy_77",e3="_radio_114wy_89",t3="_checkbox_114wy_96",n3="_input_114wy_104",r3="_inputLabel_114wy_138",a3="_selectWrapper_114wy_142",i3="_select_114wy_142",s3="_selectLabel_114wy_188",Rt={container:VN,body:YN,intro:XN,footer:ZN,footnote:QN,containerWithFootnote:KN,startChatButton:$N,formFields:WN,formField:JN,radio:e3,checkbox:t3,input:n3,inputLabel:r3,selectWrapper:a3,select:i3,selectLabel:s3},l3=({name:n,label:r,defaultValue:i,required:s,onChange:u})=>{const c=h=>{u(h.currentTarget.checked?"true":"false")};return v.jsxs("label",{className:Q(Rt.checkbox,"chat__startScreen__checkbox"),htmlFor:n,children:[v.jsx("input",{type:"checkbox",id:n,name:n,defaultChecked:i==="true",required:s,onChange:c}),v.jsx("div",{children:r})]})},o3=({type:n,name:r,label:i,defaultValue:s,placeholder:u,required:c,multiple:h,min:d,max:m,pattern:g,onChange:y})=>{const _=T=>{y(T.target.value)};return v.jsxs("label",{className:Q(Rt.input,"chat__startScreen__input"),htmlFor:r,children:[v.jsx("div",{className:Q(Rt.inputLabel),children:i}),v.jsx("input",{type:n,id:r,name:r,defaultValue:s,placeholder:u,required:c,multiple:h,min:d,max:m,pattern:g,onChange:_})]})},u3=({name:n,value:r,label:i,defaultChecked:s,required:u,onChange:c})=>{const h=`${n}-${r}`,d=m=>{c(m.target.value)};return v.jsxs("label",{className:Q(Rt.radio,"chat__startScreen__radio"),htmlFor:h,children:[v.jsx("input",{id:h,type:"radio",name:n,value:r,defaultChecked:s,required:u,onChange:d}),v.jsx("span",{className:Q(Rt.label),children:i})]})},c3=({name:n,label:r,defaultValue:i,required:s,multiple:u,options:c,onChange:h})=>{const d=m=>{h(m.target.value)};return v.jsxs("label",{className:Q(Rt.select,"chat__startScreen__select"),htmlFor:n,children:[v.jsx("div",{className:Q(Rt.selectLabel),children:r}),v.jsx("div",{className:Q(Rt.selectWrapper),children:v.jsx("select",{id:n,name:n,defaultValue:i,required:s,multiple:u,onChange:d,children:Object.entries(c||{}).map(([m,g])=>v.jsx("option",{value:m,selected:g===i,children:g}))})})]})},f3="start-screen.intro",h3="start-screen.start-chat",d3="start-screen.footnote",Un="start-screen.form",Pv=`${Un}.fields`,m3=()=>{const n=tt(),r=ka(),[i,s]=H.useState({}),u=()=>{const _=Object.entries(i).reduce((T,[L,N])=>({...T,[L]:N.value}),{});r(cO(_))},c=n(f3),h=n(h3),d=n(d3),m=H.useMemo(()=>n(Pv)?.split(";").map(_=>_.trim())??[],[n(Pv)]);H.useEffect(()=>{m.length&&Object.keys(i).length===0&&s(m.reduce((_,T)=>({..._,[T]:p3(T,n)}),{}))},[n,m,i]);const g=_=>{_.preventDefault(),u()},y=_=>T=>{s(L=>({...L,[_]:{...L[_],value:T}}))};return v.jsxs("form",{onSubmit:g,className:Q(Rt.container,d&&Rt.containerWithFootnote,"chat__startScreen"),children:[v.jsxs("div",{className:Q(Rt.body,"chat__startScreen__body"),children:[c&&v.jsx("div",{className:Q(Rt.intro,"chat__startScreen__intro"),children:v.jsx(xr,{options:{overrides:{a:Vv}},children:c})}),v.jsx("div",{className:Q(Rt.formFields,"chat__startScreen__fields"),children:Object.values(i).map(({type:_,name:T,label:L,placeholder:N,defaultValue:V,options:G,required:E,multiple:w,min:S,max:I,pattern:x})=>v.jsx("div",{className:Q(Rt.formField,"chat__startScreen__field"),children:(()=>{switch(_){case"radio":return v.jsxs(v.Fragment,{children:[v.jsx("div",{children:L}),Object.entries(G||{}).map(([Z,$])=>v.jsx(u3,{name:T,value:Z,label:$,defaultChecked:Z===V,required:E,onChange:y(T)},Z))]});case"checkbox":return v.jsx(l3,{name:T,label:L,defaultValue:V,required:E,onChange:y(T)});case"select":return v.jsx(c3,{name:T,label:L,defaultValue:V,required:E,multiple:w,options:G,onChange:y(T)});default:return v.jsx(o3,{type:_,name:T,label:L,placeholder:N,defaultValue:V,required:E,multiple:w,min:S,max:I,pattern:x,onChange:y(T)})}})()},T))})]}),v.jsxs("div",{className:Q(Rt.footer,"chat__startScreen__footer"),children:[v.jsx(nu,{type:"submit",className:Rt.startChatButton,children:h}),d&&v.jsx("div",{className:Rt.footnote,children:v.jsx(xr,{options:{overrides:{a:Vv}},children:d})})]})]})},Vv=({title:n,href:r,children:i})=>v.jsx("a",{href:r,title:n,target:"_blank",rel:"noopener noreferrer",children:i}),p3=(n,r)=>{const i=r(`${Un}.${n}.type`)||"text",s=r(`${Un}.${n}.required`)==="true",u=r(`${Un}.${n}.multiple`)==="true",c=r(`${Un}.${n}.placeholder`),h=r(`${Un}.${n}.label`)||"",d=r(`${Un}.${n}.defaultValue`),m=r(`${Un}.${n}.min`),g=r(`${Un}.${n}.max`),y=r(`${Un}.${n}.pattern`),_=y3(r(`${Un}.${n}.options`));return{name:n,label:h,placeholder:c,value:g3(i,d,_)||"",defaultValue:d,options:_,type:i,required:s,multiple:u,min:m,max:g,pattern:y}},g3=(n,r,i)=>r||n==="select"&&Object.keys(i)[0]||"",y3=(n="")=>n.split(";").map(r=>r.trim()).reduce((r,i)=>{const[s,u]=i.split(":").map(c=>c.trim());return{...r,[s]:u}},{}),v3=()=>{const n=su();H.useEffect(()=>{window.document.documentElement.lang=n.locale},[n.locale])},Oi={TRIGGER_ACTION:"TRIGGER_ACTION",TRIGGER_STORY:"TRIGGER_STORY",CHAT_MESSAGE_FROM_GUEST:"CHAT_MESSAGE_FROM_GUEST",ON_CHAT_WINDOW_OPEN:"ON_CHAT_WINDOW_OPEN",ON_CHAT_WINDOW_CLOSE:"ON_CHAT_WINDOW_CLOSE",RESTART_CHAT:"RESTART_CHAT"},b3=({clientName:n})=>{v3();const r=ka(),i=Zt(y=>y.intl.messages),s=tt(),u=Zt(y=>y.settings.enableStartScreen),c=Zt(y=>y.startScreen.startScreenStatus),[h,d]=H.useState(void 0);H.useEffect(()=>{const y=lu.parse(window.location.search);y.cssClassName&&d(y.cssClassName);const _=T=>{switch(T.data.type){case Oi.TRIGGER_ACTION:r(T.data.action);break;case Oi.TRIGGER_STORY:r(cb(T.data.story));break;case Oi.ON_CHAT_WINDOW_OPEN:r({type:"webclient.chatwindow.opened"});break;case Oi.ON_CHAT_WINDOW_CLOSE:r({type:"webclient.chatwindow.closed"});break;case Oi.CHAT_MESSAGE_FROM_GUEST:r(ib(T.data.text));break;case Oi.RESTART_CHAT:r(mu(n,y));break}};return r(yO(n,y)),window.addEventListener("message",T=>_(T),!1),()=>window.removeEventListener("message",_)},[n,r]),H.useEffect(()=>{const y=s("page.title");y&&document&&(document.title=y)},[i,s]);const m=u===void 0,g=u===!1||c==="HIDDEN";return v.jsx("div",{className:Q(Lv.chatwindow,g&&Lv.chatwindowWithAside,"chat__chatwindow",h),children:m?null:g?v.jsxs(v.Fragment,{children:[v.jsx("header",{children:v.jsx(Bv,{chatStarted:!0})}),v.jsx("main",{children:v.jsx(O6,{clientName:n})}),v.jsx("aside",{children:v.jsx(PN,{})})]}):v.jsxs(v.Fragment,{children:[v.jsx("header",{children:v.jsx(Bv,{chatStarted:!1})}),v.jsx("main",{children:v.jsx(m3,{})})]})})},_3=()=>{const n=Vd(),r=Qb(),i=Zt(u=>u.intl.locale),s=Zt(u=>u.intl.messages);return v.jsx(TA,{locale:i,messages:s,onError:()=>{},children:v.jsx("div",{className:Q([xA.app,r?"chat__small":"chat__large"]),children:v.jsx(b3,{clientName:n})})})};var vh,Yv;function Yd(){if(Yv)return vh;Yv=1;function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}return vh=n,vh}var bh,Xv;function E3(){if(Xv)return bh;Xv=1;var n=typeof yo=="object"&&yo&&yo.Object===Object&&yo;return bh=n,bh}var _h,Zv;function t_(){if(Zv)return _h;Zv=1;var n=E3(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();return _h=i,_h}var Eh,Qv;function S3(){if(Qv)return Eh;Qv=1;var n=t_(),r=function(){return n.Date.now()};return Eh=r,Eh}var Sh,Kv;function T3(){if(Kv)return Sh;Kv=1;var n=/\s/;function r(i){for(var s=i.length;s--&&n.test(i.charAt(s)););return s}return Sh=r,Sh}var Th,$v;function A3(){if($v)return Th;$v=1;var n=T3(),r=/^\s+/;function i(s){return s&&s.slice(0,n(s)+1).replace(r,"")}return Th=i,Th}var Ah,Wv;function n_(){if(Wv)return Ah;Wv=1;var n=t_(),r=n.Symbol;return Ah=r,Ah}var xh,Jv;function x3(){if(Jv)return xh;Jv=1;var n=n_(),r=Object.prototype,i=r.hasOwnProperty,s=r.toString,u=n?n.toStringTag:void 0;function c(h){var d=i.call(h,u),m=h[u];try{h[u]=void 0;var g=!0}catch{}var y=s.call(h);return g&&(d?h[u]=m:delete h[u]),y}return xh=c,xh}var Oh,e1;function O3(){if(e1)return Oh;e1=1;var n=Object.prototype,r=n.toString;function i(s){return r.call(s)}return Oh=i,Oh}var Rh,t1;function R3(){if(t1)return Rh;t1=1;var n=n_(),r=x3(),i=O3(),s="[object Null]",u="[object Undefined]",c=n?n.toStringTag:void 0;function h(d){return d==null?d===void 0?u:s:c&&c in Object(d)?r(d):i(d)}return Rh=h,Rh}var wh,n1;function w3(){if(n1)return wh;n1=1;function n(r){return r!=null&&typeof r=="object"}return wh=n,wh}var Ch,r1;function C3(){if(r1)return Ch;r1=1;var n=R3(),r=w3(),i="[object Symbol]";function s(u){return typeof u=="symbol"||r(u)&&n(u)==i}return Ch=s,Ch}var Nh,a1;function N3(){if(a1)return Nh;a1=1;var n=A3(),r=Yd(),i=C3(),s=NaN,u=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,h=/^0o[0-7]+$/i,d=parseInt;function m(g){if(typeof g=="number")return g;if(i(g))return s;if(r(g)){var y=typeof g.valueOf=="function"?g.valueOf():g;g=r(y)?y+"":y}if(typeof g!="string")return g===0?g:+g;g=n(g);var _=c.test(g);return _||h.test(g)?d(g.slice(2),_?2:8):u.test(g)?s:+g}return Nh=m,Nh}var Mh,i1;function M3(){if(i1)return Mh;i1=1;var n=Yd(),r=S3(),i=N3(),s="Expected a function",u=Math.max,c=Math.min;function h(d,m,g){var y,_,T,L,N,V,G=0,E=!1,w=!1,S=!0;if(typeof d!="function")throw new TypeError(s);m=i(m)||0,n(g)&&(E=!!g.leading,w="maxWait"in g,T=w?u(i(g.maxWait)||0,m):T,S="trailing"in g?!!g.trailing:S);function I(ce){var Ve=y,ve=_;return y=_=void 0,G=ce,L=d.apply(ve,Ve),L}function x(ce){return G=ce,N=setTimeout(ie,m),E?I(ce):L}function Z(ce){var Ve=ce-V,ve=ce-G,z=m-Ve;return w?c(z,T-ve):z}function $(ce){var Ve=ce-V,ve=ce-G;return V===void 0||Ve>=m||Ve<0||w&&ve>=T}function ie(){var ce=r();if($(ce))return _e(ce);N=setTimeout(ie,Z(ce))}function _e(ce){return N=void 0,S&&y?I(ce):(y=_=void 0,L)}function Re(){N!==void 0&&clearTimeout(N),G=0,y=V=_=N=void 0}function se(){return N===void 0?L:_e(r())}function me(){var ce=r(),Ve=$(ce);if(y=arguments,_=this,V=ce,Ve){if(N===void 0)return x(V);if(w)return clearTimeout(N),N=setTimeout(ie,m),I(V)}return N===void 0&&(N=setTimeout(ie,m)),L}return me.cancel=Re,me.flush=se,me}return Mh=h,Mh}var Dh,s1;function D3(){if(s1)return Dh;s1=1;var n=M3(),r=Yd(),i="Expected a function";function s(u,c,h){var d=!0,m=!0;if(typeof u!="function")throw new TypeError(i);return r(h)&&(d="leading"in h?!!h.leading:d,m="trailing"in h?!!h.trailing:m),n(u,c,{leading:d,maxWait:c,trailing:m})}return Dh=s,Dh}var B3=D3();const L3=md(B3);function U3(n){return n&&n.constructor&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)}function H3(n){return n}function j3(n,r){r=r||{};const i=r.delimiter||".",s=r.maxDepth,u=r.transformKey||H3,c={};function h(d,m,g){g=g||1,Object.keys(d).forEach(function(y){const _=d[y],T=r.safe&&Array.isArray(_),L=Object.prototype.toString.call(_),N=U3(_),V=L==="[object Object]"||L==="[object Array]",G=m?m+i+u(y):u(y);if(!T&&!N&&V&&Object.keys(_).length&&(!r.maxDepth||g<s))return h(_,G,g+1);c[G]=_})}return h(n),c}const r_={"page.title":"Bubble Chat Chatbot","message-input-label":"Benutzereingabe","message-input-placeholder":"Nachricht","message-input.actions.submit.label":"Nachricht senden","message-input.actions.start-audio-recording.label":"Spracheingabe starten","message-input.actions.stop-audio-recording.label":"Spracheingabe stoppen","message-input.actions.submit-audio-recording.label":"Spracheingabe übermitteln","guest-bubble.label":"Ihre Nachricht","bot-bubble.label":"Nachricht des Chatbots","bot-bubble.reaction.good":"Gefällt mir","bot-bubble.reaction.bad":"Gefällt mir nicht","bot-bubble.reaction.remove":"Markierung entfernen","bot-bubble.copy":"Kopieren","bot-bubble.sources":"Quellenliste","bot-bubble.source.open":"Quelle öffnen","agent-bubble.label":"Nachricht des Live-Agenten","export-transcript.email.title":"Chatverlauf per E-Mail versenden","export-transcript.email.description":"Bitte E-Mail-Adresse angeben, an die der Chatverlauf gesendet werden soll.","export-transcript.email.cancel":"Abbrechen","export-transcript.email.send":"Senden","export-transcript.email.placeholder":"E-Mail-Adresse","export-transcript.email.invalid":"Bitte gültige E-Mail-Adresse eingeben.","export-transcript.email.success":"Der Chatverlauf wurde an die hinterlegte E-Mail-Adresse übermittelt.","general-conditions.header":"**Nutzungsbedingungen**","general-conditions.body":`Bitte berücksichtigen Sie die folgenden Punkte:
112
112
 
@@ -121,4 +121,4 @@ For more details see https://formatjs.github.io/docs/getting-started/message-dis
121
121
 
122
122
  - La cronologia delle chat è memorizzata nell'area UE e può essere visualizzata solo da persone autorizzate.
123
123
  - Non inserire dati personali nella finestra di chat (password, data di nascita, ecc.).`,"general-conditions.accept-conditions-note":"Utilizzando la chat si accettano le condizioni d'uso.","block-user-input.title":"Attendere la risposta del chatbot.","conversation-rating.call-to-action.title":"Valuta questa chat","conversation-rating.overlay.title":"Quanto sei soddisfatto di questa chat?","conversation-rating.overlay.guest-feedback.input-placeholder":"Inserisci qui il tuo feedback (opzionale)","conversation-rating.overlay.star.very-bad":"Molto male","conversation-rating.overlay.star.very-good":"Molto buono","conversation-rating.overlay.bot-message.rate-feedback.value-1":"Oh, non suona bene. Vi prego di darmi un feedback in modo che possa imparare di più.","conversation-rating.overlay.bot-message.rate-feedback.value-2":"Oh, non suona bene. Vi prego di darmi un feedback in modo che possa imparare di più.","conversation-rating.overlay.bot-message.rate-feedback.value-3":"La media non è il mio obiettivo, cosa posso ancora migliorare?","conversation-rating.overlay.bot-message.rate-feedback.value-4":"Anche l'assenza è finita. Cosa posso migliorare per ottenere tutte le stelle la prossima volta?","conversation-rating.overlay.bot-message.rate-feedback.value-5":"Perfetto! Allora spero di potervi consigliare ancora una volta bene.","conversation-rating.overlay.bot-message.submit-feedback":"Grazie mille per il feedback. Mi impegno costantemente per migliorare.","conversation-rating.overlay.action.submit":"Invia","conversation-rating.overlay.action.close":"Chiudere","start-screen.intro":"","start-screen.start-chat":"Avviare la chat","header.close-chat":"Minimizzare la chat","header.menu.title":"Menu","header.menu.restart-chat":"Riavviare la chat","header.menu.expand-chat-window":"Espandere la finestra","header.menu.download-transcript":"Scaricare la trascrizione","header.menu.send-transcript":"Inviare la trascrizione","header.menu.export-transcript":"Esportare la trascrizione","source-infos.close":"Chiudere","source-infos.open-source":"Fonte aperta","source-infos.error.title":"Errore","source-infos.error.info":"Ops! Qualcosa è andato storto. Riprovare o contattare l'assistenza se il problema persiste.","source-infos.highlight-loading.title":"Il contenuto rilevante è evidenziato...","source-infos.highlight-loading.description":"Un momento - la fonte è in fase di analisi","commands.show-more.action":"Di più","commands.show-more.tooltip":"Mostra più comandi","commands.show-less.action":"Meno","commands.show-less.tooltip":"Mostra meno comandi"},k3=["de","en","fr","it"],a_={locale:"de",messages:r_},q3=(n,r)=>{if(k3.includes(n)){const i=F3(n),s=j3(r);return{...i,...s}}return r},F3=n=>{switch(n.toString()){case"en":return I3;case"fr":return z3;case"it":return G3;default:return r_}},P3=(n=V3,r)=>{switch(r.type){case jd:return Object.assign({},n,{connectionState:ja.CONNECTING});case Id:return Object.assign({},n,{connectionState:ja.CONNECTED});case zd:return Object.assign({},n,{connectionState:ja.DISCONNECTED});case Gd:return Object.assign({},n,{connectionState:ja.RECONNECTED});case kd:return Object.assign({},n,{sessionId:r.sessionId});case hu:return Object.assign({},n,{sessionId:r.payload.sessionId,userId:r.payload.userId});case du:return Object.assign({},n,{sessionId:void 0});default:return n}},V3={connectionState:ja.DISCONNECTED,sessionId:void 0,userId:void 0},Y3=(n=o1,r)=>{switch(r.type){case Ob:return o1;case hu:return La({type:"webclient.chat.started"}),n;case du:return La({type:"webclient.chat.ended"}),n;case Oe.ActionTypes.TYPING_ON:return Object.assign({},n,{isBotTyping:!0});case Oe.ActionTypes.TYPING_OFF:return Object.assign({},n,{isBotTyping:!1});case Oe.ActionTypes.MESSAGE_FROM_GUEST:case Oe.ActionTypes.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST:return l1(n,r.message);case Oe.ActionTypes.MESSAGE_TO_GUEST:{La(r);const i=Object.assign({},r.message,{_id:r.meta.actionId}),s=n.messages.filter(u=>u._id===r.meta.actionId).length>0;return Object.assign({},n,{isBotTyping:!1,messages:s?n.messages:n.messages.concat([i]),quickReplies:i.quickReplies?i.quickReplies:[]})}case xd:{const i=r.messages,s=i.length?i[i.length-1]:void 0;return Object.assign({},n,{isBotTyping:!1,messages:i,quickReplies:s?.quickReplies||[]})}case Ad:return La(r.message),n;case Oe.ActionTypes.EVENT_TO_GUEST:return La(r.event),n;case Oe.ActionTypes.DRAWER_OPEN:return Object.assign({},n,{drawerContentUrl:r.payload.parameters.contentUrl});case Oe.ActionTypes.DRAWER_CLOSE:return Object.assign({},n,{drawerContentUrl:void 0});case Oe.ActionTypes.GUEST_LOCALE_CHANGED:return Object.assign({},n,{locale:r.payload.locale});case lb:return La(r),n;case ob:return La(r),n;case Rd:{const i=new Oe.TextMessage(r.transcription,new Oe.GuestUser),s=Object.assign({},i,{_id:$h()});return l1(n,s)}case Oe.ActionTypes.TRANSCRIPT_ITEM_GUEST_REACTION:{const i=n.messages.map(s=>s._id===r.payload.actionId?Object.assign({},s,{reaction:r.payload.reaction}):s);return Object.assign({},n,{messages:i})}case wd:{const i={enabled:!0,rating:r.payload.rating};return Object.assign({},n,{conversationRating:i})}case Oe.ActionTypes.CONVERSATION_RATING_FROM_GUEST:{const i={...n.conversationRating,rating:r.payload};return Object.assign({},n,{conversationRating:i})}case Nd:return{...n,sourceInfos:{type:"loading",chunkId:r.payload.chunkId}};case Cd:{const{highlighted:i}=r.payload;return n.sourceInfos?.type==="loaded"&&i?{...n,sourceInfos:{...n.sourceInfos,highlighted:!0}}:{...n,sourceInfos:{type:"loading-error"}}}case sb:{const i=n.sourceInfos?.type,{chunkId:s,knowledgeBaseType:u,title:c,content:h,highlighted:d,url:m}=r.payload,g=n.sourceInfos?.type==="loading"||n.sourceInfos?.type==="loaded"?n.sourceInfos?.chunkId:void 0;return g&&g!==s?n:i==="loading"||i==="loaded"&&d?{...n,sourceInfos:{type:"loaded",chunkId:s,knowledgeBaseType:u,title:c,content:h,highlighted:d,url:m}}:n}case Md:return{...n,sourceInfos:void 0};case Rb:return{...n,showTranscriptMailOverlay:!n.showTranscriptMailOverlay};default:return n}},l1=(n,r)=>{const i=n.messages[n.messages.length-1],s=i?.text===r.text;return i&&i.sender.type===r.sender.type&&s?n:Object.assign({},n,{messages:n.messages.concat([r]),quickReplies:[]})},La=n=>{X3()?window.top?.postMessage(n,"*"):n.type==="webclient.change.url"&&window.open(n.url)},X3=()=>typeof window<"u"&&window.self!==window.top,o1={messages:[],quickReplies:[],isBotTyping:!1,showTranscriptMailOverlay:!1,conversationRating:{enabled:!1}},i_=Ud({name:"intl",initialState:a_,reducers:{updateIntl:(n,r)=>{n.locale=r.payload.language,n.messages=r.payload.messages}}}),{updateIntl:Z3}=i_.actions,Q3=i_.reducer,K3={version:void 0,enableStartScreen:void 0,enableStandaloneView:!1,enableTranscriptExportEmail:!1,enableTranscriptExportPdf:!1,enableGeneralConditions:!1,enableSpeechSupport:!1,commands:[],menuItems:[]},s_=Ud({name:"settings",initialState:K3,reducers:{setSettings(n,r){n.version&&n.version!==r.payload.version?(console.log("version changed, reloading chat window"),location.replace(location.href)):(n.version=r.payload.version,n.enableStartScreen=r.payload.enableStartScreen,n.enableStandaloneView=r.payload.enableStandaloneView,n.enableTranscriptExportEmail=r.payload.enableTranscriptExportEmail,n.enableTranscriptExportPdf=r.payload.enableTranscriptExportPdf,n.enableGeneralConditions=r.payload.enableGeneralConditions,n.enableSpeechSupport=r.payload.enableSpeechSupport,n.commands=r.payload.commands,n.menuItems=r.payload.menuItems||[])}}}),{setSettings:$3}=s_.actions,W3=s_.reducer,J3=mb({settings:W3,chat:Y3,startScreen:hO,connection:P3,intl:Q3}),eM="bubble-chat",l_="state-last-saved-at",o_="state",tM=n=>{try{if(!aM())return;const r=u1(n,l_);if(rM(r))return;{const i=u1(n,o_);return i===null?void 0:JSON.parse(i)}}catch(r){console.error(r);return}},nM=(n,r)=>{try{const i=JSON.stringify(r);c1(n,o_,i);const s=new Date().toISOString();c1(n,l_,s)}catch(i){console.error(i)}},rM=n=>{if(n===null)return!1;const r=new Date(n);return r.setHours(r.getHours()+12),new Date>r},aM=()=>typeof localStorage<"u",u1=(n,r)=>{const i=u_(n,r);return localStorage.getItem(i)},c1=(n,r,i)=>{const s=u_(n,r);return localStorage.setItem(s,i)},u_=(n,r)=>`${eM}-${n}-${r}`,er=Object.create(null);er.open="0";er.close="1";er.ping="2";er.pong="3";er.message="4";er.upgrade="5";er.noop="6";const Vo=Object.create(null);Object.keys(er).forEach(n=>{Vo[er[n]]=n});const ld={type:"error",data:"parser error"},c_=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",f_=typeof ArrayBuffer=="function",h_=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,Xd=({type:n,data:r},i,s)=>c_&&r instanceof Blob?i?s(r):f1(r,s):f_&&(r instanceof ArrayBuffer||h_(r))?i?s(r):f1(new Blob([r]),s):s(er[n]+(r||"")),f1=(n,r)=>{const i=new FileReader;return i.onload=function(){const s=i.result.split(",")[1];r("b"+(s||""))},i.readAsDataURL(n)};function h1(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let Bh;function iM(n,r){if(c_&&n.data instanceof Blob)return n.data.arrayBuffer().then(h1).then(r);if(f_&&(n.data instanceof ArrayBuffer||h_(n.data)))return r(h1(n.data));Xd(n,!1,i=>{Bh||(Bh=new TextEncoder),r(Bh.encode(i))})}const d1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Qs=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n<d1.length;n++)Qs[d1.charCodeAt(n)]=n;const sM=n=>{let r=n.length*.75,i=n.length,s,u=0,c,h,d,m;n[n.length-1]==="="&&(r--,n[n.length-2]==="="&&r--);const g=new ArrayBuffer(r),y=new Uint8Array(g);for(s=0;s<i;s+=4)c=Qs[n.charCodeAt(s)],h=Qs[n.charCodeAt(s+1)],d=Qs[n.charCodeAt(s+2)],m=Qs[n.charCodeAt(s+3)],y[u++]=c<<2|h>>4,y[u++]=(h&15)<<4|d>>2,y[u++]=(d&3)<<6|m&63;return g},lM=typeof ArrayBuffer=="function",Zd=(n,r)=>{if(typeof n!="string")return{type:"message",data:d_(n,r)};const i=n.charAt(0);return i==="b"?{type:"message",data:oM(n.substring(1),r)}:Vo[i]?n.length>1?{type:Vo[i],data:n.substring(1)}:{type:Vo[i]}:ld},oM=(n,r)=>{if(lM){const i=sM(n);return d_(i,r)}else return{base64:!0,data:n}},d_=(n,r)=>{switch(r){case"blob":return n instanceof Blob?n:new Blob([n]);case"arraybuffer":default:return n instanceof ArrayBuffer?n:n.buffer}},m_="",uM=(n,r)=>{const i=n.length,s=new Array(i);let u=0;n.forEach((c,h)=>{Xd(c,!1,d=>{s[h]=d,++u===i&&r(s.join(m_))})})},cM=(n,r)=>{const i=n.split(m_),s=[];for(let u=0;u<i.length;u++){const c=Zd(i[u],r);if(s.push(c),c.type==="error")break}return s};function fM(){return new TransformStream({transform(n,r){iM(n,i=>{const s=i.length;let u;if(s<126)u=new Uint8Array(1),new DataView(u.buffer).setUint8(0,s);else if(s<65536){u=new Uint8Array(3);const c=new DataView(u.buffer);c.setUint8(0,126),c.setUint16(1,s)}else{u=new Uint8Array(9);const c=new DataView(u.buffer);c.setUint8(0,127),c.setBigUint64(1,BigInt(s))}n.data&&typeof n.data!="string"&&(u[0]|=128),r.enqueue(u),r.enqueue(i)})}})}let Lh;function Go(n){return n.reduce((r,i)=>r+i.length,0)}function ko(n,r){if(n[0].length===r)return n.shift();const i=new Uint8Array(r);let s=0;for(let u=0;u<r;u++)i[u]=n[0][s++],s===n[0].length&&(n.shift(),s=0);return n.length&&s<n[0].length&&(n[0]=n[0].slice(s)),i}function hM(n,r){Lh||(Lh=new TextDecoder);const i=[];let s=0,u=-1,c=!1;return new TransformStream({transform(h,d){for(i.push(h);;){if(s===0){if(Go(i)<1)break;const m=ko(i,1);c=(m[0]&128)===128,u=m[0]&127,u<126?s=3:u===126?s=1:s=2}else if(s===1){if(Go(i)<2)break;const m=ko(i,2);u=new DataView(m.buffer,m.byteOffset,m.length).getUint16(0),s=3}else if(s===2){if(Go(i)<8)break;const m=ko(i,8),g=new DataView(m.buffer,m.byteOffset,m.length),y=g.getUint32(0);if(y>Math.pow(2,21)-1){d.enqueue(ld);break}u=y*Math.pow(2,32)+g.getUint32(4),s=3}else{if(Go(i)<u)break;const m=ko(i,u);d.enqueue(Zd(c?m:Lh.decode(m),r)),s=0}if(u===0||u>n){d.enqueue(ld);break}}}})}const p_=4;function ct(n){if(n)return dM(n)}function dM(n){for(var r in ct.prototype)n[r]=ct.prototype[r];return n}ct.prototype.on=ct.prototype.addEventListener=function(n,r){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(r),this};ct.prototype.once=function(n,r){function i(){this.off(n,i),r.apply(this,arguments)}return i.fn=r,this.on(n,i),this};ct.prototype.off=ct.prototype.removeListener=ct.prototype.removeAllListeners=ct.prototype.removeEventListener=function(n,r){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var i=this._callbacks["$"+n];if(!i)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var s,u=0;u<i.length;u++)if(s=i[u],s===r||s.fn===r){i.splice(u,1);break}return i.length===0&&delete this._callbacks["$"+n],this};ct.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var r=new Array(arguments.length-1),i=this._callbacks["$"+n],s=1;s<arguments.length;s++)r[s-1]=arguments[s];if(i){i=i.slice(0);for(var s=0,u=i.length;s<u;++s)i[s].apply(this,r)}return this};ct.prototype.emitReserved=ct.prototype.emit;ct.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};ct.prototype.hasListeners=function(n){return!!this.listeners(n).length};const yu=typeof Promise=="function"&&typeof Promise.resolve=="function"?r=>Promise.resolve().then(r):(r,i)=>i(r,0),En=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),mM="arraybuffer";function g_(n,...r){return r.reduce((i,s)=>(n.hasOwnProperty(s)&&(i[s]=n[s]),i),{})}const pM=En.setTimeout,gM=En.clearTimeout;function vu(n,r){r.useNativeTimers?(n.setTimeoutFn=pM.bind(En),n.clearTimeoutFn=gM.bind(En)):(n.setTimeoutFn=En.setTimeout.bind(En),n.clearTimeoutFn=En.clearTimeout.bind(En))}const yM=1.33;function vM(n){return typeof n=="string"?bM(n):Math.ceil((n.byteLength||n.size)*yM)}function bM(n){let r=0,i=0;for(let s=0,u=n.length;s<u;s++)r=n.charCodeAt(s),r<128?i+=1:r<2048?i+=2:r<55296||r>=57344?i+=3:(s++,i+=4);return i}function y_(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function _M(n){let r="";for(let i in n)n.hasOwnProperty(i)&&(r.length&&(r+="&"),r+=encodeURIComponent(i)+"="+encodeURIComponent(n[i]));return r}function EM(n){let r={},i=n.split("&");for(let s=0,u=i.length;s<u;s++){let c=i[s].split("=");r[decodeURIComponent(c[0])]=decodeURIComponent(c[1])}return r}class SM extends Error{constructor(r,i,s){super(r),this.description=i,this.context=s,this.type="TransportError"}}class Qd extends ct{constructor(r){super(),this.writable=!1,vu(this,r),this.opts=r,this.query=r.query,this.socket=r.socket,this.supportsBinary=!r.forceBase64}onError(r,i,s){return super.emitReserved("error",new SM(r,i,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(r){this.readyState==="open"&&this.write(r)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(r){const i=Zd(r,this.socket.binaryType);this.onPacket(i)}onPacket(r){super.emitReserved("packet",r)}onClose(r){this.readyState="closed",super.emitReserved("close",r)}pause(r){}createUri(r,i={}){return r+"://"+this._hostname()+this._port()+this.opts.path+this._query(i)}_hostname(){const r=this.opts.hostname;return r.indexOf(":")===-1?r:"["+r+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(r){const i=_M(r);return i.length?"?"+i:""}}class TM extends Qd{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(r){this.readyState="pausing";const i=()=>{this.readyState="paused",r()};if(this._polling||!this.writable){let s=0;this._polling&&(s++,this.once("pollComplete",function(){--s||i()})),this.writable||(s++,this.once("drain",function(){--s||i()}))}else i()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(r){const i=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};cM(r,this.socket.binaryType).forEach(i),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const r=()=>{this.write([{type:"close"}])};this.readyState==="open"?r():this.once("open",r)}write(r){this.writable=!1,uM(r,i=>{this.doWrite(i,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const r=this.opts.secure?"https":"http",i=this.query||{};return this.opts.timestampRequests!==!1&&(i[this.opts.timestampParam]=y_()),!this.supportsBinary&&!i.sid&&(i.b64=1),this.createUri(r,i)}}let v_=!1;try{v_=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const AM=v_;function xM(){}class OM extends TM{constructor(r){if(super(r),typeof location<"u"){const i=location.protocol==="https:";let s=location.port;s||(s=i?"443":"80"),this.xd=typeof location<"u"&&r.hostname!==location.hostname||s!==r.port}}doWrite(r,i){const s=this.request({method:"POST",data:r});s.on("success",i),s.on("error",(u,c)=>{this.onError("xhr post error",u,c)})}doPoll(){const r=this.request();r.on("data",this.onData.bind(this)),r.on("error",(i,s)=>{this.onError("xhr poll error",i,s)}),this.pollXhr=r}}class Wn extends ct{constructor(r,i,s){super(),this.createRequest=r,vu(this,s),this._opts=s,this._method=s.method||"GET",this._uri=i,this._data=s.data!==void 0?s.data:null,this._create()}_create(){var r;const i=g_(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");i.xdomain=!!this._opts.xd;const s=this._xhr=this.createRequest(i);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let u in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(u)&&s.setRequestHeader(u,this._opts.extraHeaders[u])}}catch{}if(this._method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(r=this._opts.cookieJar)===null||r===void 0||r.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var u;s.readyState===3&&((u=this._opts.cookieJar)===null||u===void 0||u.parseCookies(s.getResponseHeader("set-cookie"))),s.readyState===4&&(s.status===200||s.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof s.status=="number"?s.status:0)},0))},s.send(this._data)}catch(u){this.setTimeoutFn(()=>{this._onError(u)},0);return}typeof document<"u"&&(this._index=Wn.requestsCount++,Wn.requests[this._index]=this)}_onError(r){this.emitReserved("error",r,this._xhr),this._cleanup(!0)}_cleanup(r){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=xM,r)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Wn.requests[this._index],this._xhr=null}}_onLoad(){const r=this._xhr.responseText;r!==null&&(this.emitReserved("data",r),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Wn.requestsCount=0;Wn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",m1);else if(typeof addEventListener=="function"){const n="onpagehide"in En?"pagehide":"unload";addEventListener(n,m1,!1)}}function m1(){for(let n in Wn.requests)Wn.requests.hasOwnProperty(n)&&Wn.requests[n].abort()}const RM=function(){const n=b_({xdomain:!1});return n&&n.responseType!==null}();class wM extends OM{constructor(r){super(r);const i=r&&r.forceBase64;this.supportsBinary=RM&&!i}request(r={}){return Object.assign(r,{xd:this.xd},this.opts),new Wn(b_,this.uri(),r)}}function b_(n){const r=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!r||AM))return new XMLHttpRequest}catch{}if(!r)try{return new En[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const __=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class CM extends Qd{get name(){return"websocket"}doOpen(){const r=this.uri(),i=this.opts.protocols,s=__?{}:g_(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(r,i,s)}catch(u){return this.emitReserved("error",u)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=r=>this.onClose({description:"websocket connection closed",context:r}),this.ws.onmessage=r=>this.onData(r.data),this.ws.onerror=r=>this.onError("websocket error",r)}write(r){this.writable=!1;for(let i=0;i<r.length;i++){const s=r[i],u=i===r.length-1;Xd(s,this.supportsBinary,c=>{try{this.doWrite(s,c)}catch{}u&&yu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const r=this.opts.secure?"wss":"ws",i=this.query||{};return this.opts.timestampRequests&&(i[this.opts.timestampParam]=y_()),this.supportsBinary||(i.b64=1),this.createUri(r,i)}}const Uh=En.WebSocket||En.MozWebSocket;class NM extends CM{createSocket(r,i,s){return __?new Uh(r,i,s):i?new Uh(r,i):new Uh(r)}doWrite(r,i){this.ws.send(i)}}class MM extends Qd{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(r){return this.emitReserved("error",r)}this._transport.closed.then(()=>{this.onClose()}).catch(r=>{this.onError("webtransport error",r)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(r=>{const i=hM(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=r.readable.pipeThrough(i).getReader(),u=fM();u.readable.pipeTo(r.writable),this._writer=u.writable.getWriter();const c=()=>{s.read().then(({done:d,value:m})=>{d||(this.onPacket(m),c())}).catch(d=>{})};c();const h={type:"open"};this.query.sid&&(h.data=`{"sid":"${this.query.sid}"}`),this._writer.write(h).then(()=>this.onOpen())})})}write(r){this.writable=!1;for(let i=0;i<r.length;i++){const s=r[i],u=i===r.length-1;this._writer.write(s).then(()=>{u&&yu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var r;(r=this._transport)===null||r===void 0||r.close()}}const DM={websocket:NM,webtransport:MM,polling:wM},BM=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,LM=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function od(n){if(n.length>8e3)throw"URI too long";const r=n,i=n.indexOf("["),s=n.indexOf("]");i!=-1&&s!=-1&&(n=n.substring(0,i)+n.substring(i,s).replace(/:/g,";")+n.substring(s,n.length));let u=BM.exec(n||""),c={},h=14;for(;h--;)c[LM[h]]=u[h]||"";return i!=-1&&s!=-1&&(c.source=r,c.host=c.host.substring(1,c.host.length-1).replace(/;/g,":"),c.authority=c.authority.replace("[","").replace("]","").replace(/;/g,":"),c.ipv6uri=!0),c.pathNames=UM(c,c.path),c.queryKey=HM(c,c.query),c}function UM(n,r){const i=/\/{2,9}/g,s=r.replace(i,"/").split("/");return(r.slice(0,1)=="/"||r.length===0)&&s.splice(0,1),r.slice(-1)=="/"&&s.splice(s.length-1,1),s}function HM(n,r){const i={};return r.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,u,c){u&&(i[u]=c)}),i}const ud=typeof addEventListener=="function"&&typeof removeEventListener=="function",Yo=[];ud&&addEventListener("offline",()=>{Yo.forEach(n=>n())},!1);class sa extends ct{constructor(r,i){if(super(),this.binaryType=mM,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,r&&typeof r=="object"&&(i=r,r=null),r){const s=od(r);i.hostname=s.host,i.secure=s.protocol==="https"||s.protocol==="wss",i.port=s.port,s.query&&(i.query=s.query)}else i.host&&(i.hostname=od(i.host).host);vu(this,i),this.secure=i.secure!=null?i.secure:typeof location<"u"&&location.protocol==="https:",i.hostname&&!i.port&&(i.port=this.secure?"443":"80"),this.hostname=i.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=i.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},i.transports.forEach(s=>{const u=s.prototype.name;this.transports.push(u),this._transportsByName[u]=s}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},i),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=EM(this.opts.query)),ud&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Yo.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(r){const i=Object.assign({},this.opts.query);i.EIO=p_,i.transport=r,this.id&&(i.sid=this.id);const s=Object.assign({},this.opts,{query:i,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[r]);return new this._transportsByName[r](s)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const r=this.opts.rememberUpgrade&&sa.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const i=this.createTransport(r);i.open(),this.setTransport(i)}setTransport(r){this.transport&&this.transport.removeAllListeners(),this.transport=r,r.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",i=>this._onClose("transport close",i))}onOpen(){this.readyState="open",sa.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",r),this.emitReserved("heartbeat"),r.type){case"open":this.onHandshake(JSON.parse(r.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const i=new Error("server error");i.code=r.data,this._onError(i);break;case"message":this.emitReserved("data",r.data),this.emitReserved("message",r.data);break}}onHandshake(r){this.emitReserved("handshake",r),this.id=r.sid,this.transport.query.sid=r.sid,this._pingInterval=r.pingInterval,this._pingTimeout=r.pingTimeout,this._maxPayload=r.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const r=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+r,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},r),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const r=this._getWritablePackets();this.transport.send(r),this._prevBufferLen=r.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let i=1;for(let s=0;s<this.writeBuffer.length;s++){const u=this.writeBuffer[s].data;if(u&&(i+=vM(u)),s>0&&i>this._maxPayload)return this.writeBuffer.slice(0,s);i+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const r=Date.now()>this._pingTimeoutTime;return r&&(this._pingTimeoutTime=0,yu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),r}write(r,i,s){return this._sendPacket("message",r,i,s),this}send(r,i,s){return this._sendPacket("message",r,i,s),this}_sendPacket(r,i,s,u){if(typeof i=="function"&&(u=i,i=void 0),typeof s=="function"&&(u=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const c={type:r,data:i,options:s};this.emitReserved("packetCreate",c),this.writeBuffer.push(c),u&&this.once("flush",u),this.flush()}close(){const r=()=>{this._onClose("forced close"),this.transport.close()},i=()=>{this.off("upgrade",i),this.off("upgradeError",i),r()},s=()=>{this.once("upgrade",i),this.once("upgradeError",i)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():r()}):this.upgrading?s():r()),this}_onError(r){if(sa.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",r),this._onClose("transport error",r)}_onClose(r,i){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),ud&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const s=Yo.indexOf(this._offlineEventListener);s!==-1&&Yo.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",r,i),this.writeBuffer=[],this._prevBufferLen=0}}}sa.protocol=p_;class jM extends sa{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let r=0;r<this._upgrades.length;r++)this._probe(this._upgrades[r])}_probe(r){let i=this.createTransport(r),s=!1;sa.priorWebsocketSuccess=!1;const u=()=>{s||(i.send([{type:"ping",data:"probe"}]),i.once("packet",_=>{if(!s)if(_.type==="pong"&&_.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",i),!i)return;sa.priorWebsocketSuccess=i.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(y(),this.setTransport(i),i.send([{type:"upgrade"}]),this.emitReserved("upgrade",i),i=null,this.upgrading=!1,this.flush())})}else{const T=new Error("probe error");T.transport=i.name,this.emitReserved("upgradeError",T)}}))};function c(){s||(s=!0,y(),i.close(),i=null)}const h=_=>{const T=new Error("probe error: "+_);T.transport=i.name,c(),this.emitReserved("upgradeError",T)};function d(){h("transport closed")}function m(){h("socket closed")}function g(_){i&&_.name!==i.name&&c()}const y=()=>{i.removeListener("open",u),i.removeListener("error",h),i.removeListener("close",d),this.off("close",m),this.off("upgrading",g)};i.once("open",u),i.once("error",h),i.once("close",d),this.once("close",m),this.once("upgrading",g),this._upgrades.indexOf("webtransport")!==-1&&r!=="webtransport"?this.setTimeoutFn(()=>{s||i.open()},200):i.open()}onHandshake(r){this._upgrades=this._filterUpgrades(r.upgrades),super.onHandshake(r)}_filterUpgrades(r){const i=[];for(let s=0;s<r.length;s++)~this.transports.indexOf(r[s])&&i.push(r[s]);return i}}let IM=class extends jM{constructor(r,i={}){const s=typeof r=="object"?r:i;(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(u=>DM[u]).filter(u=>!!u)),super(r,s)}};function zM(n,r="",i){let s=n;i=i||typeof location<"u"&&location,n==null&&(n=i.protocol+"//"+i.host),typeof n=="string"&&(n.charAt(0)==="/"&&(n.charAt(1)==="/"?n=i.protocol+n:n=i.host+n),/^(https?|wss?):\/\//.test(n)||(typeof i<"u"?n=i.protocol+"//"+n:n="https://"+n),s=od(n)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";const c=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+c+":"+s.port+r,s.href=s.protocol+"://"+c+(i&&i.port===s.port?"":":"+s.port),s}const GM=typeof ArrayBuffer=="function",kM=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,E_=Object.prototype.toString,qM=typeof Blob=="function"||typeof Blob<"u"&&E_.call(Blob)==="[object BlobConstructor]",FM=typeof File=="function"||typeof File<"u"&&E_.call(File)==="[object FileConstructor]";function Kd(n){return GM&&(n instanceof ArrayBuffer||kM(n))||qM&&n instanceof Blob||FM&&n instanceof File}function Xo(n,r){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let i=0,s=n.length;i<s;i++)if(Xo(n[i]))return!0;return!1}if(Kd(n))return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return Xo(n.toJSON(),!0);for(const i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&Xo(n[i]))return!0;return!1}function PM(n){const r=[],i=n.data,s=n;return s.data=cd(i,r),s.attachments=r.length,{packet:s,buffers:r}}function cd(n,r){if(!n)return n;if(Kd(n)){const i={_placeholder:!0,num:r.length};return r.push(n),i}else if(Array.isArray(n)){const i=new Array(n.length);for(let s=0;s<n.length;s++)i[s]=cd(n[s],r);return i}else if(typeof n=="object"&&!(n instanceof Date)){const i={};for(const s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=cd(n[s],r));return i}return n}function VM(n,r){return n.data=fd(n.data,r),delete n.attachments,n}function fd(n,r){if(!n)return n;if(n&&n._placeholder===!0){if(typeof n.num=="number"&&n.num>=0&&n.num<r.length)return r[n.num];throw new Error("illegal attachments")}else if(Array.isArray(n))for(let i=0;i<n.length;i++)n[i]=fd(n[i],r);else if(typeof n=="object")for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&(n[i]=fd(n[i],r));return n}const YM=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],XM=5;var Ce;(function(n){n[n.CONNECT=0]="CONNECT",n[n.DISCONNECT=1]="DISCONNECT",n[n.EVENT=2]="EVENT",n[n.ACK=3]="ACK",n[n.CONNECT_ERROR=4]="CONNECT_ERROR",n[n.BINARY_EVENT=5]="BINARY_EVENT",n[n.BINARY_ACK=6]="BINARY_ACK"})(Ce||(Ce={}));class ZM{constructor(r){this.replacer=r}encode(r){return(r.type===Ce.EVENT||r.type===Ce.ACK)&&Xo(r)?this.encodeAsBinary({type:r.type===Ce.EVENT?Ce.BINARY_EVENT:Ce.BINARY_ACK,nsp:r.nsp,data:r.data,id:r.id}):[this.encodeAsString(r)]}encodeAsString(r){let i=""+r.type;return(r.type===Ce.BINARY_EVENT||r.type===Ce.BINARY_ACK)&&(i+=r.attachments+"-"),r.nsp&&r.nsp!=="/"&&(i+=r.nsp+","),r.id!=null&&(i+=r.id),r.data!=null&&(i+=JSON.stringify(r.data,this.replacer)),i}encodeAsBinary(r){const i=PM(r),s=this.encodeAsString(i.packet),u=i.buffers;return u.unshift(s),u}}function p1(n){return Object.prototype.toString.call(n)==="[object Object]"}class $d extends ct{constructor(r){super(),this.reviver=r}add(r){let i;if(typeof r=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");i=this.decodeString(r);const s=i.type===Ce.BINARY_EVENT;s||i.type===Ce.BINARY_ACK?(i.type=s?Ce.EVENT:Ce.ACK,this.reconstructor=new QM(i),i.attachments===0&&super.emitReserved("decoded",i)):super.emitReserved("decoded",i)}else if(Kd(r)||r.base64)if(this.reconstructor)i=this.reconstructor.takeBinaryData(r),i&&(this.reconstructor=null,super.emitReserved("decoded",i));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+r)}decodeString(r){let i=0;const s={type:Number(r.charAt(0))};if(Ce[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===Ce.BINARY_EVENT||s.type===Ce.BINARY_ACK){const c=i+1;for(;r.charAt(++i)!=="-"&&i!=r.length;);const h=r.substring(c,i);if(h!=Number(h)||r.charAt(i)!=="-")throw new Error("Illegal attachments");s.attachments=Number(h)}if(r.charAt(i+1)==="/"){const c=i+1;for(;++i&&!(r.charAt(i)===","||i===r.length););s.nsp=r.substring(c,i)}else s.nsp="/";const u=r.charAt(i+1);if(u!==""&&Number(u)==u){const c=i+1;for(;++i;){const h=r.charAt(i);if(h==null||Number(h)!=h){--i;break}if(i===r.length)break}s.id=Number(r.substring(c,i+1))}if(r.charAt(++i)){const c=this.tryParse(r.substr(i));if($d.isPayloadValid(s.type,c))s.data=c;else throw new Error("invalid payload")}return s}tryParse(r){try{return JSON.parse(r,this.reviver)}catch{return!1}}static isPayloadValid(r,i){switch(r){case Ce.CONNECT:return p1(i);case Ce.DISCONNECT:return i===void 0;case Ce.CONNECT_ERROR:return typeof i=="string"||p1(i);case Ce.EVENT:case Ce.BINARY_EVENT:return Array.isArray(i)&&(typeof i[0]=="number"||typeof i[0]=="string"&&YM.indexOf(i[0])===-1);case Ce.ACK:case Ce.BINARY_ACK:return Array.isArray(i)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class QM{constructor(r){this.packet=r,this.buffers=[],this.reconPack=r}takeBinaryData(r){if(this.buffers.push(r),this.buffers.length===this.reconPack.attachments){const i=VM(this.reconPack,this.buffers);return this.finishedReconstruction(),i}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const KM=Object.freeze(Object.defineProperty({__proto__:null,Decoder:$d,Encoder:ZM,get PacketType(){return Ce},protocol:XM},Symbol.toStringTag,{value:"Module"}));function jn(n,r,i){return n.on(r,i),function(){n.off(r,i)}}const $M=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class S_ extends ct{constructor(r,i,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=r,this.nsp=i,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const r=this.io;this.subs=[jn(r,"open",this.onopen.bind(this)),jn(r,"packet",this.onpacket.bind(this)),jn(r,"error",this.onerror.bind(this)),jn(r,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...r){return r.unshift("message"),this.emit.apply(this,r),this}emit(r,...i){var s,u,c;if($M.hasOwnProperty(r))throw new Error('"'+r.toString()+'" is a reserved event name');if(i.unshift(r),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(i),this;const h={type:Ce.EVENT,data:i};if(h.options={},h.options.compress=this.flags.compress!==!1,typeof i[i.length-1]=="function"){const y=this.ids++,_=i.pop();this._registerAckCallback(y,_),h.id=y}const d=(u=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||u===void 0?void 0:u.writable,m=this.connected&&!(!((c=this.io.engine)===null||c===void 0)&&c._hasPingExpired());return this.flags.volatile&&!d||(m?(this.notifyOutgoingListeners(h),this.packet(h)):this.sendBuffer.push(h)),this.flags={},this}_registerAckCallback(r,i){var s;const u=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(u===void 0){this.acks[r]=i;return}const c=this.io.setTimeoutFn(()=>{delete this.acks[r];for(let d=0;d<this.sendBuffer.length;d++)this.sendBuffer[d].id===r&&this.sendBuffer.splice(d,1);i.call(this,new Error("operation has timed out"))},u),h=(...d)=>{this.io.clearTimeoutFn(c),i.apply(this,d)};h.withError=!0,this.acks[r]=h}emitWithAck(r,...i){return new Promise((s,u)=>{const c=(h,d)=>h?u(h):s(d);c.withError=!0,i.push(c),this.emit(r,...i)})}_addToQueue(r){let i;typeof r[r.length-1]=="function"&&(i=r.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:r,flags:Object.assign({fromQueue:!0},this.flags)};r.push((u,...c)=>s!==this._queue[0]?void 0:(u!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),i&&i(u)):(this._queue.shift(),i&&i(null,...c)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(r=!1){if(!this.connected||this._queue.length===0)return;const i=this._queue[0];i.pending&&!r||(i.pending=!0,i.tryCount++,this.flags=i.flags,this.emit.apply(this,i.args))}packet(r){r.nsp=this.nsp,this.io._packet(r)}onopen(){typeof this.auth=="function"?this.auth(r=>{this._sendConnectPacket(r)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(r){this.packet({type:Ce.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},r):r})}onerror(r){this.connected||this.emitReserved("connect_error",r)}onclose(r,i){this.connected=!1,delete this.id,this.emitReserved("disconnect",r,i),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(r=>{if(!this.sendBuffer.some(s=>String(s.id)===r)){const s=this.acks[r];delete this.acks[r],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(r){if(r.nsp===this.nsp)switch(r.type){case Ce.CONNECT:r.data&&r.data.sid?this.onconnect(r.data.sid,r.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ce.EVENT:case Ce.BINARY_EVENT:this.onevent(r);break;case Ce.ACK:case Ce.BINARY_ACK:this.onack(r);break;case Ce.DISCONNECT:this.ondisconnect();break;case Ce.CONNECT_ERROR:this.destroy();const s=new Error(r.data.message);s.data=r.data.data,this.emitReserved("connect_error",s);break}}onevent(r){const i=r.data||[];r.id!=null&&i.push(this.ack(r.id)),this.connected?this.emitEvent(i):this.receiveBuffer.push(Object.freeze(i))}emitEvent(r){if(this._anyListeners&&this._anyListeners.length){const i=this._anyListeners.slice();for(const s of i)s.apply(this,r)}super.emit.apply(this,r),this._pid&&r.length&&typeof r[r.length-1]=="string"&&(this._lastOffset=r[r.length-1])}ack(r){const i=this;let s=!1;return function(...u){s||(s=!0,i.packet({type:Ce.ACK,id:r,data:u}))}}onack(r){const i=this.acks[r.id];typeof i=="function"&&(delete this.acks[r.id],i.withError&&r.data.unshift(null),i.apply(this,r.data))}onconnect(r,i){this.id=r,this.recovered=i&&this._pid===i,this._pid=i,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(r=>this.emitEvent(r)),this.receiveBuffer=[],this.sendBuffer.forEach(r=>{this.notifyOutgoingListeners(r),this.packet(r)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(r=>r()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ce.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(r){return this.flags.compress=r,this}get volatile(){return this.flags.volatile=!0,this}timeout(r){return this.flags.timeout=r,this}onAny(r){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(r),this}prependAny(r){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(r),this}offAny(r){if(!this._anyListeners)return this;if(r){const i=this._anyListeners;for(let s=0;s<i.length;s++)if(r===i[s])return i.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(r){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(r),this}prependAnyOutgoing(r){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(r),this}offAnyOutgoing(r){if(!this._anyOutgoingListeners)return this;if(r){const i=this._anyOutgoingListeners;for(let s=0;s<i.length;s++)if(r===i[s])return i.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(r){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const i=this._anyOutgoingListeners.slice();for(const s of i)s.apply(this,r.data)}}}function Ni(n){n=n||{},this.ms=n.min||100,this.max=n.max||1e4,this.factor=n.factor||2,this.jitter=n.jitter>0&&n.jitter<=1?n.jitter:0,this.attempts=0}Ni.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var r=Math.random(),i=Math.floor(r*this.jitter*n);n=(Math.floor(r*10)&1)==0?n-i:n+i}return Math.min(n,this.max)|0};Ni.prototype.reset=function(){this.attempts=0};Ni.prototype.setMin=function(n){this.ms=n};Ni.prototype.setMax=function(n){this.max=n};Ni.prototype.setJitter=function(n){this.jitter=n};class hd extends ct{constructor(r,i){var s;super(),this.nsps={},this.subs=[],r&&typeof r=="object"&&(i=r,r=void 0),i=i||{},i.path=i.path||"/socket.io",this.opts=i,vu(this,i),this.reconnection(i.reconnection!==!1),this.reconnectionAttempts(i.reconnectionAttempts||1/0),this.reconnectionDelay(i.reconnectionDelay||1e3),this.reconnectionDelayMax(i.reconnectionDelayMax||5e3),this.randomizationFactor((s=i.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new Ni({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(i.timeout==null?2e4:i.timeout),this._readyState="closed",this.uri=r;const u=i.parser||KM;this.encoder=new u.Encoder,this.decoder=new u.Decoder,this._autoConnect=i.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(r){return arguments.length?(this._reconnection=!!r,r||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(r){return r===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=r,this)}reconnectionDelay(r){var i;return r===void 0?this._reconnectionDelay:(this._reconnectionDelay=r,(i=this.backoff)===null||i===void 0||i.setMin(r),this)}randomizationFactor(r){var i;return r===void 0?this._randomizationFactor:(this._randomizationFactor=r,(i=this.backoff)===null||i===void 0||i.setJitter(r),this)}reconnectionDelayMax(r){var i;return r===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=r,(i=this.backoff)===null||i===void 0||i.setMax(r),this)}timeout(r){return arguments.length?(this._timeout=r,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(r){if(~this._readyState.indexOf("open"))return this;this.engine=new IM(this.uri,this.opts);const i=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const u=jn(i,"open",function(){s.onopen(),r&&r()}),c=d=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",d),r?r(d):this.maybeReconnectOnOpen()},h=jn(i,"error",c);if(this._timeout!==!1){const d=this._timeout,m=this.setTimeoutFn(()=>{u(),c(new Error("timeout")),i.close()},d);this.opts.autoUnref&&m.unref(),this.subs.push(()=>{this.clearTimeoutFn(m)})}return this.subs.push(u),this.subs.push(h),this}connect(r){return this.open(r)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const r=this.engine;this.subs.push(jn(r,"ping",this.onping.bind(this)),jn(r,"data",this.ondata.bind(this)),jn(r,"error",this.onerror.bind(this)),jn(r,"close",this.onclose.bind(this)),jn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(r){try{this.decoder.add(r)}catch(i){this.onclose("parse error",i)}}ondecoded(r){yu(()=>{this.emitReserved("packet",r)},this.setTimeoutFn)}onerror(r){this.emitReserved("error",r)}socket(r,i){let s=this.nsps[r];return s?this._autoConnect&&!s.active&&s.connect():(s=new S_(this,r,i),this.nsps[r]=s),s}_destroy(r){const i=Object.keys(this.nsps);for(const s of i)if(this.nsps[s].active)return;this._close()}_packet(r){const i=this.encoder.encode(r);for(let s=0;s<i.length;s++)this.engine.write(i[s],r.options)}cleanup(){this.subs.forEach(r=>r()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(r,i){var s;this.cleanup(),(s=this.engine)===null||s===void 0||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",r,i),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const r=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const i=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{r.skipReconnect||(this.emitReserved("reconnect_attempt",r.backoff.attempts),!r.skipReconnect&&r.open(u=>{u?(r._reconnecting=!1,r.reconnect(),this.emitReserved("reconnect_error",u)):r.onreconnect()}))},i);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const r=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",r)}}const Ys={};function Zo(n,r){typeof n=="object"&&(r=n,n=void 0),r=r||{};const i=zM(n,r.path||"/socket.io"),s=i.source,u=i.id,c=i.path,h=Ys[u]&&c in Ys[u].nsps,d=r.forceNew||r["force new connection"]||r.multiplex===!1||h;let m;return d?m=new hd(s,r):(Ys[u]||(Ys[u]=new hd(s,r)),m=Ys[u]),i.query&&!r.query&&(r.query=i.queryKey),m.socket(i.path,r)}Object.assign(Zo,{Manager:hd,Socket:S_,io:Zo,connect:Zo});const WM=[Oe.ActionTypes.MESSAGE_TO_GUEST,Oe.ActionTypes.EVENT_TO_GUEST,Oe.ActionTypes.TYPING_ON,Oe.ActionTypes.TYPING_OFF,Oe.ActionTypes.RESTART_CHAT_REQUEST,...gO,...mx,"@@localize/SET_ACTIVE_LANGUAGE","@@localize/ADD_TRANSLATION_FOR_LANGUAGE"],JM=({dispatch:n,getState:r})=>i=>{let s=null;return u=>{const c=i(u);if(u.type===Hd){s?.disconnect(),n(bO());const h=`/chat?${lu.stringify(u.querystrings)}`;s=Zo(`/${u.clientName}${h}`),s.on("action",n),s.on("connect",()=>n(_O())),s.on("disconnect",()=>n(EO())),s.on("reconnect",()=>n(SO())),s.on("set-translations",(d,m)=>{n(Z3({language:d,messages:q3(d,m)}))}),s.on("set-settings",d=>{n($3(d))}),s.on("enable-conversation-rating",d=>n(bx(d))),s.on("speech-transcription",d=>n(gx(d))),s.on("restore-client-state",d=>{n(vO(d.sessionId)),n(Ex(d.messages))}),s.on("expand-window",({devices:d,initial:m=!1})=>{n({type:lb,devices:d,initial:m})}),s.on("restart-chat",()=>{n(mu(u.clientName,u.querystrings))})}else if(u.type===hu)s?.emit("start-chat",u.payload);else if(u.type===du)s?.emit("terminate-session",u.payload);else if(u.type===dx)s?.emit("get-started",JSON.stringify(u));else if(u.type===Od)s?.emit("audio-message",u.buffer);else if(u.type===Oe.ActionTypes.CONVERSATION_RATING_FROM_GUEST)s?.emit("conversation-rating",u.payload);else if(u.type===ub){const{connection:{sessionId:h}}=r();window.location.href=`/transcript-pdf/${h}`}else WM.indexOf(u.type)===-1&&u.meta===void 0&&s&&s.emit("action",JSON.stringify(u));return c}},T_=Vb(),e4={...tM(T_),intl:a_},dd=$x({middleware:n=>n().concat(JM),reducer:J3,preloadedState:e4});dd.subscribe(L3(()=>{const n=dd.getState();nM(T_,{connection:n.connection,startScreen:n.startScreen})},1e3));const t4=document.getElementById("root"),n4=zS.createRoot(t4);n4.render(v.jsx(I2,{store:dd,children:v.jsx(_3,{})}));
124
- //# sourceMappingURL=index-DW1INPmO.js.map
124
+ //# sourceMappingURL=index-DTEbM606.js.map