@sendbird/ai-agent-messenger-react 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/3obOzjh1.cjs +1 -0
- package/dist/cjs/B0k-GApQ.cjs +1 -0
- package/dist/cjs/B9NJk4MI.cjs +1 -0
- package/dist/cjs/BCFOnu0u.cjs +1 -0
- package/dist/cjs/BKtl4FE5.cjs +1 -0
- package/dist/cjs/BN09c8-A.cjs +1 -0
- package/dist/cjs/Bb0r6Nhu.cjs +1 -0
- package/dist/cjs/BmdfYY9c.cjs +1 -0
- package/dist/cjs/BsgzT_SF.cjs +1 -0
- package/dist/cjs/C7tppvZu.cjs +1 -0
- package/dist/cjs/CEjis_lK.cjs +1 -0
- package/dist/cjs/CKPzhVy2.cjs +1 -0
- package/dist/cjs/CXa-CGHE.cjs +1 -0
- package/dist/cjs/CdinIZGy.cjs +1 -0
- package/dist/cjs/Ce1MzjFq.cjs +1 -0
- package/dist/cjs/Cf3-irI8.cjs +1 -0
- package/dist/cjs/Cg6k0N51.cjs +1 -0
- package/dist/cjs/CmWLVNPR.cjs +1 -0
- package/dist/cjs/CtHfgPDp.cjs +1 -0
- package/dist/cjs/D00MOxhE.cjs +1 -0
- package/dist/cjs/D1kINslt.cjs +1 -0
- package/dist/cjs/D97ZpKUC.cjs +1 -0
- package/dist/cjs/DFIibgIj.cjs +1 -0
- package/dist/cjs/DNmdC4-j.cjs +1 -0
- package/dist/cjs/DVFnHuzP.cjs +1 -0
- package/dist/cjs/D_C06nOa.cjs +1 -0
- package/dist/cjs/DcDTXo8_.cjs +1 -0
- package/dist/cjs/DlvEEpWX.cjs +1 -0
- package/dist/cjs/DqpDy_26.cjs +1 -0
- package/dist/cjs/JA0x62Fd.cjs +1 -0
- package/dist/cjs/_YfLwFkX.cjs +1 -0
- package/dist/cjs/c6TZaE94.cjs +1 -0
- package/dist/cjs/eJXfXI1_.cjs +1 -0
- package/dist/cjs/kp5wcW4s.cjs +1 -0
- package/dist/cjs/nmePqxlD.cjs +1 -0
- package/dist/cjs/ohTjxqcW.cjs +1 -0
- package/dist/cjs/tVaciR-_.cjs +207 -0
- package/dist/cjs/wf-LdaaN.cjs +1 -0
- package/dist/cjs/ygZY2D-5.cjs +1 -0
- package/dist/cjs/zbLY6xl_.cjs +1 -0
- package/dist/es/{BLb52EXE.js → BMNdyD6n.js} +1 -1
- package/dist/es/{BLgWjiCI.js → BX7cHbkb.js} +1 -1
- package/dist/es/Ch_6OPTz.js +298 -0
- package/dist/es/{BXYgriG3.js → DLjpH35l.js} +347 -341
- package/dist/es/{Do6SFGnr.js → DRPdjwTV.js} +1 -1
- package/dist/es/{C58hkclZ.js → PXojwkiO.js} +1 -1
- package/dist/es/{CSmSKViW.js → x6g8obrl.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/dist/cjs/7sOpksia.cjs +0 -1
- package/dist/cjs/8n-lNFQi.cjs +0 -1
- package/dist/cjs/B3UTkiZj.cjs +0 -1
- package/dist/cjs/BA7eP_0y.cjs +0 -1
- package/dist/cjs/BAVQt3SD.cjs +0 -1
- package/dist/cjs/BCgKHuFY.cjs +0 -1
- package/dist/cjs/BE_UkM2D.cjs +0 -1
- package/dist/cjs/BIQTp46D.cjs +0 -1
- package/dist/cjs/BdOKSPN6.cjs +0 -1
- package/dist/cjs/Bgi113yh.cjs +0 -1
- package/dist/cjs/Bj4NR2YK.cjs +0 -1
- package/dist/cjs/BlL9mJ1G.cjs +0 -1
- package/dist/cjs/BqEtwmXd.cjs +0 -1
- package/dist/cjs/Bt7i9B_X.cjs +0 -1
- package/dist/cjs/CCMVMvEA.cjs +0 -1
- package/dist/cjs/CCeC8Z_c.cjs +0 -1
- package/dist/cjs/CI0UG_vg.cjs +0 -1
- package/dist/cjs/CYWHwsSv.cjs +0 -1
- package/dist/cjs/CYokBh9g.cjs +0 -1
- package/dist/cjs/CbUzmxPM.cjs +0 -1
- package/dist/cjs/Ck7-iOpx.cjs +0 -1
- package/dist/cjs/CsHNpYuX.cjs +0 -1
- package/dist/cjs/CtPGsbRN.cjs +0 -1
- package/dist/cjs/D-9eFzYR.cjs +0 -1
- package/dist/cjs/D2OIGiV4.cjs +0 -1
- package/dist/cjs/D4zXKBh-.cjs +0 -1
- package/dist/cjs/D6IK2BmB.cjs +0 -1
- package/dist/cjs/DDP53huc.cjs +0 -1
- package/dist/cjs/DRna04x8.cjs +0 -1
- package/dist/cjs/DkhICmYA.cjs +0 -1
- package/dist/cjs/DxL6Qc1e.cjs +0 -1
- package/dist/cjs/Sq3g8f6p.cjs +0 -207
- package/dist/cjs/VJQajGKm.cjs +0 -1
- package/dist/cjs/VvpIczL4.cjs +0 -1
- package/dist/cjs/WCwJJYUZ.cjs +0 -1
- package/dist/cjs/dDuc9YHc.cjs +0 -1
- package/dist/cjs/dtQmhQL-.cjs +0 -1
- package/dist/cjs/na-hjKnS.cjs +0 -1
- package/dist/cjs/o1iiHxMe.cjs +0 -1
- package/dist/cjs/u4HvlMWl.cjs +0 -1
- package/dist/es/DH2PekOm.js +0 -18
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as r from "react";
|
|
2
|
-
import { createContext as Te, useContext as ne, useEffect as D, useState as _, useId as xn, useRef as F, useCallback as U, useLayoutEffect as le, forwardRef as Le, useImperativeHandle as vr,
|
|
2
|
+
import { createContext as Te, useContext as ne, useEffect as D, useState as _, useId as xn, useRef as F, useCallback as U, useLayoutEffect as le, forwardRef as Le, useImperativeHandle as vr, Suspense as Me, lazy as w, useMemo as ve, Component as _r, Fragment as Ft, useReducer as Sr, Children as Tr } from "react";
|
|
3
3
|
import wr, { SendbirdProduct as kr, DeviceOsPlatform as Ut, SendbirdPlatform as Ar, ConnectionHandler as Xe, SendbirdError as Ir, SessionHandler as $r, LogLevel as En, ConnectionState as Mr } from "@sendbird/chat";
|
|
4
4
|
import u, { css as $, ThemeProvider as Or, useTheme as Ct, createGlobalStyle as Lr, StyleSheetManager as Rr, keyframes as Cn } from "styled-components";
|
|
5
5
|
import { format as yn, isSameMinute as Ht, isSameDay as Dr } from "date-fns";
|
|
@@ -142,7 +142,7 @@ const eo = () => {
|
|
|
142
142
|
return { promise: new Promise((o, i) => {
|
|
143
143
|
e = o, t = i;
|
|
144
144
|
}), resolve: e, reject: t };
|
|
145
|
-
}, to = "1.2.
|
|
145
|
+
}, to = "1.2.2", Ie = "sb-agent", no = to;
|
|
146
146
|
var wn = /* @__PURE__ */ ((e) => (e[e.VERBOSE = 0] = "VERBOSE", e[e.DEBUG = 1] = "DEBUG", e[e.INFO = 2] = "INFO", e[e.WARN = 3] = "WARN", e[e.ERROR = 4] = "ERROR", e[e.NONE = 5] = "NONE", e))(wn || {});
|
|
147
147
|
class kn {
|
|
148
148
|
constructor(t) {
|
|
@@ -1935,6 +1935,9 @@ function zn(e) {
|
|
|
1935
1935
|
return e.replace(t, (n) => `<span id=${Ti} aria-label="masked-text">${n}</span>`);
|
|
1936
1936
|
}
|
|
1937
1937
|
function Vi(e) {
|
|
1938
|
+
return e.replace(/\*\*(.*?)\*\*/g, "<b>$1</b>");
|
|
1939
|
+
}
|
|
1940
|
+
function Wi(e) {
|
|
1938
1941
|
const t = /```(\w+)?\n([\s\S]*?)```/g, n = [];
|
|
1939
1942
|
let o = 0;
|
|
1940
1943
|
return e.replace(t, (i, ...a) => {
|
|
@@ -1952,16 +1955,16 @@ function Vi(e) {
|
|
|
1952
1955
|
value: e.slice(o).trim()
|
|
1953
1956
|
}), n.map((i) => i.type !== "text" ? i : { ...i, value: zn(i.value) });
|
|
1954
1957
|
}
|
|
1955
|
-
const
|
|
1958
|
+
const Gi = w(async () => ({ default: (await import("./x6g8obrl.js")).MarkdownText })), ji = w(async () => ({ default: (await import("./Ch_6OPTz.js")).CodeBlock }));
|
|
1956
1959
|
function Zt(e) {
|
|
1957
1960
|
var i, a;
|
|
1958
|
-
const t = e.maxBodyWidth ?? Pe, n = ve(() =>
|
|
1961
|
+
const t = e.maxBodyWidth ?? Pe, n = ve(() => Wi(e.message), [e.message]), o = {
|
|
1959
1962
|
id: `${ue}-text-body`,
|
|
1960
1963
|
$maxWidth: t,
|
|
1961
1964
|
$color: (i = e.customStyle) == null ? void 0 : i.bubbleContentColor,
|
|
1962
1965
|
$bgColor: (a = e.customStyle) == null ? void 0 : a.bubbleBackgroundColor
|
|
1963
1966
|
};
|
|
1964
|
-
return n.length === 0 ? e.children ? /* @__PURE__ */ r.createElement(Yt, { ...o }, e.children) : null : /* @__PURE__ */ r.createElement(Yt, { ...o }, n.map((s, l) => s.type === "text" ? /* @__PURE__ */ r.createElement(qt, { key: l, variant: "body3" }, /* @__PURE__ */ r.createElement(Me, { fallback: s.value }, /* @__PURE__ */ r.createElement(
|
|
1967
|
+
return n.length === 0 ? e.children ? /* @__PURE__ */ r.createElement(Yt, { ...o }, e.children) : null : /* @__PURE__ */ r.createElement(Yt, { ...o }, n.map((s, l) => s.type === "text" ? /* @__PURE__ */ r.createElement(qt, { key: l, variant: "body3" }, /* @__PURE__ */ r.createElement(Me, { fallback: s.value }, /* @__PURE__ */ r.createElement(Gi, null, s.value))) : s.type === "code" ? /* @__PURE__ */ r.createElement(Me, { key: l, fallback: /* @__PURE__ */ r.createElement(qt, { variant: "body3" }, s.value) }, /* @__PURE__ */ r.createElement(ji, { code: s.value, language: s.language })) : null), e.children);
|
|
1965
1968
|
}
|
|
1966
1969
|
const Yt = u.div`display:flex;flex-direction:column;border-radius:12px;overflow:hidden;max-width:${({ $maxWidth: e }) => e}px;${({ theme: e, $color: t, $bgColor: n }) => $`
|
|
1967
1970
|
color: ${t || e.colors.messageIncoming.text};
|
|
@@ -1971,7 +1974,7 @@ const Yt = u.div`display:flex;flex-direction:column;border-radius:12px;overflow:
|
|
|
1971
1974
|
transition: max-width 0.3s;
|
|
1972
1975
|
overflow-wrap: break-word;
|
|
1973
1976
|
`, qt = u(k)`align-items:flex-start;line-height:140%;white-space:pre-wrap;padding:0 12px;`;
|
|
1974
|
-
function
|
|
1977
|
+
function Ki(e) {
|
|
1975
1978
|
const { stringSet: t } = R(), n = Hn(e) ? /* @__PURE__ */ r.createElement(Zt, { ...e }) : null;
|
|
1976
1979
|
if (e.messageType === "user")
|
|
1977
1980
|
return n;
|
|
@@ -1983,26 +1986,26 @@ function ji(e) {
|
|
|
1983
1986
|
}
|
|
1984
1987
|
const At = (e) => /* @__PURE__ */ r.createElement("svg", { width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.0008 0.973633C10.6172 0.973633 9.49558 2.09527 9.49558 3.47888C9.49558 4.50705 10.115 5.39055 11.0009 5.77664V7.47887H13.0009V5.77653C13.8868 5.3904 14.5061 4.50696 14.5061 3.47888C14.5061 2.09527 13.3844 0.973633 12.0008 0.973633ZM0.250977 16.5788L0.250977 10.5789H2.25098L2.25098 16.5788H0.250977ZM21.7511 10.5789V16.5788H23.7511V10.5789H21.7511ZM18.251 7.47888H3.25097V18.9789C3.25097 20.3596 4.37026 21.4789 5.75097 21.4789H18.251C19.6317 21.4789 20.751 20.3596 20.751 18.9789V9.97887C20.751 8.59816 19.6317 7.47888 18.251 7.47888ZM9.78434 11.9539V15.2038C9.78434 15.7561 9.33663 16.2038 8.78434 16.2038C8.23206 16.2038 7.78434 15.7561 7.78434 15.2038V11.9539C7.78434 11.4016 8.23206 10.9539 8.78434 10.9539C9.33663 10.9539 9.78434 11.4016 9.78434 11.9539ZM16.2677 11.9539V15.2038C16.2677 15.7561 15.82 16.2038 15.2677 16.2038C14.7154 16.2038 14.2677 15.7561 14.2677 15.2038V11.9539C14.2677 11.4016 14.7154 10.9539 15.2677 10.9539C15.82 10.9539 16.2677 11.4016 16.2677 11.9539Z", fill: "#0D0D0D" }));
|
|
1985
1988
|
function It({ id: e, src: t, size: n = 56, onClick: o, style: i }) {
|
|
1986
|
-
return /* @__PURE__ */ r.createElement(
|
|
1989
|
+
return /* @__PURE__ */ r.createElement(Zi, { id: e, tabIndex: 0, onClick: o, $size: Z(n), style: i }, t ? /* @__PURE__ */ r.createElement(Yi, { src: t }) : /* @__PURE__ */ r.createElement(O, { type: "user", size: n }));
|
|
1987
1990
|
}
|
|
1988
|
-
const
|
|
1989
|
-
function
|
|
1991
|
+
const Zi = u.div`border-radius:50%;display:inline-block;overflow:hidden;position:relative;flex-shrink:0;height:${(e) => e.$size};width:${(e) => e.$size};background-color:${h.themedColor.bg_100_500};&:focus{outline:none;}`, Yi = u.img`object-fit:cover;width:100%;height:100%;position:absolute;`;
|
|
1992
|
+
function qi({ sender: e, isBotMessage: t }) {
|
|
1990
1993
|
const n = `${ue}-sender-avatar`;
|
|
1991
|
-
return !e.profileUrl && t ? /* @__PURE__ */ r.createElement(
|
|
1994
|
+
return !e.profileUrl && t ? /* @__PURE__ */ r.createElement(Ji, { id: n }, /* @__PURE__ */ r.createElement(At, null)) : /* @__PURE__ */ r.createElement(It, { id: n, size: qe, src: e.profileUrl });
|
|
1992
1995
|
}
|
|
1993
|
-
const
|
|
1994
|
-
function
|
|
1995
|
-
return /* @__PURE__ */ r.createElement(
|
|
1996
|
+
const Ji = u.div`flex-shrink:0;width:${qe}px;height:${qe}px;box-sizing:border-box;padding:6px;border-radius:50%;display:flex;justify-content:center;align-items:center;background-color:${({ theme: e }) => e.colors.base.primary};path{fill:${({ theme: e }) => e.colors.base.primaryContrastContent};}}`;
|
|
1997
|
+
function Xi({ sender: e }) {
|
|
1998
|
+
return /* @__PURE__ */ r.createElement(Qi, { id: `${ue}-sender-name`, variant: "caption1", color: h.themedColor.textMidEmphasis }, e.nickname);
|
|
1996
1999
|
}
|
|
1997
|
-
const
|
|
1998
|
-
function
|
|
2000
|
+
const Qi = u(k)`text-align:start;width:100%;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-block:5px;padding-inline:0 7px;`;
|
|
2001
|
+
function es({ createdAt: e }) {
|
|
1999
2002
|
const { stringSet: t, format: n } = R();
|
|
2000
2003
|
return e ? /* @__PURE__ */ r.createElement(k, { id: `${ue}-sent-time`, variant: "caption4", color: h.themedColor.textLowEmphasis }, n(e, t.DATE_FORMAT__MESSAGE_TIMESTAMP)) : null;
|
|
2001
2004
|
}
|
|
2002
|
-
function
|
|
2003
|
-
return /* @__PURE__ */ r.createElement(
|
|
2005
|
+
function ts({ customStyle: e }) {
|
|
2006
|
+
return /* @__PURE__ */ r.createElement(ns, { $bgColor: e == null ? void 0 : e.bubbleBackgroundColor }, [0, 1, 2].map((t) => /* @__PURE__ */ r.createElement(rs, { key: t, $color: e == null ? void 0 : e.bubbleContentColor })));
|
|
2004
2007
|
}
|
|
2005
|
-
const
|
|
2008
|
+
const ns = u.div`align-items:center;border-radius:12px;display:flex;gap:6px;justify-content:center;padding:16px 12px;background-color:${({ theme: e, $bgColor: t }) => t || e.colors.messageIncoming.background};`, rs = u.span`animation:blink 1.4s infinite;animation-fill-mode:both;border-radius:50%;height:8px;width:8px;background:${({ theme: e, $color: t }) => t || e.colors.messageIncoming.text};@keyframes blink{0%{opacity:0.12;transform:scale(1);}21.43%{opacity:0.38;transform:scale(1.2);}42.86%{opacity:0.12;transform:scale(1);}100%{opacity:0.12;transform:scale(1);}}&:nth-child(1){animation-delay:0.4s;}&:nth-child(2){animation-delay:0.6s;}&:nth-child(3){animation-delay:0.8s;}`;
|
|
2006
2009
|
function Oe() {
|
|
2007
2010
|
}
|
|
2008
2011
|
async function Vn(e) {
|
|
@@ -2020,24 +2023,24 @@ function jn(e) {
|
|
|
2020
2023
|
const t = (n = e == null ? void 0 : e.conversation) == null ? void 0 : n.handoff;
|
|
2021
2024
|
return !!(t != null && t.timestamp);
|
|
2022
2025
|
}
|
|
2023
|
-
function
|
|
2026
|
+
function os(e) {
|
|
2024
2027
|
return Gn(e) && !jn(e);
|
|
2025
2028
|
}
|
|
2026
|
-
function
|
|
2029
|
+
function is({
|
|
2027
2030
|
extendedMessagePayload: e,
|
|
2028
2031
|
onClickCTA: t = ({ url: n }) => Vn(n)
|
|
2029
2032
|
}) {
|
|
2030
2033
|
const n = e == null ? void 0 : e.cta_button;
|
|
2031
|
-
return n ? /* @__PURE__ */ r.createElement(
|
|
2034
|
+
return n ? /* @__PURE__ */ r.createElement(ss, { id: `${ue}-ext-cta-button`, role: "button", onClick: () => t(n) }, /* @__PURE__ */ r.createElement(as, { variant: "button" }, n.label)) : null;
|
|
2032
2035
|
}
|
|
2033
|
-
const
|
|
2036
|
+
const ss = u.div`display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:6px;padding:8px;color:${h.themedColor.textHighEmphasis};background-color:${h.color.background50};${N.dark`
|
|
2034
2037
|
background-color: ${h.color.ondark.textDisabled};
|
|
2035
2038
|
`}
|
|
2036
|
-
`,
|
|
2037
|
-
function
|
|
2039
|
+
`, as = u(k)`overflow:hidden;text-overflow:ellipsis;white-space:nowrap;`;
|
|
2040
|
+
function ls(e) {
|
|
2038
2041
|
return /* @__PURE__ */ r.createElement(r.Fragment, null);
|
|
2039
2042
|
}
|
|
2040
|
-
class
|
|
2043
|
+
class cs extends _r {
|
|
2041
2044
|
constructor(t) {
|
|
2042
2045
|
super(t), this.state = {
|
|
2043
2046
|
hasError: !1
|
|
@@ -2050,29 +2053,29 @@ class ls extends _r {
|
|
|
2050
2053
|
return this.state.hasError ? this.props.errorFallback : /* @__PURE__ */ r.createElement(Me, { fallback: this.props.loadingFallback }, this.props.children);
|
|
2051
2054
|
}
|
|
2052
2055
|
}
|
|
2053
|
-
const
|
|
2056
|
+
const ds = /* @__PURE__ */ new Set(["default"]), { MessageTemplate: us } = jr({
|
|
2054
2057
|
parser: Wr,
|
|
2055
2058
|
renderer: Vr,
|
|
2056
2059
|
Container: (e) => /* @__PURE__ */ r.createElement("div", { ...e })
|
|
2057
2060
|
});
|
|
2058
|
-
function
|
|
2061
|
+
function ms(e) {
|
|
2059
2062
|
return /* @__PURE__ */ r.createElement(
|
|
2060
|
-
|
|
2063
|
+
cs,
|
|
2061
2064
|
{
|
|
2062
2065
|
errorFallback: e.messageTemplateErrorFallback,
|
|
2063
2066
|
loadingFallback: e.messageTemplateLoadingFallback
|
|
2064
2067
|
},
|
|
2065
|
-
/* @__PURE__ */ r.createElement(
|
|
2068
|
+
/* @__PURE__ */ r.createElement(hs, { ...e })
|
|
2066
2069
|
);
|
|
2067
2070
|
}
|
|
2068
|
-
const
|
|
2071
|
+
const hs = ({
|
|
2069
2072
|
extendedMessagePayload: e,
|
|
2070
2073
|
onGetCachedMessageTemplate: t = () => null,
|
|
2071
2074
|
onRequestMessageTemplate: n,
|
|
2072
2075
|
onHandleTemplateInternalAction: o = Oe
|
|
2073
2076
|
}) => {
|
|
2074
2077
|
const i = e == null ? void 0 : e.message_template;
|
|
2075
|
-
if (!
|
|
2078
|
+
if (!ds.has((i == null ? void 0 : i.type) ?? "default")) throw new Error("Unsupported template type");
|
|
2076
2079
|
if (!n) throw new Error("onRequestMessageTemplate is required");
|
|
2077
2080
|
const { theme: s } = ii(), l = Go({
|
|
2078
2081
|
onRequestTemplate: n,
|
|
@@ -2083,24 +2086,24 @@ const ms = ({
|
|
|
2083
2086
|
viewVariables: i == null ? void 0 : i.view_variables,
|
|
2084
2087
|
aiAgentColorVariables: s.aiAgentColorVariables
|
|
2085
2088
|
});
|
|
2086
|
-
return /* @__PURE__ */ r.createElement(
|
|
2089
|
+
return /* @__PURE__ */ r.createElement(gs, { id: `${ue}-ext-message-template` }, /* @__PURE__ */ r.createElement(
|
|
2087
2090
|
Gr,
|
|
2088
2091
|
{
|
|
2089
2092
|
handleInternalAction: (c, d) => {
|
|
2090
2093
|
c.stopPropagation(), o == null || o(d);
|
|
2091
2094
|
}
|
|
2092
2095
|
},
|
|
2093
|
-
/* @__PURE__ */ r.createElement(
|
|
2096
|
+
/* @__PURE__ */ r.createElement(us, { templateItems: l.body.items, templateVersion: l.version })
|
|
2094
2097
|
));
|
|
2095
|
-
},
|
|
2096
|
-
function
|
|
2098
|
+
}, gs = u.div`box-sizing:border-box;overflow:hidden;width:100%;`;
|
|
2099
|
+
function ps({
|
|
2097
2100
|
extendedMessagePayload: e,
|
|
2098
2101
|
onClickSuggestedReply: t,
|
|
2099
2102
|
suggestedRepliesDirection: n = "vertical"
|
|
2100
2103
|
}) {
|
|
2101
2104
|
const [o, i] = _(!1), a = (e == null ? void 0 : e.suggested_replies) ?? [];
|
|
2102
|
-
return a.length === 0 || o ? null : /* @__PURE__ */ r.createElement(
|
|
2103
|
-
|
|
2105
|
+
return a.length === 0 || o ? null : /* @__PURE__ */ r.createElement(fs, { id: `${ue}-ext-suggested-replies`, $type: n }, a.map((s, l) => /* @__PURE__ */ r.createElement(
|
|
2106
|
+
bs,
|
|
2104
2107
|
{
|
|
2105
2108
|
key: l,
|
|
2106
2109
|
$type: n,
|
|
@@ -2112,38 +2115,38 @@ function gs({
|
|
|
2112
2115
|
s
|
|
2113
2116
|
)));
|
|
2114
2117
|
}
|
|
2115
|
-
const
|
|
2116
|
-
${e === "vertical" ?
|
|
2118
|
+
const fs = u.div`margin:16px 0;padding:0 ${oe}px;position:relative;display:flex;gap:8px;${({ $type: e }) => e === "vertical" ? xs : Es};`, bs = u(k)`box-sizing:border-box;padding:8px 12px;display:flex;align-items:center;border-radius:20px / clamp(20px,5%,100px);cursor:pointer;word-break:break-word;color:${h.color.primary.main};border:1px solid ${h.color.primary.main};background-color:${h.themedColor.bg_50_600};&:hover{background-color:${h.themedColor.bg_100_500};}${({ $type: e, theme: t }) => $`
|
|
2119
|
+
${e === "vertical" ? Cs : ys};
|
|
2117
2120
|
&:active {
|
|
2118
2121
|
background-color: ${t.colors.base.primary};
|
|
2119
2122
|
color: ${t.colors.base.primaryContrastContent};
|
|
2120
2123
|
}
|
|
2121
2124
|
`}
|
|
2122
|
-
`,
|
|
2125
|
+
`, xs = $`flex-direction:column;align-items:flex-end;`, Es = $`flex-direction:row;overflow-x:scroll;-ms-overflow-style:none;scrollbar-width:none;&::-webkit-scrollbar{display:none;}`, Cs = $`max-width:calc(100% - 70px);white-space:pre-wrap;`, ys = $`white-space:nowrap;`;
|
|
2123
2126
|
function $t(e) {
|
|
2124
2127
|
return e();
|
|
2125
2128
|
}
|
|
2126
2129
|
const _e = we({
|
|
2127
|
-
template:
|
|
2130
|
+
template: vs,
|
|
2128
2131
|
components: {
|
|
2129
|
-
SenderName:
|
|
2130
|
-
SenderAvatar:
|
|
2131
|
-
SentTime:
|
|
2132
|
-
MessageBody:
|
|
2133
|
-
TypingIndicator:
|
|
2134
|
-
SuggestedReplies:
|
|
2135
|
-
MessageTemplate:
|
|
2136
|
-
CTAButton:
|
|
2137
|
-
MessageLogs:
|
|
2132
|
+
SenderName: Xi,
|
|
2133
|
+
SenderAvatar: qi,
|
|
2134
|
+
SentTime: es,
|
|
2135
|
+
MessageBody: Ki,
|
|
2136
|
+
TypingIndicator: ts,
|
|
2137
|
+
SuggestedReplies: ps,
|
|
2138
|
+
MessageTemplate: ms,
|
|
2139
|
+
CTAButton: is,
|
|
2140
|
+
MessageLogs: ls
|
|
2138
2141
|
}
|
|
2139
2142
|
});
|
|
2140
|
-
function
|
|
2143
|
+
function vs(e) {
|
|
2141
2144
|
return /* @__PURE__ */ r.createElement(Kn, { ...e, testerMode: !1 });
|
|
2142
2145
|
}
|
|
2143
2146
|
function Kn(e) {
|
|
2144
2147
|
var g, p, x, f;
|
|
2145
2148
|
const { components: t } = _e.useContext(), n = !!e.isTyping, o = e.testerMode, i = !!((g = e.extendedMessagePayload) != null && g.message_template), a = !!((p = e.extendedMessagePayload) != null && p.cta_button), s = !!e.createdAt, l = $t(() => e.messageType === "user" ? e.message.length > 0 : !0), c = e.groupType === "top" || e.groupType === "single", d = e.groupType === "bottom" || e.groupType === "single", m = o ? 0 : qe;
|
|
2146
|
-
return /* @__PURE__ */ r.createElement(
|
|
2149
|
+
return /* @__PURE__ */ r.createElement(_s, { $marginBottom: n ? 0 : Tt(e.groupType) }, c && /* @__PURE__ */ r.createElement(Ss, null, !o && /* @__PURE__ */ r.createElement(t.SenderAvatar, { ...e }), /* @__PURE__ */ r.createElement(t.SenderName, { ...e })), /* @__PURE__ */ r.createElement(Ft, null, /* @__PURE__ */ r.createElement(ct, { $extraStartPadding: m }, n && /* @__PURE__ */ r.createElement(t.TypingIndicator, { ...e }), /* @__PURE__ */ r.createElement(t.MessageBody, { ...e }, a && /* @__PURE__ */ r.createElement("div", { style: { marginTop: 12, marginInline: 12 } }, /* @__PURE__ */ r.createElement(t.CTAButton, { ...e })))), i && /* @__PURE__ */ r.createElement(Jt, { $startPadding: 0, $endPadding: 0, style: { marginTop: l ? ke : 0 } }, /* @__PURE__ */ r.createElement(
|
|
2147
2150
|
t.MessageTemplate,
|
|
2148
2151
|
{
|
|
2149
2152
|
...e,
|
|
@@ -2157,18 +2160,18 @@ function Kn(e) {
|
|
|
2157
2160
|
)),
|
|
2158
2161
|
messageTemplateLoadingFallback: e.messageTemplateLoadingFallback ?? /* @__PURE__ */ r.createElement(ct, { $extraStartPadding: m }, /* @__PURE__ */ r.createElement(t.TypingIndicator, { ...e }))
|
|
2159
2162
|
}
|
|
2160
|
-
))), d && s && /* @__PURE__ */ r.createElement(
|
|
2163
|
+
))), d && s && /* @__PURE__ */ r.createElement(Ts, { $extraStartPadding: m + 8 }, /* @__PURE__ */ r.createElement(t.SentTime, { ...e })), /* @__PURE__ */ r.createElement(Ft, null, e.suggestedRepliesVisible && /* @__PURE__ */ r.createElement(Jt, null, /* @__PURE__ */ r.createElement(t.SuggestedReplies, { ...e })), /* @__PURE__ */ r.createElement(t.MessageLogs, { ...e })));
|
|
2161
2164
|
}
|
|
2162
|
-
const
|
|
2165
|
+
const _s = u.div`display:flex;flex-direction:column;align-items:flex-start;margin-bottom:${({ $marginBottom: e }) => `${e}px`};
|
|
2163
2166
|
`, rt = u.div`display:flex;align-self:stretch;justify-content:flex-start;${({ $startPadding: e = oe, $endPadding: t = oe, $extraStartPadding: n = 0 }) => `
|
|
2164
2167
|
padding-inline: ${e + n}px ${t}px;
|
|
2165
2168
|
`}
|
|
2166
|
-
`,
|
|
2169
|
+
`, Ss = u(rt)`display:flex;flex-direction:row;align-items:center;gap:8px;`, ct = u(rt)`display:flex;`, Ts = u(rt)`margin-top:${Un}px;display:flex;align-items:flex-start;justify-content:flex-start;`, Jt = u(rt)`display:flex;flex-direction:column;${({ $startPadding: e = oe, $endPadding: t = oe, $extraStartPadding: n = 0 }) => `
|
|
2167
2170
|
padding-inline: ${e + n}px ${t}px;
|
|
2168
2171
|
`}
|
|
2169
2172
|
`;
|
|
2170
|
-
function
|
|
2171
|
-
return /* @__PURE__ */ r.createElement(
|
|
2173
|
+
function ws({ file: e, children: t, onClickFile: n }) {
|
|
2174
|
+
return /* @__PURE__ */ r.createElement(ks, null, /* @__PURE__ */ r.createElement(
|
|
2172
2175
|
kt,
|
|
2173
2176
|
{
|
|
2174
2177
|
name: e.name,
|
|
@@ -2177,51 +2180,54 @@ function Ts({ file: e, children: t, onClickFile: n }) {
|
|
|
2177
2180
|
}
|
|
2178
2181
|
), t);
|
|
2179
2182
|
}
|
|
2180
|
-
const
|
|
2181
|
-
function
|
|
2183
|
+
const ks = u.div`display:flex;flex-direction:column;align-items:flex-end;gap:${ke}px;`, Zn = ({ className: e, children: t, size: n = 26 }) => /* @__PURE__ */ r.createElement(As, { className: e, $size: n }, t ?? /* @__PURE__ */ r.createElement(O, { type: "spinner", size: n })), As = u.div`display:flex;align-items:center;justify-content:center;width:${({ $size: e }) => Z(e)};height:${({ $size: e }) => Z(e)};animation:1s infinite linear;animation-name:rotate;@keyframes rotate{from{transform:rotate(0);}to{transform:rotate(360deg);}}`;
|
|
2184
|
+
function Is({ file: e, metadata: t, onClickMedia: n, children: o }) {
|
|
2182
2185
|
const { aspectRatio: i, localFile: a } = t, [s] = _(() => a instanceof File ? URL.createObjectURL(a) : e.url), [l, c] = _(!1), d = {
|
|
2183
2186
|
onClick: () => n == null ? void 0 : n(e),
|
|
2184
2187
|
$ratio: i
|
|
2185
2188
|
};
|
|
2186
|
-
return /* @__PURE__ */ r.createElement(
|
|
2189
|
+
return /* @__PURE__ */ r.createElement($s, null, /* @__PURE__ */ r.createElement(Ms, { ...d }, !l && /* @__PURE__ */ r.createElement(Zn, { size: 26 }, /* @__PURE__ */ r.createElement(O, { type: "spinner", color: "textLowEmphasis", size: 26 })), /* @__PURE__ */ r.createElement(Os, { $loaded: l, src: s, alt: "image-message", onLoad: () => c(!0) })), o);
|
|
2187
2190
|
}
|
|
2188
|
-
const
|
|
2191
|
+
const $s = u.div`display:flex;flex-direction:column;align-items:flex-end;gap:${ke}px;`, Ms = u.div`width:${Pe}px;border-radius:12px;overflow:hidden;cursor:pointer;height:auto;aspect-ratio:${(e) => e.$ratio};position:relative;display:flex;align-items:center;justify-content:center;${N.light`
|
|
2189
2192
|
background-color: ${h.color.background100};
|
|
2190
2193
|
`}
|
|
2191
2194
|
${N.dark`
|
|
2192
2195
|
background-color: ${h.color.background400};
|
|
2193
2196
|
`}
|
|
2194
|
-
`,
|
|
2197
|
+
`, Os = u.img`position:absolute;width:100%;height:100%;inset-block-start:0;inset-inline-start:0;object-fit:cover;opacity:${(e) => e.$loaded ? 1 : 0};transition:opacity 0.5s ease;`;
|
|
2195
2198
|
function Xt(e) {
|
|
2196
2199
|
var n, o;
|
|
2197
|
-
const t = ve(() =>
|
|
2200
|
+
const t = ve(() => {
|
|
2201
|
+
const i = Vi(zn(e.message));
|
|
2202
|
+
return Sn.sanitize(i);
|
|
2203
|
+
}, [e.message]);
|
|
2198
2204
|
return /* @__PURE__ */ r.createElement(
|
|
2199
|
-
|
|
2205
|
+
Ls,
|
|
2200
2206
|
{
|
|
2201
2207
|
$maxWidth: e.maxBodyWidth ?? Pe,
|
|
2202
2208
|
$color: (n = e.customStyle) == null ? void 0 : n.bubbleContentColor,
|
|
2203
2209
|
$bgColor: (o = e.customStyle) == null ? void 0 : o.bubbleBackgroundColor
|
|
2204
2210
|
},
|
|
2205
|
-
/* @__PURE__ */ r.createElement(
|
|
2211
|
+
/* @__PURE__ */ r.createElement(Rs, { variant: "body3", dangerouslySetInnerHTML: { __html: t } })
|
|
2206
2212
|
);
|
|
2207
2213
|
}
|
|
2208
|
-
const
|
|
2214
|
+
const Ls = u.div`display:flex;flex-direction:column;border-radius:12px;overflow:hidden;max-width:${({ $maxWidth: e }) => e}px;${({ theme: e, $color: t, $bgColor: n }) => $`
|
|
2209
2215
|
color: ${t || e.colors.messageOutgoing.text};
|
|
2210
2216
|
background-color: ${n || e.colors.messageOutgoing.background};
|
|
2211
2217
|
`}
|
|
2212
2218
|
padding: 12px 0;
|
|
2213
2219
|
transition: max-width 0.3s;
|
|
2214
2220
|
overflow-wrap: break-word;
|
|
2215
|
-
`,
|
|
2216
|
-
function
|
|
2221
|
+
`, Rs = u(k)`align-items:flex-start;line-height:140%;white-space:pre-wrap;padding:0 12px;`;
|
|
2222
|
+
function Ds(e) {
|
|
2217
2223
|
const { stringSet: t } = R(), n = Hn(e) ? /* @__PURE__ */ r.createElement(Xt, { ...e }) : null;
|
|
2218
|
-
return e.messageType === "user" ? n : e.messageType === "file" ? e.file.type.startsWith("image") ? /* @__PURE__ */ r.createElement(
|
|
2224
|
+
return e.messageType === "user" ? n : e.messageType === "file" ? e.file.type.startsWith("image") ? /* @__PURE__ */ r.createElement(Is, { ...e }, n) : /* @__PURE__ */ r.createElement(ws, { ...e }, n) : /* @__PURE__ */ r.createElement(Xt, { ...e, message: t.UNKNOWN__UNKNOWN_MESSAGE_TYPE });
|
|
2219
2225
|
}
|
|
2220
|
-
function
|
|
2226
|
+
function Ns({ sendingStatus: e }) {
|
|
2221
2227
|
const t = Ct();
|
|
2222
2228
|
switch (e) {
|
|
2223
2229
|
case "pending":
|
|
2224
|
-
return /* @__PURE__ */ r.createElement(
|
|
2230
|
+
return /* @__PURE__ */ r.createElement(Ps, { size: 16 }, /* @__PURE__ */ r.createElement(O, { type: "spinner", color: t.colors.messageOutgoing.background, size: 16 }));
|
|
2225
2231
|
case "failed":
|
|
2226
2232
|
return /* @__PURE__ */ r.createElement("div", { style: { marginBottom: 2 } }, /* @__PURE__ */ r.createElement(O, { type: "error", color: h.themedColor.error, size: 16 }));
|
|
2227
2233
|
case "scheduled":
|
|
@@ -2231,40 +2237,40 @@ function Ds({ sendingStatus: e }) {
|
|
|
2231
2237
|
return /* @__PURE__ */ r.createElement("div", null, /* @__PURE__ */ r.createElement(O, { type: "chevron-down" }));
|
|
2232
2238
|
}
|
|
2233
2239
|
}
|
|
2234
|
-
const
|
|
2235
|
-
function
|
|
2240
|
+
const Ps = u(Zn)`margin-bottom:2px;width:16px;height:16px;`;
|
|
2241
|
+
function Bs({ createdAt: e }) {
|
|
2236
2242
|
const { stringSet: t, format: n } = R();
|
|
2237
2243
|
return e ? /* @__PURE__ */ r.createElement(k, { variant: "caption4", color: h.themedColor.textLowEmphasis }, n(e, t.DATE_FORMAT__MESSAGE_TIMESTAMP)) : null;
|
|
2238
2244
|
}
|
|
2239
2245
|
const Mt = we({
|
|
2240
|
-
template:
|
|
2246
|
+
template: Fs,
|
|
2241
2247
|
components: {
|
|
2242
|
-
SendingStatus:
|
|
2243
|
-
SentTime:
|
|
2244
|
-
MessageBody:
|
|
2248
|
+
SendingStatus: Ns,
|
|
2249
|
+
SentTime: Bs,
|
|
2250
|
+
MessageBody: Ds
|
|
2245
2251
|
}
|
|
2246
2252
|
});
|
|
2247
|
-
function
|
|
2253
|
+
function Fs(e) {
|
|
2248
2254
|
const { components: t } = Mt.useContext(), n = e.sendingStatus === "succeeded", o = e.groupType === "bottom" || e.groupType === "single";
|
|
2249
|
-
return /* @__PURE__ */ r.createElement(
|
|
2255
|
+
return /* @__PURE__ */ r.createElement(Us, { $marginBottom: Tt(e.groupType) }, /* @__PURE__ */ r.createElement(Hs, null, /* @__PURE__ */ r.createElement(t.MessageBody, { ...e })), o && /* @__PURE__ */ r.createElement(zs, { $extraEndPadding: 8 }, n ? /* @__PURE__ */ r.createElement(t.SentTime, { ...e }) : /* @__PURE__ */ r.createElement(t.SendingStatus, { ...e })));
|
|
2250
2256
|
}
|
|
2251
|
-
const
|
|
2257
|
+
const Us = u.div`display:flex;flex:1;flex-direction:column;align-items:flex-end;margin-bottom:${({ $marginBottom: e }) => `${e}px`};
|
|
2252
2258
|
`, Yn = u.div`display:flex;align-self:stretch;justify-content:flex-end;${({ $startPadding: e = oe, $endPadding: t = oe, $extraEndPadding: n = 0 }) => `padding-inline: ${e}px ${t + n}px;`};
|
|
2253
|
-
`,
|
|
2254
|
-
function
|
|
2255
|
-
return e.messageType !== "admin" ? null : /* @__PURE__ */ r.createElement(
|
|
2259
|
+
`, Hs = u(Yn)``, zs = u(Yn)`margin-top:${Un}px;`;
|
|
2260
|
+
function Vs(e) {
|
|
2261
|
+
return e.messageType !== "admin" ? null : /* @__PURE__ */ r.createElement(Ws, null, /* @__PURE__ */ r.createElement(k, { variant: "caption2", color: h.themedColor.textMidEmphasis }, Gs(Sn.sanitize(e.message))));
|
|
2256
2262
|
}
|
|
2257
|
-
const
|
|
2263
|
+
const Ws = u.div`text-align:center;text-wrap:pretty;a{text-decoration:none;color:inherit;}`, Gs = (e) => {
|
|
2258
2264
|
const t = /\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g, n = [];
|
|
2259
2265
|
let o = 0;
|
|
2260
2266
|
return e.replace(t, (i, a, s, l) => (n.push(e.slice(o, l)), n.push(
|
|
2261
2267
|
/* @__PURE__ */ r.createElement("a", { key: s, href: s, target: "_blank", rel: St }, a)
|
|
2262
2268
|
), o = l + i.length, i)), n.push(e.slice(o)), n;
|
|
2263
|
-
},
|
|
2269
|
+
}, js = ({ submitted: e, defaultValue: t, value: n, onChange: o }) => {
|
|
2264
2270
|
const { stringSet: i } = R();
|
|
2265
2271
|
return D(() => {
|
|
2266
2272
|
typeof n > "u" && typeof t == "boolean" && (o == null || o(t));
|
|
2267
|
-
}, [n, t]), /* @__PURE__ */ r.createElement(
|
|
2273
|
+
}, [n, t]), /* @__PURE__ */ r.createElement(Ks, null, /* @__PURE__ */ r.createElement(k, { variant: "caption2", color: h.themedColor.textMidEmphasis }, i.CSAT_CRE_TITLE), /* @__PURE__ */ r.createElement("div", null, /* @__PURE__ */ r.createElement(
|
|
2268
2274
|
Qt,
|
|
2269
2275
|
{
|
|
2270
2276
|
checked: n === !0,
|
|
@@ -2283,15 +2289,15 @@ const Vs = u.div`text-align:center;text-wrap:pretty;a{text-decoration:none;color
|
|
|
2283
2289
|
)));
|
|
2284
2290
|
}, Qt = ({ onClick: e, checked: t, label: n, disabled: o }) => {
|
|
2285
2291
|
const i = t ? h.color.primary.main : o ? h.themedColor.textDisabled : h.themedColor.textLowEmphasis, a = t ? h.themedColor.textHighEmphasis : o ? h.themedColor.textLowEmphasis : h.themedColor.textHighEmphasis;
|
|
2286
|
-
return /* @__PURE__ */ r.createElement(
|
|
2287
|
-
}, js = u.div`display:flex;flex-direction:column;gap:8px;`, Ks = u.button`all:unset;display:flex;align-items:center;justify-content:flex-start;gap:2px;span{line-height:initial;}&:enabled{cursor:pointer;}`, Zs = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", id: "csat1", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.08301 20C2.08301 10.1049 10.1046 2.08334 19.9997 2.08334C29.8948 2.08334 37.9163 10.1049 37.9163 20C37.9163 29.8952 29.8948 37.9167 19.9997 37.9167C10.1046 37.9167 2.08301 29.8952 2.08301 20Z", fill: "#E0E0E0" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.5824 29.3328C13.1344 29.7473 13.918 29.636 14.3326 29.084C15.6269 27.3607 17.6835 26.25 19.9997 26.25C22.316 26.25 24.3727 27.3607 25.6668 29.084C26.0815 29.636 26.865 29.7473 27.4172 29.3328C27.9692 28.9182 28.0805 28.1347 27.6658 27.5825C25.9198 25.2577 23.1357 23.75 19.9997 23.75C16.8638 23.75 14.0797 25.2577 12.3336 27.5825C11.919 28.1347 12.0304 28.9182 12.5824 29.3328Z", fill: "black", fillOpacity: 0.12 }), /* @__PURE__ */ r.createElement("path", { d: "M28.4449 13.7707C29.1324 13.8328 29.64 14.4406 29.578 15.1281C29.516 15.8153 28.909 16.3221 28.2219 16.2608C28.2219 16.2608 28.0282 16.2502 27.9267 16.2487C27.7224 16.2457 27.4382 16.2509 27.1224 16.2833C26.7864 16.3177 26.4644 16.3782 26.1799 16.4662L26.304 16.86C26.7792 18.3675 25.5094 19.5813 24.2057 19.5813C23.504 19.5813 22.8319 19.2617 22.4295 18.6857C22.0025 18.0745 21.9417 17.241 22.4075 16.5344C22.7505 16.0143 23.2444 15.3831 23.8959 14.8657C24.8355 14.1195 26.0435 13.8809 26.867 13.7963C27.3024 13.7517 28.0149 13.7319 28.4449 13.7707Z", fill: "black", fillOpacity: 0.12 }), /* @__PURE__ */ r.createElement("path", { d: "M11.5553 13.7707C10.8677 13.8328 10.3601 14.4406 10.4221 15.1281C10.4842 15.8153 11.0912 16.3221 11.7782 16.2608C11.7782 16.2608 11.972 16.2502 12.0734 16.2487C12.2778 16.2457 12.562 16.2509 12.8778 16.2833C13.2137 16.3177 13.5357 16.3782 13.8203 16.4662L13.6962 16.86C13.2209 18.3675 14.4907 19.5813 15.7944 19.5813C16.4962 19.5813 17.1683 19.2617 17.5707 18.6857C17.9975 18.0745 18.0585 17.241 17.5925 16.5344C17.2497 16.0143 16.7557 15.3831 16.1043 14.8657C15.1646 14.1195 13.9566 13.8809 13.1331 13.7963C12.6978 13.7517 11.9853 13.7319 11.5553 13.7707Z", fill: "black", fillOpacity: 0.12 })), Ys = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.08337 19.9999C2.08337 10.1048 10.1049 2.08325 20 2.08325C29.8952 2.08325 37.9167 10.1048 37.9167 19.9999C37.9167 29.8951 29.8952 37.9166 20 37.9166C10.1049 37.9166 2.08337 29.8951 2.08337 19.9999Z", fill: "url(#paint0_linear_159_173206)" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.5828 29.3328C13.1348 29.7473 13.9184 29.636 14.3329 29.084C15.6272 27.3607 17.6839 26.25 20 26.25C22.3164 26.25 24.373 27.3607 25.6672 29.084C26.0819 29.636 26.8654 29.7473 27.4175 29.3328C27.9695 28.9182 28.0809 28.1347 27.6662 27.5825C25.9202 25.2577 23.136 23.75 20 23.75C16.8642 23.75 14.0801 25.2577 12.334 27.5825C11.9194 28.1347 12.0308 28.9182 12.5828 29.3328Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { d: "M28.4454 13.7707C29.1329 13.8328 29.6405 14.4406 29.5785 15.1281C29.5165 15.8153 28.9095 16.3221 28.2224 16.2608C28.2224 16.2608 28.0287 16.2502 27.9272 16.2487C27.7229 16.2457 27.4387 16.2509 27.1229 16.2833C26.7869 16.3177 26.4649 16.3782 26.1804 16.4662L26.3045 16.86C26.7797 18.3675 25.5099 19.5813 24.2062 19.5813C23.5045 19.5813 22.8324 19.2617 22.43 18.6857C22.003 18.0745 21.9422 17.241 22.408 16.5344C22.751 16.0143 23.2449 15.3831 23.8964 14.8657C24.836 14.1195 26.044 13.8809 26.8675 13.7963C27.3029 13.7517 28.0154 13.7319 28.4454 13.7707Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { d: "M11.5549 13.7707C10.8674 13.8328 10.3597 14.4406 10.4218 15.1281C10.4838 15.8153 11.0908 16.3221 11.7779 16.2608C11.7779 16.2608 11.9716 16.2502 12.073 16.2487C12.2774 16.2457 12.5616 16.2509 12.8774 16.2833C13.2134 16.3177 13.5353 16.3782 13.8199 16.4662L13.6958 16.86C13.2205 18.3675 14.4904 19.5813 15.794 19.5813C16.4958 19.5813 17.168 19.2617 17.5703 18.6857C17.9971 18.0745 18.0581 17.241 17.5921 16.5344C17.2493 16.0143 16.7553 15.3831 16.1039 14.8657C15.1643 14.1195 13.9562 13.8809 13.1327 13.7963C12.6974 13.7517 11.9849 13.7319 11.5549 13.7707Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("defs", null, /* @__PURE__ */ r.createElement("linearGradient", { id: "paint0_linear_159_173206", x1: 20, y1: 2.08325, x2: 20, y2: 37.9166, gradientUnits: "userSpaceOnUse" }, /* @__PURE__ */ r.createElement("stop", { stopColor: "#FF2D1D" }), /* @__PURE__ */ r.createElement("stop", { offset: 1, stopColor: "#FFA540" })))), qs = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M19.9997 36.6667C29.2044 36.6667 36.6663 29.2048 36.6663 20C36.6663 10.7953 29.2044 3.33334 19.9997 3.33334C10.7949 3.33334 3.33301 10.7953 3.33301 20C3.33301 29.2048 10.7949 36.6667 19.9997 36.6667Z", fill: "#E0E0E0" }), /* @__PURE__ */ r.createElement("path", { d: "M15 28.333C16.3927 27.2867 18.124 26.6667 20 26.6667C21.876 26.6667 23.6073 27.2867 25 28.333", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("path", { d: "M11.667 13.3511C11.667 13.3511 14.0161 13.139 15.3268 14.18M15.3268 14.18L14.8882 15.5711C14.7153 16.1199 15.1675 16.6667 15.7943 16.6667C16.4531 16.6667 16.8882 16.0723 16.549 15.5579C16.2483 15.102 15.8388 14.5866 15.3268 14.18ZM23.3337 13.3511C23.3337 13.3511 25.6827 13.139 26.9935 14.18M26.9935 14.18L26.555 15.5711C26.382 16.1199 26.8342 16.6667 27.461 16.6667C28.1198 16.6667 28.5548 16.0723 28.2157 15.5579C27.915 15.102 27.5055 14.5866 26.9935 14.18Z", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })), Js = (e) => /* @__PURE__ */ r.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.083 20C2.083 10.105 10.105 2.083 20 2.083c9.895 0 17.917 8.021 17.917 17.917 0 9.895-8.022 17.917-17.917 17.917C10.105 37.917 2.083 29.895 2.083 20Z", fill: "#FFD46E" }), /* @__PURE__ */ r.createElement("path", { d: "M14.249 27.334C15.851 26.13 17.844 25.417 20 25.417c2.156 0 4.149.714 5.751 1.917.553.415.664 1.199.25 1.751-.415.552-1.199.664-1.751.25-1.183-.889-2.652-1.416-4.25-1.416s-3.067.527-4.25 1.416c-.553.414-1.336.302-1.751-.25-.415-.552-.303-1.336.249-1.751Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { d: "M23.445 14.596c-.687.062-1.294-.445-1.356-1.132-.062-.687.445-1.295 1.132-1.357.082-.005.342-.02.482-.022.277-.004.662.002 1.097.047.823.085 2.031.323 2.97 1.07.652.518 1.146 1.15 1.489 1.67.466.706.405 1.54-.022 2.15-.402.576-1.074.896-1.775.896-1.304 0-2.573-1.214-2.098-2.722l.125-.394c-.285-.088-.607-.148-.942-.182-.316-.033-.6-.038-.804-.035-.101.002-.242.01-.294.013Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { d: "M11.779 14.596c-.687.062-1.294-.445-1.356-1.132-.062-.687.445-1.295 1.132-1.357.082-.005.342-.02.482-.022.277-.004.662.002 1.097.047.823.085 2.031.323 2.97 1.07.652.518 1.146 1.15 1.489 1.67.466.706.405 1.54-.022 2.15-.402.576-1.074.896-1.775.896-1.304 0-2.573-1.214-2.098-2.722l.124-.394c-.284-.088-.606-.148-.941-.182-.316-.033-.6-.038-.804-.035-.101.002-.243.01-.294.013Z", fill: "#141B34" })), Xs = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M19.9997 36.6667C29.2044 36.6667 36.6663 29.2048 36.6663 20C36.6663 10.7953 29.2044 3.33334 19.9997 3.33334C10.7949 3.33334 3.33301 10.7953 3.33301 20C3.33301 29.2048 10.7949 36.6667 19.9997 36.6667Z", fill: "#E0E0E0" }), /* @__PURE__ */ r.createElement("path", { d: "M13.348 15H13.333M26.6663 15H26.6513", stroke: "black", strokeOpacity: 0.12, strokeWidth: 3.33333, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("path", { d: "M15 26.6667H25", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })), Qs = (e) => /* @__PURE__ */ r.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.083 20C2.083 10.105 10.105 2.083 20 2.083c9.895 0 17.917 8.021 17.917 17.917 0 9.895-8.022 17.917-17.917 17.917C10.105 37.917 2.083 29.895 2.083 20Z", fill: "#FFD46E" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.25 15c0-1.151.933-2.083 2.083-2.083h.015c1.151 0 2.084.933 2.084 2.083 0 1.151-.933 2.083-2.084 2.083h-.015c-1.15 0-2.083-.933-2.083-2.083ZM24.568 15c0-1.151.933-2.083 2.084-2.083h.015c1.151 0 2.083.933 2.083 2.083 0 1.151-.932 2.083-2.083 2.083h-.015c-1.151 0-2.084-.933-2.084-2.083Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M13.75 26.667c0-.691.56-1.25 1.25-1.25h10c.69 0 1.25.559 1.25 1.25 0 .691-.56 1.25-1.25 1.25h-10c-.69 0-1.25-.559-1.25-1.25Z", fill: "#141B34" })), ea = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M19.9997 36.6667C29.2044 36.6667 36.6663 29.2048 36.6663 20C36.6663 10.7953 29.2044 3.33334 19.9997 3.33334C10.7949 3.33334 3.33301 10.7953 3.33301 20C3.33301 29.2048 10.7949 36.6667 19.9997 36.6667Z", fill: "#E0E0E0" }), /* @__PURE__ */ r.createElement("path", { d: "M13.333 25C14.8532 27.024 17.2735 28.3333 19.9997 28.3333C22.7258 28.3333 25.1462 27.024 26.6663 25", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("path", { d: "M13.348 15H13.333M26.6663 15H26.6513", stroke: "black", strokeOpacity: 0.12, strokeWidth: 3.33333, strokeLinecap: "round", strokeLinejoin: "round" })), ta = (e) => /* @__PURE__ */ r.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.083 20C2.083 10.105 10.105 2.083 20 2.083c9.895 0 17.917 8.021 17.917 17.917 0 9.895-8.022 17.917-17.917 17.917C10.105 37.917 2.083 29.895 2.083 20Z", fill: "#FFD46E" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.583 24.001c.552-.414 1.335-.302 1.75.25 1.294 1.723 3.35 2.834 5.667 2.834s4.373-1.11 5.667-2.834c.415-.552 1.199-.664 1.751-.25.552.415.664 1.199.25 1.751C25.92 28.076 23.136 29.584 20 29.584s-5.92-1.508-7.666-3.832c-.415-.552-.303-1.336.249-1.751Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.25 15c0-1.151.933-2.083 2.083-2.083h.015c1.151 0 2.084.933 2.084 2.083 0 1.151-.933 2.083-2.084 2.083h-.015c-1.15 0-2.083-.933-2.083-2.083ZM24.568 15c0-1.151.933-2.083 2.084-2.083h.015c1.151 0 2.083.933 2.083 2.083 0 1.151-.932 2.083-2.083 2.083h-.015c-1.151 0-2.084-.933-2.084-2.083Z", fill: "#141B34" })), na = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M19.9997 36.6663C29.2044 36.6663 36.6663 29.2044 36.6663 19.9997C36.6663 10.7949 29.2044 3.33301 19.9997 3.33301C10.7949 3.33301 3.33301 10.7949 3.33301 19.9997C3.33301 29.2044 10.7949 36.6663 19.9997 36.6663Z", fill: "#E0E0E0" }), /* @__PURE__ */ r.createElement("path", { d: "M19.9997 30C23.16 30 25.8145 27.867 26.56 24.9832C26.9068 23.6413 26.4033 23.3333 25.0765 23.3333H14.9228C13.5959 23.3333 13.0925 23.6413 13.4393 24.9832C14.1848 27.867 16.8393 30 19.9997 30Z", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("path", { d: "M11.667 15.8333C11.667 14.4526 12.7863 13.3333 14.167 13.3333C15.5477 13.3333 16.667 14.4526 16.667 15.8333M23.3337 15.8333C23.3337 14.4526 24.453 13.3333 25.8337 13.3333C27.2143 13.3333 28.3337 14.4526 28.3337 15.8333", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })), ra = (e) => /* @__PURE__ */ r.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.083 20C2.083 10.105 10.105 2.083 20 2.083c9.895 0 17.917 8.021 17.917 17.917 0 9.895-8.022 17.917-17.917 17.917C10.105 37.917 2.083 29.895 2.083 20Z", fill: "#FFD46E" }), /* @__PURE__ */ r.createElement("g", { clipPath: "url(#clip0_159_173224)" }, /* @__PURE__ */ r.createElement("g", { clipPath: "url(#clip1_159_173224)" }, /* @__PURE__ */ r.createElement("path", { d: "M20 30.624c3.752 0 6.904-2.532 7.789-5.956.412-1.593-.185-1.959-1.76-1.959H13.973c-1.575 0-2.173.366-1.761 1.959.885 3.424 4.037 5.956 7.788 5.956Z", fill: "#141B34" })), /* @__PURE__ */ r.createElement("mask", { id: "mask0_159_173224", style: {
|
|
2292
|
+
return /* @__PURE__ */ r.createElement(Zs, { onClick: e, disabled: o }, /* @__PURE__ */ r.createElement(O, { size: 24, type: t ? "radio-on" : "radio-off", color: i }), /* @__PURE__ */ r.createElement(k, { variant: "caption2", color: a }, n));
|
|
2293
|
+
}, Ks = u.div`display:flex;flex-direction:column;gap:8px;`, Zs = u.button`all:unset;display:flex;align-items:center;justify-content:flex-start;gap:2px;span{line-height:initial;}&:enabled{cursor:pointer;}`, Ys = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", id: "csat1", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.08301 20C2.08301 10.1049 10.1046 2.08334 19.9997 2.08334C29.8948 2.08334 37.9163 10.1049 37.9163 20C37.9163 29.8952 29.8948 37.9167 19.9997 37.9167C10.1046 37.9167 2.08301 29.8952 2.08301 20Z", fill: "#E0E0E0" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.5824 29.3328C13.1344 29.7473 13.918 29.636 14.3326 29.084C15.6269 27.3607 17.6835 26.25 19.9997 26.25C22.316 26.25 24.3727 27.3607 25.6668 29.084C26.0815 29.636 26.865 29.7473 27.4172 29.3328C27.9692 28.9182 28.0805 28.1347 27.6658 27.5825C25.9198 25.2577 23.1357 23.75 19.9997 23.75C16.8638 23.75 14.0797 25.2577 12.3336 27.5825C11.919 28.1347 12.0304 28.9182 12.5824 29.3328Z", fill: "black", fillOpacity: 0.12 }), /* @__PURE__ */ r.createElement("path", { d: "M28.4449 13.7707C29.1324 13.8328 29.64 14.4406 29.578 15.1281C29.516 15.8153 28.909 16.3221 28.2219 16.2608C28.2219 16.2608 28.0282 16.2502 27.9267 16.2487C27.7224 16.2457 27.4382 16.2509 27.1224 16.2833C26.7864 16.3177 26.4644 16.3782 26.1799 16.4662L26.304 16.86C26.7792 18.3675 25.5094 19.5813 24.2057 19.5813C23.504 19.5813 22.8319 19.2617 22.4295 18.6857C22.0025 18.0745 21.9417 17.241 22.4075 16.5344C22.7505 16.0143 23.2444 15.3831 23.8959 14.8657C24.8355 14.1195 26.0435 13.8809 26.867 13.7963C27.3024 13.7517 28.0149 13.7319 28.4449 13.7707Z", fill: "black", fillOpacity: 0.12 }), /* @__PURE__ */ r.createElement("path", { d: "M11.5553 13.7707C10.8677 13.8328 10.3601 14.4406 10.4221 15.1281C10.4842 15.8153 11.0912 16.3221 11.7782 16.2608C11.7782 16.2608 11.972 16.2502 12.0734 16.2487C12.2778 16.2457 12.562 16.2509 12.8778 16.2833C13.2137 16.3177 13.5357 16.3782 13.8203 16.4662L13.6962 16.86C13.2209 18.3675 14.4907 19.5813 15.7944 19.5813C16.4962 19.5813 17.1683 19.2617 17.5707 18.6857C17.9975 18.0745 18.0585 17.241 17.5925 16.5344C17.2497 16.0143 16.7557 15.3831 16.1043 14.8657C15.1646 14.1195 13.9566 13.8809 13.1331 13.7963C12.6978 13.7517 11.9853 13.7319 11.5553 13.7707Z", fill: "black", fillOpacity: 0.12 })), qs = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.08337 19.9999C2.08337 10.1048 10.1049 2.08325 20 2.08325C29.8952 2.08325 37.9167 10.1048 37.9167 19.9999C37.9167 29.8951 29.8952 37.9166 20 37.9166C10.1049 37.9166 2.08337 29.8951 2.08337 19.9999Z", fill: "url(#paint0_linear_159_173206)" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.5828 29.3328C13.1348 29.7473 13.9184 29.636 14.3329 29.084C15.6272 27.3607 17.6839 26.25 20 26.25C22.3164 26.25 24.373 27.3607 25.6672 29.084C26.0819 29.636 26.8654 29.7473 27.4175 29.3328C27.9695 28.9182 28.0809 28.1347 27.6662 27.5825C25.9202 25.2577 23.136 23.75 20 23.75C16.8642 23.75 14.0801 25.2577 12.334 27.5825C11.9194 28.1347 12.0308 28.9182 12.5828 29.3328Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { d: "M28.4454 13.7707C29.1329 13.8328 29.6405 14.4406 29.5785 15.1281C29.5165 15.8153 28.9095 16.3221 28.2224 16.2608C28.2224 16.2608 28.0287 16.2502 27.9272 16.2487C27.7229 16.2457 27.4387 16.2509 27.1229 16.2833C26.7869 16.3177 26.4649 16.3782 26.1804 16.4662L26.3045 16.86C26.7797 18.3675 25.5099 19.5813 24.2062 19.5813C23.5045 19.5813 22.8324 19.2617 22.43 18.6857C22.003 18.0745 21.9422 17.241 22.408 16.5344C22.751 16.0143 23.2449 15.3831 23.8964 14.8657C24.836 14.1195 26.044 13.8809 26.8675 13.7963C27.3029 13.7517 28.0154 13.7319 28.4454 13.7707Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { d: "M11.5549 13.7707C10.8674 13.8328 10.3597 14.4406 10.4218 15.1281C10.4838 15.8153 11.0908 16.3221 11.7779 16.2608C11.7779 16.2608 11.9716 16.2502 12.073 16.2487C12.2774 16.2457 12.5616 16.2509 12.8774 16.2833C13.2134 16.3177 13.5353 16.3782 13.8199 16.4662L13.6958 16.86C13.2205 18.3675 14.4904 19.5813 15.794 19.5813C16.4958 19.5813 17.168 19.2617 17.5703 18.6857C17.9971 18.0745 18.0581 17.241 17.5921 16.5344C17.2493 16.0143 16.7553 15.3831 16.1039 14.8657C15.1643 14.1195 13.9562 13.8809 13.1327 13.7963C12.6974 13.7517 11.9849 13.7319 11.5549 13.7707Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("defs", null, /* @__PURE__ */ r.createElement("linearGradient", { id: "paint0_linear_159_173206", x1: 20, y1: 2.08325, x2: 20, y2: 37.9166, gradientUnits: "userSpaceOnUse" }, /* @__PURE__ */ r.createElement("stop", { stopColor: "#FF2D1D" }), /* @__PURE__ */ r.createElement("stop", { offset: 1, stopColor: "#FFA540" })))), Js = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M19.9997 36.6667C29.2044 36.6667 36.6663 29.2048 36.6663 20C36.6663 10.7953 29.2044 3.33334 19.9997 3.33334C10.7949 3.33334 3.33301 10.7953 3.33301 20C3.33301 29.2048 10.7949 36.6667 19.9997 36.6667Z", fill: "#E0E0E0" }), /* @__PURE__ */ r.createElement("path", { d: "M15 28.333C16.3927 27.2867 18.124 26.6667 20 26.6667C21.876 26.6667 23.6073 27.2867 25 28.333", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("path", { d: "M11.667 13.3511C11.667 13.3511 14.0161 13.139 15.3268 14.18M15.3268 14.18L14.8882 15.5711C14.7153 16.1199 15.1675 16.6667 15.7943 16.6667C16.4531 16.6667 16.8882 16.0723 16.549 15.5579C16.2483 15.102 15.8388 14.5866 15.3268 14.18ZM23.3337 13.3511C23.3337 13.3511 25.6827 13.139 26.9935 14.18M26.9935 14.18L26.555 15.5711C26.382 16.1199 26.8342 16.6667 27.461 16.6667C28.1198 16.6667 28.5548 16.0723 28.2157 15.5579C27.915 15.102 27.5055 14.5866 26.9935 14.18Z", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })), Xs = (e) => /* @__PURE__ */ r.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.083 20C2.083 10.105 10.105 2.083 20 2.083c9.895 0 17.917 8.021 17.917 17.917 0 9.895-8.022 17.917-17.917 17.917C10.105 37.917 2.083 29.895 2.083 20Z", fill: "#FFD46E" }), /* @__PURE__ */ r.createElement("path", { d: "M14.249 27.334C15.851 26.13 17.844 25.417 20 25.417c2.156 0 4.149.714 5.751 1.917.553.415.664 1.199.25 1.751-.415.552-1.199.664-1.751.25-1.183-.889-2.652-1.416-4.25-1.416s-3.067.527-4.25 1.416c-.553.414-1.336.302-1.751-.25-.415-.552-.303-1.336.249-1.751Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { d: "M23.445 14.596c-.687.062-1.294-.445-1.356-1.132-.062-.687.445-1.295 1.132-1.357.082-.005.342-.02.482-.022.277-.004.662.002 1.097.047.823.085 2.031.323 2.97 1.07.652.518 1.146 1.15 1.489 1.67.466.706.405 1.54-.022 2.15-.402.576-1.074.896-1.775.896-1.304 0-2.573-1.214-2.098-2.722l.125-.394c-.285-.088-.607-.148-.942-.182-.316-.033-.6-.038-.804-.035-.101.002-.242.01-.294.013Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { d: "M11.779 14.596c-.687.062-1.294-.445-1.356-1.132-.062-.687.445-1.295 1.132-1.357.082-.005.342-.02.482-.022.277-.004.662.002 1.097.047.823.085 2.031.323 2.97 1.07.652.518 1.146 1.15 1.489 1.67.466.706.405 1.54-.022 2.15-.402.576-1.074.896-1.775.896-1.304 0-2.573-1.214-2.098-2.722l.124-.394c-.284-.088-.606-.148-.941-.182-.316-.033-.6-.038-.804-.035-.101.002-.243.01-.294.013Z", fill: "#141B34" })), Qs = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M19.9997 36.6667C29.2044 36.6667 36.6663 29.2048 36.6663 20C36.6663 10.7953 29.2044 3.33334 19.9997 3.33334C10.7949 3.33334 3.33301 10.7953 3.33301 20C3.33301 29.2048 10.7949 36.6667 19.9997 36.6667Z", fill: "#E0E0E0" }), /* @__PURE__ */ r.createElement("path", { d: "M13.348 15H13.333M26.6663 15H26.6513", stroke: "black", strokeOpacity: 0.12, strokeWidth: 3.33333, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("path", { d: "M15 26.6667H25", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })), ea = (e) => /* @__PURE__ */ r.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.083 20C2.083 10.105 10.105 2.083 20 2.083c9.895 0 17.917 8.021 17.917 17.917 0 9.895-8.022 17.917-17.917 17.917C10.105 37.917 2.083 29.895 2.083 20Z", fill: "#FFD46E" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.25 15c0-1.151.933-2.083 2.083-2.083h.015c1.151 0 2.084.933 2.084 2.083 0 1.151-.933 2.083-2.084 2.083h-.015c-1.15 0-2.083-.933-2.083-2.083ZM24.568 15c0-1.151.933-2.083 2.084-2.083h.015c1.151 0 2.083.933 2.083 2.083 0 1.151-.932 2.083-2.083 2.083h-.015c-1.151 0-2.084-.933-2.084-2.083Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M13.75 26.667c0-.691.56-1.25 1.25-1.25h10c.69 0 1.25.559 1.25 1.25 0 .691-.56 1.25-1.25 1.25h-10c-.69 0-1.25-.559-1.25-1.25Z", fill: "#141B34" })), ta = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M19.9997 36.6667C29.2044 36.6667 36.6663 29.2048 36.6663 20C36.6663 10.7953 29.2044 3.33334 19.9997 3.33334C10.7949 3.33334 3.33301 10.7953 3.33301 20C3.33301 29.2048 10.7949 36.6667 19.9997 36.6667Z", fill: "#E0E0E0" }), /* @__PURE__ */ r.createElement("path", { d: "M13.333 25C14.8532 27.024 17.2735 28.3333 19.9997 28.3333C22.7258 28.3333 25.1462 27.024 26.6663 25", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("path", { d: "M13.348 15H13.333M26.6663 15H26.6513", stroke: "black", strokeOpacity: 0.12, strokeWidth: 3.33333, strokeLinecap: "round", strokeLinejoin: "round" })), na = (e) => /* @__PURE__ */ r.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.083 20C2.083 10.105 10.105 2.083 20 2.083c9.895 0 17.917 8.021 17.917 17.917 0 9.895-8.022 17.917-17.917 17.917C10.105 37.917 2.083 29.895 2.083 20Z", fill: "#FFD46E" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.583 24.001c.552-.414 1.335-.302 1.75.25 1.294 1.723 3.35 2.834 5.667 2.834s4.373-1.11 5.667-2.834c.415-.552 1.199-.664 1.751-.25.552.415.664 1.199.25 1.751C25.92 28.076 23.136 29.584 20 29.584s-5.92-1.508-7.666-3.832c-.415-.552-.303-1.336.249-1.751Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.25 15c0-1.151.933-2.083 2.083-2.083h.015c1.151 0 2.084.933 2.084 2.083 0 1.151-.933 2.083-2.084 2.083h-.015c-1.15 0-2.083-.933-2.083-2.083ZM24.568 15c0-1.151.933-2.083 2.084-2.083h.015c1.151 0 2.083.933 2.083 2.083 0 1.151-.932 2.083-2.083 2.083h-.015c-1.151 0-2.084-.933-2.084-2.083Z", fill: "#141B34" })), ra = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M19.9997 36.6663C29.2044 36.6663 36.6663 29.2044 36.6663 19.9997C36.6663 10.7949 29.2044 3.33301 19.9997 3.33301C10.7949 3.33301 3.33301 10.7949 3.33301 19.9997C3.33301 29.2044 10.7949 36.6663 19.9997 36.6663Z", fill: "#E0E0E0" }), /* @__PURE__ */ r.createElement("path", { d: "M19.9997 30C23.16 30 25.8145 27.867 26.56 24.9832C26.9068 23.6413 26.4033 23.3333 25.0765 23.3333H14.9228C13.5959 23.3333 13.0925 23.6413 13.4393 24.9832C14.1848 27.867 16.8393 30 19.9997 30Z", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("path", { d: "M11.667 15.8333C11.667 14.4526 12.7863 13.3333 14.167 13.3333C15.5477 13.3333 16.667 14.4526 16.667 15.8333M23.3337 15.8333C23.3337 14.4526 24.453 13.3333 25.8337 13.3333C27.2143 13.3333 28.3337 14.4526 28.3337 15.8333", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })), oa = (e) => /* @__PURE__ */ r.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.083 20C2.083 10.105 10.105 2.083 20 2.083c9.895 0 17.917 8.021 17.917 17.917 0 9.895-8.022 17.917-17.917 17.917C10.105 37.917 2.083 29.895 2.083 20Z", fill: "#FFD46E" }), /* @__PURE__ */ r.createElement("g", { clipPath: "url(#clip0_159_173224)" }, /* @__PURE__ */ r.createElement("g", { clipPath: "url(#clip1_159_173224)" }, /* @__PURE__ */ r.createElement("path", { d: "M20 30.624c3.752 0 6.904-2.532 7.789-5.956.412-1.593-.185-1.959-1.76-1.959H13.973c-1.575 0-2.173.366-1.761 1.959.885 3.424 4.037 5.956 7.788 5.956Z", fill: "#141B34" })), /* @__PURE__ */ r.createElement("mask", { id: "mask0_159_173224", style: {
|
|
2288
2294
|
maskType: "alpha"
|
|
2289
|
-
}, maskUnits: "userSpaceOnUse", x: 12, y: 22, width: 16, height: 9 }, /* @__PURE__ */ r.createElement("path", { d: "M20 30.624c3.752 0 6.904-2.532 7.789-5.956.412-1.593-.185-1.959-1.76-1.959H13.973c-1.575 0-2.173.366-1.761 1.959.885 3.424 4.037 5.956 7.788 5.956Z", fill: "#141B34" })), /* @__PURE__ */ r.createElement("g", { mask: "url(#mask0_159_173224)" }, /* @__PURE__ */ r.createElement("path", { d: "M20 32.998c3.278 0 5.936-1.594 5.936-3.561 0-1.968-2.658-3.562-5.936-3.562-3.278 0-5.936 1.594-5.936 3.562 0 1.967 2.658 3.561 5.936 3.561Z", fill: "#FF493B" }))), /* @__PURE__ */ r.createElement("path", { d: "M11.667 15.833c0-1.381 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5M23.333 15.833c0-1.381 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5", stroke: "#141B34", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("defs", null, /* @__PURE__ */ r.createElement("clipPath", { id: "clip0_159_173224" }, /* @__PURE__ */ r.createElement("rect", { width: 15.83, height: 7.915, fill: "white", transform: "translate(12.085 22.709)" })), /* @__PURE__ */ r.createElement("clipPath", { id: "clip1_159_173224" }, /* @__PURE__ */ r.createElement("rect", { width: 15.83, height: 7.915, fill: "white", transform: "translate(12.085 22.709)" })))),
|
|
2295
|
+
}, maskUnits: "userSpaceOnUse", x: 12, y: 22, width: 16, height: 9 }, /* @__PURE__ */ r.createElement("path", { d: "M20 30.624c3.752 0 6.904-2.532 7.789-5.956.412-1.593-.185-1.959-1.76-1.959H13.973c-1.575 0-2.173.366-1.761 1.959.885 3.424 4.037 5.956 7.788 5.956Z", fill: "#141B34" })), /* @__PURE__ */ r.createElement("g", { mask: "url(#mask0_159_173224)" }, /* @__PURE__ */ r.createElement("path", { d: "M20 32.998c3.278 0 5.936-1.594 5.936-3.561 0-1.968-2.658-3.562-5.936-3.562-3.278 0-5.936 1.594-5.936 3.562 0 1.967 2.658 3.561 5.936 3.561Z", fill: "#FF493B" }))), /* @__PURE__ */ r.createElement("path", { d: "M11.667 15.833c0-1.381 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5M23.333 15.833c0-1.381 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5", stroke: "#141B34", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("defs", null, /* @__PURE__ */ r.createElement("clipPath", { id: "clip0_159_173224" }, /* @__PURE__ */ r.createElement("rect", { width: 15.83, height: 7.915, fill: "white", transform: "translate(12.085 22.709)" })), /* @__PURE__ */ r.createElement("clipPath", { id: "clip1_159_173224" }, /* @__PURE__ */ r.createElement("rect", { width: 15.83, height: 7.915, fill: "white", transform: "translate(12.085 22.709)" })))), ia = [
|
|
2290
2296
|
{
|
|
2291
2297
|
value: 1,
|
|
2292
2298
|
Icon: {
|
|
2293
|
-
Active:
|
|
2294
|
-
Inactive:
|
|
2299
|
+
Active: qs,
|
|
2300
|
+
Inactive: Ys
|
|
2295
2301
|
},
|
|
2296
2302
|
isActive: (e) => e <= 1,
|
|
2297
2303
|
getTooltip: (e) => e.CSAT5_RATING_SCORE_1
|
|
@@ -2299,8 +2305,8 @@ const Vs = u.div`text-align:center;text-wrap:pretty;a{text-decoration:none;color
|
|
|
2299
2305
|
{
|
|
2300
2306
|
value: 2,
|
|
2301
2307
|
Icon: {
|
|
2302
|
-
Active:
|
|
2303
|
-
Inactive:
|
|
2308
|
+
Active: Xs,
|
|
2309
|
+
Inactive: Js
|
|
2304
2310
|
},
|
|
2305
2311
|
isActive: (e) => e === 2,
|
|
2306
2312
|
getTooltip: (e) => e.CSAT5_RATING_SCORE_2
|
|
@@ -2308,8 +2314,8 @@ const Vs = u.div`text-align:center;text-wrap:pretty;a{text-decoration:none;color
|
|
|
2308
2314
|
{
|
|
2309
2315
|
value: 3,
|
|
2310
2316
|
Icon: {
|
|
2311
|
-
Active:
|
|
2312
|
-
Inactive:
|
|
2317
|
+
Active: ea,
|
|
2318
|
+
Inactive: Qs
|
|
2313
2319
|
},
|
|
2314
2320
|
isActive: (e) => e === 3,
|
|
2315
2321
|
getTooltip: (e) => e.CSAT5_RATING_SCORE_3
|
|
@@ -2317,8 +2323,8 @@ const Vs = u.div`text-align:center;text-wrap:pretty;a{text-decoration:none;color
|
|
|
2317
2323
|
{
|
|
2318
2324
|
value: 4,
|
|
2319
2325
|
Icon: {
|
|
2320
|
-
Active:
|
|
2321
|
-
Inactive:
|
|
2326
|
+
Active: na,
|
|
2327
|
+
Inactive: ta
|
|
2322
2328
|
},
|
|
2323
2329
|
isActive: (e) => e === 4,
|
|
2324
2330
|
getTooltip: (e) => e.CSAT5_RATING_SCORE_4
|
|
@@ -2326,13 +2332,13 @@ const Vs = u.div`text-align:center;text-wrap:pretty;a{text-decoration:none;color
|
|
|
2326
2332
|
{
|
|
2327
2333
|
value: 5,
|
|
2328
2334
|
Icon: {
|
|
2329
|
-
Active:
|
|
2330
|
-
Inactive:
|
|
2335
|
+
Active: oa,
|
|
2336
|
+
Inactive: ra
|
|
2331
2337
|
},
|
|
2332
2338
|
isActive: (e) => 5 <= e,
|
|
2333
2339
|
getTooltip: (e) => e.CSAT5_RATING_SCORE_5
|
|
2334
2340
|
}
|
|
2335
|
-
],
|
|
2341
|
+
], sa = () => ia, qn = ({ label: e, children: t, position: n = "top", disabled: o }) => o ? t : /* @__PURE__ */ r.createElement(bt, null, t, /* @__PURE__ */ r.createElement(ca, { $position: n }, /* @__PURE__ */ r.createElement(da, { variant: "caption1" }, e), /* @__PURE__ */ r.createElement(aa, { $position: n }))), aa = ({ $position: e }) => /* @__PURE__ */ r.createElement(
|
|
2336
2342
|
"svg",
|
|
2337
2343
|
{
|
|
2338
2344
|
style: { transform: e === "top" ? "rotate(0)" : "rotate(180deg)" },
|
|
@@ -2343,13 +2349,13 @@ const Vs = u.div`text-align:center;text-wrap:pretty;a{text-decoration:none;color
|
|
|
2343
2349
|
fill: "none"
|
|
2344
2350
|
},
|
|
2345
2351
|
/* @__PURE__ */ r.createElement("path", { d: "M6 6L0 0h12L6 6Z", fill: h.themedColor.textHighEmphasis })
|
|
2346
|
-
),
|
|
2352
|
+
), la = {
|
|
2347
2353
|
top: $`flex-direction:column;top:0;transform:translate(-50%,-100%);`,
|
|
2348
2354
|
bottom: $`flex-direction:column-reverse;bottom:0;transform:translate(-50%,100%);`
|
|
2349
|
-
}, bt = u.div`position:relative;`,
|
|
2350
|
-
const { stringSet: o } = R(), i =
|
|
2351
|
-
return /* @__PURE__ */ r.createElement(
|
|
2352
|
-
|
|
2355
|
+
}, bt = u.div`position:relative;`, ca = u.div`display:flex;align-items:center;position:absolute;left:50%;z-index:${fe.TOOLTIP};${({ $position: e }) => la[e]}opacity:0;transition:opacity 0.2s ease-in-out;pointer-events:none;${bt}:hover &,${bt}:focus-within &{opacity:1;}`, da = u(k)`padding:6px 8px;background:${h.themedColor.textHighEmphasis};color:${h.themedColor.textHighEmphasisInverse};border-radius:4px;font-size:12px;white-space:nowrap;`, ua = ({ submitted: e, value: t, onChange: n }) => {
|
|
2356
|
+
const { stringSet: o } = R(), i = sa(), a = typeof t == "number";
|
|
2357
|
+
return /* @__PURE__ */ r.createElement(ma, null, /* @__PURE__ */ r.createElement(k, { variant: "caption2", color: h.themedColor.textMidEmphasis }, o.CSAT_RATING_TITLE), /* @__PURE__ */ r.createElement(ha, null, i.map((s) => /* @__PURE__ */ r.createElement(qn, { disabled: e, key: s.value, label: s.getTooltip(o) }, /* @__PURE__ */ r.createElement(
|
|
2358
|
+
ga,
|
|
2353
2359
|
{
|
|
2354
2360
|
disabled: e,
|
|
2355
2361
|
onClick: () => n(s.value),
|
|
@@ -2357,16 +2363,16 @@ const Vs = u.div`text-align:center;text-wrap:pretty;a{text-decoration:none;color
|
|
|
2357
2363
|
},
|
|
2358
2364
|
a ? s.isActive(t) ? /* @__PURE__ */ r.createElement(s.Icon.Active, null) : /* @__PURE__ */ r.createElement(s.Icon.Inactive, null) : /* @__PURE__ */ r.createElement(s.Icon.Active, null)
|
|
2359
2365
|
)))));
|
|
2360
|
-
},
|
|
2366
|
+
}, ma = u.div`display:flex;flex-direction:column;gap:8px;`, ha = u.div`display:flex;justify-content:space-between;width:100%;max-width:320px;`, ga = u.button`background-color:transparent;border:none;border-radius:4px;padding:0;display:flex;align-items:center;justify-content:center;box-sizing:border-box;&:enabled:hover{cursor:pointer;background-color:${h.color.background200};${N.dark`
|
|
2361
2367
|
background-color: ${h.color.background500};
|
|
2362
2368
|
`}
|
|
2363
2369
|
}
|
|
2364
2370
|
|
|
2365
|
-
${({ $inactive: e, theme: t }) => e && t.selectedTheme === "dark" &&
|
|
2366
|
-
`,
|
|
2371
|
+
${({ $inactive: e, theme: t }) => e && t.selectedTheme === "dark" && pa};
|
|
2372
|
+
`, pa = $`[fill]{fill:white;fill-opacity:0.12;}[stroke]{stroke:white;stroke-opacity:0.12;}`, fa = ({ submitted: e, value: t = "", onChange: n }) => {
|
|
2367
2373
|
const { stringSet: o } = R();
|
|
2368
2374
|
return e && !t ? null : /* @__PURE__ */ r.createElement(
|
|
2369
|
-
|
|
2375
|
+
ba,
|
|
2370
2376
|
{
|
|
2371
2377
|
disabled: e,
|
|
2372
2378
|
maxLength: 255,
|
|
@@ -2375,7 +2381,7 @@ const Vs = u.div`text-align:center;text-wrap:pretty;a{text-decoration:none;color
|
|
|
2375
2381
|
placeholder: o.CSAT_REASON_PLACEHOLDER
|
|
2376
2382
|
}
|
|
2377
2383
|
);
|
|
2378
|
-
},
|
|
2384
|
+
}, ba = u.input`box-sizing:border-box;width:100%;border-radius:4px;padding:10px 16px;font-size:14px;font-weight:400;font-style:normal;border:unset;&:focus{outline:none;}color:${h.themedColor.textHighEmphasis};&::placeholder{color:${h.themedColor.textLowEmphasis};}background-color:${h.color.background50};${N.dark`
|
|
2379
2385
|
background-color: ${h.themedColor.textDisabled};
|
|
2380
2386
|
`}
|
|
2381
2387
|
|
|
@@ -2388,44 +2394,44 @@ const Vs = u.div`text-align:center;text-wrap:pretty;a{text-decoration:none;color
|
|
|
2388
2394
|
background-color: ${h.themedColor.textDisabled};
|
|
2389
2395
|
`}
|
|
2390
2396
|
}
|
|
2391
|
-
`,
|
|
2397
|
+
`, xa = ({ submitted: e }) => {
|
|
2392
2398
|
const { stringSet: t } = R();
|
|
2393
2399
|
return e ? /* @__PURE__ */ r.createElement(k, { variant: "h2", color: h.themedColor.textHighEmphasis }, t.CSAT_TITLE_SUBMITTED) : /* @__PURE__ */ r.createElement(k, { variant: "h2", color: h.themedColor.textHighEmphasis }, t.CSAT_TITLE_UNSUBMITTED);
|
|
2394
2400
|
};
|
|
2395
2401
|
var te = /* @__PURE__ */ ((e) => (e.AI_AGENT_CSAT_5 = "AI_AGENT_CSAT_5", e.AI_AGENT_CSAT_5_WITH_CRE = "AI_AGENT_CSAT_5_WITH_CRE", e.HELPDESK_CSAT_5 = "HELPDESK_CSAT_5", e))(te || {});
|
|
2396
|
-
const
|
|
2402
|
+
const Ea = (e) => Sr((t, n) => ({ ...t, ...n }), e), dt = ({
|
|
2397
2403
|
type: e,
|
|
2398
2404
|
renderSubmitButton: t,
|
|
2399
2405
|
initialCsat: n,
|
|
2400
2406
|
initialCsatReason: o,
|
|
2401
2407
|
initialIsResolved: i
|
|
2402
2408
|
}) => {
|
|
2403
|
-
const [a, s] =
|
|
2409
|
+
const [a, s] = Ea({
|
|
2404
2410
|
csatType: e,
|
|
2405
2411
|
csat: n,
|
|
2406
2412
|
csatReason: o,
|
|
2407
2413
|
isResolved: i
|
|
2408
2414
|
}), l = typeof n == "number" ? "submitted" : (e === te.AI_AGENT_CSAT_5 || e === te.HELPDESK_CSAT_5) && typeof a.csat == "number" || e === te.AI_AGENT_CSAT_5_WITH_CRE && typeof a.csat == "number" && typeof a.isResolved == "boolean" ? "submittable" : "unsubmittable", c = { state: l, submitted: l === "submitted" };
|
|
2409
|
-
return /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(
|
|
2410
|
-
|
|
2415
|
+
return /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(Ca, null, /* @__PURE__ */ r.createElement(xa, { ...c }), e === te.AI_AGENT_CSAT_5_WITH_CRE && /* @__PURE__ */ r.createElement(
|
|
2416
|
+
js,
|
|
2411
2417
|
{
|
|
2412
2418
|
...c,
|
|
2413
2419
|
defaultValue: i,
|
|
2414
2420
|
value: a.isResolved,
|
|
2415
2421
|
onChange: (d) => s({ isResolved: d })
|
|
2416
2422
|
}
|
|
2417
|
-
), /* @__PURE__ */ r.createElement(
|
|
2418
|
-
|
|
2423
|
+
), /* @__PURE__ */ r.createElement(ua, { ...c, value: a.csat, onChange: (d) => s({ csat: d }) }), a.csat && /* @__PURE__ */ r.createElement(
|
|
2424
|
+
fa,
|
|
2419
2425
|
{
|
|
2420
2426
|
...c,
|
|
2421
2427
|
value: a.csatReason,
|
|
2422
2428
|
onChange: (d) => s({ csatReason: d })
|
|
2423
2429
|
}
|
|
2424
2430
|
)), l !== "submitted" && t({ state: l, params: a }));
|
|
2425
|
-
},
|
|
2431
|
+
}, Ca = u.div`display:flex;flex-direction:column;gap:12px;`, ya = () => {
|
|
2426
2432
|
const { stringSet: e } = R();
|
|
2427
2433
|
return /* @__PURE__ */ r.createElement(k, { variant: "body2", color: h.themedColor.textMidEmphasis, style: { textAlign: "center" } }, e.CSAT_SUBMISSION_EXPIRED);
|
|
2428
|
-
},
|
|
2434
|
+
}, va = (e) => {
|
|
2429
2435
|
if (e.messageType !== "admin.csat")
|
|
2430
2436
|
throw new Error("Invalid message type");
|
|
2431
2437
|
const t = Ur(), { stringSet: n } = R(), { extendedMessagePayload: o, csat: i, csatReason: a, csatExpireAt: s, isResolvedWhenDeterminedByUser: l, onSubmitCSAT: c } = e, { visibility: d, type: m } = (o == null ? void 0 : o.csat) ?? {};
|
|
@@ -2438,32 +2444,32 @@ const xa = (e) => Sr((t, n) => ({ ...t, ...n }), e), dt = ({
|
|
|
2438
2444
|
isResolved: x.isResolved
|
|
2439
2445
|
}) : t();
|
|
2440
2446
|
};
|
|
2441
|
-
return /* @__PURE__ */ r.createElement(
|
|
2447
|
+
return /* @__PURE__ */ r.createElement(_a, null, !i && en(s) ? /* @__PURE__ */ r.createElement(ya, null) : /* @__PURE__ */ r.createElement(
|
|
2442
2448
|
g,
|
|
2443
2449
|
{
|
|
2444
2450
|
type: m,
|
|
2445
2451
|
initialCsat: i,
|
|
2446
2452
|
initialCsatReason: a,
|
|
2447
2453
|
initialIsResolved: l,
|
|
2448
|
-
renderSubmitButton: ({ state: x, params: f }) => /* @__PURE__ */ r.createElement(
|
|
2454
|
+
renderSubmitButton: ({ state: x, params: f }) => /* @__PURE__ */ r.createElement(Sa, { disabled: x !== "submittable", onClick: () => p(f) }, /* @__PURE__ */ r.createElement(k, { variant: "button" }, n.CSAT_SUBMIT_LABEL))
|
|
2449
2455
|
}
|
|
2450
2456
|
));
|
|
2451
|
-
},
|
|
2457
|
+
}, _a = u.div`display:flex;flex-direction:column;background-color:${({ theme: e }) => e.colors.csat.background};border-radius:16px;gap:16px;padding:24px;`, Sa = u.button`all:unset;background-color:${({ theme: e }) => e.colors.base.primary};color:${({ theme: e }) => e.colors.base.primaryContrastContent};border-radius:6px;padding:10px 20px;display:flex;align-items:center;justify-content:center;cursor:pointer;&:hover{background-color:${h.color.primary.dark};}&:disabled{color:${h.color.ondark.textLowEmphasis};background-color:${h.themedColor.textDisabled};cursor:not-allowed;}`;
|
|
2452
2458
|
function en(e) {
|
|
2453
2459
|
return !!e && e < Date.now();
|
|
2454
2460
|
}
|
|
2455
2461
|
const Ot = we({
|
|
2456
|
-
template:
|
|
2462
|
+
template: Ta,
|
|
2457
2463
|
components: {
|
|
2458
|
-
AdminMessage:
|
|
2459
|
-
CSATMessage:
|
|
2464
|
+
AdminMessage: Vs,
|
|
2465
|
+
CSATMessage: va
|
|
2460
2466
|
}
|
|
2461
2467
|
});
|
|
2462
|
-
function
|
|
2468
|
+
function Ta(e) {
|
|
2463
2469
|
const { components: t } = Ot.useContext(), n = $t(() => e.messageType === "admin" ? /* @__PURE__ */ r.createElement(t.AdminMessage, { ...e }) : e.messageType === "admin.csat" ? /* @__PURE__ */ r.createElement(t.CSATMessage, { ...e }) : null);
|
|
2464
|
-
return /* @__PURE__ */ r.createElement(
|
|
2470
|
+
return /* @__PURE__ */ r.createElement(wa, { $marginBottom: Tt(e.groupType) }, n);
|
|
2465
2471
|
}
|
|
2466
|
-
const
|
|
2472
|
+
const wa = u.div`padding-inline:${oe}px;margin-bottom:${({ $marginBottom: e }) => e}px;`, tn = {
|
|
2467
2473
|
file: "attach",
|
|
2468
2474
|
snippet: "snippet",
|
|
2469
2475
|
site: "website",
|
|
@@ -2473,7 +2479,7 @@ const Ta = u.div`padding-inline:${oe}px;margin-bottom:${({ $marginBottom: e }) =
|
|
|
2473
2479
|
sb_zendesk: "zendesk",
|
|
2474
2480
|
sb_desk: "snippet"
|
|
2475
2481
|
// TODO: request icon
|
|
2476
|
-
},
|
|
2482
|
+
}, ka = ({
|
|
2477
2483
|
actionbook: e,
|
|
2478
2484
|
functionCalls: t,
|
|
2479
2485
|
groundedness: n,
|
|
@@ -2513,7 +2519,7 @@ const Ta = u.div`padding-inline:${oe}px;margin-bottom:${({ $marginBottom: e }) =
|
|
|
2513
2519
|
onClick: () => a == null ? void 0 : a(E)
|
|
2514
2520
|
},
|
|
2515
2521
|
E.name
|
|
2516
|
-
), /* @__PURE__ */ r.createElement(
|
|
2522
|
+
), /* @__PURE__ */ r.createElement(Ia, { role: "button", onClick: () => s == null ? void 0 : s(E) }, /* @__PURE__ */ r.createElement(k, { variant: "body2", color: f }, "View details"), /* @__PURE__ */ r.createElement(O, { type: "chevron-right", size: 16, color: f }))))), n == null ? void 0 : n.map((E) => /* @__PURE__ */ r.createElement(ut, { key: E.id }, /* @__PURE__ */ r.createElement(je, null, m({
|
|
2517
2523
|
default: /* @__PURE__ */ r.createElement(O, { size: 16, type: tn[E.source_type] ?? tn.snippet, color: p }),
|
|
2518
2524
|
sourceType: E.source_type
|
|
2519
2525
|
})), /* @__PURE__ */ r.createElement(
|
|
@@ -2537,21 +2543,21 @@ const Ta = u.div`padding-inline:${oe}px;margin-bottom:${({ $marginBottom: e }) =
|
|
|
2537
2543
|
},
|
|
2538
2544
|
E.name
|
|
2539
2545
|
))), d);
|
|
2540
|
-
},
|
|
2546
|
+
}, Aa = u(k)`font-weight:400;`, Ge = u(Aa)`${({ $clickable: e, $highlightColor: t }) => e && $`
|
|
2541
2547
|
cursor: pointer;
|
|
2542
2548
|
text-decoration: underline;
|
|
2543
2549
|
&:hover {
|
|
2544
2550
|
color: ${t};
|
|
2545
2551
|
}
|
|
2546
2552
|
`}
|
|
2547
|
-
`, je = u.div`display:flex;align-items:center;justify-content:center;flex-shrink:0;`, Je = u.div`display:flex;gap:8px;align-items:center;`,
|
|
2548
|
-
function
|
|
2553
|
+
`, je = u.div`display:flex;align-items:center;justify-content:center;flex-shrink:0;`, Je = u.div`display:flex;gap:8px;align-items:center;`, Ia = u(Je)`cursor:pointer;gap:4px;`, ut = u(Je)`flex-direction:row;align-items:center;`, nn = u.div`display:flex;gap:4px;flex-direction:column;align-items:flex-start;`, Jn = Te(null);
|
|
2554
|
+
function $a({ testerType: e, children: t }) {
|
|
2549
2555
|
return /* @__PURE__ */ r.createElement(
|
|
2550
2556
|
Jn.Provider,
|
|
2551
2557
|
{
|
|
2552
2558
|
value: { testerType: e, isActionbookTester: e === "actionbook" }
|
|
2553
2559
|
},
|
|
2554
|
-
e && /* @__PURE__ */ r.createElement(
|
|
2560
|
+
e && /* @__PURE__ */ r.createElement(Ma, null),
|
|
2555
2561
|
t
|
|
2556
2562
|
);
|
|
2557
2563
|
}
|
|
@@ -2559,13 +2565,13 @@ const Be = () => {
|
|
|
2559
2565
|
const e = ne(Jn);
|
|
2560
2566
|
if (!e) throw new Error("_UNSAFE_INTERNAL_DashboardTesterProvider not found");
|
|
2561
2567
|
return e;
|
|
2562
|
-
},
|
|
2568
|
+
}, Ma = () => {
|
|
2563
2569
|
const { isActionbookTester: e } = Be();
|
|
2564
|
-
return /* @__PURE__ */ r.createElement(_e.Template, { template: e ?
|
|
2565
|
-
},
|
|
2570
|
+
return /* @__PURE__ */ r.createElement(_e.Template, { template: e ? Oa : void 0 }, /* @__PURE__ */ r.createElement(_e.MessageLogs, { component: La }));
|
|
2571
|
+
}, Oa = (e) => /* @__PURE__ */ r.createElement(Kn, { ...e, testerMode: !0, maxBodyWidth: Fn }), La = ({ extendedMessagePayload: e = {} }) => {
|
|
2566
2572
|
const { handlers: t } = P(), { manual: n, groundedness: o, function_calls: i, agent_message_templates: a, is_thinking: s } = e;
|
|
2567
|
-
return s || !n && !(o != null && o.length) && !(i != null && i.length) && !(a != null && a.length) ? /* @__PURE__ */ r.createElement(r.Fragment, null) : /* @__PURE__ */ r.createElement(
|
|
2568
|
-
|
|
2573
|
+
return s || !n && !(o != null && o.length) && !(i != null && i.length) && !(a != null && a.length) ? /* @__PURE__ */ r.createElement(r.Fragment, null) : /* @__PURE__ */ r.createElement(Ra, null, /* @__PURE__ */ r.createElement(Da, { width: 4 }), /* @__PURE__ */ r.createElement(
|
|
2574
|
+
ka,
|
|
2569
2575
|
{
|
|
2570
2576
|
actionbook: n,
|
|
2571
2577
|
functionCalls: i,
|
|
@@ -2577,10 +2583,10 @@ const Be = () => {
|
|
|
2577
2583
|
textColor: h.themedColor.textHighEmphasis,
|
|
2578
2584
|
barColor: h.themedColor.textDisabled
|
|
2579
2585
|
},
|
|
2580
|
-
bottomContent: /* @__PURE__ */ r.createElement(
|
|
2586
|
+
bottomContent: /* @__PURE__ */ r.createElement(Na, { variant: "caption2", color: h.themedColor.textLowEmphasis }, "Only visible in the tester")
|
|
2581
2587
|
}
|
|
2582
2588
|
));
|
|
2583
|
-
},
|
|
2589
|
+
}, Ra = u.div`display:flex;gap:16px;margin:16px ${oe}px 0;align-self:stretch;`, Da = u.div`width:${({ width: e }) => e}px;background-color:${h.themedColor.textDisabled};border-radius:100px;flex-shrink:0;`, Na = u(k)`margin-top:5px;`, Pa = ({ publishSynchronous: e = !1 }) => {
|
|
2584
2590
|
const t = /* @__PURE__ */ new Set();
|
|
2585
2591
|
return {
|
|
2586
2592
|
publish: (n) => {
|
|
@@ -2591,8 +2597,8 @@ const Be = () => {
|
|
|
2591
2597
|
subscribe: (n) => (t.add(n), () => t.delete(n))
|
|
2592
2598
|
};
|
|
2593
2599
|
};
|
|
2594
|
-
function
|
|
2595
|
-
const n = F(null), o = F(0), i = F(0), [a] = _(() =>
|
|
2600
|
+
function Ba(e, t = []) {
|
|
2601
|
+
const n = F(null), o = F(0), i = F(0), [a] = _(() => Pa({ publishSynchronous: !0 })), [s, l] = _(!0);
|
|
2596
2602
|
return le(() => {
|
|
2597
2603
|
o.current = 0, i.current = 0, l(!0), n.current && (n.current.scrollTop = n.current.scrollHeight);
|
|
2598
2604
|
}, t), le(() => a.subscribe(({ type: c, data: d }) => {
|
|
@@ -2617,7 +2623,7 @@ function Pa(e, t = []) {
|
|
|
2617
2623
|
function rn(e, t) {
|
|
2618
2624
|
return typeof t == "boolean" ? t ? "smooth" : "auto" : e;
|
|
2619
2625
|
}
|
|
2620
|
-
function
|
|
2626
|
+
function Fa(e) {
|
|
2621
2627
|
return new Promise((t) => {
|
|
2622
2628
|
const n = new Image();
|
|
2623
2629
|
n.onload = function() {
|
|
@@ -2626,23 +2632,23 @@ function Ba(e) {
|
|
|
2626
2632
|
}, n.src = URL.createObjectURL(e);
|
|
2627
2633
|
});
|
|
2628
2634
|
}
|
|
2629
|
-
async function
|
|
2635
|
+
async function Ua(e) {
|
|
2630
2636
|
if ("file" in e && e.file instanceof File && e.file.type.startsWith("image/")) {
|
|
2631
|
-
const { width: t, height: n } = await
|
|
2637
|
+
const { width: t, height: n } = await Fa(e.file);
|
|
2632
2638
|
return new Kr({
|
|
2633
2639
|
key: Xn,
|
|
2634
2640
|
value: [t, n]
|
|
2635
2641
|
});
|
|
2636
2642
|
}
|
|
2637
2643
|
}
|
|
2638
|
-
const Xn = "KEY_IMG_ASPECT_RATIO",
|
|
2644
|
+
const Xn = "KEY_IMG_ASPECT_RATIO", Ha = ({ onScrollAfterSendMessage: e }) => {
|
|
2639
2645
|
const { agentPreviewConfigs: t, handlers: n } = P(), o = F(t == null ? void 0 : t.agentAttributes);
|
|
2640
2646
|
return o.current = t == null ? void 0 : t.agentAttributes, {
|
|
2641
2647
|
onBeforeSendMessage: async (i) => {
|
|
2642
|
-
const a = await
|
|
2648
|
+
const a = await Ua(i), s = {
|
|
2643
2649
|
...i,
|
|
2644
2650
|
metaArrays: a ? [a] : void 0
|
|
2645
|
-
}, l =
|
|
2651
|
+
}, l = za(o.current);
|
|
2646
2652
|
return l ? { ...s, data: JSON.stringify(l) } : s;
|
|
2647
2653
|
},
|
|
2648
2654
|
onAfterSendMessage: (i) => {
|
|
@@ -2650,26 +2656,26 @@ const Xn = "KEY_IMG_ASPECT_RATIO", Ua = ({ onScrollAfterSendMessage: e }) => {
|
|
|
2650
2656
|
e(), (a = n == null ? void 0 : n.onMessageSend) == null || a.call(n, i.message);
|
|
2651
2657
|
}
|
|
2652
2658
|
};
|
|
2653
|
-
},
|
|
2659
|
+
}, za = (e) => {
|
|
2654
2660
|
if (!e) return null;
|
|
2655
2661
|
const t = {};
|
|
2656
2662
|
return e.ai && Object.keys(e.ai).length > 0 && (t.ai_attrs = e.ai), e.safeguard && Object.keys(e.safeguard).length > 0 && (t.safeguard_attrs = e.safeguard), typeof e.use_prompt_cache == "boolean" && (t.use_prompt_cache = e.use_prompt_cache), Object.keys(t).length > 0 ? t : null;
|
|
2657
2663
|
}, {
|
|
2658
|
-
Provider:
|
|
2664
|
+
Provider: Va,
|
|
2659
2665
|
useContext: q
|
|
2660
|
-
} = j("Conversation"),
|
|
2666
|
+
} = j("Conversation"), Wa = ({
|
|
2661
2667
|
closedChannelUrl: e,
|
|
2662
2668
|
onClearClosedChannelUrl: t,
|
|
2663
2669
|
onNavigateToConversationList: n,
|
|
2664
2670
|
children: o
|
|
2665
2671
|
}) => {
|
|
2666
|
-
const { aiAgentInfo: i, activeChannel: a, refreshActiveChannel: s } = z(), { testerType: l } = Be(), c =
|
|
2672
|
+
const { aiAgentInfo: i, activeChannel: a, refreshActiveChannel: s } = z(), { testerType: l } = Be(), c = Ba("smooth"), { onBeforeSendMessage: d, onAfterSendMessage: m } = Ha({
|
|
2667
2673
|
onScrollAfterSendMessage: () => {
|
|
2668
2674
|
c.scrollPubSub.publish({ type: "scrollToBottom", data: { animated: !1 } });
|
|
2669
2675
|
}
|
|
2670
2676
|
}), g = (x) => {
|
|
2671
2677
|
const f = x[x.length - 1];
|
|
2672
|
-
f && Qe.shouldScrollToBottom(f, i.userId, !!l) && c.scrollPubSub.publish({ type: "scrollToBottom" });
|
|
2678
|
+
f && Qe.shouldScrollToBottom(f, i.userId, !!l) && setTimeout(() => c.scrollPubSub.publish({ type: "scrollToBottom" }), 25);
|
|
2673
2679
|
}, p = U(async () => {
|
|
2674
2680
|
await s(), e && (t == null || t());
|
|
2675
2681
|
}, [s, e, t]);
|
|
@@ -2685,7 +2691,7 @@ const Xn = "KEY_IMG_ASPECT_RATIO", Ua = ({ onScrollAfterSendMessage: e }) => {
|
|
|
2685
2691
|
onConversationClosedViaDispatcher: p
|
|
2686
2692
|
},
|
|
2687
2693
|
(x) => /* @__PURE__ */ r.createElement(
|
|
2688
|
-
|
|
2694
|
+
Va,
|
|
2689
2695
|
{
|
|
2690
2696
|
value: { ...x, scrollSource: c, goToActiveConversation: p, onNavigateToConversationList: n }
|
|
2691
2697
|
},
|
|
@@ -2713,7 +2719,7 @@ const Xn = "KEY_IMG_ASPECT_RATIO", Ua = ({ onScrollAfterSendMessage: e }) => {
|
|
|
2713
2719
|
},
|
|
2714
2720
|
e
|
|
2715
2721
|
);
|
|
2716
|
-
},
|
|
2722
|
+
}, Ga = ({ onDropFiles: e }) => {
|
|
2717
2723
|
const { subscribe: t } = ne(Lt);
|
|
2718
2724
|
D(() => t(e), [e]);
|
|
2719
2725
|
};
|
|
@@ -2721,19 +2727,19 @@ xt.Consumer = ({ children: e }) => {
|
|
|
2721
2727
|
const { onDrop: t } = ne(Lt);
|
|
2722
2728
|
return e({ onDrop: t, onDragOver: (i) => i.preventDefault() });
|
|
2723
2729
|
};
|
|
2724
|
-
const
|
|
2725
|
-
loading: w(() => import("./
|
|
2726
|
-
error: w(() => import("./
|
|
2727
|
-
noChannels: w(() => import("./
|
|
2728
|
-
noMessages: w(() => import("./
|
|
2730
|
+
const Jd = ({ iconSize: e = 64, icon: t, className: n, label: o, children: i }) => /* @__PURE__ */ r.createElement(Ka, { className: n }, /* @__PURE__ */ r.createElement(O, { type: t, size: e, color: h.themedColor.textLowEmphasis }), /* @__PURE__ */ r.createElement(k, { variant: "body1", color: h.themedColor.textMidEmphasis }, o), i), ja = u.div`position:relative;display:flex;justify-content:center;align-items:center;width:100%;height:100%;`, Ka = u.div`display:flex;flex-direction:column;min-height:104px;align-items:center;gap:20px;text-align:center;`, Za = {
|
|
2731
|
+
loading: w(() => import("./PXojwkiO.js")),
|
|
2732
|
+
error: w(() => import("./DRPdjwTV.js")),
|
|
2733
|
+
noChannels: w(() => import("./BMNdyD6n.js")),
|
|
2734
|
+
noMessages: w(() => import("./BX7cHbkb.js"))
|
|
2729
2735
|
}, Se = ({ className: e, type: t = "loading", ...n }) => {
|
|
2730
|
-
const o =
|
|
2731
|
-
return /* @__PURE__ */ r.createElement(
|
|
2736
|
+
const o = Za[t];
|
|
2737
|
+
return /* @__PURE__ */ r.createElement(ja, { className: e }, /* @__PURE__ */ r.createElement(Me, { fallback: null }, /* @__PURE__ */ r.createElement(o, { ...n })));
|
|
2732
2738
|
};
|
|
2733
|
-
function
|
|
2739
|
+
function Ya(e) {
|
|
2734
2740
|
return "sendingStatus" in e ? e.sendingStatus === "succeeded" ? String(e.messageId) : e.reqId : String(e.messageId);
|
|
2735
2741
|
}
|
|
2736
|
-
const
|
|
2742
|
+
const qa = (e, t, n, o = !0) => {
|
|
2737
2743
|
if (!o || !e.isUserMessage() && !e.isFileMessage())
|
|
2738
2744
|
return "single";
|
|
2739
2745
|
const i = () => {
|
|
@@ -2747,18 +2753,18 @@ const Ya = (e, t, n, o = !0) => {
|
|
|
2747
2753
|
}, s = i(), l = a();
|
|
2748
2754
|
return s && l ? "middle" : s ? "bottom" : l ? "top" : "single";
|
|
2749
2755
|
};
|
|
2750
|
-
function
|
|
2756
|
+
function Ja(e, t) {
|
|
2751
2757
|
return e.filter((n) => Qe.isWelcomeMessage(n, t));
|
|
2752
2758
|
}
|
|
2753
2759
|
function Qn(e, t) {
|
|
2754
|
-
return
|
|
2760
|
+
return Xa(e) === t;
|
|
2755
2761
|
}
|
|
2756
|
-
function
|
|
2762
|
+
function Xa(e) {
|
|
2757
2763
|
var t;
|
|
2758
2764
|
if (e)
|
|
2759
2765
|
return e.isUserMessage() || e.isFileMessage() || e.isMultipleFilesMessage() ? e.sender.userId : ((t = e == null ? void 0 : e.sender) == null ? void 0 : t.userId) ?? void 0;
|
|
2760
2766
|
}
|
|
2761
|
-
function
|
|
2767
|
+
function Qa(e) {
|
|
2762
2768
|
return e.isAdminMessage() ? e.message === "The channel's custom_type was updated." : !1;
|
|
2763
2769
|
}
|
|
2764
2770
|
const on = (e) => !!e && "sender" in e, er = (e) => e.startsWith("image/"), tr = (e) => e.startsWith("video/"), sn = (e) => er(e) || tr(e), Ke = {
|
|
@@ -2773,18 +2779,18 @@ const on = (e) => !!e && "sender" in e, er = (e) => e.startsWith("image/"), tr =
|
|
|
2773
2779
|
if (!t) return null;
|
|
2774
2780
|
const { rootElement: i } = P(), a = pe(i), s = pe(i, !0);
|
|
2775
2781
|
return qr(
|
|
2776
|
-
/* @__PURE__ */ r.createElement(
|
|
2782
|
+
/* @__PURE__ */ r.createElement(el, { onClick: n }, /* @__PURE__ */ r.createElement(tl, { onClick: (l) => l.stopPropagation() }, o)),
|
|
2777
2783
|
a.getElementById(e) ?? a.getElementById(re.MODAL_ROOT) ?? s.body
|
|
2778
2784
|
);
|
|
2779
|
-
},
|
|
2785
|
+
}, el = u.div`position:fixed;top:0;left:0;width:100%;height:100%;background:${h.color.overlay.dark};display:flex;justify-content:center;align-items:center;z-index:${fe.MODAL};`, tl = u.div`border-radius:4px;overflow:hidden;box-shadow:0 16px 24px 2px rgba(13,13,13,0.12),0 6px 30px 5px rgba(13,13,13,0.08),0 6px 10px -5px rgba(13,13,13,0.04);z-index:${fe.MODAL};`, nl = u.div`flex-shrink:0;width:${({ $size: e }) => Z(e)};height:${({ $size: e }) => Z(e)};background-color:${({ theme: e }) => e.colors.base.primary};box-sizing:border-box;padding:6px;border-radius:50%;display:flex;justify-content:center;align-items:center;}`, rl = u(At)`path{fill:${({ theme: e }) => e.colors.base.primaryContrastContent};}`;
|
|
2780
2786
|
function rr({ size: e }) {
|
|
2781
2787
|
const { aiAgentInfo: t } = z();
|
|
2782
|
-
return t.profileUrl ? /* @__PURE__ */ r.createElement(It, { size: e, src: t.profileUrl }) : /* @__PURE__ */ r.createElement(
|
|
2788
|
+
return t.profileUrl ? /* @__PURE__ */ r.createElement(It, { size: e, src: t.profileUrl }) : /* @__PURE__ */ r.createElement(nl, { $size: e }, /* @__PURE__ */ r.createElement(rl, null));
|
|
2783
2789
|
}
|
|
2784
|
-
const
|
|
2790
|
+
const ol = u.div`width:100%;height:100%;position:fixed;top:0;left:0;outline:none;`, il = u.div`height:64px;min-height:64px;box-sizing:border-box;display:flex;justify-content:space-between;border-bottom:1px solid ${h.themedColor.textDisabled};background-color:${h.themedColor.bg_50_600};@media screen and (max-width:768px){position:relative;}`, sl = u.div`box-sizing:border-box;display:flex;flex-direction:row;align-items:center;height:64px;padding:16px 20px;width:calc(100% - 128px);`, al = u.div`margin-inline-end:8px;`, ll = u.div`max-width:500px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block;@media screen and (max-width:768px){position:absolute;inset-inline-start:64px;top:10px;display:block;max-width:calc(100vw - 240px);}`, cl = u.div`display:inline-block;margin-inline-start:8px;padding-top:5px;@media screen and (max-width:768px){position:absolute;inset-inline-start:56px;top:24px;}`, dl = u.div`display:flex;width:160px;justify-content:flex-end;`, ul = u.div`inset-inline-end:0;display:flex;flex-direction:row;`, Et = u.div`width:64px;padding:21px;box-sizing:border-box;cursor:${(e) => e.disabled ? "not-allowed" : "pointer"};`, ml = u(Et)`border-inline-start:1px solid ${h.themedColor.textDisabled};`, hl = u.div`width:100%;height:100%;display:flex;align-items:center;justify-content:center;`, gl = u.video`max-width:100%;max-height:100%;user-select:none;-webkit-user-drag:none;`, pl = u.img`max-width:90%;max-height:90%;user-select:none;-webkit-user-drag:none;`, fl = u.div`max-width:100%;max-height:100%;display:flex;justify-content:center;align-items:center;`, bl = ({ message: e, onClose: t, onDownloadClick: n }) => {
|
|
2785
2791
|
const { sender: o, type: i, url: a, name: s = "", threadInfo: l } = e, { profileUrl: c, nickname: d, userId: m } = o, { userSession: g, aiAgentInfo: p } = z();
|
|
2786
2792
|
return /* @__PURE__ */ r.createElement(
|
|
2787
|
-
|
|
2793
|
+
El,
|
|
2788
2794
|
{
|
|
2789
2795
|
profileUrl: c,
|
|
2790
2796
|
nickname: d,
|
|
@@ -2798,7 +2804,7 @@ const rl = u.div`width:100%;height:100%;position:fixed;top:0;left:0;outline:none
|
|
|
2798
2804
|
onDownloadClick: n
|
|
2799
2805
|
}
|
|
2800
2806
|
);
|
|
2801
|
-
},
|
|
2807
|
+
}, xl = ({ profileUrl: e, isBotMessage: t }) => !e && t ? /* @__PURE__ */ r.createElement(rr, { size: 32 }) : /* @__PURE__ */ r.createElement(It, { size: 32, src: e }), El = ({
|
|
2802
2808
|
profileUrl: e,
|
|
2803
2809
|
isBotMessage: t,
|
|
2804
2810
|
nickname: n,
|
|
@@ -2812,7 +2818,7 @@ const rl = u.div`width:100%;height:100%;position:fixed;top:0;left:0;outline:none
|
|
|
2812
2818
|
onDownloadClick: m
|
|
2813
2819
|
}) => {
|
|
2814
2820
|
const { stringSet: g } = R();
|
|
2815
|
-
return /* @__PURE__ */ r.createElement(nr, { onClose: l, visible: !0, rootElementId: re.MODAL_ROOT }, /* @__PURE__ */ r.createElement(
|
|
2821
|
+
return /* @__PURE__ */ r.createElement(nr, { onClose: l, visible: !0, rootElementId: re.MODAL_ROOT }, /* @__PURE__ */ r.createElement(ol, null, /* @__PURE__ */ r.createElement(il, null, /* @__PURE__ */ r.createElement(sl, null, /* @__PURE__ */ r.createElement(al, null, /* @__PURE__ */ r.createElement(xl, { profileUrl: e, isBotMessage: t })), /* @__PURE__ */ r.createElement(ll, null, /* @__PURE__ */ r.createElement(k, { variant: "h2", color: h.themedColor.textHighEmphasis }, o)), /* @__PURE__ */ r.createElement(cl, null, /* @__PURE__ */ r.createElement(k, { variant: "body1", color: h.color.ondark.textMidEmphasis }, n))), /* @__PURE__ */ r.createElement(dl, null, sn(i) && /* @__PURE__ */ r.createElement(ul, null, /* @__PURE__ */ r.createElement(Et, { as: "a", href: a, target: "_blank", rel: St, onClick: m }, /* @__PURE__ */ r.createElement(O, { type: "download", color: h.themedColor.textHighEmphasis, size: 24 })), c && s && /* @__PURE__ */ r.createElement(
|
|
2816
2822
|
Et,
|
|
2817
2823
|
{
|
|
2818
2824
|
disabled: d,
|
|
@@ -2828,14 +2834,14 @@ const rl = u.div`width:100%;height:100%;position:fixed;top:0;left:0;outline:none
|
|
|
2828
2834
|
size: 24
|
|
2829
2835
|
}
|
|
2830
2836
|
)
|
|
2831
|
-
)), /* @__PURE__ */ r.createElement(
|
|
2837
|
+
)), /* @__PURE__ */ r.createElement(ml, { onClick: l }, /* @__PURE__ */ r.createElement(O, { type: "close", color: h.themedColor.textHighEmphasis, size: 24 })))), /* @__PURE__ */ r.createElement(hl, { onClick: (p) => p.currentTarget === p.target && l() }, tr(i) && /* @__PURE__ */ r.createElement(gl, { controls: !0 }, /* @__PURE__ */ r.createElement("source", { src: a, type: i })), er(i) && /* @__PURE__ */ r.createElement(pl, { src: a, alt: o }), !sn(i) && /* @__PURE__ */ r.createElement(fl, null, /* @__PURE__ */ r.createElement(k, { variant: "h1", color: h.themedColor.textHighEmphasis }, g.FILE_VIEWER__UNSUPPORT)))));
|
|
2832
2838
|
}, or = ({
|
|
2833
2839
|
className: e,
|
|
2834
2840
|
locale: t,
|
|
2835
2841
|
date: n = Date.now(),
|
|
2836
2842
|
formatString: o = "MMMM dd, yyyy",
|
|
2837
2843
|
style: i
|
|
2838
|
-
}) => /* @__PURE__ */ r.createElement(
|
|
2844
|
+
}) => /* @__PURE__ */ r.createElement(Cl, { style: i, className: e }, /* @__PURE__ */ r.createElement(k, { variant: "caption4", color: h.themedColor.textMidEmphasis }, yn(n, o, { locale: t }))), Cl = u.div`display:flex;justify-content:center;align-items:center;`, yl = Le(function(t, n) {
|
|
2839
2845
|
const {
|
|
2840
2846
|
messages: o,
|
|
2841
2847
|
renderMessage: i,
|
|
@@ -2859,16 +2865,16 @@ const rl = u.div`width:100%;height:100%;position:fixed;top:0;left:0;outline:none
|
|
|
2859
2865
|
const xe = async () => {
|
|
2860
2866
|
if (!b.current) return;
|
|
2861
2867
|
const y = b.current;
|
|
2862
|
-
if (g(
|
|
2868
|
+
if (g(vl(y)), L.current = y.scrollHeight - y.scrollTop, be.current = L.current - y.clientHeight, T.current = y.scrollTop, C.current) return;
|
|
2863
2869
|
const B = y.clientHeight * Math.min(Math.max(0, m), 1);
|
|
2864
2870
|
y.scrollTop <= B ? (C.current = !0, v.current = "top", await c(), C.current = !1) : y.scrollHeight - y.scrollTop - y.clientHeight <= B ? (C.current = !0, v.current = "bottom", await d(), C.current = !1) : v.current = void 0;
|
|
2865
2871
|
};
|
|
2866
|
-
return /* @__PURE__ */ r.createElement(
|
|
2872
|
+
return /* @__PURE__ */ r.createElement(_l, { id: "infinite-list-container" }, /* @__PURE__ */ r.createElement(Sl, { id: "infinite-list-inner", ref: b, onScroll: xe }, E === "bottom" && /* @__PURE__ */ r.createElement("div", { style: { flexGrow: 1 } }), a, o.map((y, B) => i({ message: y, index: B })), s), /* @__PURE__ */ r.createElement(Tl, { id: "infinite-list-overlay-container" }, /* @__PURE__ */ r.createElement(wl, { id: "infinite-list-overlay" }, l)));
|
|
2867
2873
|
}), an = 50;
|
|
2868
|
-
function
|
|
2874
|
+
function vl(e) {
|
|
2869
2875
|
return e.scrollTop <= an ? "top" : e.scrollHeight - (e.scrollTop + e.clientHeight) <= an ? "bottom" : "middle";
|
|
2870
2876
|
}
|
|
2871
|
-
const
|
|
2877
|
+
const _l = u.div`display:flex;position:relative;flex:1;overflow:hidden;`, Sl = u.div`display:flex;flex:1;flex-direction:column;overflow-y:auto;scrollbar-color:${h.themedColor.textLowEmphasis}transparent;&::-webkit-scrollbar-thumb:hover{background-color:transparent;}`, Tl = u.div`position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:none;`, wl = u.div`pointer-events:auto;`, kl = ({ className: e, onClick: t }) => /* @__PURE__ */ r.createElement(Al, { className: e, onClick: t, tabIndex: 0 }, /* @__PURE__ */ r.createElement(O, { size: 24, type: "chevron-down", color: h.color.primary.main })), Al = u.button`all:unset;cursor:pointer;display:flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:24px;box-shadow:0 2px 8px 0 rgba(0,0,0,0.08),0 4px 6px 0 rgba(0,0,0,0.12);${N.light`
|
|
2872
2878
|
background-color: ${h.color.background50};
|
|
2873
2879
|
&:hover {
|
|
2874
2880
|
background-color: ${h.color.background100};
|
|
@@ -2901,13 +2907,13 @@ const vl = u.div`display:flex;position:relative;flex:1;overflow:hidden;`, _l = u
|
|
|
2901
2907
|
}
|
|
2902
2908
|
}
|
|
2903
2909
|
}), n;
|
|
2904
|
-
},
|
|
2905
|
-
const { agentPreviewConfigs: e = {}, aiAgentId: t } = P(), { aiAgentInfo: n } = z(), { stringSet: o, dateLocale: i } = R(), { messageSource: a } = q(), { Template: s } = _e.useContext(), l = e.welcomeMessages ?? [], c = a.messages, d =
|
|
2910
|
+
}, Il = () => {
|
|
2911
|
+
const { agentPreviewConfigs: e = {}, aiAgentId: t } = P(), { aiAgentInfo: n } = z(), { stringSet: o, dateLocale: i } = R(), { messageSource: a } = q(), { Template: s } = _e.useContext(), l = e.welcomeMessages ?? [], c = a.messages, d = Ja(c, t), m = c[d.length + 1], g = d[0] ?? m;
|
|
2906
2912
|
return {
|
|
2907
2913
|
/**
|
|
2908
2914
|
* Returns a list of messages filtered according to business requirements.
|
|
2909
2915
|
*/
|
|
2910
|
-
filteredMessages: c.filter((p) =>
|
|
2916
|
+
filteredMessages: c.filter((p) => Qa(p) ? !1 : l.length > 0 ? !Qe.isWelcomeMessage(p, t) : !0),
|
|
2911
2917
|
/**
|
|
2912
2918
|
* Determines whether to display the DateSeparator in the data list by comparing it with the welcome messages from Bot Studio.
|
|
2913
2919
|
*/
|
|
@@ -2944,16 +2950,16 @@ const vl = u.div`display:flex;position:relative;flex:1;overflow:hidden;`, _l = u
|
|
|
2944
2950
|
);
|
|
2945
2951
|
}))
|
|
2946
2952
|
};
|
|
2947
|
-
},
|
|
2948
|
-
function
|
|
2953
|
+
}, $l = (e) => u(e).withConfig({ shouldForwardProp: Jr });
|
|
2954
|
+
function Ml(e) {
|
|
2949
2955
|
var o;
|
|
2950
2956
|
const t = "remove_powered_by", n = (o = e == null ? void 0 : e.appInfo) == null ? void 0 : o.applicationAttributes;
|
|
2951
2957
|
return Array.isArray(n) && n.includes(t);
|
|
2952
2958
|
}
|
|
2953
|
-
const
|
|
2959
|
+
const Ol = ({ style: e }) => {
|
|
2954
2960
|
const { stringSet: t } = R(), { chatSDK: n } = P(), { isActionbookTester: o } = Be();
|
|
2955
|
-
return
|
|
2956
|
-
|
|
2961
|
+
return Ml(n) || o ? null : /* @__PURE__ */ r.createElement(Ll, { variant: "caption2", style: e }, t.POWERED_BY + " ", /* @__PURE__ */ r.createElement(
|
|
2962
|
+
Rl,
|
|
2957
2963
|
{
|
|
2958
2964
|
variant: "caption2",
|
|
2959
2965
|
as: "a",
|
|
@@ -2964,17 +2970,17 @@ const Ml = ({ style: e }) => {
|
|
|
2964
2970
|
},
|
|
2965
2971
|
"Sendbird"
|
|
2966
2972
|
));
|
|
2967
|
-
},
|
|
2973
|
+
}, Ll = u(k)`color:${h.themedColor.textLowEmphasis};text-align:center;`, Rl = $l(k)`
|
|
2968
2974
|
color: ${h.themedColor.textLowEmphasis};
|
|
2969
2975
|
cursor: pointer;
|
|
2970
2976
|
text-decoration: none;
|
|
2971
|
-
`,
|
|
2977
|
+
`, Dl = () => {
|
|
2972
2978
|
var c;
|
|
2973
2979
|
const { stringSet: e } = R(), { activeChannel: t } = z(), { channelSource: n, goToActiveConversation: o, scrollSource: i } = q(), a = Wn(n.channel), l = t && ((c = n.channel) == null ? void 0 : c.url) === (t == null ? void 0 : t.url) && a;
|
|
2974
2980
|
return le(() => {
|
|
2975
2981
|
l && i.scrollPubSub.publish({ type: "scrollToBottom", data: { animated: !0 } });
|
|
2976
|
-
}, [l]), l ? /* @__PURE__ */ r.createElement(
|
|
2977
|
-
|
|
2982
|
+
}, [l]), l ? /* @__PURE__ */ r.createElement(Nl, null, /* @__PURE__ */ r.createElement(
|
|
2983
|
+
Pl,
|
|
2978
2984
|
{
|
|
2979
2985
|
variant: "button",
|
|
2980
2986
|
role: "button",
|
|
@@ -2983,16 +2989,16 @@ const Ml = ({ style: e }) => {
|
|
|
2983
2989
|
},
|
|
2984
2990
|
e.START_NEW_CONVERSATION
|
|
2985
2991
|
)) : null;
|
|
2986
|
-
},
|
|
2987
|
-
const { Template: e } = Mt.useContext(), { Template: t } = _e.useContext(), { Template: n } = Ot.useContext(), [o, i] = _(null), { userSession: a, aiAgentInfo: s } = z(), { agentPreviewConfigs: l, chatSDK: c, state: d } = P(), { stringSet: m, dateLocale: g } = R(), { conversation: p, channelSource: x, messageSource: f, scrollSource: E } = q(), { isActionbookTester: b } = Be(), { filteredMessages: C, shouldShowOriginalDate: v, renderAgentPreviewWelcomeMessages: T } =
|
|
2992
|
+
}, Nl = u.div`display:flex;justify-content:center;margin:16px 0;`, Pl = u(k)`border-radius:6px;box-sizing:border-box;padding:10px 20px;border:1px solid ${h.themedColor.textDisabled};cursor:pointer;user-select:none;`, Bl = !0, Fl = () => {
|
|
2993
|
+
const { Template: e } = Mt.useContext(), { Template: t } = _e.useContext(), { Template: n } = Ot.useContext(), [o, i] = _(null), { userSession: a, aiAgentInfo: s } = z(), { agentPreviewConfigs: l, chatSDK: c, state: d } = P(), { stringSet: m, dateLocale: g } = R(), { conversation: p, channelSource: x, messageSource: f, scrollSource: E } = q(), { isActionbookTester: b } = Be(), { filteredMessages: C, shouldShowOriginalDate: v, renderAgentPreviewWelcomeMessages: T } = Il(), { storage: S } = Mn(), Y = ir(), L = $t(() => {
|
|
2988
2994
|
const y = Y[0];
|
|
2989
2995
|
if (!y) return null;
|
|
2990
2996
|
const B = y.userId === s.userId;
|
|
2991
2997
|
return { user: B ? s : y, isBot: B };
|
|
2992
2998
|
});
|
|
2993
2999
|
D(() => {
|
|
2994
|
-
|
|
2995
|
-
}, [!!L, E]);
|
|
3000
|
+
L && E.scrollPubSub.publish({ type: "scrollToBottom", data: { animated: !0 } });
|
|
3001
|
+
}, [!!L, E.scrollPubSub.publish]);
|
|
2996
3002
|
const be = (y, B = !1) => {
|
|
2997
3003
|
var Ee;
|
|
2998
3004
|
return B ? s : ((Ee = x.channel) == null ? void 0 : Ee.members.find((J) => J.userId === y.sender.userId)) ?? y.sender;
|
|
@@ -3004,7 +3010,7 @@ const Ml = ({ style: e }) => {
|
|
|
3004
3010
|
return y ? /* @__PURE__ */ r.createElement("div", { style: { width: "100%" } }, y) : /* @__PURE__ */ r.createElement(Se, { type: "noMessages", label: m.PLACE_HOLDER__NO_MESSAGES });
|
|
3005
3011
|
}
|
|
3006
3012
|
return /* @__PURE__ */ r.createElement(
|
|
3007
|
-
|
|
3013
|
+
yl,
|
|
3008
3014
|
{
|
|
3009
3015
|
ref: E.scrollRef,
|
|
3010
3016
|
scrollPositionRef: E.scrollPositionRef,
|
|
@@ -3015,7 +3021,7 @@ const Ml = ({ style: e }) => {
|
|
|
3015
3021
|
onLoadPrev: f.loadPrevious,
|
|
3016
3022
|
onLoadNext: f.loadNext,
|
|
3017
3023
|
depsForResetScrollPositionToBottom: [f.initialized, f.messages.length !== 0],
|
|
3018
|
-
messageTopArea: /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(
|
|
3024
|
+
messageTopArea: /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(Ol, { style: { marginTop: 16 } }), T()),
|
|
3019
3025
|
messageBottomArea: /* @__PURE__ */ r.createElement(r.Fragment, null, L && /* @__PURE__ */ r.createElement(
|
|
3020
3026
|
t,
|
|
3021
3027
|
{
|
|
@@ -3026,10 +3032,10 @@ const Ml = ({ style: e }) => {
|
|
|
3026
3032
|
groupType: "single",
|
|
3027
3033
|
message: ""
|
|
3028
3034
|
}
|
|
3029
|
-
), /* @__PURE__ */ r.createElement(
|
|
3030
|
-
overlayArea: /* @__PURE__ */ r.createElement(r.Fragment, null, !E.isScrollBottomReached && /* @__PURE__ */ r.createElement(
|
|
3035
|
+
), /* @__PURE__ */ r.createElement(Dl, null)),
|
|
3036
|
+
overlayArea: /* @__PURE__ */ r.createElement(r.Fragment, null, !E.isScrollBottomReached && /* @__PURE__ */ r.createElement(Hl, { onClick: () => E.scrollPubSub.publish({ type: "scrollToBottom" }) })),
|
|
3031
3037
|
renderMessage: ({ message: y, index: B }) => {
|
|
3032
|
-
const Ee =
|
|
3038
|
+
const Ee = Ya(y), J = C[B - 1], Ae = C[B + 1], ot = C[C.length - 1], it = y === ot, A = qa(y, J, Ae, Bl), I = !Yr((J == null ? void 0 : J.createdAt) ?? 0, y.createdAt) && v(B) && !b, M = () => {
|
|
3033
3039
|
y.isFileMessage() && i(y);
|
|
3034
3040
|
}, H = () => {
|
|
3035
3041
|
y.isFileMessage() && Vn(y.url);
|
|
@@ -3056,7 +3062,7 @@ const Ml = ({ style: e }) => {
|
|
|
3056
3062
|
{
|
|
3057
3063
|
...ie,
|
|
3058
3064
|
...p,
|
|
3059
|
-
isResolvedWhenDeterminedByUser:
|
|
3065
|
+
isResolvedWhenDeterminedByUser: zl(p),
|
|
3060
3066
|
messageType: "admin.csat",
|
|
3061
3067
|
onSubmitCSAT: ({ csat: G, csatType: me, csatReason: V, isResolved: ae }) => {
|
|
3062
3068
|
var he;
|
|
@@ -3123,39 +3129,39 @@ const Ml = ({ style: e }) => {
|
|
|
3123
3129
|
}
|
|
3124
3130
|
);
|
|
3125
3131
|
};
|
|
3126
|
-
return /* @__PURE__ */ r.createElement(
|
|
3127
|
-
},
|
|
3128
|
-
function
|
|
3132
|
+
return /* @__PURE__ */ r.createElement(Ul, { id: `${X}-message-list` }, xe(), o && /* @__PURE__ */ r.createElement(bl, { onClose: () => i(null), message: o }));
|
|
3133
|
+
}, Ul = u.div`overflow-y:hidden;display:flex;flex:1;position:relative;`, Hl = u(kl)`position:absolute;bottom:20px;inset-inline-end:20px;`;
|
|
3134
|
+
function zl(e) {
|
|
3129
3135
|
var t;
|
|
3130
3136
|
if (((t = e == null ? void 0 : e.resolution) == null ? void 0 : t.determinedBy) === "user")
|
|
3131
3137
|
return e.resolution.isResolved;
|
|
3132
3138
|
}
|
|
3133
|
-
const
|
|
3139
|
+
const Vl = () => {
|
|
3134
3140
|
const { stringSet: e } = R(), { connectionError: t } = z(), { channelSource: n } = q(), o = t || n.error;
|
|
3135
3141
|
if (o) {
|
|
3136
3142
|
const i = t ? void 0 : { label: e.RETRY, onClick: () => n.refetch() };
|
|
3137
3143
|
return /* @__PURE__ */ r.createElement(Se, { type: "error", label: o.message, action: i });
|
|
3138
3144
|
}
|
|
3139
|
-
return n.channel ? /* @__PURE__ */ r.createElement(
|
|
3145
|
+
return n.channel ? /* @__PURE__ */ r.createElement(Fl, null) : /* @__PURE__ */ r.createElement(Se, { type: "loading" });
|
|
3140
3146
|
}, sr = () => {
|
|
3141
3147
|
const { stringSet: e } = R(), { activeChannel: t } = z(), [n] = _(() => (t == null ? void 0 : t.status) === W.OPEN);
|
|
3142
3148
|
return n ? e.RETURN_TO_CONVERSATION : e.START_NEW_CONVERSATION;
|
|
3143
|
-
},
|
|
3149
|
+
}, Wl = () => {
|
|
3144
3150
|
const { stringSet: e } = R(), { goToActiveConversation: t } = q(), n = sr();
|
|
3145
|
-
return /* @__PURE__ */ r.createElement(
|
|
3146
|
-
},
|
|
3151
|
+
return /* @__PURE__ */ r.createElement(Gl, null, /* @__PURE__ */ r.createElement(k, { variant: "body1", color: h.themedColor.textMidEmphasis }, e.CONVERSATION_CLOSED_FOOTER_LABEL), /* @__PURE__ */ r.createElement(jl, { onClick: t }, /* @__PURE__ */ r.createElement(k, { variant: "button", color: h.themedColor.textHighEmphasis }, n)));
|
|
3152
|
+
}, Gl = u.div`display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px 0;gap:14px;${N.light`
|
|
3147
3153
|
background-color: ${h.color.background100};
|
|
3148
3154
|
`}
|
|
3149
3155
|
${N.dark`
|
|
3150
3156
|
background-color: ${h.color.background500};
|
|
3151
3157
|
`}
|
|
3152
|
-
`,
|
|
3158
|
+
`, jl = u.button`all:unset;padding:10px 20px;border-radius:6px;border:1px solid ${h.themedColor.textDisabled};cursor:pointer;${N.light`
|
|
3153
3159
|
background-color: ${h.color.background50};
|
|
3154
3160
|
`}
|
|
3155
3161
|
${N.dark`
|
|
3156
3162
|
background-color: ${h.color.background700};
|
|
3157
3163
|
`}
|
|
3158
|
-
`, ar = Te(void 0),
|
|
3164
|
+
`, ar = Te(void 0), Kl = ({ children: e }) => {
|
|
3159
3165
|
const { stringSet: t } = R(), { aiAgentInfo: n } = z(), { channelSource: o } = q(), [i, a] = _([]), [s, l] = _({
|
|
3160
3166
|
visible: !1,
|
|
3161
3167
|
title: "",
|
|
@@ -3209,27 +3215,27 @@ const zl = () => {
|
|
|
3209
3215
|
}
|
|
3210
3216
|
},
|
|
3211
3217
|
e,
|
|
3212
|
-
/* @__PURE__ */ r.createElement(
|
|
3218
|
+
/* @__PURE__ */ r.createElement(Zl, { ...s, onClose: () => l((p) => ({ ...p, visible: !1, title: "" })) })
|
|
3213
3219
|
);
|
|
3214
3220
|
}, Rt = () => {
|
|
3215
3221
|
const e = ne(ar);
|
|
3216
3222
|
if (!e)
|
|
3217
3223
|
throw new Error("useFileUpload must be used within FileUploadProvider");
|
|
3218
3224
|
return e;
|
|
3219
|
-
},
|
|
3225
|
+
}, Zl = ({
|
|
3220
3226
|
title: e,
|
|
3221
3227
|
buttonText: t,
|
|
3222
3228
|
visible: n,
|
|
3223
3229
|
onClose: o
|
|
3224
|
-
}) => /* @__PURE__ */ r.createElement(nr, { rootElementId: re.WINDOW, visible: n, onClose: o }, /* @__PURE__ */ r.createElement(
|
|
3225
|
-
function
|
|
3230
|
+
}) => /* @__PURE__ */ r.createElement(nr, { rootElementId: re.WINDOW, visible: n, onClose: o }, /* @__PURE__ */ r.createElement(Yl, null, /* @__PURE__ */ r.createElement(Jl, null, /* @__PURE__ */ r.createElement(k, { variant: "h1", color: h.themedColor.textHighEmphasis }, e)), /* @__PURE__ */ r.createElement(ql, null, /* @__PURE__ */ r.createElement(Xl, { onClick: o }, /* @__PURE__ */ r.createElement(k, { variant: "button", color: h.themedColor.textHighEmphasisInverse }, t))))), Yl = u.div`width:100%;height:auto;padding-block:18px 24px;padding-inline:24px;margin:0 auto;border-radius:4px;box-sizing:border-box;background-color:${({ theme: e }) => e.colors.base.modalContentBackground};`, ql = u.div`display:flex;flex-direction:row;justify-content:flex-end;`, Jl = u.div`margin-bottom:16px;`, Xl = u.button`display:flex;justify-content:center;align-items:center;border-radius:4px;cursor:pointer;background-color:${h.themedColor.error};border:1px solid ${h.themedColor.error};padding:10px 16px;&:hover{background-color:${h.color.error.dark};border-color:${h.color.error.dark};}&:active{background-color:${h.color.error.extraDark};}`;
|
|
3231
|
+
function Ql({ blurred: e, elementRef: t, document: n = window.document }) {
|
|
3226
3232
|
const o = F(!1);
|
|
3227
3233
|
e && t.current && n.activeElement === t.current && (o.current = !0), le(() => {
|
|
3228
3234
|
var i;
|
|
3229
3235
|
!e && o.current && ((i = t.current) == null || i.focus(), o.current = !1);
|
|
3230
3236
|
}, [e]);
|
|
3231
3237
|
}
|
|
3232
|
-
const
|
|
3238
|
+
const ec = u.div`&::-webkit-scrollbar{display:none;}overflow-x:auto;display:flex;flex-direction:row;gap:10px;padding:8px 16px;background-color:transparent;`, tc = u.div`display:flex;flex-shrink:0;position:relative;margin-block-start:8px;border-radius:12px;height:64px;img{border-radius:12px;object-fit:cover;width:64px;-webkit-user-drag:none;}`, nc = u.div`display:flex;align-items:center;justify-content:center;position:absolute;inset-inline-end:-8px;inset-block-start:-8px;cursor:pointer;border-radius:50%;${N.light`
|
|
3233
3239
|
background-color: ${h.color.background50};
|
|
3234
3240
|
`}
|
|
3235
3241
|
${N.dark`
|
|
@@ -3248,16 +3254,16 @@ const Ql = u.div`&::-webkit-scrollbar{display:none;}overflow-x:auto;display:flex
|
|
|
3248
3254
|
circle {
|
|
3249
3255
|
stroke: ${h.themedColor.bg_50_600};
|
|
3250
3256
|
}
|
|
3251
|
-
`,
|
|
3257
|
+
`, rc = () => {
|
|
3252
3258
|
const e = Ne(), [t, n] = _(), { files: o, removeFile: i, isFileUploadEnabled: a } = Rt();
|
|
3253
|
-
return !a || o.length === 0 ? null : /* @__PURE__ */ r.createElement(
|
|
3254
|
-
},
|
|
3255
|
-
const { stringSet: n } = R(), { aiAgentInfo: o } = z(), i =
|
|
3259
|
+
return !a || o.length === 0 ? null : /* @__PURE__ */ r.createElement(ec, null, o.map(({ preview: { type: s, name: l, url: c } }, d) => /* @__PURE__ */ r.createElement(tc, { key: c, onMouseOver: () => n(d), onMouseLeave: () => n(void 0) }, (e || t === d) && /* @__PURE__ */ r.createElement(nc, { title: "Remove file", onClick: () => i(d) }, /* @__PURE__ */ r.createElement(O, { type: "close-filled", color: h.themedColor.textMidEmphasis })), s.startsWith("image/") ? /* @__PURE__ */ r.createElement("img", { alt: "file-image", src: c }) : /* @__PURE__ */ r.createElement(kt, { name: l, type: wt(l, s) }))));
|
|
3260
|
+
}, oc = ({ channel: e, messages: t }) => {
|
|
3261
|
+
const { stringSet: n } = R(), { aiAgentInfo: o } = z(), i = ic(), a = sc({
|
|
3256
3262
|
lastMessage: t[t.length - 1],
|
|
3257
3263
|
aiAgentUserId: o.userId
|
|
3258
3264
|
});
|
|
3259
3265
|
return !e || !i || Wn(e) ? [!0, n.MESSAGE_INPUT__PLACE_HOLDER__DISABLED] : a ? [!0, n.MESSAGE_INPUT__PLACE_HOLDER__WAIT_AI_AGENT_RESPONSE] : [!1, n.MESSAGE_INPUT__PLACE_HOLDER];
|
|
3260
|
-
},
|
|
3266
|
+
}, ic = () => {
|
|
3261
3267
|
const e = xn(), { chatSDK: t } = P(), [n, o] = _(!0);
|
|
3262
3268
|
return D(() => {
|
|
3263
3269
|
const i = new Xe({
|
|
@@ -3269,7 +3275,7 @@ const Ql = u.div`&::-webkit-scrollbar{display:none;}overflow-x:auto;display:flex
|
|
|
3269
3275
|
t.removeConnectionHandler(e);
|
|
3270
3276
|
};
|
|
3271
3277
|
}, [t]), n;
|
|
3272
|
-
},
|
|
3278
|
+
}, sc = ({
|
|
3273
3279
|
lastMessage: e,
|
|
3274
3280
|
aiAgentUserId: t
|
|
3275
3281
|
}) => {
|
|
@@ -3282,10 +3288,10 @@ const Ql = u.div`&::-webkit-scrollbar{display:none;}overflow-x:auto;display:flex
|
|
|
3282
3288
|
}, lr = {
|
|
3283
3289
|
textArea: $`min-height:40px;height:40px;font-size:16px;line-height:24px;`,
|
|
3284
3290
|
attachIcon: $`margin-bottom:4px;`
|
|
3285
|
-
}, cr = u.button`all:unset;cursor:pointer;display:flex;align-items:center;justify-content:center;width:32px;height:32px;`,
|
|
3291
|
+
}, cr = u.button`all:unset;cursor:pointer;display:flex;align-items:center;justify-content:center;width:32px;height:32px;`, ac = u(cr)`flex-shrink:0;margin-inline-end:12px;margin-bottom:2px;&:disabled{cursor:not-allowed;}&:not(:disabled){&:hover{path{fill:${h.themedColor.textHighEmphasis};}}&:active{border-radius:4px;background-color:${h.themedColor.bg_200_400};}}${_t && lr.attachIcon};`, lc = u.input`display:none;`, ln = u.div`width:100%;position:relative;background-color:${h.themedColor.bg_100_500};border-radius:20px;`, cn = u.div`display:flex;flex-direction:row;align-items:flex-end;position:relative;`, dn = u.textarea`all:unset;display:block;flex:1;min-width:0;padding-top:8px;padding-bottom:8px;padding-inline-start:16px;padding-inline-end:12px;box-sizing:border-box;font-size:14px;line-height:20px;color:${h.themedColor.textHighEmphasis};resize:none;width:100%;height:${Dn}px;overflow-wrap:break-word;white-space:pre-wrap;overflow-x:hidden;${_t && lr.textArea};&::placeholder{color:${h.themedColor.textLowEmphasis};}&:disabled{cursor:not-allowed;&::placeholder{color:${h.themedColor.textDisabled};}}`, un = u.div`padding:12px 16px;position:relative;display:flex;align-items:center;`, mn = ({ disabled: e }) => {
|
|
3286
3292
|
const t = F(null), { addFiles: n, clearFiles: o, files: i, isFileUploadEnabled: a } = Rt();
|
|
3287
3293
|
return !a || i.length > 0 ? null : /* @__PURE__ */ r.createElement(
|
|
3288
|
-
|
|
3294
|
+
ac,
|
|
3289
3295
|
{
|
|
3290
3296
|
disabled: e,
|
|
3291
3297
|
onClick: () => {
|
|
@@ -3302,7 +3308,7 @@ const Ql = u.div`&::-webkit-scrollbar{display:none;}overflow-x:auto;display:flex
|
|
|
3302
3308
|
}
|
|
3303
3309
|
),
|
|
3304
3310
|
/* @__PURE__ */ r.createElement(
|
|
3305
|
-
|
|
3311
|
+
lc,
|
|
3306
3312
|
{
|
|
3307
3313
|
type: "file",
|
|
3308
3314
|
ref: t,
|
|
@@ -3314,12 +3320,12 @@ const Ql = u.div`&::-webkit-scrollbar{display:none;}overflow-x:auto;display:flex
|
|
|
3314
3320
|
}
|
|
3315
3321
|
)
|
|
3316
3322
|
);
|
|
3317
|
-
},
|
|
3318
|
-
const e = F(null), [t, n] = _(""), { rootElement: o } = P(), { channelSource: i, messageSource: a } = q(), [s, l] =
|
|
3323
|
+
}, cc = () => {
|
|
3324
|
+
const e = F(null), [t, n] = _(""), { rootElement: o } = P(), { channelSource: i, messageSource: a } = q(), [s, l] = oc({
|
|
3319
3325
|
channel: i.channel,
|
|
3320
3326
|
messages: a.messages
|
|
3321
3327
|
}), { files: c, addFiles: d, clearFiles: m } = Rt();
|
|
3322
|
-
|
|
3328
|
+
Ga({ onDropFiles: d }), Ql({ blurred: s, elementRef: e, document: pe(o) });
|
|
3323
3329
|
const g = t.trim().length > 0, p = c.length > 0, x = !s && (g || p), f = () => {
|
|
3324
3330
|
e.current && (e.current.value = "", e.current.style.height = ""), m(), n("");
|
|
3325
3331
|
}, E = async () => {
|
|
@@ -3345,7 +3351,7 @@ const Ql = u.div`&::-webkit-scrollbar{display:none;}overflow-x:auto;display:flex
|
|
|
3345
3351
|
}
|
|
3346
3352
|
n(T.target.value);
|
|
3347
3353
|
};
|
|
3348
|
-
return s ? /* @__PURE__ */ r.createElement(un, null, /* @__PURE__ */ r.createElement(ln, null, /* @__PURE__ */ r.createElement(cn, null, /* @__PURE__ */ r.createElement(dn, { disabled: !0, placeholder: l }), /* @__PURE__ */ r.createElement(mn, { disabled: !0 })))) : /* @__PURE__ */ r.createElement(un, null, /* @__PURE__ */ r.createElement(ln, null, /* @__PURE__ */ r.createElement(
|
|
3354
|
+
return s ? /* @__PURE__ */ r.createElement(un, null, /* @__PURE__ */ r.createElement(ln, null, /* @__PURE__ */ r.createElement(cn, null, /* @__PURE__ */ r.createElement(dn, { disabled: !0, placeholder: l }), /* @__PURE__ */ r.createElement(mn, { disabled: !0 })))) : /* @__PURE__ */ r.createElement(un, null, /* @__PURE__ */ r.createElement(ln, null, /* @__PURE__ */ r.createElement(rc, null), /* @__PURE__ */ r.createElement(cn, null, /* @__PURE__ */ r.createElement(
|
|
3349
3355
|
dn,
|
|
3350
3356
|
{
|
|
3351
3357
|
ref: e,
|
|
@@ -3358,21 +3364,21 @@ const Ql = u.div`&::-webkit-scrollbar{display:none;}overflow-x:auto;display:flex
|
|
|
3358
3364
|
onPaste: b
|
|
3359
3365
|
}
|
|
3360
3366
|
), /* @__PURE__ */ r.createElement(mn, null))), x && /* @__PURE__ */ r.createElement(cr, { onClick: () => E() }, /* @__PURE__ */ r.createElement(O, { type: "send", color: h.color.primary.main, size: 20 })));
|
|
3361
|
-
},
|
|
3367
|
+
}, dc = u.div`padding:8px 16px;text-align:center;word-break:break-word;white-space:pre-wrap;line-height:1.43;letter-spacing:-0.2px;font-size:14px;font-weight:400;color:${h.themedColor.textLowEmphasis};&& a{font-weight:700;text-decoration:none;${N.light`
|
|
3362
3368
|
color: ${h.color.information.light};
|
|
3363
3369
|
`};
|
|
3364
3370
|
${N.dark`
|
|
3365
3371
|
color: ${h.color.information.main};
|
|
3366
3372
|
`};
|
|
3367
3373
|
}
|
|
3368
|
-
`,
|
|
3374
|
+
`, uc = w(() => import("./x6g8obrl.js").then((e) => ({ default: e.MarkdownText }))), mc = () => {
|
|
3369
3375
|
const { aiAgentInfo: e } = z(), { messageSource: t } = q(), { userSession: n } = z();
|
|
3370
|
-
return !e.specialNoticeEnabled || !e.specialNotice || !(t.initialized && !t.messages.some((i) => Qn(i, n.userId))) ? null : /* @__PURE__ */ r.createElement(
|
|
3371
|
-
},
|
|
3376
|
+
return !e.specialNoticeEnabled || !e.specialNotice || !(t.initialized && !t.messages.some((i) => Qn(i, n.userId))) ? null : /* @__PURE__ */ r.createElement(dc, null, /* @__PURE__ */ r.createElement(uc, null, e.specialNotice));
|
|
3377
|
+
}, hc = () => /* @__PURE__ */ r.createElement(gc, null, /* @__PURE__ */ r.createElement(mc, null), /* @__PURE__ */ r.createElement(Kl, null, /* @__PURE__ */ r.createElement(cc, null))), gc = u.div`z-index:0;border:none;width:100%;`, pc = () => {
|
|
3372
3378
|
var a, s, l;
|
|
3373
3379
|
const { activeChannel: e } = z(), { channelSource: t } = q(), n = ((s = (a = t.channel) == null ? void 0 : a.conversation) == null ? void 0 : s.status) === W.CLOSED;
|
|
3374
|
-
return !(((l = t.channel) == null ? void 0 : l.url) === (e == null ? void 0 : e.url)) && n ? /* @__PURE__ */ r.createElement(
|
|
3375
|
-
},
|
|
3380
|
+
return !(((l = t.channel) == null ? void 0 : l.url) === (e == null ? void 0 : e.url)) && n ? /* @__PURE__ */ r.createElement(Wl, null) : /* @__PURE__ */ r.createElement(hc, null);
|
|
3381
|
+
}, fc = () => {
|
|
3376
3382
|
var v;
|
|
3377
3383
|
const { state: e, logger: t, enableCloseConversationButton: n, enableExpandButton: o, dispatcher: i } = P(), { stringSet: a } = R(), { aiAgentInfo: s, activeChannel: l } = z(), { channelSource: c, onNavigateToConversationList: d } = q(), m = c.channel, p = Ne() ? 24 : 16, x = () => {
|
|
3378
3384
|
e.setOpened(!1);
|
|
@@ -3386,42 +3392,42 @@ const Ql = u.div`&::-webkit-scrollbar{display:none;}overflow-x:auto;display:flex
|
|
|
3386
3392
|
}, E = async () => {
|
|
3387
3393
|
m && await i.send(ao.CloseConversation({ channelUrl: m.url }));
|
|
3388
3394
|
}, b = l && (m == null ? void 0 : m.url) === l.url, C = s.showHandoffButton && !!((v = m == null ? void 0 : m.conversation) != null && v.handoff) && b;
|
|
3389
|
-
return /* @__PURE__ */ r.createElement(
|
|
3390
|
-
|
|
3395
|
+
return /* @__PURE__ */ r.createElement(yc, null, /* @__PURE__ */ r.createElement(vc, null, d && /* @__PURE__ */ r.createElement(Fe, { onClick: () => d() }, /* @__PURE__ */ r.createElement(O, { type: "menu", size: 24, color: h.themedColor.textHighEmphasis })), b && /* @__PURE__ */ r.createElement(rr, { size: 34 }), /* @__PURE__ */ r.createElement(Sc, { variant: "h2", color: h.themedColor.textHighEmphasis }, s.nickname || (m == null ? void 0 : m.name))), /* @__PURE__ */ r.createElement(_c, null, C && /* @__PURE__ */ r.createElement(
|
|
3396
|
+
Cc,
|
|
3391
3397
|
{
|
|
3392
3398
|
tooltipLabel: a.HEADER_BUTTON__AGENT_HANDOFF,
|
|
3393
|
-
disabled: !
|
|
3399
|
+
disabled: !os(m),
|
|
3394
3400
|
size: p,
|
|
3395
3401
|
onClick: f
|
|
3396
3402
|
}
|
|
3397
3403
|
), n && /* @__PURE__ */ r.createElement(
|
|
3398
|
-
|
|
3404
|
+
Ec,
|
|
3399
3405
|
{
|
|
3400
3406
|
disabled: !Gn(m),
|
|
3401
3407
|
size: p,
|
|
3402
3408
|
onClick: E
|
|
3403
3409
|
}
|
|
3404
|
-
), o && /* @__PURE__ */ r.createElement(
|
|
3405
|
-
},
|
|
3410
|
+
), o && /* @__PURE__ */ r.createElement(bc, { size: p }), /* @__PURE__ */ r.createElement(xc, { size: p, onClick: x })));
|
|
3411
|
+
}, bc = ({ size: e, disabled: t }) => {
|
|
3406
3412
|
const { state: n } = P();
|
|
3407
3413
|
return /* @__PURE__ */ r.createElement(Fe, { "aria-label": "expand", onClick: () => n.setExpanded(!n.expanded), disabled: t }, /* @__PURE__ */ r.createElement(O, { type: n.expanded ? "collapse" : "expand", size: e, color: h.themedColor.textHighEmphasis }));
|
|
3408
|
-
},
|
|
3414
|
+
}, xc = ({ size: e, disabled: t, onClick: n }) => /* @__PURE__ */ r.createElement(Fe, { "aria-label": "close messenger", onClick: n, disabled: t }, /* @__PURE__ */ r.createElement(O, { type: "close", size: e, color: h.themedColor.textHighEmphasis })), Ec = ({ size: e, disabled: t, onClick: n }) => /* @__PURE__ */ r.createElement(Fe, { "aria-label": "close conversation", onClick: n, disabled: t }, /* @__PURE__ */ r.createElement(
|
|
3409
3415
|
O,
|
|
3410
3416
|
{
|
|
3411
3417
|
type: "refresh",
|
|
3412
3418
|
size: e,
|
|
3413
3419
|
color: t ? h.themedColor.textDisabled : h.themedColor.textHighEmphasis
|
|
3414
3420
|
}
|
|
3415
|
-
)),
|
|
3421
|
+
)), Cc = ({ size: e, onClick: t, disabled: n, tooltipLabel: o }) => /* @__PURE__ */ r.createElement(qn, { label: o, position: "bottom", disabled: n }, /* @__PURE__ */ r.createElement(Fe, { "aria-label": "agent", onClick: t, disabled: n }, /* @__PURE__ */ r.createElement(
|
|
3416
3422
|
O,
|
|
3417
3423
|
{
|
|
3418
3424
|
type: "agent",
|
|
3419
3425
|
size: e,
|
|
3420
3426
|
color: n ? h.themedColor.textDisabled : h.themedColor.textHighEmphasis
|
|
3421
3427
|
}
|
|
3422
|
-
))),
|
|
3428
|
+
))), yc = u.div`height:56px;box-sizing:border-box;display:flex;align-items:center;padding:11px 12px;border-bottom:1px solid ${h.themedColor.textDisabled};background-color:${({ theme: e }) => e.colors.base.headerBackground};`, vc = u.div`display:flex;flex:1;flex-direction:row;align-items:center;gap:6px;overflow:hidden;`, _c = u.div`display:flex;gap:10px;align-items:center;justify-content:center;`, Sc = u(k)`text-overflow:ellipsis;overflow:hidden;white-space:nowrap;padding:2px 0;`, Fe = u.button`all:unset;padding:4px;cursor:pointer;display:flex;align-items:center;justify-content:center;&:disabled{cursor:not-allowed;}`, Tc = () => {
|
|
3423
3429
|
const { isActionbookTester: e } = Be();
|
|
3424
|
-
return e ? null : /* @__PURE__ */ r.createElement(
|
|
3430
|
+
return e ? null : /* @__PURE__ */ r.createElement(fc, null);
|
|
3425
3431
|
}, hn = ({
|
|
3426
3432
|
children: e,
|
|
3427
3433
|
onNavigateToConversationList: t,
|
|
@@ -3430,60 +3436,60 @@ const Ql = u.div`&::-webkit-scrollbar{display:none;}overflow-x:auto;display:flex
|
|
|
3430
3436
|
}) => {
|
|
3431
3437
|
const { Template: i } = Dt.useContext();
|
|
3432
3438
|
return /* @__PURE__ */ r.createElement(
|
|
3433
|
-
|
|
3439
|
+
Wa,
|
|
3434
3440
|
{
|
|
3435
3441
|
onNavigateToConversationList: t,
|
|
3436
3442
|
closedChannelUrl: n,
|
|
3437
3443
|
onClearClosedChannelUrl: o
|
|
3438
3444
|
},
|
|
3439
|
-
/* @__PURE__ */ r.createElement(xt, null, /* @__PURE__ */ r.createElement(xt.Consumer, null, (a) => /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(
|
|
3445
|
+
/* @__PURE__ */ r.createElement(xt, null, /* @__PURE__ */ r.createElement(xt.Consumer, null, (a) => /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(kc, { ...a }, /* @__PURE__ */ r.createElement(i, null)), e)))
|
|
3440
3446
|
);
|
|
3441
3447
|
}, Dt = we({
|
|
3442
|
-
template:
|
|
3448
|
+
template: wc,
|
|
3443
3449
|
components: {
|
|
3444
|
-
Header:
|
|
3445
|
-
Body:
|
|
3446
|
-
Footer:
|
|
3450
|
+
Header: Tc,
|
|
3451
|
+
Body: Vl,
|
|
3452
|
+
Footer: pc
|
|
3447
3453
|
}
|
|
3448
3454
|
});
|
|
3449
|
-
function
|
|
3455
|
+
function wc() {
|
|
3450
3456
|
const { components: e } = Dt.useContext();
|
|
3451
3457
|
return /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(e.Header, null), /* @__PURE__ */ r.createElement(e.Body, null), /* @__PURE__ */ r.createElement(e.Footer, null));
|
|
3452
3458
|
}
|
|
3453
|
-
const
|
|
3454
|
-
Provider:
|
|
3459
|
+
const kc = u.div`height:100%;width:100%;display:flex;flex-direction:column;flex:1;background-color:${({ theme: e }) => e.colors.base.background};`, {
|
|
3460
|
+
Provider: Ac,
|
|
3455
3461
|
useContext: dr
|
|
3456
3462
|
} = j("ConversationList");
|
|
3457
|
-
function
|
|
3463
|
+
function Ic({
|
|
3458
3464
|
conversationListFilter: e,
|
|
3459
3465
|
onOpenConversationView: t = Oe,
|
|
3460
3466
|
children: n
|
|
3461
3467
|
}) {
|
|
3462
|
-
return /* @__PURE__ */ r.createElement(bo, { conversationListFilter: e }, (o) => /* @__PURE__ */ r.createElement(
|
|
3468
|
+
return /* @__PURE__ */ r.createElement(bo, { conversationListFilter: e }, (o) => /* @__PURE__ */ r.createElement(Ac, { value: { ...o, onOpenConversationView: t } }, n));
|
|
3463
3469
|
}
|
|
3464
3470
|
const ur = we({
|
|
3465
|
-
template:
|
|
3471
|
+
template: $c,
|
|
3466
3472
|
// Note: 리스트 변경되면 디자인 변경 가능성이 있어서 일단 컴포넌트는 비워둠
|
|
3467
3473
|
components: {}
|
|
3468
3474
|
});
|
|
3469
|
-
function
|
|
3475
|
+
function $c({
|
|
3470
3476
|
title: e = "",
|
|
3471
3477
|
lastMessageTimestamp: t = Date.now(),
|
|
3472
3478
|
onClick: n
|
|
3473
3479
|
}) {
|
|
3474
3480
|
const { stringSet: o, format: i } = R();
|
|
3475
|
-
return /* @__PURE__ */ r.createElement(
|
|
3481
|
+
return /* @__PURE__ */ r.createElement(Mc, { role: "button", onClick: () => n == null ? void 0 : n() }, /* @__PURE__ */ r.createElement(Lc, null, /* @__PURE__ */ r.createElement(Rc, null, /* @__PURE__ */ r.createElement(k, { variant: "subtitle1", color: h.themedColor.textHighEmphasis }, i(t, o.DATE_FORMAT__CONVERSATION_LIST__LIST_ITEM_TITLE)), /* @__PURE__ */ r.createElement(k, { variant: "caption2", color: h.themedColor.textLowEmphasis }, i(t, o.DATE_FORMAT__CONVERSATION_LIST__LIST_ITEM_TITLE_CAPTION))), /* @__PURE__ */ r.createElement(k, { variant: "body3", color: h.themedColor.textMidEmphasis }, e || o.CONVERSATION_LIST__TOPICS_FALLBACK)), /* @__PURE__ */ r.createElement(O, { type: "chevron-right", size: 16, color: h.themedColor.textHighEmphasis }), /* @__PURE__ */ r.createElement(Oc, null));
|
|
3476
3482
|
}
|
|
3477
|
-
const
|
|
3483
|
+
const Mc = u.div`display:flex;flex-direction:row;align-items:center;position:relative;width:100%;padding:14px 16px;box-sizing:border-box;gap:4px;cursor:pointer;`, Oc = u.div`position:absolute;bottom:0;height:1px;width:calc(100% - 32px);background-color:${h.themedColor.textDisabled};`, Lc = u.div`gap:4px;display:flex;flex-direction:column;flex:1;`, Rc = u.div`display:flex;justify-content:flex-start;align-items:center;gap:6px;`, Dc = ({ items: e, renderItem: t, onEndReached: n }) => {
|
|
3478
3484
|
const o = (i) => {
|
|
3479
3485
|
const a = i.target;
|
|
3480
3486
|
a.scrollHeight - a.scrollTop === a.clientHeight && (n == null || n());
|
|
3481
3487
|
};
|
|
3482
|
-
return /* @__PURE__ */ r.createElement(
|
|
3483
|
-
},
|
|
3488
|
+
return /* @__PURE__ */ r.createElement(Nc, { onScroll: (i) => o(i) }, e.map((i, a) => t(i, a)));
|
|
3489
|
+
}, Nc = u.div`width:100%;height:100%;display:flex;flex-direction:column;flex:1;overflow:auto;`, Pc = () => {
|
|
3484
3490
|
const { stringSet: e } = R(), { listSource: t, onOpenConversationView: n } = dr(), { Template: o } = ur.useContext();
|
|
3485
3491
|
return t.initialized ? t.channels.length === 0 ? /* @__PURE__ */ r.createElement(Se, { type: "noChannels", label: e.CONVERSATION_LIST__NO_CONVERSATIONS }) : /* @__PURE__ */ r.createElement(
|
|
3486
|
-
|
|
3492
|
+
Dc,
|
|
3487
3493
|
{
|
|
3488
3494
|
items: t.channels,
|
|
3489
3495
|
renderItem: (i) => {
|
|
@@ -3505,10 +3511,10 @@ const $c = u.div`display:flex;flex-direction:row;align-items:center;position:rel
|
|
|
3505
3511
|
}
|
|
3506
3512
|
}
|
|
3507
3513
|
) : /* @__PURE__ */ r.createElement(Se, { type: "loading" });
|
|
3508
|
-
},
|
|
3514
|
+
}, Bc = () => {
|
|
3509
3515
|
const { refreshActiveChannel: e } = z(), { onOpenConversationView: t } = dr(), n = sr();
|
|
3510
3516
|
return /* @__PURE__ */ r.createElement(
|
|
3511
|
-
|
|
3517
|
+
Fc,
|
|
3512
3518
|
{
|
|
3513
3519
|
role: "button",
|
|
3514
3520
|
onClick: async () => {
|
|
@@ -3516,35 +3522,35 @@ const $c = u.div`display:flex;flex-direction:row;align-items:center;position:rel
|
|
|
3516
3522
|
t(o, W.OPEN);
|
|
3517
3523
|
}
|
|
3518
3524
|
},
|
|
3519
|
-
/* @__PURE__ */ r.createElement(
|
|
3525
|
+
/* @__PURE__ */ r.createElement(Uc, { variant: "h1" }, n)
|
|
3520
3526
|
);
|
|
3521
|
-
},
|
|
3527
|
+
}, Fc = u.div`background-color:${({ theme: e }) => e.colors.base.primary};display:flex;align-items:center;justify-content:center;padding:16px;cursor:pointer;`, Uc = u(k)`color:${({ theme: e }) => e.colors.base.primaryContrastContent};overflow:hidden;text-overflow:ellipsis;white-space:nowrap;`, Hc = () => {
|
|
3522
3528
|
const { stringSet: e } = R();
|
|
3523
|
-
return /* @__PURE__ */ r.createElement(
|
|
3524
|
-
},
|
|
3529
|
+
return /* @__PURE__ */ r.createElement(zc, null, /* @__PURE__ */ r.createElement(Vc, { variant: "h2", color: h.themedColor.textHighEmphasis }, e.CONVERSATION_LIST__HEADER_TITLE), /* @__PURE__ */ r.createElement(Wc, null));
|
|
3530
|
+
}, zc = u.div`display:flex;flex-direction:column;align-items:flex-start;justify-content:center;width:100%;flex-shrink:0;height:56px;position:relative;background-color:${({ theme: e }) => e.colors.base.headerBackground};`, Vc = u(k)`padding:0 12px;width:100%;box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;`, Wc = u.div`position:absolute;bottom:0;width:100%;height:1px;background-color:${h.themedColor.textDisabled};`, Gc = ({ conversationListFilter: e, children: t, onOpenConversationView: n }) => {
|
|
3525
3531
|
const { Template: o } = Nt.useContext();
|
|
3526
3532
|
return /* @__PURE__ */ r.createElement(
|
|
3527
|
-
|
|
3533
|
+
Ic,
|
|
3528
3534
|
{
|
|
3529
3535
|
conversationListFilter: e,
|
|
3530
3536
|
onOpenConversationView: n
|
|
3531
3537
|
},
|
|
3532
|
-
/* @__PURE__ */ r.createElement(
|
|
3538
|
+
/* @__PURE__ */ r.createElement(Kc, null, /* @__PURE__ */ r.createElement(o, null)),
|
|
3533
3539
|
t
|
|
3534
3540
|
);
|
|
3535
3541
|
}, Nt = we({
|
|
3536
|
-
template:
|
|
3542
|
+
template: jc,
|
|
3537
3543
|
components: {
|
|
3538
|
-
Header:
|
|
3539
|
-
Body:
|
|
3540
|
-
Footer:
|
|
3544
|
+
Header: Hc,
|
|
3545
|
+
Body: Pc,
|
|
3546
|
+
Footer: Bc
|
|
3541
3547
|
}
|
|
3542
3548
|
});
|
|
3543
|
-
function
|
|
3549
|
+
function jc() {
|
|
3544
3550
|
const { components: e } = Nt.useContext();
|
|
3545
3551
|
return /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(e.Header, null), /* @__PURE__ */ r.createElement(e.Body, null), /* @__PURE__ */ r.createElement(e.Footer, null));
|
|
3546
3552
|
}
|
|
3547
|
-
const
|
|
3553
|
+
const Kc = u.div`height:100%;width:100%;display:flex;flex-direction:column;flex:1;background-color:${({ theme: e }) => e.colors.base.background};`, Zc = $`:where(#${re.ENTRY}) :not(code *){font-family:'Roboto',sans-serif;box-sizing:border-box;}`, Yc = [Zc, ni, ri], qc = (e, ...t) => Lr(e, ...Yc, ...t), Jc = qc``, Xc = Xr(
|
|
3548
3554
|
Dt,
|
|
3549
3555
|
_e,
|
|
3550
3556
|
Mt,
|
|
@@ -3552,7 +3558,7 @@ const jc = u.div`height:100%;width:100%;display:flex;flex-direction:column;flex:
|
|
|
3552
3558
|
Nt,
|
|
3553
3559
|
ur
|
|
3554
3560
|
);
|
|
3555
|
-
function
|
|
3561
|
+
function Qc({
|
|
3556
3562
|
appearance: e,
|
|
3557
3563
|
rootElement: t,
|
|
3558
3564
|
logger: n,
|
|
@@ -3562,7 +3568,7 @@ function Xc({
|
|
|
3562
3568
|
messageTemplate: s,
|
|
3563
3569
|
theme: l
|
|
3564
3570
|
}) {
|
|
3565
|
-
return ci(jo, t), /* @__PURE__ */ r.createElement(Rr, { target: t }, /* @__PURE__ */ r.createElement(si, { rootElement: t, logger: n, appearance: e, theme: l }, /* @__PURE__ */ r.createElement(Fo, { internalVariables: s == null ? void 0 : s.__internalVariables }, /* @__PURE__ */ r.createElement(ti, { stringSet: i, logger: n, language: o }, /* @__PURE__ */ r.createElement(
|
|
3571
|
+
return ci(jo, t), /* @__PURE__ */ r.createElement(Rr, { target: t }, /* @__PURE__ */ r.createElement(si, { rootElement: t, logger: n, appearance: e, theme: l }, /* @__PURE__ */ r.createElement(Fo, { internalVariables: s == null ? void 0 : s.__internalVariables }, /* @__PURE__ */ r.createElement(ti, { stringSet: i, logger: n, language: o }, /* @__PURE__ */ r.createElement(Xc, null, a, /* @__PURE__ */ r.createElement(Jc, null))))));
|
|
3566
3572
|
}
|
|
3567
3573
|
const gn = {
|
|
3568
3574
|
key_payment_plan_container: {
|
|
@@ -3758,8 +3764,8 @@ const gn = {
|
|
|
3758
3764
|
...s
|
|
3759
3765
|
}, l) {
|
|
3760
3766
|
var c;
|
|
3761
|
-
return ye.level !== n && (ye.level = n), li("https://fonts.googleapis.com/css2?family=Roboto&display=swap", t), /* @__PURE__ */ r.createElement("div", { id: re.ENTRY, style: { width: "fit-content", height: "fit-content" } }, /* @__PURE__ */ r.createElement(No, { logger: ye, storage:
|
|
3762
|
-
|
|
3767
|
+
return ye.level !== n && (ye.level = n), li("https://fonts.googleapis.com/css2?family=Roboto&display=swap", t), /* @__PURE__ */ r.createElement("div", { id: re.ENTRY, style: { width: "fit-content", height: "fit-content" } }, /* @__PURE__ */ r.createElement(No, { logger: ye, storage: td }, /* @__PURE__ */ r.createElement(
|
|
3768
|
+
Qc,
|
|
3763
3769
|
{
|
|
3764
3770
|
logger: ye,
|
|
3765
3771
|
rootElement: t,
|
|
@@ -3778,13 +3784,13 @@ const gn = {
|
|
|
3778
3784
|
countryCode: s.countryCode,
|
|
3779
3785
|
context: s.context,
|
|
3780
3786
|
logger: ye,
|
|
3781
|
-
dispatcher:
|
|
3787
|
+
dispatcher: ed,
|
|
3782
3788
|
chatParams: { customApiHost: s.customApiHost, customWebSocketHost: s.customWebSocketHost }
|
|
3783
3789
|
},
|
|
3784
|
-
/* @__PURE__ */ r.createElement(pi, { rootElement: t, ...s }, /* @__PURE__ */ r.createElement(Ci, { ref: l, userSessionInfo: i }, /* @__PURE__ */ r.createElement(
|
|
3790
|
+
/* @__PURE__ */ r.createElement(pi, { rootElement: t, ...s }, /* @__PURE__ */ r.createElement(Ci, { ref: l, userSessionInfo: i }, /* @__PURE__ */ r.createElement($a, { ...s._UNSAFE_INTERNAL_dashboardTester }, a, /* @__PURE__ */ r.createElement("div", { id: re.MODAL_ROOT }))))
|
|
3785
3791
|
)
|
|
3786
3792
|
)));
|
|
3787
|
-
}), ye = new kn(En.WARN),
|
|
3793
|
+
}), ye = new kn(En.WARN), ed = new Tn(ye), Pt = "@sba/message-template", pn = (e) => `${Pt}/templates/${e}`, fn = () => `${Pt}/token`, td = Ro({
|
|
3788
3794
|
onSetTemplate: (e, t) => {
|
|
3789
3795
|
gn[e] || ee.setItem(pn(e), t);
|
|
3790
3796
|
},
|
|
@@ -3808,9 +3814,9 @@ const gn = {
|
|
|
3808
3814
|
return t ? i.body.classList.add(a) : i.body.classList.remove(a), () => {
|
|
3809
3815
|
i.body.classList.remove(a);
|
|
3810
3816
|
};
|
|
3811
|
-
}, [i, t]), /* @__PURE__ */ r.createElement(
|
|
3812
|
-
},
|
|
3813
|
-
function
|
|
3817
|
+
}, [i, t]), /* @__PURE__ */ r.createElement(nd, { dir: n, $visible: t }, e);
|
|
3818
|
+
}, nd = u.div`width:100%;height:100%;position:fixed;top:0;left:0;z-index:${fe.WINDOW};visibility:${({ $visible: e }) => e ? "visible" : "hidden"};`, rd = 48, od = 2 / 3;
|
|
3819
|
+
function id({
|
|
3814
3820
|
className: e,
|
|
3815
3821
|
isOpened: t,
|
|
3816
3822
|
onClick: n,
|
|
@@ -3819,11 +3825,11 @@ function od({
|
|
|
3819
3825
|
dir: a,
|
|
3820
3826
|
animated: s = !0,
|
|
3821
3827
|
backgroundColor: l,
|
|
3822
|
-
size: c =
|
|
3828
|
+
size: c = rd
|
|
3823
3829
|
}) {
|
|
3824
|
-
const d = ft(l), m = Math.round(c *
|
|
3830
|
+
const d = ft(l), m = Math.round(c * od);
|
|
3825
3831
|
return /* @__PURE__ */ r.createElement(
|
|
3826
|
-
|
|
3832
|
+
ld,
|
|
3827
3833
|
{
|
|
3828
3834
|
dir: a,
|
|
3829
3835
|
id: re.LAUNCHER,
|
|
@@ -3834,11 +3840,11 @@ function od({
|
|
|
3834
3840
|
$backgroundColor: l,
|
|
3835
3841
|
$size: c
|
|
3836
3842
|
},
|
|
3837
|
-
/* @__PURE__ */ r.createElement(
|
|
3838
|
-
/* @__PURE__ */ r.createElement(
|
|
3843
|
+
/* @__PURE__ */ r.createElement(cd, { $isOpened: t, $animated: s, $fillColor: d, $iconSize: m }, /* @__PURE__ */ r.createElement(bn.Open, { url: i, isDefaultIcon: o === "default_icon" })),
|
|
3844
|
+
/* @__PURE__ */ r.createElement(dd, { $isOpened: t, $animated: s, $fillColor: d, $iconSize: m }, /* @__PURE__ */ r.createElement(bn.Close, { size: m }))
|
|
3839
3845
|
);
|
|
3840
3846
|
}
|
|
3841
|
-
const
|
|
3847
|
+
const sd = $`&:hover{transition:transform 250ms cubic-bezier(0.33,0,0,1);transform:scale(1.1);}&:active{transform:scale(0.8);}`, ad = $`img{width:100%;height:100%;object-fit:cover;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-drag:none;&[data-default-icon='true']{width:${({ $iconSize: e }) => e}px;height:${({ $iconSize: e }) => e}px;filter:${({ $fillColor: e }) => e === Rn.WHITE ? "grayscale(100%) brightness(2000%)" : "grayscale(100%) invert(100%) saturate(0%) brightness(0%) contrast(1000%)"};}}`, gr = $`svg{width:${({ $iconSize: e }) => e}px;height:${({ $iconSize: e }) => e}px;${({ $fillColor: e }) => $`
|
|
3842
3848
|
path {
|
|
3843
3849
|
fill: ${e};
|
|
3844
3850
|
}
|
|
@@ -3847,14 +3853,14 @@ const id = $`&:hover{transition:transform 250ms cubic-bezier(0.33,0,0,1);transfo
|
|
|
3847
3853
|
}
|
|
3848
3854
|
`}
|
|
3849
3855
|
}
|
|
3850
|
-
`,
|
|
3856
|
+
`, ld = u.button`position:relative;padding:0;width:${({ $size: e }) => e}px;height:${({ $size: e }) => e}px;background:${({ $backgroundColor: e }) => e};border-radius:50%;transition:all 0.3s cubic-bezier(0.31,-0.105,0.43,1.4);border:none;display:flex;justify-content:center;align-items:center;box-shadow:0 16px 24px 2px rgba(33,33,33,0.12),0 6px 30px 5px rgba(33,33,33,0.08),0 6px 10px -5px rgba(33,33,33,0.04);${({ $animated: e }) => e && sd}`, pr = u.span`position:absolute;width:100%;height:100%;border-radius:50%;overflow:hidden;transition:transform 0.16s linear,opacity 0.08s linear,scale 0.16s linear;user-select:none;display:flex;justify-content:center;align-items:center;`, cd = u(pr)`opacity:${({ $isOpened: e }) => e ? 0 : 1};transform:${({ $animated: e, $isOpened: t }) => e && (t ? "rotate(-90deg) scale(0)" : "rotate(0deg)")};${ad}${gr}`, dd = u(pr)`scale:${({ $isOpened: e }) => e ? 1 : 0};transform:${({ $animated: e, $isOpened: t }) => e && (t ? "rotate(0deg)" : "rotate(-90deg)")};${gr}`, bn = {
|
|
3851
3857
|
Open: (e) => e.url ? /* @__PURE__ */ r.createElement("img", { src: e.url, alt: "launcher-img", "data-default-icon": e.isDefaultIcon }) : /* @__PURE__ */ r.createElement(At, null),
|
|
3852
3858
|
Close: ({ size: e }) => /* @__PURE__ */ r.createElement(O, { size: e, type: "chevron-down" })
|
|
3853
3859
|
};
|
|
3854
3860
|
function fr({ className: e, size: t }) {
|
|
3855
3861
|
const { colors: n } = Ct(), { dir: o, state: i } = P(), { launcherInfo: a } = z();
|
|
3856
|
-
return
|
|
3857
|
-
|
|
3862
|
+
return md(), /* @__PURE__ */ r.createElement(
|
|
3863
|
+
id,
|
|
3858
3864
|
{
|
|
3859
3865
|
dir: o,
|
|
3860
3866
|
className: e,
|
|
@@ -3867,8 +3873,8 @@ function fr({ className: e, size: t }) {
|
|
|
3867
3873
|
}
|
|
3868
3874
|
);
|
|
3869
3875
|
}
|
|
3870
|
-
const
|
|
3871
|
-
function
|
|
3876
|
+
const ud = 1e3 * 60;
|
|
3877
|
+
function md() {
|
|
3872
3878
|
const { chatSDK: e, state: t, logger: n, enableAutoDisconnectInLauncher: o } = P(), i = F(null);
|
|
3873
3879
|
D(() => {
|
|
3874
3880
|
if (!o) return;
|
|
@@ -3881,32 +3887,32 @@ function ud() {
|
|
|
3881
3887
|
function l() {
|
|
3882
3888
|
a(), i.current = setTimeout(async () => {
|
|
3883
3889
|
await e.disconnectWebSocket(), n.debug("useSDKInactivityTimeout: disconnected");
|
|
3884
|
-
},
|
|
3890
|
+
}, ud);
|
|
3885
3891
|
}
|
|
3886
3892
|
t.opened ? s() : (l(), n.debug("useSDKInactivityTimeout: schedule disconnect"));
|
|
3887
3893
|
}, [o, e, t.opened]);
|
|
3888
3894
|
}
|
|
3889
3895
|
const br = Te(null);
|
|
3890
|
-
function
|
|
3896
|
+
function hd() {
|
|
3891
3897
|
const e = ne(br);
|
|
3892
3898
|
if (!e)
|
|
3893
3899
|
throw new Error("useNavigator() must be used within <Navigator />");
|
|
3894
3900
|
return e;
|
|
3895
3901
|
}
|
|
3896
3902
|
function xr({ children: e }) {
|
|
3897
|
-
const t =
|
|
3903
|
+
const t = hd();
|
|
3898
3904
|
return typeof e == "function" ? e(t) : /* @__PURE__ */ r.createElement(r.Fragment, null, e);
|
|
3899
3905
|
}
|
|
3900
|
-
const
|
|
3906
|
+
const gd = Cn`0%{transform:translateY(40px);opacity:0;}100%{transform:translateY(0px);opacity:1;}`, pd = Cn`0%{transform:translateY(0px);opacity:1;}100%{transform:translateY(40px);opacity:0;}`, fd = $`animation-name:${gd};animation-duration:0.3s;animation-fill-mode:forwards;`, bd = $``, xd = $`animation-name:${pd};animation-duration:0.3s;animation-fill-mode:forwards;`, Ed = $`visibility:hidden;`, Cd = u.div`position:absolute;top:0;left:0;width:100%;height:100%;${({ $transitionState: e }) => {
|
|
3901
3907
|
switch (e) {
|
|
3902
3908
|
case "entering":
|
|
3903
|
-
return pd;
|
|
3904
|
-
case "entered":
|
|
3905
3909
|
return fd;
|
|
3906
|
-
case "
|
|
3910
|
+
case "entered":
|
|
3907
3911
|
return bd;
|
|
3908
|
-
case "
|
|
3912
|
+
case "exiting":
|
|
3909
3913
|
return xd;
|
|
3914
|
+
case "exited":
|
|
3915
|
+
return Ed;
|
|
3910
3916
|
default:
|
|
3911
3917
|
return "";
|
|
3912
3918
|
}
|
|
@@ -3966,14 +3972,14 @@ function $e({ initialId: e, children: t }) {
|
|
|
3966
3972
|
C === e ? b[C] = "entered" : b[C] = "exited";
|
|
3967
3973
|
}), b;
|
|
3968
3974
|
}), [x, f] = _({}), E = l[l.length - 1];
|
|
3969
|
-
return /* @__PURE__ */ r.createElement(br.Provider, { value: i }, /* @__PURE__ */ r.createElement(
|
|
3975
|
+
return /* @__PURE__ */ r.createElement(br.Provider, { value: i }, /* @__PURE__ */ r.createElement(yd, null, Object.keys(s).map((b) => {
|
|
3970
3976
|
var S;
|
|
3971
3977
|
if (!d[b]) return null;
|
|
3972
3978
|
const C = g[b] || "exited", v = b === E, T = `${b}-${x[b] || 0}`;
|
|
3973
|
-
return /* @__PURE__ */ r.createElement(
|
|
3979
|
+
return /* @__PURE__ */ r.createElement(Cd, { key: T, $transitionState: C, $active: v }, (S = s[b]) == null ? void 0 : S.element);
|
|
3974
3980
|
})));
|
|
3975
3981
|
}
|
|
3976
|
-
const
|
|
3982
|
+
const yd = u.div`position:relative;width:100%;height:100%;`;
|
|
3977
3983
|
$e.Screen = xr;
|
|
3978
3984
|
const ge = {
|
|
3979
3985
|
activeConv: "active-conv",
|
|
@@ -3987,19 +3993,19 @@ const ge = {
|
|
|
3987
3993
|
onClearClosedChannelUrl: () => e(void 0)
|
|
3988
3994
|
}
|
|
3989
3995
|
)), /* @__PURE__ */ r.createElement($e.Screen, { id: ge.convList, lazy: !0 }, ({ navigation: n }) => /* @__PURE__ */ r.createElement(
|
|
3990
|
-
|
|
3996
|
+
Gc,
|
|
3991
3997
|
{
|
|
3992
3998
|
onOpenConversationView: (o, i) => {
|
|
3993
3999
|
i === "closed" ? (e(o), n.navigate(ge.closedConv, { reset: !0 })) : n.navigate(ge.activeConv);
|
|
3994
4000
|
}
|
|
3995
4001
|
}
|
|
3996
4002
|
)));
|
|
3997
|
-
function
|
|
4003
|
+
function vd({ isExpanded: e, isOpened: t, children: n, launcher: o }) {
|
|
3998
4004
|
const { dir: i } = P();
|
|
3999
|
-
return /* @__PURE__ */ r.createElement(
|
|
4005
|
+
return /* @__PURE__ */ r.createElement(_d, null, /* @__PURE__ */ r.createElement(Sd, { dir: i, id: re.WINDOW, $isExpanded: e, $isOpened: t }, n), o);
|
|
4000
4006
|
}
|
|
4001
|
-
const
|
|
4002
|
-
const o = Ne(), [i, a] = _(), s = o ? hr :
|
|
4007
|
+
const _d = u.div`display:flex;flex-direction:column;gap:8px;align-items:flex-end;`, Sd = u.div`background:${({ theme: e }) => e.colors.base.background};display:flex;overscroll-behavior:none;-webkit-overflow-scrolling:auto;height:640px;min-height:80px;width:400px;max-width:80vw;max-height:80vh;box-shadow:0px 16px 24px 2px rgba(33,33,33,0.12),0px 6px 30px 5px rgba(33,33,33,0.08),0px 6px 10px -5px rgba(33,33,33,0.04);border-radius:16px;overflow:hidden;transition:width 200ms ease 0s,height 200ms ease 0s,max-height 200ms ease 0s,transform 150ms cubic-bezier(0,1.2,1,1) 0s,opacity 83ms ease-out 0s;transform:scale(0.15);opacity:0;transform-origin:right bottom;[dir='rtl'] &:not([dir='ltr']),&[dir='rtl']{transform-origin:left bottom;}${({ $isOpened: e }) => e && wd};${({ $isExpanded: e }) => e && Td};`, Td = $`width:743px;height:723px;`, wd = $`z-index:${fe.WINDOW};pointer-events:all;transform:scale(1);opacity:1;transition:width 200ms ease 0s,height 200ms ease 0s,max-height 200ms ease 0s,transform 300ms cubic-bezier(0,1.2,1,1) 0s,opacity 83ms ease-out 0s;`, Xd = Le(function({ children: e, ...t }, n) {
|
|
4008
|
+
const o = Ne(), [i, a] = _(), s = o ? hr : vd;
|
|
4003
4009
|
return /* @__PURE__ */ r.createElement(mr, { enableExpandButton: !o, ref: n, ...t }, /* @__PURE__ */ r.createElement(Bn, null, ({ state: l }) => /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(s, { isExpanded: l.expanded, isOpened: l.opened, launcher: /* @__PURE__ */ r.createElement(fr, null) }, /* @__PURE__ */ r.createElement(
|
|
4004
4010
|
Er,
|
|
4005
4011
|
{
|
|
@@ -4008,7 +4014,7 @@ const vd = u.div`display:flex;flex-direction:column;gap:8px;align-items:flex-end
|
|
|
4008
4014
|
}
|
|
4009
4015
|
)), e)));
|
|
4010
4016
|
}), {
|
|
4011
|
-
Provider:
|
|
4017
|
+
Provider: kd,
|
|
4012
4018
|
useContext: Bt
|
|
4013
4019
|
} = j("FixedMessengerStyle");
|
|
4014
4020
|
function Cr(e, t, n, o = 0) {
|
|
@@ -4032,15 +4038,15 @@ function Cr(e, t, n, o = 0) {
|
|
|
4032
4038
|
}
|
|
4033
4039
|
return $`${c};${d};`;
|
|
4034
4040
|
}
|
|
4035
|
-
function
|
|
4041
|
+
function Ad(e) {
|
|
4036
4042
|
const { horizontal: t, vertical: n, margin: o, launcherSize: i } = Bt();
|
|
4037
|
-
return /* @__PURE__ */ r.createElement(
|
|
4043
|
+
return /* @__PURE__ */ r.createElement(Id, { ...e, size: i, $horizontal: t, $vertical: n, $margin: o });
|
|
4038
4044
|
}
|
|
4039
|
-
const
|
|
4040
|
-
function
|
|
4045
|
+
const Id = u(fr)`position:fixed;z-index:${fe.LAUNCHER};${({ $horizontal: e, $vertical: t, $margin: n }) => Cr(e, t, n)};`;
|
|
4046
|
+
function $d({ isExpanded: e, isOpened: t, children: n }) {
|
|
4041
4047
|
const { dir: o } = P(), { horizontal: i, vertical: a, margin: s, launcherSize: l } = Bt();
|
|
4042
4048
|
return /* @__PURE__ */ r.createElement(
|
|
4043
|
-
|
|
4049
|
+
Md,
|
|
4044
4050
|
{
|
|
4045
4051
|
dir: o,
|
|
4046
4052
|
id: re.WINDOW,
|
|
@@ -4054,21 +4060,21 @@ function Id({ isExpanded: e, isOpened: t, children: n }) {
|
|
|
4054
4060
|
n
|
|
4055
4061
|
);
|
|
4056
4062
|
}
|
|
4057
|
-
const
|
|
4063
|
+
const Md = u.div`background:${({ theme: e }) => e.colors.base.background};display:flex;overscroll-behavior:none;-webkit-overflow-scrolling:auto;position:fixed;${({ $horizontal: e, $vertical: t, $margin: n, $launcherSize: o }) => Cr(e, t, n, o + 12)};height:640px;min-height:80px;width:400px;max-width:80vw;max-height:80vh;box-shadow:0px 16px 24px 2px rgba(33,33,33,0.12),0px 6px 30px 5px rgba(33,33,33,0.08),0px 6px 10px -5px rgba(33,33,33,0.04);border-radius:16px;overflow:hidden;transition:width 200ms ease 0s,height 200ms ease 0s,max-height 200ms ease 0s,transform 150ms cubic-bezier(0,1.2,1,1) 0s,opacity 83ms ease-out 0s;transform:scale(0.15);opacity:0;transform-origin:${({ $horizontal: e, $vertical: t }) => `${e === "start" ? "left" : "right"} ${t}`};
|
|
4058
4064
|
[dir='rtl'] &:not([dir='ltr']),
|
|
4059
4065
|
&[dir='rtl'] {
|
|
4060
4066
|
transform-origin: ${({ $horizontal: e, $vertical: t }) => `${e === "start" ? "right" : "left"} ${t}`};
|
|
4061
4067
|
}
|
|
4062
4068
|
|
|
4063
|
-
${({ $isOpened: e }) => e &&
|
|
4064
|
-
${({ $isExpanded: e }) => e &&
|
|
4065
|
-
`,
|
|
4066
|
-
const [o, i] = _(), [a, s] = _("end-bottom"), [l, c] = _(yr), [d, m] = _(48), g = Ne(), p = g ? hr :
|
|
4069
|
+
${({ $isOpened: e }) => e && Ld};
|
|
4070
|
+
${({ $isExpanded: e }) => e && Od};
|
|
4071
|
+
`, Od = $`width:743px;height:723px;`, Ld = $`z-index:${fe.WINDOW};pointer-events:all;transform:scale(1);opacity:1;transition:width 200ms ease 0s,height 200ms ease 0s,max-height 200ms ease 0s,transform 300ms cubic-bezier(0,1.2,1,1) 0s,opacity 83ms ease-out 0s;`, yr = { top: 24, bottom: 24, start: 24, end: 24 }, Rd = Le(function({ children: e, ...t }, n) {
|
|
4072
|
+
const [o, i] = _(), [a, s] = _("end-bottom"), [l, c] = _(yr), [d, m] = _(48), g = Ne(), p = g ? hr : $d, { horizontal: x, vertical: f } = ve(() => {
|
|
4067
4073
|
const [E, b] = a.split("-");
|
|
4068
4074
|
return { horizontal: E === "start" ? "start" : "end", vertical: b === "top" ? "top" : "bottom" };
|
|
4069
4075
|
}, [a]);
|
|
4070
4076
|
return /* @__PURE__ */ r.createElement(mr, { enableExpandButton: !g, ref: n, ...t }, /* @__PURE__ */ r.createElement(Bn, null, ({ state: E }) => /* @__PURE__ */ r.createElement(
|
|
4071
|
-
|
|
4077
|
+
kd,
|
|
4072
4078
|
{
|
|
4073
4079
|
value: { horizontal: x, vertical: f, margin: l, launcherSize: d, setPosition: s, setMargin: c, setLauncherSize: m }
|
|
4074
4080
|
},
|
|
@@ -4079,10 +4085,10 @@ const $d = u.div`background:${({ theme: e }) => e.colors.base.background};displa
|
|
|
4079
4085
|
setClosedChannelUrl: i
|
|
4080
4086
|
}
|
|
4081
4087
|
)),
|
|
4082
|
-
/* @__PURE__ */ r.createElement(
|
|
4088
|
+
/* @__PURE__ */ r.createElement(Ad, null),
|
|
4083
4089
|
e
|
|
4084
4090
|
)));
|
|
4085
|
-
}),
|
|
4091
|
+
}), Dd = (e) => {
|
|
4086
4092
|
var i, a, s, l;
|
|
4087
4093
|
const { setPosition: t, setMargin: n, setLauncherSize: o } = Bt();
|
|
4088
4094
|
return le(() => {
|
|
@@ -4095,34 +4101,34 @@ const $d = u.div`background:${({ theme: e }) => e.colors.base.background};displa
|
|
|
4095
4101
|
(l = e.margin) == null ? void 0 : l.end,
|
|
4096
4102
|
e.launcherSize
|
|
4097
4103
|
]), null;
|
|
4098
|
-
},
|
|
4099
|
-
Style:
|
|
4104
|
+
}, Qd = Object.assign(Rd, {
|
|
4105
|
+
Style: Dd
|
|
4100
4106
|
});
|
|
4101
4107
|
export {
|
|
4102
4108
|
St as A,
|
|
4103
4109
|
ao as C,
|
|
4104
|
-
|
|
4105
|
-
|
|
4110
|
+
Xd as D,
|
|
4111
|
+
Qd as F,
|
|
4106
4112
|
O as I,
|
|
4107
4113
|
Zn as L,
|
|
4108
|
-
|
|
4114
|
+
ka as M,
|
|
4109
4115
|
Mt as O,
|
|
4110
|
-
|
|
4116
|
+
Jd as P,
|
|
4111
4117
|
Ot as S,
|
|
4112
4118
|
k as a,
|
|
4113
4119
|
mr as b,
|
|
4114
4120
|
h as c,
|
|
4115
|
-
|
|
4121
|
+
Qc as d,
|
|
4116
4122
|
z as e,
|
|
4117
4123
|
R as f,
|
|
4118
|
-
|
|
4124
|
+
id as g,
|
|
4119
4125
|
_e as h,
|
|
4120
4126
|
te as i,
|
|
4121
4127
|
ur as j,
|
|
4122
4128
|
hn as k,
|
|
4123
4129
|
Dt as l,
|
|
4124
|
-
|
|
4125
|
-
|
|
4130
|
+
ed as m,
|
|
4131
|
+
Gc as n,
|
|
4126
4132
|
Nt as o,
|
|
4127
4133
|
wn as p,
|
|
4128
4134
|
P as u
|