@paramms/chat-widget 1.0.31 → 1.0.33

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/react.js CHANGED
@@ -1,289 +1,326 @@
1
- import { jsxs as S, jsx as p, Fragment as $ } from "react/jsx-runtime";
2
- import { useState as D, useRef as k, useEffect as z } from "react";
3
- import { mount as T } from "./index.js";
4
- function A({
5
- url: x,
6
- apiUrl: i,
7
- profileId: b,
8
- userId: t,
9
- userName: l,
10
- userEmail: c,
11
- userAvatar: o,
12
- contextTitle: w,
1
+ import { jsxs as W, jsx as p, Fragment as k } from "react/jsx-runtime";
2
+ import { useState as D, useRef as M, useEffect as z } from "react";
3
+ import { mount as H } from "./index.js";
4
+ function P({
5
+ url: g,
6
+ apiUrl: l,
7
+ profileId: v,
8
+ token: d,
9
+ refreshToken: w,
10
+ userId: n,
11
+ userName: c,
12
+ userEmail: s,
13
+ userAvatar: f,
14
+ contextTitle: x,
13
15
  contextSubtitle: y,
14
- contextStatus: e,
15
- subjectId: a,
16
- accent: d,
17
- launcher: n,
18
- position: s,
19
- quickReplies: f,
20
- height: h = "100%",
21
- i18n: g,
22
- translateLang: r
16
+ contextStatus: R,
17
+ subjectId: t,
18
+ accent: b,
19
+ launcher: h,
20
+ position: i,
21
+ quickReplies: u,
22
+ height: m = "100%",
23
+ i18n: a,
24
+ translateLang: C
23
25
  }) {
24
- const m = k(null), u = k(null);
26
+ const r = M(null), o = M(null);
25
27
  return z(() => {
26
- var v;
27
- if (m.current)
28
- return (v = u.current) == null || v.close(), u.current = T({
29
- el: m.current,
30
- url: x,
31
- ...i ? { apiUrl: i } : {},
32
- profileId: b,
33
- ...a ? { subjectId: a } : {},
34
- ...t ? { userId: t } : {},
35
- ...t || l || c || o ? {
28
+ var e;
29
+ if (r.current)
30
+ return (e = o.current) == null || e.close(), o.current = H({
31
+ el: r.current,
32
+ url: g,
33
+ ...l ? { apiUrl: l } : {},
34
+ profileId: v,
35
+ ...t ? { subjectId: t } : {},
36
+ ...d ? { token: d } : {},
37
+ ...w ? { refreshToken: w } : {},
38
+ ...n ? { userId: n } : {},
39
+ ...n || c || s || f ? {
36
40
  user: {
37
- ...l ? { name: l } : {},
38
- ...c ? { email: c } : {},
39
- ...o ? { avatar: o } : {}
41
+ ...c ? { name: c } : {},
42
+ ...s ? { email: s } : {},
43
+ ...f ? { avatar: f } : {}
40
44
  }
41
45
  } : {},
42
- ...w ? {
46
+ ...x ? {
43
47
  subject: {
44
- title: w,
48
+ title: x,
45
49
  ...y ? { subtitle: y } : {},
46
- ...e ? { status: e } : {}
50
+ ...R ? { status: R } : {}
47
51
  }
48
52
  } : {},
49
- ...f ? { quickReplies: f } : {},
50
- ...d ? { accent: d } : {},
51
- ...r ? { translateLang: r } : {},
52
- ...g ? { i18n: g } : {},
53
- ...n ? { launcher: n, position: s ?? "bottom-right" } : {}
53
+ ...u ? { quickReplies: u } : {},
54
+ ...b ? { accent: b } : {},
55
+ ...C ? { translateLang: C } : {},
56
+ ...a ? { i18n: a } : {},
57
+ ...h ? { launcher: h, position: i ?? "bottom-right" } : {}
54
58
  }), () => {
55
- var C;
56
- (C = u.current) == null || C.close(), u.current = null;
59
+ var j;
60
+ (j = o.current) == null || j.close(), o.current = null;
57
61
  };
58
- }, [x, i, b, a, t, l, c, d, n, s, r]), /* @__PURE__ */ p(
62
+ }, [g, l, v, t, d, n, c, s, b, h, i, C]), /* @__PURE__ */ p(
59
63
  "div",
60
64
  {
61
- ref: m,
62
- style: n ? { width: 0, height: 0, overflow: "hidden" } : { width: "100%", height: h, minHeight: h === "100%" ? "480px" : void 0 }
65
+ ref: r,
66
+ style: h ? { width: 0, height: 0, overflow: "hidden" } : { width: "100%", height: m, minHeight: m === "100%" ? "480px" : void 0 }
63
67
  }
64
68
  );
65
69
  }
66
- const B = [
70
+ const O = [
67
71
  "Is this still available?",
68
72
  "Can I schedule a viewing?",
69
73
  "What is your best price?"
70
74
  ];
71
- function K({
72
- url: x,
73
- apiUrl: i,
74
- profileId: b,
75
- listingId: t,
76
- listingTitle: l,
77
- listingMeta: c,
78
- listingPrice: o,
79
- listingStatus: w,
75
+ function G({
76
+ url: g,
77
+ apiUrl: l,
78
+ profileId: v,
79
+ token: d,
80
+ refreshToken: w,
81
+ listingId: n,
82
+ listingTitle: c,
83
+ listingMeta: s,
84
+ listingPrice: f,
85
+ listingStatus: x,
80
86
  userId: y,
81
- userName: e,
82
- userEmail: a,
83
- userAvatar: d,
84
- accent: n,
85
- launcher: s,
86
- position: f,
87
- quickReplies: h,
88
- height: g = "100%",
89
- i18n: r,
90
- translateLang: m
87
+ userName: R,
88
+ userEmail: t,
89
+ userAvatar: b,
90
+ accent: h,
91
+ launcher: i,
92
+ position: u,
93
+ quickReplies: m,
94
+ height: a = "100%",
95
+ i18n: C,
96
+ translateLang: r
91
97
  }) {
92
- const u = k(null), v = k(null);
98
+ const o = M(null), e = M(null);
93
99
  return z(() => {
94
- if (!u.current) return;
95
- let C = !1;
96
- const M = setTimeout(() => {
97
- var j;
98
- C || !u.current || ((j = v.current) == null || j.close(), v.current = T({
99
- el: u.current,
100
- url: x,
101
- ...i ? { apiUrl: i } : {},
102
- profileId: b,
103
- ...t ? { subjectId: `listing_${t}` } : {},
100
+ if (!o.current) return;
101
+ let j = !1;
102
+ const $ = setTimeout(() => {
103
+ var L;
104
+ j || !o.current || ((L = e.current) == null || L.close(), e.current = H({
105
+ el: o.current,
106
+ url: g,
107
+ ...l ? { apiUrl: l } : {},
108
+ profileId: v,
109
+ ...n ? { subjectId: `listing_${n}` } : {},
110
+ ...d ? { token: d } : {},
111
+ ...w ? { refreshToken: w } : {},
104
112
  ...y ? { userId: y } : {},
105
- ...y || e || a || d ? {
113
+ ...y || R || t || b ? {
106
114
  user: {
107
- ...e ? { name: e } : {},
108
- ...a ? { email: a } : {},
109
- ...d ? { avatar: d } : {},
110
- ...t ? { meta: { listingId: t } } : {}
115
+ ...R ? { name: R } : {},
116
+ ...t ? { email: t } : {},
117
+ ...b ? { avatar: b } : {},
118
+ ...n ? { meta: { listingId: n } } : {}
111
119
  }
112
120
  } : {},
113
- ...l ? {
121
+ ...c ? {
114
122
  subject: {
115
- title: l,
116
- ...c ? { subtitle: c } : {},
117
- ...o ? { tags: [`$${o.toLocaleString()}`] } : {},
118
- ...w ? { status: w } : {}
123
+ title: c,
124
+ ...s ? { subtitle: s } : {},
125
+ ...f ? { tags: [`$${f.toLocaleString()}`] } : {},
126
+ ...x ? { status: x } : {}
119
127
  }
120
128
  } : {},
121
- quickReplies: h ?? B,
122
- ...n ? { accent: n } : {},
123
- ...m ? { translateLang: m } : {},
124
- ...r ? { i18n: r } : {},
125
- ...s ? { launcher: s, position: f ?? "bottom-right" } : {}
129
+ quickReplies: m ?? O,
130
+ ...h ? { accent: h } : {},
131
+ ...r ? { translateLang: r } : {},
132
+ ...C ? { i18n: C } : {},
133
+ ...i ? { launcher: i, position: u ?? "bottom-right" } : {}
126
134
  }));
127
135
  }, 0);
128
136
  return () => {
129
- var j;
130
- C = !0, clearTimeout(M), (j = v.current) == null || j.close(), v.current = null;
137
+ var L;
138
+ j = !0, clearTimeout($), (L = e.current) == null || L.close(), e.current = null;
131
139
  };
132
- }, [x, i, b, t, y, n, s, f, m]), /* @__PURE__ */ p(
140
+ }, [g, l, v, n, d, y, h, i, u, r]), /* @__PURE__ */ p(
133
141
  "div",
134
142
  {
135
- ref: u,
136
- style: s ? { width: 0, height: 0, overflow: "hidden" } : { width: "100%", height: g, minHeight: g === "100%" ? "480px" : void 0 }
143
+ ref: o,
144
+ style: i ? { width: 0, height: 0, overflow: "hidden" } : { width: "100%", height: a, minHeight: a === "100%" ? "480px" : void 0 }
137
145
  }
138
146
  );
139
147
  }
140
- function F({
141
- url: x,
142
- apiUrl: i,
143
- profileId: b,
144
- userId: t,
145
- userName: l,
146
- userEmail: c,
147
- accent: o,
148
- height: w = "100%",
149
- i18n: y
148
+ function B({
149
+ url: g,
150
+ apiUrl: l,
151
+ profileId: v,
152
+ token: d,
153
+ refreshToken: w,
154
+ userId: n,
155
+ userName: c,
156
+ userEmail: s,
157
+ accent: f,
158
+ height: x = "100%",
159
+ i18n: y,
160
+ scope: R = "tenant"
150
161
  }) {
151
- const [e, a] = D(null), d = k(null), n = k(null), s = k(null), f = k(null);
162
+ const [t, b] = D(null), h = M(null), i = M(null), u = M(null), m = M(null);
152
163
  z(() => {
153
- if (!d.current) return;
154
- let g = !1;
155
- return import("./chatlist.js").then(({ mountChatList: r }) => {
156
- g || !d.current || (s.current = r({
157
- el: d.current,
158
- url: x,
159
- ...i ? { apiUrl: i } : {},
160
- profileId: b,
161
- onSelect: (m) => a(m),
162
- ...t ? { userId: t } : {},
163
- ...o ? { accent: o } : {},
164
+ if (!h.current) return;
165
+ let r = !1;
166
+ return import("./chatlist.js").then(({ mountChatList: o }) => {
167
+ r || !h.current || (u.current = o({
168
+ el: h.current,
169
+ url: g,
170
+ ...l ? { apiUrl: l } : {},
171
+ profileId: v,
172
+ scope: R,
173
+ onSelect: (e) => b(e),
174
+ // Compose (✎) opens the chatroom's general support thread — without
175
+ // this a user with no conversations yet had an empty list and no way
176
+ // to ever start one, which is what made ChatApp feel broken.
177
+ onNewChat: () => b({ id: "__new__", state: "open", updatedAt: Date.now() }),
178
+ ...d ? { token: d } : {},
179
+ ...n ? { userId: n } : {},
180
+ ...f ? { accent: f } : {},
164
181
  ...y ? { i18n: y } : {}
165
182
  }));
166
183
  }), () => {
167
- var r;
168
- g = !0, (r = s.current) == null || r.close(), s.current = null;
184
+ var o;
185
+ r = !0, (o = u.current) == null || o.close(), u.current = null;
169
186
  };
170
- }, [x, b, t]), z(() => {
171
- var g;
172
- if (!(!n.current || !e))
173
- return (g = f.current) == null || g.close(), f.current = T({
174
- el: n.current,
175
- url: x,
176
- ...i ? { apiUrl: i } : {},
177
- profileId: b,
178
- ...e.subjectId ? { subjectId: e.subjectId } : {},
179
- ...t ? { token: t } : {},
180
- ...t || l || c ? {
181
- user: {
182
- ...l ? { name: l } : {},
183
- ...c ? { email: c } : {}
184
- }
185
- } : {},
186
- ...e.subjectTitle ? {
187
- subject: {
188
- title: e.subjectTitle,
189
- ...e.subjectMeta ? { subtitle: e.subjectMeta } : {}
190
- }
191
- } : {},
192
- ...o ? { accent: o } : {}
193
- }), () => {
194
- var r;
195
- (r = f.current) == null || r.close(), f.current = null;
196
- };
197
- }, [e == null ? void 0 : e.id]);
198
- const h = typeof window < "u" && window.innerWidth < 768;
199
- return /* @__PURE__ */ S("div", { style: { display: "flex", width: "100%", height: w, minHeight: "400px", overflow: "hidden" }, children: [
187
+ }, [g, l, v, d, n, R]), z(() => {
188
+ var o;
189
+ if (!i.current || !t) return;
190
+ (o = m.current) == null || o.close(), m.current = H({
191
+ el: i.current,
192
+ url: g,
193
+ ...l ? { apiUrl: l } : {},
194
+ profileId: t.profileId ?? v,
195
+ // DM rows open as direct conversations (kind + peer). Opening them via
196
+ // their dm:… subjectId only works for the participant that OWNS the
197
+ // thread key the other side would silently fork a duplicate.
198
+ ...t.kind === "direct" && t.peerId ? { kind: "direct", peerId: t.peerId } : t.subjectId ? { subjectId: t.subjectId } : {},
199
+ ...d ? { token: d } : {},
200
+ ...w ? { refreshToken: w } : {},
201
+ ...n ? { userId: n } : {},
202
+ ...n || c || s ? {
203
+ user: {
204
+ ...c ? { name: c } : {},
205
+ ...s ? { email: s } : {}
206
+ }
207
+ } : {},
208
+ ...t.subjectTitle ? {
209
+ subject: {
210
+ title: t.subjectTitle,
211
+ ...t.subjectMeta ? { subtitle: t.subjectMeta } : {}
212
+ }
213
+ } : {},
214
+ ...f ? { accent: f } : {}
215
+ });
216
+ const r = setInterval(() => {
217
+ var e;
218
+ return (e = u.current) == null ? void 0 : e.refresh();
219
+ }, 2e4);
220
+ return () => {
221
+ var e, j;
222
+ clearInterval(r), (e = m.current) == null || e.close(), m.current = null, (j = u.current) == null || j.refresh();
223
+ };
224
+ }, [t == null ? void 0 : t.id]);
225
+ const [a, C] = D(typeof window < "u" && window.innerWidth < 768);
226
+ return z(() => {
227
+ if (typeof window > "u" || !window.matchMedia) return;
228
+ const r = window.matchMedia("(max-width: 767px)"), o = (e) => C(e.matches);
229
+ return C(r.matches), r.addEventListener("change", o), () => r.removeEventListener("change", o);
230
+ }, []), /* @__PURE__ */ W("div", { style: { display: "flex", width: "100%", height: x, minHeight: "400px", overflow: "hidden" }, children: [
200
231
  /* @__PURE__ */ p("div", { style: {
201
- width: h ? "100%" : "360px",
202
- flex: h && e ? "none" : void 0,
203
- display: h && e ? "none" : "flex",
232
+ width: a ? "100%" : "360px",
233
+ flex: a && t ? "none" : void 0,
234
+ display: a && t ? "none" : "flex",
204
235
  flexDirection: "column",
205
- borderRight: h ? "none" : "1px solid #e8eaed",
236
+ borderRight: a ? "none" : "1px solid #e8eaed",
206
237
  minWidth: 0
207
- }, children: /* @__PURE__ */ p("div", { ref: d, style: { width: "100%", height: "100%" } }) }),
208
- e ? /* @__PURE__ */ S("div", { style: { flex: 1, display: "flex", flexDirection: "column", minWidth: 0, position: "relative" }, children: [
209
- h && /* @__PURE__ */ p(
238
+ }, children: /* @__PURE__ */ p("div", { ref: h, style: { width: "100%", height: "100%" } }) }),
239
+ t ? /* @__PURE__ */ W("div", { style: { flex: 1, display: "flex", flexDirection: "column", minWidth: 0, position: "relative" }, children: [
240
+ a && /* @__PURE__ */ p(
210
241
  "button",
211
242
  {
212
- onClick: () => a(null),
243
+ onClick: () => b(null),
213
244
  style: { position: "absolute", top: 12, left: 12, zIndex: 10, background: "none", border: "none", fontSize: 22, cursor: "pointer", color: "#1c1b1a" },
214
245
  children: "←"
215
246
  }
216
247
  ),
217
- /* @__PURE__ */ p("div", { ref: n, style: { width: "100%", height: "100%" } })
218
- ] }) : /* @__PURE__ */ p("div", { style: { flex: 1, display: h ? "none" : "flex", alignItems: "center", justifyContent: "center", color: "#9b9690", fontSize: 14 }, children: "Select a conversation" })
248
+ /* @__PURE__ */ p("div", { ref: i, style: { width: "100%", height: "100%" } })
249
+ ] }) : /* @__PURE__ */ p("div", { style: { flex: 1, display: a ? "none" : "flex", alignItems: "center", justifyContent: "center", color: "#9b9690", fontSize: 14 }, children: "Select a conversation" })
219
250
  ] });
220
251
  }
221
- function P({
222
- url: x,
223
- apiUrl: i,
224
- profileId: b,
225
- userId: t,
226
- userName: l,
227
- userEmail: c,
228
- accent: o = "#4F63F5",
229
- floating: w = !0,
230
- position: y = "bottom-right",
231
- label: e,
232
- panelWidth: a,
233
- panelHeight: d = "600px"
252
+ function J({
253
+ url: g,
254
+ apiUrl: l,
255
+ profileId: v,
256
+ token: d,
257
+ refreshToken: w,
258
+ userId: n,
259
+ userName: c,
260
+ userEmail: s,
261
+ scope: f,
262
+ accent: x = "#4F63F5",
263
+ floating: y = !0,
264
+ position: R = "bottom-right",
265
+ label: t,
266
+ panelWidth: b,
267
+ panelHeight: h = "600px"
234
268
  }) {
235
- const [n, s] = D(!1), f = k(null), h = y === "bottom-right", r = e ?? (w ? "💬" : "Messages");
269
+ const [i, u] = D(!1), m = M(null), a = R === "bottom-right", r = t ?? (y ? "💬" : "Messages");
236
270
  if (z(() => {
237
- const R = (L) => {
238
- L.key === "Escape" && s(!1);
271
+ const S = (F) => {
272
+ F.key === "Escape" && u(!1);
239
273
  };
240
- return document.addEventListener("keydown", R), () => document.removeEventListener("keydown", R);
241
- }, []), w) {
242
- const R = typeof window < "u" && window.innerWidth < 480, L = R ? "100vw" : a ?? "420px", H = R ? "100dvh" : d;
243
- return /* @__PURE__ */ S("div", { style: {
274
+ return document.addEventListener("keydown", S), () => document.removeEventListener("keydown", S);
275
+ }, []), y) {
276
+ const S = typeof window < "u" && window.innerWidth < 480, F = S ? "100vw" : b ?? "420px", E = S ? "100dvh" : h;
277
+ return /* @__PURE__ */ W("div", { style: {
244
278
  position: "fixed",
245
- [h ? "right" : "left"]: "20px",
279
+ [a ? "right" : "left"]: "20px",
246
280
  bottom: "20px",
247
281
  zIndex: 9999,
248
282
  display: "flex",
249
283
  flexDirection: "column",
250
- alignItems: h ? "flex-end" : "flex-start",
284
+ alignItems: a ? "flex-end" : "flex-start",
251
285
  gap: "12px"
252
286
  }, children: [
253
287
  /* @__PURE__ */ p("div", { style: {
254
- width: L,
255
- height: H,
256
- borderRadius: R ? "0" : "16px",
288
+ width: F,
289
+ height: E,
290
+ borderRadius: S ? "0" : "16px",
257
291
  overflow: "hidden",
258
292
  boxShadow: "0 8px 40px rgba(0,0,0,.18)",
259
293
  background: "#fff",
260
- display: n ? "flex" : "none",
294
+ display: i ? "flex" : "none",
261
295
  flexDirection: "column",
262
- transformOrigin: `bottom ${h ? "right" : "left"}`,
263
- animation: n ? "ocl-pop-in .18s ease" : "none"
296
+ transformOrigin: `bottom ${a ? "right" : "left"}`,
297
+ animation: i ? "ocl-pop-in .18s ease" : "none"
264
298
  }, children: /* @__PURE__ */ p(
265
- F,
299
+ B,
266
300
  {
267
- url: x,
268
- ...i ? { apiUrl: i } : {},
269
- profileId: b,
270
- ...t ? { userId: t } : {},
271
- ...l ? { userName: l } : {},
272
- ...c ? { userEmail: c } : {},
273
- accent: o,
301
+ url: g,
302
+ ...l ? { apiUrl: l } : {},
303
+ profileId: v,
304
+ ...d ? { token: d } : {},
305
+ ...w ? { refreshToken: w } : {},
306
+ ...n ? { userId: n } : {},
307
+ ...c ? { userName: c } : {},
308
+ ...s ? { userEmail: s } : {},
309
+ ...f ? { scope: f } : {},
310
+ accent: x,
274
311
  height: "100%"
275
312
  }
276
313
  ) }),
277
314
  /* @__PURE__ */ p(
278
315
  "button",
279
316
  {
280
- ref: f,
281
- onClick: () => s((W) => !W),
317
+ ref: m,
318
+ onClick: () => u((_) => !_),
282
319
  style: {
283
320
  width: "56px",
284
321
  height: "56px",
285
322
  borderRadius: "50%",
286
- background: o,
323
+ background: x,
287
324
  color: "#fff",
288
325
  border: "none",
289
326
  fontSize: "24px",
@@ -292,36 +329,36 @@ function P({
292
329
  boxShadow: "0 4px 16px rgba(0,0,0,.25)",
293
330
  transition: "transform .15s"
294
331
  },
295
- onMouseEnter: (W) => {
296
- W.target.style.transform = "scale(1.08)";
332
+ onMouseEnter: (_) => {
333
+ _.target.style.transform = "scale(1.08)";
297
334
  },
298
- onMouseLeave: (W) => {
299
- W.target.style.transform = "scale(1)";
335
+ onMouseLeave: (_) => {
336
+ _.target.style.transform = "scale(1)";
300
337
  },
301
- children: n ? "✕" : r
338
+ children: i ? "✕" : r
302
339
  }
303
340
  ),
304
341
  /* @__PURE__ */ p("style", { children: "@keyframes ocl-pop-in { from { opacity:0; transform:scale(.95) } to { opacity:1; transform:scale(1) } }" })
305
342
  ] });
306
343
  }
307
- const m = a ?? "420px", [u, v] = D(null), C = () => {
308
- !n && f.current && v(f.current.getBoundingClientRect()), s((R) => !R);
309
- }, M = u ? u.bottom + 8 : 0, j = u ? window.innerWidth - u.right : 0;
310
- return /* @__PURE__ */ S($, { children: [
311
- /* @__PURE__ */ S(
344
+ const o = b ?? "420px", [e, j] = D(null), $ = () => {
345
+ !i && m.current && j(m.current.getBoundingClientRect()), u((S) => !S);
346
+ }, L = e ? e.bottom + 8 : 0, A = e ? window.innerWidth - e.right : 0;
347
+ return /* @__PURE__ */ W(k, { children: [
348
+ /* @__PURE__ */ W(
312
349
  "button",
313
350
  {
314
- ref: f,
315
- onClick: C,
351
+ ref: m,
352
+ onClick: $,
316
353
  style: {
317
354
  display: "inline-flex",
318
355
  alignItems: "center",
319
356
  gap: "6px",
320
357
  padding: "8px 16px",
321
358
  borderRadius: "8px",
322
- background: n ? o : "transparent",
323
- color: n ? "#fff" : o,
324
- border: `2px solid ${o}`,
359
+ background: i ? x : "transparent",
360
+ color: i ? "#fff" : x,
361
+ border: `2px solid ${x}`,
325
362
  fontSize: "14px",
326
363
  fontWeight: 600,
327
364
  cursor: "pointer",
@@ -333,20 +370,20 @@ function P({
333
370
  ]
334
371
  }
335
372
  ),
336
- n && u && /* @__PURE__ */ S($, { children: [
373
+ i && e && /* @__PURE__ */ W(k, { children: [
337
374
  /* @__PURE__ */ p(
338
375
  "div",
339
376
  {
340
- onClick: () => s(!1),
377
+ onClick: () => u(!1),
341
378
  style: { position: "fixed", inset: 0, zIndex: 9998 }
342
379
  }
343
380
  ),
344
381
  /* @__PURE__ */ p("div", { style: {
345
382
  position: "fixed",
346
- top: M,
347
- right: j,
348
- width: m,
349
- height: d,
383
+ top: L,
384
+ right: A,
385
+ width: o,
386
+ height: h,
350
387
  borderRadius: "16px",
351
388
  overflow: "hidden",
352
389
  boxShadow: "0 8px 40px rgba(0,0,0,.2)",
@@ -354,15 +391,18 @@ function P({
354
391
  zIndex: 9999,
355
392
  animation: "ocl-slide-in .18s ease"
356
393
  }, children: /* @__PURE__ */ p(
357
- F,
394
+ B,
358
395
  {
359
- url: x,
360
- ...i ? { apiUrl: i } : {},
361
- profileId: b,
362
- ...t ? { userId: t } : {},
363
- ...l ? { userName: l } : {},
364
- ...c ? { userEmail: c } : {},
365
- accent: o,
396
+ url: g,
397
+ ...l ? { apiUrl: l } : {},
398
+ profileId: v,
399
+ ...d ? { token: d } : {},
400
+ ...w ? { refreshToken: w } : {},
401
+ ...n ? { userId: n } : {},
402
+ ...c ? { userName: c } : {},
403
+ ...s ? { userEmail: s } : {},
404
+ ...f ? { scope: f } : {},
405
+ accent: x,
366
406
  height: "100%"
367
407
  }
368
408
  ) }),
@@ -371,9 +411,9 @@ function P({
371
411
  ] });
372
412
  }
373
413
  export {
374
- F as ChatApp,
375
- P as ChatAppLauncher,
376
- A as ChatWidget,
377
- K as MarketplaceChat
414
+ B as ChatApp,
415
+ J as ChatAppLauncher,
416
+ P as ChatWidget,
417
+ G as MarketplaceChat
378
418
  };
379
419
  //# sourceMappingURL=react.js.map