@botfabrik/engine-webclient 4.93.6 → 4.93.7-alpha.1

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_6i1zm_1{--bubble-margin: var(--bubble-margin-small);margin-bottom:var(--bubble-margin);transition:border-radius .5s;position:relative}._messageBot_6i1zm_9{--bot-bubble-user-actions-display: none;display:flex;align-items:flex-end}._messageBot_6i1zm_9:focus-within,._messageBot_6i1zm_9:hover{--bot-bubble-user-actions-display: flex}._messageBot_6i1zm_9:not(._messageBotLast_6i1zm_19) ._avatar_6i1zm_19{visibility:hidden}._messageBotFirst_6i1zm_24{--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_6i1zm_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_6i1zm_37{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_6i1zm_1}._messageGuest_6i1zm_48{display:flex;align-items:flex-end;justify-content:flex-end}._messageGuestFirst_6i1zm_54{--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_6i1zm_60{--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_6i1zm_19{width:var(--avatar-size);height:var(--avatar-size);border-radius:var(--avatar-radius, 50%)}._botAvatar_6i1zm_74{background-color:var(--bot-avatar-background-color)}._agentAvatar_6i1zm_78{background-color:var(--agent-avatar-background-color)}._bubble_6i1zm_82{display:inline-block;max-width:calc(100% - 4.3rem);position:relative}._bubbleContent_6i1zm_88{padding:var(--bubble-padding);color:inherit;font-size:inherit}._bubbleContent_6i1zm_88 *>:first-child{margin-top:0}._bubbleContent_6i1zm_88 *>:last-child{margin-bottom:0}._bubbleLeft_6i1zm_102{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:1rem}._leftText_6i1zm_113{color:var(--bot-bubble-text-color)}._leftText_6i1zm_113 a{color:var(--bot-bubble-text-color)!important}._bubbleRight_6i1zm_120{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_6i1zm_130,._rightText_6i1zm_130 a{color:var(--guest-bubble-text-color)}@keyframes _fadeInLeft_6i1zm_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_6i1zm_162 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_6i1zm_174 a{--bot-bubble-text-color: white;background:var(--brand-primary-color)}._botMessageActions_1dl7x_1{--bot-bubble-user-actions-container-bg-opacity: 1;color:var(--text-secondary-color);padding:.125rem .5rem;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:.75rem;margin-top:-.75rem;top:100%;left:calc(var(--avatar-size, 2rem) + 1.5rem);position:absolute;z-index:10;display:var(--bot-bubble-user-actions-display);gap:.15rem}._alwaysVisible_1dl7x_22{--bot-bubble-user-actions-display: flex;--bot-bubble-user-actions-container-bg-opacity: 0;border-width:0;top:calc(100% + .75rem)}._reported_1dl7x_29{display:flex}._action_1dl7x_33{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_1dl7x_33:hover{background-color:var(--color-gray-200)}._action_1dl7x_33._reported_1dl7x_29{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_b904h_1{margin-top:0;margin-block-start:0}._subtitle_b904h_6{margin-top:.5rem;margin-bottom:.5rem}._buttons_b904h_11{margin-top:1rem;display:flex;flex-direction:row;flex-wrap:wrap;gap:.5rem}._button_b904h_11{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_b904h_11:hover{color:var(--bot-bubble-text-color);background-color:var(--bot-bubble-background-color);border:2px solid var(--bot-bubble-text-color)}._imageContainer_b904h_34{display:flex}._image_b904h_34{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_b904h_49{display:flex}._video_b904h_49{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_b904h_63{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))}._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) )}._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}._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_scxhm_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_scxhm_14{height:inherit;flex:1;padding:var(--header-logo-padding)}._logo_scxhm_14{height:100%;background-image:var(--header-logo-url);background-repeat:no-repeat;background-size:contain;background-position:left center}._actions_scxhm_28{display:flex;align-items:center;padding:var(--header-icons-padding);color:var(--header-icon-color, white)}._actions_scxhm_28 button{background-color:transparent;color:inherit;border:none;cursor:pointer;border-radius:50%;padding:calc(var(--header-icon-size) / 3);margin:4px}._actions_scxhm_28 button._active_scxhm_43,._actions_scxhm_28 button:hover{background-color:rgb(from var(--header-icon-color, white) r g b / 20%)}._actions_scxhm_28 button svg{width:var(--header-icon-size);height:var(--header-icon-size);display:block}._menuContainer_scxhm_56{position:relative;display:inline-block}._menu_scxhm_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:1000}._menu_scxhm_56 ul{list-style-type:none;padding:0;margin:0}._menu_scxhm_56 ul li{display:flex;align-items:center;cursor:pointer}._menu_scxhm_56 ul li._divider_scxhm_86{border-bottom:1px solid var(--header-menu-item-divider-color);margin-bottom:5px;padding-bottom:5px}._menu_scxhm_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_scxhm_56 ul li a:hover,._menu_scxhm_56 ul li a:focus{background-color:var(--header-menu-item-background-color-hover);outline:none}._menu_scxhm_56 ul li a svg{margin-right:.5rem;width:1em;height:1em;flex-shrink:0}@media screen and (min-width: 1024px){._header_scxhm_1{background-color:transparent;border-top-left-radius:0;border-top-right-radius:0}._actions_scxhm_28 button{font-size:2rem}._actions_scxhm_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-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: 0 1em 0 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{top:-100px}.tooltip-hidden[data-title]:after{top:-100px}.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)}::-webkit-scrollbar{width:8px;border:none}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb-color)}*{scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb-color) transparent}*{box-sizing:border-box}body{margin:0}input::placeholder,textarea::placeholder{color:#666;opacity:1}svg{fill:currentColor}
@@ -13,8 +13,8 @@
13
13
  <meta name="theme-color" content="#000000" />
14
14
  <meta name="google" content="notranslate" />
15
15
  <title>Bubble Chat Client</title>
16
- <script type="module" crossorigin src="./assets/index-CHxJj4y7.js"></script>
17
- <link rel="stylesheet" crossorigin href="./assets/index-CQifi_K_.css">
16
+ <script type="module" crossorigin src="./assets/index-Bqevq7Rf.js"></script>
17
+ <link rel="stylesheet" crossorigin href="./assets/index-D7pX36P-.css">
18
18
  </head>
19
19
 
20
20
  <body>
@@ -1,19 +1,16 @@
1
- var Tt=Object.defineProperty;var Ot=(B,p,y)=>p in B?Tt(B,p,{enumerable:!0,configurable:!0,writable:!0,value:y}):B[p]=y;var k=(B,p,y)=>Ot(B,typeof p!="symbol"?p+"":p,y);(function(){"use strict";function B(){}function p(e,t,n,o,s){e.__svelte_meta={loc:{file:t,line:n,column:o,char:s}}}function y(e){return e()}function Ee(){return Object.create(null)}function C(e){e.forEach(y)}function q(e){return typeof e=="function"}function K(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let W;function j(e,t){return e===t?!0:(W||(W=document.createElement("a")),W.href=t,e===W.href)}function Ye(e){return Object.keys(e).length===0}const Xe=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function Le(e,t){e.appendChild(t)}function $(e,t,n){const o=qe(e);if(!o.getElementById(t)){const s=g("style");s.id=t,s.textContent=n,Ke(o,s)}}function qe(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function Ke(e,t){return Le(e.head||e,t),t.sheet}function $e(e,t,n){e.insertBefore(t,n||null)}function xe(e){e.parentNode&&e.parentNode.removeChild(e)}function g(e){return document.createElement(e)}function E(e){return document.createTextNode(e)}function ee(){return E(" ")}function et(){return E("")}function tt(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function nt(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function ot(e){return Array.from(e.childNodes)}function Se(e,t,n){e.classList.toggle(t,!!n)}function st(e,t,{bubbles:n=!1,cancelable:o=!1}={}){return new CustomEvent(e,{detail:t,bubbles:n,cancelable:o})}let R;function I(e){R=e}function rt(){if(!R)throw new Error("Function called outside component initialization");return R}function A(e){rt().$$.on_mount.push(e)}const D=[],ve=[];let N=[];const ye=[],it=Promise.resolve();let te=!1;function ct(){te||(te=!0,it.then(De))}function ne(e){N.push(e)}const oe=new Set;let _=0;function De(){if(_!==0)return;const e=R;do{try{for(;_<D.length;){const t=D[_];_++,I(t),at(t.$$)}}catch(t){throw D.length=0,_=0,t}for(I(null),D.length=0,_=0;ve.length;)ve.pop()();for(let t=0;t<N.length;t+=1){const n=N[t];oe.has(n)||(oe.add(n),n())}N.length=0}while(D.length);for(;ye.length;)ye.pop()();te=!1,oe.clear(),I(e)}function at(e){if(e.fragment!==null){e.update(),C(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(ne)}}function lt(e){const t=[],n=[];N.forEach(o=>e.indexOf(o)===-1?t.push(o):n.push(o)),n.forEach(o=>o()),N=t}const z=new Set;let dt;function se(e,t){e&&e.i&&(z.delete(e),e.i(t))}function Ne(e,t,n,o){if(e&&e.o){if(z.has(e))return;z.add(e),dt.c.push(()=>{z.delete(e)}),e.o(t)}}function _e(e){e&&e.c()}function re(e,t,n){const{fragment:o,after_update:s}=e.$$;o&&o.m(t,n),ne(()=>{const r=e.$$.on_mount.map(y).filter(q);e.$$.on_destroy?e.$$.on_destroy.push(...r):C(r),e.$$.on_mount=[]}),s.forEach(ne)}function ie(e,t){const n=e.$$;n.fragment!==null&&(lt(n.after_update),C(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function ut(e,t){e.$$.dirty[0]===-1&&(D.push(e),ct(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ce(e,t,n,o,s,r,c=null,i=[-1]){const a=R;I(e);const d=e.$$={fragment:null,ctx:[],props:r,update:B,not_equal:s,bound:Ee(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(a?a.$$.context:[])),callbacks:Ee(),dirty:i,skip_bound:!1,root:t.target||a.$$.root};c&&c(d.root);let u=!1;if(d.ctx=n?n(e,t.props||{},(h,Q,...m)=>{const l=m.length?m[0]:Q;return d.ctx&&s(d.ctx[h],d.ctx[h]=l)&&(!d.skip_bound&&d.bound[h]&&d.bound[h](l),u&&ut(e,h)),Q}):[],d.update(),u=!0,C(d.before_update),d.fragment=o?o(d.ctx):!1,t.target){if(t.hydrate){const h=ot(t.target);d.fragment&&d.fragment.l(h),h.forEach(xe)}else d.fragment&&d.fragment.c();t.intro&&se(e.$$.fragment),re(e,t.target,t.anchor),De()}I(a)}class ft{constructor(){k(this,"$$");k(this,"$$set")}$destroy(){ie(this,1),this.$destroy=B}$on(t,n){if(!q(n))return B;const o=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return o.push(n),()=>{const s=o.indexOf(n);s!==-1&&o.splice(s,1)}}$set(t){this.$$set&&!Ye(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Qt="4.2.19",ht="4";function w(e,t){document.dispatchEvent(st(e,{version:Qt,...t},{bubbles:!0}))}function F(e,t){w("SvelteDOMInsert",{target:e,node:t}),Le(e,t)}function S(e,t,n){w("SvelteDOMInsert",{target:e,node:t,anchor:n}),$e(e,t,n)}function L(e){w("SvelteDOMRemove",{node:e}),xe(e)}function ke(e,t,n,o,s,r,c){const i=[];w("SvelteDOMAddEventListener",{node:e,event:t,handler:n,modifiers:i});const a=tt(e,t,n,o);return()=>{w("SvelteDOMRemoveEventListener",{node:e,event:t,handler:n,modifiers:i}),a()}}function U(e,t,n){nt(e,t,n),n==null?w("SvelteDOMRemoveAttribute",{node:e,attribute:t}):w("SvelteDOMSetAttribute",{node:e,attribute:t,value:n})}function ae(e,t,n){for(const o of Object.keys(t))~n.indexOf(o)||console.warn(`<${e}> received an unexpected slot "${o}".`)}class le extends ft{constructor(n){if(!n||!n.target&&!n.$$inline)throw new Error("'target' is a required option");super();k(this,"$$prop_def");k(this,"$$events_def");k(this,"$$slot_def")}$destroy(){super.$destroy(),this.$destroy=()=>{console.warn("Component was already destroyed")}}$capture_state(){}$inject_state(){}}typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(ht);const x="src/Iframe.svelte";function Ut(e){$(e,"svelte-icor79",`.svelte-icor79,.svelte-icor79:before,.svelte-icor79:after{box-sizing:border-box}.bot-border.svelte-icor79{position:fixed;display:flex;flex-direction:column;top:0;bottom:env(safe-area-inset-bottom);height:100%;max-height:100vh;width:100%;border-width:0;border-radius:var(--window-border-radius, 8px);box-shadow:rgba(0, 0, 0, 0.24) 0px 16px 40px;background:transparent;opacity:1;transition:transform 200ms,
1
+ var vt=Object.defineProperty;var _t=(m,g,y)=>g in m?vt(m,g,{enumerable:!0,configurable:!0,writable:!0,value:y}):m[g]=y;var ie=(m,g,y)=>_t(m,typeof g!="symbol"?g+"":g,y);(function(){"use strict";function m(){}function g(e){return e()}function y(){return Object.create(null)}function E(e){e.forEach(g)}function P(e){return typeof e=="function"}function H(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let A;function I(e,t){return e===t?!0:(A||(A=document.createElement("a")),A.href=t,e===A.href)}function Oe(e){return Object.keys(e).length===0}const Te=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function O(e,t){e.appendChild(t)}function M(e,t,n){const r=xe(e);if(!r.getElementById(t)){const o=p("style");o.id=t,o.textContent=n,Ue(r,o)}}function xe(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function Ue(e,t){return O(e.head||e,t),t.sheet}function v(e,t,n){e.insertBefore(t,n||null)}function w(e){e.parentNode&&e.parentNode.removeChild(e)}function p(e){return document.createElement(e)}function se(e){return document.createTextNode(e)}function j(){return se(" ")}function Le(){return se("")}function ae(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function u(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function Ae(e){return Array.from(e.childNodes)}function ce(e,t,n){e.classList.toggle(t,!!n)}let T;function x(e){T=e}function Ie(){if(!T)throw new Error("Function called outside component initialization");return T}function le(e){Ie().$$.on_mount.push(e)}const k=[],fe=[];let C=[];const de=[],Re=Promise.resolve();let B=!1;function qe(){B||(B=!0,Re.then(ue))}function F(e){C.push(e)}const G=new Set;let S=0;function ue(){if(S!==0)return;const e=T;do{try{for(;S<k.length;){const t=k[S];S++,x(t),De(t.$$)}}catch(t){throw k.length=0,S=0,t}for(x(null),k.length=0,S=0;fe.length;)fe.pop()();for(let t=0;t<C.length;t+=1){const n=C[t];G.has(n)||(G.add(n),n())}C.length=0}while(k.length);for(;de.length;)de.pop()();B=!1,G.clear(),x(e)}function De(e){if(e.fragment!==null){e.update(),E(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(F)}}function We(e){const t=[],n=[];C.forEach(r=>e.indexOf(r)===-1?t.push(r):n.push(r)),n.forEach(r=>r()),C=t}const R=new Set;let ze;function Y(e,t){e&&e.i&&(R.delete(e),e.i(t))}function he(e,t,n,r){if(e&&e.o){if(R.has(e))return;R.add(e),ze.c.push(()=>{R.delete(e)}),e.o(t)}}function me(e){e&&e.c()}function K(e,t,n){const{fragment:r,after_update:o}=e.$$;r&&r.m(t,n),F(()=>{const i=e.$$.on_mount.map(g).filter(P);e.$$.on_destroy?e.$$.on_destroy.push(...i):E(i),e.$$.on_mount=[]}),o.forEach(F)}function V(e,t){const n=e.$$;n.fragment!==null&&(We(n.after_update),E(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Ne(e,t){e.$$.dirty[0]===-1&&(k.push(e),qe(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function J(e,t,n,r,o,i,s=null,c=[-1]){const f=T;x(e);const d=e.$$={fragment:null,ctx:[],props:i,update:m,not_equal:o,bound:y(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(f?f.$$.context:[])),callbacks:y(),dirty:c,skip_bound:!1,root:t.target||f.$$.root};s&&s(d.root);let l=!1;if(d.ctx=n?n(e,t.props||{},(a,_,...b)=>{const z=b.length?b[0]:_;return d.ctx&&o(d.ctx[a],d.ctx[a]=z)&&(!d.skip_bound&&d.bound[a]&&d.bound[a](z),l&&Ne(e,a)),_}):[],d.update(),l=!0,E(d.before_update),d.fragment=r?r(d.ctx):!1,t.target){if(t.hydrate){const a=Ae(t.target);d.fragment&&d.fragment.l(a),a.forEach(w)}else d.fragment&&d.fragment.c();t.intro&&Y(e.$$.fragment),K(e,t.target,t.anchor),ue()}x(f)}class Q{constructor(){ie(this,"$$");ie(this,"$$set")}$destroy(){V(this,1),this.$destroy=m}$on(t,n){if(!P(n))return m;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),()=>{const o=r.indexOf(n);o!==-1&&r.splice(o,1)}}$set(t){this.$$set&&!Oe(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Pe="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Pe);function He(e){M(e,"svelte-icor79",`.svelte-icor79,.svelte-icor79:before,.svelte-icor79:after{box-sizing:border-box}.bot-border.svelte-icor79{position:fixed;display:flex;flex-direction:column;top:0;bottom:env(safe-area-inset-bottom);height:100%;max-height:100vh;width:100%;border-width:0;border-radius:var(--window-border-radius, 8px);box-shadow:rgba(0, 0, 0, 0.24) 0px 16px 40px;background:transparent;opacity:1;transition:transform 200ms,
2
2
  opacity 100ms 100ms,
3
- all 150ms;z-index:2147483647}.bot-border.closed.svelte-icor79{transform:translateY(100vh);opacity:0}.bot.svelte-icor79{display:block;width:100%;flex:1 0 auto;margin:0}@media screen and (min-width: 768px){#chat-frame.svelte-icor79{border-radius:var(--window-border-radius, 8px)}.bot-border.svelte-icor79{height:var(--window-height, 43em);max-height:calc(100vh - 2em);width:var(--window-width, 25em);top:auto;right:1em;bottom:1em;left:auto;border-radius:var(--window-border-radius, 8px)}.bot-border.closed.svelte-icor79{transform:translateY(var(--window-height, 43em));opacity:0}}p.svelte-icor79,pre.svelte-icor79{max-width:300px}pre.svelte-icor79{font-size:0.6em;line-height:0.5}
4
- /*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSWZyYW1lLnN2ZWx0ZSIsIm1hcHBpbmdzIjoiQUF1REUsY0FBQyxDQUNELGNBQUMsT0FBTyxDQUNSLGNBQUMsTUFBTyxDQUNOLFVBQVUsQ0FBRSxVQUNkLENBQ0EseUJBQVksQ0FDVixRQUFRLENBQUUsS0FBSyxDQUNmLE9BQU8sQ0FBRSxJQUFJLENBQ2IsY0FBYyxDQUFFLE1BQU0sQ0FDdEIsR0FBRyxDQUFFLENBQUMsQ0FDTixNQUFNLENBQUUsSUFBSSxzQkFBc0IsQ0FBQyxDQUNuQyxNQUFNLENBQUUsSUFBSSxDQUNaLFVBQVUsQ0FBRSxLQUFLLENBQ2pCLEtBQUssQ0FBRSxJQUFJLENBQ1gsWUFBWSxDQUFFLENBQUMsQ0FDZixhQUFhLENBQUUsSUFBSSxzQkFBc0IsQ0FBQyxJQUFJLENBQUMsQ0FDL0MsVUFBVSxDQUFFLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLENBQUMsR0FBRyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQzdDLFVBQVUsQ0FBRSxXQUFXLENBQ3ZCLE9BQU8sQ0FBRSxDQUFDLENBQ1YsVUFBVSxDQUNSLFNBQVMsQ0FBQyxLQUFLO0FBQ3JCLE1BQU0sT0FBTyxDQUFDLEtBQUssQ0FBQyxLQUFLO0FBQ3pCLE1BQU0sR0FBRyxDQUFDLEtBQUssQ0FDWCxPQUFPLENBQUUsVUFDWCxDQUVBLFdBQVcscUJBQVEsQ0FDakIsU0FBUyxDQUFFLFdBQVcsS0FBSyxDQUFDLENBQzVCLE9BQU8sQ0FBRSxDQUNYLENBRUEsa0JBQUssQ0FDSCxPQUFPLENBQUUsS0FBSyxDQUNkLEtBQUssQ0FBRSxJQUFJLENBQ1gsSUFBSSxDQUFFLENBQUMsQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUNkLE1BQU0sQ0FBRSxDQUNWLENBRUEsT0FBTyxNQUFNLENBQUMsR0FBRyxDQUFDLFlBQVksS0FBSyxDQUFFLENBQ25DLHlCQUFZLENBQ1YsYUFBYSxDQUFFLElBQUksc0JBQXNCLENBQUMsSUFBSSxDQUNoRCxDQUVBLHlCQUFZLENBQ1YsTUFBTSxDQUFFLElBQUksZUFBZSxDQUFDLEtBQUssQ0FBQyxDQUNsQyxVQUFVLENBQUUsS0FBSyxLQUFLLENBQUMsQ0FBQyxDQUFDLEdBQUcsQ0FBQyxDQUM3QixLQUFLLENBQUUsSUFBSSxjQUFjLENBQUMsS0FBSyxDQUFDLENBQ2hDLEdBQUcsQ0FBRSxJQUFJLENBQ1QsS0FBSyxDQUFFLEdBQUcsQ0FDVixNQUFNLENBQUUsR0FBRyxDQUNYLElBQUksQ0FBRSxJQUFJLENBQ1YsYUFBYSxDQUFFLElBQUksc0JBQXNCLENBQUMsSUFBSSxDQUNoRCxDQUVBLFdBQVcscUJBQVEsQ0FDakIsU0FBUyxDQUFFLFdBQVcsSUFBSSxlQUFlLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FDakQsT0FBTyxDQUFFLENBQ1gsQ0FDRixDQUNBLGVBQUMsQ0FDRCxpQkFBSSxDQUNGLFNBQVMsQ0FBRSxLQUNiLENBQ0EsaUJBQUksQ0FDRixTQUFTLENBQUUsS0FBSyxDQUNoQixXQUFXLENBQUUsR0FDZiIsIm5hbWVzIjpbXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZXMiOlsiSWZyYW1lLnN2ZWx0ZSJdfQ== */`)}function Ce(e){let t,n,o,s,r,c,i,a,d,u,h,Q,m,l,b;const M={c:function(){t=g("p"),t.textContent=`Please make sure that the script tag has 'id="chatbot"' and the attribute
5
- 'data-server' with the full qualified URL to the chatbot-server.`,n=ee(),o=g("pre"),s=E(" "),r=g("code"),c=E(`
6
- <script
7
- `),i=g("br"),a=E(`
8
- id="chatbot"
9
- `),d=g("br"),u=E(`
10
- data-server="https://server.com/webclient"
11
- `),h=g("br"),Q=E(`
3
+ all 150ms;z-index:2147483647}.bot-border.closed.svelte-icor79{transform:translateY(100vh);opacity:0}.bot.svelte-icor79{display:block;width:100%;flex:1 0 auto;margin:0}@media screen and (min-width: 768px){#chat-frame.svelte-icor79{border-radius:var(--window-border-radius, 8px)}.bot-border.svelte-icor79{height:var(--window-height, 43em);max-height:calc(100vh - 2em);width:var(--window-width, 25em);top:auto;right:1em;bottom:1em;left:auto;border-radius:var(--window-border-radius, 8px)}.bot-border.closed.svelte-icor79{transform:translateY(var(--window-height, 43em));opacity:0}}p.svelte-icor79,pre.svelte-icor79{max-width:300px}pre.svelte-icor79{font-size:0.6em;line-height:0.5}`)}function Me(e){let t,n,r;return{c(){t=p("p"),t.textContent=`Please make sure that the script tag has 'id="chatbot"' and the attribute
4
+ 'data-server' with the full qualified URL to the chatbot-server.`,n=j(),r=p("pre"),r.innerHTML=` <code class="svelte-icor79">
5
+ &lt;script
6
+ <br class="svelte-icor79"/>
7
+ id=&quot;chatbot&quot;
8
+ <br class="svelte-icor79"/>
9
+ data-server=&quot;https://server.com/webclient&quot;
10
+ <br class="svelte-icor79"/>
12
11
  defer
13
- `),m=g("br"),l=E(`
14
- src="https://server.com/webclient/embed/bundle.js"> <\/script>
15
- `),b=E(`
16
- `),U(t,"class","svelte-icor79"),p(t,x,35,2,743),U(i,"class","svelte-icor79"),p(i,x,42,6,943),U(d,"class","svelte-icor79"),p(d,x,44,6,975),U(h,"class","svelte-icor79"),p(h,x,46,6,1037),U(m,"class","svelte-icor79"),p(m,x,48,6,1062),U(r,"class","svelte-icor79"),p(r,x,40,4,913),U(o,"class","svelte-icor79"),p(o,x,39,2,903)},m:function(v,V){S(v,t,V),S(v,n,V),S(v,o,V),F(o,s),F(o,r),F(r,c),F(r,i),F(r,a),F(r,d),F(r,u),F(r,h),F(r,Q),F(r,m),F(r,l),F(o,b)},p:B,d:function(v){v&&(L(t),L(n),L(o))}};return w("SvelteRegisterBlock",{block:M,id:Ce.name,type:"else",source:"(31:0) {:else}",ctx:e}),M}function Re(e){let t,n,o,s;const r={c:function(){t=g("div"),n=g("iframe"),U(n,"id","chat-frame"),U(n,"title","Chat"),U(n,"class","bot svelte-icor79"),j(n.src,o=`${e[0]}${e[0].indexOf("?")===-1?"?":"&"}referrer=${encodeURIComponent(e[1]??"")}`)||U(n,"src",o),U(n,"frameborder","0"),U(n,"allow","microphone; clipboard-write"),n.allowFullscreen=!0,p(n,x,24,4,445),U(t,"class","bot-border svelte-icor79"),U(t,"aria-hidden",s=e[2]?"false":"true"),Se(t,"closed",!e[2]),p(t,x,19,2,342)},m:function(i,a){S(i,t,a),F(t,n)},p:function(i,a){a&3&&!j(n.src,o=`${i[0]}${i[0].indexOf("?")===-1?"?":"&"}referrer=${encodeURIComponent(i[1]??"")}`)&&U(n,"src",o),a&4&&s!==(s=i[2]?"false":"true")&&U(t,"aria-hidden",s),a&4&&Se(t,"closed",!i[2])},d:function(i){i&&L(t)}};return w("SvelteRegisterBlock",{block:r,id:Re.name,type:"if",source:"(15:0) {#if server}",ctx:e}),r}function de(e){let t;function n(c,i){return c[0]?Re:Ce}let o=n(e),s=o(e);const r={c:function(){s.c(),t=et()},l:function(i){throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option")},m:function(i,a){s.m(i,a),S(i,t,a)},p:function(i,[a]){o===(o=n(i))&&s?s.p(i,a):(s.d(1),s=o(i),s&&(s.c(),s.m(t.parentNode,t)))},i:B,o:B,d:function(i){i&&L(t),s.d(i)}};return w("SvelteRegisterBlock",{block:r,id:de.name,type:"component",source:"",ctx:e}),r}function mt(e,t,n){let{$$slots:o={},$$scope:s}=t;ae("Iframe",o,[]);let{server:r}=t,{referrer:c}=t,{open:i}=t,{assetsUrl:a}=t,{chatStarted:d}=t,{onToggle:u}=t,{onRestartChat:h}=t,{onLoad:Q}=t;A(()=>{var l;(l=document.getElementById("chat-frame"))==null||l.addEventListener("load",Q)}),e.$$.on_mount.push(function(){r===void 0&&!("server"in t||e.$$.bound[e.$$.props.server])&&console.warn("<Iframe> was created without expected prop 'server'"),c===void 0&&!("referrer"in t||e.$$.bound[e.$$.props.referrer])&&console.warn("<Iframe> was created without expected prop 'referrer'"),i===void 0&&!("open"in t||e.$$.bound[e.$$.props.open])&&console.warn("<Iframe> was created without expected prop 'open'"),a===void 0&&!("assetsUrl"in t||e.$$.bound[e.$$.props.assetsUrl])&&console.warn("<Iframe> was created without expected prop 'assetsUrl'"),d===void 0&&!("chatStarted"in t||e.$$.bound[e.$$.props.chatStarted])&&console.warn("<Iframe> was created without expected prop 'chatStarted'"),u===void 0&&!("onToggle"in t||e.$$.bound[e.$$.props.onToggle])&&console.warn("<Iframe> was created without expected prop 'onToggle'"),h===void 0&&!("onRestartChat"in t||e.$$.bound[e.$$.props.onRestartChat])&&console.warn("<Iframe> was created without expected prop 'onRestartChat'"),Q===void 0&&!("onLoad"in t||e.$$.bound[e.$$.props.onLoad])&&console.warn("<Iframe> was created without expected prop 'onLoad'")});const m=["server","referrer","open","assetsUrl","chatStarted","onToggle","onRestartChat","onLoad"];return Object.keys(t).forEach(l=>{!~m.indexOf(l)&&l.slice(0,2)!=="$$"&&l!=="slot"&&console.warn(`<Iframe> was created with unknown prop '${l}'`)}),e.$$set=l=>{"server"in l&&n(0,r=l.server),"referrer"in l&&n(1,c=l.referrer),"open"in l&&n(2,i=l.open),"assetsUrl"in l&&n(3,a=l.assetsUrl),"chatStarted"in l&&n(4,d=l.chatStarted),"onToggle"in l&&n(5,u=l.onToggle),"onRestartChat"in l&&n(6,h=l.onRestartChat),"onLoad"in l&&n(7,Q=l.onLoad)},e.$capture_state=()=>({onMount:A,server:r,referrer:c,open:i,assetsUrl:a,chatStarted:d,onToggle:u,onRestartChat:h,onLoad:Q}),e.$inject_state=l=>{"server"in l&&n(0,r=l.server),"referrer"in l&&n(1,c=l.referrer),"open"in l&&n(2,i=l.open),"assetsUrl"in l&&n(3,a=l.assetsUrl),"chatStarted"in l&&n(4,d=l.chatStarted),"onToggle"in l&&n(5,u=l.onToggle),"onRestartChat"in l&&n(6,h=l.onRestartChat),"onLoad"in l&&n(7,Q=l.onLoad)},t&&"$$inject"in t&&e.$inject_state(t.$$inject),[r,c,i,a,d,u,h,Q]}class Ie extends le{constructor(t){super(t),ce(this,t,mt,de,K,{server:0,referrer:1,open:2,assetsUrl:3,chatStarted:4,onToggle:5,onRestartChat:6,onLoad:7},Ut),w("SvelteRegisterComponent",{component:this,tagName:"Iframe",options:t,id:de.name})}get server(){throw new Error("<Iframe>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}set server(t){throw new Error("<Iframe>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}get referrer(){throw new Error("<Iframe>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}set referrer(t){throw new Error("<Iframe>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}get open(){throw new Error("<Iframe>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}set open(t){throw new Error("<Iframe>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}get assetsUrl(){throw new Error("<Iframe>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}set assetsUrl(t){throw new Error("<Iframe>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}get chatStarted(){throw new Error("<Iframe>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}set chatStarted(t){throw new Error("<Iframe>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}get onToggle(){throw new Error("<Iframe>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}set onToggle(t){throw new Error("<Iframe>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}get onRestartChat(){throw new Error("<Iframe>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}set onRestartChat(t){throw new Error("<Iframe>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}get onLoad(){throw new Error("<Iframe>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}set onLoad(t){throw new Error("<Iframe>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}}const Te="src/OpenButton.svelte";function pt(e){$(e,"svelte-6wt8q2",`.svelte-6wt8q2,.svelte-6wt8q2:before,.svelte-6wt8q2:after{box-sizing:border-box}.chat-button-wrapper.svelte-6wt8q2{position:fixed;top:var(--fab-top-mobile, var(--fab-top, auto));right:var(--fab-right-mobile, var(--fab-right, 1.5em));bottom:var(--fab-bottom-mobile, var(--fab-bottom, 1.5em));left:var(--fab-left-mobile, var(--fab-left, auto));width:var(--fab-size-mobile, var(--fab-size, 5em));height:var(--fab-size-mobile, var(--fab-size, 5em));z-index:999}@media screen and (min-width: 768px){.chat-button-wrapper.svelte-6wt8q2{top:var(--fab-top, auto);right:var(--fab-right, 1.5em);bottom:var(--fab-bottom, 1.5em);left:var(--fab-left, auto);width:var(--fab-size, 6em);height:var(--fab-size, 6em)}}.chat-button.svelte-6wt8q2{display:block;height:100%;cursor:pointer;border-radius:50%;box-shadow:9px 9px 16px rgba(0, 0, 0, 0.25);transition:transform 100ms,
17
- box-shadow 100ms}.chat-button.svelte-6wt8q2:hover{box-shadow:16px 16px 16px rgba(0, 0, 0, 0.2);transform:translateY(-2px)}
18
- /*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiT3BlbkJ1dHRvbi5zdmVsdGUiLCJtYXBwaW5ncyI6IkFBa0NBLGNBQUMsQ0FDRCxjQUFDLE9BQU8sQ0FDUixjQUFDLE1BQU8sQ0FDTixVQUFVLENBQUUsVUFDZCxDQUNBLGtDQUFxQixDQUNuQixRQUFRLENBQUUsS0FBSyxDQUVmLEdBQUcsQ0FBRSxJQUFJLGdCQUFnQixDQUFDLHFCQUFxQixDQUFDLENBQ2hELEtBQUssQ0FBRSxJQUFJLGtCQUFrQixDQUFDLHdCQUF3QixDQUFDLENBQ3ZELE1BQU0sQ0FBRSxJQUFJLG1CQUFtQixDQUFDLHlCQUF5QixDQUFDLENBQzFELElBQUksQ0FBRSxJQUFJLGlCQUFpQixDQUFDLHNCQUFzQixDQUFDLENBRW5ELEtBQUssQ0FBRSxJQUFJLGlCQUFpQixDQUFDLHFCQUFxQixDQUFDLENBQ25ELE1BQU0sQ0FBRSxJQUFJLGlCQUFpQixDQUFDLHFCQUFxQixDQUFDLENBRXBELE9BQU8sQ0FBRSxHQUNYLENBR0EsT0FBTyxNQUFNLENBQUMsR0FBRyxDQUFDLFlBQVksS0FBSyxDQUFFLENBQ25DLGtDQUFxQixDQUNuQixHQUFHLENBQUUsSUFBSSxTQUFTLENBQUMsS0FBSyxDQUFDLENBQ3pCLEtBQUssQ0FBRSxJQUFJLFdBQVcsQ0FBQyxNQUFNLENBQUMsQ0FDOUIsTUFBTSxDQUFFLElBQUksWUFBWSxDQUFDLE1BQU0sQ0FBQyxDQUNoQyxJQUFJLENBQUUsSUFBSSxVQUFVLENBQUMsS0FBSyxDQUFDLENBRTNCLEtBQUssQ0FBRSxJQUFJLFVBQVUsQ0FBQyxJQUFJLENBQUMsQ0FDM0IsTUFBTSxDQUFFLElBQUksVUFBVSxDQUFDLElBQUksQ0FDN0IsQ0FDRixDQUVBLDBCQUFhLENBQ1gsT0FBTyxDQUFFLEtBQUssQ0FDZCxNQUFNLENBQUUsSUFBSSxDQUNaLE1BQU0sQ0FBRSxPQUFPLENBQ2YsYUFBYSxDQUFFLEdBQUcsQ0FDbEIsVUFBVSxDQUFFLEdBQUcsQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLENBQzVDLFVBQVUsQ0FDUixTQUFTLENBQUMsS0FBSztBQUNuQixJQUFJLFVBQVUsQ0FBQyxLQUNmLENBQ0EsMEJBQVksTUFBTyxDQUNqQixVQUFVLENBQUUsSUFBSSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxHQUFHLENBQUMsQ0FDN0MsU0FBUyxDQUFFLFdBQVcsSUFBSSxDQUM1QiIsIm5hbWVzIjpbXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZXMiOlsiT3BlbkJ1dHRvbi5zdmVsdGUiXX0= */`)}function ue(e){let t,n,o,s,r,c;const i={c:function(){t=g("div"),n=g("img"),U(n,"class","chat-button svelte-6wt8q2"),U(n,"alt","Open chat window"),j(n.src,o=`${e[0]}/fab.svg`)||U(n,"src",o),p(n,Te,30,0,488),U(t,"class","chat-button-wrapper svelte-6wt8q2"),U(t,"tabindex","0"),U(t,"role","button"),U(t,"aria-label","Open chat window"),U(t,"aria-expanded",s=e[2]?"true":"false"),p(t,Te,21,0,305)},l:function(d){throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option")},m:function(d,u){S(d,t,u),F(t,n),r||(c=[ke(t,"click",function(){q(e[1])&&e[1].apply(this,arguments)},!1),ke(t,"keydown",e[3],!1)],r=!0)},p:function(d,[u]){e=d,u&1&&!j(n.src,o=`${e[0]}/fab.svg`)&&U(n,"src",o),u&4&&s!==(s=e[2]?"true":"false")&&U(t,"aria-expanded",s)},i:B,o:B,d:function(d){d&&L(t),r=!1,C(c)}};return w("SvelteRegisterBlock",{block:i,id:ue.name,type:"component",source:"",ctx:e}),i}function Ft(e,t,n){let{$$slots:o={},$$scope:s}=t;ae("OpenButton",o,[]);let{assetsUrl:r}=t,{onToggle:c}=t,{open:i}=t;function a(u){const h=u.key;(h==="ArrowDown"||h==="ArrowRight"||h==="Enter"||h===" "||h==="Space")&&(u.stopPropagation(),c())}e.$$.on_mount.push(function(){r===void 0&&!("assetsUrl"in t||e.$$.bound[e.$$.props.assetsUrl])&&console.warn("<OpenButton> was created without expected prop 'assetsUrl'"),c===void 0&&!("onToggle"in t||e.$$.bound[e.$$.props.onToggle])&&console.warn("<OpenButton> was created without expected prop 'onToggle'"),i===void 0&&!("open"in t||e.$$.bound[e.$$.props.open])&&console.warn("<OpenButton> was created without expected prop 'open'")});const d=["assetsUrl","onToggle","open"];return Object.keys(t).forEach(u=>{!~d.indexOf(u)&&u.slice(0,2)!=="$$"&&u!=="slot"&&console.warn(`<OpenButton> was created with unknown prop '${u}'`)}),e.$$set=u=>{"assetsUrl"in u&&n(0,r=u.assetsUrl),"onToggle"in u&&n(1,c=u.onToggle),"open"in u&&n(2,i=u.open)},e.$capture_state=()=>({assetsUrl:r,onToggle:c,open:i,handleOnKeyDown:a}),e.$inject_state=u=>{"assetsUrl"in u&&n(0,r=u.assetsUrl),"onToggle"in u&&n(1,c=u.onToggle),"open"in u&&n(2,i=u.open)},t&&"$$inject"in t&&e.$inject_state(t.$$inject),[r,c,i,a]}class Oe extends le{constructor(t){super(t),ce(this,t,Ft,ue,K,{assetsUrl:0,onToggle:1,open:2},pt),w("SvelteRegisterComponent",{component:this,tagName:"OpenButton",options:t,id:ue.name})}get assetsUrl(){throw new Error("<OpenButton>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}set assetsUrl(t){throw new Error("<OpenButton>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}get onToggle(){throw new Error("<OpenButton>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}set onToggle(t){throw new Error("<OpenButton>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}get open(){throw new Error("<OpenButton>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}set open(t){throw new Error("<OpenButton>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}}let Me=!1;function wt(e){Me=e}function Bt(){return Me}/*! js-cookie v3.0.5 | MIT */function H(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)e[o]=n[o]}return e}var gt={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function fe(e,t){function n(s,r,c){if(!(typeof document>"u")){c=H({},t,c),typeof c.expires=="number"&&(c.expires=new Date(Date.now()+c.expires*864e5)),c.expires&&(c.expires=c.expires.toUTCString()),s=encodeURIComponent(s).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var i="";for(var a in c)c[a]&&(i+="; "+a,c[a]!==!0&&(i+="="+c[a].split(";")[0]));return document.cookie=s+"="+e.write(r,s)+i}}function o(s){if(!(typeof document>"u"||arguments.length&&!s)){for(var r=document.cookie?document.cookie.split("; "):[],c={},i=0;i<r.length;i++){var a=r[i].split("="),d=a.slice(1).join("=");try{var u=decodeURIComponent(a[0]);if(c[u]=e.read(d,u),s===u)break}catch{}}return s?c[s]:c}}return Object.create({set:n,get:o,remove:function(s,r){n(s,"",H({},r,{expires:-1}))},withAttributes:function(s){return fe(this.converter,H({},this.attributes,s))},withConverter:function(s){return fe(H({},this.converter,s),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var Je=fe(gt,{path:"/"});const Ve="bubble-chat-window-state",Qe=()=>{switch(Je.get(Ve)){case"open":return!0;case"closed":return!1;default:return}},Pe=e=>{const t=new Date(new Date().getTime()+288e5);Je.set(Ve,e,{expires:t})},he=[];let Ue=Qe();function Z(){Ue=!0,Pe("open"),he.forEach(function(e){e.call(window,!0)})}function T(){Ue=!1,Pe("closed"),he.forEach(function(e){e.call(window,!1)})}function G(){Ue?T():Z()}function me(){pe({type:"RESTART_CHAT"})}function bt(e){pe({type:"CHAT_MESSAGE_FROM_GUEST",text:e})}function Et(e){pe({type:"TRIGGER_STORY",story:e})}function pe(e){var n;const t=document.getElementById("chat-frame");(n=t==null?void 0:t.contentWindow)==null||n.postMessage(e,"*")}function Fe(e,t){switch(e){case"ON_CHAT_WINDOW_STATE_CHANGE":he.push(t);break;default:throw new Error("Unsupported event "+e)}}const Lt=Object.freeze(Object.defineProperty({__proto__:null,closeChatWindow:T,enterGuestMessage:bt,isChatbotLoaded:Bt,openChatWindow:Z,restartChat:me,subscribe:Fe,toggleChatWindow:G,triggerStory:Et},Symbol.toStringTag,{value:"Module"}));function xt(){return navigator.userAgent.match(/(iPad|iPhone|iPod)/g)}const We=()=>{xt()&&document.querySelectorAll("html, body").forEach(e=>{e.classList.add("iOS-device")})},St=e=>{"gtag"in window&&typeof window.gtag=="function"?window.gtag("event","",e):"dataLayer"in window&&Array.isArray(window.dataLayer)&&window.dataLayer.push(e)},je=(e,t,n,o,s)=>{window.addEventListener("message",r=>{const c=r.data;switch(c.type){case"webclient.chat.started":e();break;case"webclient.chat.ended":t();break;case"webclient.window.expand":n(c.devices,c.initial);break;case"webclient.window.close":o();break;case"webclient.change.url":s(c.url);break;case"google.tag.event":St(c.payload);break}},!1)},Ae=e=>new Promise(t=>{const n=document.getElementById(e);n?(n.onload=()=>{t(!0)},n.onerror=()=>{console.error("Failed to load CSS file: custom.css"),t(!1)}):(console.error("No custom.css file found"),t(!1))}),{document:vt}=Xe,ze="src/App.svelte";function yt(e){$(e,"svelte-4k2y00",`.bubble-chat.svelte-4k2y00{font-size:16px;visibility:hidden;opacity:0}.bubble-chat.chatbot-ready.svelte-4k2y00{visibility:visible;opacity:1}
19
- /*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQXBwLnN2ZWx0ZSIsIm1hcHBpbmdzIjoiQUFnSEUsMEJBQWEsQ0FDWCxTQUFTLENBQUUsSUFBSSxDQUNmLFVBQVUsQ0FBRSxNQUFNLENBQ2xCLE9BQU8sQ0FBRSxDQUNYLENBQ0EsWUFBWSw0QkFBZSxDQUN6QixVQUFVLENBQUUsT0FBTyxDQUNuQixPQUFPLENBQUUsQ0FDWCIsIm5hbWVzIjpbXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZXMiOlsiQXBwLnN2ZWx0ZSJdfQ== */`)}function we(e){let t,n,o,s,r,c,i,a,d;r=new Oe({props:{assetsUrl:e[3],open:e[6],onToggle:G},$$inline:!0}),i=new Ie({props:{server:e[1],referrer:e[2],assetsUrl:e[3],open:e[6],chatStarted:e[0],onToggle:G,onRestartChat:me,onLoad:e[7]},$$inline:!0});const u={c:function(){t=g("link"),o=ee(),s=g("div"),_e(r.$$.fragment),c=ee(),_e(i.$$.fragment),U(t,"id",Be),U(t,"rel","stylesheet"),U(t,"href",n=`${e[3]}/custom.css`),p(t,ze,94,2,2311),U(s,"class",a="bubble-chat "+(e[4]&&e[5]?"chatbot-ready":"")+" svelte-4k2y00"),p(s,ze,97,0,2413)},l:function(Q){throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option")},m:function(Q,m){F(vt.head,t),S(Q,o,m),S(Q,s,m),re(r,s,null),F(s,c),re(i,s,null),d=!0},p:function(Q,[m]){(!d||m&8&&n!==(n=`${Q[3]}/custom.css`))&&U(t,"href",n);const l={};m&8&&(l.assetsUrl=Q[3]),m&64&&(l.open=Q[6]),r.$set(l);const b={};m&2&&(b.server=Q[1]),m&4&&(b.referrer=Q[2]),m&8&&(b.assetsUrl=Q[3]),m&64&&(b.open=Q[6]),m&1&&(b.chatStarted=Q[0]),i.$set(b),(!d||m&48&&a!==(a="bubble-chat "+(Q[4]&&Q[5]?"chatbot-ready":"")+" svelte-4k2y00"))&&U(s,"class",a)},i:function(Q){d||(se(r.$$.fragment,Q),se(i.$$.fragment,Q),d=!0)},o:function(Q){Ne(r.$$.fragment,Q),Ne(i.$$.fragment,Q),d=!1},d:function(Q){Q&&(L(o),L(s)),L(t),ie(r),ie(i)}};return w("SvelteRegisterBlock",{block:u,id:we.name,type:"component",source:"",ctx:e}),u}const Be="chatbot-style";function Dt(e,t,n){let{$$slots:o={},$$scope:s}=t;ae("App",o,[]);let{server:r}=t,{referrer:c}=t,{assetsUrl:i=r?r.split("?")[0]:void 0}=t,{linkHandling:a="default"}=t,{chatStarted:d=!1}=t,u=!1,h=!1;We();let Q=Qe();Fe("ON_CHAT_WINDOW_STATE_CHANGE",function(P){n(6,Q=P)});function m(){n(0,d=!0)}function l(){n(0,d=!1)}function b(f,P){const X=window.innerWidth,ge=f==null||f==="all",be=f==="desktop"&&X>=768,It=f==="mobile"&&X<768;(P?Q!==!1:!0)&&(ge||be||It)&&Z()}function M(){T()}function J(f){const P=window.innerWidth,X=window.location.hostname,ge=new URL(f).hostname,be=X===ge;P<768&&T(),a==="new-tab"?window.open(f,"_blank"):a==="existing-tab"||be?document.location.href=f:window.open(f,"_blank")}function v(){n(5,h=!0)}je(m,l,b,M,J),A(async()=>{n(4,u=await Ae(Be))}),e.$$.on_mount.push(function(){r===void 0&&!("server"in t||e.$$.bound[e.$$.props.server])&&console.warn("<App> was created without expected prop 'server'"),c===void 0&&!("referrer"in t||e.$$.bound[e.$$.props.referrer])&&console.warn("<App> was created without expected prop 'referrer'")});const V=["server","referrer","assetsUrl","linkHandling","chatStarted"];return Object.keys(t).forEach(f=>{!~V.indexOf(f)&&f.slice(0,2)!=="$$"&&f!=="slot"&&console.warn(`<App> was created with unknown prop '${f}'`)}),e.$$set=f=>{"server"in f&&n(1,r=f.server),"referrer"in f&&n(2,c=f.referrer),"assetsUrl"in f&&n(3,i=f.assetsUrl),"linkHandling"in f&&n(8,a=f.linkHandling),"chatStarted"in f&&n(0,d=f.chatStarted)},e.$capture_state=()=>({onMount:A,Iframe:Ie,OpenButton:Oe,closeChatWindow:T,openChatWindow:Z,restartChat:me,subscribe:Fe,toggleChatWindow:G,iPhoneHack:We,registerChatbotEvents:je,waitTillCustomCssLoaded:Ae,getWindowState:Qe,server:r,referrer:c,assetsUrl:i,linkHandling:a,chatStarted:d,CUSTOM_CSS_ELEMENT_ID:Be,isCustomCssLoaded:u,isIframeLoaded:h,open:Q,onChatStartedEvent:m,onChatEndedEvent:l,onExpandWindowEvent:b,onCloseWindowEvent:M,onChangeUrlEvent:J,handleOnIframeLoad:v}),e.$inject_state=f=>{"server"in f&&n(1,r=f.server),"referrer"in f&&n(2,c=f.referrer),"assetsUrl"in f&&n(3,i=f.assetsUrl),"linkHandling"in f&&n(8,a=f.linkHandling),"chatStarted"in f&&n(0,d=f.chatStarted),"isCustomCssLoaded"in f&&n(4,u=f.isCustomCssLoaded),"isIframeLoaded"in f&&n(5,h=f.isIframeLoaded),"open"in f&&n(6,Q=f.open)},t&&"$$inject"in t&&e.$inject_state(t.$$inject),[d,r,c,i,u,h,Q,v,a]}class Nt extends le{constructor(t){super(t),ce(this,t,Dt,we,K,{server:1,referrer:2,assetsUrl:3,linkHandling:8,chatStarted:0},yt),w("SvelteRegisterComponent",{component:this,tagName:"App",options:t,id:we.name})}get server(){throw new Error("<App>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}set server(t){throw new Error("<App>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}get referrer(){throw new Error("<App>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}set referrer(t){throw new Error("<App>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}get assetsUrl(){throw new Error("<App>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}set assetsUrl(t){throw new Error("<App>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}get linkHandling(){throw new Error("<App>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}set linkHandling(t){throw new Error("<App>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}get chatStarted(){throw new Error("<App>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}set chatStarted(t){throw new Error("<App>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}}const _t=e=>e.replace(/\/embed\/bundle\.js/,""),kt=e=>{var t;return(t=e.dataset)==null?void 0:t.server},Ct=e=>{if(e&&"src"in e&&typeof e.src=="string")return kt(e)||_t(e.src)},O=document.querySelector("script#chatbot"),He=Ct(O),Rt=O!=null&&O.getAttribute("link-handling")?O.getAttribute("link-handling"):"default";window.chatbot=Lt;const Ze=()=>{console.log("Chatbot is loading from",He),new Nt({target:document.body,props:{server:He,referrer:window.location.href,linkHandling:Rt}}),wt(!0)},Ge=(e=0)=>{e>=3||document.readyState==="complete"?setTimeout(Ze,500):setTimeout(()=>{Ge(e+1)},500)};Ge();const Y=document.getElementById("chatbot");Y&&"src"in Y&&typeof Y.src=="string"&&Y.src.indexOf("caller=bookmarklet")>0&&setTimeout(Ze,500)})();
12
+ <br class="svelte-icor79"/>
13
+ src=&quot;https://server.com/webclient/embed/bundle.js&quot;&gt; &lt;/script&gt;
14
+ </code>
15
+ `,u(t,"class","svelte-icor79"),u(r,"class","svelte-icor79")},m(o,i){v(o,t,i),v(o,n,i),v(o,r,i)},p:m,d(o){o&&(w(t),w(n),w(r))}}}function je(e){let t,n,r,o;return{c(){t=p("div"),n=p("iframe"),u(n,"id","chat-frame"),u(n,"title","Chat"),u(n,"class","bot svelte-icor79"),I(n.src,r=`${e[0]}${e[0].indexOf("?")===-1?"?":"&"}referrer=${encodeURIComponent(e[1]??"")}`)||u(n,"src",r),u(n,"frameborder","0"),u(n,"allow","microphone; clipboard-write"),n.allowFullscreen=!0,u(t,"class","bot-border svelte-icor79"),u(t,"aria-hidden",o=e[2]?"false":"true"),ce(t,"closed",!e[2])},m(i,s){v(i,t,s),O(t,n)},p(i,s){s&3&&!I(n.src,r=`${i[0]}${i[0].indexOf("?")===-1?"?":"&"}referrer=${encodeURIComponent(i[1]??"")}`)&&u(n,"src",r),s&4&&o!==(o=i[2]?"false":"true")&&u(t,"aria-hidden",o),s&4&&ce(t,"closed",!i[2])},d(i){i&&w(t)}}}function Be(e){let t;function n(i,s){return i[0]?je:Me}let r=n(e),o=r(e);return{c(){o.c(),t=Le()},m(i,s){o.m(i,s),v(i,t,s)},p(i,[s]){r===(r=n(i))&&o?o.p(i,s):(o.d(1),o=r(i),o&&(o.c(),o.m(t.parentNode,t)))},i:m,o:m,d(i){i&&w(t),o.d(i)}}}function Fe(e,t,n){let{server:r}=t,{referrer:o}=t,{open:i}=t,{assetsUrl:s}=t,{chatStarted:c}=t,{onToggle:f}=t,{onRestartChat:d}=t,{onLoad:l}=t;return le(()=>{var a;(a=document.getElementById("chat-frame"))==null||a.addEventListener("load",l)}),e.$$set=a=>{"server"in a&&n(0,r=a.server),"referrer"in a&&n(1,o=a.referrer),"open"in a&&n(2,i=a.open),"assetsUrl"in a&&n(3,s=a.assetsUrl),"chatStarted"in a&&n(4,c=a.chatStarted),"onToggle"in a&&n(5,f=a.onToggle),"onRestartChat"in a&&n(6,d=a.onRestartChat),"onLoad"in a&&n(7,l=a.onLoad)},[r,o,i,s,c,f,d,l]}class Ge extends Q{constructor(t){super(),J(this,t,Fe,Be,H,{server:0,referrer:1,open:2,assetsUrl:3,chatStarted:4,onToggle:5,onRestartChat:6,onLoad:7},He)}}function Ye(e){M(e,"svelte-6wt8q2",`.svelte-6wt8q2,.svelte-6wt8q2:before,.svelte-6wt8q2:after{box-sizing:border-box}.chat-button-wrapper.svelte-6wt8q2{position:fixed;top:var(--fab-top-mobile, var(--fab-top, auto));right:var(--fab-right-mobile, var(--fab-right, 1.5em));bottom:var(--fab-bottom-mobile, var(--fab-bottom, 1.5em));left:var(--fab-left-mobile, var(--fab-left, auto));width:var(--fab-size-mobile, var(--fab-size, 5em));height:var(--fab-size-mobile, var(--fab-size, 5em));z-index:999}@media screen and (min-width: 768px){.chat-button-wrapper.svelte-6wt8q2{top:var(--fab-top, auto);right:var(--fab-right, 1.5em);bottom:var(--fab-bottom, 1.5em);left:var(--fab-left, auto);width:var(--fab-size, 6em);height:var(--fab-size, 6em)}}.chat-button.svelte-6wt8q2{display:block;height:100%;cursor:pointer;border-radius:50%;box-shadow:9px 9px 16px rgba(0, 0, 0, 0.25);transition:transform 100ms,
16
+ box-shadow 100ms}.chat-button.svelte-6wt8q2:hover{box-shadow:16px 16px 16px rgba(0, 0, 0, 0.2);transform:translateY(-2px)}`)}function Ke(e){let t,n,r,o,i,s;return{c(){t=p("div"),n=p("img"),u(n,"class","chat-button svelte-6wt8q2"),u(n,"alt","Open chat window"),I(n.src,r=`${e[0]}/fab.svg`)||u(n,"src",r),u(t,"class","chat-button-wrapper svelte-6wt8q2"),u(t,"tabindex","0"),u(t,"role","button"),u(t,"aria-label","Open chat window"),u(t,"aria-expanded",o=e[2]?"true":"false")},m(c,f){v(c,t,f),O(t,n),i||(s=[ae(t,"click",function(){P(e[1])&&e[1].apply(this,arguments)}),ae(t,"keydown",e[3])],i=!0)},p(c,[f]){e=c,f&1&&!I(n.src,r=`${e[0]}/fab.svg`)&&u(n,"src",r),f&4&&o!==(o=e[2]?"true":"false")&&u(t,"aria-expanded",o)},i:m,o:m,d(c){c&&w(t),i=!1,E(s)}}}function Ve(e,t,n){let{assetsUrl:r}=t,{onToggle:o}=t,{open:i}=t;function s(c){const f=c.key;(f==="ArrowDown"||f==="ArrowRight"||f==="Enter"||f===" "||f==="Space")&&(c.stopPropagation(),o())}return e.$$set=c=>{"assetsUrl"in c&&n(0,r=c.assetsUrl),"onToggle"in c&&n(1,o=c.onToggle),"open"in c&&n(2,i=c.open)},[r,o,i,s]}class Je extends Q{constructor(t){super(),J(this,t,Ve,Ke,H,{assetsUrl:0,onToggle:1,open:2},Ye)}}let be=!1;function Qe(e){be=e}function Xe(){return be}/*! js-cookie v3.0.5 | MIT */function q(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var Ze={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function X(e,t){function n(o,i,s){if(!(typeof document>"u")){s=q({},t,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var f in s)s[f]&&(c+="; "+f,s[f]!==!0&&(c+="="+s[f].split(";")[0]));return document.cookie=o+"="+e.write(i,o)+c}}function r(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var i=document.cookie?document.cookie.split("; "):[],s={},c=0;c<i.length;c++){var f=i[c].split("="),d=f.slice(1).join("=");try{var l=decodeURIComponent(f[0]);if(s[l]=e.read(d,l),o===l)break}catch{}}return o?s[o]:s}}return Object.create({set:n,get:r,remove:function(o,i){n(o,"",q({},i,{expires:-1}))},withAttributes:function(o){return X(this.converter,q({},this.attributes,o))},withConverter:function(o){return X(q({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var ge=X(Ze,{path:"/"});const we="bubble-chat-window-state",pe=()=>{switch(ge.get(we)){case"open":return!0;case"closed":return!1;default:return}},ve=e=>{const t=new Date(new Date().getTime()+288e5);ge.set(we,e,{expires:t})},Z=[];let $=pe();function ee(){$=!0,ve("open"),Z.forEach(function(e){e.call(window,!0)})}function D(){$=!1,ve("closed"),Z.forEach(function(e){e.call(window,!1)})}function te(){$?D():ee()}function _e(){ne({type:"RESTART_CHAT"})}function $e(e){ne({type:"CHAT_MESSAGE_FROM_GUEST",text:e})}function et(e){ne({type:"TRIGGER_STORY",story:e})}function ne(e){var n;const t=document.getElementById("chat-frame");(n=t==null?void 0:t.contentWindow)==null||n.postMessage(e,"*")}function ye(e,t){switch(e){case"ON_CHAT_WINDOW_STATE_CHANGE":Z.push(t);break;default:throw new Error("Unsupported event "+e)}}const tt=Object.freeze(Object.defineProperty({__proto__:null,closeChatWindow:D,enterGuestMessage:$e,isChatbotLoaded:Xe,openChatWindow:ee,restartChat:_e,subscribe:ye,toggleChatWindow:te,triggerStory:et},Symbol.toStringTag,{value:"Module"}));function nt(){return navigator.userAgent.match(/(iPad|iPhone|iPod)/g)}const ot=()=>{nt()&&document.querySelectorAll("html, body").forEach(e=>{e.classList.add("iOS-device")})},rt=e=>{"gtag"in window&&typeof window.gtag=="function"?window.gtag("event","",e):"dataLayer"in window&&Array.isArray(window.dataLayer)&&window.dataLayer.push(e)},it=(e,t,n,r,o)=>{window.addEventListener("message",i=>{const s=i.data;switch(s.type){case"webclient.chat.started":e();break;case"webclient.chat.ended":t();break;case"webclient.window.expand":n(s.devices,s.initial);break;case"webclient.window.close":r();break;case"webclient.change.url":o(s.url);break;case"google.tag.event":rt(s.payload);break}},!1)},st=e=>new Promise(t=>{const n=document.getElementById(e);n?(n.onload=()=>{t(!0)},n.onerror=()=>{console.error("Failed to load CSS file: custom.css"),t(!1)}):(console.error("No custom.css file found"),t(!1))}),{document:at}=Te;function ct(e){M(e,"svelte-4k2y00",".bubble-chat.svelte-4k2y00{font-size:16px;visibility:hidden;opacity:0}.bubble-chat.chatbot-ready.svelte-4k2y00{visibility:visible;opacity:1}")}function lt(e){let t,n,r,o,i,s,c,f,d;return i=new Je({props:{assetsUrl:e[3],open:e[6],onToggle:te}}),c=new Ge({props:{server:e[1],referrer:e[2],assetsUrl:e[3],open:e[6],chatStarted:e[0],onToggle:te,onRestartChat:_e,onLoad:e[7]}}),{c(){t=p("link"),r=j(),o=p("div"),me(i.$$.fragment),s=j(),me(c.$$.fragment),u(t,"id",ke),u(t,"rel","stylesheet"),u(t,"href",n=`${e[3]}/custom.css`),u(o,"class",f="bubble-chat "+(e[4]&&e[5]?"chatbot-ready":"")+" svelte-4k2y00")},m(l,a){O(at.head,t),v(l,r,a),v(l,o,a),K(i,o,null),O(o,s),K(c,o,null),d=!0},p(l,[a]){(!d||a&8&&n!==(n=`${l[3]}/custom.css`))&&u(t,"href",n);const _={};a&8&&(_.assetsUrl=l[3]),a&64&&(_.open=l[6]),i.$set(_);const b={};a&2&&(b.server=l[1]),a&4&&(b.referrer=l[2]),a&8&&(b.assetsUrl=l[3]),a&64&&(b.open=l[6]),a&1&&(b.chatStarted=l[0]),c.$set(b),(!d||a&48&&f!==(f="bubble-chat "+(l[4]&&l[5]?"chatbot-ready":"")+" svelte-4k2y00"))&&u(o,"class",f)},i(l){d||(Y(i.$$.fragment,l),Y(c.$$.fragment,l),d=!0)},o(l){he(i.$$.fragment,l),he(c.$$.fragment,l),d=!1},d(l){l&&(w(r),w(o)),w(t),V(i),V(c)}}}const ke="chatbot-style";function ft(e,t,n){let{server:r}=t,{referrer:o}=t,{assetsUrl:i=r?r.split("?")[0]:void 0}=t,{linkHandling:s="default"}=t,{chatStarted:c=!1}=t,f=!1,d=!1;ot();let l=pe();ye("ON_CHAT_WINDOW_STATE_CHANGE",function(L){n(6,l=L)});function a(){n(0,c=!0)}function _(){n(0,c=!1)}function b(h,L){const N=window.innerWidth,oe=h==null||h==="all",re=h==="desktop"&&N>=768,pt=h==="mobile"&&N<768;(L?l!==!1:!0)&&(oe||re||pt)&&ee()}function z(){D()}function gt(h){const L=window.innerWidth,N=window.location.hostname,oe=new URL(h).hostname,re=N===oe;L<768&&D(),s==="new-tab"?window.open(h,"_blank"):s==="existing-tab"||re?document.location.href=h:window.open(h,"_blank")}function wt(){n(5,d=!0)}return it(a,_,b,z,gt),le(async()=>{n(4,f=await st(ke))}),e.$$set=h=>{"server"in h&&n(1,r=h.server),"referrer"in h&&n(2,o=h.referrer),"assetsUrl"in h&&n(3,i=h.assetsUrl),"linkHandling"in h&&n(8,s=h.linkHandling),"chatStarted"in h&&n(0,c=h.chatStarted)},[c,r,o,i,f,d,l,wt,s]}class dt extends Q{constructor(t){super(),J(this,t,ft,lt,H,{server:1,referrer:2,assetsUrl:3,linkHandling:8,chatStarted:0},ct)}}const ut=e=>e.replace(/\/embed\/bundle\.js/,""),ht=e=>{var t;return(t=e.dataset)==null?void 0:t.server},mt=e=>{if(e&&"src"in e&&typeof e.src=="string")return ht(e)||ut(e.src)},U=document.querySelector("script#chatbot"),Ce=mt(U),bt=U!=null&&U.getAttribute("link-handling")?U.getAttribute("link-handling"):"default";window.chatbot=tt;const Se=()=>{console.log("Chatbot is loading from",Ce),new dt({target:document.body,props:{server:Ce,referrer:window.location.href,linkHandling:bt}}),Qe(!0)},Ee=(e=0)=>{e>=3||document.readyState==="complete"?setTimeout(Se,500):setTimeout(()=>{Ee(e+1)},500)};Ee();const W=document.getElementById("chatbot");W&&"src"in W&&typeof W.src=="string"&&W.src.indexOf("caller=bookmarklet")>0&&setTimeout(Se,500)})();
package/dist/index.d.ts CHANGED
@@ -6,6 +6,40 @@ export type RequestSessionRecordQuery = (params: {
6
6
  querystrings: any;
7
7
  sessionId: string;
8
8
  }) => Promise<Record<string, unknown>>;
9
+ export type MenuItemType = 'link' | 'action';
10
+ export type MenuItemIcon = 'mail' | 'phone' | 'scroll' | 'link';
11
+ export type MenuItemVisibility = 'always' | 'chat-only' | 'start-screen-only';
12
+ type BaseMenuItem = {
13
+ /**
14
+ * Unique key for this menu item.
15
+ * Used for translation as `header.menu.<id>`.
16
+ */
17
+ id: string;
18
+ /**
19
+ * Icon displayed for this menu item.
20
+ */
21
+ icon: MenuItemIcon;
22
+ /**
23
+ * If true, a divider (line) will be displayed after this item in the menu.
24
+ */
25
+ withDivider?: boolean;
26
+ /**
27
+ * Visibility of the menu item.
28
+ * - `always`: visible in all contexts (start screen, chat)
29
+ * - `chat-only`: visible only in the chat context
30
+ * - `start-screen-only`: visible only in the start screen context
31
+ */
32
+ visibility: MenuItemVisibility;
33
+ };
34
+ type LinkMenuItem = BaseMenuItem & {
35
+ type: 'link';
36
+ url: string;
37
+ };
38
+ type ActionMenuItem = BaseMenuItem & {
39
+ type: 'action';
40
+ action: Action;
41
+ };
42
+ export type MenuItem = LinkMenuItem | ActionMenuItem;
9
43
  export interface WebClientProps {
10
44
  getStartedAction?: Action;
11
45
  requestUserInfos?: RequestUserInfos;
@@ -78,6 +112,12 @@ export interface WebClientProps {
78
112
  * @default []
79
113
  * */
80
114
  commands?: string[];
115
+ /**
116
+ * List of custom menu items displayed in the chat header.
117
+ *
118
+ * @default []
119
+ */
120
+ menuItems?: MenuItem[];
81
121
  }
82
122
  export declare enum Devices {
83
123
  All = "all",
package/dist/index.js CHANGED
@@ -207,6 +207,7 @@ const sendConfigurationToClient = (socket, props, bot, clientName) => {
207
207
  enableGeneralConditions: !!props.enableGeneralConditions,
208
208
  enableSpeechSupport: !!props.speech,
209
209
  commands: props.commands || [],
210
+ menuItems: props.menuItems || [],
210
211
  };
211
212
  socket.emit('set-settings', settings);
212
213
  if (props.expandChatWindowAtStart &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botfabrik/engine-webclient",
3
- "version": "4.93.6",
3
+ "version": "4.93.7-alpha.1",
4
4
  "description": "Webclient for Botfabriks Bot Engine",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -39,5 +39,5 @@
39
39
  "tsx": "^4.20.3",
40
40
  "typescript": "5.8.3"
41
41
  },
42
- "gitHead": "a4512210c973c678f90800dc8117ce31683c0bd0"
42
+ "gitHead": "839b1ecf8533d485a2fa914fe6c4c1f93c5b2fa1"
43
43
  }