@maebgch/rcs-emulator 0.1.10 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,109 +1,109 @@
1
- import { jsx as e, jsxs as l } from "react/jsx-runtime";
2
- import { createContext as te, useContext as ne, useReducer as re, useRef as W, useEffect as S, useCallback as M, useState as z, memo as g, useMemo as V } from "react";
3
- function q(r) {
4
- return "reply" in r;
1
+ import { jsx as e, jsxs as n } from "react/jsx-runtime";
2
+ import { createContext as re, useContext as te, useReducer as se, useRef as W, useEffect as E, useCallback as $, useState as A, memo as p, useMemo as V } from "react";
3
+ function Y(s) {
4
+ return "reply" in s;
5
5
  }
6
- function $(r) {
7
- return "action" in r;
6
+ function z(s) {
7
+ return "action" in s;
8
8
  }
9
- function Je(r) {
10
- if (!$(r)) return !1;
11
- const { urlAction: t } = r.action;
12
- return t?.openUrl?.application === "WEBVIEW";
9
+ function qe(s) {
10
+ if (!z(s)) return !1;
11
+ const { urlAction: r } = s.action;
12
+ return r?.openUrl?.application === "WEBVIEW";
13
13
  }
14
- function oe(r) {
15
- const { urlAction: t } = r.action;
16
- return t?.openUrl?.application === "WEBVIEW" ? t.openUrl : null;
14
+ function oe(s) {
15
+ const { urlAction: r } = s.action;
16
+ return r?.openUrl?.application === "WEBVIEW" ? r.openUrl : null;
17
17
  }
18
- const se = {
18
+ const ae = {
19
19
  name: "Business",
20
20
  verified: !1
21
- }, ie = {
21
+ }, le = {
22
22
  currentMessageId: null,
23
23
  chatHistory: [],
24
24
  isTyping: !1,
25
25
  error: null
26
- }, Q = te(null);
27
- function X({
28
- children: r,
29
- theme: t,
30
- device: n,
26
+ }, Q = re(null);
27
+ function Z({
28
+ children: s,
29
+ theme: r,
30
+ device: t,
31
31
  businessInfo: o,
32
- state: s,
33
- showSuggestions: a,
34
- isProfileOpen: i,
32
+ state: a,
33
+ showSuggestions: l,
34
+ isProfileOpen: c,
35
35
  toggleProfile: u,
36
- onReply: c,
37
- onAction: d,
38
- webView: m,
36
+ onReply: m,
37
+ onAction: i,
38
+ webView: h,
39
39
  openWebView: f,
40
- closeWebView: v
40
+ closeWebView: w
41
41
  }) {
42
- const x = {
43
- theme: t,
44
- device: n,
45
- businessInfo: { ...se, ...o },
46
- state: { ...ie, ...s },
47
- showSuggestions: a,
48
- isProfileOpen: i,
42
+ const b = {
43
+ theme: r,
44
+ device: t,
45
+ businessInfo: { ...ae, ...o },
46
+ state: { ...le, ...a },
47
+ showSuggestions: l,
48
+ isProfileOpen: c,
49
49
  toggleProfile: u,
50
- handleReply: c,
51
- handleAction: d,
52
- webView: m,
50
+ handleReply: m,
51
+ handleAction: i,
52
+ webView: h,
53
53
  openWebView: f,
54
- closeWebView: v
54
+ closeWebView: w
55
55
  };
56
- return /* @__PURE__ */ e(Q.Provider, { value: x, children: r });
56
+ return /* @__PURE__ */ e(Q.Provider, { value: b, children: s });
57
57
  }
58
- function N() {
59
- const r = ne(Q);
60
- if (!r)
58
+ function k() {
59
+ const s = te(Q);
60
+ if (!s)
61
61
  throw new Error("useEmulator must be used within an EmulatorProvider");
62
- return r;
62
+ return s;
63
63
  }
64
- function Z(r) {
65
- const t = Object.values(r.messages);
66
- return t.find((n) => n.is_first) || t[0] || null;
64
+ function K(s) {
65
+ const r = Object.values(s.messages);
66
+ return r.find((t) => t.is_first) || r[0] || null;
67
67
  }
68
- function R(r, t) {
69
- return r.messages[t] || null;
68
+ function R(s, r) {
69
+ return s.messages[r] || null;
70
70
  }
71
- function O(r, t) {
72
- const n = r.responses?.keyword?.keyword_response?.choices;
73
- return n && n[t]?.next_message || null;
71
+ function O(s, r) {
72
+ const t = s.responses?.keyword?.keyword_response?.choices;
73
+ return t && t[r]?.next_message || null;
74
74
  }
75
- function H(r, t) {
76
- const n = r.parts, o = ae(n), s = ce(n);
75
+ function H(s, r) {
76
+ const t = s.parts, o = ce(t), a = ie(t);
77
77
  return {
78
- id: `${r.id}-${t}-${Date.now()}`,
78
+ id: `${s.id}-${r}-${Date.now()}`,
79
79
  sender: "business",
80
80
  content: o,
81
81
  timestamp: Date.now(),
82
- suggestions: s
82
+ suggestions: a
83
83
  };
84
84
  }
85
- function ae(r) {
86
- for (const t of r) {
87
- const n = t.RCSMessage;
88
- if (n.textMessage)
85
+ function ce(s) {
86
+ for (const r of s) {
87
+ const t = r.RCSMessage;
88
+ if (t.textMessage)
89
89
  return {
90
90
  type: "text",
91
- text: n.textMessage
91
+ text: t.textMessage
92
92
  };
93
- const o = n.richcardMessage?.message?.generalPurposeCard;
93
+ const o = t.richcardMessage?.message?.generalPurposeCard;
94
94
  if (o)
95
95
  return {
96
96
  type: "richcard",
97
97
  card: P(o.content, o.layout)
98
98
  };
99
- const s = n.richcardMessage?.message?.generalPurposeCardCarousel;
100
- if (s)
99
+ const a = t.richcardMessage?.message?.generalPurposeCardCarousel;
100
+ if (a)
101
101
  return {
102
102
  type: "carousel",
103
- cards: s.content.map(
104
- (a) => P(a, {
103
+ cards: a.content.map(
104
+ (l) => P(l, {
105
105
  cardOrientation: "VERTICAL",
106
- cardWidth: s.layout.cardWidth
106
+ cardWidth: a.layout.cardWidth
107
107
  })
108
108
  )
109
109
  };
@@ -113,36 +113,36 @@ function ae(r) {
113
113
  text: "[Unsupported message type]"
114
114
  };
115
115
  }
116
- function P(r, t) {
117
- const n = () => {
118
- if (r.media) {
119
- if (r.media.mediaUrl) return r.media.mediaUrl;
120
- if (r.media.contentInfo?.fileUrl) return r.media.contentInfo.fileUrl;
116
+ function P(s, r) {
117
+ const t = () => {
118
+ if (s.media) {
119
+ if (s.media.mediaUrl) return s.media.mediaUrl;
120
+ if (s.media.contentInfo?.fileUrl) return s.media.contentInfo.fileUrl;
121
121
  }
122
122
  }, o = () => {
123
- if (r.media) {
124
- if (r.media.thumbnailUri) return r.media.thumbnailUri;
125
- if (r.media.contentInfo?.thumbnailUrl) return r.media.contentInfo.thumbnailUrl;
123
+ if (s.media) {
124
+ if (s.media.thumbnailUri) return s.media.thumbnailUri;
125
+ if (s.media.contentInfo?.thumbnailUrl) return s.media.contentInfo.thumbnailUrl;
126
126
  }
127
- }, s = n();
127
+ }, a = t();
128
128
  return {
129
- title: r.title,
130
- description: r.description,
131
- media: s ? {
132
- url: s,
133
- height: le(r.media?.height || "MEDIUM_HEIGHT"),
129
+ title: s.title,
130
+ description: s.description,
131
+ media: a ? {
132
+ url: a,
133
+ height: ne(s.media?.height || "MEDIUM_HEIGHT"),
134
134
  thumbnailUrl: o()
135
135
  } : void 0,
136
- suggestions: r.suggestions,
136
+ suggestions: s.suggestions,
137
137
  layout: {
138
- orientation: t.cardOrientation === "HORIZONTAL" ? "horizontal" : "vertical",
139
- width: t.cardWidth === "SMALL_WIDTH" ? "small" : "medium",
140
- imageAlignment: t.imageAlignment === "RIGHT" ? "right" : "left"
138
+ orientation: r.cardOrientation === "HORIZONTAL" ? "horizontal" : "vertical",
139
+ width: r.cardWidth === "SMALL_WIDTH" ? "small" : "medium",
140
+ imageAlignment: r.imageAlignment === "RIGHT" ? "right" : "left"
141
141
  }
142
142
  };
143
143
  }
144
- function le(r) {
145
- switch (r) {
144
+ function ne(s) {
145
+ switch (s) {
146
146
  case "SHORT_HEIGHT":
147
147
  return "short";
148
148
  case "TALL_HEIGHT":
@@ -151,353 +151,338 @@ function le(r) {
151
151
  return "medium";
152
152
  }
153
153
  }
154
- function ce(r) {
155
- const t = [];
156
- for (const n of r) {
157
- const o = n.RCSMessage;
158
- o.suggestedChipList?.suggestions && t.push(...o.suggestedChipList.suggestions);
154
+ function ie(s) {
155
+ const r = [];
156
+ for (const t of s) {
157
+ const o = t.RCSMessage;
158
+ o.suggestedChipList?.suggestions && r.push(...o.suggestedChipList.suggestions);
159
159
  }
160
- return t;
160
+ return r;
161
161
  }
162
- function de(r) {
162
+ function ue(s) {
163
163
  return {
164
164
  id: `user-${Date.now()}`,
165
165
  sender: "user",
166
166
  content: {
167
167
  type: "userReply",
168
- text: r
168
+ text: s
169
169
  },
170
170
  timestamp: Date.now()
171
171
  };
172
172
  }
173
- function ue(r) {
174
- if (!r || typeof r != "object") return !1;
175
- const t = r;
176
- if (typeof t.name != "string" || !t.messages || typeof t.messages != "object") return !1;
177
- const n = Object.values(t.messages);
178
- if (n.length === 0) return !1;
179
- for (const o of n) {
173
+ function me(s) {
174
+ if (!s || typeof s != "object") return !1;
175
+ const r = s;
176
+ if (typeof r.name != "string" || !r.messages || typeof r.messages != "object") return !1;
177
+ const t = Object.values(r.messages);
178
+ if (t.length === 0) return !1;
179
+ for (const o of t) {
180
180
  if (!o || typeof o != "object") return !1;
181
- const s = o;
182
- if (typeof s.id != "string" || !Array.isArray(s.parts)) return !1;
181
+ const a = o;
182
+ if (typeof a.id != "string" || !Array.isArray(a.parts)) return !1;
183
183
  }
184
184
  return !0;
185
185
  }
186
- function he(r) {
187
- const t = Z(r);
188
- if (!t || !t.parts.length) return "New message";
189
- const o = t.parts[0].RCSMessage;
186
+ function de(s) {
187
+ const r = K(s);
188
+ if (!r || !r.parts.length) return "New message";
189
+ const o = r.parts[0].RCSMessage;
190
190
  if (o.textMessage)
191
191
  return o.textMessage.slice(0, 50) + (o.textMessage.length > 50 ? "..." : "");
192
- const s = o.richcardMessage?.message?.generalPurposeCard;
193
- if (s?.content.title)
194
- return s.content.title;
195
- const a = o.richcardMessage?.message?.generalPurposeCardCarousel;
196
- return a?.content[0]?.title ? a.content[0].title : "New message";
192
+ const a = o.richcardMessage?.message?.generalPurposeCard;
193
+ if (a?.content.title)
194
+ return a.content.title;
195
+ const l = o.richcardMessage?.message?.generalPurposeCardCarousel;
196
+ return l?.content[0]?.title ? l.content[0].title : "New message";
197
197
  }
198
- const K = {
198
+ const X = {
199
199
  currentMessageId: null,
200
200
  chatHistory: [],
201
201
  isTyping: !1,
202
202
  error: null
203
203
  };
204
- function me(r, t) {
205
- switch (t.type) {
204
+ function he(s, r) {
205
+ switch (r.type) {
206
206
  case "INIT":
207
207
  return {
208
- ...r,
209
- currentMessageId: t.messageId,
208
+ ...s,
209
+ currentMessageId: r.messageId,
210
210
  error: null
211
211
  };
212
212
  case "ADD_BUSINESS_MESSAGE":
213
213
  return {
214
- ...r,
215
- chatHistory: [...r.chatHistory, t.message],
214
+ ...s,
215
+ chatHistory: [...s.chatHistory, r.message],
216
216
  isTyping: !1
217
217
  };
218
218
  case "ADD_USER_REPLY": {
219
- const n = de(t.text), o = r.chatHistory.map(
220
- (s, a) => a === r.chatHistory.length - 1 ? { ...s, suggestions: void 0 } : s
219
+ const t = ue(r.text), o = s.chatHistory.map(
220
+ (a, l) => l === s.chatHistory.length - 1 ? { ...a, suggestions: void 0 } : a
221
221
  );
222
222
  return {
223
- ...r,
224
- chatHistory: [...o, n]
223
+ ...s,
224
+ chatHistory: [...o, t]
225
225
  };
226
226
  }
227
227
  case "SET_TYPING":
228
228
  return {
229
- ...r,
230
- isTyping: t.isTyping
229
+ ...s,
230
+ isTyping: r.isTyping
231
231
  };
232
232
  case "NAVIGATE_TO":
233
233
  return {
234
- ...r,
235
- currentMessageId: t.messageId
234
+ ...s,
235
+ currentMessageId: r.messageId
236
236
  };
237
237
  case "SET_ERROR":
238
238
  return {
239
- ...r,
240
- error: t.error,
239
+ ...s,
240
+ error: r.error,
241
241
  isTyping: !1
242
242
  };
243
243
  case "RESET":
244
- return K;
244
+ return X;
245
245
  default:
246
- return r;
246
+ return s;
247
247
  }
248
248
  }
249
249
  function fe({
250
- flow: r,
251
- onUserReply: t,
252
- typingDelay: n = 800
250
+ flow: s,
251
+ onUserReply: r,
252
+ typingDelay: t = 800
253
253
  }) {
254
- const [o, s] = re(me, K), a = W(0), i = W(!1);
255
- S(() => {
256
- if (i.current) return;
257
- i.current = !0;
258
- const m = Z(r);
259
- if (!m) {
260
- s({
254
+ const [o, a] = se(he, X), l = W(0), c = W(!1);
255
+ E(() => {
256
+ if (c.current) return;
257
+ c.current = !0;
258
+ const h = K(s);
259
+ if (!h) {
260
+ a({
261
261
  type: "SET_ERROR",
262
262
  error: "No first message found in conversation flow"
263
263
  });
264
264
  return;
265
265
  }
266
- s({ type: "INIT", messageId: m.id });
266
+ a({ type: "INIT", messageId: h.id });
267
267
  const f = H(
268
- m,
269
- a.current++
268
+ h,
269
+ l.current++
270
270
  );
271
- s({ type: "ADD_BUSINESS_MESSAGE", message: f });
272
- }, [r]);
273
- const u = M(
274
- (m) => {
275
- if (!q(m)) return;
276
- const { displayText: f, postback: v } = m.reply, x = v.data;
277
- s({ type: "ADD_USER_REPLY", text: f, postbackData: x });
278
- const L = {
271
+ a({ type: "ADD_BUSINESS_MESSAGE", message: f });
272
+ }, [s]);
273
+ const u = $(
274
+ (h) => {
275
+ if (!Y(h)) return;
276
+ const { displayText: f, postback: w } = h.reply, b = w.data;
277
+ a({ type: "ADD_USER_REPLY", text: f, postbackData: b });
278
+ const N = {
279
279
  type: "reply",
280
- postbackData: x,
280
+ postbackData: b,
281
281
  displayText: f,
282
282
  timestamp: Date.now()
283
283
  };
284
- t(L);
285
- const b = o.currentMessageId ? R(r, o.currentMessageId) : null;
286
- if (!b) {
287
- s({ type: "SET_ERROR", error: "Current message not found" });
284
+ r(N);
285
+ const v = o.currentMessageId ? R(s, o.currentMessageId) : null;
286
+ if (!v) {
287
+ a({ type: "SET_ERROR", error: "Current message not found" });
288
288
  return;
289
289
  }
290
- const p = O(b, x);
291
- if (!p)
290
+ const y = O(v, b);
291
+ if (!y)
292
292
  return;
293
- const y = R(r, p);
294
- if (!y) {
295
- s({
293
+ const g = R(s, y);
294
+ if (!g) {
295
+ a({
296
296
  type: "SET_ERROR",
297
- error: `Next message "${p}" not found`
297
+ error: `Next message "${y}" not found`
298
298
  });
299
299
  return;
300
300
  }
301
- s({ type: "SET_TYPING", isTyping: !0 }), s({ type: "NAVIGATE_TO", messageId: p }), setTimeout(() => {
302
- const h = H(
303
- y,
304
- a.current++
301
+ a({ type: "SET_TYPING", isTyping: !0 }), a({ type: "NAVIGATE_TO", messageId: y }), setTimeout(() => {
302
+ const d = H(
303
+ g,
304
+ l.current++
305
305
  );
306
- s({ type: "ADD_BUSINESS_MESSAGE", message: h });
307
- }, n);
306
+ a({ type: "ADD_BUSINESS_MESSAGE", message: d });
307
+ }, t);
308
308
  },
309
- [r, o.currentMessageId, t, n]
310
- ), c = M(
311
- (m) => {
312
- if (!$(m)) return;
309
+ [s, o.currentMessageId, r, t]
310
+ ), m = $(
311
+ (h) => {
312
+ if (!z(h)) return;
313
313
  const {
314
314
  displayText: f,
315
- postback: v,
316
- openUrlAction: x,
317
- dialAction: L,
318
- dialerAction: b,
319
- mapAction: p,
320
- viewLocationAction: y
321
- } = m.action, h = v.data, w = L?.phoneNumber || b?.dialPhoneNumber?.phoneNumber, C = p?.showLocation?.location || y?.latLong;
315
+ postback: w,
316
+ openUrlAction: b,
317
+ dialAction: N,
318
+ dialerAction: v,
319
+ mapAction: y,
320
+ viewLocationAction: g
321
+ } = h.action, d = w.data, x = N?.phoneNumber || v?.dialPhoneNumber?.phoneNumber, L = y?.showLocation?.location || g?.latLong;
322
322
  let I;
323
- x ? I = { type: "openUrl", url: x.url } : w ? I = { type: "dial", phoneNumber: w } : C && (I = {
323
+ b ? I = { type: "openUrl", url: b.url } : x ? I = { type: "dial", phoneNumber: x } : L && (I = {
324
324
  type: "viewLocation",
325
- latitude: C.latitude,
326
- longitude: C.longitude,
327
- query: y?.query
325
+ latitude: L.latitude,
326
+ longitude: L.longitude,
327
+ query: g?.query
328
328
  });
329
- const k = {
329
+ const C = {
330
330
  type: "action",
331
- postbackData: h,
331
+ postbackData: d,
332
332
  displayText: f,
333
333
  timestamp: Date.now(),
334
334
  actionData: I
335
335
  };
336
- if (t(k), x)
337
- window.open(x.url, "_blank", "noopener,noreferrer");
338
- else if (w)
339
- window.location.href = `tel:${w}`;
340
- else if (C) {
341
- const T = p?.showLocation?.location?.label || y?.label || "", B = `https://www.google.com/maps/search/?api=1&query=${C.latitude},${C.longitude}${T ? `&query_place_id=${encodeURIComponent(T)}` : ""}`;
342
- window.open(B, "_blank", "noopener,noreferrer");
336
+ if (r(C), b)
337
+ window.open(b.url, "_blank", "noopener,noreferrer");
338
+ else if (x)
339
+ window.location.href = `tel:${x}`;
340
+ else if (L) {
341
+ const M = y?.showLocation?.location?.label || g?.label || "", S = `https://www.google.com/maps/search/?api=1&query=${L.latitude},${L.longitude}${M ? `&query_place_id=${encodeURIComponent(M)}` : ""}`;
342
+ window.open(S, "_blank", "noopener,noreferrer");
343
343
  }
344
- const A = o.currentMessageId ? R(r, o.currentMessageId) : null;
345
- if (A) {
346
- const T = O(A, h);
347
- if (T) {
348
- const B = R(r, T);
349
- B && (s({
344
+ const T = o.currentMessageId ? R(s, o.currentMessageId) : null;
345
+ if (T) {
346
+ const M = O(T, d);
347
+ if (M) {
348
+ const S = R(s, M);
349
+ S && (a({
350
350
  type: "ADD_USER_REPLY",
351
351
  text: f,
352
- postbackData: h
353
- }), s({ type: "SET_TYPING", isTyping: !0 }), s({ type: "NAVIGATE_TO", messageId: T }), setTimeout(() => {
352
+ postbackData: d
353
+ }), a({ type: "SET_TYPING", isTyping: !0 }), a({ type: "NAVIGATE_TO", messageId: M }), setTimeout(() => {
354
354
  const ee = H(
355
- B,
356
- a.current++
355
+ S,
356
+ l.current++
357
357
  );
358
- s({ type: "ADD_BUSINESS_MESSAGE", message: ee });
359
- }, n));
358
+ a({ type: "ADD_BUSINESS_MESSAGE", message: ee });
359
+ }, t));
360
360
  }
361
361
  }
362
362
  },
363
- [r, o.currentMessageId, t, n]
364
- ), d = M(() => {
365
- i.current = !1, a.current = 0, s({ type: "RESET" });
363
+ [s, o.currentMessageId, r, t]
364
+ ), i = $(() => {
365
+ c.current = !1, l.current = 0, a({ type: "RESET" });
366
366
  }, []);
367
367
  return {
368
368
  state: o,
369
369
  handleReply: u,
370
- handleAction: c,
371
- reset: d
370
+ handleAction: m,
371
+ reset: i
372
372
  };
373
373
  }
374
- function ge(r) {
375
- const [t, n] = z(null), [o, s] = z(!1), [a, i] = z(null), u = M(async () => {
376
- if (!r) {
377
- n(null), i(null);
374
+ function pe(s) {
375
+ const [r, t] = A(null), [o, a] = A(!1), [l, c] = A(null), u = $(async () => {
376
+ if (!s) {
377
+ t(null), c(null);
378
378
  return;
379
379
  }
380
- s(!0), i(null);
380
+ a(!0), c(null);
381
381
  try {
382
- const c = await fetch(r, {
382
+ const m = await fetch(s, {
383
383
  method: "GET",
384
384
  headers: {
385
385
  Accept: "application/json"
386
386
  }
387
387
  });
388
- if (!c.ok)
389
- throw new Error(`HTTP ${c.status}: ${c.statusText}`);
390
- const d = await c.json();
391
- if (!d || typeof d != "object")
388
+ if (!m.ok)
389
+ throw new Error(`HTTP ${m.status}: ${m.statusText}`);
390
+ const i = await m.json();
391
+ if (!i || typeof i != "object")
392
392
  throw new Error("Invalid JSON: Expected an object");
393
- if (!d.messages || typeof d.messages != "object")
393
+ if (!i.messages || typeof i.messages != "object")
394
394
  throw new Error("Invalid RBM JSON: Missing 'messages' object");
395
- n(d);
396
- } catch (c) {
397
- const d = c instanceof Error ? c.message : "Failed to fetch JSON";
398
- i(d), n(null);
395
+ t(i);
396
+ } catch (m) {
397
+ const i = m instanceof Error ? m.message : "Failed to fetch JSON";
398
+ c(i), t(null);
399
399
  } finally {
400
- s(!1);
400
+ a(!1);
401
401
  }
402
- }, [r]);
403
- return S(() => {
402
+ }, [s]);
403
+ return E(() => {
404
404
  u();
405
405
  }, [u]), {
406
- data: t,
406
+ data: r,
407
407
  isLoading: o,
408
- error: a,
408
+ error: l,
409
409
  refetch: u
410
410
  };
411
411
  }
412
- function pe(r) {
413
- const t = W(null);
414
- return S(() => {
415
- t.current && t.current.scrollTo({
416
- top: t.current.scrollHeight,
412
+ function ge(s) {
413
+ const r = W(null);
414
+ return E(() => {
415
+ r.current && r.current.scrollTo({
416
+ top: r.current.scrollHeight,
417
417
  behavior: "smooth"
418
418
  });
419
- }, [r]), t;
419
+ }, [s]), r;
420
420
  }
421
- const xe = g(function() {
422
- const { theme: t, businessInfo: n, toggleProfile: o } = N(), s = t === "dark", a = n.brandColor || "#0084ff";
423
- return /* @__PURE__ */ l(
421
+ const xe = p(function() {
422
+ const { theme: r, businessInfo: t, toggleProfile: o } = k(), a = r === "dark", l = a ? "rcs-emulator-dark" : "rcs-emulator-light", c = t.brandColor || "#0084ff";
423
+ return /* @__PURE__ */ n(
424
424
  "header",
425
425
  {
426
- className: `
427
- flex items-center gap-3 px-3 py-2.5 border-b
428
- ${s ? "bg-zinc-900 border-zinc-800" : "bg-white border-gray-100"}
429
- `,
426
+ className: `rcs-emulator-header ${l}`,
430
427
  role: "banner",
431
- "aria-label": `Chat with ${n.name}`,
428
+ "aria-label": `Chat with ${t.name}`,
432
429
  children: [
433
430
  /* @__PURE__ */ e(
434
431
  "button",
435
432
  {
436
433
  type: "button",
437
- className: `
438
- p-1.5 -ml-1 rounded-full transition-colors
439
- ${s ? "hover:bg-zinc-800 text-white" : "hover:bg-gray-100 text-gray-700"}
440
- `,
434
+ className: `rcs-emulator-icon-btn rcs-emulator-p-1-5 rcs-emulator--ml-1 ${l} ${a ? "rcs-emulator-text-white" : "rcs-emulator-text-gray-700"}`,
441
435
  "aria-label": "Go back",
442
- children: /* @__PURE__ */ e("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 19l-7-7 7-7" }) })
436
+ children: /* @__PURE__ */ e("svg", { className: "rcs-emulator-w-5 rcs-emulator-h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 19l-7-7 7-7" }) })
443
437
  }
444
438
  ),
445
- /* @__PURE__ */ l(
439
+ /* @__PURE__ */ n(
446
440
  "button",
447
441
  {
448
442
  onClick: o,
449
- className: "flex items-center gap-2.5 flex-1 min-w-0 text-left",
443
+ className: "rcs-emulator-flex rcs-emulator-items-center rcs-emulator-gap-2-5 rcs-emulator-flex-1 rcs-emulator-min-w-0 rcs-emulator-text-left",
450
444
  "aria-label": "View business info",
451
445
  children: [
452
446
  /* @__PURE__ */ e(
453
447
  "div",
454
448
  {
455
- className: `
456
- relative w-9 h-9 rounded-full overflow-hidden flex-shrink-0
457
- ${s ? "bg-zinc-800" : "bg-gray-100"}
458
- `,
449
+ className: `rcs-emulator-logo-avatar rcs-emulator-w-9 rcs-emulator-h-9 ${l}`,
459
450
  style: {
460
- backgroundColor: n.logo ? void 0 : a
451
+ backgroundColor: t.logo ? void 0 : c
461
452
  },
462
- children: n.logo ? /* @__PURE__ */ e(
453
+ children: t.logo ? /* @__PURE__ */ e(
463
454
  "img",
464
455
  {
465
- src: n.logo,
466
- alt: `${n.name} logo`,
467
- className: "w-full h-full object-cover"
456
+ src: t.logo,
457
+ alt: `${t.name} logo`,
458
+ className: "rcs-emulator-w-full rcs-emulator-h-full rcs-emulator-object-cover"
468
459
  }
469
- ) : /* @__PURE__ */ e("div", { className: "w-full h-full flex items-center justify-center text-sm font-bold text-white", children: n.name.charAt(0).toUpperCase() })
460
+ ) : /* @__PURE__ */ e("div", { className: "rcs-emulator-w-full rcs-emulator-h-full rcs-emulator-flex rcs-emulator-items-center rcs-emulator-justify-center rcs-emulator-text-sm rcs-emulator-font-bold rcs-emulator-text-white", children: t.name.charAt(0).toUpperCase() })
470
461
  }
471
462
  ),
472
463
  /* @__PURE__ */ e(
473
464
  "h1",
474
465
  {
475
- className: `
476
- text-base font-medium truncate
477
- ${s ? "text-white" : "text-gray-900"}
478
- `,
479
- children: n.name
466
+ className: `rcs-emulator-text-base rcs-emulator-font-medium rcs-emulator-truncate ${a ? "rcs-emulator-text-white" : "rcs-emulator-text-gray-900"}`,
467
+ children: t.name
480
468
  }
481
469
  )
482
470
  ]
483
471
  }
484
472
  ),
485
- /* @__PURE__ */ l("div", { className: "flex items-center gap-0.5", children: [
486
- n.verified && /* @__PURE__ */ e(
473
+ /* @__PURE__ */ n("div", { className: "rcs-emulator-flex rcs-emulator-items-center rcs-emulator-gap-0-5", children: [
474
+ t.verified && /* @__PURE__ */ e(
487
475
  "button",
488
476
  {
489
477
  type: "button",
490
- className: `
491
- p-2 rounded-full transition-colors
492
- ${s ? "hover:bg-zinc-800" : "hover:bg-gray-100"}
493
- `,
478
+ className: `rcs-emulator-icon-btn rcs-emulator-p-2 ${l}`,
494
479
  "aria-label": "Verified business",
495
- children: /* @__PURE__ */ l("svg", { className: "w-5 h-5", viewBox: "0 0 24 24", fill: "none", children: [
480
+ children: /* @__PURE__ */ n("svg", { className: "rcs-emulator-w-5 rcs-emulator-h-5", viewBox: "0 0 24 24", fill: "none", children: [
496
481
  /* @__PURE__ */ e(
497
482
  "path",
498
483
  {
499
484
  d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z",
500
- stroke: s ? "#9ca3af" : "#6b7280",
485
+ stroke: a ? "#9ca3af" : "#6b7280",
501
486
  strokeWidth: 2,
502
487
  strokeLinecap: "round",
503
488
  strokeLinejoin: "round"
@@ -520,119 +505,97 @@ const xe = g(function() {
520
505
  "button",
521
506
  {
522
507
  type: "button",
523
- className: `
524
- p-2 rounded-full transition-colors
525
- ${s ? "hover:bg-zinc-800 text-zinc-400" : "hover:bg-gray-100 text-gray-500"}
526
- `,
508
+ className: `rcs-emulator-icon-btn rcs-emulator-p-2 ${l} ${a ? "rcs-emulator-text-zinc-400" : "rcs-emulator-text-gray-500"}`,
527
509
  "aria-label": "More options",
528
- children: /* @__PURE__ */ e("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z" }) })
510
+ children: /* @__PURE__ */ e("svg", { className: "rcs-emulator-w-5 rcs-emulator-h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z" }) })
529
511
  }
530
512
  )
531
513
  ] })
532
514
  ]
533
515
  }
534
516
  );
535
- }), be = g(function() {
536
- const { theme: t, businessInfo: n } = N(), o = t === "dark", s = n.brandColor || "#0084ff";
537
- return /* @__PURE__ */ l("div", { className: "flex flex-col items-center py-4 px-4", children: [
538
- /* @__PURE__ */ l("div", { className: "relative mb-3", children: [
517
+ }), be = p(function() {
518
+ const { theme: r, businessInfo: t } = k(), o = r === "dark", a = o ? "rcs-emulator-dark" : "rcs-emulator-light", l = t.brandColor || "#0084ff";
519
+ return /* @__PURE__ */ n("div", { className: "rcs-emulator-flex rcs-emulator-flex-col rcs-emulator-items-center rcs-emulator-py-4 rcs-emulator-px-4", children: [
520
+ /* @__PURE__ */ n("div", { className: "rcs-emulator-relative rcs-emulator-mb-3", children: [
539
521
  /* @__PURE__ */ e(
540
522
  "div",
541
523
  {
542
- className: `
543
- w-16 h-16 rounded-full overflow-hidden
544
- ${o ? "bg-zinc-800" : "bg-gray-100"}
545
- shadow-lg
546
- `,
524
+ className: `rcs-emulator-logo-avatar rcs-emulator-w-16 rcs-emulator-h-16 rcs-emulator-shadow-lg ${a}`,
547
525
  style: {
548
- backgroundColor: n.logo ? void 0 : s
526
+ backgroundColor: t.logo ? void 0 : l
549
527
  },
550
- children: n.logo ? /* @__PURE__ */ e(
528
+ children: t.logo ? /* @__PURE__ */ e(
551
529
  "img",
552
530
  {
553
- src: n.logo,
554
- alt: `${n.name} logo`,
555
- className: "w-full h-full object-cover"
531
+ src: t.logo,
532
+ alt: `${t.name} logo`,
533
+ className: "rcs-emulator-w-full rcs-emulator-h-full rcs-emulator-object-cover"
556
534
  }
557
- ) : /* @__PURE__ */ e("div", { className: "w-full h-full flex items-center justify-center text-2xl font-bold text-white", children: n.name.charAt(0).toUpperCase() })
535
+ ) : /* @__PURE__ */ e("div", { className: "rcs-emulator-w-full rcs-emulator-h-full rcs-emulator-flex rcs-emulator-items-center rcs-emulator-justify-center rcs-emulator-text-2xl rcs-emulator-font-bold rcs-emulator-text-white", children: t.name.charAt(0).toUpperCase() })
558
536
  }
559
537
  ),
560
- n.verified && /* @__PURE__ */ e(
561
- "div",
538
+ t.verified && /* @__PURE__ */ e("div", { className: "rcs-emulator-verified-badge", children: /* @__PURE__ */ e(
539
+ "svg",
562
540
  {
563
- className: "absolute -bottom-0.5 -right-0.5 w-5 h-5 rounded-full bg-blue-500 flex items-center justify-center border-2 border-white shadow-sm",
564
- children: /* @__PURE__ */ e(
565
- "svg",
566
- {
567
- className: "w-3 h-3 text-white",
568
- viewBox: "0 0 24 24",
569
- fill: "currentColor",
570
- children: /* @__PURE__ */ e("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z" })
571
- }
572
- )
541
+ className: "rcs-emulator-w-3 rcs-emulator-h-3 rcs-emulator-text-white",
542
+ viewBox: "0 0 24 24",
543
+ fill: "currentColor",
544
+ children: /* @__PURE__ */ e("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z" })
573
545
  }
574
- )
546
+ ) })
575
547
  ] }),
576
548
  /* @__PURE__ */ e(
577
549
  "h1",
578
550
  {
579
- className: `
580
- text-lg font-semibold text-center
581
- ${o ? "text-white" : "text-gray-900"}
582
- `,
583
- children: n.name
551
+ className: `rcs-emulator-text-lg rcs-emulator-font-semibold rcs-emulator-text-center ${o ? "rcs-emulator-text-white" : "rcs-emulator-text-gray-900"}`,
552
+ children: t.name
584
553
  }
585
554
  ),
586
- n.description && /* @__PURE__ */ e(
555
+ t.description && /* @__PURE__ */ e(
587
556
  "p",
588
557
  {
589
- className: `
590
- text-sm text-center mt-0.5
591
- ${o ? "text-zinc-400" : "text-gray-500"}
592
- `,
593
- children: n.description
558
+ className: `rcs-emulator-text-sm rcs-emulator-text-center rcs-emulator-mt-0-5 ${o ? "rcs-emulator-text-zinc-400" : "rcs-emulator-text-gray-500"}`,
559
+ children: t.description
594
560
  }
595
561
  )
596
562
  ] });
597
- }), ye = g(function({
598
- text: t,
599
- sender: n,
563
+ }), ve = p(function({
564
+ text: r,
565
+ sender: t,
600
566
  timestamp: o
601
567
  }) {
602
- const { theme: s, businessInfo: a } = N(), i = s === "dark", u = n === "business", c = a.brandColor || "#0084ff", d = new Date(o).toLocaleTimeString([], {
568
+ const { theme: a, businessInfo: l } = k(), u = a === "dark" ? "rcs-emulator-dark" : "rcs-emulator-light", m = t === "business", i = l.brandColor || "#0084ff", h = new Date(o).toLocaleTimeString([], {
603
569
  hour: "2-digit",
604
570
  minute: "2-digit"
605
571
  });
606
- return u ? /* @__PURE__ */ l("div", { className: "max-w-[90%]", children: [
572
+ return m ? /* @__PURE__ */ n("div", { className: "rcs-emulator-max-w-90", children: [
607
573
  /* @__PURE__ */ e(
608
574
  "div",
609
575
  {
610
- className: `
611
- px-4 py-3 rounded-2xl text-sm leading-relaxed
612
- ${i ? "bg-zinc-800 text-white" : "bg-gray-100 text-gray-900"}
613
- `,
614
- children: t
576
+ className: `rcs-emulator-message-bubble rcs-emulator-business ${u}`,
577
+ children: r
615
578
  }
616
579
  ),
617
- /* @__PURE__ */ e("span", { className: "sr-only", children: d })
618
- ] }) : /* @__PURE__ */ l("div", { className: "flex items-end gap-1.5 max-w-[85%] ml-auto", children: [
580
+ /* @__PURE__ */ e("span", { className: "rcs-emulator-sr-only", children: h })
581
+ ] }) : /* @__PURE__ */ n("div", { className: "rcs-emulator-flex rcs-emulator-items-end rcs-emulator-gap-1-5 rcs-emulator-max-w-85 rcs-emulator-ml-auto", children: [
619
582
  /* @__PURE__ */ e(
620
583
  "div",
621
584
  {
622
- className: "px-4 py-2.5 rounded-full text-white text-sm leading-relaxed",
623
- style: { backgroundColor: c },
624
- children: t
585
+ className: "rcs-emulator-message-bubble rcs-emulator-user",
586
+ style: { backgroundColor: i },
587
+ children: r
625
588
  }
626
589
  ),
627
590
  /* @__PURE__ */ e(
628
591
  "div",
629
592
  {
630
- className: "w-5 h-5 rounded-full flex items-center justify-center flex-shrink-0",
631
- style: { backgroundColor: c },
593
+ className: "rcs-emulator-delivery-status",
594
+ style: { backgroundColor: i },
632
595
  children: /* @__PURE__ */ e(
633
596
  "svg",
634
597
  {
635
- className: "w-3 h-3 text-white",
598
+ className: "rcs-emulator-w-3 rcs-emulator-h-3 rcs-emulator-text-white",
636
599
  viewBox: "0 0 24 24",
637
600
  fill: "none",
638
601
  stroke: "currentColor",
@@ -642,34 +605,34 @@ const xe = g(function() {
642
605
  )
643
606
  }
644
607
  ),
645
- /* @__PURE__ */ e("span", { className: "sr-only", children: d })
608
+ /* @__PURE__ */ e("span", { className: "rcs-emulator-sr-only", children: h })
646
609
  ] });
647
- }), we = g(function({
648
- text: t,
649
- timestamp: n
610
+ }), we = p(function({
611
+ text: r,
612
+ timestamp: t
650
613
  }) {
651
- const { businessInfo: o } = N(), s = o.brandColor || "#0084ff", a = new Date(n).toLocaleTimeString([], {
614
+ const { businessInfo: o } = k(), a = o.brandColor || "#0084ff", l = new Date(t).toLocaleTimeString([], {
652
615
  hour: "2-digit",
653
616
  minute: "2-digit"
654
617
  });
655
- return /* @__PURE__ */ l("div", { className: "flex items-end gap-1.5 max-w-[85%] ml-auto", children: [
618
+ return /* @__PURE__ */ n("div", { className: "rcs-emulator-flex rcs-emulator-items-end rcs-emulator-gap-1-5 rcs-emulator-max-w-85 rcs-emulator-ml-auto", children: [
656
619
  /* @__PURE__ */ e(
657
620
  "div",
658
621
  {
659
- className: "px-4 py-2.5 rounded-full text-white text-sm leading-relaxed shadow-sm",
660
- style: { backgroundColor: s },
661
- children: t
622
+ className: "rcs-emulator-message-bubble rcs-emulator-user rcs-emulator-shadow-sm",
623
+ style: { backgroundColor: a },
624
+ children: r
662
625
  }
663
626
  ),
664
627
  /* @__PURE__ */ e(
665
628
  "div",
666
629
  {
667
- className: "w-5 h-5 rounded-full flex items-center justify-center flex-shrink-0",
668
- style: { backgroundColor: s },
630
+ className: "rcs-emulator-delivery-status",
631
+ style: { backgroundColor: a },
669
632
  children: /* @__PURE__ */ e(
670
633
  "svg",
671
634
  {
672
- className: "w-3 h-3 text-white",
635
+ className: "rcs-emulator-w-3 rcs-emulator-h-3 rcs-emulator-text-white",
673
636
  viewBox: "0 0 24 24",
674
637
  fill: "none",
675
638
  stroke: "currentColor",
@@ -686,85 +649,70 @@ const xe = g(function() {
686
649
  )
687
650
  }
688
651
  ),
689
- /* @__PURE__ */ e("span", { className: "sr-only", children: a })
652
+ /* @__PURE__ */ e("span", { className: "rcs-emulator-sr-only", children: l })
690
653
  ] });
691
- }), ve = g(function({
692
- card: t,
693
- timestamp: n
654
+ }), ye = p(function({
655
+ card: r,
656
+ timestamp: t
694
657
  }) {
695
- const { theme: o, handleReply: s, handleAction: a } = N(), i = o === "dark", u = new Date(n).toLocaleTimeString([], {
658
+ const { theme: o, handleReply: a, handleAction: l } = k(), c = o === "dark", u = c ? "rcs-emulator-dark" : "rcs-emulator-light", m = new Date(t).toLocaleTimeString([], {
696
659
  hour: "2-digit",
697
660
  minute: "2-digit"
698
- }), c = (f) => {
699
- "reply" in f ? s(f) : a(f);
700
- }, d = {
701
- short: "h-36",
702
- medium: "h-44",
703
- tall: "h-56"
661
+ }), i = (f) => {
662
+ "reply" in f ? a(f) : l(f);
663
+ }, h = {
664
+ short: "rcs-emulator-h-36",
665
+ medium: "rcs-emulator-h-44",
666
+ tall: "rcs-emulator-h-56"
704
667
  };
705
- return /* @__PURE__ */ l("div", { className: "w-full", children: [
706
- /* @__PURE__ */ l(
668
+ return /* @__PURE__ */ n("div", { className: "rcs-emulator-w-full", children: [
669
+ /* @__PURE__ */ n(
707
670
  "div",
708
671
  {
709
- className: `
710
- overflow-hidden rounded-2xl w-full shadow-sm
711
- ${i ? "bg-zinc-800" : "bg-[#e8f5e9]"}
712
- `,
672
+ className: `rcs-emulator-rich-card ${u}`,
713
673
  children: [
714
- t.media && /* @__PURE__ */ e(
674
+ r.media && /* @__PURE__ */ e(
715
675
  "div",
716
676
  {
717
- className: `
718
- w-full overflow-hidden
719
- ${d[t.media.height]}
720
- `,
677
+ className: `rcs-emulator-w-full rcs-emulator-overflow-hidden ${h[r.media.height]}`,
721
678
  children: /* @__PURE__ */ e(
722
679
  "img",
723
680
  {
724
- src: t.media.url,
725
- alt: t.title || "Rich card media",
726
- className: "w-full h-full object-cover",
681
+ src: r.media.url,
682
+ alt: r.title || "Rich card media",
683
+ className: "rcs-emulator-w-full rcs-emulator-h-full rcs-emulator-object-cover",
727
684
  loading: "lazy"
728
685
  }
729
686
  )
730
687
  }
731
688
  ),
732
- /* @__PURE__ */ l("div", { className: "p-4", children: [
733
- t.title && /* @__PURE__ */ e(
689
+ /* @__PURE__ */ n("div", { className: "rcs-emulator-p-4", children: [
690
+ r.title && /* @__PURE__ */ e(
734
691
  "h3",
735
692
  {
736
- className: `
737
- text-base font-semibold leading-snug
738
- ${i ? "text-white" : "text-gray-900"}
739
- `,
740
- children: t.title
693
+ className: `rcs-emulator-text-base rcs-emulator-font-semibold rcs-emulator-leading-snug ${c ? "rcs-emulator-text-white" : "rcs-emulator-text-gray-900"}`,
694
+ children: r.title
741
695
  }
742
696
  ),
743
- t.description && /* @__PURE__ */ e(
697
+ r.description && /* @__PURE__ */ e(
744
698
  "p",
745
699
  {
746
- className: `
747
- text-sm leading-relaxed mt-1.5
748
- ${i ? "text-zinc-300" : "text-gray-700"}
749
- `,
750
- children: t.description
700
+ className: `rcs-emulator-text-sm rcs-emulator-leading-relaxed rcs-emulator-mt-1-5 ${c ? "rcs-emulator-text-zinc-300" : "rcs-emulator-text-gray-700"}`,
701
+ children: r.description
751
702
  }
752
703
  ),
753
- t.suggestions && t.suggestions.length > 0 && /* @__PURE__ */ e(
704
+ r.suggestions && r.suggestions.length > 0 && /* @__PURE__ */ e(
754
705
  "div",
755
706
  {
756
- className: `
757
- mt-4 rounded-xl overflow-hidden divide-y
758
- ${i ? "divide-zinc-700 bg-zinc-800" : "divide-gray-100 bg-white"}
759
- `,
760
- children: t.suggestions.map((f, v) => /* @__PURE__ */ e(
707
+ className: `rcs-emulator-card-actions rcs-emulator-mt-4 rcs-emulator-divide-y ${c ? "rcs-emulator-divide-zinc-700" : "rcs-emulator-divide-gray-100"} ${u}`,
708
+ children: r.suggestions.map((f, w) => /* @__PURE__ */ e(
761
709
  Me,
762
710
  {
763
711
  suggestion: f,
764
- onClick: () => c(f),
765
- isDark: i
712
+ onClick: () => i(f),
713
+ isDark: c
766
714
  },
767
- v
715
+ w
768
716
  ))
769
717
  }
770
718
  )
@@ -772,180 +720,150 @@ const xe = g(function() {
772
720
  ]
773
721
  }
774
722
  ),
775
- /* @__PURE__ */ e("span", { className: "sr-only", children: u })
723
+ /* @__PURE__ */ e("span", { className: "rcs-emulator-sr-only", children: m })
776
724
  ] });
777
- }), E = "w-5 h-5 text-gray-400", ke = () => /* @__PURE__ */ e("svg", { className: E, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9" }) }), Ne = () => /* @__PURE__ */ e("svg", { className: E, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z" }) }), Le = () => /* @__PURE__ */ l("svg", { className: E, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: [
725
+ }), B = "rcs-emulator-w-5 rcs-emulator-h-5 rcs-emulator-text-gray-400", ke = () => /* @__PURE__ */ e("svg", { className: B, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9" }) }), Ne = () => /* @__PURE__ */ e("svg", { className: B, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z" }) }), Ce = () => /* @__PURE__ */ n("svg", { className: B, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: [
778
726
  /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" }),
779
727
  /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z" })
780
- ] }), Ce = () => /* @__PURE__ */ e("svg", { className: E, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" }) }), G = () => /* @__PURE__ */ e("svg", { className: E, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }), Me = g(function({
781
- suggestion: t,
782
- onClick: n,
728
+ ] }), Le = () => /* @__PURE__ */ e("svg", { className: B, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" }) }), G = () => /* @__PURE__ */ e("svg", { className: B, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }), Me = p(function({
729
+ suggestion: r,
730
+ onClick: t,
783
731
  isDark: o
784
732
  }) {
785
- const s = $(t), a = s ? t.action.displayText : t.reply.displayText;
786
- return /* @__PURE__ */ l(
733
+ const a = z(r), l = a ? r.action.displayText : r.reply.displayText;
734
+ return /* @__PURE__ */ n(
787
735
  "button",
788
736
  {
789
- onClick: n,
790
- className: `
791
- w-full flex items-center gap-3 px-4 py-3 text-left transition-colors
792
- ${o ? "hover:bg-zinc-700" : "hover:bg-gray-50"}
793
- `,
737
+ onClick: t,
738
+ className: `rcs-emulator-list-item ${o ? "rcs-emulator-dark" : "rcs-emulator-light"}`,
739
+ style: { gap: "0.75rem", padding: "0.75rem 1rem" },
794
740
  children: [
795
- /* @__PURE__ */ e("span", { className: "flex-shrink-0", children: (() => {
796
- if (!s) return /* @__PURE__ */ e(G, {});
797
- const { action: u } = t;
798
- return u.urlAction || u.openUrlAction ? /* @__PURE__ */ e(ke, {}) : u.dialerAction || u.dialAction ? /* @__PURE__ */ e(Ne, {}) : u.mapAction || u.viewLocationAction ? /* @__PURE__ */ e(Le, {}) : u.calendarAction || u.createCalendarEventAction ? /* @__PURE__ */ e(Ce, {}) : /* @__PURE__ */ e(G, {});
741
+ /* @__PURE__ */ e("span", { className: "rcs-emulator-flex-shrink-0", children: (() => {
742
+ if (!a) return /* @__PURE__ */ e(G, {});
743
+ const { action: u } = r;
744
+ return u.urlAction || u.openUrlAction ? /* @__PURE__ */ e(ke, {}) : u.dialerAction || u.dialAction ? /* @__PURE__ */ e(Ne, {}) : u.mapAction || u.viewLocationAction ? /* @__PURE__ */ e(Ce, {}) : u.calendarAction || u.createCalendarEventAction ? /* @__PURE__ */ e(Le, {}) : /* @__PURE__ */ e(G, {});
799
745
  })() }),
800
- /* @__PURE__ */ e("span", { className: `text-sm ${o ? "text-white" : "text-gray-900"}`, children: a })
746
+ /* @__PURE__ */ e("span", { className: `rcs-emulator-text-sm ${o ? "rcs-emulator-text-white" : "rcs-emulator-text-gray-900"}`, children: l })
801
747
  ]
802
748
  }
803
749
  );
804
- }), ze = g(function({ cards: t, timestamp: n }) {
805
- const { theme: o, handleReply: s, handleAction: a } = N(), i = W(null), [u, c] = z(!1), [d, m] = z(t.length > 1), f = o === "dark", v = new Date(n).toLocaleTimeString([], {
750
+ }), $e = p(function({ cards: r, timestamp: t }) {
751
+ const { theme: o, handleReply: a, handleAction: l } = k(), c = W(null), [u, m] = A(!1), [i, h] = A(r.length > 1), f = o === "dark", w = f ? "rcs-emulator-dark" : "rcs-emulator-light", b = new Date(t).toLocaleTimeString([], {
806
752
  hour: "2-digit",
807
753
  minute: "2-digit"
808
- }), x = (p) => {
809
- "reply" in p ? s(p) : a(p);
810
- }, L = M(() => {
811
- if (i.current) {
812
- const { scrollLeft: p, scrollWidth: y, clientWidth: h } = i.current;
813
- c(p > 0), m(p < y - h - 10);
754
+ }), N = (g) => {
755
+ "reply" in g ? a(g) : l(g);
756
+ }, v = $(() => {
757
+ if (c.current) {
758
+ const { scrollLeft: g, scrollWidth: d, clientWidth: x } = c.current;
759
+ m(g > 0), h(g < d - x - 10);
814
760
  }
815
- }, []), b = (p) => {
816
- i.current && i.current.scrollBy({
817
- left: p === "left" ? -200 : 200,
761
+ }, []), y = (g) => {
762
+ c.current && c.current.scrollBy({
763
+ left: g === "left" ? -200 : 200,
818
764
  behavior: "smooth"
819
765
  });
820
766
  };
821
- return /* @__PURE__ */ l("div", { className: "w-full -mx-3", children: [
822
- /* @__PURE__ */ l("div", { className: "relative", children: [
767
+ return /* @__PURE__ */ n("div", { className: "rcs-emulator-w-full rcs-emulator--mx-3", children: [
768
+ /* @__PURE__ */ n("div", { className: "rcs-emulator-relative", children: [
823
769
  u && /* @__PURE__ */ e(
824
770
  "button",
825
771
  {
826
- onClick: () => b("left"),
827
- className: `
828
- absolute left-2 top-1/2 -translate-y-1/2 z-10
829
- w-8 h-8 rounded-full flex items-center justify-center
830
- shadow-lg transition-opacity
831
- ${f ? "bg-zinc-700 text-white" : "bg-white text-gray-700"}
832
- `,
772
+ onClick: () => y("left"),
773
+ className: `rcs-emulator-carousel-arrow rcs-emulator-left ${w}`,
833
774
  "aria-label": "Scroll left",
834
- children: /* @__PURE__ */ e("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 19l-7-7 7-7" }) })
775
+ children: /* @__PURE__ */ e("svg", { className: "rcs-emulator-w-4 rcs-emulator-h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 19l-7-7 7-7" }) })
835
776
  }
836
777
  ),
837
778
  /* @__PURE__ */ e(
838
779
  "div",
839
780
  {
840
- ref: i,
841
- onScroll: L,
842
- className: "flex gap-2.5 overflow-x-auto py-1 px-3 snap-x snap-mandatory",
843
- style: { scrollbarWidth: "none", msOverflowStyle: "none" },
844
- children: t.map((p, y) => /* @__PURE__ */ e(
845
- Ae,
781
+ ref: c,
782
+ onScroll: v,
783
+ className: "rcs-emulator-flex rcs-emulator-gap-2-5 rcs-emulator-overflow-x-auto rcs-emulator-py-1 rcs-emulator-px-3 rcs-emulator-snap-x rcs-emulator-scrollbar-hide",
784
+ children: r.map((g, d) => /* @__PURE__ */ e(
785
+ ze,
846
786
  {
847
- card: p,
787
+ card: g,
848
788
  isDark: f,
849
- onSuggestionClick: x
789
+ onSuggestionClick: N
850
790
  },
851
- y
791
+ d
852
792
  ))
853
793
  }
854
794
  ),
855
- d && /* @__PURE__ */ e(
795
+ i && /* @__PURE__ */ e(
856
796
  "button",
857
797
  {
858
- onClick: () => b("right"),
859
- className: `
860
- absolute right-2 top-1/2 -translate-y-1/2 z-10
861
- w-8 h-8 rounded-full flex items-center justify-center
862
- shadow-lg transition-opacity
863
- ${f ? "bg-zinc-700 text-white" : "bg-white text-gray-700"}
864
- `,
798
+ onClick: () => y("right"),
799
+ className: `rcs-emulator-carousel-arrow rcs-emulator-right ${w}`,
865
800
  "aria-label": "Scroll right",
866
- children: /* @__PURE__ */ e("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) })
801
+ children: /* @__PURE__ */ e("svg", { className: "rcs-emulator-w-4 rcs-emulator-h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) })
867
802
  }
868
803
  )
869
804
  ] }),
870
- /* @__PURE__ */ e("span", { className: "sr-only", children: v })
805
+ /* @__PURE__ */ e("span", { className: "rcs-emulator-sr-only", children: b })
871
806
  ] });
872
- }), j = "w-4 h-4 text-gray-400", $e = (r) => {
873
- if (!$(r))
807
+ }), j = "rcs-emulator-w-4 rcs-emulator-h-4 rcs-emulator-text-gray-400", Ae = (s) => {
808
+ if (!z(s))
874
809
  return /* @__PURE__ */ e("svg", { className: j, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) });
875
- const { action: t } = r;
876
- return t.urlAction || t.openUrlAction ? /* @__PURE__ */ e("svg", { className: j, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9" }) }) : t.dialerAction || t.dialAction ? /* @__PURE__ */ e("svg", { className: j, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z" }) }) : t.mapAction || t.viewLocationAction ? /* @__PURE__ */ l("svg", { className: j, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: [
810
+ const { action: r } = s;
811
+ return r.urlAction || r.openUrlAction ? /* @__PURE__ */ e("svg", { className: j, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9" }) }) : r.dialerAction || r.dialAction ? /* @__PURE__ */ e("svg", { className: j, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z" }) }) : r.mapAction || r.viewLocationAction ? /* @__PURE__ */ n("svg", { className: j, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: [
877
812
  /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" }),
878
813
  /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z" })
879
- ] }) : t.calendarAction || t.createCalendarEventAction ? /* @__PURE__ */ e("svg", { className: j, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" }) }) : /* @__PURE__ */ e("svg", { className: j, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) });
880
- }, Ae = g(function({
881
- card: t,
882
- isDark: n,
814
+ ] }) : r.calendarAction || r.createCalendarEventAction ? /* @__PURE__ */ e("svg", { className: j, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" }) }) : /* @__PURE__ */ e("svg", { className: j, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) });
815
+ }, ze = p(function({
816
+ card: r,
817
+ isDark: t,
883
818
  onSuggestionClick: o
884
819
  }) {
885
- const s = t.layout.width === "small" ? "w-44" : "w-52";
886
- return /* @__PURE__ */ l(
820
+ const a = r.layout.width === "small" ? "rcs-emulator-w-44" : "rcs-emulator-w-52", l = t ? "rcs-emulator-dark" : "rcs-emulator-light";
821
+ return /* @__PURE__ */ n(
887
822
  "div",
888
823
  {
889
- className: `
890
- flex-shrink-0 snap-start rounded-2xl overflow-hidden shadow-sm
891
- ${s}
892
- ${n ? "bg-zinc-800" : "bg-[#e8f5e9]"}
893
- `,
824
+ className: `rcs-emulator-carousel-card ${a} ${l}`,
894
825
  children: [
895
- t.media && /* @__PURE__ */ e("div", { className: "w-full h-32 bg-gray-200 overflow-hidden", children: /* @__PURE__ */ e(
826
+ r.media && /* @__PURE__ */ e("div", { className: "rcs-emulator-w-full rcs-emulator-h-32 rcs-emulator-bg-gray-200 rcs-emulator-overflow-hidden", children: /* @__PURE__ */ e(
896
827
  "img",
897
828
  {
898
- src: t.media.url,
899
- alt: t.title || "Carousel card media",
900
- className: "w-full h-full object-cover",
829
+ src: r.media.url,
830
+ alt: r.title || "Carousel card media",
831
+ className: "rcs-emulator-w-full rcs-emulator-h-full rcs-emulator-object-cover",
901
832
  loading: "lazy"
902
833
  }
903
834
  ) }),
904
- /* @__PURE__ */ l("div", { className: "p-3", children: [
905
- t.title && /* @__PURE__ */ e(
835
+ /* @__PURE__ */ n("div", { className: "rcs-emulator-p-3", children: [
836
+ r.title && /* @__PURE__ */ e(
906
837
  "h4",
907
838
  {
908
- className: `
909
- text-sm font-semibold leading-tight mb-1 line-clamp-2
910
- ${n ? "text-white" : "text-gray-900"}
911
- `,
912
- children: t.title
839
+ className: `rcs-emulator-text-sm rcs-emulator-font-semibold rcs-emulator-leading-tight rcs-emulator-mb-1 rcs-emulator-line-clamp-2 ${t ? "rcs-emulator-text-white" : "rcs-emulator-text-gray-900"}`,
840
+ children: r.title
913
841
  }
914
842
  ),
915
- t.description && /* @__PURE__ */ e(
843
+ r.description && /* @__PURE__ */ e(
916
844
  "p",
917
845
  {
918
- className: `
919
- text-xs leading-relaxed line-clamp-3
920
- ${n ? "text-zinc-400" : "text-gray-700"}
921
- `,
922
- children: t.description
846
+ className: `rcs-emulator-text-xs rcs-emulator-leading-relaxed rcs-emulator-line-clamp-3 ${t ? "rcs-emulator-text-zinc-400" : "rcs-emulator-text-gray-700"}`,
847
+ children: r.description
923
848
  }
924
849
  ),
925
- t.suggestions && t.suggestions.length > 0 && /* @__PURE__ */ e(
850
+ r.suggestions && r.suggestions.length > 0 && /* @__PURE__ */ e(
926
851
  "div",
927
852
  {
928
- className: `
929
- mt-3 rounded-lg overflow-hidden divide-y
930
- ${n ? "divide-zinc-600 bg-zinc-700" : "divide-gray-100 bg-white"}
931
- `,
932
- children: t.suggestions.map((a, i) => {
933
- const c = $(a) ? a.action.displayText : a.reply.displayText;
934
- return /* @__PURE__ */ l(
853
+ className: `rcs-emulator-carousel-actions rcs-emulator-mt-3 rcs-emulator-divide-y ${t ? "rcs-emulator-divide-zinc-600" : "rcs-emulator-divide-gray-100"} ${l}`,
854
+ children: r.suggestions.map((c, u) => {
855
+ const i = z(c) ? c.action.displayText : c.reply.displayText;
856
+ return /* @__PURE__ */ n(
935
857
  "button",
936
858
  {
937
- onClick: () => o(a),
938
- className: `
939
- w-full flex items-center gap-2 px-3 py-2.5
940
- text-xs transition-colors text-left
941
- ${n ? "hover:bg-zinc-600 text-white" : "hover:bg-gray-50 text-gray-900"}
942
- `,
859
+ onClick: () => o(c),
860
+ className: `rcs-emulator-w-full rcs-emulator-flex rcs-emulator-items-center rcs-emulator-gap-2 rcs-emulator-px-3 rcs-emulator-py-2-5 rcs-emulator-text-xs rcs-emulator-transition-colors rcs-emulator-text-left ${t ? "rcs-emulator-hover-bg-zinc-700 rcs-emulator-text-white" : "rcs-emulator-hover-bg-gray-50 rcs-emulator-text-gray-900"}`,
943
861
  children: [
944
- /* @__PURE__ */ e("span", { className: "flex-shrink-0", children: $e(a) }),
945
- /* @__PURE__ */ e("span", { className: "truncate", children: c })
862
+ /* @__PURE__ */ e("span", { className: "rcs-emulator-flex-shrink-0", children: Ae(c) }),
863
+ /* @__PURE__ */ e("span", { className: "rcs-emulator-truncate", children: i })
946
864
  ]
947
865
  },
948
- i
866
+ u
949
867
  );
950
868
  })
951
869
  }
@@ -955,65 +873,53 @@ const xe = g(function() {
955
873
  }
956
874
  );
957
875
  }), Ie = {
958
- text: ({ content: r, sender: t, timestamp: n }) => r.type !== "text" ? null : /* @__PURE__ */ e(ye, { text: r.text, sender: t, timestamp: n }),
959
- userReply: ({ content: r, timestamp: t }) => r.type !== "userReply" ? null : /* @__PURE__ */ e(we, { text: r.text, timestamp: t }),
960
- richcard: ({ content: r, timestamp: t }) => r.type !== "richcard" ? null : /* @__PURE__ */ e(ve, { card: r.card, timestamp: t }),
961
- carousel: ({ content: r, timestamp: t }) => r.type !== "carousel" ? null : /* @__PURE__ */ e(ze, { cards: r.cards, timestamp: t })
962
- }, Te = g(function({
963
- message: t,
964
- isLast: n
876
+ text: ({ content: s, sender: r, timestamp: t }) => s.type !== "text" ? null : /* @__PURE__ */ e(ve, { text: s.text, sender: r, timestamp: t }),
877
+ userReply: ({ content: s, timestamp: r }) => s.type !== "userReply" ? null : /* @__PURE__ */ e(we, { text: s.text, timestamp: r }),
878
+ richcard: ({ content: s, timestamp: r }) => s.type !== "richcard" ? null : /* @__PURE__ */ e(ye, { card: s.card, timestamp: r }),
879
+ carousel: ({ content: s, timestamp: r }) => s.type !== "carousel" ? null : /* @__PURE__ */ e($e, { cards: s.cards, timestamp: r })
880
+ }, Te = p(function({
881
+ message: r,
882
+ isLast: t
965
883
  }) {
966
- const { content: o, sender: s, timestamp: a } = t, i = Ie[o.type];
967
- return i ? /* @__PURE__ */ e(
968
- i,
884
+ const { content: o, sender: a, timestamp: l } = r, c = Ie[o.type];
885
+ return c ? /* @__PURE__ */ e(
886
+ c,
969
887
  {
970
888
  content: o,
971
- sender: s,
972
- timestamp: a,
973
- showSuggestions: n && s === "business"
889
+ sender: a,
890
+ timestamp: l,
891
+ showSuggestions: t && a === "business"
974
892
  }
975
- ) : (console.warn(`Unknown message type: ${o.type}`), /* @__PURE__ */ e("div", { className: "px-4 py-2 text-gray-500 text-sm italic", children: "[Unsupported message type]" }));
976
- }), je = g(function() {
977
- const { theme: t } = N(), n = t === "dark";
893
+ ) : (console.warn(`Unknown message type: ${o.type}`), /* @__PURE__ */ e("div", { className: "rcs-emulator-px-4 rcs-emulator-py-2 rcs-emulator-text-gray-500 rcs-emulator-text-sm rcs-emulator-italic", children: "[Unsupported message type]" }));
894
+ }), Se = p(function() {
895
+ const { theme: r } = k(), t = r === "dark";
978
896
  return /* @__PURE__ */ e(
979
897
  "div",
980
898
  {
981
- className: "flex items-start gap-2 px-4 py-2",
899
+ className: "rcs-emulator-flex rcs-emulator-items-start rcs-emulator-gap-2 rcs-emulator-px-4 rcs-emulator-py-2",
982
900
  role: "status",
983
901
  "aria-label": "Business is typing",
984
- children: /* @__PURE__ */ l(
902
+ children: /* @__PURE__ */ n(
985
903
  "div",
986
904
  {
987
- className: `
988
- inline-flex items-center gap-1 px-4 py-3 rounded-2xl rounded-bl-sm
989
- ${n ? "bg-zinc-800" : "bg-gray-100"}
990
- `,
905
+ className: `rcs-emulator-inline-flex rcs-emulator-items-center rcs-emulator-gap-1 rcs-emulator-px-4 rcs-emulator-py-3 rcs-emulator-rounded-2xl rcs-emulator-rounded-bl-sm rcs-emulator-typing-bubble ${t ? "rcs-emulator-dark" : "rcs-emulator-light"}`,
991
906
  children: [
992
907
  /* @__PURE__ */ e(
993
908
  "span",
994
909
  {
995
- className: `
996
- rcs-typing-dot w-2 h-2 rounded-full
997
- ${n ? "bg-zinc-500" : "bg-gray-400"}
998
- `
910
+ className: `rcs-emulator-typing-dot rcs-emulator-w-2 rcs-emulator-h-2 rcs-emulator-rounded-full ${t ? "rcs-emulator-bg-zinc-500" : "rcs-emulator-bg-gray-400"}`
999
911
  }
1000
912
  ),
1001
913
  /* @__PURE__ */ e(
1002
914
  "span",
1003
915
  {
1004
- className: `
1005
- rcs-typing-dot w-2 h-2 rounded-full
1006
- ${n ? "bg-zinc-500" : "bg-gray-400"}
1007
- `
916
+ className: `rcs-emulator-typing-dot rcs-emulator-w-2 rcs-emulator-h-2 rcs-emulator-rounded-full ${t ? "rcs-emulator-bg-zinc-500" : "rcs-emulator-bg-gray-400"}`
1008
917
  }
1009
918
  ),
1010
919
  /* @__PURE__ */ e(
1011
920
  "span",
1012
921
  {
1013
- className: `
1014
- rcs-typing-dot w-2 h-2 rounded-full
1015
- ${n ? "bg-zinc-500" : "bg-gray-400"}
1016
- `
922
+ className: `rcs-emulator-typing-dot rcs-emulator-w-2 rcs-emulator-h-2 rcs-emulator-rounded-full ${t ? "rcs-emulator-bg-zinc-500" : "rcs-emulator-bg-gray-400"}`
1017
923
  }
1018
924
  )
1019
925
  ]
@@ -1021,53 +927,45 @@ const xe = g(function() {
1021
927
  )
1022
928
  }
1023
929
  );
1024
- }), Se = g(function() {
1025
- const { theme: t, state: n } = N(), { chatHistory: o, isTyping: s } = n, a = t === "dark";
1026
- return /* @__PURE__ */ l(
930
+ }), je = p(function() {
931
+ const { theme: r, state: t } = k(), { chatHistory: o, isTyping: a } = t, l = r === "dark", c = l ? "rcs-emulator-dark" : "rcs-emulator-light";
932
+ return /* @__PURE__ */ n(
1027
933
  "div",
1028
934
  {
1029
- className: "px-3 pb-3 space-y-3",
935
+ className: "rcs-emulator-px-3 rcs-emulator-pb-3 rcs-emulator-space-y-3",
1030
936
  role: "log",
1031
937
  "aria-label": "Chat messages",
1032
938
  "aria-live": "polite",
1033
939
  children: [
1034
- o.length > 0 && /* @__PURE__ */ e("div", { className: "flex justify-center py-2", children: /* @__PURE__ */ e(
940
+ o.length > 0 && /* @__PURE__ */ e("div", { className: "rcs-emulator-flex rcs-emulator-justify-center rcs-emulator-py-2", children: /* @__PURE__ */ e(
1035
941
  "span",
1036
942
  {
1037
- className: `
1038
- text-xs font-medium px-3 py-1
1039
- ${a ? "text-zinc-500" : "text-gray-500"}
1040
- `,
943
+ className: `rcs-emulator-text-xs rcs-emulator-font-medium rcs-emulator-px-3 rcs-emulator-py-1 ${l ? "rcs-emulator-text-zinc-500" : "rcs-emulator-text-gray-500"}`,
1041
944
  children: "Today"
1042
945
  }
1043
946
  ) }),
1044
- /* @__PURE__ */ l(
947
+ /* @__PURE__ */ n(
1045
948
  "div",
1046
949
  {
1047
- className: `
1048
- rounded-3xl overflow-hidden
1049
- ${a ? "bg-zinc-900" : "bg-gray-50"}
1050
- `,
950
+ className: `rcs-emulator-messages-container ${c}`,
1051
951
  children: [
1052
- o.length === 0 && !s && /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ e("p", { className: `text-sm ${a ? "text-zinc-500" : "text-gray-400"}`, children: "No messages yet" }) }),
1053
- /* @__PURE__ */ l("div", { className: "p-3 space-y-3", children: [
1054
- o.map((i, u) => /* @__PURE__ */ e(
952
+ o.length === 0 && !a && /* @__PURE__ */ e("div", { className: "rcs-emulator-flex rcs-emulator-items-center rcs-emulator-justify-center rcs-emulator-py-12", children: /* @__PURE__ */ e("p", { className: `rcs-emulator-text-sm ${l ? "rcs-emulator-text-zinc-500" : "rcs-emulator-text-gray-400"}`, children: "No messages yet" }) }),
953
+ /* @__PURE__ */ n("div", { className: "rcs-emulator-p-3 rcs-emulator-space-y-3", children: [
954
+ o.map((u, m) => /* @__PURE__ */ e(
1055
955
  "div",
1056
956
  {
1057
- className: `
1058
- ${i.sender === "user" ? "flex justify-end" : "flex justify-start"}
1059
- `,
957
+ className: `rcs-emulator-flex ${u.sender === "user" ? "rcs-emulator-justify-end" : "rcs-emulator-justify-start"}`,
1060
958
  children: /* @__PURE__ */ e(
1061
959
  Te,
1062
960
  {
1063
- message: i,
1064
- isLast: u === o.length - 1 && !s
961
+ message: u,
962
+ isLast: m === o.length - 1 && !a
1065
963
  }
1066
964
  )
1067
965
  },
1068
- i.id
966
+ u.id
1069
967
  )),
1070
- s && /* @__PURE__ */ e(je, {})
968
+ a && /* @__PURE__ */ e(Se, {})
1071
969
  ] })
1072
970
  ]
1073
971
  }
@@ -1075,52 +973,50 @@ const xe = g(function() {
1075
973
  ]
1076
974
  }
1077
975
  );
1078
- }), Ee = g(function({
1079
- suggestion: t,
1080
- onClick: n,
976
+ }), Ee = p(function({
977
+ suggestion: r,
978
+ onClick: t,
1081
979
  variant: o = "bar"
1082
980
  }) {
1083
- const { theme: s, businessInfo: a } = N(), i = s === "dark", u = $(t), c = u ? t.action.displayText : t.reply.displayText, d = u ? Be(t) : null, m = a.brandColor || "#0084ff";
1084
- return o === "bar" ? /* @__PURE__ */ l(
981
+ const { theme: a, businessInfo: l } = k(), c = a === "dark", u = z(r), m = u ? r.action.displayText : r.reply.displayText, i = u ? Be(r) : null, h = l.brandColor || "#0084ff", f = c ? "rcs-emulator-dark" : "rcs-emulator-light";
982
+ return o === "bar" ? /* @__PURE__ */ n(
1085
983
  "button",
1086
984
  {
1087
985
  type: "button",
1088
- onClick: n,
1089
- className: `
1090
- inline-flex items-center gap-2 px-4 py-2 rounded-full text-sm font-medium
1091
- whitespace-nowrap transition-colors flex-shrink-0
1092
- border
1093
- ${i ? "bg-zinc-800 border-zinc-700 hover:bg-zinc-700 text-white" : "bg-white border-gray-300 hover:bg-gray-50 text-gray-900"}
1094
- `,
1095
- "aria-label": u ? `${Re(t)}: ${c}` : c,
986
+ onClick: t,
987
+ className: `rcs-emulator-suggestion-chip rcs-emulator-inline-flex rcs-emulator-items-center rcs-emulator-gap-2 rcs-emulator-px-4 rcs-emulator-py-2 rcs-emulator-rounded-full rcs-emulator-text-sm rcs-emulator-font-medium rcs-emulator-whitespace-nowrap rcs-emulator-transition-colors rcs-emulator-flex-shrink-0 rcs-emulator-border ${f}`,
988
+ "aria-label": u ? `${Re(r)}: ${m}` : m,
1096
989
  children: [
1097
- d && /* @__PURE__ */ e("span", { style: { color: m }, children: /* @__PURE__ */ e(d, { className: "w-4 h-4" }) }),
1098
- /* @__PURE__ */ e("span", { children: c })
990
+ i && /* @__PURE__ */ e("span", { style: { color: h }, children: /* @__PURE__ */ e(i, { className: "rcs-emulator-w-4 rcs-emulator-h-4" }) }),
991
+ /* @__PURE__ */ e("span", { className: "rcs-emulator-text-sm rcs-emulator-font-medium", children: m })
1099
992
  ]
1100
993
  }
1101
- ) : o === "card" ? /* @__PURE__ */ l(
994
+ ) : o === "card" ? /* @__PURE__ */ n(
1102
995
  "button",
1103
996
  {
1104
997
  type: "button",
1105
- onClick: n,
1106
- className: `
1107
- w-full flex items-center gap-3 px-3 py-2.5 text-left transition-colors rounded-lg
1108
- ${i ? "hover:bg-zinc-700" : "hover:bg-gray-100"}
1109
- `,
998
+ onClick: t,
999
+ className: `rcs-emulator-w-full rcs-emulator-flex rcs-emulator-items-center rcs-emulator-gap-3 rcs-emulator-px-3 rcs-emulator-py-2-5 rcs-emulator-text-left rcs-emulator-transition-colors rcs-emulator-rounded-lg rcs-emulator-list-item ${f}`,
1110
1000
  children: [
1111
- d && /* @__PURE__ */ e(
1001
+ i && /* @__PURE__ */ e(
1112
1002
  "div",
1113
1003
  {
1114
- className: "w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0",
1115
- style: { backgroundColor: `${m}15` },
1116
- children: /* @__PURE__ */ e(d, { className: "w-4 h-4", style: { color: m } })
1004
+ className: "rcs-emulator-w-8 rcs-emulator-h-8 rcs-emulator-rounded-full rcs-emulator-flex rcs-emulator-items-center rcs-emulator-justify-center rcs-emulator-flex-shrink-0",
1005
+ style: { backgroundColor: `${h}15` },
1006
+ children: /* @__PURE__ */ e(
1007
+ i,
1008
+ {
1009
+ className: "rcs-emulator-w-4 rcs-emulator-h-4",
1010
+ style: { color: h }
1011
+ }
1012
+ )
1117
1013
  }
1118
1014
  ),
1119
1015
  /* @__PURE__ */ e(
1120
1016
  "span",
1121
1017
  {
1122
- className: `text-sm font-medium ${i ? "text-white" : "text-gray-900"}`,
1123
- children: c
1018
+ className: `rcs-emulator-text-sm rcs-emulator-font-medium ${c ? "rcs-emulator-text-white" : "rcs-emulator-text-gray-900"}`,
1019
+ children: m
1124
1020
  }
1125
1021
  )
1126
1022
  ]
@@ -1129,117 +1025,203 @@ const xe = g(function() {
1129
1025
  "button",
1130
1026
  {
1131
1027
  type: "button",
1132
- onClick: n,
1133
- className: `
1134
- w-full px-3 py-2 rounded-lg text-xs font-medium text-center
1135
- border transition-colors
1136
- ${i ? "border-zinc-600 hover:bg-zinc-700 text-white" : "border-gray-300 hover:bg-gray-50 text-gray-900"}
1137
- `,
1138
- children: c
1028
+ onClick: t,
1029
+ className: `rcs-emulator-w-full rcs-emulator-px-3 rcs-emulator-py-2 rcs-emulator-rounded-lg rcs-emulator-text-xs rcs-emulator-font-medium rcs-emulator-text-center rcs-emulator-border rcs-emulator-transition-colors ${c ? "rcs-emulator-border-zinc-600 rcs-emulator-hover-bg-zinc-700 rcs-emulator-text-white" : "rcs-emulator-border-gray-300 rcs-emulator-hover-bg-gray-50 rcs-emulator-text-gray-900"}`,
1030
+ children: m
1139
1031
  }
1140
1032
  );
1141
1033
  });
1142
- function Be(r) {
1143
- if (!$(r)) return null;
1144
- const { action: t } = r;
1145
- return t.openUrlAction ? ({ className: n, style: o }) => /* @__PURE__ */ e("svg", { className: n, style: o, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9" }) }) : t.dialAction ? ({ className: n, style: o }) => /* @__PURE__ */ e("svg", { className: n, style: o, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z" }) }) : t.shareLocationAction ? ({ className: n, style: o }) => /* @__PURE__ */ l("svg", { className: n, style: o, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: [
1146
- /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" }),
1147
- /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z" })
1148
- ] }) : t.viewLocationAction ? ({ className: n, style: o }) => /* @__PURE__ */ l("svg", { className: n, style: o, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: [
1149
- /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" }),
1150
- /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z" })
1151
- ] }) : t.createCalendarEventAction ? ({ className: n, style: o }) => /* @__PURE__ */ e("svg", { className: n, style: o, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" }) }) : null;
1034
+ function Be(s) {
1035
+ if (!z(s)) return null;
1036
+ const { action: r } = s;
1037
+ return r.openUrlAction ? ({ className: t, style: o }) => /* @__PURE__ */ e(
1038
+ "svg",
1039
+ {
1040
+ className: t,
1041
+ style: o,
1042
+ fill: "none",
1043
+ viewBox: "0 0 24 24",
1044
+ stroke: "currentColor",
1045
+ strokeWidth: 2,
1046
+ children: /* @__PURE__ */ e(
1047
+ "path",
1048
+ {
1049
+ strokeLinecap: "round",
1050
+ strokeLinejoin: "round",
1051
+ d: "M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"
1052
+ }
1053
+ )
1054
+ }
1055
+ ) : r.dialAction ? ({ className: t, style: o }) => /* @__PURE__ */ e(
1056
+ "svg",
1057
+ {
1058
+ className: t,
1059
+ style: o,
1060
+ fill: "none",
1061
+ viewBox: "0 0 24 24",
1062
+ stroke: "currentColor",
1063
+ strokeWidth: 2,
1064
+ children: /* @__PURE__ */ e(
1065
+ "path",
1066
+ {
1067
+ strokeLinecap: "round",
1068
+ strokeLinejoin: "round",
1069
+ d: "M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"
1070
+ }
1071
+ )
1072
+ }
1073
+ ) : r.shareLocationAction ? ({ className: t, style: o }) => /* @__PURE__ */ n(
1074
+ "svg",
1075
+ {
1076
+ className: t,
1077
+ style: o,
1078
+ fill: "none",
1079
+ viewBox: "0 0 24 24",
1080
+ stroke: "currentColor",
1081
+ strokeWidth: 2,
1082
+ children: [
1083
+ /* @__PURE__ */ e(
1084
+ "path",
1085
+ {
1086
+ strokeLinecap: "round",
1087
+ strokeLinejoin: "round",
1088
+ d: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"
1089
+ }
1090
+ ),
1091
+ /* @__PURE__ */ e(
1092
+ "path",
1093
+ {
1094
+ strokeLinecap: "round",
1095
+ strokeLinejoin: "round",
1096
+ d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z"
1097
+ }
1098
+ )
1099
+ ]
1100
+ }
1101
+ ) : r.viewLocationAction ? ({ className: t, style: o }) => /* @__PURE__ */ n(
1102
+ "svg",
1103
+ {
1104
+ className: t,
1105
+ style: o,
1106
+ fill: "none",
1107
+ viewBox: "0 0 24 24",
1108
+ stroke: "currentColor",
1109
+ strokeWidth: 2,
1110
+ children: [
1111
+ /* @__PURE__ */ e(
1112
+ "path",
1113
+ {
1114
+ strokeLinecap: "round",
1115
+ strokeLinejoin: "round",
1116
+ d: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"
1117
+ }
1118
+ ),
1119
+ /* @__PURE__ */ e(
1120
+ "path",
1121
+ {
1122
+ strokeLinecap: "round",
1123
+ strokeLinejoin: "round",
1124
+ d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z"
1125
+ }
1126
+ )
1127
+ ]
1128
+ }
1129
+ ) : r.createCalendarEventAction ? ({ className: t, style: o }) => /* @__PURE__ */ e(
1130
+ "svg",
1131
+ {
1132
+ className: t,
1133
+ style: o,
1134
+ fill: "none",
1135
+ viewBox: "0 0 24 24",
1136
+ stroke: "currentColor",
1137
+ strokeWidth: 2,
1138
+ children: /* @__PURE__ */ e(
1139
+ "path",
1140
+ {
1141
+ strokeLinecap: "round",
1142
+ strokeLinejoin: "round",
1143
+ d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
1144
+ }
1145
+ )
1146
+ }
1147
+ ) : null;
1152
1148
  }
1153
- function Re(r) {
1154
- if (!$(r)) return "Reply";
1155
- const { action: t } = r;
1156
- return t.openUrlAction ? "Open link" : t.dialAction ? "Call" : t.shareLocationAction ? "Share location" : t.viewLocationAction ? "View location" : t.createCalendarEventAction ? "Add to calendar" : "Action";
1149
+ function Re(s) {
1150
+ if (!z(s)) return "Reply";
1151
+ const { action: r } = s;
1152
+ return r.openUrlAction ? "Open link" : r.dialAction ? "Call" : r.shareLocationAction ? "Share location" : r.viewLocationAction ? "View location" : r.createCalendarEventAction ? "Add to calendar" : "Action";
1157
1153
  }
1158
- const We = g(function({
1159
- suggestions: t
1154
+ const We = p(function({
1155
+ suggestions: r
1160
1156
  }) {
1161
- const { theme: n, handleReply: o, handleAction: s } = N(), a = n === "dark";
1162
- if (!t || t.length === 0)
1157
+ const { theme: t, handleReply: o, handleAction: a } = k(), l = t === "dark";
1158
+ if (!r || r.length === 0)
1163
1159
  return null;
1164
- const i = (u) => {
1165
- q(u) ? o(u) : $(u) && s(u);
1160
+ const c = (u) => {
1161
+ Y(u) ? o(u) : z(u) && a(u);
1166
1162
  };
1167
1163
  return /* @__PURE__ */ e(
1168
1164
  "div",
1169
1165
  {
1170
- className: `
1171
- px-3 py-2
1172
- ${a ? "bg-zinc-900" : "bg-white"}
1173
- `,
1166
+ className: `rcs-emulator-suggestions-bar rcs-emulator-px-3 rcs-emulator-py-2 ${l ? "rcs-emulator-dark" : "rcs-emulator-light"}`,
1174
1167
  role: "group",
1175
1168
  "aria-label": "Quick replies",
1176
1169
  children: /* @__PURE__ */ e(
1177
1170
  "div",
1178
1171
  {
1179
- className: "flex gap-2 overflow-x-auto pb-1 -mx-1 px-1",
1180
- style: { scrollbarWidth: "none", msOverflowStyle: "none" },
1181
- children: t.map((u, c) => /* @__PURE__ */ e(
1172
+ className: "rcs-emulator-flex rcs-emulator-gap-2 rcs-emulator-overflow-x-auto rcs-emulator-pb-1 rcs-emulator--mx-1 rcs-emulator-px-1 rcs-emulator-scrollbar-hide",
1173
+ children: r.map((u, m) => /* @__PURE__ */ e(
1182
1174
  Ee,
1183
1175
  {
1184
1176
  suggestion: u,
1185
- onClick: () => i(u),
1177
+ onClick: () => c(u),
1186
1178
  variant: "bar"
1187
1179
  },
1188
- c
1180
+ m
1189
1181
  ))
1190
1182
  }
1191
1183
  )
1192
1184
  }
1193
1185
  );
1194
- }), Ve = g(function() {
1195
- const { theme: t, state: n, showSuggestions: o } = N(), { chatHistory: s, isTyping: a, error: i } = n, u = pe([
1196
- s.length,
1197
- a
1198
- ]), c = t === "dark", d = s[s.length - 1], m = o && d?.sender === "business" && !a ? d.suggestions : void 0;
1199
- return /* @__PURE__ */ l(
1186
+ }), Ve = p(function() {
1187
+ const { theme: r, state: t, showSuggestions: o } = k(), { chatHistory: a, isTyping: l, error: c } = t, u = ge([
1188
+ a.length,
1189
+ l
1190
+ ]), m = r === "dark", i = m ? "rcs-emulator-dark" : "rcs-emulator-light", h = a[a.length - 1], f = o && h?.sender === "business" && !l ? h.suggestions : void 0;
1191
+ return /* @__PURE__ */ n(
1200
1192
  "div",
1201
1193
  {
1202
- className: `
1203
- flex flex-col h-full w-full overflow-hidden
1204
- ${c ? "bg-zinc-950" : "bg-white"}
1205
- `,
1194
+ className: `rcs-emulator-flex rcs-emulator-flex-col rcs-emulator-h-full rcs-emulator-w-full rcs-emulator-overflow-hidden ${m ? "rcs-emulator-bg-zinc-950" : "rcs-emulator-bg-white"}`,
1206
1195
  children: [
1207
1196
  /* @__PURE__ */ e(xe, {}),
1208
- i && /* @__PURE__ */ e(
1197
+ c && /* @__PURE__ */ e(
1209
1198
  "div",
1210
1199
  {
1211
- className: "px-4 py-2 bg-red-500/10 border-b border-red-500/20",
1200
+ className: "rcs-emulator-error-alert",
1212
1201
  role: "alert",
1213
- children: /* @__PURE__ */ e("p", { className: "text-sm text-red-500", children: i })
1202
+ children: /* @__PURE__ */ e("p", { className: "rcs-emulator-text-sm rcs-emulator-text-red-500", children: c })
1214
1203
  }
1215
1204
  ),
1216
- /* @__PURE__ */ l("div", { ref: u, className: "flex-1 overflow-y-auto rcs-scrollbar", children: [
1205
+ /* @__PURE__ */ n("div", { ref: u, className: "rcs-emulator-flex-1 rcs-emulator-overflow-y-auto rcs-emulator-scrollbar", children: [
1217
1206
  /* @__PURE__ */ e(be, {}),
1218
- /* @__PURE__ */ e(Se, {})
1207
+ /* @__PURE__ */ e(je, {})
1219
1208
  ] }),
1220
- m && m.length > 0 && /* @__PURE__ */ e(We, { suggestions: m }),
1221
- /* @__PURE__ */ l(
1209
+ f && f.length > 0 && /* @__PURE__ */ e(We, { suggestions: f }),
1210
+ /* @__PURE__ */ n(
1222
1211
  "div",
1223
1212
  {
1224
- className: `
1225
- px-3 py-2 flex items-center gap-2
1226
- ${c ? "bg-zinc-900" : "bg-white"}
1227
- `,
1213
+ className: `rcs-emulator-input-area ${i}`,
1228
1214
  children: [
1229
1215
  /* @__PURE__ */ e(
1230
1216
  "button",
1231
1217
  {
1232
1218
  type: "button",
1233
- className: `
1234
- w-9 h-9 flex items-center justify-center rounded-full flex-shrink-0
1235
- border transition-colors
1236
- ${c ? "border-zinc-700 text-zinc-400 hover:bg-zinc-800" : "border-gray-300 text-gray-500 hover:bg-gray-100"}
1237
- `,
1219
+ className: `rcs-emulator-add-btn ${i}`,
1238
1220
  "aria-label": "Add attachment",
1239
1221
  children: /* @__PURE__ */ e(
1240
1222
  "svg",
1241
1223
  {
1242
- className: "w-5 h-5",
1224
+ className: "rcs-emulator-w-5 rcs-emulator-h-5",
1243
1225
  fill: "none",
1244
1226
  viewBox: "0 0 24 24",
1245
1227
  stroke: "currentColor",
@@ -1256,18 +1238,15 @@ const We = g(function({
1256
1238
  )
1257
1239
  }
1258
1240
  ),
1259
- /* @__PURE__ */ l(
1241
+ /* @__PURE__ */ n(
1260
1242
  "div",
1261
1243
  {
1262
- className: `
1263
- flex-1 flex items-center gap-2 px-4 py-2 rounded-full
1264
- ${c ? "bg-zinc-800" : "bg-gray-100"}
1265
- `,
1244
+ className: `rcs-emulator-input-container ${i}`,
1266
1245
  children: [
1267
1246
  /* @__PURE__ */ e(
1268
1247
  "span",
1269
1248
  {
1270
- className: `flex-1 text-sm ${c ? "text-zinc-500" : "text-gray-400"}`,
1249
+ className: `rcs-emulator-flex-1 rcs-emulator-text-sm ${m ? "rcs-emulator-text-zinc-500" : "rcs-emulator-text-gray-400"}`,
1271
1250
  children: "RCS message"
1272
1251
  }
1273
1252
  ),
@@ -1275,12 +1254,12 @@ const We = g(function({
1275
1254
  "button",
1276
1255
  {
1277
1256
  type: "button",
1278
- className: `p-1 ${c ? "text-zinc-500" : "text-gray-400"}`,
1257
+ className: `rcs-emulator-p-1 ${m ? "rcs-emulator-text-zinc-500" : "rcs-emulator-text-gray-400"}`,
1279
1258
  "aria-label": "Emoji",
1280
1259
  children: /* @__PURE__ */ e(
1281
1260
  "svg",
1282
1261
  {
1283
- className: "w-5 h-5",
1262
+ className: "rcs-emulator-w-5 rcs-emulator-h-5",
1284
1263
  fill: "none",
1285
1264
  viewBox: "0 0 24 24",
1286
1265
  stroke: "currentColor",
@@ -1301,12 +1280,12 @@ const We = g(function({
1301
1280
  "button",
1302
1281
  {
1303
1282
  type: "button",
1304
- className: `p-1 ${c ? "text-zinc-500" : "text-gray-400"}`,
1283
+ className: `rcs-emulator-p-1 ${m ? "rcs-emulator-text-zinc-500" : "rcs-emulator-text-gray-400"}`,
1305
1284
  "aria-label": "Attach image",
1306
1285
  children: /* @__PURE__ */ e(
1307
1286
  "svg",
1308
1287
  {
1309
- className: "w-5 h-5",
1288
+ className: "rcs-emulator-w-5 rcs-emulator-h-5",
1310
1289
  fill: "none",
1311
1290
  viewBox: "0 0 24 24",
1312
1291
  stroke: "currentColor",
@@ -1330,9 +1309,9 @@ const We = g(function({
1330
1309
  "button",
1331
1310
  {
1332
1311
  type: "button",
1333
- className: "w-10 h-10 flex items-center justify-center rounded-full bg-green-100 text-green-600 flex-shrink-0",
1312
+ className: "rcs-emulator-voice-btn",
1334
1313
  "aria-label": "Voice message",
1335
- children: /* @__PURE__ */ e("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e("path", { d: "M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3zm-1 1.93c-3.94-.49-7-3.85-7-7.93h2c0 3.31 2.69 6 6 6s6-2.69 6-6h2c0 4.08-3.06 7.44-7 7.93V20h4v2H8v-2h4v-4.07z" }) })
1314
+ children: /* @__PURE__ */ e("svg", { className: "rcs-emulator-w-5 rcs-emulator-h-5", fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e("path", { d: "M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3zm-1 1.93c-3.94-.49-7-3.85-7-7.93h2c0 3.31 2.69 6 6 6s6-2.69 6-6h2c0 4.08-3.06 7.44-7 7.93V20h4v2H8v-2h4v-4.07z" }) })
1336
1315
  }
1337
1316
  )
1338
1317
  ]
@@ -1341,37 +1320,28 @@ const We = g(function({
1341
1320
  ]
1342
1321
  }
1343
1322
  );
1344
- }), He = g(function() {
1345
- const { theme: t, businessInfo: n, toggleProfile: o } = N(), [s, a] = z("info"), i = t === "dark", u = n.bannerImage || "https://images.unsplash.com/photo-1436491865332-7a61a109cc05?w=800&q=80", c = n.brandColor || "#0084ff";
1346
- return /* @__PURE__ */ l(
1323
+ }), He = p(function() {
1324
+ const { theme: r, businessInfo: t, toggleProfile: o } = k(), [a, l] = A("info"), c = r === "dark", u = t.bannerImage || "https://images.unsplash.com/photo-1436491865332-7a61a109cc05?w=800&q=80", m = t.brandColor || "#0084ff";
1325
+ return /* @__PURE__ */ n(
1347
1326
  "div",
1348
1327
  {
1349
- className: `
1350
- absolute inset-0 z-50 flex flex-col
1351
- ${i ? "bg-zinc-950" : "bg-white"}
1352
- `,
1328
+ className: `rcs-emulator-absolute rcs-emulator-inset-0 rcs-emulator-z-50 rcs-emulator-flex rcs-emulator-flex-col ${c ? "rcs-emulator-bg-zinc-950" : "rcs-emulator-bg-white"}`,
1353
1329
  children: [
1354
- /* @__PURE__ */ l(
1330
+ /* @__PURE__ */ n(
1355
1331
  "header",
1356
1332
  {
1357
- className: `
1358
- flex items-center gap-3 px-4 py-3 border-b
1359
- ${i ? "bg-zinc-900 border-zinc-800" : "bg-white border-gray-200"}
1360
- `,
1333
+ className: `rcs-emulator-flex rcs-emulator-items-center rcs-emulator-gap-3 rcs-emulator-px-4 rcs-emulator-py-3 rcs-emulator-border-b ${c ? "rcs-emulator-bg-zinc-900 rcs-emulator-border-zinc-800" : "rcs-emulator-bg-white rcs-emulator-border-gray-200"}`,
1361
1334
  children: [
1362
1335
  /* @__PURE__ */ e(
1363
1336
  "button",
1364
1337
  {
1365
1338
  onClick: o,
1366
- className: `
1367
- p-1.5 -ml-1.5 rounded-full transition-colors
1368
- ${i ? "hover:bg-zinc-800 text-white" : "hover:bg-gray-100 text-gray-900"}
1369
- `,
1339
+ className: `rcs-emulator-p-1-5 rcs-emulator--ml-1-5 rcs-emulator-rounded-full rcs-emulator-transition-colors ${c ? "rcs-emulator-hover-bg-zinc-800 rcs-emulator-text-white" : "rcs-emulator-hover-bg-gray-100 rcs-emulator-text-gray-900"}`,
1370
1340
  "aria-label": "Go back",
1371
1341
  children: /* @__PURE__ */ e(
1372
1342
  "svg",
1373
1343
  {
1374
- className: "w-5 h-5",
1344
+ className: "rcs-emulator-w-5 rcs-emulator-h-5",
1375
1345
  fill: "none",
1376
1346
  viewBox: "0 0 24 24",
1377
1347
  stroke: "currentColor",
@@ -1391,158 +1361,147 @@ const We = g(function({
1391
1361
  /* @__PURE__ */ e(
1392
1362
  "span",
1393
1363
  {
1394
- className: `text-base font-medium ${i ? "text-white" : "text-gray-900"}`,
1364
+ className: `rcs-emulator-text-base rcs-emulator-font-medium ${c ? "rcs-emulator-text-white" : "rcs-emulator-text-gray-900"}`,
1395
1365
  children: "Info & options"
1396
1366
  }
1397
1367
  )
1398
1368
  ]
1399
1369
  }
1400
1370
  ),
1401
- /* @__PURE__ */ l("div", { className: "flex-1 overflow-y-auto", children: [
1402
- /* @__PURE__ */ e("div", { className: "relative h-40 bg-gray-200", children: /* @__PURE__ */ e(
1371
+ /* @__PURE__ */ n("div", { className: "rcs-emulator-flex-1 rcs-emulator-overflow-y-auto", children: [
1372
+ /* @__PURE__ */ e("div", { className: "rcs-emulator-relative rcs-emulator-h-40 rcs-emulator-bg-gray-200", children: /* @__PURE__ */ e(
1403
1373
  "img",
1404
1374
  {
1405
1375
  src: u,
1406
1376
  alt: "Business banner",
1407
- className: "w-full h-full object-cover"
1377
+ className: "rcs-emulator-w-full rcs-emulator-h-full rcs-emulator-object-cover"
1408
1378
  }
1409
1379
  ) }),
1410
- /* @__PURE__ */ e("div", { className: "relative px-4", children: /* @__PURE__ */ e(
1380
+ /* @__PURE__ */ e("div", { className: "rcs-emulator-relative rcs-emulator-px-4", children: /* @__PURE__ */ e(
1411
1381
  "div",
1412
1382
  {
1413
- className: `
1414
- absolute -top-10 left-1/2 -translate-x-1/2
1415
- w-20 h-20 rounded-full overflow-hidden border-4
1416
- ${i ? "border-zinc-950 bg-zinc-800" : "border-white bg-gray-100"}
1417
- shadow-lg
1418
- `,
1419
- children: n.logo ? /* @__PURE__ */ e(
1383
+ className: `rcs-emulator-absolute rcs-emulator--top-10 rcs-emulator-left-1-2 rcs-emulator--translate-x-1-2 rcs-emulator-w-20 rcs-emulator-h-20 rcs-emulator-rounded-full rcs-emulator-overflow-hidden rcs-emulator-border-4 ${c ? "rcs-emulator-border-zinc-950 rcs-emulator-bg-zinc-800" : "rcs-emulator-border-white rcs-emulator-bg-gray-100"} rcs-emulator-shadow-lg`,
1384
+ children: t.logo ? /* @__PURE__ */ e(
1420
1385
  "img",
1421
1386
  {
1422
- src: n.logo,
1423
- alt: `${n.name} logo`,
1424
- className: "w-full h-full object-cover"
1387
+ src: t.logo,
1388
+ alt: `${t.name} logo`,
1389
+ className: "rcs-emulator-w-full rcs-emulator-h-full rcs-emulator-object-cover"
1425
1390
  }
1426
1391
  ) : /* @__PURE__ */ e(
1427
1392
  "div",
1428
1393
  {
1429
- className: "w-full h-full flex items-center justify-center text-2xl font-bold text-white",
1430
- style: { backgroundColor: c },
1431
- children: n.name.charAt(0).toUpperCase()
1394
+ className: "rcs-emulator-w-full rcs-emulator-h-full rcs-emulator-flex rcs-emulator-items-center rcs-emulator-justify-center rcs-emulator-text-2xl rcs-emulator-font-bold rcs-emulator-text-white",
1395
+ style: { backgroundColor: m },
1396
+ children: t.name.charAt(0).toUpperCase()
1432
1397
  }
1433
1398
  )
1434
1399
  }
1435
1400
  ) }),
1436
- /* @__PURE__ */ l("div", { className: "pt-12 pb-4 px-4 text-center", children: [
1401
+ /* @__PURE__ */ n("div", { className: "rcs-emulator-pt-12 rcs-emulator-pb-4 rcs-emulator-px-4 rcs-emulator-text-center", children: [
1437
1402
  /* @__PURE__ */ e(
1438
1403
  "h1",
1439
1404
  {
1440
- className: `text-xl font-semibold ${i ? "text-white" : "text-gray-900"}`,
1441
- children: n.name
1405
+ className: `rcs-emulator-text-xl rcs-emulator-font-semibold ${c ? "rcs-emulator-text-white" : "rcs-emulator-text-gray-900"}`,
1406
+ children: t.name
1442
1407
  }
1443
1408
  ),
1444
- n.description && /* @__PURE__ */ e("p", { className: `text-sm mt-1 ${i ? "text-zinc-400" : "text-gray-500"}`, children: n.description })
1409
+ t.description && /* @__PURE__ */ e("p", { className: `rcs-emulator-text-sm rcs-emulator-mt-1 ${c ? "rcs-emulator-text-zinc-400" : "rcs-emulator-text-gray-500"}`, children: t.description })
1445
1410
  ] }),
1446
- /* @__PURE__ */ l("div", { className: "flex justify-center gap-4 px-4 pb-4", children: [
1447
- n.phoneNumbers && n.phoneNumbers.length > 0 && /* @__PURE__ */ e(
1411
+ /* @__PURE__ */ n("div", { className: "rcs-emulator-flex rcs-emulator-justify-center rcs-emulator-gap-4 rcs-emulator-px-4 rcs-emulator-pb-4", children: [
1412
+ t.phoneNumbers && t.phoneNumbers.length > 0 && /* @__PURE__ */ e(
1448
1413
  _,
1449
1414
  {
1450
1415
  icon: "phone",
1451
1416
  label: "Call",
1452
- isDark: i,
1453
- brandColor: c,
1417
+ isDark: c,
1418
+ brandColor: m,
1454
1419
  onClick: () => {
1455
- const d = n.phoneNumbers?.[0]?.number;
1456
- d && (window.location.href = `tel:${d}`);
1420
+ const i = t.phoneNumbers?.[0]?.number;
1421
+ i && (window.location.href = `tel:${i}`);
1457
1422
  }
1458
1423
  }
1459
1424
  ),
1460
- n.websites && n.websites.length > 0 && /* @__PURE__ */ e(
1425
+ t.websites && t.websites.length > 0 && /* @__PURE__ */ e(
1461
1426
  _,
1462
1427
  {
1463
1428
  icon: "globe",
1464
1429
  label: "Website",
1465
- isDark: i,
1466
- brandColor: c,
1430
+ isDark: c,
1431
+ brandColor: m,
1467
1432
  onClick: () => {
1468
- const d = n.websites?.[0]?.url;
1469
- d && window.open(d, "_blank", "noopener,noreferrer");
1433
+ const i = t.websites?.[0]?.url;
1434
+ i && window.open(i, "_blank", "noopener,noreferrer");
1470
1435
  }
1471
1436
  }
1472
1437
  ),
1473
- n.emails && n.emails.length > 0 && /* @__PURE__ */ e(
1438
+ t.emails && t.emails.length > 0 && /* @__PURE__ */ e(
1474
1439
  _,
1475
1440
  {
1476
1441
  icon: "mail",
1477
1442
  label: "Contact",
1478
- isDark: i,
1479
- brandColor: c,
1443
+ isDark: c,
1444
+ brandColor: m,
1480
1445
  onClick: () => {
1481
- const d = n.emails?.[0]?.email;
1482
- d && (window.location.href = `mailto:${d}`);
1446
+ const i = t.emails?.[0]?.email;
1447
+ i && (window.location.href = `mailto:${i}`);
1483
1448
  }
1484
1449
  }
1485
1450
  )
1486
1451
  ] }),
1487
- /* @__PURE__ */ l(
1452
+ /* @__PURE__ */ n(
1488
1453
  "div",
1489
1454
  {
1490
- className: `
1491
- flex mx-4 rounded-lg overflow-hidden border
1492
- ${i ? "border-zinc-700 bg-zinc-800" : "border-gray-200 bg-gray-100"}
1493
- `,
1455
+ className: `rcs-emulator-tabs-container rcs-emulator-flex rcs-emulator-mx-4 rcs-emulator-rounded-lg rcs-emulator-overflow-hidden rcs-emulator-border ${c ? "rcs-emulator-border-zinc-700 rcs-emulator-bg-zinc-800" : "rcs-emulator-border-gray-200 rcs-emulator-bg-gray-100"}`,
1494
1456
  children: [
1495
1457
  /* @__PURE__ */ e(
1496
1458
  F,
1497
1459
  {
1498
- active: s === "info",
1499
- onClick: () => a("info"),
1500
- isDark: i,
1501
- brandColor: c,
1460
+ active: a === "info",
1461
+ onClick: () => l("info"),
1462
+ isDark: c,
1463
+ brandColor: m,
1502
1464
  children: "Info"
1503
1465
  }
1504
1466
  ),
1505
1467
  /* @__PURE__ */ e(
1506
1468
  F,
1507
1469
  {
1508
- active: s === "options",
1509
- onClick: () => a("options"),
1510
- isDark: i,
1511
- brandColor: c,
1470
+ active: a === "options",
1471
+ onClick: () => l("options"),
1472
+ isDark: c,
1473
+ brandColor: m,
1512
1474
  children: "Options"
1513
1475
  }
1514
1476
  )
1515
1477
  ]
1516
1478
  }
1517
1479
  ),
1518
- /* @__PURE__ */ e("div", { className: "p-4", children: s === "info" ? /* @__PURE__ */ e(_e, { isDark: i, brandColor: c }) : /* @__PURE__ */ e(Ue, { isDark: i }) })
1480
+ /* @__PURE__ */ e("div", { className: "rcs-emulator-p-4", children: a === "info" ? /* @__PURE__ */ e(_e, { isDark: c, brandColor: m }) : /* @__PURE__ */ e(Ue, { isDark: c }) })
1519
1481
  ] })
1520
1482
  ]
1521
1483
  }
1522
1484
  );
1523
- }), _ = g(function({
1524
- icon: t,
1525
- label: n,
1485
+ }), _ = p(function({
1486
+ icon: r,
1487
+ label: t,
1526
1488
  isDark: o,
1527
- brandColor: s,
1528
- onClick: a
1489
+ brandColor: a,
1490
+ onClick: l
1529
1491
  }) {
1530
- return /* @__PURE__ */ l(
1492
+ return /* @__PURE__ */ n(
1531
1493
  "button",
1532
1494
  {
1533
- onClick: a,
1534
- className: `
1535
- flex flex-col items-center gap-2 px-6 py-3 rounded-xl border transition-colors
1536
- ${o ? "bg-zinc-800 border-zinc-700 hover:bg-zinc-700" : "bg-white border-gray-200 hover:bg-gray-50"}
1537
- `,
1495
+ onClick: l,
1496
+ className: `rcs-emulator-quick-action-btn rcs-emulator-flex rcs-emulator-flex-col rcs-emulator-items-center rcs-emulator-gap-2 rcs-emulator-px-6 rcs-emulator-py-3 rcs-emulator-rounded-xl rcs-emulator-border rcs-emulator-transition-colors ${o ? "rcs-emulator-dark" : "rcs-emulator-light"}`,
1538
1497
  children: [
1539
1498
  /* @__PURE__ */ e(
1540
1499
  "svg",
1541
1500
  {
1542
- className: "w-6 h-6",
1501
+ className: "rcs-emulator-w-6 rcs-emulator-h-6",
1543
1502
  fill: "none",
1544
1503
  viewBox: "0 0 24 24",
1545
- stroke: s,
1504
+ stroke: a,
1546
1505
  children: {
1547
1506
  phone: /* @__PURE__ */ e(
1548
1507
  "path",
@@ -1571,113 +1530,104 @@ const We = g(function({
1571
1530
  d: "M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"
1572
1531
  }
1573
1532
  )
1574
- }[t]
1533
+ }[r]
1575
1534
  }
1576
1535
  ),
1577
1536
  /* @__PURE__ */ e(
1578
1537
  "span",
1579
1538
  {
1580
- className: `text-xs font-medium ${o ? "text-zinc-300" : "text-gray-600"}`,
1581
- children: n
1539
+ className: `rcs-emulator-text-xs rcs-emulator-font-medium ${o ? "rcs-emulator-text-zinc-300" : "rcs-emulator-text-gray-600"}`,
1540
+ children: t
1582
1541
  }
1583
1542
  )
1584
1543
  ]
1585
1544
  }
1586
1545
  );
1587
- }), F = g(function({
1588
- active: t,
1589
- onClick: n,
1546
+ }), F = p(function({
1547
+ active: r,
1548
+ onClick: t,
1590
1549
  isDark: o,
1591
- brandColor: s,
1592
- children: a
1550
+ brandColor: a,
1551
+ children: l
1593
1552
  }) {
1594
1553
  return /* @__PURE__ */ e(
1595
1554
  "button",
1596
1555
  {
1597
- onClick: n,
1598
- className: `
1599
- flex-1 py-2.5 text-sm font-medium transition-colors rounded-lg
1600
- ${t ? "text-white" : o ? "text-zinc-400 hover:text-zinc-200" : "text-gray-500 hover:text-gray-700"}
1601
- `,
1602
- style: t ? { backgroundColor: s } : void 0,
1603
- children: a
1556
+ onClick: t,
1557
+ className: `rcs-emulator-tab-btn rcs-emulator-flex-1 rcs-emulator-py-2-5 rcs-emulator-text-sm rcs-emulator-font-medium rcs-emulator-transition-colors rcs-emulator-rounded-lg ${r ? "rcs-emulator-active" : `rcs-emulator-inactive ${o ? "rcs-emulator-dark" : "rcs-emulator-light"}`}`,
1558
+ style: r ? { backgroundColor: a } : void 0,
1559
+ children: l
1604
1560
  }
1605
1561
  );
1606
- }), _e = g(function({ isDark: t, brandColor: n }) {
1607
- const { businessInfo: o } = N();
1608
- return o.phoneNumbers && o.phoneNumbers.length > 0 || o.websites && o.websites.length > 0 || o.emails && o.emails.length > 0 ? /* @__PURE__ */ l(
1562
+ }), _e = p(function({ isDark: r, brandColor: t }) {
1563
+ const { businessInfo: o } = k();
1564
+ return o.phoneNumbers && o.phoneNumbers.length > 0 || o.websites && o.websites.length > 0 || o.emails && o.emails.length > 0 ? /* @__PURE__ */ n(
1609
1565
  "div",
1610
1566
  {
1611
- className: `
1612
- rounded-xl overflow-hidden border divide-y
1613
- ${t ? "bg-zinc-900 border-zinc-800 divide-zinc-800" : "bg-gray-50 border-gray-200 divide-gray-200"}
1614
- `,
1567
+ className: `rcs-emulator-profile-section rcs-emulator-rounded-xl rcs-emulator-overflow-hidden rcs-emulator-border rcs-emulator-divide-y ${r ? "rcs-emulator-dark rcs-emulator-divide-zinc-800" : "rcs-emulator-light rcs-emulator-divide-gray-200"}`,
1615
1568
  children: [
1616
- o.phoneNumbers?.map((a, i) => /* @__PURE__ */ e(
1569
+ o.phoneNumbers?.map((l, c) => /* @__PURE__ */ e(
1617
1570
  U,
1618
1571
  {
1619
1572
  icon: "phone",
1620
- primary: a.number,
1621
- secondary: a.label,
1622
- isDark: t,
1623
- brandColor: n,
1624
- onClick: () => window.location.href = `tel:${a.number}`
1573
+ primary: l.number,
1574
+ secondary: l.label,
1575
+ isDark: r,
1576
+ brandColor: t,
1577
+ onClick: () => window.location.href = `tel:${l.number}`
1625
1578
  },
1626
- `phone-${i}`
1579
+ `phone-${c}`
1627
1580
  )),
1628
- o.websites?.map((a, i) => /* @__PURE__ */ e(
1581
+ o.websites?.map((l, c) => /* @__PURE__ */ e(
1629
1582
  U,
1630
1583
  {
1631
1584
  icon: "globe",
1632
- primary: a.url.replace(/^https?:\/\//, ""),
1633
- secondary: a.label || "Website",
1634
- isDark: t,
1635
- brandColor: n,
1636
- onClick: () => window.open(a.url, "_blank", "noopener,noreferrer")
1585
+ primary: l.url.replace(/^https?:\/\//, ""),
1586
+ secondary: l.label || "Website",
1587
+ isDark: r,
1588
+ brandColor: t,
1589
+ onClick: () => window.open(l.url, "_blank", "noopener,noreferrer")
1637
1590
  },
1638
- `web-${i}`
1591
+ `web-${c}`
1639
1592
  )),
1640
- o.emails?.map((a, i) => /* @__PURE__ */ e(
1593
+ o.emails?.map((l, c) => /* @__PURE__ */ e(
1641
1594
  U,
1642
1595
  {
1643
1596
  icon: "mail",
1644
- primary: a.email,
1645
- secondary: a.label || "Email",
1646
- isDark: t,
1647
- brandColor: n,
1648
- onClick: () => window.location.href = `mailto:${a.email}`
1597
+ primary: l.email,
1598
+ secondary: l.label || "Email",
1599
+ isDark: r,
1600
+ brandColor: t,
1601
+ onClick: () => window.location.href = `mailto:${l.email}`
1649
1602
  },
1650
- `email-${i}`
1603
+ `email-${c}`
1651
1604
  ))
1652
1605
  ]
1653
1606
  }
1654
1607
  ) : /* @__PURE__ */ e(
1655
1608
  "div",
1656
1609
  {
1657
- className: `text-center py-8 ${t ? "text-zinc-500" : "text-gray-400"}`,
1610
+ className: `rcs-emulator-text-center rcs-emulator-py-8 ${r ? "rcs-emulator-text-zinc-500" : "rcs-emulator-text-gray-400"}`,
1658
1611
  children: "No contact information available"
1659
1612
  }
1660
1613
  );
1661
- }), U = g(function({
1662
- icon: t,
1663
- primary: n,
1614
+ }), U = p(function({
1615
+ icon: r,
1616
+ primary: t,
1664
1617
  secondary: o,
1665
- isDark: s,
1666
- onClick: a
1618
+ isDark: a,
1619
+ onClick: l
1667
1620
  }) {
1668
- return /* @__PURE__ */ l(
1621
+ return /* @__PURE__ */ n(
1669
1622
  "button",
1670
1623
  {
1671
- onClick: a,
1672
- className: `
1673
- w-full flex items-center gap-4 px-4 py-3.5 text-left transition-colors
1674
- ${s ? "hover:bg-zinc-800" : "hover:bg-gray-100"}
1675
- `,
1624
+ onClick: l,
1625
+ className: `rcs-emulator-list-item rcs-emulator-w-full rcs-emulator-flex rcs-emulator-items-center rcs-emulator-gap-4 rcs-emulator-px-4 rcs-emulator-py-3-5 rcs-emulator-text-left rcs-emulator-transition-colors ${a ? "rcs-emulator-dark" : "rcs-emulator-light"}`,
1676
1626
  children: [
1677
1627
  /* @__PURE__ */ e(
1678
1628
  "svg",
1679
1629
  {
1680
- className: `w-5 h-5 flex-shrink-0 ${s ? "text-zinc-500" : "text-gray-400"}`,
1630
+ className: `rcs-emulator-w-5 rcs-emulator-h-5 rcs-emulator-flex-shrink-0 ${a ? "rcs-emulator-text-zinc-500" : "rcs-emulator-text-gray-400"}`,
1681
1631
  fill: "none",
1682
1632
  viewBox: "0 0 24 24",
1683
1633
  stroke: "currentColor",
@@ -1691,23 +1641,23 @@ const We = g(function({
1691
1641
  phone: "M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z",
1692
1642
  globe: "M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9",
1693
1643
  mail: "M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"
1694
- }[t]
1644
+ }[r]
1695
1645
  }
1696
1646
  )
1697
1647
  }
1698
1648
  ),
1699
- /* @__PURE__ */ l("div", { className: "flex-1 min-w-0", children: [
1649
+ /* @__PURE__ */ n("div", { className: "rcs-emulator-flex-1 rcs-emulator-min-w-0", children: [
1700
1650
  /* @__PURE__ */ e(
1701
1651
  "p",
1702
1652
  {
1703
- className: `text-sm font-medium truncate ${s ? "text-white" : "text-gray-900"}`,
1704
- children: n
1653
+ className: `rcs-emulator-text-sm rcs-emulator-font-medium rcs-emulator-truncate ${a ? "rcs-emulator-text-white" : "rcs-emulator-text-gray-900"}`,
1654
+ children: t
1705
1655
  }
1706
1656
  ),
1707
1657
  o && /* @__PURE__ */ e(
1708
1658
  "p",
1709
1659
  {
1710
- className: `text-xs truncate ${s ? "text-zinc-500" : "text-gray-500"}`,
1660
+ className: `rcs-emulator-text-xs rcs-emulator-truncate ${a ? "rcs-emulator-text-zinc-500" : "rcs-emulator-text-gray-500"}`,
1711
1661
  children: o
1712
1662
  }
1713
1663
  )
@@ -1715,21 +1665,18 @@ const We = g(function({
1715
1665
  ]
1716
1666
  }
1717
1667
  );
1718
- }), Ue = g(function({ isDark: t }) {
1719
- return /* @__PURE__ */ l(
1668
+ }), Ue = p(function({ isDark: r }) {
1669
+ return /* @__PURE__ */ n(
1720
1670
  "div",
1721
1671
  {
1722
- className: `
1723
- rounded-xl overflow-hidden border divide-y
1724
- ${t ? "bg-zinc-900 border-zinc-800 divide-zinc-800" : "bg-gray-50 border-gray-200 divide-gray-200"}
1725
- `,
1672
+ className: `rcs-emulator-profile-section rcs-emulator-rounded-xl rcs-emulator-overflow-hidden rcs-emulator-border rcs-emulator-divide-y ${r ? "rcs-emulator-dark rcs-emulator-divide-zinc-800" : "rcs-emulator-light rcs-emulator-divide-gray-200"}`,
1726
1673
  children: [
1727
1674
  /* @__PURE__ */ e(
1728
1675
  D,
1729
1676
  {
1730
1677
  icon: "bell",
1731
1678
  label: "Notifications",
1732
- isDark: t
1679
+ isDark: r
1733
1680
  }
1734
1681
  ),
1735
1682
  /* @__PURE__ */ e(
@@ -1737,7 +1684,7 @@ const We = g(function({
1737
1684
  {
1738
1685
  icon: "block",
1739
1686
  label: "Block & report spam",
1740
- isDark: t
1687
+ isDark: r
1741
1688
  }
1742
1689
  ),
1743
1690
  /* @__PURE__ */ e(
@@ -1745,29 +1692,26 @@ const We = g(function({
1745
1692
  {
1746
1693
  icon: "info",
1747
1694
  label: "About RCS",
1748
- isDark: t
1695
+ isDark: r
1749
1696
  }
1750
1697
  )
1751
1698
  ]
1752
1699
  }
1753
1700
  );
1754
- }), D = g(function({
1755
- icon: t,
1756
- label: n,
1701
+ }), D = p(function({
1702
+ icon: r,
1703
+ label: t,
1757
1704
  isDark: o
1758
1705
  }) {
1759
- return /* @__PURE__ */ l(
1706
+ return /* @__PURE__ */ n(
1760
1707
  "button",
1761
1708
  {
1762
- className: `
1763
- w-full flex items-center gap-4 px-4 py-3.5 text-left transition-colors
1764
- ${o ? "hover:bg-zinc-800" : "hover:bg-gray-100"}
1765
- `,
1709
+ className: `rcs-emulator-list-item rcs-emulator-w-full rcs-emulator-flex rcs-emulator-items-center rcs-emulator-gap-4 rcs-emulator-px-4 rcs-emulator-py-3-5 rcs-emulator-text-left rcs-emulator-transition-colors ${o ? "rcs-emulator-dark" : "rcs-emulator-light"}`,
1766
1710
  children: [
1767
1711
  /* @__PURE__ */ e(
1768
1712
  "svg",
1769
1713
  {
1770
- className: `w-5 h-5 flex-shrink-0 ${o ? "text-zinc-500" : "text-gray-400"}`,
1714
+ className: `rcs-emulator-w-5 rcs-emulator-h-5 rcs-emulator-flex-shrink-0 ${o ? "rcs-emulator-text-zinc-500" : "rcs-emulator-text-gray-400"}`,
1771
1715
  fill: "none",
1772
1716
  viewBox: "0 0 24 24",
1773
1717
  stroke: "currentColor",
@@ -1781,7 +1725,7 @@ const We = g(function({
1781
1725
  bell: "M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",
1782
1726
  block: "M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636",
1783
1727
  info: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
1784
- }[t]
1728
+ }[r]
1785
1729
  }
1786
1730
  )
1787
1731
  }
@@ -1789,97 +1733,80 @@ const We = g(function({
1789
1733
  /* @__PURE__ */ e(
1790
1734
  "span",
1791
1735
  {
1792
- className: `text-sm font-medium ${o ? "text-white" : "text-gray-900"}`,
1793
- children: n
1736
+ className: `rcs-emulator-text-sm rcs-emulator-font-medium ${o ? "rcs-emulator-text-white" : "rcs-emulator-text-gray-900"}`,
1737
+ children: t
1794
1738
  }
1795
1739
  )
1796
1740
  ]
1797
1741
  }
1798
1742
  );
1799
- }), J = {
1800
- FULL: "h-full",
1801
- TALL: "h-[80%]",
1802
- HALF: "h-[50%]"
1803
- }, De = g(function() {
1804
- const { theme: t, businessInfo: n, webView: o, closeWebView: s } = N(), [a, i] = z(!0), [u, c] = z(!1), d = t === "dark", m = n.brandColor || "#0084ff";
1805
- S(() => {
1806
- o?.url && (i(!0), c(!1));
1743
+ }), q = {
1744
+ FULL: "rcs-emulator-webview-full",
1745
+ TALL: "rcs-emulator-webview-tall",
1746
+ HALF: "rcs-emulator-webview-half"
1747
+ }, De = p(function() {
1748
+ const { theme: r, businessInfo: t, webView: o, closeWebView: a } = k(), [l, c] = A(!0), [u, m] = A(!1), i = r === "dark", h = t.brandColor || "#0084ff";
1749
+ E(() => {
1750
+ o?.url && (c(!0), m(!1));
1807
1751
  }, [o?.url]);
1808
- const f = M(() => {
1809
- i(!1);
1810
- }, []), v = M(() => {
1811
- i(!1), c(!0);
1812
- }, []), x = (k) => {
1752
+ const f = $(() => {
1753
+ c(!1);
1754
+ }, []), w = $(() => {
1755
+ c(!1), m(!0);
1756
+ }, []), b = (C) => {
1813
1757
  try {
1814
- return new URL(k).hostname;
1758
+ return new URL(C).hostname;
1815
1759
  } catch {
1816
1760
  return "Web Page";
1817
1761
  }
1818
1762
  };
1819
1763
  if (!o || !o.isOpen) return null;
1820
- const { url: L, viewMode: b, title: p, postbackData: y } = o, h = p || x(L), w = b === "FULL", C = b === "TALL" || b === "HALF", I = J[b] || J.TALL;
1821
- return /* @__PURE__ */ l(
1764
+ const { url: N, viewMode: v, title: y, postbackData: g } = o, d = y || b(N), x = v === "FULL", L = v === "TALL" || v === "HALF", I = q[v] || q.TALL;
1765
+ return /* @__PURE__ */ n(
1822
1766
  "div",
1823
1767
  {
1824
- className: `
1825
- rcs-webview-overlay absolute inset-0 z-50 flex flex-col
1826
- ${w ? "" : "justify-end"}
1827
- ${d ? "bg-black/60" : "bg-black/40"}
1828
- `,
1768
+ className: `rcs-emulator-webview-overlay ${x ? "rcs-emulator-webview-full" : "rcs-emulator-webview-bottom-sheet"} rcs-emulator-absolute rcs-emulator-inset-0 rcs-emulator-z-50 rcs-emulator-flex rcs-emulator-flex-col ${x ? "" : "rcs-emulator-justify-end"} ${i ? "rcs-emulator-bg-black-60" : "rcs-emulator-bg-black-40"}`,
1829
1769
  role: "dialog",
1830
1770
  "aria-modal": "true",
1831
- "aria-label": `WebView: ${h}`,
1832
- "data-postback": y,
1833
- "data-view-mode": b,
1771
+ "aria-label": `WebView: ${d}`,
1772
+ "data-postback": g,
1773
+ "data-view-mode": v,
1834
1774
  children: [
1835
- C && /* @__PURE__ */ e(
1775
+ L && /* @__PURE__ */ e(
1836
1776
  "button",
1837
1777
  {
1838
1778
  type: "button",
1839
- className: "absolute inset-0 w-full h-full cursor-default",
1840
- onClick: s,
1779
+ className: "rcs-emulator-absolute rcs-emulator-inset-0 rcs-emulator-w-full rcs-emulator-h-full rcs-emulator-cursor-default",
1780
+ onClick: a,
1841
1781
  "aria-label": "Close WebView"
1842
1782
  }
1843
1783
  ),
1844
- /* @__PURE__ */ l(
1784
+ /* @__PURE__ */ n(
1845
1785
  "div",
1846
1786
  {
1847
- className: `
1848
- rcs-webview-container relative flex flex-col overflow-hidden
1849
- ${d ? "bg-zinc-900" : "bg-white"}
1850
- ${I} w-full
1851
- ${C ? "rounded-t-2xl shadow-2xl" : ""}
1852
- `,
1787
+ className: `rcs-emulator-relative rcs-emulator-flex rcs-emulator-flex-col rcs-emulator-overflow-hidden ${i ? "rcs-emulator-bg-zinc-900" : "rcs-emulator-bg-white"} ${I} rcs-emulator-w-full ${L ? "rcs-emulator-rounded-t-2xl rcs-emulator-shadow-2xl" : ""}`,
1853
1788
  style: {
1854
1789
  // Ensure container is above backdrop
1855
1790
  position: "relative",
1856
1791
  zIndex: 1
1857
1792
  },
1858
1793
  children: [
1859
- /* @__PURE__ */ l(
1794
+ /* @__PURE__ */ n(
1860
1795
  "header",
1861
1796
  {
1862
- className: `
1863
- rcs-webview-header flex items-center gap-3 px-2 py-2 flex-shrink-0
1864
- border-b
1865
- ${d ? "bg-zinc-900 border-zinc-800" : "bg-white border-gray-200"}
1866
- `,
1797
+ className: `rcs-emulator-flex rcs-emulator-items-center rcs-emulator-gap-3 rcs-emulator-px-2 rcs-emulator-py-2 rcs-emulator-flex-shrink-0 rcs-emulator-border-b ${i ? "rcs-emulator-bg-zinc-900 rcs-emulator-border-zinc-800" : "rcs-emulator-bg-white rcs-emulator-border-gray-200"}`,
1867
1798
  children: [
1868
1799
  /* @__PURE__ */ e(
1869
1800
  "button",
1870
1801
  {
1871
1802
  type: "button",
1872
- onClick: s,
1873
- className: `
1874
- rcs-webview-close w-10 h-10 rounded-full flex items-center justify-center
1875
- transition-colors
1876
- ${d ? "text-white hover:bg-zinc-800" : "text-gray-700 hover:bg-gray-100"}
1877
- `,
1803
+ onClick: a,
1804
+ className: `rcs-emulator-w-10 rcs-emulator-h-10 rcs-emulator-rounded-full rcs-emulator-flex rcs-emulator-items-center rcs-emulator-justify-center rcs-emulator-transition-colors ${i ? "rcs-emulator-text-white rcs-emulator-hover-bg-zinc-800" : "rcs-emulator-text-gray-700 rcs-emulator-hover-bg-gray-100"}`,
1878
1805
  "aria-label": "Close WebView",
1879
1806
  children: /* @__PURE__ */ e(
1880
1807
  "svg",
1881
1808
  {
1882
- className: "w-6 h-6",
1809
+ className: "rcs-emulator-w-6 rcs-emulator-h-6",
1883
1810
  fill: "none",
1884
1811
  viewBox: "0 0 24 24",
1885
1812
  stroke: "currentColor",
@@ -1896,25 +1823,19 @@ const We = g(function({
1896
1823
  )
1897
1824
  }
1898
1825
  ),
1899
- /* @__PURE__ */ l("div", { className: "flex-1 min-w-0", children: [
1826
+ /* @__PURE__ */ n("div", { className: "rcs-emulator-flex-1 rcs-emulator-min-w-0", children: [
1900
1827
  /* @__PURE__ */ e(
1901
1828
  "h2",
1902
1829
  {
1903
- className: `
1904
- rcs-webview-title text-base font-medium truncate
1905
- ${d ? "text-white" : "text-gray-900"}
1906
- `,
1907
- children: h
1830
+ className: `rcs-emulator-text-base rcs-emulator-font-medium rcs-emulator-truncate ${i ? "rcs-emulator-text-white" : "rcs-emulator-text-gray-900"}`,
1831
+ children: d
1908
1832
  }
1909
1833
  ),
1910
1834
  /* @__PURE__ */ e(
1911
1835
  "p",
1912
1836
  {
1913
- className: `
1914
- rcs-webview-url text-xs truncate
1915
- ${d ? "text-zinc-400" : "text-gray-500"}
1916
- `,
1917
- children: x(L)
1837
+ className: `rcs-emulator-text-xs rcs-emulator-truncate ${i ? "rcs-emulator-text-zinc-400" : "rcs-emulator-text-gray-500"}`,
1838
+ children: b(N)
1918
1839
  }
1919
1840
  )
1920
1841
  ] }),
@@ -1922,15 +1843,12 @@ const We = g(function({
1922
1843
  "button",
1923
1844
  {
1924
1845
  type: "button",
1925
- className: `
1926
- w-10 h-10 rounded-full flex items-center justify-center
1927
- ${d ? "text-zinc-400 hover:bg-zinc-800" : "text-gray-500 hover:bg-gray-100"}
1928
- `,
1846
+ className: `rcs-emulator-w-10 rcs-emulator-h-10 rcs-emulator-rounded-full rcs-emulator-flex rcs-emulator-items-center rcs-emulator-justify-center ${i ? "rcs-emulator-text-zinc-400 rcs-emulator-hover-bg-zinc-800" : "rcs-emulator-text-gray-500 rcs-emulator-hover-bg-gray-100"}`,
1929
1847
  "aria-label": "More options",
1930
- children: /* @__PURE__ */ l(
1848
+ children: /* @__PURE__ */ n(
1931
1849
  "svg",
1932
1850
  {
1933
- className: "w-5 h-5",
1851
+ className: "rcs-emulator-w-5 rcs-emulator-h-5",
1934
1852
  fill: "currentColor",
1935
1853
  viewBox: "0 0 24 24",
1936
1854
  children: [
@@ -1945,36 +1863,32 @@ const We = g(function({
1945
1863
  ]
1946
1864
  }
1947
1865
  ),
1948
- a && /* @__PURE__ */ e(
1866
+ l && /* @__PURE__ */ e(
1949
1867
  "div",
1950
1868
  {
1951
- className: "rcs-webview-loading absolute top-14 left-0 right-0 h-1 overflow-hidden",
1952
- style: { backgroundColor: `${m}20` },
1869
+ className: "rcs-emulator-absolute rcs-emulator-top-14 rcs-emulator-left-0 rcs-emulator-right-0 rcs-emulator-h-1 rcs-emulator-overflow-hidden",
1870
+ style: { backgroundColor: `${h}20` },
1953
1871
  children: /* @__PURE__ */ e(
1954
1872
  "div",
1955
1873
  {
1956
- className: "h-full animate-pulse",
1874
+ className: "rcs-emulator-h-full rcs-emulator-animate-pulse rcs-emulator-webview-loading-bar",
1957
1875
  style: {
1958
- backgroundColor: m,
1959
- animation: "webview-loading 1.5s ease-in-out infinite",
1876
+ backgroundColor: h,
1960
1877
  width: "30%"
1961
1878
  }
1962
1879
  }
1963
1880
  )
1964
1881
  }
1965
1882
  ),
1966
- u && /* @__PURE__ */ l(
1883
+ u && /* @__PURE__ */ n(
1967
1884
  "div",
1968
1885
  {
1969
- className: `
1970
- rcs-webview-error flex-1 flex flex-col items-center justify-center p-6 text-center
1971
- ${d ? "text-zinc-400" : "text-gray-500"}
1972
- `,
1886
+ className: `rcs-emulator-flex-1 rcs-emulator-flex rcs-emulator-flex-col rcs-emulator-items-center rcs-emulator-justify-center rcs-emulator-p-6 rcs-emulator-text-center ${i ? "rcs-emulator-text-zinc-400" : "rcs-emulator-text-gray-500"}`,
1973
1887
  children: [
1974
1888
  /* @__PURE__ */ e(
1975
1889
  "svg",
1976
1890
  {
1977
- className: "w-16 h-16 mb-4 opacity-50",
1891
+ className: "rcs-emulator-w-16 rcs-emulator-h-16 rcs-emulator-mb-4 rcs-emulator-opacity-50",
1978
1892
  fill: "none",
1979
1893
  viewBox: "0 0 24 24",
1980
1894
  stroke: "currentColor",
@@ -1989,91 +1903,75 @@ const We = g(function({
1989
1903
  )
1990
1904
  }
1991
1905
  ),
1992
- /* @__PURE__ */ e("p", { className: "text-sm font-medium mb-2", children: "Unable to load page" }),
1993
- /* @__PURE__ */ e("p", { className: "text-xs opacity-75 mb-4", children: "This content cannot be displayed in the emulator" }),
1906
+ /* @__PURE__ */ e("p", { className: "rcs-emulator-text-sm rcs-emulator-font-medium rcs-emulator-mb-2", children: "Unable to load page" }),
1907
+ /* @__PURE__ */ e("p", { className: "rcs-emulator-text-xs rcs-emulator-opacity-75 rcs-emulator-mb-4", children: "This content cannot be displayed in the emulator" }),
1994
1908
  /* @__PURE__ */ e(
1995
1909
  "button",
1996
1910
  {
1997
1911
  type: "button",
1998
- onClick: s,
1999
- className: `
2000
- px-4 py-2 rounded-full text-sm font-medium
2001
- ${d ? "bg-zinc-800 text-white hover:bg-zinc-700" : "bg-gray-100 text-gray-700 hover:bg-gray-200"}
2002
- `,
1912
+ onClick: a,
1913
+ className: `rcs-emulator-px-4 rcs-emulator-py-2 rcs-emulator-rounded-full rcs-emulator-text-sm rcs-emulator-font-medium ${i ? "rcs-emulator-bg-zinc-800 rcs-emulator-text-white rcs-emulator-hover-bg-zinc-700" : "rcs-emulator-bg-gray-100 rcs-emulator-text-gray-700 rcs-emulator-hover-bg-gray-200"}`,
2003
1914
  children: "Go Back"
2004
1915
  }
2005
1916
  )
2006
1917
  ]
2007
1918
  }
2008
1919
  ),
2009
- !u && /* @__PURE__ */ e("div", { className: "rcs-webview-iframe-container flex-1 overflow-hidden", children: /* @__PURE__ */ e(
1920
+ !u && /* @__PURE__ */ e("div", { className: "rcs-emulator-flex-1 rcs-emulator-overflow-hidden", children: /* @__PURE__ */ e(
2010
1921
  "iframe",
2011
1922
  {
2012
- src: L,
2013
- title: h,
2014
- className: "w-full h-full border-0",
1923
+ src: N,
1924
+ title: d,
1925
+ className: "rcs-emulator-w-full rcs-emulator-h-full rcs-emulator-border-0",
2015
1926
  onLoad: f,
2016
- onError: v,
1927
+ onError: w,
2017
1928
  sandbox: "allow-scripts allow-same-origin allow-forms allow-popups",
2018
1929
  referrerPolicy: "no-referrer-when-downgrade",
2019
1930
  loading: "lazy"
2020
1931
  }
2021
1932
  ) }),
2022
- C && /* @__PURE__ */ e(
1933
+ L && /* @__PURE__ */ e(
2023
1934
  "div",
2024
1935
  {
2025
- className: `
2026
- rcs-webview-safe-area h-2 flex-shrink-0
2027
- ${d ? "bg-zinc-900" : "bg-white"}
2028
- `
1936
+ className: `rcs-emulator-h-2 rcs-emulator-flex-shrink-0 ${i ? "rcs-emulator-bg-zinc-900" : "rcs-emulator-bg-white"}`
2029
1937
  }
2030
1938
  )
2031
1939
  ]
2032
1940
  }
2033
- ),
2034
- /* @__PURE__ */ e("style", { children: `
2035
- @keyframes webview-loading {
2036
- 0% { transform: translateX(-100%); }
2037
- 50% { transform: translateX(200%); }
2038
- 100% { transform: translateX(-100%); }
2039
- }
2040
- ` })
1941
+ )
2041
1942
  ]
2042
1943
  }
2043
1944
  );
2044
- }), Oe = g(function({
2045
- onUnlock: t,
2046
- messagePreview: n = "New message"
1945
+ }), Oe = p(function({
1946
+ onUnlock: r,
1947
+ messagePreview: t = "New message"
2047
1948
  }) {
2048
- const { theme: o, businessInfo: s } = N(), [a, i] = z(/* @__PURE__ */ new Date()), u = o === "dark";
2049
- S(() => {
1949
+ const { theme: o, businessInfo: a } = k(), [l, c] = A(/* @__PURE__ */ new Date()), u = o === "dark";
1950
+ E(() => {
2050
1951
  const f = setInterval(() => {
2051
- i(/* @__PURE__ */ new Date());
1952
+ c(/* @__PURE__ */ new Date());
2052
1953
  }, 1e3);
2053
1954
  return () => clearInterval(f);
2054
1955
  }, []);
2055
- const c = a.toLocaleTimeString([], {
1956
+ const m = l.toLocaleTimeString([], {
2056
1957
  hour: "numeric",
2057
1958
  minute: "2-digit",
2058
1959
  hour12: !0
2059
- }), d = a.toLocaleDateString([], {
1960
+ }), i = l.toLocaleDateString([], {
2060
1961
  weekday: "short",
2061
1962
  month: "long",
2062
1963
  day: "numeric"
2063
1964
  });
2064
- return /* @__PURE__ */ l(
1965
+ return /* @__PURE__ */ n(
2065
1966
  "div",
2066
1967
  {
2067
- className: `
2068
- lock-screen flex flex-col h-full w-full select-none
2069
- ${u ? "bg-zinc-900" : "bg-zinc-800"}
2070
- `,
1968
+ className: `rcs-emulator-flex rcs-emulator-flex-col rcs-emulator-h-full rcs-emulator-w-full rcs-emulator-select-none ${u ? "rcs-emulator-bg-zinc-900" : "rcs-emulator-bg-zinc-800"}`,
2071
1969
  children: [
2072
- /* @__PURE__ */ e("div", { className: "h-6" }),
2073
- /* @__PURE__ */ e("div", { className: "flex justify-center mt-4", children: /* @__PURE__ */ e("div", { className: "w-8 h-8 rounded-full bg-zinc-700 flex items-center justify-center", children: /* @__PURE__ */ e(
1970
+ /* @__PURE__ */ e("div", { className: "rcs-emulator-h-6" }),
1971
+ /* @__PURE__ */ e("div", { className: "rcs-emulator-flex rcs-emulator-justify-center rcs-emulator-mt-4", children: /* @__PURE__ */ e("div", { className: "rcs-emulator-w-8 rcs-emulator-h-8 rcs-emulator-rounded-full rcs-emulator-bg-zinc-700 rcs-emulator-flex rcs-emulator-items-center rcs-emulator-justify-center", children: /* @__PURE__ */ e(
2074
1972
  "svg",
2075
1973
  {
2076
- className: "w-4 h-4 text-zinc-400",
1974
+ className: "rcs-emulator-w-4 rcs-emulator-h-4 rcs-emulator-text-zinc-400",
2077
1975
  fill: "currentColor",
2078
1976
  viewBox: "0 0 20 20",
2079
1977
  children: /* @__PURE__ */ e(
@@ -2086,33 +1984,40 @@ const We = g(function({
2086
1984
  )
2087
1985
  }
2088
1986
  ) }) }),
2089
- /* @__PURE__ */ e("div", { className: "mt-6 text-center", children: /* @__PURE__ */ e("h1", { className: "text-5xl font-light text-white tracking-tight", children: c }) }),
2090
- /* @__PURE__ */ l("div", { className: "mt-2 text-center", children: [
2091
- /* @__PURE__ */ e("p", { className: "text-zinc-400 text-sm", children: d }),
2092
- /* @__PURE__ */ l("div", { className: "flex items-center justify-center gap-1 mt-1 text-zinc-500 text-xs", children: [
2093
- /* @__PURE__ */ e("svg", { className: "w-3.5 h-3.5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ e("path", { d: "M5.5 16a3.5 3.5 0 01-.369-6.98 4 4 0 117.753-1.977A4.5 4.5 0 1113.5 16h-8z" }) }),
2094
- /* @__PURE__ */ e("span", { children: "19°C" })
1987
+ /* @__PURE__ */ e("div", { className: "rcs-emulator-mt-6 rcs-emulator-text-center", children: /* @__PURE__ */ e("h1", { className: "rcs-emulator-text-5xl rcs-emulator-font-light rcs-emulator-text-white rcs-emulator-tracking-tight", children: m }) }),
1988
+ /* @__PURE__ */ n("div", { className: "rcs-emulator-mt-2 rcs-emulator-text-center", children: [
1989
+ /* @__PURE__ */ e("p", { className: "rcs-emulator-text-zinc-400 rcs-emulator-text-sm", children: i }),
1990
+ /* @__PURE__ */ n("div", { className: "rcs-emulator-flex rcs-emulator-items-center rcs-emulator-justify-center rcs-emulator-gap-1 rcs-emulator-mt-1 rcs-emulator-text-zinc-500 rcs-emulator-text-xs", children: [
1991
+ /* @__PURE__ */ e(
1992
+ "svg",
1993
+ {
1994
+ className: "rcs-emulator-w-3-5 rcs-emulator-h-3-5",
1995
+ fill: "currentColor",
1996
+ viewBox: "0 0 20 20",
1997
+ children: /* @__PURE__ */ e("path", { d: "M5.5 16a3.5 3.5 0 01-.369-6.98 4 4 0 117.753-1.977A4.5 4.5 0 1113.5 16h-8z" })
1998
+ }
1999
+ ),
2000
+ /* @__PURE__ */ e("span", { className: "rcs-emulator-text-zinc-500", children: "19°C" })
2095
2001
  ] })
2096
2002
  ] }),
2097
- /* @__PURE__ */ e("div", { className: "h-24" }),
2098
- /* @__PURE__ */ e("div", { className: "px-4 pb-8", children: /* @__PURE__ */ l(
2003
+ /* @__PURE__ */ e("div", { className: "rcs-emulator-h-24" }),
2004
+ /* @__PURE__ */ e("div", { className: "rcs-emulator-px-4 rcs-emulator-pb-8", children: /* @__PURE__ */ n(
2099
2005
  "button",
2100
2006
  {
2101
- onClick: t,
2102
- className: `w-full bg-white rounded-2xl p-3 flex items-center gap-3 shadow-lg
2103
- transition-transform active:scale-[0.98] hover:shadow-xl`,
2007
+ onClick: r,
2008
+ className: "rcs-emulator-notification-card rcs-emulator-w-full rcs-emulator-bg-white rcs-emulator-rounded-2xl rcs-emulator-p-3 rcs-emulator-flex rcs-emulator-items-center rcs-emulator-gap-3 rcs-emulator-shadow-lg rcs-emulator-transition-transform rcs-emulator-active-scale-98 rcs-emulator-hover-shadow-xl",
2104
2009
  children: [
2105
- /* @__PURE__ */ e("div", { className: "w-12 h-12 rounded-xl bg-zinc-900 flex items-center justify-center flex-shrink-0 overflow-hidden", children: s.logo ? /* @__PURE__ */ e(
2010
+ /* @__PURE__ */ e("div", { className: "rcs-emulator-w-12 rcs-emulator-h-12 rcs-emulator-rounded-xl rcs-emulator-bg-zinc-900 rcs-emulator-flex rcs-emulator-items-center rcs-emulator-justify-center rcs-emulator-flex-shrink-0 rcs-emulator-overflow-hidden", children: a.logo ? /* @__PURE__ */ e(
2106
2011
  "img",
2107
2012
  {
2108
- src: s.logo,
2109
- alt: s.name,
2110
- className: "w-full h-full object-cover"
2013
+ src: a.logo,
2014
+ alt: a.name,
2015
+ className: "rcs-emulator-w-full rcs-emulator-h-full rcs-emulator-object-cover"
2111
2016
  }
2112
- ) : /* @__PURE__ */ e("div", { className: "text-white", children: /* @__PURE__ */ l(
2017
+ ) : /* @__PURE__ */ e("div", { className: "rcs-emulator-text-white", children: /* @__PURE__ */ n(
2113
2018
  "svg",
2114
2019
  {
2115
- className: "w-7 h-7",
2020
+ className: "rcs-emulator-w-7 rcs-emulator-h-7",
2116
2021
  viewBox: "0 0 24 24",
2117
2022
  fill: "currentColor",
2118
2023
  children: [
@@ -2132,170 +2037,161 @@ const We = g(function({
2132
2037
  ]
2133
2038
  }
2134
2039
  ) }) }),
2135
- /* @__PURE__ */ l("div", { className: "flex-1 text-left min-w-0", children: [
2136
- /* @__PURE__ */ e("p", { className: "text-sm font-semibold text-gray-900 truncate", children: s.name }),
2137
- /* @__PURE__ */ e("p", { className: "text-sm text-gray-500 truncate", children: n })
2040
+ /* @__PURE__ */ n("div", { className: "rcs-emulator-flex-1 rcs-emulator-text-left rcs-emulator-min-w-0", children: [
2041
+ /* @__PURE__ */ e("p", { className: "rcs-emulator-text-sm rcs-emulator-font-semibold rcs-emulator-text-gray-900 rcs-emulator-truncate", children: a.name }),
2042
+ /* @__PURE__ */ e("p", { className: "rcs-emulator-text-sm rcs-emulator-text-gray-500 rcs-emulator-truncate", children: t })
2138
2043
  ] }),
2139
- /* @__PURE__ */ e("span", { className: "text-xs text-gray-400 flex-shrink-0", children: "now" })
2044
+ /* @__PURE__ */ e("span", { className: "rcs-emulator-text-xs rcs-emulator-text-gray-400 rcs-emulator-flex-shrink-0", children: "now" })
2140
2045
  ]
2141
2046
  }
2142
2047
  ) }),
2143
- /* @__PURE__ */ e("div", { className: "flex-1" }),
2144
- /* @__PURE__ */ e("div", { className: "flex justify-center pb-2", children: /* @__PURE__ */ e("div", { className: "w-32 h-1 rounded-full bg-zinc-600" }) })
2048
+ /* @__PURE__ */ e("div", { className: "rcs-emulator-flex-1" }),
2049
+ /* @__PURE__ */ e("div", { className: "rcs-emulator-flex rcs-emulator-justify-center rcs-emulator-pb-2", children: /* @__PURE__ */ e("div", { className: "rcs-emulator-home-indicator rcs-emulator-w-32 rcs-emulator-h-1 rcs-emulator-rounded-full rcs-emulator-bg-zinc-600" }) })
2145
2050
  ]
2146
2051
  }
2147
2052
  );
2148
- }), Y = {
2053
+ }), J = {
2149
2054
  name: "Business",
2150
2055
  verified: !1
2151
- }, Pe = g(function({
2152
- flow: t,
2153
- onUserReply: n,
2056
+ }, Pe = p(function({
2057
+ flow: r,
2058
+ onUserReply: t,
2154
2059
  theme: o,
2155
- device: s,
2156
- businessInfo: a,
2157
- showSuggestions: i
2060
+ device: a,
2061
+ businessInfo: l,
2062
+ showSuggestions: c
2158
2063
  }) {
2159
2064
  const {
2160
2065
  state: u,
2161
- handleReply: c,
2162
- handleAction: d
2066
+ handleReply: m,
2067
+ handleAction: i
2163
2068
  } = fe({
2164
- flow: t,
2165
- onUserReply: n,
2069
+ flow: r,
2070
+ onUserReply: t,
2166
2071
  typingDelay: 800
2167
- }), [m, f] = z(!1), v = M(() => {
2168
- f((h) => !h);
2169
- }, []), [x, L] = z(null), b = M((h) => {
2170
- L({
2171
- ...h,
2072
+ }), [h, f] = A(!1), w = $(() => {
2073
+ f((d) => !d);
2074
+ }, []), [b, N] = A(null), v = $((d) => {
2075
+ N({
2076
+ ...d,
2172
2077
  isOpen: !0
2173
2078
  });
2174
- }, []), p = M(() => {
2175
- L(null);
2176
- }, []), y = M(
2177
- (h) => {
2178
- if (!$(h)) return;
2179
- const w = oe(h);
2180
- if (w) {
2181
- b({
2182
- url: w.url,
2183
- viewMode: w.webviewViewMode || "TALL",
2184
- title: w.description || "",
2185
- postbackData: h.action.postback.data
2186
- }), n({
2079
+ }, []), y = $(() => {
2080
+ N(null);
2081
+ }, []), g = $(
2082
+ (d) => {
2083
+ if (!z(d)) return;
2084
+ const x = oe(d);
2085
+ if (x) {
2086
+ v({
2087
+ url: x.url,
2088
+ viewMode: x.webviewViewMode || "TALL",
2089
+ title: x.description || "",
2090
+ postbackData: d.action.postback.data
2091
+ }), t({
2187
2092
  type: "action",
2188
- postbackData: h.action.postback.data,
2189
- displayText: h.action.displayText,
2093
+ postbackData: d.action.postback.data,
2094
+ displayText: d.action.displayText,
2190
2095
  timestamp: Date.now(),
2191
2096
  actionData: {
2192
2097
  type: "webview",
2193
- url: w.url,
2194
- viewMode: w.webviewViewMode || "TALL",
2195
- description: w.description
2098
+ url: x.url,
2099
+ viewMode: x.webviewViewMode || "TALL",
2100
+ description: x.description
2196
2101
  }
2197
2102
  });
2198
2103
  return;
2199
2104
  }
2200
- d(h);
2105
+ i(d);
2201
2106
  },
2202
- [d, b, n]
2107
+ [i, v, t]
2203
2108
  );
2204
- return /* @__PURE__ */ l(
2205
- X,
2109
+ return /* @__PURE__ */ n(
2110
+ Z,
2206
2111
  {
2207
2112
  theme: o,
2208
- device: s,
2209
- businessInfo: a,
2113
+ device: a,
2114
+ businessInfo: l,
2210
2115
  state: u,
2211
- showSuggestions: i,
2212
- isProfileOpen: m,
2213
- toggleProfile: v,
2214
- onReply: c,
2215
- onAction: y,
2216
- webView: x,
2217
- openWebView: b,
2218
- closeWebView: p,
2116
+ showSuggestions: c,
2117
+ isProfileOpen: h,
2118
+ toggleProfile: w,
2119
+ onReply: m,
2120
+ onAction: g,
2121
+ webView: b,
2122
+ openWebView: v,
2123
+ closeWebView: y,
2219
2124
  children: [
2220
2125
  /* @__PURE__ */ e(Ve, {}),
2221
- m && /* @__PURE__ */ e(He, {}),
2126
+ h && /* @__PURE__ */ e(He, {}),
2222
2127
  /* @__PURE__ */ e(De, {})
2223
2128
  ]
2224
2129
  }
2225
2130
  );
2226
- }), Ye = g(function({
2227
- messages: t,
2228
- jsonUrl: n,
2131
+ }), Je = p(function({
2132
+ messages: r,
2133
+ jsonUrl: t,
2229
2134
  onUserReply: o,
2230
- theme: s = "light",
2231
- device: a = "android",
2232
- businessInfo: i,
2135
+ theme: a = "light",
2136
+ device: l = "android",
2137
+ businessInfo: c,
2233
2138
  className: u = "",
2234
- width: c = 375,
2235
- height: d = 667,
2236
- showSuggestions: m = !0,
2139
+ width: m = 375,
2140
+ height: i = 667,
2141
+ showSuggestions: h = !0,
2237
2142
  showLockScreen: f = !1
2238
2143
  }) {
2239
- const [v, x] = z(f), L = M(() => {
2240
- x(!1);
2144
+ const [w, b] = A(f), N = $(() => {
2145
+ b(!1);
2241
2146
  }, []), {
2242
- data: b,
2243
- isLoading: p,
2244
- error: y
2245
- } = ge(n), h = n ? b : t, w = V(
2246
- () => h ? ue(h) : !1,
2247
- [h]
2248
- ), C = V(
2147
+ data: v,
2148
+ isLoading: y,
2149
+ error: g
2150
+ } = pe(t), d = t ? v : r, x = V(
2151
+ () => d ? me(d) : !1,
2152
+ [d]
2153
+ ), L = V(
2249
2154
  () => ({
2250
- ...Y,
2251
- ...i,
2155
+ ...J,
2156
+ ...c,
2252
2157
  // Extract name from flow if not provided
2253
- name: i?.name || h?.name || Y.name
2158
+ name: c?.name || d?.name || J.name
2254
2159
  }),
2255
- [i, h?.name]
2160
+ [c, d?.name]
2256
2161
  ), I = V(
2257
- () => h && w ? he(h) : "New message",
2258
- [h, w]
2259
- ), k = s === "dark", A = ({ children: T }) => /* @__PURE__ */ e(
2162
+ () => d && x ? de(d) : "New message",
2163
+ [d, x]
2164
+ ), C = a === "dark", T = C ? "rcs-emulator-dark" : "rcs-emulator-light", M = ({ children: S }) => /* @__PURE__ */ e(
2260
2165
  "div",
2261
2166
  {
2262
- className: `
2263
- rcs-emulator relative overflow-hidden
2264
- rounded-2xl shadow-2xl
2265
- ${k ? "bg-zinc-950" : "bg-white"}
2266
- ${u}
2267
- `,
2268
- style: { width: c, height: d },
2167
+ className: `rcs-emulator rcs-emulator-container ${T} ${u}`,
2168
+ style: { width: m, height: i },
2269
2169
  role: "application",
2270
2170
  "aria-label": "RCS Message Emulator",
2271
- "data-theme": s,
2272
- "data-device": a,
2273
- children: T
2171
+ "data-theme": a,
2172
+ "data-device": l,
2173
+ children: S
2274
2174
  }
2275
2175
  );
2276
- return n && p ? /* @__PURE__ */ e(A, { children: /* @__PURE__ */ l("div", { className: "flex flex-col items-center justify-center h-full p-6", children: [
2176
+ return t && y ? /* @__PURE__ */ e(M, { children: /* @__PURE__ */ n("div", { className: "rcs-emulator-flex rcs-emulator-flex-col rcs-emulator-items-center rcs-emulator-justify-center rcs-emulator-h-full rcs-emulator-p-6", children: [
2277
2177
  /* @__PURE__ */ e(
2278
2178
  "div",
2279
2179
  {
2280
- className: `
2281
- w-10 h-10 border-3 border-t-transparent rounded-full animate-spin mb-4
2282
- ${k ? "border-zinc-600" : "border-gray-300"}
2283
- `,
2284
- style: { borderTopColor: "transparent" }
2180
+ className: `rcs-emulator-w-10 rcs-emulator-h-10 rcs-emulator-spinner rcs-emulator-mb-4 ${T}`
2285
2181
  }
2286
2182
  ),
2287
2183
  /* @__PURE__ */ e(
2288
2184
  "p",
2289
2185
  {
2290
- className: `text-sm ${k ? "text-zinc-400" : "text-gray-500"}`,
2186
+ className: `rcs-emulator-text-sm ${C ? "rcs-emulator-text-zinc-400" : "rcs-emulator-text-gray-500"}`,
2291
2187
  children: "Loading conversation..."
2292
2188
  }
2293
2189
  )
2294
- ] }) }) : n && y ? /* @__PURE__ */ e(A, { children: /* @__PURE__ */ l("div", { className: "flex flex-col items-center justify-center h-full p-6 text-center", children: [
2190
+ ] }) }) : t && g ? /* @__PURE__ */ e(M, { children: /* @__PURE__ */ n("div", { className: "rcs-emulator-flex rcs-emulator-flex-col rcs-emulator-items-center rcs-emulator-justify-center rcs-emulator-h-full rcs-emulator-p-6 rcs-emulator-text-center", children: [
2295
2191
  /* @__PURE__ */ e(
2296
2192
  "svg",
2297
2193
  {
2298
- className: "w-12 h-12 mx-auto mb-4 text-red-500",
2194
+ className: "rcs-emulator-w-12 rcs-emulator-h-12 rcs-emulator-mb-4 rcs-emulator-text-red-500",
2299
2195
  fill: "none",
2300
2196
  viewBox: "0 0 24 24",
2301
2197
  stroke: "currentColor",
@@ -2313,30 +2209,31 @@ const We = g(function({
2313
2209
  /* @__PURE__ */ e(
2314
2210
  "h3",
2315
2211
  {
2316
- className: `text-lg font-medium mb-2 ${k ? "text-white" : "text-gray-900"}`,
2212
+ className: `rcs-emulator-text-lg rcs-emulator-font-medium rcs-emulator-mb-2 ${C ? "rcs-emulator-text-white" : "rcs-emulator-text-gray-900"}`,
2317
2213
  children: "Failed to Load"
2318
2214
  }
2319
2215
  ),
2320
2216
  /* @__PURE__ */ e(
2321
2217
  "p",
2322
2218
  {
2323
- className: `text-sm ${k ? "text-zinc-400" : "text-gray-500"}`,
2324
- children: y
2219
+ className: `rcs-emulator-text-sm ${C ? "rcs-emulator-text-zinc-400" : "rcs-emulator-text-gray-500"}`,
2220
+ children: g
2325
2221
  }
2326
2222
  ),
2327
2223
  /* @__PURE__ */ e(
2328
2224
  "p",
2329
2225
  {
2330
- className: `text-xs mt-2 break-all max-w-full ${k ? "text-zinc-500" : "text-gray-400"}`,
2331
- children: n
2226
+ className: `rcs-emulator-text-xs rcs-emulator-mt-2 rcs-emulator-max-w-full ${C ? "rcs-emulator-text-zinc-500" : "rcs-emulator-text-gray-400"}`,
2227
+ style: { wordBreak: "break-all" },
2228
+ children: t
2332
2229
  }
2333
2230
  )
2334
- ] }) }) : h ? w ? /* @__PURE__ */ e(A, { children: v ? /* @__PURE__ */ e(
2335
- X,
2231
+ ] }) }) : d ? x ? /* @__PURE__ */ e(M, { children: w ? /* @__PURE__ */ e(
2232
+ Z,
2336
2233
  {
2337
- theme: s,
2338
- device: a,
2339
- businessInfo: C,
2234
+ theme: a,
2235
+ device: l,
2236
+ businessInfo: L,
2340
2237
  state: {
2341
2238
  currentMessageId: null,
2342
2239
  chatHistory: [],
@@ -2356,23 +2253,24 @@ const We = g(function({
2356
2253
  },
2357
2254
  closeWebView: () => {
2358
2255
  },
2359
- children: /* @__PURE__ */ e(Oe, { onUnlock: L, messagePreview: I })
2256
+ children: /* @__PURE__ */ e(Oe, { onUnlock: N, messagePreview: I })
2360
2257
  }
2361
2258
  ) : /* @__PURE__ */ e(
2362
2259
  Pe,
2363
2260
  {
2364
- flow: h,
2261
+ flow: d,
2365
2262
  onUserReply: o,
2366
- theme: s,
2367
- device: a,
2368
- businessInfo: C,
2369
- showSuggestions: m
2263
+ theme: a,
2264
+ device: l,
2265
+ businessInfo: L,
2266
+ showSuggestions: h
2370
2267
  }
2371
- ) }) : /* @__PURE__ */ e(A, { children: /* @__PURE__ */ l("div", { className: "flex flex-col items-center justify-center h-full p-6 text-center", children: [
2268
+ ) }) : /* @__PURE__ */ e(M, { children: /* @__PURE__ */ n("div", { className: "rcs-emulator-flex rcs-emulator-flex-col rcs-emulator-items-center rcs-emulator-justify-center rcs-emulator-h-full rcs-emulator-p-6 rcs-emulator-text-center", children: [
2372
2269
  /* @__PURE__ */ e(
2373
2270
  "svg",
2374
2271
  {
2375
- className: "w-12 h-12 mx-auto mb-4 text-amber-500",
2272
+ className: "rcs-emulator-w-12 rcs-emulator-h-12 rcs-emulator-mb-4",
2273
+ style: { color: "#f59e0b" },
2376
2274
  fill: "none",
2377
2275
  viewBox: "0 0 24 24",
2378
2276
  stroke: "currentColor",
@@ -2390,22 +2288,22 @@ const We = g(function({
2390
2288
  /* @__PURE__ */ e(
2391
2289
  "h3",
2392
2290
  {
2393
- className: `text-lg font-medium mb-2 ${k ? "text-white" : "text-gray-900"}`,
2291
+ className: `rcs-emulator-text-lg rcs-emulator-font-medium rcs-emulator-mb-2 ${C ? "rcs-emulator-text-white" : "rcs-emulator-text-gray-900"}`,
2394
2292
  children: "Invalid RBM JSON"
2395
2293
  }
2396
2294
  ),
2397
2295
  /* @__PURE__ */ e(
2398
2296
  "p",
2399
2297
  {
2400
- className: `text-sm ${k ? "text-zinc-400" : "text-gray-500"}`,
2298
+ className: `rcs-emulator-text-sm ${C ? "rcs-emulator-text-zinc-400" : "rcs-emulator-text-gray-500"}`,
2401
2299
  children: "The conversation flow structure is not valid"
2402
2300
  }
2403
2301
  )
2404
- ] }) }) : /* @__PURE__ */ e(A, { children: /* @__PURE__ */ l("div", { className: "flex flex-col items-center justify-center h-full p-6 text-center", children: [
2302
+ ] }) }) : /* @__PURE__ */ e(M, { children: /* @__PURE__ */ n("div", { className: "rcs-emulator-flex rcs-emulator-flex-col rcs-emulator-items-center rcs-emulator-justify-center rcs-emulator-h-full rcs-emulator-p-6 rcs-emulator-text-center", children: [
2405
2303
  /* @__PURE__ */ e(
2406
2304
  "svg",
2407
2305
  {
2408
- className: `w-12 h-12 mx-auto mb-4 ${k ? "text-zinc-600" : "text-gray-300"}`,
2306
+ className: `rcs-emulator-w-12 rcs-emulator-h-12 rcs-emulator-mb-4 ${C ? "rcs-emulator-text-zinc-600" : "rcs-emulator-text-gray-300"}`,
2409
2307
  fill: "none",
2410
2308
  viewBox: "0 0 24 24",
2411
2309
  stroke: "currentColor",
@@ -2423,22 +2321,22 @@ const We = g(function({
2423
2321
  /* @__PURE__ */ e(
2424
2322
  "h3",
2425
2323
  {
2426
- className: `text-lg font-medium mb-2 ${k ? "text-white" : "text-gray-900"}`,
2324
+ className: `rcs-emulator-text-lg rcs-emulator-font-medium rcs-emulator-mb-2 ${C ? "rcs-emulator-text-white" : "rcs-emulator-text-gray-900"}`,
2427
2325
  children: "No Conversation Data"
2428
2326
  }
2429
2327
  ),
2430
- /* @__PURE__ */ l(
2328
+ /* @__PURE__ */ n(
2431
2329
  "p",
2432
2330
  {
2433
- className: `text-sm ${k ? "text-zinc-400" : "text-gray-500"}`,
2331
+ className: `rcs-emulator-text-sm ${C ? "rcs-emulator-text-zinc-400" : "rcs-emulator-text-gray-500"}`,
2434
2332
  children: [
2435
2333
  "Provide either",
2436
2334
  " ",
2437
- /* @__PURE__ */ e("code", { className: "px-1 py-0.5 rounded bg-gray-100 dark:bg-zinc-800", children: "messages" }),
2335
+ /* @__PURE__ */ e("code", { className: `rcs-emulator-code-inline ${T}`, children: "messages" }),
2438
2336
  " ",
2439
2337
  "or",
2440
2338
  " ",
2441
- /* @__PURE__ */ e("code", { className: "px-1 py-0.5 rounded bg-gray-100 dark:bg-zinc-800", children: "jsonUrl" }),
2339
+ /* @__PURE__ */ e("code", { className: `rcs-emulator-code-inline ${T}`, children: "jsonUrl" }),
2442
2340
  " ",
2443
2341
  "prop"
2444
2342
  ]
@@ -2447,15 +2345,15 @@ const We = g(function({
2447
2345
  ] }) });
2448
2346
  });
2449
2347
  export {
2450
- Ye as RcsEmulator,
2348
+ Je as RcsEmulator,
2451
2349
  De as WebViewRenderer,
2452
- Ye as default,
2453
- he as getFirstMessagePreview,
2350
+ Je as default,
2351
+ de as getFirstMessagePreview,
2454
2352
  oe as getWebViewConfig,
2455
- $ as isSuggestedAction,
2456
- q as isSuggestedReply,
2457
- Je as isWebViewAction,
2458
- ge as useJsonFetch,
2459
- ue as validateConversationFlow
2353
+ z as isSuggestedAction,
2354
+ Y as isSuggestedReply,
2355
+ qe as isWebViewAction,
2356
+ pe as useJsonFetch,
2357
+ me as validateConversationFlow
2460
2358
  };
2461
2359
  //# sourceMappingURL=rcs-emulator.es.js.map