@helpway/react 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -17,17 +17,17 @@ function generateId() {
17
17
  }
18
18
  function getOrCreateVisitorId(publicKey) {
19
19
  try {
20
- const storageKey = keyFor(publicKey);
21
- const existing = localStorage.getItem(storageKey);
20
+ const storageKey2 = keyFor(publicKey);
21
+ const existing = localStorage.getItem(storageKey2);
22
22
  if (existing) return existing;
23
23
  const legacy = localStorage.getItem(LEGACY_KEY);
24
24
  if (legacy) {
25
- localStorage.setItem(storageKey, legacy);
25
+ localStorage.setItem(storageKey2, legacy);
26
26
  localStorage.removeItem(LEGACY_KEY);
27
27
  return legacy;
28
28
  }
29
29
  const id = generateId();
30
- localStorage.setItem(storageKey, id);
30
+ localStorage.setItem(storageKey2, id);
31
31
  return id;
32
32
  } catch {
33
33
  return generateId();
@@ -223,8 +223,29 @@ var WebSocketManager = class {
223
223
  // ../widget-core/src/store.ts
224
224
  import { createStore } from "zustand/vanilla";
225
225
  var CONTENT_CACHE_TTL = 5 * 60 * 1e3;
226
+ var PREVIEW_STORAGE_KEY = "helpway:incoming-preview";
227
+ function loadPersistedPreview() {
228
+ if (typeof window === "undefined") return null;
229
+ try {
230
+ const raw = window.localStorage.getItem(PREVIEW_STORAGE_KEY);
231
+ return raw ? JSON.parse(raw) : null;
232
+ } catch {
233
+ return null;
234
+ }
235
+ }
236
+ function persistPreview(preview) {
237
+ if (typeof window === "undefined") return;
238
+ try {
239
+ if (preview) {
240
+ window.localStorage.setItem(PREVIEW_STORAGE_KEY, JSON.stringify(preview));
241
+ } else {
242
+ window.localStorage.removeItem(PREVIEW_STORAGE_KEY);
243
+ }
244
+ } catch {
245
+ }
246
+ }
226
247
  function createWidgetStore() {
227
- return createStore((set, get) => ({
248
+ const store = createStore((set, get) => ({
228
249
  // Initial state
229
250
  isReady: false,
230
251
  isConnecting: true,
@@ -240,7 +261,9 @@ function createWidgetStore() {
240
261
  isOpen: false,
241
262
  isDismissed: false,
242
263
  view: "home",
243
- incomingPreview: null,
264
+ incomingPreview: loadPersistedPreview(),
265
+ announcementPreviews: [],
266
+ unseenAnnouncementCount: 0,
244
267
  newConversationPrefill: null,
245
268
  contentCache: /* @__PURE__ */ new Map(),
246
269
  // ── Lifecycle ────────────────────────────────────
@@ -407,7 +430,8 @@ function createWidgetStore() {
407
430
  setOpen(open) {
408
431
  set((s) => ({
409
432
  isOpen: open,
410
- incomingPreview: open ? null : s.incomingPreview
433
+ incomingPreview: open ? null : s.incomingPreview,
434
+ announcementPreviews: open ? [] : s.announcementPreviews
411
435
  }));
412
436
  },
413
437
  setDismissed(dismissed) {
@@ -422,6 +446,27 @@ function createWidgetStore() {
422
446
  dismissPreview() {
423
447
  set({ incomingPreview: null });
424
448
  },
449
+ // ── Announcements ────────────────────────────────
450
+ setAnnouncementPreview(preview) {
451
+ set((s) => ({
452
+ announcementPreviews: [
453
+ ...s.announcementPreviews.filter((p) => p.tabId !== preview.tabId),
454
+ preview
455
+ ]
456
+ }));
457
+ },
458
+ dismissAnnouncementPreview(slug) {
459
+ if (slug) {
460
+ set((s) => ({
461
+ announcementPreviews: s.announcementPreviews.filter((p) => p.slug !== slug)
462
+ }));
463
+ } else {
464
+ set({ announcementPreviews: [] });
465
+ }
466
+ },
467
+ setUnseenAnnouncementCount(count) {
468
+ set({ unseenAnnouncementCount: count });
469
+ },
425
470
  // ── Content Cache ────────────────────────────────
426
471
  setContentCache(key, data) {
427
472
  get().contentCache.set(key, { data, ts: Date.now() });
@@ -530,6 +575,16 @@ function createWidgetStore() {
530
575
  }
531
576
  }
532
577
  }));
578
+ if (typeof window !== "undefined") {
579
+ let last = store.getState().incomingPreview;
580
+ store.subscribe((s) => {
581
+ if (s.incomingPreview !== last) {
582
+ last = s.incomingPreview;
583
+ persistPreview(s.incomingPreview);
584
+ }
585
+ });
586
+ }
587
+ return store;
533
588
  }
534
589
 
535
590
  // ../widget-core/src/api.ts
@@ -707,6 +762,8 @@ var en = {
707
762
  "widget.reply_time": "We typically reply in a few minutes",
708
763
  "widget.recent_conversations": "Recent conversations",
709
764
  "widget.see_all": "See all conversations",
765
+ "widget.whats_new": "What's New",
766
+ "widget.view_all": "View all",
710
767
  // Messages tab
711
768
  "widget.no_messages": "No messages yet",
712
769
  "widget.no_messages_desc": "Start a conversation to get help",
@@ -1353,10 +1410,171 @@ function inferApiUrl() {
1353
1410
  }
1354
1411
 
1355
1412
  // src/themed/default-widget.tsx
1356
- import { useCallback as useCallback11, useEffect as useEffect11, useRef as useRef13, useState as useState12 } from "react";
1413
+ import { useCallback as useCallback12, useEffect as useEffect13, useRef as useRef14, useState as useState13 } from "react";
1414
+
1415
+ // src/hooks/use-announcements.ts
1416
+ import { useCallback as useCallback2, useEffect as useEffect2, useMemo, useRef as useRef2 } from "react";
1417
+ function storageKey(websiteId, visitorId) {
1418
+ return `helpway:${websiteId}:${visitorId}:announcements:seen`;
1419
+ }
1420
+ function hasSeenKey(websiteId, visitorId) {
1421
+ try {
1422
+ return localStorage.getItem(storageKey(websiteId, visitorId)) !== null;
1423
+ } catch {
1424
+ return false;
1425
+ }
1426
+ }
1427
+ function getSeenSlugs(websiteId, visitorId) {
1428
+ try {
1429
+ const raw = localStorage.getItem(storageKey(websiteId, visitorId));
1430
+ if (!raw) return /* @__PURE__ */ new Set();
1431
+ return new Set(JSON.parse(raw));
1432
+ } catch {
1433
+ return /* @__PURE__ */ new Set();
1434
+ }
1435
+ }
1436
+ function addSeenSlug(websiteId, visitorId, slug) {
1437
+ try {
1438
+ const seen = getSeenSlugs(websiteId, visitorId);
1439
+ seen.add(slug);
1440
+ localStorage.setItem(storageKey(websiteId, visitorId), JSON.stringify([...seen]));
1441
+ } catch {
1442
+ }
1443
+ }
1444
+ function addSeenSlugs(websiteId, visitorId, slugs) {
1445
+ try {
1446
+ const seen = getSeenSlugs(websiteId, visitorId);
1447
+ for (const s of slugs) seen.add(s);
1448
+ localStorage.setItem(storageKey(websiteId, visitorId), JSON.stringify([...seen]));
1449
+ } catch {
1450
+ }
1451
+ }
1452
+ function filterUnseen(entries, seen) {
1453
+ return entries.filter((e) => !seen.has(e.slug));
1454
+ }
1455
+ var EMPTY_TABS = [];
1456
+ function useAnnouncements() {
1457
+ const { client, store } = useWidgetContext();
1458
+ const isReady = useWidgetStore((s) => s.isReady);
1459
+ const websiteId = useWidgetStore((s) => s.website?.id) ?? null;
1460
+ const visitorId = useWidgetStore((s) => s.visitor?.id) ?? null;
1461
+ const isAnonymous = useWidgetStore((s) => !s.visitor?.contact);
1462
+ const contentTabs = useWidgetStore((s) => s.agentConfig?.contentTabs) ?? EMPTY_TABS;
1463
+ const announcementTabs = useMemo(
1464
+ () => contentTabs.filter((t2) => t2.isAnnouncements),
1465
+ [contentTabs]
1466
+ );
1467
+ const checkedRef = useRef2(false);
1468
+ useEffect2(() => {
1469
+ if (!isReady || !websiteId || !visitorId || announcementTabs.length === 0) return;
1470
+ if (checkedRef.current) return;
1471
+ checkedRef.current = true;
1472
+ const isFirstVisit = !hasSeenKey(websiteId, visitorId);
1473
+ let pending = announcementTabs.length;
1474
+ let totalUnseen = 0;
1475
+ const allSlugs = [];
1476
+ function onTabDone(entries, tab) {
1477
+ allSlugs.push(...entries.map((e) => e.slug));
1478
+ if (!(isFirstVisit && !isAnonymous) && entries.length > 0) {
1479
+ const seen = getSeenSlugs(websiteId, visitorId);
1480
+ const unseen = filterUnseen(entries, seen);
1481
+ totalUnseen += unseen.length;
1482
+ const newest = unseen[0];
1483
+ if (newest && !store.getState().isOpen) {
1484
+ const badgeField = tab.display?.badgeField;
1485
+ store.getState().setAnnouncementPreview({
1486
+ title: newest.title,
1487
+ body: newest.body,
1488
+ slug: newest.slug,
1489
+ tabId: tab.id,
1490
+ badge: badgeField ? newest.customFields[badgeField] ?? null : null
1491
+ });
1492
+ }
1493
+ }
1494
+ pending--;
1495
+ if (pending === 0) {
1496
+ if (isFirstVisit && !isAnonymous) {
1497
+ if (allSlugs.length > 0) {
1498
+ addSeenSlugs(websiteId, visitorId, allSlugs);
1499
+ }
1500
+ store.getState().setUnseenAnnouncementCount(0);
1501
+ } else {
1502
+ store.getState().setUnseenAnnouncementCount(totalUnseen);
1503
+ }
1504
+ }
1505
+ }
1506
+ for (const tab of announcementTabs) {
1507
+ const cacheKey = `announcements:${tab.id}:${getLocale()}`;
1508
+ const cached = store.getState().contentCache.get(cacheKey);
1509
+ if (cached && Date.now() - cached.ts < CONTENT_CACHE_TTL) {
1510
+ onTabDone(cached.data, tab);
1511
+ } else {
1512
+ client.widget.getContent.query({ tabId: tab.id, page: 1, limit: 5, language: getLocale() }).then((result) => {
1513
+ const entries = result.items ?? [];
1514
+ store.getState().setContentCache(cacheKey, entries);
1515
+ onTabDone(entries, tab);
1516
+ }).catch(() => {
1517
+ onTabDone([], tab);
1518
+ });
1519
+ }
1520
+ }
1521
+ }, [isReady, websiteId, visitorId, isAnonymous, announcementTabs, client, store]);
1522
+ const markEntrySeen = useCallback2(
1523
+ (slug) => {
1524
+ if (!websiteId || !visitorId || announcementTabs.length === 0) return;
1525
+ addSeenSlug(websiteId, visitorId, slug);
1526
+ const seen = getSeenSlugs(websiteId, visitorId);
1527
+ let total = 0;
1528
+ for (const tab of announcementTabs) {
1529
+ const cacheKey = `announcements:${tab.id}:${getLocale()}`;
1530
+ const cached = store.getState().contentCache.get(cacheKey);
1531
+ if (cached) {
1532
+ total += filterUnseen(cached.data, seen).length;
1533
+ }
1534
+ }
1535
+ store.getState().setUnseenAnnouncementCount(total);
1536
+ store.getState().dismissAnnouncementPreview(slug);
1537
+ },
1538
+ [websiteId, visitorId, announcementTabs, store]
1539
+ );
1540
+ const markAllSeen = useCallback2(() => {
1541
+ if (!websiteId || !visitorId || announcementTabs.length === 0) return;
1542
+ for (const tab of announcementTabs) {
1543
+ const cacheKey = `announcements:${tab.id}:${getLocale()}`;
1544
+ const cached = store.getState().contentCache.get(cacheKey);
1545
+ if (cached) {
1546
+ const entries = cached.data;
1547
+ addSeenSlugs(websiteId, visitorId, entries.map((e) => e.slug));
1548
+ }
1549
+ }
1550
+ store.getState().setUnseenAnnouncementCount(0);
1551
+ store.getState().dismissAnnouncementPreview();
1552
+ }, [websiteId, visitorId, announcementTabs, store]);
1553
+ const getUnseenEntries = useCallback2(() => {
1554
+ if (announcementTabs.length === 0 || !websiteId || !visitorId) return [];
1555
+ const seen = getSeenSlugs(websiteId, visitorId);
1556
+ const result = [];
1557
+ for (const tab of announcementTabs) {
1558
+ const cacheKey = `announcements:${tab.id}:${getLocale()}`;
1559
+ const cached = store.getState().contentCache.get(cacheKey);
1560
+ if (cached) {
1561
+ for (const entry of filterUnseen(cached.data, seen)) {
1562
+ result.push({ ...entry, tabId: tab.id });
1563
+ }
1564
+ }
1565
+ }
1566
+ return result;
1567
+ }, [announcementTabs, websiteId, visitorId, store]);
1568
+ return {
1569
+ announcementTabs,
1570
+ markEntrySeen,
1571
+ markAllSeen,
1572
+ getUnseenEntries
1573
+ };
1574
+ }
1357
1575
 
1358
1576
  // src/hooks/use-composer.ts
1359
- import { useCallback as useCallback2, useState as useState2 } from "react";
1577
+ import { useCallback as useCallback3, useState as useState2 } from "react";
1360
1578
  var MAX_ATTACHMENTS = 10;
1361
1579
  var MAX_FILE_SIZE = 10 * 1024 * 1024;
1362
1580
  function useComposer(conversationId) {
@@ -1366,7 +1584,7 @@ function useComposer(conversationId) {
1366
1584
  const [attachments, setAttachments] = useState2([]);
1367
1585
  const [sendError, setSendError] = useState2(null);
1368
1586
  const [emailGateConvId, setEmailGateConvId] = useState2(null);
1369
- const addFiles = useCallback2(
1587
+ const addFiles = useCallback3(
1370
1588
  async (files) => {
1371
1589
  if (!conversationId) return;
1372
1590
  const remaining = MAX_ATTACHMENTS - attachments.length;
@@ -1409,14 +1627,14 @@ function useComposer(conversationId) {
1409
1627
  },
1410
1628
  [conversationId, attachments.length, client]
1411
1629
  );
1412
- const removeAttachment = useCallback2((id) => {
1630
+ const removeAttachment = useCallback3((id) => {
1413
1631
  setAttachments((prev) => {
1414
1632
  const item = prev.find((a) => a.id === id);
1415
1633
  if (item?.previewUrl) URL.revokeObjectURL(item.previewUrl);
1416
1634
  return prev.filter((a) => a.id !== id);
1417
1635
  });
1418
1636
  }, []);
1419
- const submit = useCallback2(async () => {
1637
+ const submit = useCallback3(async () => {
1420
1638
  const trimmed = text.trim();
1421
1639
  const readyParts = attachments.filter((a) => a.part !== null).map((a) => a.part);
1422
1640
  const hasText = trimmed.length > 0;
@@ -1514,7 +1732,7 @@ function useComposer(conversationId) {
1514
1732
  setIsSubmitting(false);
1515
1733
  }
1516
1734
  }, [text, attachments, conversationId, isSubmitting, client, ws, store]);
1517
- const clearSendError = useCallback2(() => setSendError(null), []);
1735
+ const clearSendError = useCallback3(() => setSendError(null), []);
1518
1736
  return {
1519
1737
  text,
1520
1738
  setText,
@@ -1543,17 +1761,17 @@ function fileToBase64(file) {
1543
1761
  }
1544
1762
 
1545
1763
  // src/hooks/use-conversations.ts
1546
- import { useCallback as useCallback3, useRef as useRef2, useState as useState3 } from "react";
1764
+ import { useCallback as useCallback4, useRef as useRef3, useState as useState3 } from "react";
1547
1765
  function useConversations() {
1548
1766
  const { client, store } = useWidgetContext();
1549
1767
  const conversations = useWidgetStore((s) => s.conversations);
1550
1768
  const setActiveConversation = useWidgetStore((s) => s.setActiveConversation);
1551
1769
  const [isCreating, setIsCreating] = useState3(false);
1552
- const clientRef = useRef2(client);
1553
- const storeRef = useRef2(store);
1770
+ const clientRef = useRef3(client);
1771
+ const storeRef = useRef3(store);
1554
1772
  clientRef.current = client;
1555
1773
  storeRef.current = store;
1556
- const create = useCallback3(async (text) => {
1774
+ const create = useCallback4(async (text) => {
1557
1775
  setIsCreating(true);
1558
1776
  const tempConversationId = `temp-${Date.now()}-${Math.random().toString(36).slice(2, 6)}`;
1559
1777
  const now = (/* @__PURE__ */ new Date()).toISOString();
@@ -1617,10 +1835,10 @@ function useConversations() {
1617
1835
  }
1618
1836
 
1619
1837
  // src/hooks/use-i18n.ts
1620
- import { useEffect as useEffect2, useState as useState4 } from "react";
1838
+ import { useEffect as useEffect3, useState as useState4 } from "react";
1621
1839
  function useI18n() {
1622
1840
  const [rev, setRev] = useState4(() => getI18nRevision());
1623
- useEffect2(() => {
1841
+ useEffect3(() => {
1624
1842
  return onLocaleChange(() => {
1625
1843
  setRev(getI18nRevision());
1626
1844
  });
@@ -1629,7 +1847,7 @@ function useI18n() {
1629
1847
  }
1630
1848
 
1631
1849
  // src/hooks/use-presence.ts
1632
- import { useCallback as useCallback4, useRef as useRef3 } from "react";
1850
+ import { useCallback as useCallback5, useRef as useRef4 } from "react";
1633
1851
  function usePresence(conversationId) {
1634
1852
  const { ws } = useWidgetContext();
1635
1853
  const isTyping = useWidgetStore(
@@ -1638,9 +1856,9 @@ function usePresence(conversationId) {
1638
1856
  const isAiProcessing = useWidgetStore(
1639
1857
  (s) => conversationId ? s.aiProcessing.get(conversationId) ?? false : false
1640
1858
  );
1641
- const typingTimer = useRef3(null);
1642
- const isSendingTyping = useRef3(false);
1643
- const setTyping = useCallback4(
1859
+ const typingTimer = useRef4(null);
1860
+ const isSendingTyping = useRef4(false);
1861
+ const setTyping = useCallback5(
1644
1862
  (typing) => {
1645
1863
  if (!conversationId) return;
1646
1864
  if (typingTimer.current) clearTimeout(typingTimer.current);
@@ -1666,7 +1884,7 @@ function usePresence(conversationId) {
1666
1884
  }
1667
1885
 
1668
1886
  // src/hooks/use-timeline.ts
1669
- import { useCallback as useCallback5, useEffect as useEffect3, useRef as useRef4, useState as useState5 } from "react";
1887
+ import { useCallback as useCallback6, useEffect as useEffect4, useRef as useRef5, useState as useState5 } from "react";
1670
1888
  var EMPTY_ITEMS = [];
1671
1889
  function useTimeline(conversationId) {
1672
1890
  const { client, store } = useWidgetContext();
@@ -1675,12 +1893,12 @@ function useTimeline(conversationId) {
1675
1893
  );
1676
1894
  const [isLoading, setIsLoading] = useState5(false);
1677
1895
  const [hasMore, setHasMore] = useState5(false);
1678
- const cursorRef = useRef4(void 0);
1679
- const clientRef = useRef4(client);
1680
- const storeRef = useRef4(store);
1896
+ const cursorRef = useRef5(void 0);
1897
+ const clientRef = useRef5(client);
1898
+ const storeRef = useRef5(store);
1681
1899
  clientRef.current = client;
1682
1900
  storeRef.current = store;
1683
- useEffect3(() => {
1901
+ useEffect4(() => {
1684
1902
  if (!conversationId) return;
1685
1903
  if (conversationId.startsWith("temp-")) return;
1686
1904
  let cancelled = false;
@@ -1721,7 +1939,7 @@ function useTimeline(conversationId) {
1721
1939
  cancelled = true;
1722
1940
  };
1723
1941
  }, [conversationId]);
1724
- const loadMore = useCallback5(async () => {
1942
+ const loadMore = useCallback6(async () => {
1725
1943
  if (!conversationId || !hasMore || isLoading) return;
1726
1944
  setIsLoading(true);
1727
1945
  try {
@@ -1764,7 +1982,7 @@ function useWidget() {
1764
1982
  }
1765
1983
 
1766
1984
  // src/themed/composer.tsx
1767
- import { useCallback as useCallback6, useRef as useRef7, useState as useState7 } from "react";
1985
+ import { useCallback as useCallback7, useRef as useRef8, useState as useState7 } from "react";
1768
1986
 
1769
1987
  // src/themed/icons.tsx
1770
1988
  import { jsx as jsx2, jsxs } from "react/jsx-runtime";
@@ -1942,11 +2160,11 @@ function StarIcon({ size = 24, ...props }) {
1942
2160
  }
1943
2161
 
1944
2162
  // src/themed/message-bubble.tsx
1945
- import { useEffect as useEffect5, useLayoutEffect, useRef as useRef6, useState as useState6 } from "react";
2163
+ import { useEffect as useEffect6, useLayoutEffect, useRef as useRef7, useState as useState6 } from "react";
1946
2164
  import { createPortal } from "react-dom";
1947
2165
 
1948
2166
  // src/themed/content/simple-markdown.tsx
1949
- import { useEffect as useEffect4, useRef as useRef5 } from "react";
2167
+ import { useEffect as useEffect5, useRef as useRef6 } from "react";
1950
2168
  import { jsx as jsx3 } from "react/jsx-runtime";
1951
2169
  var COPY_ICON = `<svg class="hw-code-copy-icon" viewBox="0 0 24 24" fill="none" aria-hidden="true"><path d="M15 9V4.25C15 3.55964 14.4404 3 13.75 3H4.25C3.55964 3 3 3.55964 3 4.25V13.75C3 14.4404 3.55964 15 4.25 15H9M10.25 9H19.75C20.4404 9 21 9.55964 21 10.25V19.75C21 20.4404 20.4404 21 19.75 21H10.25C9.55964 21 9 20.4404 9 19.75V10.25C9 9.55964 9.55964 9 10.25 9Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>`;
1952
2170
  var CHECK_ICON = `<svg class="hw-code-check-icon" viewBox="0 0 24 24" fill="none" aria-hidden="true"><path d="M8 13L11 16L16 8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>`;
@@ -2027,9 +2245,9 @@ function MarkdownContent({
2027
2245
  bodyMarkdown,
2028
2246
  className
2029
2247
  }) {
2030
- const rootRef = useRef5(null);
2248
+ const rootRef = useRef6(null);
2031
2249
  const html = bodyHtml ?? (bodyMarkdown ? renderMarkdown(bodyMarkdown) : "");
2032
- useEffect4(() => {
2250
+ useEffect5(() => {
2033
2251
  const root = rootRef.current;
2034
2252
  if (!root) return;
2035
2253
  const isWhitespaceOnly = (el) => {
@@ -2048,7 +2266,7 @@ function MarkdownContent({
2048
2266
  };
2049
2267
  removeEmpties();
2050
2268
  }, [html]);
2051
- useEffect4(() => {
2269
+ useEffect5(() => {
2052
2270
  const root = rootRef.current;
2053
2271
  if (!root) return;
2054
2272
  const handler = (e) => {
@@ -2093,14 +2311,14 @@ function MessageBubble({
2093
2311
  onQuickReplyTap
2094
2312
  }) {
2095
2313
  const senderClass = `hw-msg--${sender}`;
2096
- const bubbleRef = useRef6(null);
2314
+ const bubbleRef = useRef7(null);
2097
2315
  const imageParts = parts?.filter((p) => p.type === "image") ?? [];
2098
2316
  const fileParts = parts?.filter((p) => p.type === "file") ?? [];
2099
2317
  const linkPreviews = parts?.filter(
2100
2318
  (p) => p.type === "link-preview"
2101
2319
  ) ?? [];
2102
2320
  const hasText = text.length > 0;
2103
- useEffect5(() => {
2321
+ useEffect6(() => {
2104
2322
  const bubble = bubbleRef.current;
2105
2323
  if (!bubble || sender !== "ai" && sender !== "team") return;
2106
2324
  const handleClick = (event) => {
@@ -2157,7 +2375,7 @@ function QuickReplyButtons({
2157
2375
  }
2158
2376
  function PreviewableThumbnail({ src }) {
2159
2377
  const [hover, setHover] = useState6(false);
2160
- const ref = useRef6(null);
2378
+ const ref = useRef7(null);
2161
2379
  return /* @__PURE__ */ jsxs2(Fragment, { children: [
2162
2380
  /* @__PURE__ */ jsx4(
2163
2381
  "a",
@@ -2178,7 +2396,7 @@ function PreviewableThumbnail({ src }) {
2178
2396
  var PREVIEWABLE_EXTS = /* @__PURE__ */ new Set(["pdf", "csv", "png", "jpg", "jpeg", "gif", "webp", "svg"]);
2179
2397
  function FileCard({ file }) {
2180
2398
  const [hover, setHover] = useState6(false);
2181
- const ref = useRef6(null);
2399
+ const ref = useRef7(null);
2182
2400
  const ext = file.fileName.split(".").pop()?.toLowerCase() ?? "";
2183
2401
  const isPreviewable = PREVIEWABLE_EXTS.has(ext);
2184
2402
  const isImage = file.mimeType.startsWith("image/");
@@ -2404,12 +2622,12 @@ function Composer({
2404
2622
  onRemoveAttachment,
2405
2623
  disabled
2406
2624
  }) {
2407
- const ref = useRef7(null);
2408
- const fileInputRef = useRef7(null);
2409
- const supportsFieldSizing = useRef7(
2625
+ const ref = useRef8(null);
2626
+ const fileInputRef = useRef8(null);
2627
+ const supportsFieldSizing = useRef8(
2410
2628
  typeof CSS !== "undefined" && CSS.supports?.("field-sizing", "content")
2411
2629
  );
2412
- const handleKeyDown = useCallback6(
2630
+ const handleKeyDown = useCallback7(
2413
2631
  (e) => {
2414
2632
  if (e.key === "Enter" && !e.shiftKey) {
2415
2633
  e.preventDefault();
@@ -2418,7 +2636,7 @@ function Composer({
2418
2636
  },
2419
2637
  [onSubmit]
2420
2638
  );
2421
- const handleChange = useCallback6(
2639
+ const handleChange = useCallback7(
2422
2640
  (e) => {
2423
2641
  const value = e.target.value;
2424
2642
  if (value.length > MAX_CHARS) return;
@@ -2434,7 +2652,7 @@ function Composer({
2434
2652
  },
2435
2653
  [onTextChange, onTyping]
2436
2654
  );
2437
- const handlePaste = useCallback6(
2655
+ const handlePaste = useCallback7(
2438
2656
  (e) => {
2439
2657
  if (!onAddFiles) return;
2440
2658
  const files = extractFiles(e.clipboardData);
@@ -2446,22 +2664,22 @@ function Composer({
2446
2664
  [onAddFiles]
2447
2665
  );
2448
2666
  const [isDragging, setIsDragging] = useState7(false);
2449
- const dragCountRef = useRef7(0);
2450
- const handleDragEnter = useCallback6((e) => {
2667
+ const dragCountRef = useRef8(0);
2668
+ const handleDragEnter = useCallback7((e) => {
2451
2669
  e.preventDefault();
2452
2670
  dragCountRef.current++;
2453
2671
  if (dragCountRef.current === 1) setIsDragging(true);
2454
2672
  }, []);
2455
- const handleDragLeave = useCallback6((e) => {
2673
+ const handleDragLeave = useCallback7((e) => {
2456
2674
  e.preventDefault();
2457
2675
  dragCountRef.current--;
2458
2676
  if (dragCountRef.current === 0) setIsDragging(false);
2459
2677
  }, []);
2460
- const handleDragOver = useCallback6((e) => {
2678
+ const handleDragOver = useCallback7((e) => {
2461
2679
  e.preventDefault();
2462
2680
  e.dataTransfer.dropEffect = "copy";
2463
2681
  }, []);
2464
- const handleDrop = useCallback6(
2682
+ const handleDrop = useCallback7(
2465
2683
  (e) => {
2466
2684
  e.preventDefault();
2467
2685
  dragCountRef.current = 0;
@@ -2472,10 +2690,10 @@ function Composer({
2472
2690
  },
2473
2691
  [onAddFiles]
2474
2692
  );
2475
- const handleFileClick = useCallback6(() => {
2693
+ const handleFileClick = useCallback7(() => {
2476
2694
  fileInputRef.current?.click();
2477
2695
  }, []);
2478
- const handleFileChange = useCallback6(
2696
+ const handleFileChange = useCallback7(
2479
2697
  (e) => {
2480
2698
  if (!onAddFiles || !e.target.files) return;
2481
2699
  onAddFiles(Array.from(e.target.files));
@@ -2566,7 +2784,7 @@ function Composer({
2566
2784
  }
2567
2785
  function PreviewThumb({ attachment: a, onRemove }) {
2568
2786
  const [hover, setHover] = useState7(false);
2569
- const ref = useRef7(null);
2787
+ const ref = useRef8(null);
2570
2788
  return /* @__PURE__ */ jsxs3(
2571
2789
  "div",
2572
2790
  {
@@ -2605,7 +2823,7 @@ function extractFiles(data) {
2605
2823
  }
2606
2824
 
2607
2825
  // src/themed/debug-overlay.tsx
2608
- import { useEffect as useEffect6, useMemo, useRef as useRef8, useState as useState8 } from "react";
2826
+ import { useEffect as useEffect7, useMemo as useMemo2, useRef as useRef9, useState as useState8 } from "react";
2609
2827
  import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
2610
2828
  var MAX_EVENTS = 60;
2611
2829
  function isDebugEnabled() {
@@ -2626,16 +2844,16 @@ function WidgetDebugOverlay() {
2626
2844
  const [enabled, setEnabled] = useState8(false);
2627
2845
  const [open, setOpen] = useState8(true);
2628
2846
  const [events, setEvents] = useState8([]);
2629
- const eventsRef = useRef8([]);
2847
+ const eventsRef = useRef9([]);
2630
2848
  const activeId = useWidgetStore((s) => s.activeConversationId);
2631
2849
  const messagesMap = useWidgetStore((s) => s.messages);
2632
2850
  const typingUsers = useWidgetStore((s) => s.typingUsers);
2633
2851
  const aiProcessingMap = useWidgetStore((s) => s.aiProcessing);
2634
2852
  const { store } = useWidgetContext();
2635
- useEffect6(() => {
2853
+ useEffect7(() => {
2636
2854
  setEnabled(isDebugEnabled());
2637
2855
  }, []);
2638
- const pushEvent = useMemo(
2856
+ const pushEvent = useMemo2(
2639
2857
  () => (ev) => {
2640
2858
  const e = {
2641
2859
  ...ev,
@@ -2647,7 +2865,7 @@ function WidgetDebugOverlay() {
2647
2865
  },
2648
2866
  []
2649
2867
  );
2650
- useEffect6(() => {
2868
+ useEffect7(() => {
2651
2869
  if (!enabled) return;
2652
2870
  if (typeof window === "undefined" || typeof window.fetch !== "function") return;
2653
2871
  const originalFetch = window.fetch.bind(window);
@@ -2679,7 +2897,7 @@ function WidgetDebugOverlay() {
2679
2897
  window.fetch = originalFetch;
2680
2898
  };
2681
2899
  }, [enabled, pushEvent]);
2682
- useEffect6(() => {
2900
+ useEffect7(() => {
2683
2901
  if (!enabled) return;
2684
2902
  const original = store.getState().handleRealtimeEvent;
2685
2903
  store.setState({
@@ -2693,12 +2911,12 @@ function WidgetDebugOverlay() {
2693
2911
  };
2694
2912
  }, [enabled, store, pushEvent]);
2695
2913
  const activeMessages = activeId ? messagesMap.get(activeId) ?? [] : [];
2696
- const lastMsgSignature = useMemo(
2914
+ const lastMsgSignature = useMemo2(
2697
2915
  () => activeMessages.map((m) => `${m.id}:${senderOf(m)}:${m.createdAt}`).join("|"),
2698
2916
  [activeMessages]
2699
2917
  );
2700
- const prevSigRef = useRef8(lastMsgSignature);
2701
- useEffect6(() => {
2918
+ const prevSigRef = useRef9(lastMsgSignature);
2919
+ useEffect7(() => {
2702
2920
  if (!enabled) return;
2703
2921
  if (prevSigRef.current !== lastMsgSignature) {
2704
2922
  prevSigRef.current = lastMsgSignature;
@@ -2851,11 +3069,11 @@ var styles = {
2851
3069
  };
2852
3070
 
2853
3071
  // src/themed/content/content-tab-view.tsx
2854
- import { useCallback as useCallback10, useEffect as useEffect9 } from "react";
3072
+ import { useCallback as useCallback11, useEffect as useEffect10 } from "react";
2855
3073
 
2856
3074
  // src/hooks/use-content-tab.ts
2857
- import { useCallback as useCallback7, useEffect as useEffect7, useState as useState9 } from "react";
2858
- var EMPTY_TABS = [];
3075
+ import { useCallback as useCallback8, useEffect as useEffect8, useState as useState9 } from "react";
3076
+ var EMPTY_TABS2 = [];
2859
3077
  function listKey(tabId, lang) {
2860
3078
  return `flat:${tabId}:${lang}:list`;
2861
3079
  }
@@ -2870,7 +3088,7 @@ function readCache(cache, key) {
2870
3088
  }
2871
3089
  function useContentTab(tabId) {
2872
3090
  const { client, store } = useWidgetContext();
2873
- const contentTabs = useWidgetStore((s) => s.agentConfig?.contentTabs) ?? EMPTY_TABS;
3091
+ const contentTabs = useWidgetStore((s) => s.agentConfig?.contentTabs) ?? EMPTY_TABS2;
2874
3092
  const tab = contentTabs.find((t2) => t2.id === tabId) ?? null;
2875
3093
  const lang = getLocale();
2876
3094
  const cache = store.getState().contentCache;
@@ -2889,7 +3107,7 @@ function useContentTab(tabId) {
2889
3107
  const [page, setPage] = useState9(
2890
3108
  () => readCache(cache, listKey(tabId, lang))?.page ?? 1
2891
3109
  );
2892
- const fetchEntries = useCallback7(
3110
+ const fetchEntries = useCallback8(
2893
3111
  async (opts) => {
2894
3112
  if (!tab) return;
2895
3113
  const p = opts?.page ?? 1;
@@ -2928,11 +3146,11 @@ function useContentTab(tabId) {
2928
3146
  },
2929
3147
  [client, tabId, tab, store]
2930
3148
  );
2931
- const loadMore = useCallback7(() => {
3149
+ const loadMore = useCallback8(() => {
2932
3150
  if (!hasMore || isLoading) return;
2933
3151
  fetchEntries({ page: page + 1 });
2934
3152
  }, [fetchEntries, hasMore, isLoading, page]);
2935
- const fetchDetail = useCallback7(
3153
+ const fetchDetail = useCallback8(
2936
3154
  async (slug) => {
2937
3155
  if (!tab) return;
2938
3156
  const cached = readCache(
@@ -2966,10 +3184,10 @@ function useContentTab(tabId) {
2966
3184
  },
2967
3185
  [client, tabId, tab, store]
2968
3186
  );
2969
- const clearDetail = useCallback7(() => {
3187
+ const clearDetail = useCallback8(() => {
2970
3188
  setDetail(null);
2971
3189
  }, []);
2972
- useEffect7(() => {
3190
+ useEffect8(() => {
2973
3191
  if (tab && entries.length === 0) {
2974
3192
  fetchEntries({ page: 1, reset: true });
2975
3193
  }
@@ -3078,7 +3296,7 @@ function SkeletonSection({
3078
3296
  }
3079
3297
 
3080
3298
  // src/themed/content/content-list-view.tsx
3081
- import { useCallback as useCallback8, useRef as useRef9, useState as useState10 } from "react";
3299
+ import { useCallback as useCallback9, useRef as useRef10, useState as useState10 } from "react";
3082
3300
  import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
3083
3301
  function ContentListView({
3084
3302
  entries,
@@ -3091,8 +3309,8 @@ function ContentListView({
3091
3309
  display
3092
3310
  }) {
3093
3311
  const [searchText, setSearchText] = useState10("");
3094
- const debounceRef = useRef9(void 0);
3095
- const handleSearch = useCallback8(
3312
+ const debounceRef = useRef10(void 0);
3313
+ const handleSearch = useCallback9(
3096
3314
  (value) => {
3097
3315
  setSearchText(value);
3098
3316
  if (!onSearch) return;
@@ -3172,11 +3390,11 @@ function ContentEntryCard({
3172
3390
  }
3173
3391
 
3174
3392
  // src/themed/content/grouped-content-tab-view.tsx
3175
- import { useEffect as useEffect8, useRef as useRef11 } from "react";
3393
+ import { useEffect as useEffect9, useRef as useRef12 } from "react";
3176
3394
 
3177
3395
  // src/hooks/use-grouped-content-tab.ts
3178
- import { useCallback as useCallback9, useRef as useRef10, useState as useState11 } from "react";
3179
- var EMPTY_TABS2 = [];
3396
+ import { useCallback as useCallback10, useRef as useRef11, useState as useState11 } from "react";
3397
+ var EMPTY_TABS3 = [];
3180
3398
  function categoriesKey(tabId, lang) {
3181
3399
  return `grouped:${tabId}:${lang}:categories`;
3182
3400
  }
@@ -3194,7 +3412,7 @@ function readCache2(cache, key) {
3194
3412
  }
3195
3413
  function useGroupedContentTab(tabId) {
3196
3414
  const { client, store } = useWidgetContext();
3197
- const contentTabs = useWidgetStore((s) => s.agentConfig?.contentTabs) ?? EMPTY_TABS2;
3415
+ const contentTabs = useWidgetStore((s) => s.agentConfig?.contentTabs) ?? EMPTY_TABS3;
3198
3416
  const tab = contentTabs.find((t2) => t2.id === tabId) ?? null;
3199
3417
  const lang = getLocale();
3200
3418
  const cache = store.getState().contentCache;
@@ -3204,12 +3422,12 @@ function useGroupedContentTab(tabId) {
3204
3422
  const [items, setItems] = useState11([]);
3205
3423
  const [isItemsLoading, setIsItemsLoading] = useState11(false);
3206
3424
  const [itemsHasMore, setItemsHasMore] = useState11(false);
3207
- const itemsPageRef = useRef10(1);
3425
+ const itemsPageRef = useRef11(1);
3208
3426
  const [detail, setDetail] = useState11(null);
3209
3427
  const [isLoadingDetail, setIsLoadingDetail] = useState11(false);
3210
3428
  const [activeCategory, setActiveCategory] = useState11(null);
3211
- const allCategoriesRef = useRef10(cachedCategories ?? []);
3212
- const fetchCategories = useCallback9(async () => {
3429
+ const allCategoriesRef = useRef11(cachedCategories ?? []);
3430
+ const fetchCategories = useCallback10(async () => {
3213
3431
  if (!tab) return;
3214
3432
  setIsCategoriesLoading(true);
3215
3433
  try {
@@ -3230,12 +3448,12 @@ function useGroupedContentTab(tabId) {
3230
3448
  setIsCategoriesLoading(false);
3231
3449
  }
3232
3450
  }, [client, tabId, tab, store]);
3233
- const initFetch = useCallback9(() => {
3451
+ const initFetch = useCallback10(() => {
3234
3452
  if (tab && categories.length === 0) {
3235
3453
  fetchCategories();
3236
3454
  }
3237
3455
  }, [fetchCategories, tab, categories.length]);
3238
- const fetchItems = useCallback9(
3456
+ const fetchItems = useCallback10(
3239
3457
  async (opts) => {
3240
3458
  if (!tab?.itemsModelSlug) return;
3241
3459
  const p = opts?.page ?? 1;
@@ -3273,7 +3491,7 @@ function useGroupedContentTab(tabId) {
3273
3491
  },
3274
3492
  [client, tabId, tab, store]
3275
3493
  );
3276
- const selectCategory = useCallback9(
3494
+ const selectCategory = useCallback10(
3277
3495
  (category) => {
3278
3496
  setActiveCategory(category);
3279
3497
  setDetail(null);
@@ -3292,14 +3510,14 @@ function useGroupedContentTab(tabId) {
3292
3510
  },
3293
3511
  [fetchItems, store, tabId]
3294
3512
  );
3295
- const loadMoreItems = useCallback9(() => {
3513
+ const loadMoreItems = useCallback10(() => {
3296
3514
  if (!itemsHasMore || isItemsLoading || !activeCategory) return;
3297
3515
  fetchItems({
3298
3516
  page: itemsPageRef.current + 1,
3299
3517
  groupSlug: activeCategory.slug
3300
3518
  });
3301
3519
  }, [fetchItems, itemsHasMore, isItemsLoading, activeCategory]);
3302
- const searchItems = useCallback9(
3520
+ const searchItems = useCallback10(
3303
3521
  (query) => {
3304
3522
  setItems([]);
3305
3523
  fetchItems({
@@ -3311,7 +3529,7 @@ function useGroupedContentTab(tabId) {
3311
3529
  },
3312
3530
  [fetchItems, activeCategory]
3313
3531
  );
3314
- const fetchDetail = useCallback9(
3532
+ const fetchDetail = useCallback10(
3315
3533
  async (slug) => {
3316
3534
  if (!tab?.itemsModelSlug) return;
3317
3535
  const cached = readCache2(
@@ -3346,7 +3564,7 @@ function useGroupedContentTab(tabId) {
3346
3564
  },
3347
3565
  [client, tabId, tab, store]
3348
3566
  );
3349
- const searchCategories = useCallback9(
3567
+ const searchCategories = useCallback10(
3350
3568
  (query) => {
3351
3569
  if (!query.trim()) {
3352
3570
  setCategories(allCategoriesRef.current);
@@ -3361,10 +3579,10 @@ function useGroupedContentTab(tabId) {
3361
3579
  },
3362
3580
  []
3363
3581
  );
3364
- const clearDetail = useCallback9(() => {
3582
+ const clearDetail = useCallback10(() => {
3365
3583
  setDetail(null);
3366
3584
  }, []);
3367
- const clearCategory = useCallback9(() => {
3585
+ const clearCategory = useCallback10(() => {
3368
3586
  setActiveCategory(null);
3369
3587
  setItems([]);
3370
3588
  setDetail(null);
@@ -3416,16 +3634,16 @@ function GroupedContentTabView({
3416
3634
  fetchDetail,
3417
3635
  clearCategory
3418
3636
  } = useGroupedContentTab(tab.id);
3419
- useEffect8(() => {
3637
+ useEffect9(() => {
3420
3638
  initFetch();
3421
3639
  }, [initFetch]);
3422
- useEffect8(() => {
3640
+ useEffect9(() => {
3423
3641
  if (detailSlug && subView === "content-detail") {
3424
3642
  fetchDetail(detailSlug);
3425
3643
  }
3426
3644
  }, [detailSlug, subView, fetchDetail]);
3427
- const prevSubView = useRef11(subView);
3428
- useEffect8(() => {
3645
+ const prevSubView = useRef12(subView);
3646
+ useEffect9(() => {
3429
3647
  if (prevSubView.current === "content-category" && subView === null) {
3430
3648
  clearCategory();
3431
3649
  }
@@ -3519,10 +3737,10 @@ function FlatContentTabView({
3519
3737
  loadMore,
3520
3738
  fetchDetail
3521
3739
  } = useContentTab(tab.id);
3522
- useEffect9(() => {
3740
+ useEffect10(() => {
3523
3741
  if (detailSlug) fetchDetail(detailSlug);
3524
3742
  }, [detailSlug, fetchDetail]);
3525
- const handleSearch = useCallback10(
3743
+ const handleSearch = useCallback11(
3526
3744
  (query) => {
3527
3745
  fetchEntries({ page: 1, search: query || void 0, reset: true });
3528
3746
  },
@@ -3562,7 +3780,7 @@ function ContentTabIconComponent({ icon }) {
3562
3780
  }
3563
3781
 
3564
3782
  // src/themed/message-list.tsx
3565
- import React, { useEffect as useEffect10, useRef as useRef12 } from "react";
3783
+ import React, { useEffect as useEffect11, useRef as useRef13 } from "react";
3566
3784
  import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
3567
3785
  function parseParts(raw) {
3568
3786
  if (!raw) return null;
@@ -3595,11 +3813,11 @@ function MessageList({
3595
3813
  onLoadMore,
3596
3814
  renderAfterMessages
3597
3815
  }) {
3598
- const bottomRef = useRef12(null);
3599
- const topRef = useRef12(null);
3600
- const containerRef = useRef12(null);
3601
- const prevItemCountRef = useRef12(items.length);
3602
- const isInitialLoadRef = useRef12(true);
3816
+ const bottomRef = useRef13(null);
3817
+ const topRef = useRef13(null);
3818
+ const containerRef = useRef13(null);
3819
+ const prevItemCountRef = useRef13(items.length);
3820
+ const isInitialLoadRef = useRef13(true);
3603
3821
  const agentName = useWidgetStore((s) => s.agentConfig?.name) ?? t("widget.helpway_ai");
3604
3822
  const client = useWidgetClient();
3605
3823
  const activeConversationId = useWidgetStore((s) => s.activeConversationId);
@@ -3612,7 +3830,7 @@ function MessageList({
3612
3830
  },
3613
3831
  [client, activeConversationId]
3614
3832
  );
3615
- useEffect10(() => {
3833
+ useEffect11(() => {
3616
3834
  const prevCount = prevItemCountRef.current;
3617
3835
  const newCount = items.length;
3618
3836
  prevItemCountRef.current = newCount;
@@ -3627,12 +3845,12 @@ function MessageList({
3627
3845
  isInitialLoadRef.current = false;
3628
3846
  }
3629
3847
  }, [items]);
3630
- useEffect10(() => {
3848
+ useEffect11(() => {
3631
3849
  if (isTyping || isAiProcessing) {
3632
3850
  bottomRef.current?.scrollIntoView({ behavior: "smooth" });
3633
3851
  }
3634
3852
  }, [isTyping, isAiProcessing]);
3635
- useEffect10(() => {
3853
+ useEffect11(() => {
3636
3854
  if (!hasMore || !onLoadMore || !topRef.current) return;
3637
3855
  const observer = new IntersectionObserver(
3638
3856
  (entries) => {
@@ -3778,8 +3996,97 @@ function EventCard({ text }) {
3778
3996
  return /* @__PURE__ */ jsx12("div", { className: "hw-event", children: /* @__PURE__ */ jsx12("div", { className: "hw-event-text", children: text }) });
3779
3997
  }
3780
3998
 
3781
- // src/themed/default-widget.tsx
3999
+ // src/themed/message-preview.tsx
4000
+ import { useEffect as useEffect12, useState as useState12 } from "react";
3782
4001
  import { Fragment as Fragment3, jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
4002
+ function MessagePreview({
4003
+ onOpen,
4004
+ avatar,
4005
+ placement = "launcher",
4006
+ autoDismissMs = 8e3,
4007
+ footer
4008
+ }) {
4009
+ const preview = useWidgetStore((s) => s.incomingPreview);
4010
+ const dismissPreview = useWidgetStore((s) => s.dismissPreview);
4011
+ const setActiveConversation = useWidgetStore((s) => s.setActiveConversation);
4012
+ const agentName = useWidgetStore((s) => s.agentConfig?.name) ?? "Support";
4013
+ const [closing, setClosing] = useState12(false);
4014
+ useEffect12(() => {
4015
+ if (!preview || preview.quickReplies) return;
4016
+ if (autoDismissMs == null || autoDismissMs <= 0) return;
4017
+ const timer = setTimeout(() => {
4018
+ setClosing(true);
4019
+ setTimeout(() => dismissPreview(), 200);
4020
+ }, autoDismissMs);
4021
+ return () => clearTimeout(timer);
4022
+ }, [preview, dismissPreview, autoDismissMs]);
4023
+ if (!preview) return null;
4024
+ const handleClose = (e) => {
4025
+ e.stopPropagation();
4026
+ setClosing(true);
4027
+ setTimeout(() => {
4028
+ dismissPreview();
4029
+ setClosing(false);
4030
+ }, 200);
4031
+ };
4032
+ const handleClick = () => {
4033
+ const targetConvId = preview.conversationId;
4034
+ dismissPreview();
4035
+ setActiveConversation(targetConvId);
4036
+ onOpen();
4037
+ };
4038
+ const messages = preview.messages?.length ? preview.messages : [{ text: preview.text }];
4039
+ const hasQr = preview.quickReplies && preview.quickReplies.options.length > 0;
4040
+ const placementClass = placement === "anchored" ? "hw-preview--anchored " : "";
4041
+ return /* @__PURE__ */ jsxs8(
4042
+ "div",
4043
+ {
4044
+ className: `hw-preview ${placementClass}${closing ? "hw-preview--closing" : ""}`,
4045
+ onClick: handleClick,
4046
+ role: "button",
4047
+ tabIndex: 0,
4048
+ children: [
4049
+ /* @__PURE__ */ jsxs8("div", { className: "hw-preview-header", children: [
4050
+ /* @__PURE__ */ jsx13("div", { className: "hw-preview-avatar", children: avatar }),
4051
+ /* @__PURE__ */ jsx13("div", { className: "hw-preview-name", children: agentName }),
4052
+ /* @__PURE__ */ jsx13(
4053
+ "button",
4054
+ {
4055
+ type: "button",
4056
+ className: "hw-preview-close",
4057
+ onClick: handleClose,
4058
+ "aria-label": t("widget.aria_dismiss"),
4059
+ children: /* @__PURE__ */ jsx13(XIcon, { size: 20 })
4060
+ }
4061
+ )
4062
+ ] }),
4063
+ messages.map((m, i) => /* @__PURE__ */ jsx13("div", { className: "hw-preview-body", children: m.text }, i)),
4064
+ hasQr && /* @__PURE__ */ jsxs8(Fragment3, { children: [
4065
+ preview.quickReplies.prompt && /* @__PURE__ */ jsx13("div", { className: "hw-preview-body", children: preview.quickReplies.prompt }),
4066
+ /* @__PURE__ */ jsx13("div", { className: "hw-preview-quick-replies", children: preview.quickReplies.options.map((opt) => /* @__PURE__ */ jsx13(
4067
+ "button",
4068
+ {
4069
+ type: "button",
4070
+ className: "hw-preview-qr-btn",
4071
+ onClick: (e) => {
4072
+ e.stopPropagation();
4073
+ dismissPreview();
4074
+ setActiveConversation(preview.conversationId);
4075
+ onOpen();
4076
+ },
4077
+ children: opt.label
4078
+ },
4079
+ opt.id
4080
+ )) })
4081
+ ] }),
4082
+ footer != null && footer !== false && /* @__PURE__ */ jsx13("div", { className: "hw-preview-footer", children: footer })
4083
+ ]
4084
+ }
4085
+ );
4086
+ }
4087
+
4088
+ // src/themed/default-widget.tsx
4089
+ import { Fragment as Fragment4, jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
3783
4090
  function resolveLabel2(label) {
3784
4091
  if (!label.startsWith("widget.")) return label;
3785
4092
  const resolved = t(label);
@@ -3791,7 +4098,7 @@ var EMPTY_CONTENT_TABS = [];
3791
4098
  var DEFAULT_EN_WELCOME = "Hi there \u{1F44B}\nHow can we help?";
3792
4099
  var DEFAULT_EN_SUBTITLE = "Usually replies in minutes";
3793
4100
  function HelpwayMark({ className }) {
3794
- return /* @__PURE__ */ jsx13(
4101
+ return /* @__PURE__ */ jsx14(
3795
4102
  "svg",
3796
4103
  {
3797
4104
  className,
@@ -3801,7 +4108,7 @@ function HelpwayMark({ className }) {
3801
4108
  fill: "none",
3802
4109
  xmlns: "http://www.w3.org/2000/svg",
3803
4110
  "aria-hidden": "true",
3804
- children: /* @__PURE__ */ jsx13(
4111
+ children: /* @__PURE__ */ jsx14(
3805
4112
  "path",
3806
4113
  {
3807
4114
  d: "M28.7 0H12.8L0 12.8V28.7L12.8 41.5H28.7L41.5 28.7V12.8L28.7 0ZM15 28.9L6.80002 20.7L15 12.5C18.1 9.4 23.2 9.4 26.3 12.5L34.5 20.7L26.3 28.9C23.2 32 18.2 32 15 28.9Z",
@@ -3825,7 +4132,7 @@ function WidgetLogo({
3825
4132
  });
3826
4133
  const logoClass = forceAgent ? "hw-agent-img--logo" : "";
3827
4134
  if (!forceAgent && activeId && assignee?.assigneeImage) {
3828
- return /* @__PURE__ */ jsx13(
4135
+ return /* @__PURE__ */ jsx14(
3829
4136
  "img",
3830
4137
  {
3831
4138
  src: assignee.assigneeImage,
@@ -3835,10 +4142,10 @@ function WidgetLogo({
3835
4142
  );
3836
4143
  }
3837
4144
  if (agentConfig?.avatarUrl) {
3838
- return /* @__PURE__ */ jsx13("img", { src: agentConfig.avatarUrl, alt: "", className: `hw-agent-img ${logoClass} ${className ?? ""}` });
4145
+ return /* @__PURE__ */ jsx14("img", { src: agentConfig.avatarUrl, alt: "", className: `hw-agent-img ${logoClass} ${className ?? ""}` });
3839
4146
  }
3840
4147
  if (agentConfig?.avatarPreset) {
3841
- return /* @__PURE__ */ jsx13(
4148
+ return /* @__PURE__ */ jsx14(
3842
4149
  "div",
3843
4150
  {
3844
4151
  className: `hw-agent-icon ${className ?? ""}`,
@@ -3849,20 +4156,20 @@ function WidgetLogo({
3849
4156
  justifyContent: "center",
3850
4157
  borderRadius: 8
3851
4158
  },
3852
- children: /* @__PURE__ */ jsx13(AgentPresetIcon, { presetId: agentConfig.avatarPreset })
4159
+ children: /* @__PURE__ */ jsx14(AgentPresetIcon, { presetId: agentConfig.avatarPreset })
3853
4160
  }
3854
4161
  );
3855
4162
  }
3856
4163
  if (logoUrl) {
3857
- return /* @__PURE__ */ jsx13("img", { src: logoUrl, alt: "", className: `hw-agent-img hw-agent-img--logo ${className ?? ""}` });
4164
+ return /* @__PURE__ */ jsx14("img", { src: logoUrl, alt: "", className: `hw-agent-img hw-agent-img--logo ${className ?? ""}` });
3858
4165
  }
3859
- return /* @__PURE__ */ jsx13(HelpwayMark, { className });
4166
+ return /* @__PURE__ */ jsx14(HelpwayMark, { className });
3860
4167
  }
3861
4168
  function LauncherIcon({ className }) {
3862
4169
  const agentConfig = useWidgetStore((s) => s.agentConfig);
3863
- const [imgLoaded, setImgLoaded] = useState12(false);
4170
+ const [imgLoaded, setImgLoaded] = useState13(false);
3864
4171
  const imgSrc = agentConfig?.launcherIconUrl ?? null;
3865
- useEffect11(() => {
4172
+ useEffect13(() => {
3866
4173
  if (!imgSrc) return;
3867
4174
  setImgLoaded(false);
3868
4175
  const img = new Image();
@@ -3875,7 +4182,7 @@ function LauncherIcon({ className }) {
3875
4182
  img.onerror = () => setImgLoaded(true);
3876
4183
  }, [imgSrc]);
3877
4184
  if (imgSrc) {
3878
- return /* @__PURE__ */ jsx13(
4185
+ return /* @__PURE__ */ jsx14(
3879
4186
  "img",
3880
4187
  {
3881
4188
  src: imgSrc,
@@ -3885,7 +4192,7 @@ function LauncherIcon({ className }) {
3885
4192
  }
3886
4193
  );
3887
4194
  }
3888
- return /* @__PURE__ */ jsx13(WidgetLogo, { className, forceAgent: true });
4195
+ return /* @__PURE__ */ jsx14(WidgetLogo, { className, forceAgent: true });
3889
4196
  }
3890
4197
  var PRESET_SVG = {
3891
4198
  // Helpway brand mark — octagonal chamfer with stylized "W" inside.
@@ -3944,7 +4251,7 @@ function AgentPresetIcon({ presetId }) {
3944
4251
  const svgContent = PRESET_SVG[presetId] ?? PRESET_SVG.sparkle;
3945
4252
  return (
3946
4253
  // biome-ignore lint: trusted static SVG content from our icon library
3947
- /* @__PURE__ */ jsx13(
4254
+ /* @__PURE__ */ jsx14(
3948
4255
  "svg",
3949
4256
  {
3950
4257
  viewBox: "0 0 24 24",
@@ -3965,6 +4272,8 @@ function DefaultWidget({ hideLauncher = false } = {}) {
3965
4272
  const isDismissed = useWidgetStore((s) => s.isDismissed);
3966
4273
  const { totalUnread } = useUnread();
3967
4274
  const contentTabs = useWidgetStore((s) => s.agentConfig?.contentTabs) ?? EMPTY_CONTENT_TABS;
4275
+ const { announcementTabs, markEntrySeen, markAllSeen, getUnseenEntries } = useAnnouncements();
4276
+ const unseenAnnouncementCount = useWidgetStore((s) => s.unseenAnnouncementCount);
3968
4277
  const visitorContact = useWidgetStore((s) => s.visitor?.contact);
3969
4278
  if (process.env.NODE_ENV !== "production") {
3970
4279
  console.debug("[Widget]", {
@@ -3974,22 +4283,22 @@ function DefaultWidget({ hideLauncher = false } = {}) {
3974
4283
  });
3975
4284
  }
3976
4285
  const storeIsOpen = useWidgetStore((s) => s.isOpen);
3977
- const [isClosing, setIsClosing] = useState12(false);
4286
+ const [isClosing, setIsClosing] = useState13(false);
3978
4287
  const isOpen = storeIsOpen || isClosing;
3979
- const [activeTab, setActiveTab] = useState12("home");
3980
- const [subView, setSubView] = useState12(null);
3981
- const [newText, setNewText] = useState12("");
3982
- const [contentDetailSlug, setContentDetailSlug] = useState12(null);
3983
- const [contentCategoryName, setContentCategoryName] = useState12(null);
3984
- const prevActiveIdRef = useRef13(activeId);
3985
- useEffect11(() => {
4288
+ const [activeTab, setActiveTab] = useState13("home");
4289
+ const [subView, setSubView] = useState13(null);
4290
+ const [newText, setNewText] = useState13("");
4291
+ const [contentDetailSlug, setContentDetailSlug] = useState13(null);
4292
+ const [contentCategoryName, setContentCategoryName] = useState13(null);
4293
+ const prevActiveIdRef = useRef14(activeId);
4294
+ useEffect13(() => {
3986
4295
  if (activeId && activeId !== prevActiveIdRef.current && subView !== "conversation") {
3987
4296
  setSubView("conversation");
3988
4297
  }
3989
4298
  prevActiveIdRef.current = activeId;
3990
4299
  }, [activeId, subView]);
3991
4300
  const prefill = useWidgetStore((s) => s.newConversationPrefill);
3992
- useEffect11(() => {
4301
+ useEffect13(() => {
3993
4302
  if (prefill !== null) {
3994
4303
  if (prefill.length > 0) setNewText(prefill);
3995
4304
  setSubView("new");
@@ -3997,18 +4306,18 @@ function DefaultWidget({ hideLauncher = false } = {}) {
3997
4306
  store.getState().setNewConversationPrefill(null);
3998
4307
  }
3999
4308
  }, [prefill, store]);
4000
- const closeTimerRef = useRef13(void 0);
4309
+ const closeTimerRef = useRef14(void 0);
4001
4310
  const welcomeMsgRaw = agentConfig?.welcomeMessage;
4002
4311
  const welcomeIsFactoryDefault = !welcomeMsgRaw || welcomeMsgRaw === DEFAULT_EN_WELCOME;
4003
4312
  const welcomeMessage = welcomeMsgRaw?.startsWith("widget.") ? t(welcomeMsgRaw) : welcomeIsFactoryDefault ? t("widget.welcome_message") : welcomeMsgRaw;
4004
- const openConversation = useCallback11(
4313
+ const openConversation = useCallback12(
4005
4314
  (id) => {
4006
4315
  setActiveConversation(id);
4007
4316
  setSubView("conversation");
4008
4317
  },
4009
4318
  [setActiveConversation]
4010
4319
  );
4011
- const openNewConversation = useCallback11(() => {
4320
+ const openNewConversation = useCallback12(() => {
4012
4321
  const agentId = agentConfig?.id;
4013
4322
  if (!agentId) {
4014
4323
  setSubView("new");
@@ -4034,7 +4343,7 @@ function DefaultWidget({ hideLauncher = false } = {}) {
4034
4343
  setActiveConversation(tempId);
4035
4344
  setSubView("conversation");
4036
4345
  }, [agentConfig?.id, store, setActiveConversation, welcomeMessage]);
4037
- const goBack = useCallback11(() => {
4346
+ const goBack = useCallback12(() => {
4038
4347
  if (subView === "content-detail") {
4039
4348
  const tabId = activeTab.startsWith("content:") ? activeTab.slice(8) : null;
4040
4349
  const activeContentTab = tabId ? contentTabs.find((t2) => t2.id === tabId) : null;
@@ -4061,7 +4370,7 @@ function DefaultWidget({ hideLauncher = false } = {}) {
4061
4370
  setActiveConversation(null);
4062
4371
  setSubView(null);
4063
4372
  }, [setActiveConversation, subView, activeTab, contentTabs, contentCategoryName, client, store]);
4064
- const switchTab = useCallback11(
4373
+ const switchTab = useCallback12(
4065
4374
  (tab) => {
4066
4375
  tabStateRef.current[activeTab] = { subView, activeId };
4067
4376
  const saved = tabStateRef.current[tab];
@@ -4076,7 +4385,7 @@ function DefaultWidget({ hideLauncher = false } = {}) {
4076
4385
  [activeTab, subView, activeId, setActiveConversation]
4077
4386
  );
4078
4387
  const setStoreOpen = useWidgetStore((s) => s.setOpen);
4079
- const handleBubbleClick = useCallback11(() => {
4388
+ const handleBubbleClick = useCallback12(() => {
4080
4389
  if (storeIsOpen) {
4081
4390
  const leavingId = store.getState().activeConversationId;
4082
4391
  if (leavingId && !leavingId.startsWith("temp-")) {
@@ -4096,7 +4405,7 @@ function DefaultWidget({ hideLauncher = false } = {}) {
4096
4405
  setStoreOpen(true);
4097
4406
  }
4098
4407
  }, [storeIsOpen, setStoreOpen, client, store]);
4099
- const handleClose = useCallback11(() => {
4408
+ const handleClose = useCallback12(() => {
4100
4409
  const leavingId = store.getState().activeConversationId;
4101
4410
  if (leavingId && !leavingId.startsWith("temp-")) {
4102
4411
  store.getState().clearUnread(leavingId);
@@ -4109,7 +4418,7 @@ function DefaultWidget({ hideLauncher = false } = {}) {
4109
4418
  setStoreOpen(false);
4110
4419
  }, 200);
4111
4420
  }, [setStoreOpen, client, store]);
4112
- const handleNewConversation = useCallback11(async () => {
4421
+ const handleNewConversation = useCallback12(async () => {
4113
4422
  const trimmed = newText.trim();
4114
4423
  if (!trimmed || isCreating) return;
4115
4424
  const conv = await create(trimmed);
@@ -4118,16 +4427,16 @@ function DefaultWidget({ hideLauncher = false } = {}) {
4118
4427
  setSubView("conversation");
4119
4428
  }
4120
4429
  }, [newText, isCreating, create]);
4121
- const windowRef = useRef13(null);
4122
- const bubbleRef = useRef13(null);
4123
- const tabStateRef = useRef13({});
4124
- const touchStartY = useRef13(0);
4125
- const touchDeltaY = useRef13(0);
4126
- const handleTouchStart = useCallback11((e) => {
4430
+ const windowRef = useRef14(null);
4431
+ const bubbleRef = useRef14(null);
4432
+ const tabStateRef = useRef14({});
4433
+ const touchStartY = useRef14(0);
4434
+ const touchDeltaY = useRef14(0);
4435
+ const handleTouchStart = useCallback12((e) => {
4127
4436
  touchStartY.current = e.touches[0]?.clientY ?? 0;
4128
4437
  touchDeltaY.current = 0;
4129
4438
  }, []);
4130
- const handleTouchMove = useCallback11((e) => {
4439
+ const handleTouchMove = useCallback12((e) => {
4131
4440
  const delta = (e.touches[0]?.clientY ?? 0) - touchStartY.current;
4132
4441
  touchDeltaY.current = delta;
4133
4442
  if (delta > 0 && windowRef.current) {
@@ -4135,7 +4444,7 @@ function DefaultWidget({ hideLauncher = false } = {}) {
4135
4444
  windowRef.current.style.opacity = `${Math.max(1 - delta / 400, 0.5)}`;
4136
4445
  }
4137
4446
  }, []);
4138
- const handleTouchEnd = useCallback11(() => {
4447
+ const handleTouchEnd = useCallback12(() => {
4139
4448
  if (windowRef.current) {
4140
4449
  windowRef.current.style.transform = "";
4141
4450
  windowRef.current.style.opacity = "";
@@ -4144,7 +4453,7 @@ function DefaultWidget({ hideLauncher = false } = {}) {
4144
4453
  handleClose();
4145
4454
  }
4146
4455
  }, [handleClose]);
4147
- useEffect11(() => {
4456
+ useEffect13(() => {
4148
4457
  if (!isOpen || !windowRef.current) return;
4149
4458
  const vv = window.visualViewport;
4150
4459
  if (!vv) return;
@@ -4161,7 +4470,7 @@ function DefaultWidget({ hideLauncher = false } = {}) {
4161
4470
  win.style.removeProperty("--hw-visible-height");
4162
4471
  };
4163
4472
  }, [isOpen]);
4164
- useEffect11(() => {
4473
+ useEffect13(() => {
4165
4474
  if (!isOpen || !windowRef.current) return;
4166
4475
  const win = windowRef.current;
4167
4476
  const handleKeyDown = (e) => {
@@ -4177,8 +4486,8 @@ function DefaultWidget({ hideLauncher = false } = {}) {
4177
4486
  win.addEventListener("keydown", handleKeyDown);
4178
4487
  return () => win.removeEventListener("keydown", handleKeyDown);
4179
4488
  }, [isOpen, subView, handleClose, goBack]);
4180
- useEffect11(() => {
4181
- if (!isOpen || !windowRef.current) return;
4489
+ useEffect13(() => {
4490
+ if (!isOpen || !windowRef.current || hideLauncher) return;
4182
4491
  const win = windowRef.current;
4183
4492
  const getFocusable = () => win.querySelectorAll(
4184
4493
  'button:not([disabled]), [href], input:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'
@@ -4207,7 +4516,7 @@ function DefaultWidget({ hideLauncher = false } = {}) {
4207
4516
  const focusable = getFocusable();
4208
4517
  if (focusable.length > 0) focusable[0]?.focus();
4209
4518
  return () => win.removeEventListener("keydown", handleTab);
4210
- }, [isOpen]);
4519
+ }, [isOpen, hideLauncher]);
4211
4520
  const showTabBar = subView === null;
4212
4521
  const activeConvSummary = useWidgetStore((s) => {
4213
4522
  const id = s.activeConversationId;
@@ -4225,7 +4534,7 @@ function DefaultWidget({ hideLauncher = false } = {}) {
4225
4534
  const launcherStyle = agentConfig?.launcherStyle ?? "icon";
4226
4535
  const bubbleStyle = agentConfig?.bubbleStyle ?? "rounded";
4227
4536
  const hasUploadedAvatar = !!agentConfig?.avatarUrl;
4228
- return /* @__PURE__ */ jsxs8(
4537
+ return /* @__PURE__ */ jsxs9(
4229
4538
  "div",
4230
4539
  {
4231
4540
  className: "hw-widget",
@@ -4238,16 +4547,16 @@ function DefaultWidget({ hideLauncher = false } = {}) {
4238
4547
  "--hw-window-left": widgetPosition === "bottom-left" ? "0" : "auto"
4239
4548
  },
4240
4549
  children: [
4241
- isOpen && !isReady && !hasBootstrapError && /* @__PURE__ */ jsx13("div", { className: `hw-window ${isClosing ? "hw-window--closing" : ""}`, children: /* @__PURE__ */ jsxs8("div", { className: "hw-skeleton-loading", children: [
4242
- /* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 120 } }),
4243
- /* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 200 } }),
4244
- /* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 160 } })
4550
+ isOpen && !isReady && !hasBootstrapError && /* @__PURE__ */ jsx14("div", { className: `hw-window ${isClosing ? "hw-window--closing" : ""}`, children: /* @__PURE__ */ jsxs9("div", { className: "hw-skeleton-loading", children: [
4551
+ /* @__PURE__ */ jsx14("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 120 } }),
4552
+ /* @__PURE__ */ jsx14("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 200 } }),
4553
+ /* @__PURE__ */ jsx14("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 160 } })
4245
4554
  ] }) }),
4246
- isOpen && hasBootstrapError && /* @__PURE__ */ jsx13("div", { className: `hw-window ${isClosing ? "hw-window--closing" : ""}`, children: /* @__PURE__ */ jsxs8("div", { className: "hw-bootstrap-error", children: [
4247
- /* @__PURE__ */ jsx13("div", { className: "hw-bootstrap-error-text", children: t("widget.error_desc") }),
4248
- /* @__PURE__ */ jsx13("button", { type: "button", className: "hw-bootstrap-error-retry", onClick: retryBootstrap, children: t("widget.retry") })
4555
+ isOpen && hasBootstrapError && /* @__PURE__ */ jsx14("div", { className: `hw-window ${isClosing ? "hw-window--closing" : ""}`, children: /* @__PURE__ */ jsxs9("div", { className: "hw-bootstrap-error", children: [
4556
+ /* @__PURE__ */ jsx14("div", { className: "hw-bootstrap-error-text", children: t("widget.error_desc") }),
4557
+ /* @__PURE__ */ jsx14("button", { type: "button", className: "hw-bootstrap-error-retry", onClick: retryBootstrap, children: t("widget.retry") })
4249
4558
  ] }) }),
4250
- isOpen && isReady && /* @__PURE__ */ jsxs8(
4559
+ isOpen && isReady && /* @__PURE__ */ jsxs9(
4251
4560
  "div",
4252
4561
  {
4253
4562
  ref: windowRef,
@@ -4259,24 +4568,24 @@ function DefaultWidget({ hideLauncher = false } = {}) {
4259
4568
  onTouchMove: handleTouchMove,
4260
4569
  onTouchEnd: handleTouchEnd,
4261
4570
  children: [
4262
- /* @__PURE__ */ jsx13("div", { className: "hw-drag-handle", children: /* @__PURE__ */ jsx13("div", { className: "hw-drag-handle-pill" }) }),
4263
- wsDisconnected && /* @__PURE__ */ jsxs8("div", { className: "hw-disconnect", children: [
4264
- /* @__PURE__ */ jsx13("div", { className: "hw-disconnect-dot" }),
4571
+ /* @__PURE__ */ jsx14("div", { className: "hw-drag-handle", children: /* @__PURE__ */ jsx14("div", { className: "hw-drag-handle-pill" }) }),
4572
+ wsDisconnected && /* @__PURE__ */ jsxs9("div", { className: "hw-disconnect", children: [
4573
+ /* @__PURE__ */ jsx14("div", { className: "hw-disconnect-dot" }),
4265
4574
  t("widget.reconnecting")
4266
4575
  ] }),
4267
4576
  (subView === "content-detail" || subView === "content-category") && (() => {
4268
4577
  const tabId = activeTab.replace("content:", "");
4269
4578
  const contentTab = contentTabs.find((t2) => t2.id === tabId);
4270
4579
  const headerTitle = subView === "content-category" && contentCategoryName ? contentCategoryName : contentTab?.label ? resolveLabel2(contentTab.label) : t("widget.content");
4271
- return /* @__PURE__ */ jsxs8("div", { className: "hw-header hw-header--centered", children: [
4272
- /* @__PURE__ */ jsx13(
4580
+ return /* @__PURE__ */ jsxs9("div", { className: "hw-header hw-header--centered", children: [
4581
+ /* @__PURE__ */ jsx14(
4273
4582
  "button",
4274
4583
  {
4275
4584
  type: "button",
4276
4585
  className: "hw-header-back",
4277
4586
  onClick: goBack,
4278
4587
  "aria-label": t("widget.aria_back"),
4279
- children: /* @__PURE__ */ jsx13(
4588
+ children: /* @__PURE__ */ jsx14(
4280
4589
  "svg",
4281
4590
  {
4282
4591
  viewBox: "0 0 24 24",
@@ -4285,33 +4594,33 @@ function DefaultWidget({ hideLauncher = false } = {}) {
4285
4594
  strokeWidth: 2,
4286
4595
  strokeLinecap: "round",
4287
4596
  strokeLinejoin: "round",
4288
- children: /* @__PURE__ */ jsx13("path", { d: "M15 18l-6-6 6-6" })
4597
+ children: /* @__PURE__ */ jsx14("path", { d: "M15 18l-6-6 6-6" })
4289
4598
  }
4290
4599
  )
4291
4600
  }
4292
4601
  ),
4293
- /* @__PURE__ */ jsx13("div", { className: "hw-header-title", children: headerTitle }),
4294
- /* @__PURE__ */ jsx13(
4602
+ /* @__PURE__ */ jsx14("div", { className: "hw-header-title", children: headerTitle }),
4603
+ /* @__PURE__ */ jsx14(
4295
4604
  "button",
4296
4605
  {
4297
4606
  type: "button",
4298
4607
  className: "hw-header-close",
4299
4608
  onClick: handleClose,
4300
4609
  "aria-label": t("widget.aria_close"),
4301
- children: /* @__PURE__ */ jsx13(XIcon, { size: 20 })
4610
+ children: /* @__PURE__ */ jsx14(XIcon, { size: 20 })
4302
4611
  }
4303
4612
  )
4304
4613
  ] });
4305
4614
  })(),
4306
- subView !== null && subView !== "content-detail" && subView !== "content-category" && /* @__PURE__ */ jsxs8("div", { className: "hw-header hw-header--sub", children: [
4307
- /* @__PURE__ */ jsx13(
4615
+ subView !== null && subView !== "content-detail" && subView !== "content-category" && /* @__PURE__ */ jsxs9("div", { className: "hw-header hw-header--sub", children: [
4616
+ /* @__PURE__ */ jsx14(
4308
4617
  "button",
4309
4618
  {
4310
4619
  type: "button",
4311
4620
  className: "hw-header-back",
4312
4621
  onClick: goBack,
4313
4622
  "aria-label": t("widget.aria_back"),
4314
- children: /* @__PURE__ */ jsx13(
4623
+ children: /* @__PURE__ */ jsx14(
4315
4624
  "svg",
4316
4625
  {
4317
4626
  viewBox: "0 0 24 24",
@@ -4320,66 +4629,82 @@ function DefaultWidget({ hideLauncher = false } = {}) {
4320
4629
  strokeWidth: 2,
4321
4630
  strokeLinecap: "round",
4322
4631
  strokeLinejoin: "round",
4323
- children: /* @__PURE__ */ jsx13("path", { d: "M15 18l-6-6 6-6" })
4632
+ children: /* @__PURE__ */ jsx14("path", { d: "M15 18l-6-6 6-6" })
4324
4633
  }
4325
4634
  )
4326
4635
  }
4327
4636
  ),
4328
- /* @__PURE__ */ jsxs8("div", { className: "hw-header-identity", children: [
4329
- /* @__PURE__ */ jsx13("div", { className: `hw-header-bot-icon${hasTeamAgent ? " hw-header-bot-icon--team" : ""}`, children: hasTeamAgent && activeConvSummary?.lastMessageSenderImage ? /* @__PURE__ */ jsx13("img", { src: activeConvSummary.lastMessageSenderImage, alt: headerName, className: "hw-header-agent-img" }) : hasTeamAgent ? /* @__PURE__ */ jsx13("span", { className: "hw-header-agent-initials", children: headerName.split(" ").map((w) => w[0]).join("").slice(0, 2).toUpperCase() }) : /* @__PURE__ */ jsx13(WidgetLogo, {}) }),
4330
- /* @__PURE__ */ jsxs8("div", { className: "hw-header-info", children: [
4331
- /* @__PURE__ */ jsx13("div", { className: "hw-header-name", children: headerName }),
4332
- /* @__PURE__ */ jsx13("div", { className: "hw-header-status", children: subtitleText })
4637
+ /* @__PURE__ */ jsxs9("div", { className: "hw-header-identity", children: [
4638
+ /* @__PURE__ */ jsx14("div", { className: `hw-header-bot-icon${hasTeamAgent ? " hw-header-bot-icon--team" : ""}`, children: hasTeamAgent && activeConvSummary?.lastMessageSenderImage ? /* @__PURE__ */ jsx14("img", { src: activeConvSummary.lastMessageSenderImage, alt: headerName, className: "hw-header-agent-img" }) : hasTeamAgent ? /* @__PURE__ */ jsx14("span", { className: "hw-header-agent-initials", children: headerName.split(" ").map((w) => w[0]).join("").slice(0, 2).toUpperCase() }) : /* @__PURE__ */ jsx14(WidgetLogo, {}) }),
4639
+ /* @__PURE__ */ jsxs9("div", { className: "hw-header-info", children: [
4640
+ /* @__PURE__ */ jsx14("div", { className: "hw-header-name", children: headerName }),
4641
+ /* @__PURE__ */ jsx14("div", { className: "hw-header-status", children: subtitleText })
4333
4642
  ] })
4334
4643
  ] }),
4335
- /* @__PURE__ */ jsx13(
4644
+ /* @__PURE__ */ jsx14(
4336
4645
  "button",
4337
4646
  {
4338
4647
  type: "button",
4339
4648
  className: "hw-header-close",
4340
4649
  onClick: handleClose,
4341
4650
  "aria-label": t("widget.aria_close"),
4342
- children: /* @__PURE__ */ jsx13(XIcon, { size: 20 })
4651
+ children: /* @__PURE__ */ jsx14(XIcon, { size: 20 })
4343
4652
  }
4344
4653
  )
4345
4654
  ] }),
4346
- subView === null && activeTab === "home" && /* @__PURE__ */ jsxs8(Fragment3, { children: [
4347
- /* @__PURE__ */ jsxs8("div", { className: "hw-hero", children: [
4348
- /* @__PURE__ */ jsxs8("div", { className: "hw-hero-top", children: [
4349
- /* @__PURE__ */ jsx13("div", { className: "hw-hero-bot-icon", children: /* @__PURE__ */ jsx13(WidgetLogo, {}) }),
4350
- /* @__PURE__ */ jsx13(
4655
+ subView === null && activeTab === "home" && /* @__PURE__ */ jsxs9(Fragment4, { children: [
4656
+ /* @__PURE__ */ jsxs9("div", { className: "hw-hero", children: [
4657
+ /* @__PURE__ */ jsxs9("div", { className: "hw-hero-top", children: [
4658
+ /* @__PURE__ */ jsx14("div", { className: "hw-hero-bot-icon", children: /* @__PURE__ */ jsx14(WidgetLogo, {}) }),
4659
+ /* @__PURE__ */ jsx14(
4351
4660
  "button",
4352
4661
  {
4353
4662
  type: "button",
4354
4663
  className: "hw-hero-close",
4355
4664
  onClick: handleClose,
4356
4665
  "aria-label": t("widget.aria_close"),
4357
- children: /* @__PURE__ */ jsx13(XIcon, { size: 20 })
4666
+ children: /* @__PURE__ */ jsx14(XIcon, { size: 20 })
4358
4667
  }
4359
4668
  )
4360
4669
  ] }),
4361
- /* @__PURE__ */ jsx13("div", { className: "hw-hero-greeting", children: welcomeMessage.split("\n").map((line, i) => /* @__PURE__ */ jsxs8(
4670
+ /* @__PURE__ */ jsx14("div", { className: "hw-hero-greeting", children: welcomeMessage.split("\n").map((line, i) => /* @__PURE__ */ jsxs9(
4362
4671
  "span",
4363
4672
  {
4364
4673
  className: i === 0 ? "hw-hero-greeting-name" : "hw-hero-greeting-question",
4365
4674
  children: [
4366
- i > 0 && /* @__PURE__ */ jsx13("br", {}),
4675
+ i > 0 && /* @__PURE__ */ jsx14("br", {}),
4367
4676
  line
4368
4677
  ]
4369
4678
  },
4370
4679
  i
4371
4680
  )) }),
4372
- /* @__PURE__ */ jsx13("div", { className: "hw-hero-subtitle", children: subtitleText })
4681
+ /* @__PURE__ */ jsx14("div", { className: "hw-hero-subtitle", children: subtitleText })
4373
4682
  ] }),
4374
- /* @__PURE__ */ jsx13("div", { className: "hw-sheet", children: /* @__PURE__ */ jsxs8("div", { className: "hw-sheet-inner", children: [
4375
- /* @__PURE__ */ jsxs8("button", { type: "button", className: "hw-card", onClick: openNewConversation, children: [
4376
- /* @__PURE__ */ jsxs8("div", { className: "hw-card-body", children: [
4377
- /* @__PURE__ */ jsx13("div", { className: "hw-card-title", children: t("widget.send_us_message") }),
4378
- /* @__PURE__ */ jsx13("div", { className: "hw-card-meta", children: t("widget.reply_time") })
4683
+ /* @__PURE__ */ jsx14("div", { className: "hw-sheet", children: /* @__PURE__ */ jsxs9("div", { className: "hw-sheet-inner", children: [
4684
+ /* @__PURE__ */ jsxs9("button", { type: "button", className: "hw-card", onClick: openNewConversation, children: [
4685
+ /* @__PURE__ */ jsxs9("div", { className: "hw-card-body", children: [
4686
+ /* @__PURE__ */ jsx14("div", { className: "hw-card-title", children: t("widget.send_us_message") }),
4687
+ /* @__PURE__ */ jsx14("div", { className: "hw-card-meta", children: t("widget.reply_time") })
4379
4688
  ] }),
4380
- /* @__PURE__ */ jsx13("div", { className: "hw-card-arrow", children: /* @__PURE__ */ jsx13(SendIcon, {}) })
4689
+ /* @__PURE__ */ jsx14("div", { className: "hw-card-arrow", children: /* @__PURE__ */ jsx14(SendIcon, {}) })
4381
4690
  ] }),
4382
- /* @__PURE__ */ jsx13(
4691
+ announcementTabs.length > 0 && /* @__PURE__ */ jsx14(
4692
+ WhatsNewCard,
4693
+ {
4694
+ getUnseenEntries,
4695
+ announcementTabs,
4696
+ onViewAll: () => {
4697
+ switchTab(`content:${announcementTabs[0].id}`);
4698
+ },
4699
+ onSelect: (slug, tabId) => {
4700
+ switchTab(`content:${tabId}`);
4701
+ setContentDetailSlug(slug);
4702
+ setSubView("content-detail");
4703
+ markEntrySeen(slug);
4704
+ }
4705
+ }
4706
+ ),
4707
+ /* @__PURE__ */ jsx14(
4383
4708
  HomeView,
4384
4709
  {
4385
4710
  conversations,
@@ -4389,17 +4714,17 @@ function DefaultWidget({ hideLauncher = false } = {}) {
4389
4714
  )
4390
4715
  ] }) })
4391
4716
  ] }),
4392
- subView === null && activeTab === "messages" && /* @__PURE__ */ jsxs8("div", { className: "hw-header hw-header--centered", children: [
4393
- /* @__PURE__ */ jsx13("div", { className: "hw-header-spacer" }),
4394
- /* @__PURE__ */ jsx13("div", { className: "hw-header-title", children: t("widget.messages") }),
4395
- /* @__PURE__ */ jsx13(
4717
+ subView === null && activeTab === "messages" && /* @__PURE__ */ jsxs9("div", { className: "hw-header hw-header--centered", children: [
4718
+ /* @__PURE__ */ jsx14("div", { className: "hw-header-spacer" }),
4719
+ /* @__PURE__ */ jsx14("div", { className: "hw-header-title", children: t("widget.messages") }),
4720
+ /* @__PURE__ */ jsx14(
4396
4721
  "button",
4397
4722
  {
4398
4723
  type: "button",
4399
4724
  className: "hw-header-close",
4400
4725
  onClick: handleClose,
4401
4726
  "aria-label": t("widget.aria_close"),
4402
- children: /* @__PURE__ */ jsx13(XIcon, { size: 20 })
4727
+ children: /* @__PURE__ */ jsx14(XIcon, { size: 20 })
4403
4728
  }
4404
4729
  )
4405
4730
  ] }),
@@ -4407,23 +4732,23 @@ function DefaultWidget({ hideLauncher = false } = {}) {
4407
4732
  const tabId = activeTab.replace("content:", "");
4408
4733
  const contentTab = contentTabs.find((t2) => t2.id === tabId);
4409
4734
  if (!contentTab) return null;
4410
- return /* @__PURE__ */ jsxs8("div", { className: "hw-header hw-header--centered", children: [
4411
- /* @__PURE__ */ jsx13("div", { className: "hw-header-spacer" }),
4412
- /* @__PURE__ */ jsx13("div", { className: "hw-header-title", children: resolveLabel2(contentTab.label) }),
4413
- /* @__PURE__ */ jsx13(
4735
+ return /* @__PURE__ */ jsxs9("div", { className: "hw-header hw-header--centered", children: [
4736
+ /* @__PURE__ */ jsx14("div", { className: "hw-header-spacer" }),
4737
+ /* @__PURE__ */ jsx14("div", { className: "hw-header-title", children: resolveLabel2(contentTab.label) }),
4738
+ /* @__PURE__ */ jsx14(
4414
4739
  "button",
4415
4740
  {
4416
4741
  type: "button",
4417
4742
  className: "hw-header-close",
4418
4743
  onClick: handleClose,
4419
4744
  "aria-label": t("widget.aria_close"),
4420
- children: /* @__PURE__ */ jsx13(XIcon, { size: 20 })
4745
+ children: /* @__PURE__ */ jsx14(XIcon, { size: 20 })
4421
4746
  }
4422
4747
  )
4423
4748
  ] });
4424
4749
  })(),
4425
- (subView !== null || activeTab !== "home") && /* @__PURE__ */ jsxs8("div", { className: "hw-content", children: [
4426
- subView === null && activeTab === "messages" && /* @__PURE__ */ jsx13(
4750
+ (subView !== null || activeTab !== "home") && /* @__PURE__ */ jsxs9("div", { className: "hw-content", children: [
4751
+ subView === null && activeTab === "messages" && /* @__PURE__ */ jsx14(
4427
4752
  MessagesView,
4428
4753
  {
4429
4754
  conversations,
@@ -4431,7 +4756,7 @@ function DefaultWidget({ hideLauncher = false } = {}) {
4431
4756
  onNewClick: openNewConversation
4432
4757
  }
4433
4758
  ),
4434
- subView === "new" && /* @__PURE__ */ jsx13(
4759
+ subView === "new" && /* @__PURE__ */ jsx14(
4435
4760
  NewConversationView,
4436
4761
  {
4437
4762
  text: newText,
@@ -4441,12 +4766,12 @@ function DefaultWidget({ hideLauncher = false } = {}) {
4441
4766
  welcomeMessage
4442
4767
  }
4443
4768
  ),
4444
- subView === "conversation" && activeId && /* @__PURE__ */ jsx13(ConversationView, { conversationId: activeId }),
4769
+ subView === "conversation" && activeId && /* @__PURE__ */ jsx14(ConversationView, { conversationId: activeId }),
4445
4770
  activeTab.startsWith("content:") && (() => {
4446
4771
  const tabId = activeTab.replace("content:", "");
4447
4772
  const contentTab = contentTabs.find((t2) => t2.id === tabId);
4448
4773
  if (!contentTab) return null;
4449
- return /* @__PURE__ */ jsx13(
4774
+ return /* @__PURE__ */ jsx14(
4450
4775
  ContentTabView,
4451
4776
  {
4452
4777
  tab: contentTab,
@@ -4465,27 +4790,42 @@ function DefaultWidget({ hideLauncher = false } = {}) {
4465
4790
  );
4466
4791
  })()
4467
4792
  ] }),
4468
- showTabBar && /* @__PURE__ */ jsx13(
4793
+ showTabBar && /* @__PURE__ */ jsx14(
4469
4794
  TabBar,
4470
4795
  {
4471
4796
  activeTab,
4472
4797
  onTabChange: switchTab,
4473
4798
  unreadCount: totalUnread,
4474
4799
  contentTabs,
4475
- showMessagesTab: agentConfig?.showMessagesTab ?? true
4800
+ showMessagesTab: agentConfig?.showMessagesTab ?? true,
4801
+ unseenAnnouncementCount
4476
4802
  }
4477
4803
  ),
4478
- /* @__PURE__ */ jsxs8("div", { className: "hw-powered", children: [
4804
+ /* @__PURE__ */ jsxs9("div", { className: "hw-powered", children: [
4479
4805
  t("widget.powered_by"),
4480
4806
  " ",
4481
- /* @__PURE__ */ jsx13("a", { href: "https://helpway.ai", target: "_blank", rel: "noopener noreferrer", children: "Helpway" })
4807
+ /* @__PURE__ */ jsx14("a", { href: "https://helpway.ai", target: "_blank", rel: "noopener noreferrer", children: "Helpway" })
4482
4808
  ] })
4483
4809
  ]
4484
4810
  }
4485
4811
  ),
4486
- isReady && !isOpen && !isDismissed && !hideLauncher && /* @__PURE__ */ jsx13(MessagePreview, { onOpen: handleBubbleClick }),
4487
- /* @__PURE__ */ jsx13(WidgetDebugOverlay, {}),
4488
- isReady && !isDismissed && (!hideLauncher || isOpen) && /* @__PURE__ */ jsxs8(
4812
+ isReady && !isOpen && !isDismissed && !hideLauncher && /* @__PURE__ */ jsx14(MessagePreview, { onOpen: handleBubbleClick, avatar: /* @__PURE__ */ jsx14(WidgetLogo, {}) }),
4813
+ isReady && !isOpen && !isDismissed && !hideLauncher && /* @__PURE__ */ jsx14(
4814
+ AnnouncementPreviews,
4815
+ {
4816
+ onOpen: (slug, tabId) => {
4817
+ markEntrySeen(slug);
4818
+ handleBubbleClick();
4819
+ setTimeout(() => {
4820
+ switchTab(`content:${tabId}`);
4821
+ setContentDetailSlug(slug);
4822
+ setSubView("content-detail");
4823
+ }, 50);
4824
+ }
4825
+ }
4826
+ ),
4827
+ /* @__PURE__ */ jsx14(WidgetDebugOverlay, {}),
4828
+ isReady && !isDismissed && (!hideLauncher || isOpen) && /* @__PURE__ */ jsxs9(
4489
4829
  "button",
4490
4830
  {
4491
4831
  ref: bubbleRef,
@@ -4502,22 +4842,25 @@ function DefaultWidget({ hideLauncher = false } = {}) {
4502
4842
  "aria-expanded": isOpen,
4503
4843
  "aria-haspopup": "dialog",
4504
4844
  children: [
4505
- /* @__PURE__ */ jsx13(
4845
+ /* @__PURE__ */ jsx14(
4506
4846
  "span",
4507
4847
  {
4508
4848
  className: `hw-bubble-icon hw-bubble-icon--bot ${isOpen ? "hw-bubble-icon--hidden" : ""}`,
4509
- children: /* @__PURE__ */ jsx13(LauncherIcon, {})
4849
+ children: /* @__PURE__ */ jsx14(LauncherIcon, {})
4510
4850
  }
4511
4851
  ),
4512
- /* @__PURE__ */ jsx13(
4852
+ /* @__PURE__ */ jsx14(
4513
4853
  "span",
4514
4854
  {
4515
4855
  className: `hw-bubble-icon hw-bubble-icon--close ${!isOpen ? "hw-bubble-icon--hidden" : ""}`,
4516
- children: /* @__PURE__ */ jsx13(XIcon, { size: 24 })
4856
+ children: /* @__PURE__ */ jsx14(XIcon, { size: 24 })
4517
4857
  }
4518
4858
  ),
4519
- launcherStyle !== "icon" && !isOpen && /* @__PURE__ */ jsx13("span", { className: "hw-bubble-label", children: launcherStyle === "help" ? t("widget.help") : companyName }),
4520
- !isOpen && totalUnread > 0 && /* @__PURE__ */ jsx13("div", { className: "hw-bubble-badge", children: totalUnread })
4859
+ launcherStyle !== "icon" && !isOpen && /* @__PURE__ */ jsx14("span", { className: "hw-bubble-label", children: launcherStyle === "help" ? t("widget.help") : companyName }),
4860
+ !isOpen && (totalUnread > 0 || unseenAnnouncementCount > 0) && /* @__PURE__ */ jsxs9("div", { className: "hw-bubble-badge", children: [
4861
+ totalUnread > 0 ? totalUnread : "",
4862
+ totalUnread === 0 && unseenAnnouncementCount > 0 && /* @__PURE__ */ jsx14("span", { className: "hw-bubble-badge-dot" })
4863
+ ] })
4521
4864
  ]
4522
4865
  }
4523
4866
  )
@@ -4530,10 +4873,11 @@ function TabBar({
4530
4873
  onTabChange,
4531
4874
  unreadCount,
4532
4875
  contentTabs,
4533
- showMessagesTab = true
4876
+ showMessagesTab = true,
4877
+ unseenAnnouncementCount = 0
4534
4878
  }) {
4535
- return /* @__PURE__ */ jsxs8("div", { className: "hw-tabs", role: "tablist", children: [
4536
- /* @__PURE__ */ jsxs8(
4879
+ return /* @__PURE__ */ jsxs9("div", { className: "hw-tabs", role: "tablist", children: [
4880
+ /* @__PURE__ */ jsxs9(
4537
4881
  "button",
4538
4882
  {
4539
4883
  type: "button",
@@ -4542,12 +4886,12 @@ function TabBar({
4542
4886
  role: "tab",
4543
4887
  "aria-selected": activeTab === "home",
4544
4888
  children: [
4545
- /* @__PURE__ */ jsx13(HomeIcon, {}),
4546
- /* @__PURE__ */ jsx13("span", { children: t("widget.home") })
4889
+ /* @__PURE__ */ jsx14(HomeIcon, {}),
4890
+ /* @__PURE__ */ jsx14("span", { children: t("widget.home") })
4547
4891
  ]
4548
4892
  }
4549
4893
  ),
4550
- showMessagesTab && /* @__PURE__ */ jsxs8(
4894
+ showMessagesTab && /* @__PURE__ */ jsxs9(
4551
4895
  "button",
4552
4896
  {
4553
4897
  type: "button",
@@ -4556,15 +4900,15 @@ function TabBar({
4556
4900
  role: "tab",
4557
4901
  "aria-selected": activeTab === "messages",
4558
4902
  children: [
4559
- /* @__PURE__ */ jsxs8("span", { className: "hw-tabs-icon-wrap", children: [
4560
- /* @__PURE__ */ jsx13(MessagesIcon, {}),
4561
- unreadCount > 0 && /* @__PURE__ */ jsx13("span", { className: "hw-tabs-badge", children: unreadCount > 99 ? "99+" : unreadCount })
4903
+ /* @__PURE__ */ jsxs9("span", { className: "hw-tabs-icon-wrap", children: [
4904
+ /* @__PURE__ */ jsx14(MessagesIcon, {}),
4905
+ unreadCount > 0 && /* @__PURE__ */ jsx14("span", { className: "hw-tabs-badge", children: unreadCount > 99 ? "99+" : unreadCount })
4562
4906
  ] }),
4563
- /* @__PURE__ */ jsx13("span", { children: t("widget.messages") })
4907
+ /* @__PURE__ */ jsx14("span", { children: t("widget.messages") })
4564
4908
  ]
4565
4909
  }
4566
4910
  ),
4567
- contentTabs.map((tab) => /* @__PURE__ */ jsxs8(
4911
+ contentTabs.map((tab) => /* @__PURE__ */ jsxs9(
4568
4912
  "button",
4569
4913
  {
4570
4914
  type: "button",
@@ -4573,8 +4917,11 @@ function TabBar({
4573
4917
  role: "tab",
4574
4918
  "aria-selected": activeTab === `content:${tab.id}`,
4575
4919
  children: [
4576
- /* @__PURE__ */ jsx13(ContentTabIconComponent, { icon: tab.icon }),
4577
- /* @__PURE__ */ jsx13("span", { children: resolveLabel2(tab.label) })
4920
+ /* @__PURE__ */ jsxs9("span", { className: "hw-tabs-icon-wrap", children: [
4921
+ /* @__PURE__ */ jsx14(ContentTabIconComponent, { icon: tab.icon }),
4922
+ tab.isAnnouncements && unseenAnnouncementCount > 0 && /* @__PURE__ */ jsx14("span", { className: "hw-tabs-dot" })
4923
+ ] }),
4924
+ /* @__PURE__ */ jsx14("span", { children: resolveLabel2(tab.label) })
4578
4925
  ]
4579
4926
  },
4580
4927
  tab.id
@@ -4588,9 +4935,9 @@ function HomeView({
4588
4935
  }) {
4589
4936
  const recent = conversations.slice(0, 3);
4590
4937
  if (recent.length === 0) return null;
4591
- return /* @__PURE__ */ jsxs8("div", { className: "hw-recent-card", children: [
4592
- /* @__PURE__ */ jsx13("div", { className: "hw-recent-header", children: t("widget.recent_conversations") }),
4593
- recent.map((conv, i) => /* @__PURE__ */ jsx13(
4938
+ return /* @__PURE__ */ jsxs9("div", { className: "hw-recent-card", children: [
4939
+ /* @__PURE__ */ jsx14("div", { className: "hw-recent-header", children: t("widget.recent_conversations") }),
4940
+ recent.map((conv, i) => /* @__PURE__ */ jsx14(
4594
4941
  ConversationRow,
4595
4942
  {
4596
4943
  conversation: conv,
@@ -4599,7 +4946,7 @@ function HomeView({
4599
4946
  },
4600
4947
  conv.id
4601
4948
  )),
4602
- conversations.length > 3 && /* @__PURE__ */ jsx13("button", { type: "button", className: "hw-recent-see-all", onClick: onMessagesClick, children: t("widget.see_all") })
4949
+ conversations.length > 3 && /* @__PURE__ */ jsx14("button", { type: "button", className: "hw-recent-see-all", onClick: onMessagesClick, children: t("widget.see_all") })
4603
4950
  ] });
4604
4951
  }
4605
4952
  function MessagesView({
@@ -4608,28 +4955,28 @@ function MessagesView({
4608
4955
  onNewClick
4609
4956
  }) {
4610
4957
  if (conversations.length === 0) {
4611
- return /* @__PURE__ */ jsxs8("div", { className: "hw-empty-state", children: [
4612
- /* @__PURE__ */ jsx13("div", { className: "hw-empty-icon-wrap", children: /* @__PURE__ */ jsx13(MessagesIcon, {}) }),
4613
- /* @__PURE__ */ jsx13("div", { className: "hw-empty-title", children: t("widget.no_messages") }),
4614
- /* @__PURE__ */ jsx13("div", { className: "hw-empty-desc", children: t("widget.no_messages_desc") }),
4615
- /* @__PURE__ */ jsx13("button", { type: "button", className: "hw-empty-btn", onClick: onNewClick, children: t("widget.start_conversation") })
4958
+ return /* @__PURE__ */ jsxs9("div", { className: "hw-empty-state", children: [
4959
+ /* @__PURE__ */ jsx14("div", { className: "hw-empty-icon-wrap", children: /* @__PURE__ */ jsx14(MessagesIcon, {}) }),
4960
+ /* @__PURE__ */ jsx14("div", { className: "hw-empty-title", children: t("widget.no_messages") }),
4961
+ /* @__PURE__ */ jsx14("div", { className: "hw-empty-desc", children: t("widget.no_messages_desc") }),
4962
+ /* @__PURE__ */ jsx14("button", { type: "button", className: "hw-empty-btn", onClick: onNewClick, children: t("widget.start_conversation") })
4616
4963
  ] });
4617
4964
  }
4618
- return /* @__PURE__ */ jsx13("div", { className: "hw-msgs-tab", children: conversations.map((conv) => /* @__PURE__ */ jsx13(ConversationCard, { conversation: conv, onSelect }, conv.id)) });
4965
+ return /* @__PURE__ */ jsx14("div", { className: "hw-msgs-tab", children: conversations.map((conv) => /* @__PURE__ */ jsx14(ConversationCard, { conversation: conv, onSelect }, conv.id)) });
4619
4966
  }
4620
4967
  function ConvCardBody({ conv }) {
4621
4968
  const agentName = useWidgetStore((s) => s.agentConfig?.name) ?? "Support";
4622
4969
  const isTeam = conv.lastMessageSenderType === "team" && conv.lastMessageSenderName;
4623
4970
  const displayName = isTeam ? conv.lastMessageSenderName : agentName;
4624
4971
  const preview = conv.lastMessageText ?? t("widget.no_preview");
4625
- return /* @__PURE__ */ jsxs8(Fragment3, { children: [
4626
- /* @__PURE__ */ jsx13("div", { className: `hw-conv-card-avatar${isTeam ? " hw-conv-card-avatar--team" : ""}`, children: isTeam ? conv.lastMessageSenderImage ? /* @__PURE__ */ jsx13("img", { src: conv.lastMessageSenderImage, alt: displayName, className: "hw-conv-card-avatar-img" }) : /* @__PURE__ */ jsx13("span", { className: "hw-conv-card-avatar-initials", children: displayName.split(" ").map((w) => w[0]).join("").slice(0, 2).toUpperCase() }) : /* @__PURE__ */ jsx13(WidgetLogo, {}) }),
4627
- /* @__PURE__ */ jsxs8("div", { className: "hw-conv-card-content", children: [
4628
- /* @__PURE__ */ jsxs8("div", { className: "hw-conv-card-top", children: [
4629
- /* @__PURE__ */ jsx13("span", { className: "hw-conv-card-name", children: displayName }),
4630
- conv.lastMessageAt && /* @__PURE__ */ jsx13("span", { className: "hw-conv-card-time", children: formatRelativeTime(conv.lastMessageAt) })
4972
+ return /* @__PURE__ */ jsxs9(Fragment4, { children: [
4973
+ /* @__PURE__ */ jsx14("div", { className: `hw-conv-card-avatar${isTeam ? " hw-conv-card-avatar--team" : ""}`, children: isTeam ? conv.lastMessageSenderImage ? /* @__PURE__ */ jsx14("img", { src: conv.lastMessageSenderImage, alt: displayName, className: "hw-conv-card-avatar-img" }) : /* @__PURE__ */ jsx14("span", { className: "hw-conv-card-avatar-initials", children: displayName.split(" ").map((w) => w[0]).join("").slice(0, 2).toUpperCase() }) : /* @__PURE__ */ jsx14(WidgetLogo, {}) }),
4974
+ /* @__PURE__ */ jsxs9("div", { className: "hw-conv-card-content", children: [
4975
+ /* @__PURE__ */ jsxs9("div", { className: "hw-conv-card-top", children: [
4976
+ /* @__PURE__ */ jsx14("span", { className: "hw-conv-card-name", children: displayName }),
4977
+ conv.lastMessageAt && /* @__PURE__ */ jsx14("span", { className: "hw-conv-card-time", children: formatRelativeTime(conv.lastMessageAt) })
4631
4978
  ] }),
4632
- /* @__PURE__ */ jsx13("div", { className: "hw-conv-card-preview", children: preview })
4979
+ /* @__PURE__ */ jsx14("div", { className: "hw-conv-card-preview", children: preview })
4633
4980
  ] })
4634
4981
  ] });
4635
4982
  }
@@ -4638,15 +4985,15 @@ function ConversationCard({
4638
4985
  onSelect
4639
4986
  }) {
4640
4987
  const hasUnread = conv.unreadCount > 0;
4641
- return /* @__PURE__ */ jsxs8(
4988
+ return /* @__PURE__ */ jsxs9(
4642
4989
  "button",
4643
4990
  {
4644
4991
  type: "button",
4645
4992
  className: `hw-conv-card ${hasUnread ? "hw-conv-card--unread" : ""}`,
4646
4993
  onClick: () => onSelect(conv.id),
4647
4994
  children: [
4648
- /* @__PURE__ */ jsx13("div", { className: "hw-conv-card-row", children: /* @__PURE__ */ jsx13(ConvCardBody, { conv }) }),
4649
- hasUnread && /* @__PURE__ */ jsx13("div", { className: "hw-conv-card-badge", children: conv.unreadCount })
4995
+ /* @__PURE__ */ jsx14("div", { className: "hw-conv-card-row", children: /* @__PURE__ */ jsx14(ConvCardBody, { conv }) }),
4996
+ hasUnread && /* @__PURE__ */ jsx14("div", { className: "hw-conv-card-badge", children: conv.unreadCount })
4650
4997
  ]
4651
4998
  }
4652
4999
  );
@@ -4657,15 +5004,15 @@ function ConversationRow({
4657
5004
  isLast
4658
5005
  }) {
4659
5006
  const hasUnread = conv.unreadCount > 0;
4660
- return /* @__PURE__ */ jsxs8(
5007
+ return /* @__PURE__ */ jsxs9(
4661
5008
  "button",
4662
5009
  {
4663
5010
  type: "button",
4664
5011
  className: `hw-recent-row ${hasUnread ? "hw-recent-row--unread" : ""} ${isLast ? "hw-recent-row--last" : ""}`,
4665
5012
  onClick: () => onSelect(conv.id),
4666
5013
  children: [
4667
- /* @__PURE__ */ jsx13(ConvCardBody, { conv }),
4668
- hasUnread && /* @__PURE__ */ jsx13("div", { className: "hw-recent-row-badge", children: conv.unreadCount })
5014
+ /* @__PURE__ */ jsx14(ConvCardBody, { conv }),
5015
+ hasUnread && /* @__PURE__ */ jsx14("div", { className: "hw-recent-row-badge", children: conv.unreadCount })
4669
5016
  ]
4670
5017
  }
4671
5018
  );
@@ -4673,10 +5020,10 @@ function ConversationRow({
4673
5020
  function InlineEmailPrompt({ conversationId }) {
4674
5021
  const { client, store } = useWidgetContext();
4675
5022
  const updateContact = useWidgetStore((s) => s.updateVisitorContact);
4676
- const [email, setEmail] = useState12("");
4677
- const [isSubmitting, setIsSubmitting] = useState12(false);
4678
- const [isSuccess, setIsSuccess] = useState12(false);
4679
- const [hasError, setHasError] = useState12(false);
5023
+ const [email, setEmail] = useState13("");
5024
+ const [isSubmitting, setIsSubmitting] = useState13(false);
5025
+ const [isSuccess, setIsSuccess] = useState13(false);
5026
+ const [hasError, setHasError] = useState13(false);
4680
5027
  const handleSubmit = async () => {
4681
5028
  const trimmed = email.trim();
4682
5029
  if (!trimmed || !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(trimmed)) {
@@ -4717,23 +5064,23 @@ function InlineEmailPrompt({ conversationId }) {
4717
5064
  }
4718
5065
  };
4719
5066
  if (isSuccess) {
4720
- return /* @__PURE__ */ jsxs8("div", { className: "hw-email-card hw-email-card--success", children: [
4721
- /* @__PURE__ */ jsx13("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "#22c55e", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx13("polyline", { points: "20 6 9 17 4 12" }) }),
5067
+ return /* @__PURE__ */ jsxs9("div", { className: "hw-email-card hw-email-card--success", children: [
5068
+ /* @__PURE__ */ jsx14("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "#22c55e", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx14("polyline", { points: "20 6 9 17 4 12" }) }),
4722
5069
  t("widget.email_saved")
4723
5070
  ] });
4724
5071
  }
4725
- return /* @__PURE__ */ jsxs8("div", { className: "hw-email-card", children: [
4726
- /* @__PURE__ */ jsxs8("div", { className: "hw-email-card-header", children: [
4727
- /* @__PURE__ */ jsx13("div", { className: "hw-email-card-icon", children: /* @__PURE__ */ jsxs8("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
4728
- /* @__PURE__ */ jsx13("rect", { x: "2", y: "4", width: "20", height: "16", rx: "2" }),
4729
- /* @__PURE__ */ jsx13("path", { d: "M22 7l-10 7L2 7" })
5072
+ return /* @__PURE__ */ jsxs9("div", { className: "hw-email-card", children: [
5073
+ /* @__PURE__ */ jsxs9("div", { className: "hw-email-card-header", children: [
5074
+ /* @__PURE__ */ jsx14("div", { className: "hw-email-card-icon", children: /* @__PURE__ */ jsxs9("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
5075
+ /* @__PURE__ */ jsx14("rect", { x: "2", y: "4", width: "20", height: "16", rx: "2" }),
5076
+ /* @__PURE__ */ jsx14("path", { d: "M22 7l-10 7L2 7" })
4730
5077
  ] }) }),
4731
- /* @__PURE__ */ jsxs8("div", { children: [
4732
- /* @__PURE__ */ jsx13("p", { className: "hw-email-card-title", children: t("widget.email_title") }),
4733
- /* @__PURE__ */ jsx13("p", { className: "hw-email-card-subtitle", children: t("widget.email_subtitle") })
5078
+ /* @__PURE__ */ jsxs9("div", { children: [
5079
+ /* @__PURE__ */ jsx14("p", { className: "hw-email-card-title", children: t("widget.email_title") }),
5080
+ /* @__PURE__ */ jsx14("p", { className: "hw-email-card-subtitle", children: t("widget.email_subtitle") })
4734
5081
  ] })
4735
5082
  ] }),
4736
- /* @__PURE__ */ jsx13(
5083
+ /* @__PURE__ */ jsx14(
4737
5084
  "input",
4738
5085
  {
4739
5086
  type: "email",
@@ -4749,14 +5096,14 @@ function InlineEmailPrompt({ conversationId }) {
4749
5096
  placeholder: t("widget.email_placeholder")
4750
5097
  }
4751
5098
  ),
4752
- /* @__PURE__ */ jsx13(
5099
+ /* @__PURE__ */ jsx14(
4753
5100
  "button",
4754
5101
  {
4755
5102
  type: "button",
4756
5103
  className: "hw-email-card-submit",
4757
5104
  onClick: handleSubmit,
4758
5105
  disabled: isSubmitting || !email.trim(),
4759
- children: isSubmitting ? /* @__PURE__ */ jsx13("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ jsx13("circle", { cx: "12", cy: "12", r: "10", strokeDasharray: "32", strokeDashoffset: "32", children: /* @__PURE__ */ jsx13("animate", { attributeName: "stroke-dashoffset", values: "32;0", dur: "1s", repeatCount: "indefinite" }) }) }) : t("widget.email_continue")
5106
+ children: isSubmitting ? /* @__PURE__ */ jsx14("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ jsx14("circle", { cx: "12", cy: "12", r: "10", strokeDasharray: "32", strokeDashoffset: "32", children: /* @__PURE__ */ jsx14("animate", { attributeName: "stroke-dashoffset", values: "32;0", dur: "1s", repeatCount: "indefinite" }) }) }) : t("widget.email_continue")
4760
5107
  }
4761
5108
  )
4762
5109
  ] });
@@ -4768,8 +5115,8 @@ function NewConversationView({
4768
5115
  isSubmitting,
4769
5116
  welcomeMessage
4770
5117
  }) {
4771
- return /* @__PURE__ */ jsxs8("div", { className: "hw-new", children: [
4772
- /* @__PURE__ */ jsx13("div", { className: "hw-new-welcome", children: /* @__PURE__ */ jsx13(
5118
+ return /* @__PURE__ */ jsxs9("div", { className: "hw-new", children: [
5119
+ /* @__PURE__ */ jsx14("div", { className: "hw-new-welcome", children: /* @__PURE__ */ jsx14(
4773
5120
  MessageBubble,
4774
5121
  {
4775
5122
  text: welcomeMessage,
@@ -4777,7 +5124,7 @@ function NewConversationView({
4777
5124
  parts: null
4778
5125
  }
4779
5126
  ) }),
4780
- /* @__PURE__ */ jsx13(
5127
+ /* @__PURE__ */ jsx14(
4781
5128
  Composer,
4782
5129
  {
4783
5130
  text,
@@ -4822,27 +5169,27 @@ function ConversationView({ conversationId }) {
4822
5169
  const needsEmailPostReply = !!agentConfig?.requireVisitorEmail && !hasEmail && visitorMessageCount >= 2 && hasAiReply;
4823
5170
  const needsEmail = needsEmailPostReply || !!emailGateConvId;
4824
5171
  if (isLoading && items.length === 0) {
4825
- return /* @__PURE__ */ jsx13("div", { className: "hw-messages", children: /* @__PURE__ */ jsxs8("div", { className: "hw-skeleton-messages", children: [
4826
- /* @__PURE__ */ jsxs8("div", { className: "hw-skeleton-msg", children: [
4827
- /* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-avatar" }),
4828
- /* @__PURE__ */ jsxs8("div", { className: "hw-skeleton-bubble", children: [
4829
- /* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 140 } }),
4830
- /* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 200 } })
5172
+ return /* @__PURE__ */ jsx14("div", { className: "hw-messages", children: /* @__PURE__ */ jsxs9("div", { className: "hw-skeleton-messages", children: [
5173
+ /* @__PURE__ */ jsxs9("div", { className: "hw-skeleton-msg", children: [
5174
+ /* @__PURE__ */ jsx14("div", { className: "hw-skeleton hw-skeleton-avatar" }),
5175
+ /* @__PURE__ */ jsxs9("div", { className: "hw-skeleton-bubble", children: [
5176
+ /* @__PURE__ */ jsx14("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 140 } }),
5177
+ /* @__PURE__ */ jsx14("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 200 } })
4831
5178
  ] })
4832
5179
  ] }),
4833
- /* @__PURE__ */ jsx13("div", { className: "hw-skeleton-msg hw-skeleton-msg--right", children: /* @__PURE__ */ jsx13("div", { className: "hw-skeleton-bubble", style: { alignItems: "flex-end" }, children: /* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 160 } }) }) }),
4834
- /* @__PURE__ */ jsxs8("div", { className: "hw-skeleton-msg", children: [
4835
- /* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-avatar" }),
4836
- /* @__PURE__ */ jsxs8("div", { className: "hw-skeleton-bubble", children: [
4837
- /* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 180 } }),
4838
- /* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 120 } }),
4839
- /* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 80 } })
5180
+ /* @__PURE__ */ jsx14("div", { className: "hw-skeleton-msg hw-skeleton-msg--right", children: /* @__PURE__ */ jsx14("div", { className: "hw-skeleton-bubble", style: { alignItems: "flex-end" }, children: /* @__PURE__ */ jsx14("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 160 } }) }) }),
5181
+ /* @__PURE__ */ jsxs9("div", { className: "hw-skeleton-msg", children: [
5182
+ /* @__PURE__ */ jsx14("div", { className: "hw-skeleton hw-skeleton-avatar" }),
5183
+ /* @__PURE__ */ jsxs9("div", { className: "hw-skeleton-bubble", children: [
5184
+ /* @__PURE__ */ jsx14("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 180 } }),
5185
+ /* @__PURE__ */ jsx14("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 120 } }),
5186
+ /* @__PURE__ */ jsx14("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 80 } })
4840
5187
  ] })
4841
5188
  ] })
4842
5189
  ] }) });
4843
5190
  }
4844
- return /* @__PURE__ */ jsxs8(Fragment3, { children: [
4845
- /* @__PURE__ */ jsx13(
5191
+ return /* @__PURE__ */ jsxs9(Fragment4, { children: [
5192
+ /* @__PURE__ */ jsx14(
4846
5193
  MessageList,
4847
5194
  {
4848
5195
  items,
@@ -4854,63 +5201,55 @@ function ConversationView({ conversationId }) {
4854
5201
  onLoadMore: loadMore
4855
5202
  }
4856
5203
  ),
4857
- isResolved ? /* @__PURE__ */ jsx13(ResolvedBanner, { conversationId }) : /* @__PURE__ */ jsxs8(Fragment3, { children: [
4858
- needsEmail && /* @__PURE__ */ jsx13(InlineEmailPrompt, { conversationId: emailGateConvId ?? void 0 }),
4859
- sendError && /* @__PURE__ */ jsxs8("div", { className: "hw-send-error", children: [
4860
- sendError,
4861
- /* @__PURE__ */ jsx13(
4862
- "button",
4863
- {
4864
- type: "button",
4865
- className: "hw-send-error-retry",
4866
- onClick: () => {
4867
- clearSendError();
4868
- submit();
4869
- },
4870
- children: t("widget.retry")
4871
- }
4872
- )
4873
- ] }),
4874
- /* @__PURE__ */ jsx13(
4875
- Composer,
5204
+ isResolved && /* @__PURE__ */ jsx14(ResolvedBanner, { conversationId }),
5205
+ needsEmail && /* @__PURE__ */ jsx14(InlineEmailPrompt, { conversationId: emailGateConvId ?? void 0 }),
5206
+ sendError && /* @__PURE__ */ jsxs9("div", { className: "hw-send-error", children: [
5207
+ sendError,
5208
+ /* @__PURE__ */ jsx14(
5209
+ "button",
4876
5210
  {
4877
- text,
4878
- onTextChange: setText,
4879
- onSubmit: submit,
4880
- onTyping: setTyping,
4881
- isSubmitting,
4882
- attachments,
4883
- onAddFiles: addFiles,
4884
- onRemoveAttachment: removeAttachment,
4885
- disabled: needsEmail
5211
+ type: "button",
5212
+ className: "hw-send-error-retry",
5213
+ onClick: () => {
5214
+ clearSendError();
5215
+ submit();
5216
+ },
5217
+ children: t("widget.retry")
4886
5218
  }
4887
5219
  )
4888
- ] })
5220
+ ] }),
5221
+ /* @__PURE__ */ jsx14(
5222
+ Composer,
5223
+ {
5224
+ text,
5225
+ onTextChange: setText,
5226
+ onSubmit: submit,
5227
+ onTyping: setTyping,
5228
+ isSubmitting,
5229
+ attachments,
5230
+ onAddFiles: addFiles,
5231
+ onRemoveAttachment: removeAttachment,
5232
+ disabled: needsEmail
5233
+ }
5234
+ )
4889
5235
  ] });
4890
5236
  }
4891
5237
  function ResolvedBanner({ conversationId }) {
4892
5238
  const { client } = useWidgetContext();
4893
- const [csatRating, setCsatRating] = useState12(null);
4894
- const [csatSubmitted, setCsatSubmitted] = useState12(false);
4895
- const handleReopen = async () => {
4896
- try {
4897
- await client.widget.sendMessage.mutate({ conversationId, text: t("widget.send_followup") });
4898
- } catch (err) {
4899
- console.error("Failed to reopen:", err);
4900
- }
4901
- };
5239
+ const [csatRating, setCsatRating] = useState13(null);
5240
+ const [csatSubmitted, setCsatSubmitted] = useState13(false);
4902
5241
  const handleCsat = (rating) => {
4903
5242
  setCsatRating(rating);
4904
5243
  setCsatSubmitted(true);
4905
5244
  client.widget.sendCsat.mutate({ conversationId, rating }).catch(() => {
4906
5245
  });
4907
5246
  };
4908
- return /* @__PURE__ */ jsxs8("div", { className: "hw-resolved", children: [
4909
- /* @__PURE__ */ jsx13("div", { className: "hw-resolved-text", children: t("widget.resolved_text") }),
4910
- !csatSubmitted ? /* @__PURE__ */ jsxs8("div", { className: "hw-csat", children: [
4911
- /* @__PURE__ */ jsx13("div", { className: "hw-csat-label", children: t("widget.csat_label") }),
4912
- /* @__PURE__ */ jsxs8("div", { className: "hw-csat-buttons", children: [
4913
- /* @__PURE__ */ jsx13(
5247
+ return /* @__PURE__ */ jsxs9("div", { className: "hw-resolved", children: [
5248
+ /* @__PURE__ */ jsx14("div", { className: "hw-resolved-text", children: t("widget.resolved_text") }),
5249
+ !csatSubmitted ? /* @__PURE__ */ jsxs9("div", { className: "hw-csat", children: [
5250
+ /* @__PURE__ */ jsx14("div", { className: "hw-csat-label", children: t("widget.csat_label") }),
5251
+ /* @__PURE__ */ jsxs9("div", { className: "hw-csat-buttons", children: [
5252
+ /* @__PURE__ */ jsx14(
4914
5253
  "button",
4915
5254
  {
4916
5255
  type: "button",
@@ -4920,7 +5259,7 @@ function ResolvedBanner({ conversationId }) {
4920
5259
  children: "\u{1F44D}"
4921
5260
  }
4922
5261
  ),
4923
- /* @__PURE__ */ jsx13(
5262
+ /* @__PURE__ */ jsx14(
4924
5263
  "button",
4925
5264
  {
4926
5265
  type: "button",
@@ -4931,86 +5270,123 @@ function ResolvedBanner({ conversationId }) {
4931
5270
  }
4932
5271
  )
4933
5272
  ] })
4934
- ] }) : /* @__PURE__ */ jsx13("div", { className: "hw-csat-thanks", children: t("widget.csat_thanks") }),
4935
- /* @__PURE__ */ jsx13("div", { className: "hw-resolved-actions", children: /* @__PURE__ */ jsx13("button", { type: "button", className: "hw-resolved-reopen", onClick: handleReopen, children: t("widget.send_followup") }) })
5273
+ ] }) : /* @__PURE__ */ jsx14("div", { className: "hw-csat-thanks", children: t("widget.csat_thanks") })
4936
5274
  ] });
4937
5275
  }
4938
- function MessagePreview({ onOpen }) {
4939
- const preview = useWidgetStore((s) => s.incomingPreview);
4940
- const dismissPreview = useWidgetStore((s) => s.dismissPreview);
4941
- const setActiveConversation = useWidgetStore((s) => s.setActiveConversation);
5276
+ function stripMarkdown(text) {
5277
+ return text.replace(/^#{1,6}\s+/gm, "").replace(/\*\*(.+?)\*\*/g, "$1").replace(/\*(.+?)\*/g, "$1").replace(/^[-*+]\s+/gm, "").replace(/\[(.+?)\]\(.+?\)/g, "$1").replace(/`(.+?)`/g, "$1").replace(/\n{2,}/g, " ").replace(/\n/g, " ").trim();
5278
+ }
5279
+ function AnnouncementPreviews({ onOpen }) {
5280
+ const previews = useWidgetStore((s) => s.announcementPreviews);
5281
+ const dismissPreview = useWidgetStore((s) => s.dismissAnnouncementPreview);
4942
5282
  const agentName = useWidgetStore((s) => s.agentConfig?.name) ?? "Support";
4943
- const [closing, setClosing] = useState12(false);
4944
- useEffect11(() => {
4945
- if (!preview || preview.quickReplies) return;
4946
- const timer = setTimeout(() => {
4947
- setClosing(true);
4948
- setTimeout(() => dismissPreview(), 200);
4949
- }, 8e3);
4950
- return () => clearTimeout(timer);
4951
- }, [preview, dismissPreview]);
4952
- if (!preview) return null;
5283
+ if (previews.length === 0) return null;
5284
+ return /* @__PURE__ */ jsx14("div", { className: "hw-preview-stack", children: previews.map((preview) => /* @__PURE__ */ jsx14(
5285
+ AnnouncementPreviewItem,
5286
+ {
5287
+ preview,
5288
+ agentName,
5289
+ onOpen,
5290
+ onDismiss: (slug) => dismissPreview(slug)
5291
+ },
5292
+ preview.slug
5293
+ )) });
5294
+ }
5295
+ function AnnouncementPreviewItem({
5296
+ preview,
5297
+ agentName,
5298
+ onOpen,
5299
+ onDismiss
5300
+ }) {
5301
+ const [closing, setClosing] = useState13(false);
4953
5302
  const handleClose = (e) => {
4954
5303
  e.stopPropagation();
4955
5304
  setClosing(true);
4956
5305
  setTimeout(() => {
4957
- dismissPreview();
5306
+ onDismiss(preview.slug);
4958
5307
  setClosing(false);
4959
5308
  }, 200);
4960
5309
  };
4961
- const handleClick = () => {
4962
- const targetConvId = preview.conversationId;
4963
- dismissPreview();
4964
- setActiveConversation(targetConvId);
4965
- onOpen();
4966
- };
4967
- const messages = preview.messages?.length ? preview.messages : [{ text: preview.text }];
4968
- const hasQr = preview.quickReplies && preview.quickReplies.options.length > 0;
4969
- return /* @__PURE__ */ jsxs8(
5310
+ return /* @__PURE__ */ jsxs9(
4970
5311
  "div",
4971
5312
  {
4972
- className: `hw-preview ${closing ? "hw-preview--closing" : ""}`,
4973
- onClick: handleClick,
5313
+ className: `hw-preview hw-preview--announcement ${closing ? "hw-preview--closing" : ""}`,
5314
+ onClick: () => onOpen(preview.slug, preview.tabId),
4974
5315
  role: "button",
4975
5316
  tabIndex: 0,
4976
5317
  children: [
4977
- /* @__PURE__ */ jsxs8("div", { className: "hw-preview-header", children: [
4978
- /* @__PURE__ */ jsx13("div", { className: "hw-preview-avatar", children: /* @__PURE__ */ jsx13(WidgetLogo, {}) }),
4979
- /* @__PURE__ */ jsx13("div", { className: "hw-preview-name", children: agentName }),
4980
- /* @__PURE__ */ jsx13(
5318
+ /* @__PURE__ */ jsxs9("div", { className: "hw-preview-header", children: [
5319
+ /* @__PURE__ */ jsx14("div", { className: "hw-preview-avatar", children: /* @__PURE__ */ jsx14(WidgetLogo, {}) }),
5320
+ /* @__PURE__ */ jsx14("div", { className: "hw-preview-name", children: agentName }),
5321
+ /* @__PURE__ */ jsx14(
4981
5322
  "button",
4982
5323
  {
4983
5324
  type: "button",
4984
5325
  className: "hw-preview-close",
4985
5326
  onClick: handleClose,
4986
5327
  "aria-label": t("widget.aria_dismiss"),
4987
- children: /* @__PURE__ */ jsx13(XIcon, { size: 20 })
5328
+ children: /* @__PURE__ */ jsx14(XIcon, { size: 20 })
4988
5329
  }
4989
5330
  )
4990
5331
  ] }),
4991
- messages.map((m, i) => /* @__PURE__ */ jsx13("div", { className: "hw-preview-body", children: m.text }, i)),
4992
- hasQr && /* @__PURE__ */ jsxs8(Fragment3, { children: [
4993
- preview.quickReplies.prompt && /* @__PURE__ */ jsx13("div", { className: "hw-preview-body", children: preview.quickReplies.prompt }),
4994
- /* @__PURE__ */ jsx13("div", { className: "hw-preview-quick-replies", children: preview.quickReplies.options.map((opt) => /* @__PURE__ */ jsx13(
4995
- "button",
4996
- {
4997
- type: "button",
4998
- className: "hw-preview-qr-btn",
4999
- onClick: (e) => {
5000
- e.stopPropagation();
5001
- dismissPreview();
5002
- setActiveConversation(preview.conversationId);
5003
- onOpen();
5004
- },
5005
- children: opt.label
5006
- },
5007
- opt.id
5008
- )) })
5009
- ] })
5332
+ preview.badge && /* @__PURE__ */ jsx14("div", { className: "hw-announcement-badge", children: preview.badge }),
5333
+ /* @__PURE__ */ jsx14("div", { className: "hw-preview-body hw-preview-body--title", children: preview.title }),
5334
+ preview.body && (() => {
5335
+ const clean = stripMarkdown(preview.body);
5336
+ return /* @__PURE__ */ jsx14("div", { className: "hw-preview-body hw-preview-body--desc", children: clean.length > 120 ? `${clean.slice(0, 120)}\u2026` : clean });
5337
+ })()
5010
5338
  ]
5011
5339
  }
5012
5340
  );
5013
5341
  }
5342
+ function WhatsNewCard({
5343
+ getUnseenEntries,
5344
+ announcementTabs,
5345
+ onViewAll,
5346
+ onSelect
5347
+ }) {
5348
+ const unseen = getUnseenEntries();
5349
+ if (unseen.length === 0) return null;
5350
+ const display = unseen.slice(0, 3);
5351
+ const badgeFieldMap = new Map(
5352
+ announcementTabs.map((t2) => [t2.id, t2.display?.badgeField])
5353
+ );
5354
+ return /* @__PURE__ */ jsxs9("div", { className: "hw-whats-new", children: [
5355
+ /* @__PURE__ */ jsxs9("div", { className: "hw-whats-new-header", children: [
5356
+ /* @__PURE__ */ jsx14("span", { className: "hw-whats-new-title", children: resolveLabel2("widget.whats_new") }),
5357
+ /* @__PURE__ */ jsxs9("button", { type: "button", className: "hw-whats-new-view-all", onClick: onViewAll, children: [
5358
+ resolveLabel2("widget.view_all"),
5359
+ " \u2192"
5360
+ ] })
5361
+ ] }),
5362
+ /* @__PURE__ */ jsx14("div", { className: "hw-whats-new-list", children: display.map((entry) => {
5363
+ const badgeField = badgeFieldMap.get(entry.tabId);
5364
+ return /* @__PURE__ */ jsxs9(
5365
+ "button",
5366
+ {
5367
+ type: "button",
5368
+ className: "hw-whats-new-item",
5369
+ onClick: () => onSelect(entry.slug, entry.tabId),
5370
+ children: [
5371
+ badgeField && entry.customFields[badgeField] && /* @__PURE__ */ jsxs9("div", { className: "hw-whats-new-item-top", children: [
5372
+ /* @__PURE__ */ jsx14("span", { className: "hw-whats-new-badge", children: entry.customFields[badgeField] }),
5373
+ entry.publishedAt && /* @__PURE__ */ jsx14("span", { className: "hw-whats-new-time", children: formatRelativeTime(entry.publishedAt) })
5374
+ ] }),
5375
+ /* @__PURE__ */ jsxs9("div", { className: "hw-whats-new-item-title", children: [
5376
+ entry.title,
5377
+ !badgeField && entry.publishedAt && /* @__PURE__ */ jsx14("span", { className: "hw-whats-new-time-inline", children: formatRelativeTime(entry.publishedAt) })
5378
+ ] }),
5379
+ entry.body && (() => {
5380
+ const clean = stripMarkdown(entry.body);
5381
+ return /* @__PURE__ */ jsx14("div", { className: "hw-whats-new-item-body", children: clean.length > 80 ? `${clean.slice(0, 80)}\u2026` : clean });
5382
+ })()
5383
+ ]
5384
+ },
5385
+ entry.slug
5386
+ );
5387
+ }) })
5388
+ ] });
5389
+ }
5014
5390
 
5015
5391
  // #style-inject:#style-inject
5016
5392
  function styleInject(css, { insertAt } = {}) {
@@ -5035,10 +5411,10 @@ function styleInject(css, { insertAt } = {}) {
5035
5411
  }
5036
5412
 
5037
5413
  // src/themed/styles.css
5038
- styleInject(':host {\n all: initial;\n font-family:\n -apple-system,\n BlinkMacSystemFont,\n "Segoe UI",\n Roboto,\n "Helvetica Neue",\n Arial,\n sans-serif;\n font-size: 14px;\n line-height: 1.5;\n color: #1a1a1a;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.hw-widget {\n font-family:\n -apple-system,\n BlinkMacSystemFont,\n "Segoe UI",\n Roboto,\n "Helvetica Neue",\n Arial,\n sans-serif;\n font-size: 14px;\n line-height: 1.5;\n color: #1a1a1a;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.hw-widget *,\n.hw-widget *::before,\n.hw-widget *::after {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n:where(.hw-widget) {\n --hw-primary: #171717;\n --hw-primary-hover: #2a2a2a;\n --hw-brand: #171717;\n --hw-on-brand: #ffffff;\n --hw-focus-border: #9ca3af;\n --hw-focus-ring: rgba(0, 0, 0, 0.06);\n --hw-accent: #6366f1;\n --hw-bg: #ffffff;\n --hw-bg-subtle: #fafafa;\n --hw-bg-hover: #f5f5f5;\n --hw-border: #f0f0f0;\n --hw-border-md: #e5e5e5;\n --hw-text: #111;\n --hw-text-1: #111;\n --hw-text-2: #666;\n --hw-text-3: #999;\n --hw-text-4: #bbb;\n --hw-radius: 16px;\n --hw-visitor-bubble-bg: #f0f0f0;\n --hw-visitor-bubble-text: #1a1a1a;\n --hw-font:\n -apple-system,\n BlinkMacSystemFont,\n "Segoe UI",\n Roboto,\n "Helvetica Neue",\n Arial,\n sans-serif;\n}\n.hw-agent-img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n.hw-agent-icon {\n width: 100%;\n height: 100%;\n border-radius: inherit;\n}\n.hw-widget :focus-visible {\n outline: 2px solid var(--hw-primary);\n outline-offset: 2px;\n}\n.hw-widget :focus:not(:focus-visible) {\n outline: none;\n}\n.hw-widget {\n position: fixed;\n bottom: 20px;\n right: var(--hw-position-right, 20px);\n left: var(--hw-position-left, auto);\n z-index: 999999;\n font-family: var(--hw-font);\n}\n@keyframes hw-bubble-enter {\n from {\n opacity: 0;\n transform: scale(0.6);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n.hw-bubble {\n width: 48px;\n height: 48px;\n border-radius: 14px;\n background: var(--hw-primary);\n color: white;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;\n position: relative;\n overflow: visible;\n animation: hw-bubble-enter 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) both;\n}\n.hw-bubble--rounded {\n border-radius: 14px;\n}\n.hw-bubble--square {\n border-radius: 8px;\n}\n.hw-bubble--pill {\n border-radius: 24px;\n}\n.hw-bubble--launcher-bubble,\n.hw-bubble--launcher-help {\n width: auto;\n padding: 0 16px 0 12px;\n gap: 8px;\n border-radius: 24px;\n}\n.hw-bubble--launcher-bubble.hw-bubble--square,\n.hw-bubble--launcher-help.hw-bubble--square {\n border-radius: 8px;\n}\n.hw-bubble--launcher-bubble.hw-bubble--rounded,\n.hw-bubble--launcher-help.hw-bubble--rounded {\n border-radius: 14px;\n}\n.hw-bubble-label {\n font-size: 14px;\n font-weight: 600;\n white-space: nowrap;\n line-height: 1;\n position: static;\n opacity: 1;\n transform: none;\n}\n.hw-bubble--launcher-bubble .hw-bubble-icon,\n.hw-bubble--launcher-help .hw-bubble-icon {\n position: static;\n}\n.hw-bubble:hover {\n transform: scale(1.05);\n box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);\n}\n.hw-bubble:active {\n transform: scale(0.95);\n}\n.hw-bubble--open {\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);\n}\n.hw-bubble:focus-visible {\n outline: 2px solid white;\n outline-offset: 2px;\n}\n.hw-bubble-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;\n}\n.hw-bubble-icon svg {\n width: 22px;\n height: 22px;\n}\n.hw-bubble-icon--hidden {\n transform: scale(0.3) rotate(90deg);\n opacity: 0;\n}\n.hw-bubble-icon--bot {\n}\n.hw-bubble--avatar .hw-bubble-icon--bot {\n width: 100%;\n height: 100%;\n}\n.hw-bubble--avatar .hw-bubble-icon--bot .hw-agent-img {\n width: 100%;\n height: 100%;\n border-radius: 0;\n}\n.hw-agent-img.hw-agent-img--logo {\n object-fit: contain;\n padding: 10px;\n box-sizing: border-box;\n}\n.hw-bubble--avatar .hw-bubble-icon--bot .hw-agent-img.hw-agent-img--logo {\n padding: 10px;\n box-sizing: border-box;\n object-fit: contain;\n}\n.hw-bubble-icon--close svg {\n width: 22px;\n height: 22px;\n}\n.hw-bubble-badge {\n position: absolute;\n top: -4px;\n right: -4px;\n min-width: 20px;\n height: 20px;\n border-radius: 10px;\n background: var(--hw-primary);\n color: white;\n font-size: 11px;\n font-weight: 700;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 5px;\n border: 2px solid white;\n animation: hw-badge-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);\n}\n@keyframes hw-badge-pop {\n from {\n transform: scale(0);\n }\n to {\n transform: scale(1);\n }\n}\n.hw-bubble-badge::after {\n content: "";\n position: absolute;\n inset: -2px;\n border-radius: inherit;\n background: var(--hw-primary);\n opacity: 0;\n animation: hw-badge-pulse 2s ease-out infinite;\n}\n@keyframes hw-badge-pulse {\n 0% {\n opacity: 0.5;\n transform: scale(1);\n }\n 100% {\n opacity: 0;\n transform: scale(1.8);\n }\n}\n.hw-window {\n position: absolute;\n bottom: 72px;\n right: var(--hw-window-right, 0);\n left: var(--hw-window-left, auto);\n width: 440px;\n height: 640px;\n background: var(--hw-bg-subtle);\n color: var(--hw-text);\n border-radius: var(--hw-radius);\n box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);\n display: flex;\n flex-direction: column;\n overflow: hidden;\n animation: hw-window-open 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);\n transition: width 280ms cubic-bezier(0.4, 0, 0.2, 1), height 280ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n.hw-window--reading {\n width: min(720px, calc(100vw - 40px));\n height: min(800px, calc(100vh - 100px));\n}\n@keyframes hw-window-open {\n from {\n opacity: 0;\n transform: translateY(12px) scale(0.96);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n}\n.hw-window--closing {\n animation: hw-window-close 0.2s ease forwards;\n}\n@keyframes hw-window-close {\n from {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n to {\n opacity: 0;\n transform: translateY(8px) scale(0.98);\n }\n}\n.hw-content {\n flex: 1;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n min-height: 0;\n}\n@media (prefers-reduced-motion: reduce) {\n .hw-window,\n .hw-window--closing,\n .hw-content,\n .hw-msg,\n .hw-bubble,\n .hw-bubble-icon,\n .hw-bubble-badge,\n .hw-bubble-badge::after,\n .hw-typing-dot,\n .hw-loading-dot {\n animation-duration: 0.01ms !important;\n transition-duration: 0.01ms !important;\n }\n}\n.hw-hero {\n flex-shrink: 0;\n background:\n linear-gradient(\n 160deg,\n color-mix(in srgb, var(--hw-primary) 60%, black) 0%,\n var(--hw-primary) 50%,\n color-mix(in srgb, var(--hw-primary) 40%, black) 100%);\n color: white;\n padding: 20px 22px 40px;\n}\n.hw-hero-top {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n}\n.hw-hero-close {\n width: 30px;\n height: 30px;\n border-radius: 50%;\n border: none;\n background: rgba(255, 255, 255, 0.1);\n color: rgba(255, 255, 255, 0.6);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: background 0.15s, color 0.15s;\n}\n.hw-hero-close:hover {\n background: rgba(255, 255, 255, 0.2);\n color: white;\n}\n.hw-hero-close:active {\n transform: scale(0.92);\n transition:\n transform 0.14s cubic-bezier(0.23, 1, 0.32, 1),\n background 0.15s,\n color 0.15s;\n}\n.hw-hero-close svg {\n width: 20px;\n height: 20px;\n}\n.hw-hero-bot-icon {\n width: 36px;\n height: 36px;\n flex-shrink: 0;\n color: white;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 10px;\n}\n.hw-hero-bot-icon svg {\n width: 32px;\n height: 32px;\n}\n.hw-hero-bot-icon .hw-agent-img,\n.hw-hero-bot-icon .hw-agent-icon {\n border-radius: inherit;\n overflow: hidden;\n}\n.hw-hero-greeting {\n font-size: 26px;\n font-weight: 700;\n line-height: 1.15;\n margin-bottom: 6px;\n}\n.hw-hero-greeting-name {\n font-weight: 300;\n}\n.hw-hero-greeting-question {\n font-weight: 700;\n}\n.hw-hero-subtitle {\n font-size: 15px;\n color: rgba(255, 255, 255, 0.5);\n line-height: 1.35;\n}\n.hw-sheet {\n flex: 1;\n overflow-y: auto;\n min-height: 0;\n background: #ffffff;\n border-radius: 20px 20px 0 0;\n margin-top: -24px;\n box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);\n position: relative;\n z-index: 1;\n}\n.hw-sheet-inner {\n padding: 20px 16px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n.hw-header {\n display: flex;\n align-items: center;\n padding: 12px 16px;\n background: var(--hw-primary);\n color: white;\n flex-shrink: 0;\n gap: 10px;\n}\n.hw-header--sub {\n justify-content: space-between;\n background: transparent;\n color: var(--hw-text);\n border-bottom: 1px solid var(--hw-border);\n}\n.hw-header-back {\n width: 28px;\n height: 28px;\n border-radius: 8px;\n border: none;\n background: transparent;\n color: var(--hw-text-3);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: color 0.15s, background 0.15s;\n flex-shrink: 0;\n}\n.hw-header-back svg {\n width: 18px;\n height: 18px;\n}\n.hw-header-back:hover {\n color: var(--hw-text);\n background: var(--hw-bg-subtle);\n}\n.hw-header-identity {\n display: flex;\n align-items: center;\n gap: 10px;\n flex: 1;\n min-width: 0;\n}\n.hw-header-bot-icon {\n width: 28px;\n height: 28px;\n flex-shrink: 0;\n color: var(--hw-text);\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 8px;\n background: var(--hw-agent-bg, var(--hw-agent-bg-default, transparent));\n}\n.hw-header-bot-icon svg {\n width: 24px;\n height: 24px;\n}\n.hw-header-bot-icon--team {\n background: var(--hw-brand, #0a0a0a);\n color: var(--hw-on-brand, #fff);\n}\n.hw-header-agent-img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: inherit;\n}\n.hw-header-bot-icon .hw-agent-img,\n.hw-header-bot-icon .hw-agent-icon {\n border-radius: inherit;\n overflow: hidden;\n}\n.hw-header-bot-icon .hw-agent-img {\n object-fit: var(--hw-agent-fit, var(--hw-agent-fit-default, cover));\n padding: var(--hw-agent-pad, var(--hw-agent-pad-default, 0));\n box-sizing: border-box;\n}\n.hw-widget[data-has-avatar=true] {\n --hw-agent-bg-default: var(--hw-primary);\n --hw-agent-fit-default: contain;\n --hw-agent-pad-default: 6px;\n}\n.hw-header-agent-initials {\n font-size: 11px;\n font-weight: 600;\n line-height: 1;\n}\n.hw-header-info {\n flex: 1;\n min-width: 0;\n}\n.hw-header-name {\n font-size: 14px;\n font-weight: 600;\n line-height: 1.3;\n}\n.hw-header-status {\n font-size: 12px;\n color: var(--hw-text-3);\n line-height: 1.3;\n}\n.hw-header-close {\n width: 28px;\n height: 28px;\n border-radius: 8px;\n border: none;\n background: transparent;\n color: var(--hw-text-3);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n transition:\n background-color 140ms cubic-bezier(0.23, 1, 0.32, 1),\n color 140ms cubic-bezier(0.23, 1, 0.32, 1),\n transform 140ms cubic-bezier(0.23, 1, 0.32, 1);\n flex-shrink: 0;\n}\n.hw-header-close svg {\n width: 20px;\n height: 20px;\n}\n.hw-header-close:hover {\n background: var(--hw-bg-subtle);\n color: var(--hw-text);\n}\n.hw-header-close:active {\n transform: scale(0.92);\n}\n.hw-header--centered {\n justify-content: space-between;\n background: transparent;\n color: var(--hw-text);\n border-bottom: 1px solid var(--hw-border);\n}\n.hw-header--centered .hw-header-title {\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n max-width: calc(100% - 88px);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n text-align: center;\n}\n.hw-header-spacer {\n width: 28px;\n flex-shrink: 0;\n}\n.hw-header--messages {\n justify-content: space-between;\n background: transparent;\n color: var(--hw-text);\n border-bottom: 1px solid var(--hw-border);\n}\n.hw-header-title {\n font-size: 16px;\n font-weight: 600;\n}\n.hw-header-actions {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n.hw-header-action {\n width: 28px;\n height: 28px;\n border-radius: 8px;\n border: none;\n background: transparent;\n color: var(--hw-text-3);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n transition:\n background-color 140ms cubic-bezier(0.23, 1, 0.32, 1),\n color 140ms cubic-bezier(0.23, 1, 0.32, 1),\n transform 140ms cubic-bezier(0.23, 1, 0.32, 1);\n}\n.hw-header-action svg {\n width: 16px;\n height: 16px;\n}\n.hw-header-action:hover {\n background: var(--hw-bg-subtle);\n color: var(--hw-text);\n}\n.hw-header-action:active {\n transform: scale(0.94);\n}\n.hw-card {\n display: flex;\n align-items: center;\n gap: 12px;\n width: 100%;\n padding: 14px 16px;\n border-radius: 14px;\n background: var(--hw-bg);\n border: 1px solid rgba(0, 0, 0, 0.06);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);\n cursor: pointer;\n transition: box-shadow 180ms cubic-bezier(0.23, 1, 0.32, 1), transform 180ms cubic-bezier(0.23, 1, 0.32, 1);\n text-align: left;\n color: var(--hw-text);\n font-family: inherit;\n}\n.hw-card:hover {\n box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.05);\n transform: translateY(-1px);\n}\n.hw-card:active {\n transform: translateY(0) scale(0.99);\n transition-duration: 120ms;\n}\n.hw-card-body {\n flex: 1;\n min-width: 0;\n}\n.hw-card-title {\n font-size: 14px;\n font-weight: 600;\n line-height: 1.3;\n color: var(--hw-text);\n}\n.hw-card-meta {\n font-size: 12px;\n color: var(--hw-text-3);\n line-height: 1.3;\n margin-top: 1px;\n}\n.hw-card-arrow {\n width: 32px;\n height: 32px;\n border-radius: 50%;\n background: var(--hw-primary);\n color: white;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n.hw-card-arrow svg {\n width: 14px;\n height: 14px;\n}\n.hw-msgs-tab {\n flex: 1;\n overflow-y: auto;\n padding: 12px 16px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.hw-recent-card {\n border-radius: 14px;\n background: var(--hw-bg);\n border: 1px solid rgba(0, 0, 0, 0.06);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);\n overflow: hidden;\n}\n.hw-recent-header {\n font-size: 12px;\n font-weight: 600;\n color: var(--hw-text-2);\n padding: 12px 14px 0;\n}\n.hw-recent-row {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n padding: 10px 14px;\n border: none;\n border-bottom: 1px solid var(--hw-border);\n background: none;\n cursor: pointer;\n text-align: left;\n font-family: inherit;\n color: var(--hw-text);\n transition: background-color 140ms cubic-bezier(0.23, 1, 0.32, 1), transform 140ms cubic-bezier(0.23, 1, 0.32, 1);\n position: relative;\n}\n.hw-recent-row:hover {\n background: rgba(0, 0, 0, 0.03);\n}\n.hw-recent-row:active {\n transform: scale(0.995);\n}\n.hw-recent-row--last {\n border-bottom: none;\n}\n.hw-recent-row .hw-conv-card-avatar {\n width: 32px;\n height: 32px;\n border-radius: 8px;\n}\n.hw-recent-row .hw-conv-card-avatar svg {\n width: 18px;\n height: 18px;\n}\n.hw-recent-row .hw-conv-card-name {\n font-size: 13px;\n}\n.hw-recent-row .hw-conv-card-preview {\n font-size: 12px;\n}\n.hw-recent-row--unread .hw-conv-card-name {\n color: var(--hw-text);\n}\n.hw-recent-row--unread .hw-conv-card-time {\n color: var(--hw-primary);\n font-weight: 500;\n}\n.hw-recent-row-badge {\n min-width: 18px;\n height: 18px;\n border-radius: 9px;\n background: var(--hw-primary);\n color: white;\n font-size: 11px;\n font-weight: 600;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 5px;\n flex-shrink: 0;\n font-variant-numeric: tabular-nums;\n}\n.hw-recent-see-all {\n display: block;\n width: 100%;\n padding: 10px 14px;\n text-align: center;\n font-size: 13px;\n font-weight: 500;\n color: var(--hw-text);\n background: none;\n border: none;\n border-top: 1px solid var(--hw-border);\n cursor: pointer;\n font-family: inherit;\n transition: background 0.1s;\n}\n.hw-recent-see-all:hover {\n background: rgba(0, 0, 0, 0.02);\n}\n.hw-conv-card {\n position: relative;\n display: flex;\n flex-direction: column;\n gap: 4px;\n width: 100%;\n padding: 14px 16px;\n border-radius: 14px;\n background: var(--hw-bg);\n border: 1px solid rgba(0, 0, 0, 0.06);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);\n cursor: pointer;\n transition: box-shadow 0.15s, transform 0.1s;\n text-align: left;\n font-family: inherit;\n color: var(--hw-text);\n}\n.hw-conv-card:hover {\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.04);\n}\n.hw-conv-card:active {\n transform: scale(0.99);\n}\n.hw-conv-card-row {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n.hw-conv-card-avatar {\n width: 36px;\n height: 36px;\n border-radius: 10px;\n background: var(--hw-agent-bg, var(--hw-agent-bg-default, var(--hw-bg-subtle)));\n color: var(--hw-text-3);\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n overflow: hidden;\n}\n.hw-conv-card-avatar svg {\n width: 20px;\n height: 20px;\n}\n.hw-conv-card-avatar-img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n.hw-conv-card-avatar .hw-agent-img {\n object-fit: var(--hw-agent-fit, var(--hw-agent-fit-default, cover));\n padding: var(--hw-agent-pad, var(--hw-agent-pad-default, 0));\n box-sizing: border-box;\n}\n.hw-conv-card-avatar--team {\n background: var(--hw-brand, #0a0a0a);\n color: var(--hw-on-brand, #fff);\n}\n.hw-conv-card-avatar-initials {\n font-size: 12px;\n font-weight: 600;\n line-height: 1;\n letter-spacing: 0.02em;\n}\n.hw-conv-card-content {\n flex: 1;\n min-width: 0;\n}\n.hw-conv-card-top {\n display: flex;\n align-items: baseline;\n gap: 8px;\n}\n.hw-conv-card-name {\n flex: 1;\n font-size: 14px;\n font-weight: 600;\n color: var(--hw-text);\n}\n.hw-conv-card-time {\n font-size: 11px;\n color: var(--hw-text-3);\n flex-shrink: 0;\n font-variant-numeric: tabular-nums;\n}\n.hw-conv-card-preview {\n font-size: 13px;\n color: var(--hw-text-2);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n line-height: 1.4;\n margin-top: 1px;\n}\n.hw-conv-card--unread .hw-conv-card-name {\n color: var(--hw-text);\n}\n.hw-conv-card--unread .hw-conv-card-time {\n color: var(--hw-primary);\n font-weight: 500;\n}\n.hw-conv-card-badge {\n position: absolute;\n top: 12px;\n right: 12px;\n min-width: 18px;\n height: 18px;\n border-radius: 9px;\n background: var(--hw-primary);\n color: white;\n font-size: 11px;\n font-weight: 600;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 5px;\n font-variant-numeric: tabular-nums;\n}\n.hw-empty-state {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 32px;\n text-align: center;\n}\n.hw-empty-icon-wrap {\n width: 48px;\n height: 48px;\n border-radius: 50%;\n background: var(--hw-bg-subtle);\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 16px;\n color: var(--hw-text-3);\n}\n.hw-empty-icon-wrap svg {\n width: 24px;\n height: 24px;\n}\n.hw-empty-title {\n font-size: 15px;\n font-weight: 600;\n color: var(--hw-text);\n margin-bottom: 4px;\n}\n.hw-empty-desc {\n font-size: 13px;\n color: var(--hw-text-3);\n margin-bottom: 20px;\n}\n.hw-empty-btn {\n padding: 8px 20px;\n border-radius: 10px;\n background: var(--hw-primary);\n color: white;\n border: none;\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n font-family: inherit;\n transition: background 0.15s;\n}\n.hw-empty-btn:hover {\n background: var(--hw-primary-hover);\n}\n.hw-tabs {\n display: flex;\n border-top: 1px solid var(--hw-border);\n flex-shrink: 0;\n background: var(--hw-bg-subtle);\n}\n.hw-tabs-item {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 2px;\n padding: 8px 0;\n border: none;\n background: none;\n cursor: pointer;\n font-family: inherit;\n font-size: 11px;\n font-weight: 500;\n color: var(--hw-text-3);\n transition: color 0.15s;\n}\n.hw-tabs-item svg {\n width: 22px;\n height: 22px;\n}\n.hw-tabs-item--active {\n color: var(--hw-text);\n}\n.hw-tabs-item:hover {\n color: var(--hw-text-2);\n}\n.hw-tabs-item:active {\n transform: scale(0.94);\n transition: transform 0.14s cubic-bezier(0.23, 1, 0.32, 1), color 0.15s;\n}\n.hw-tabs-icon-wrap {\n position: relative;\n display: inline-flex;\n}\n.hw-tabs-badge {\n position: absolute;\n top: -6px;\n right: -10px;\n min-width: 16px;\n height: 16px;\n border-radius: 8px;\n background: var(--hw-primary);\n color: white;\n font-size: 10px;\n font-weight: 700;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 4px;\n font-variant-numeric: tabular-nums;\n}\n.hw-messages {\n flex: 1;\n overflow-y: auto;\n overflow-x: hidden;\n padding: 16px 20px;\n background: var(--hw-bg-subtle);\n display: flex;\n flex-direction: column;\n gap: 2px;\n overscroll-behavior: contain;\n min-width: 0;\n scrollbar-color: rgba(0, 0, 0, 0.2) transparent;\n scrollbar-width: thin;\n}\n.hw-messages::-webkit-scrollbar {\n width: 10px;\n height: 10px;\n}\n.hw-messages::-webkit-scrollbar-track {\n background: transparent;\n}\n.hw-messages::-webkit-scrollbar-thumb {\n background: rgba(0, 0, 0, 0.16);\n background-clip: content-box;\n border: 3px solid transparent;\n border-radius: 999px;\n}\n.hw-messages::-webkit-scrollbar-thumb:hover {\n background: rgba(0, 0, 0, 0.28);\n background-clip: content-box;\n}\n.hw-widget[data-theme=dark] .hw-messages {\n scrollbar-color: rgba(255, 255, 255, 0.26) transparent;\n}\n.hw-widget[data-theme=dark] .hw-messages::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.2);\n background-clip: content-box;\n}\n.hw-widget[data-theme=dark] .hw-messages::-webkit-scrollbar-thumb:hover {\n background: rgba(255, 255, 255, 0.32);\n background-clip: content-box;\n}\n.hw-empty {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 32px;\n color: var(--hw-text-3);\n text-align: center;\n}\n.hw-empty-icon {\n width: 40px;\n height: 40px;\n margin-bottom: 12px;\n opacity: 0.3;\n}\n.hw-empty-text {\n font-size: 13px;\n}\n.hw-date-sep {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px 0;\n}\n.hw-date-sep-line {\n flex: 1;\n height: 1px;\n background: var(--hw-border-md);\n}\n.hw-date-sep-text {\n font-size: 11px;\n color: var(--hw-text-3);\n font-weight: 500;\n white-space: nowrap;\n}\n.hw-msg {\n display: flex;\n padding: 4px 0;\n max-width: 75%;\n min-width: 0;\n animation: hw-msg-appear 0.25s ease-out;\n}\n@keyframes hw-msg-appear {\n from {\n opacity: 0;\n transform: translateY(6px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n.hw-msg--visitor {\n align-self: flex-end;\n}\n.hw-msg--team,\n.hw-msg--ai {\n align-self: flex-start;\n}\n.hw-msg--ai {\n width: 100%;\n max-width: 100%;\n}\n.hw-msg-body {\n display: flex;\n flex-direction: column;\n min-width: 0;\n max-width: 100%;\n}\n.hw-msg-bubble {\n padding: 10px 14px;\n border-radius: 18px;\n font-size: 14px;\n line-height: 1.45;\n white-space: pre-wrap;\n word-break: break-word;\n overflow-wrap: anywhere;\n max-width: 100%;\n}\n.hw-msg--visitor .hw-msg-bubble {\n background: var(--hw-primary);\n color: white;\n border-bottom-right-radius: 4px;\n}\n.hw-msg--team .hw-msg-bubble {\n background: var(--hw-visitor-bubble-bg);\n color: var(--hw-visitor-bubble-text);\n border-bottom-left-radius: 4px;\n}\n.hw-msg--ai .hw-msg-bubble {\n background: var(--hw-visitor-bubble-bg);\n color: var(--hw-text);\n border-bottom-left-radius: 4px;\n white-space: normal;\n max-width: min(100%, 640px);\n}\n.hw-msg--ai .hw-msg-body {\n width: 100%;\n}\n.hw-msg--ai .hw-msg-bubble:has(.hw-code),\n.hw-msg--ai .hw-msg-bubble:has(pre) {\n width: 100%;\n}\n.hw-quick-replies {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n margin-top: 8px;\n}\n.hw-quick-reply-btn {\n font: inherit;\n font-size: 13px;\n font-weight: 500;\n padding: 6px 14px;\n border-radius: 18px;\n border: 1px solid rgba(0, 0, 0, 0.12);\n background: var(--hw-bg, #fff);\n color: var(--hw-text-1, #1a1a1a);\n cursor: pointer;\n transition:\n background 120ms ease,\n border-color 120ms ease,\n box-shadow 120ms ease,\n transform 80ms ease;\n line-height: 1.3;\n}\n.hw-quick-reply-btn:hover:not(:disabled) {\n border-color: var(--hw-primary);\n background: color-mix(in srgb, var(--hw-primary) 8%, transparent);\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);\n}\n.hw-quick-reply-btn:active:not(:disabled) {\n transform: scale(0.97);\n}\n.hw-quick-reply-btn:disabled {\n cursor: default;\n opacity: 0.4;\n}\n.hw-quick-reply-btn[data-tapped=true] {\n background: var(--hw-primary);\n color: white;\n border-color: var(--hw-primary);\n opacity: 1;\n}\n.hw-quick-replies[data-cancelled=true] .hw-quick-reply-btn {\n border-color: rgba(0, 0, 0, 0.08);\n color: var(--hw-text-muted, #9ca3af);\n}\n.hw-msg--ai .hw-code {\n width: 100%;\n box-sizing: border-box;\n}\n.hw-msg-meta {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-size: 11px;\n color: var(--hw-text-3);\n margin-top: 2px;\n padding: 0 4px;\n font-variant-numeric: tabular-nums;\n}\n.hw-msg-time {\n white-space: nowrap;\n}\n.hw-msg--visitor .hw-msg-meta {\n text-align: right;\n}\n.hw-msg--team .hw-msg-body,\n.hw-msg--ai .hw-msg-body {\n align-items: flex-start;\n}\n.hw-msg--visitor .hw-msg-body {\n align-items: flex-end;\n}\n.hw-msg-sender {\n font-size: 11px;\n font-weight: 500;\n color: var(--hw-text-3);\n margin-bottom: 3px;\n padding: 0 4px;\n}\n.hw-typing {\n display: flex;\n flex-direction: column;\n gap: 3px;\n padding: 8px 0;\n width: fit-content;\n animation: hw-msg-appear 0.25s ease-out;\n}\n.hw-typing-label {\n font-size: 11px;\n font-weight: 500;\n color: var(--hw-text-3);\n padding: 0 4px;\n}\n.hw-typing-dots {\n display: flex;\n gap: 3px;\n padding: 10px 14px;\n width: fit-content;\n background: var(--hw-visitor-bubble-bg);\n border-radius: var(--hw-radius);\n border-bottom-left-radius: 4px;\n}\n.hw-typing-dot {\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background: var(--hw-text-3);\n animation: hw-typing-bounce 1.4s infinite;\n}\n.hw-typing-dot:nth-child(2) {\n animation-delay: 0.2s;\n}\n.hw-typing-dot:nth-child(3) {\n animation-delay: 0.4s;\n}\n@keyframes hw-typing-bounce {\n 0%, 60%, 100% {\n transform: translateY(0);\n }\n 30% {\n transform: translateY(-4px);\n }\n}\n.hw-streaming-cursor {\n display: inline-block;\n width: 2px;\n height: 1em;\n background: currentColor;\n opacity: 0.6;\n margin-left: 1px;\n vertical-align: text-bottom;\n animation: hw-cursor-blink 0.8s step-end infinite;\n}\n@keyframes hw-cursor-blink {\n 50% {\n opacity: 0;\n }\n}\n.hw-link-preview {\n display: flex;\n flex-direction: column;\n border: 1px solid rgba(0, 0, 0, 0.08);\n border-radius: 10px;\n overflow: hidden;\n text-decoration: none;\n color: inherit;\n margin-top: 6px;\n transition: background 0.15s;\n}\n.hw-link-preview:hover {\n background: rgba(0, 0, 0, 0.02);\n}\n.hw-link-preview-img {\n width: 100%;\n max-height: 140px;\n object-fit: cover;\n}\n.hw-link-preview-body {\n padding: 10px 12px;\n display: flex;\n flex-direction: column;\n gap: 3px;\n}\n.hw-link-preview-favicon {\n width: 16px;\n height: 16px;\n border-radius: 2px;\n}\n.hw-link-preview-title {\n font-size: 13px;\n font-weight: 600;\n line-height: 1.3;\n color: var(--hw-text, #1a1a1a);\n}\n.hw-link-preview-desc {\n font-size: 12px;\n line-height: 1.4;\n color: var(--hw-text-muted, #6b7280);\n}\n.hw-link-preview-url {\n font-size: 11px;\n color: var(--hw-text-muted, #9ca3af);\n}\n.hw-msg-links {\n display: flex;\n flex-direction: column;\n gap: 6px;\n max-width: 280px;\n}\n.hw-loading {\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.hw-loading-dots {\n display: flex;\n gap: 4px;\n}\n.hw-loading-dot {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: var(--hw-text-4);\n animation: hw-loading-pulse 1.4s infinite;\n}\n.hw-loading-dot:nth-child(2) {\n animation-delay: 0.2s;\n}\n.hw-loading-dot:nth-child(3) {\n animation-delay: 0.4s;\n}\n@keyframes hw-loading-pulse {\n 0%, 60%, 100% {\n opacity: 0.3;\n transform: scale(0.8);\n }\n 30% {\n opacity: 1;\n transform: scale(1);\n }\n}\n@keyframes hw-skeleton-shimmer {\n 0% {\n background-position: -200px 0;\n }\n 100% {\n background-position: calc(200px + 100%) 0;\n }\n}\n.hw-skeleton {\n background:\n linear-gradient(\n 90deg,\n var(--hw-bg-subtle) 25%,\n rgba(0, 0, 0, 0.04) 50%,\n var(--hw-bg-subtle) 75%);\n background-size: 200px 100%;\n animation: hw-skeleton-shimmer 1.5s ease-in-out infinite;\n border-radius: 6px;\n}\n.hw-skeleton-messages {\n flex: 1;\n display: flex;\n flex-direction: column;\n padding: 16px;\n gap: 16px;\n}\n.hw-skeleton-msg {\n display: flex;\n gap: 10px;\n align-items: flex-start;\n}\n.hw-skeleton-msg--right {\n flex-direction: row-reverse;\n}\n.hw-skeleton-avatar {\n width: 28px;\n height: 28px;\n border-radius: 8px;\n flex-shrink: 0;\n}\n.hw-skeleton-bubble {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n.hw-skeleton-line {\n height: 12px;\n border-radius: 6px;\n}\n.hw-skeleton-convs {\n display: flex;\n flex-direction: column;\n padding: 8px 0;\n}\n.hw-skeleton-conv {\n display: flex;\n gap: 10px;\n align-items: center;\n padding: 10px 16px;\n}\n.hw-skeleton-conv-avatar {\n width: 36px;\n height: 36px;\n border-radius: 8px;\n flex-shrink: 0;\n}\n.hw-skeleton-conv-lines {\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n.hw-skeleton-content {\n display: flex;\n flex-direction: column;\n padding: 12px 16px;\n gap: 12px;\n}\n.hw-skeleton-content-item {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 12px;\n border-radius: 10px;\n background: var(--hw-bg);\n}\n.hw-skeleton-title {\n height: 22px;\n width: 65%;\n border-radius: 6px;\n}\n.hw-skeleton-badge {\n width: 42px;\n height: 18px;\n border-radius: 9px;\n}\n.hw-skeleton-date {\n width: 60px;\n height: 12px;\n border-radius: 6px;\n}\n.hw-skeleton-h2 {\n height: 16px;\n border-radius: 6px;\n}\n.hw-skeleton-bullet {\n padding-left: 20px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.hw-skeleton-bullet-line {\n height: 14px;\n border-radius: 7px;\n}\n.hw-email-card {\n margin: 0 12px;\n padding: 14px 16px 10px;\n border: 1px solid var(--hw-border, rgba(0,0,0,0.08));\n border-radius: 14px;\n background: var(--hw-bg, #fff);\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.03);\n animation: hw-email-slide-in 0.25s ease-out;\n}\n@keyframes hw-email-slide-in {\n from {\n opacity: 0;\n transform: translateY(8px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n.hw-email-card-header {\n display: flex;\n align-items: flex-start;\n gap: 10px;\n margin-bottom: 12px;\n}\n.hw-email-card-icon {\n flex-shrink: 0;\n width: 32px;\n height: 32px;\n border-radius: 8px;\n background: var(--hw-bg-hover, #f5f5f5);\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--hw-text, #1a1a1a);\n}\n.hw-email-card-title {\n font-size: 13px;\n font-weight: 600;\n color: var(--hw-text, #1a1a1a);\n line-height: 1.3;\n margin: 0 0 2px;\n}\n.hw-email-card-subtitle {\n font-size: 12px;\n color: var(--hw-text-2, #888);\n line-height: 1.4;\n margin: 0;\n}\n.hw-email-card-input {\n width: 100%;\n padding: 9px 12px;\n border-radius: 10px;\n border: 1px solid var(--hw-border, rgba(0,0,0,0.1));\n background: var(--hw-bg-subtle, #fafafa);\n color: var(--hw-text, #1a1a1a);\n font-size: 13px;\n outline: none;\n margin-bottom: 8px;\n box-sizing: border-box;\n transition: border-color 0.15s, box-shadow 0.15s;\n}\n.hw-email-card-input::placeholder {\n color: var(--hw-text-3, #999);\n}\n.hw-email-card-input:focus {\n border-color: var(--hw-focus-border, rgba(0,0,0,0.2));\n box-shadow: 0 0 0 2px var(--hw-focus-ring, rgba(0,0,0,0.06));\n}\n.hw-email-card-input--error {\n border-color: #ef4444;\n}\n.hw-email-card-submit {\n width: 100%;\n padding: 9px;\n border-radius: 10px;\n border: none;\n background: var(--hw-brand, #0a0a0a);\n color: var(--hw-on-brand, #fff);\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n transition: opacity 0.15s;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n}\n.hw-email-card-submit:hover:not(:disabled) {\n opacity: 0.88;\n}\n.hw-email-card-submit:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n.hw-email-card--success {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n padding: 10px 16px;\n font-size: 13px;\n color: var(--hw-text-2, #888);\n animation: hw-email-slide-in 0.2s ease-out;\n}\n.hw-email-card--success svg {\n flex-shrink: 0;\n}\n.hw-composer {\n display: flex;\n flex-direction: column;\n padding: 12px 16px;\n background: transparent;\n flex-shrink: 0;\n}\n.hw-composer--compact {\n padding: 8px 12px;\n}\n.hw-composer-box {\n display: flex;\n flex-direction: column;\n border: 2px solid var(--hw-border-md);\n border-radius: 16px;\n overflow: hidden;\n transition: border-color 0.2s;\n background: var(--hw-bg);\n}\n.hw-composer-box:focus-within {\n border-color: var(--hw-focus-border);\n box-shadow: 0 0 0 3px var(--hw-focus-ring);\n}\n.hw-composer-input {\n resize: none;\n border: none;\n padding: 12px 16px 4px;\n font-size: 14px;\n font-family: inherit;\n line-height: 1.4;\n outline: none;\n min-height: 40px;\n max-height: 220px;\n background: transparent;\n color: var(--hw-text);\n field-sizing: content;\n}\n.hw-composer-input:focus {\n outline: none;\n}\n.hw-composer-input:focus-visible {\n outline: none;\n}\n.hw-composer-input::placeholder {\n color: var(--hw-text-4);\n}\n.hw-composer-toolbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 4px 10px 10px;\n}\n.hw-composer-toolbar-left {\n display: flex;\n align-items: center;\n gap: 4px;\n}\n.hw-composer-send {\n width: 32px;\n height: 32px;\n border-radius: 50%;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n transition:\n background-color 140ms cubic-bezier(0.23, 1, 0.32, 1),\n color 140ms cubic-bezier(0.23, 1, 0.32, 1),\n transform 140ms cubic-bezier(0.23, 1, 0.32, 1);\n}\n.hw-composer-send:active:not(:disabled) {\n transform: scale(0.9);\n}\n.hw-composer-send--active {\n background: var(--hw-primary);\n color: white;\n}\n.hw-composer-send--inactive {\n background: var(--hw-border);\n color: var(--hw-text-4);\n cursor: default;\n}\n.hw-composer-send svg {\n width: 14px;\n height: 14px;\n}\n.hw-composer-charcount {\n font-size: 11px;\n color: var(--hw-text-3);\n font-variant-numeric: tabular-nums;\n opacity: 1;\n transform: translateY(0);\n transition:\n color 180ms cubic-bezier(0.23, 1, 0.32, 1),\n opacity 180ms cubic-bezier(0.23, 1, 0.32, 1),\n transform 180ms cubic-bezier(0.23, 1, 0.32, 1);\n}\n@starting-style {\n .hw-composer-charcount {\n opacity: 0;\n transform: translateY(3px);\n }\n}\n.hw-composer-charcount--over {\n color: #ef4444;\n font-weight: 600;\n}\n@media (prefers-reduced-motion: reduce) {\n .hw-composer-charcount {\n transform: none;\n transition: color 160ms ease, opacity 160ms ease;\n }\n @starting-style {\n .hw-composer-charcount {\n transform: none;\n }\n }\n}\n.hw-composer-previews {\n display: flex;\n gap: 6px;\n padding: 8px 10px 0;\n overflow-x: auto;\n scrollbar-width: none;\n}\n.hw-composer-previews::-webkit-scrollbar {\n display: none;\n}\n.hw-composer-preview {\n position: relative;\n width: 48px;\n height: 48px;\n border-radius: 8px;\n overflow: hidden;\n flex-shrink: 0;\n background: var(--hw-border);\n cursor: pointer;\n}\n.hw-composer-preview--error {\n outline: 2px solid #ef4444;\n outline-offset: -2px;\n}\n.hw-composer-preview-img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n.hw-composer-preview-file {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--hw-bg-subtle);\n}\n.hw-composer-preview-ext {\n font-size: 10px;\n font-weight: 700;\n color: var(--hw-text-3);\n text-transform: uppercase;\n}\n.hw-composer-preview-loader {\n position: absolute;\n inset: 0;\n background: rgba(0, 0, 0, 0.35);\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.hw-composer-preview-loader::after {\n content: "";\n width: 16px;\n height: 16px;\n border: 2px solid rgba(255, 255, 255, 0.3);\n border-top-color: white;\n border-radius: 50%;\n animation: hw-spin 0.6s linear infinite;\n}\n@keyframes hw-spin {\n to {\n transform: rotate(360deg);\n }\n}\n.hw-composer-preview-badge {\n position: absolute;\n top: 2px;\n right: 2px;\n width: 16px;\n height: 16px;\n border-radius: 50%;\n background: #ef4444;\n color: white;\n font-size: 10px;\n font-weight: 700;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.hw-composer-preview-remove {\n position: absolute;\n top: 2px;\n right: 2px;\n width: 18px;\n height: 18px;\n border-radius: 50%;\n border: none;\n background: rgba(0, 0, 0, 0.55);\n color: white;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 0;\n transition: opacity 0.15s;\n}\n.hw-composer-preview-remove svg {\n width: 10px;\n height: 10px;\n}\n.hw-composer-preview:hover .hw-composer-preview-remove {\n opacity: 1;\n}\n.hw-composer-attach {\n width: 28px;\n height: 28px;\n border: none;\n background: none;\n color: var(--hw-text-3);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 6px;\n opacity: 0.7;\n transition: opacity 0.15s;\n}\n.hw-composer-attach:hover {\n opacity: 1;\n}\n.hw-composer-attach svg {\n width: 16px;\n height: 16px;\n}\n.hw-msg-images {\n display: flex;\n flex-direction: column;\n gap: 4px;\n margin-bottom: 4px;\n}\n.hw-msg-image-link {\n display: block;\n border-radius: 14px;\n overflow: hidden;\n line-height: 0;\n}\n.hw-msg-image {\n max-width: 140px;\n max-height: 80px;\n object-fit: cover;\n border-radius: 8px;\n outline: 1px solid rgba(0, 0, 0, 0.08);\n outline-offset: -1px;\n}\n.hw-msg-files {\n display: flex;\n flex-direction: column;\n gap: 4px;\n margin-top: 4px;\n}\n.hw-msg-file {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n border-radius: 10px;\n background: var(--hw-bg-subtle);\n text-decoration: none;\n color: var(--hw-text);\n transition: background 0.15s;\n}\n.hw-msg-file:hover {\n background: var(--hw-border);\n}\n.hw-msg-file-icon {\n flex-shrink: 0;\n width: 20px;\n height: 20px;\n color: var(--hw-text-3);\n}\n.hw-msg-file-icon svg {\n width: 100%;\n height: 100%;\n}\n.hw-msg-file-info {\n display: flex;\n flex-direction: column;\n min-width: 0;\n}\n.hw-msg-file-name {\n font-size: 13px;\n font-weight: 500;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.hw-msg-file-size {\n font-size: 11px;\n color: var(--hw-text-3);\n}\n.hw-msg-image-link {\n cursor: pointer;\n border: none;\n padding: 0;\n background: none;\n display: block;\n line-height: 0;\n}\n.hw-hover-preview {\n position: fixed;\n z-index: 99998;\n padding: 6px;\n border-radius: 14px;\n background: white;\n box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.06);\n cursor: pointer;\n animation: hw-hover-in 0.15s ease-out;\n}\n@media (prefers-color-scheme: dark) {\n .hw-hover-preview {\n background: #1c1c1e;\n box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);\n }\n}\n@keyframes hw-hover-in {\n from {\n opacity: 0;\n transform: scale(0.96) translateY(4px);\n }\n to {\n opacity: 1;\n transform: scale(1) translateY(0);\n }\n}\n.hw-hover-preview-img {\n width: 100%;\n max-height: 200px;\n object-fit: contain;\n border-radius: 10px;\n display: block;\n outline: 1px solid rgba(0, 0, 0, 0.08);\n outline-offset: -1px;\n}\n.hw-hover-preview--doc {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 10px 14px;\n}\n.hw-hover-preview-doc-icon {\n width: 28px;\n height: 28px;\n flex-shrink: 0;\n}\n.hw-hover-preview-doc-icon svg {\n width: 100%;\n height: 100%;\n}\n.hw-hover-preview-doc-info {\n display: flex;\n flex-direction: column;\n min-width: 0;\n}\n.hw-hover-preview-doc-name {\n font-size: 13px;\n font-weight: 500;\n color: var(--hw-text);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.hw-hover-preview-doc-hint {\n font-size: 11px;\n color: var(--hw-text-3);\n}\n.hw-event {\n display: flex;\n justify-content: center;\n padding: 8px 16px;\n}\n.hw-event-text {\n font-size: 12px;\n color: var(--hw-text-3);\n text-align: center;\n}\n.hw-event--card {\n justify-content: flex-start;\n align-items: center;\n gap: 10px;\n background: var(--hw-bg-subtle);\n padding: 10px 14px;\n border-radius: 12px;\n margin: 4px 16px;\n}\n.hw-event-avatar {\n width: 32px;\n height: 32px;\n border-radius: 50%;\n background: var(--hw-agent-bg, var(--hw-agent-bg-default, var(--hw-bg-hover, #e0e0e0)));\n color: var(--hw-text-2, #555);\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 11px;\n font-weight: 600;\n flex-shrink: 0;\n overflow: hidden;\n}\n.hw-event-avatar-img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n.hw-event-avatar .hw-agent-img {\n object-fit: var(--hw-agent-fit, var(--hw-agent-fit-default, cover));\n padding: var(--hw-agent-pad, var(--hw-agent-pad-default, 0));\n box-sizing: border-box;\n}\n.hw-event-body {\n font-size: 13px;\n line-height: 1.3;\n}\n.hw-event-name {\n font-weight: 600;\n color: var(--hw-text);\n}\n.hw-event-action {\n color: var(--hw-text-2);\n}\n.hw-resolved-banner {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 12px 16px;\n border-top: 1px solid var(--hw-border);\n background: var(--hw-bg-subtle);\n color: var(--hw-text-2);\n font-size: 13px;\n flex-shrink: 0;\n}\n.hw-new {\n flex: 1;\n display: flex;\n flex-direction: column;\n background: var(--hw-bg-subtle);\n}\n.hw-new-body {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 32px 24px;\n text-align: center;\n}\n.hw-new-welcome {\n flex: 1;\n padding: 16px 20px;\n overflow-y: auto;\n}\n.hw-new-heading {\n font-size: 17px;\n font-weight: 600;\n color: var(--hw-text);\n margin-bottom: 6px;\n}\n.hw-new-desc {\n font-size: 13px;\n color: var(--hw-text-2);\n margin-bottom: 24px;\n}\n.hw-powered {\n text-align: center;\n padding: 8px;\n font-size: 11px;\n color: var(--hw-text-4);\n flex-shrink: 0;\n}\n.hw-powered a {\n color: var(--hw-text-2);\n text-decoration: none;\n font-weight: 500;\n}\n.hw-powered a:hover {\n color: var(--hw-text);\n}\n@media (max-width: 479px) {\n .hw-widget {\n bottom: 16px;\n right: 16px;\n left: auto;\n }\n .hw-window {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n width: 100%;\n height: var(--hw-visible-height, 100%);\n border-radius: 0;\n animation: hw-mob-up 0.3s cubic-bezier(0.22, 1, 0.36, 1);\n }\n .hw-window--closing {\n animation: hw-mob-down 0.2s ease forwards;\n }\n @keyframes hw-mob-up {\n from {\n opacity: 0;\n transform: translateY(100%);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n @keyframes hw-mob-down {\n from {\n opacity: 1;\n transform: translateY(0);\n }\n to {\n opacity: 0;\n transform: translateY(100%);\n }\n }\n .hw-hero {\n padding-top: calc(20px + env(safe-area-inset-top, 0px));\n }\n .hw-header {\n padding-top: env(safe-area-inset-top, 0px);\n }\n .hw-tabs {\n padding-bottom: env(safe-area-inset-bottom, 0px);\n }\n .hw-composer {\n padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));\n }\n .hw-powered {\n padding-bottom: calc(5px + env(safe-area-inset-bottom, 0px));\n }\n .hw-header-close,\n .hw-header-back,\n .hw-header-action {\n width: 34px;\n height: 34px;\n }\n .hw-composer-send {\n width: 40px;\n height: 40px;\n }\n .hw-window ~ .hw-bubble {\n display: none;\n }\n .hw-messages {\n padding: 12px 14px;\n }\n .hw-msg {\n max-width: 82%;\n }\n .hw-msg--ai {\n max-width: 100%;\n }\n}\n.hw-preview {\n position: absolute;\n bottom: calc(100% + 12px);\n right: 0;\n width: 300px;\n max-width: calc(100vw - 40px);\n background: var(--hw-bg);\n border: 1px solid var(--hw-border);\n border-radius: 16px;\n box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);\n animation: hw-preview-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);\n overflow: hidden;\n cursor: pointer;\n transition: transform 0.15s, box-shadow 0.15s;\n}\n.hw-preview:hover {\n transform: translateY(-2px);\n box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);\n}\n@keyframes hw-preview-in {\n from {\n opacity: 0;\n transform: translateY(8px) scale(0.95);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n}\n@keyframes hw-preview-out {\n from {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n to {\n opacity: 0;\n transform: translateY(8px) scale(0.95);\n }\n}\n.hw-preview-header {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px 14px 0;\n}\n.hw-preview-avatar {\n width: 28px;\n height: 28px;\n border-radius: 50%;\n background:\n linear-gradient(\n 135deg,\n var(--hw-primary),\n color-mix(in srgb, var(--hw-primary) 50%, black));\n display: flex;\n align-items: center;\n justify-content: center;\n color: white;\n flex-shrink: 0;\n overflow: hidden;\n}\n.hw-preview-avatar svg {\n width: 16px;\n height: 16px;\n}\n.hw-preview-name {\n font-size: 13px;\n font-weight: 600;\n color: var(--hw-text);\n flex: 1;\n}\n.hw-preview-close {\n width: 24px;\n height: 24px;\n border: none;\n background: transparent;\n color: var(--hw-text-3);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n transition: background 0.15s, color 0.15s;\n flex-shrink: 0;\n}\n.hw-preview-close:hover {\n background: var(--hw-bg-subtle);\n color: var(--hw-text-2);\n}\n.hw-preview-close:active {\n transform: scale(0.90);\n transition:\n transform 0.14s cubic-bezier(0.23, 1, 0.32, 1),\n background 0.15s,\n color 0.15s;\n}\n.hw-preview-close svg {\n width: 12px;\n height: 12px;\n}\n.hw-preview-body {\n padding: 4px 14px;\n font-size: 14px;\n line-height: 1.45;\n color: var(--hw-text-2);\n}\n.hw-preview-body:first-of-type {\n padding-top: 8px;\n}\n.hw-preview-body:last-child {\n padding-bottom: 14px;\n}\n.hw-preview-prompt {\n padding: 2px 14px 6px;\n font-size: 14px;\n font-weight: 500;\n color: var(--hw-text-1);\n}\n.hw-preview-quick-replies {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n padding: 0 14px 14px;\n}\n.hw-preview-qr-btn {\n display: inline-flex;\n align-items: center;\n padding: 6px 14px;\n font-size: 13px;\n font-weight: 500;\n line-height: 1.3;\n color: var(--hw-brand, #000);\n background: transparent;\n border: 1px solid var(--hw-border, rgba(0, 0, 0, 0.1));\n border-radius: 18px;\n cursor: pointer;\n transition: background 0.15s, border-color 0.15s;\n}\n.hw-preview-qr-btn:hover {\n background: var(--hw-hover, rgba(0, 0, 0, 0.04));\n border-color: var(--hw-brand, #000);\n}\n.hw-content-search {\n padding: 10px 16px;\n}\n.hw-content-search-box {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n background: var(--hw-bg);\n border: 1px solid var(--hw-border-md);\n border-radius: 10px;\n transition: border-color 0.15s, box-shadow 0.15s;\n}\n.hw-content-search-box:focus-within {\n border-color: var(--hw-focus-border);\n box-shadow: 0 0 0 3px var(--hw-focus-ring);\n}\n.hw-content-search-input {\n flex: 1;\n border: none !important;\n outline: none !important;\n box-shadow: none !important;\n background: none;\n font-size: 13px;\n color: var(--hw-text-1);\n font-family: inherit;\n line-height: 1;\n -webkit-appearance: none;\n}\n.hw-content-search-input:focus,\n.hw-content-search-input:focus-visible {\n outline: none !important;\n box-shadow: none !important;\n border: none !important;\n}\n.hw-content-search-input::placeholder {\n color: var(--hw-text-3);\n}\n.hw-content-search-icon {\n width: 15px;\n height: 15px;\n color: var(--hw-text-3);\n flex-shrink: 0;\n}\n.hw-content-list {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n.hw-content-entries {\n flex: 1;\n overflow-y: auto;\n overscroll-behavior: contain;\n}\n.hw-content-entry {\n display: block;\n width: 100%;\n padding: 14px 16px;\n border: none;\n border-bottom: 1px solid var(--hw-border);\n background: none;\n cursor: pointer;\n text-align: left;\n transition: background-color 0.15s ease;\n -webkit-tap-highlight-color: transparent;\n}\n.hw-content-entry:hover {\n background: var(--hw-bg-hover);\n}\n.hw-content-entry:active {\n background: var(--hw-border);\n}\n.hw-content-entry:last-child {\n border-bottom: none;\n}\n.hw-content-entry-main {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n.hw-content-entry-text {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 3px;\n}\n.hw-content-entry-title {\n font-size: 14px;\n font-weight: 600;\n color: var(--hw-text-1);\n line-height: 1.3;\n}\n.hw-content-entry-desc {\n font-size: 13px;\n color: var(--hw-text-2);\n line-height: 1.4;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n.hw-content-entry-meta {\n display: flex;\n align-items: center;\n gap: 6px;\n margin-top: 2px;\n}\n.hw-content-entry-badge {\n font-size: 11px;\n font-weight: 500;\n color: var(--hw-text-3);\n background: var(--hw-bg-hover);\n padding: 1px 6px;\n border-radius: 4px;\n}\n.hw-content-entry-date {\n font-size: 11px;\n color: var(--hw-text-3);\n}\n.hw-content-entry-chevron {\n width: 16px;\n height: 16px;\n color: var(--hw-text-3);\n flex-shrink: 0;\n opacity: 0.5;\n}\n.hw-content-detail {\n padding: 16px;\n overflow-y: auto;\n overscroll-behavior: contain;\n height: 100%;\n}\n.hw-content-detail-header {\n margin-bottom: 16px;\n}\n.hw-content-detail-title {\n font-size: 17px;\n font-weight: 700;\n color: var(--hw-text-1);\n margin: 0 0 6px;\n line-height: 1.3;\n display: flex;\n align-items: center;\n gap: 6px;\n}\n.hw-content-detail-meta {\n display: flex;\n align-items: center;\n gap: 8px;\n flex-wrap: wrap;\n}\n.hw-content-detail-date {\n font-size: 12px;\n color: var(--hw-text-3);\n}\n.hw-content-detail-body {\n font-size: 14px;\n line-height: 1.6;\n color: var(--hw-text-1);\n}\n.hw-markdown h1 {\n font-size: 17px;\n font-weight: 700;\n margin: 0;\n}\n.hw-markdown h2 {\n font-size: 15px;\n font-weight: 600;\n margin: 0;\n}\n.hw-markdown h3 {\n font-size: 14px;\n font-weight: 600;\n margin: 0;\n}\n.hw-markdown p {\n margin: 0;\n}\n.hw-markdown p:empty,\n.hw-markdown div:empty,\n.hw-markdown p:has(> br:only-child),\n.hw-markdown div:has(> br:only-child) {\n display: none;\n}\n.hw-markdown > * + * {\n margin-top: 12px;\n}\n.hw-markdown > * + h1,\n.hw-markdown > * + h2 {\n margin-top: 20px;\n}\n.hw-markdown > * + h3 {\n margin-top: 16px;\n}\n.hw-markdown > h1 + *,\n.hw-markdown > h2 + *,\n.hw-markdown > h3 + * {\n margin-top: 8px;\n}\n.hw-markdown > *:first-child {\n margin-top: 0;\n}\n.hw-markdown > *:last-child {\n margin-bottom: 0;\n}\n.hw-markdown > br {\n display: none;\n}\n.hw-markdown ul {\n margin: 0;\n padding-left: 20px;\n}\n.hw-markdown li {\n margin: 4px 0;\n}\n.hw-markdown code {\n font-family:\n ui-monospace,\n "SF Mono",\n monospace;\n font-size: 12px;\n background: var(--hw-bg-hover);\n padding: 1px 5px;\n border-radius: 4px;\n}\n.hw-code {\n margin: 10px 0;\n border-radius: 10px;\n overflow: hidden;\n border: 1px solid var(--hw-border, rgba(0, 0, 0, 0.08));\n background: var(--hw-bg-hover, #f5f5f4);\n font-family:\n ui-monospace,\n "SF Mono",\n "Menlo",\n monospace;\n}\n.hw-code-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 10px;\n padding: 7px 8px 7px 12px;\n font-size: 11px;\n color: var(--hw-text-2, #6b7280);\n background: rgba(0, 0, 0, 0.03);\n border-bottom: 1px solid var(--hw-border, rgba(0, 0, 0, 0.06));\n}\n.hw-code-lang {\n text-transform: lowercase;\n letter-spacing: 0.02em;\n font-weight: 500;\n}\n.hw-code-actions {\n display: inline-flex;\n align-items: center;\n gap: 1px;\n}\n.hw-code-action {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 22px;\n height: 22px;\n padding: 0;\n font-family: inherit;\n color: var(--hw-text-2, #6b7280);\n background: transparent;\n border: 1px solid transparent;\n border-radius: 6px;\n cursor: pointer;\n opacity: 0.62;\n transition:\n background 120ms ease,\n color 120ms ease,\n opacity 120ms ease,\n scale 120ms ease;\n}\n.hw-code-action:hover {\n color: var(--hw-text, #111);\n background: rgba(0, 0, 0, 0.06);\n opacity: 1;\n}\n.hw-code-action:active {\n scale: 0.96;\n}\n.hw-code-action svg {\n width: 13px;\n height: 13px;\n}\n.hw-code-copy-icon,\n.hw-code-check-icon {\n position: absolute;\n inset: 50% auto auto 50%;\n transition:\n opacity 180ms cubic-bezier(0.2, 0, 0, 1),\n scale 180ms cubic-bezier(0.2, 0, 0, 1),\n filter 180ms cubic-bezier(0.2, 0, 0, 1);\n translate: -50% -50%;\n}\n.hw-code-check-icon {\n filter: blur(4px);\n opacity: 0;\n scale: 0.25;\n}\n.hw-code-copy--copied .hw-code-copy-icon {\n filter: blur(4px);\n opacity: 0;\n scale: 0.25;\n}\n.hw-code-copy--copied .hw-code-check-icon {\n filter: blur(0);\n opacity: 1;\n scale: 1;\n}\n.hw-code-copy-label {\n position: absolute;\n width: 1px;\n height: 1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n}\n.hw-code-copy--copied {\n color: #16a34a;\n}\n.hw-code-copy--failed {\n color: #dc2626;\n}\n.hw-code pre {\n margin: 0;\n padding: 10px 12px;\n background: transparent;\n border-radius: 0;\n overflow-x: auto;\n max-width: 100%;\n max-height: 320px;\n scrollbar-color: rgba(0, 0, 0, 0.22) transparent;\n scrollbar-width: thin;\n}\n.hw-code pre::-webkit-scrollbar {\n width: 10px;\n height: 10px;\n}\n.hw-code pre::-webkit-scrollbar-track {\n background: transparent;\n}\n.hw-code pre::-webkit-scrollbar-thumb {\n background: rgba(0, 0, 0, 0.18);\n background-clip: content-box;\n border: 3px solid transparent;\n border-radius: 999px;\n}\n.hw-code pre::-webkit-scrollbar-thumb:hover {\n background: rgba(0, 0, 0, 0.28);\n background-clip: content-box;\n}\n.hw-code pre code {\n display: block;\n background: transparent;\n padding: 0;\n font-size: 12px;\n line-height: 1.55;\n white-space: pre;\n color: var(--hw-text, #111);\n}\n@media (prefers-color-scheme: dark) {\n .hw-code {\n background: rgba(255, 255, 255, 0.04);\n border-color: rgba(255, 255, 255, 0.08);\n }\n .hw-code-header {\n background: rgba(255, 255, 255, 0.03);\n border-bottom-color: rgba(255, 255, 255, 0.06);\n }\n .hw-code-action:hover,\n .hw-code-action:focus-visible {\n background: rgba(255, 255, 255, 0.08);\n }\n .hw-code pre {\n scrollbar-color: rgba(255, 255, 255, 0.26) transparent;\n }\n .hw-code pre::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.22);\n background-clip: content-box;\n }\n .hw-code pre::-webkit-scrollbar-thumb:hover {\n background: rgba(255, 255, 255, 0.32);\n background-clip: content-box;\n }\n}\n.hw-markdown pre {\n margin: 8px 0;\n padding: 10px 12px;\n background: var(--hw-bg-hover);\n border-radius: 8px;\n overflow-x: auto;\n max-width: 100%;\n}\n.hw-markdown pre code {\n display: block;\n background: transparent;\n padding: 0;\n border-radius: 0;\n font-size: 12px;\n line-height: 1.5;\n white-space: pre;\n word-break: normal;\n color: inherit;\n}\n.hw-msg-bubble pre {\n margin: 6px 0;\n padding: 8px 10px;\n background: rgba(0, 0, 0, 0.06);\n border-radius: 6px;\n overflow-x: auto;\n max-width: 100%;\n}\n.hw-msg-bubble pre code {\n background: transparent;\n padding: 0;\n font-size: 12px;\n line-height: 1.5;\n white-space: pre;\n}\n.hw-msg-bubble .hw-code pre {\n margin: 0;\n padding: 10px 12px;\n background: transparent;\n border-radius: 0;\n}\n.hw-msg-bubble .hw-code pre code {\n background: transparent;\n padding: 0;\n font-size: 12px;\n line-height: 1.55;\n}\n.hw-msg--team .hw-msg-bubble pre,\n.hw-msg--visitor .hw-msg-bubble pre {\n background: rgba(255, 255, 255, 0.12);\n}\n.hw-markdown blockquote {\n margin: 0 0 12px;\n padding: 8px 12px;\n border-left: 3px solid var(--hw-border);\n color: var(--hw-text-2);\n font-style: italic;\n}\n.hw-markdown a {\n color: var(--hw-primary);\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.hw-markdown img {\n max-width: 100%;\n border-radius: 8px;\n margin: 8px 0;\n outline: 1px solid rgba(0, 0, 0, 0.08);\n outline-offset: -1px;\n}\n.hw-markdown hr {\n border: none;\n border-top: 1px solid var(--hw-border);\n margin: 16px 0;\n}\n.hw-content-empty {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 40px 20px;\n text-align: center;\n}\n.hw-content-empty-title {\n font-size: 14px;\n font-weight: 600;\n color: var(--hw-text-1);\n margin-bottom: 4px;\n}\n.hw-content-empty-desc {\n font-size: 12px;\n color: var(--hw-text-3);\n}\n.hw-content-loading {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 40px 20px;\n}\n.hw-content-load-more {\n display: block;\n width: 100%;\n padding: 10px;\n border: none;\n background: none;\n color: var(--hw-primary);\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n text-align: center;\n}\n.hw-content-load-more:hover {\n background: var(--hw-bg-hover);\n}\n.hw-content-load-more:disabled {\n opacity: 0.5;\n cursor: default;\n}\n@media (hover: none) {\n .hw-composer-preview-remove {\n opacity: 0.7;\n }\n}\n.hw-composer--dragging .hw-composer-box {\n border-color: var(--hw-primary);\n background: color-mix(in srgb, var(--hw-primary) 4%, transparent);\n}\n.hw-composer-drop-overlay {\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background: color-mix(in srgb, var(--hw-bg) 90%, transparent);\n border: 2px dashed var(--hw-primary);\n border-radius: 12px;\n z-index: 10;\n pointer-events: none;\n animation: hw-drop-pulse 1.5s ease-in-out infinite;\n}\n.hw-composer-drop-text {\n font-size: 13px;\n font-weight: 500;\n color: var(--hw-primary);\n}\n@keyframes hw-drop-pulse {\n 0%, 100% {\n opacity: 0.8;\n }\n 50% {\n opacity: 1;\n }\n}\n.hw-disconnect {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n padding: 6px 12px;\n background: #fef3c7;\n color: #92400e;\n font-size: 12px;\n font-weight: 500;\n flex-shrink: 0;\n animation: hw-msg-appear 0.25s ease-out;\n}\n.hw-disconnect-dot {\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background: #f59e0b;\n animation: hw-loading-pulse 1.4s infinite;\n}\n.hw-error-state {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 32px 24px;\n text-align: center;\n gap: 12px;\n}\n.hw-error-icon {\n width: 48px;\n height: 48px;\n border-radius: 50%;\n background: #fef2f2;\n color: #ef4444;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.hw-error-icon svg {\n width: 24px;\n height: 24px;\n}\n.hw-error-title {\n font-size: 15px;\n font-weight: 600;\n color: var(--hw-text);\n}\n.hw-error-desc {\n font-size: 13px;\n color: var(--hw-text-2);\n}\n.hw-error-btn {\n padding: 8px 20px;\n border: 1px solid var(--hw-border-md);\n border-radius: 8px;\n background: var(--hw-bg);\n color: var(--hw-text);\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n transition: background 0.15s;\n}\n.hw-error-btn:hover {\n background: var(--hw-bg-hover);\n}\n.hw-send-error {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n background: #fef2f2;\n color: #dc2626;\n font-size: 12px;\n font-weight: 500;\n flex-shrink: 0;\n animation: hw-msg-appear 0.25s ease-out;\n}\n.hw-send-error-retry {\n margin-left: auto;\n padding: 2px 8px;\n border: 1px solid #fca5a5;\n border-radius: 4px;\n background: none;\n color: #dc2626;\n font-size: 11px;\n font-weight: 600;\n cursor: pointer;\n}\n.hw-send-error-retry:hover {\n background: #fee2e2;\n}\n.hw-resolved {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 12px;\n padding: 16px 20px;\n border-top: 1px solid var(--hw-border);\n flex-shrink: 0;\n}\n.hw-resolved-text {\n font-size: 13px;\n color: var(--hw-text-3);\n font-weight: 500;\n}\n.hw-resolved-actions {\n display: flex;\n gap: 8px;\n}\n.hw-resolved-reopen {\n padding: 6px 16px;\n border: 1px solid var(--hw-border-md);\n border-radius: 8px;\n background: var(--hw-bg);\n color: var(--hw-text);\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n transition: background 0.15s;\n}\n.hw-resolved-reopen:hover {\n background: var(--hw-bg-hover);\n}\n.hw-csat {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n}\n.hw-csat-label {\n font-size: 12px;\n color: var(--hw-text-3);\n}\n.hw-csat-buttons {\n display: flex;\n gap: 8px;\n}\n.hw-csat-btn {\n width: 36px;\n height: 36px;\n border: 1px solid var(--hw-border-md);\n border-radius: 8px;\n background: var(--hw-bg);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 18px;\n transition:\n transform 0.15s,\n border-color 0.15s,\n background 0.15s;\n}\n.hw-csat-btn:hover {\n transform: scale(1.1);\n border-color: var(--hw-text-3);\n}\n.hw-csat-btn--selected {\n border-color: var(--hw-primary);\n background: var(--hw-bg-hover);\n transform: scale(1.15);\n}\n.hw-csat-thanks {\n font-size: 12px;\n color: #22c55e;\n font-weight: 500;\n animation: hw-msg-appear 0.25s ease-out;\n}\n.hw-load-more-trigger {\n display: flex;\n justify-content: center;\n min-height: 1px;\n}\n.hw-load-more-trigger:has(.hw-load-more-spinner) {\n padding: 8px 0;\n}\n.hw-load-more-spinner {\n display: flex;\n gap: 3px;\n}\n.hw-load-more-spinner > div {\n width: 5px;\n height: 5px;\n border-radius: 50%;\n background: var(--hw-text-4);\n animation: hw-loading-pulse 1.4s infinite;\n}\n.hw-load-more-spinner > div:nth-child(2) {\n animation-delay: 0.2s;\n}\n.hw-load-more-spinner > div:nth-child(3) {\n animation-delay: 0.4s;\n}\n.hw-drag-handle {\n display: none;\n}\n@media (max-width: 479px) {\n .hw-drag-handle {\n display: flex;\n justify-content: center;\n padding: 8px 0 4px;\n flex-shrink: 0;\n }\n .hw-drag-handle-pill {\n width: 32px;\n height: 4px;\n border-radius: 2px;\n background: var(--hw-text-4);\n }\n}\n.hw-msg-bubble p {\n margin: 0 0 8px;\n}\n.hw-msg-bubble p:last-child {\n margin-bottom: 0;\n}\n.hw-msg-bubble strong {\n font-weight: 600;\n}\n.hw-msg-bubble em {\n font-style: italic;\n}\n.hw-msg-bubble a {\n color: var(--hw-primary);\n text-decoration: underline;\n text-underline-offset: 2px;\n word-break: break-all;\n}\n.hw-msg-bubble a:hover {\n opacity: 0.8;\n}\n.hw-msg--visitor .hw-msg-bubble a {\n color: rgba(255, 255, 255, 0.9);\n}\n.hw-msg--visitor .hw-msg-bubble a:hover {\n color: white;\n}\n.hw-msg-bubble ul,\n.hw-msg-bubble ol {\n margin: 4px 0 8px;\n padding-left: 20px;\n}\n.hw-msg-bubble li {\n margin: 2px 0;\n}\n.hw-msg-bubble code {\n padding: 1px 4px;\n border-radius: 3px;\n background: rgba(0, 0, 0, 0.06);\n font-size: 0.9em;\n font-family:\n ui-monospace,\n SFMono-Regular,\n Menlo,\n monospace;\n}\n.hw-msg-bubble pre {\n margin: 4px 0 8px;\n padding: 8px 10px;\n border-radius: 6px;\n background: rgba(0, 0, 0, 0.06);\n overflow-x: auto;\n font-size: 0.85em;\n}\n.hw-msg-bubble pre code {\n padding: 0;\n background: none;\n}\n.hw-msg-bubble blockquote {\n margin: 4px 0 8px;\n padding: 4px 0 4px 12px;\n border-left: 3px solid var(--hw-border-md);\n color: var(--hw-text-2);\n}\n.hw-widget[data-theme=dark] {\n --hw-bg: #1c1c1e;\n --hw-bg-subtle: #161618;\n --hw-bg-hover: #2c2c2e;\n --hw-border: rgba(255, 255, 255, 0.08);\n --hw-border-md: rgba(255, 255, 255, 0.14);\n --hw-text: #f5f5f5;\n --hw-text-1: #f5f5f5;\n --hw-text-2: #a1a1aa;\n --hw-text-3: #71717a;\n --hw-text-4: #52525b;\n --hw-visitor-bubble-bg: #2c2c2e;\n --hw-visitor-bubble-text: #f5f5f5;\n --hw-focus-border: rgba(255, 255, 255, 0.28);\n --hw-focus-ring: rgba(255, 255, 255, 0.08);\n --hw-brand: #f5f5f5;\n --hw-on-brand: #1c1c1e;\n}\n@media (prefers-color-scheme: dark) {\n .hw-widget:not([data-theme=light]) .hw-messages {\n scrollbar-color: rgba(255, 255, 255, 0.26) transparent;\n }\n .hw-widget:not([data-theme=light]) .hw-messages::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.2);\n background-clip: content-box;\n }\n .hw-widget:not([data-theme=light]) .hw-messages::-webkit-scrollbar-thumb:hover {\n background: rgba(255, 255, 255, 0.32);\n background-clip: content-box;\n }\n .hw-widget:not([data-theme=light]) {\n --hw-bg: #1c1c1e;\n --hw-bg-subtle: #161618;\n --hw-bg-hover: #2c2c2e;\n --hw-border: rgba(255, 255, 255, 0.08);\n --hw-border-md: rgba(255, 255, 255, 0.14);\n --hw-text: #f5f5f5;\n --hw-text-1: #f5f5f5;\n --hw-text-2: #a1a1aa;\n --hw-text-3: #71717a;\n --hw-text-4: #52525b;\n --hw-visitor-bubble-bg: #2c2c2e;\n --hw-visitor-bubble-text: #f5f5f5;\n --hw-focus-border: rgba(255, 255, 255, 0.28);\n --hw-focus-ring: rgba(255, 255, 255, 0.08);\n --hw-brand: #f5f5f5;\n --hw-on-brand: #1c1c1e;\n }\n}\n@media (prefers-color-scheme: dark) {\n .hw-widget:not([data-theme=light]) .hw-header {\n background: var(--hw-bg);\n border-color: var(--hw-border);\n }\n .hw-header-bot-icon {\n background: var(--hw-bg-hover);\n }\n .hw-header-name,\n .hw-header-title {\n color: var(--hw-text);\n }\n .hw-header-status {\n color: var(--hw-text-2);\n }\n .hw-header-close,\n .hw-header-back {\n color: var(--hw-text-2);\n }\n .hw-header-close:hover,\n .hw-header-back:hover {\n background: var(--hw-bg-hover);\n color: var(--hw-text);\n }\n .hw-content-entry {\n background: var(--hw-bg);\n border-color: var(--hw-border);\n }\n .hw-content-entry:hover {\n background: var(--hw-bg-hover);\n border-color: var(--hw-border-md);\n }\n .hw-content-empty,\n .hw-empty {\n color: var(--hw-text-3);\n }\n .hw-conv-card {\n border-color: var(--hw-border);\n }\n .hw-recent-row {\n border-color: var(--hw-border);\n }\n .hw-composer-drop-overlay {\n background: rgba(0, 0, 0, 0.6);\n color: var(--hw-text);\n }\n .hw-composer--dragging .hw-composer-box {\n border-color: var(--hw-focus-border);\n box-shadow: 0 0 0 3px var(--hw-focus-ring);\n }\n .hw-hero {\n background:\n linear-gradient(\n 160deg,\n color-mix(in srgb, var(--hw-primary) 40%, black) 0%,\n var(--hw-primary) 50%,\n color-mix(in srgb, var(--hw-primary) 25%, black) 100%);\n }\n .hw-sheet {\n background: var(--hw-bg);\n }\n .hw-card {\n background: var(--hw-bg-hover);\n border-color: var(--hw-border);\n }\n .hw-card:hover {\n background: #333;\n }\n .hw-window {\n box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.06);\n }\n .hw-bubble:focus-visible {\n outline-color: var(--hw-text-3);\n }\n .hw-msg--visitor .hw-msg-bubble {\n background: var(--hw-primary);\n color: white;\n }\n .hw-msg-bubble code {\n background: rgba(255, 255, 255, 0.08);\n }\n .hw-msg-bubble pre {\n background: rgba(255, 255, 255, 0.08);\n }\n .hw-composer-box {\n background: var(--hw-bg);\n border-color: var(--hw-border);\n }\n .hw-composer-input {\n color: var(--hw-text);\n }\n .hw-tabs {\n background: var(--hw-bg);\n border-color: var(--hw-border);\n }\n .hw-conv-card:hover,\n .hw-recent-row:hover {\n background: var(--hw-bg-hover);\n }\n .hw-disconnect {\n background: #422006;\n color: #fcd34d;\n }\n .hw-send-error {\n background: #450a0a;\n color: #fca5a5;\n }\n .hw-error-icon {\n background: #450a0a;\n color: #f87171;\n }\n .hw-resolved {\n border-color: var(--hw-border);\n }\n .hw-resolved-reopen,\n .hw-csat-btn {\n background: var(--hw-bg-hover);\n border-color: var(--hw-border-md);\n color: var(--hw-text);\n }\n .hw-hover-preview {\n background: #1c1c1e;\n border-color: var(--hw-border);\n }\n .hw-content-search-box {\n background: var(--hw-bg-hover);\n border-color: var(--hw-border-md);\n }\n .hw-preview {\n background: var(--hw-bg);\n border-color: var(--hw-border);\n }\n}\n');
5414
+ styleInject(':host {\n all: initial;\n font-family:\n -apple-system,\n BlinkMacSystemFont,\n "Segoe UI",\n Roboto,\n "Helvetica Neue",\n Arial,\n sans-serif;\n font-size: 14px;\n line-height: 1.5;\n color: #1a1a1a;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.hw-widget {\n font-family:\n -apple-system,\n BlinkMacSystemFont,\n "Segoe UI",\n Roboto,\n "Helvetica Neue",\n Arial,\n sans-serif;\n font-size: 14px;\n line-height: 1.5;\n color: #1a1a1a;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.hw-widget *,\n.hw-widget *::before,\n.hw-widget *::after {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n:where(.hw-widget) {\n --hw-primary: #171717;\n --hw-primary-hover: #2a2a2a;\n --hw-brand: #171717;\n --hw-on-brand: #ffffff;\n --hw-focus-border: #9ca3af;\n --hw-focus-ring: rgba(0, 0, 0, 0.06);\n --hw-accent: #6366f1;\n --hw-bg: #ffffff;\n --hw-bg-subtle: #fafafa;\n --hw-bg-hover: #f5f5f5;\n --hw-border: #f0f0f0;\n --hw-border-md: #e5e5e5;\n --hw-text: #111;\n --hw-text-1: #111;\n --hw-text-2: #666;\n --hw-text-3: #999;\n --hw-text-4: #bbb;\n --hw-radius: 16px;\n --hw-visitor-bubble-bg: #f0f0f0;\n --hw-visitor-bubble-text: #1a1a1a;\n --hw-font:\n -apple-system,\n BlinkMacSystemFont,\n "Segoe UI",\n Roboto,\n "Helvetica Neue",\n Arial,\n sans-serif;\n}\n.hw-agent-img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n.hw-agent-icon {\n width: 100%;\n height: 100%;\n border-radius: inherit;\n}\n.hw-widget :focus-visible {\n outline: 2px solid var(--hw-primary);\n outline-offset: 2px;\n}\n.hw-widget :focus:not(:focus-visible) {\n outline: none;\n}\n.hw-widget {\n position: fixed;\n bottom: 20px;\n right: var(--hw-position-right, 20px);\n left: var(--hw-position-left, auto);\n z-index: 999999;\n font-family: var(--hw-font);\n}\n@keyframes hw-bubble-enter {\n from {\n opacity: 0;\n transform: scale(0.6);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n.hw-bubble {\n width: 48px;\n height: 48px;\n border-radius: 14px;\n background: var(--hw-primary);\n color: white;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;\n position: relative;\n overflow: visible;\n animation: hw-bubble-enter 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) both;\n}\n.hw-bubble--rounded {\n border-radius: 14px;\n}\n.hw-bubble--square {\n border-radius: 8px;\n}\n.hw-bubble--pill {\n border-radius: 24px;\n}\n.hw-bubble--launcher-bubble,\n.hw-bubble--launcher-help {\n width: auto;\n padding: 0 16px 0 12px;\n gap: 8px;\n border-radius: 24px;\n}\n.hw-bubble--launcher-bubble.hw-bubble--square,\n.hw-bubble--launcher-help.hw-bubble--square {\n border-radius: 8px;\n}\n.hw-bubble--launcher-bubble.hw-bubble--rounded,\n.hw-bubble--launcher-help.hw-bubble--rounded {\n border-radius: 14px;\n}\n.hw-bubble-label {\n font-size: 14px;\n font-weight: 600;\n white-space: nowrap;\n line-height: 1;\n position: static;\n opacity: 1;\n transform: none;\n}\n.hw-bubble--launcher-bubble .hw-bubble-icon,\n.hw-bubble--launcher-help .hw-bubble-icon {\n position: static;\n}\n.hw-bubble:hover {\n transform: scale(1.05);\n box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);\n}\n.hw-bubble:active {\n transform: scale(0.95);\n}\n.hw-bubble--open {\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);\n}\n.hw-bubble:focus-visible {\n outline: 2px solid white;\n outline-offset: 2px;\n}\n.hw-bubble-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;\n}\n.hw-bubble-icon svg {\n width: 22px;\n height: 22px;\n}\n.hw-bubble-icon--hidden {\n transform: scale(0.3) rotate(90deg);\n opacity: 0;\n}\n.hw-bubble-icon--bot {\n}\n.hw-bubble--avatar .hw-bubble-icon--bot {\n width: 100%;\n height: 100%;\n}\n.hw-bubble--avatar .hw-bubble-icon--bot .hw-agent-img {\n width: 100%;\n height: 100%;\n border-radius: 0;\n}\n.hw-agent-img.hw-agent-img--logo {\n object-fit: contain;\n padding: 10px;\n box-sizing: border-box;\n}\n.hw-bubble--avatar .hw-bubble-icon--bot .hw-agent-img.hw-agent-img--logo {\n padding: 10px;\n box-sizing: border-box;\n object-fit: contain;\n}\n.hw-bubble-icon--close svg {\n width: 22px;\n height: 22px;\n}\n.hw-bubble-badge {\n position: absolute;\n top: -4px;\n right: -4px;\n min-width: 20px;\n height: 20px;\n border-radius: 10px;\n background: var(--hw-primary);\n color: white;\n font-size: 11px;\n font-weight: 700;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 5px;\n border: 2px solid white;\n animation: hw-badge-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);\n}\n@keyframes hw-badge-pop {\n from {\n transform: scale(0);\n }\n to {\n transform: scale(1);\n }\n}\n.hw-bubble-badge::after {\n content: "";\n position: absolute;\n inset: -2px;\n border-radius: inherit;\n background: var(--hw-primary);\n opacity: 0;\n animation: hw-badge-pulse 2s ease-out infinite;\n}\n@keyframes hw-badge-pulse {\n 0% {\n opacity: 0.5;\n transform: scale(1);\n }\n 100% {\n opacity: 0;\n transform: scale(1.8);\n }\n}\n.hw-window {\n position: absolute;\n bottom: 72px;\n right: var(--hw-window-right, 0);\n left: var(--hw-window-left, auto);\n width: 440px;\n height: 640px;\n background: var(--hw-bg-subtle);\n color: var(--hw-text);\n border-radius: var(--hw-radius);\n box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);\n display: flex;\n flex-direction: column;\n overflow: hidden;\n animation: hw-window-open 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);\n transition: width 280ms cubic-bezier(0.4, 0, 0.2, 1), height 280ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n.hw-window--reading {\n width: min(720px, calc(100vw - 40px));\n height: min(800px, calc(100vh - 112px));\n}\n@keyframes hw-window-open {\n from {\n opacity: 0;\n transform: translateY(12px) scale(0.96);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n}\n.hw-window--closing {\n animation: hw-window-close 0.2s ease forwards;\n}\n@keyframes hw-window-close {\n from {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n to {\n opacity: 0;\n transform: translateY(8px) scale(0.98);\n }\n}\n.hw-content {\n flex: 1;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n min-height: 0;\n}\n@media (prefers-reduced-motion: reduce) {\n .hw-window,\n .hw-window--closing,\n .hw-content,\n .hw-msg,\n .hw-bubble,\n .hw-bubble-icon,\n .hw-bubble-badge,\n .hw-bubble-badge::after,\n .hw-typing-dot,\n .hw-loading-dot {\n animation-duration: 0.01ms !important;\n transition-duration: 0.01ms !important;\n }\n}\n.hw-hero {\n flex-shrink: 0;\n background:\n linear-gradient(\n 160deg,\n color-mix(in srgb, var(--hw-primary) 60%, black) 0%,\n var(--hw-primary) 50%,\n color-mix(in srgb, var(--hw-primary) 40%, black) 100%);\n color: white;\n padding: 20px 22px 40px;\n}\n.hw-hero-top {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n}\n.hw-hero-close {\n width: 30px;\n height: 30px;\n border-radius: 50%;\n border: none;\n background: rgba(255, 255, 255, 0.1);\n color: rgba(255, 255, 255, 0.6);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: background 0.15s, color 0.15s;\n}\n.hw-hero-close:hover {\n background: rgba(255, 255, 255, 0.2);\n color: white;\n}\n.hw-hero-close:active {\n transform: scale(0.92);\n transition:\n transform 0.14s cubic-bezier(0.23, 1, 0.32, 1),\n background 0.15s,\n color 0.15s;\n}\n.hw-hero-close svg {\n width: 20px;\n height: 20px;\n}\n.hw-hero-bot-icon {\n width: 36px;\n height: 36px;\n flex-shrink: 0;\n color: white;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 10px;\n}\n.hw-hero-bot-icon svg {\n width: 32px;\n height: 32px;\n}\n.hw-hero-bot-icon .hw-agent-img,\n.hw-hero-bot-icon .hw-agent-icon {\n border-radius: inherit;\n overflow: hidden;\n object-fit: contain;\n}\n.hw-hero-greeting {\n font-size: 26px;\n font-weight: 700;\n line-height: 1.15;\n margin-bottom: 6px;\n}\n.hw-hero-greeting-name {\n font-weight: 300;\n}\n.hw-hero-greeting-question {\n font-weight: 700;\n}\n.hw-hero-subtitle {\n font-size: 15px;\n color: rgba(255, 255, 255, 0.5);\n line-height: 1.35;\n}\n.hw-sheet {\n flex: 1;\n overflow-y: auto;\n min-height: 0;\n background: #ffffff;\n border-radius: 20px 20px 0 0;\n margin-top: -24px;\n box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);\n position: relative;\n z-index: 1;\n}\n.hw-sheet-inner {\n padding: 20px 16px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n.hw-header {\n display: flex;\n align-items: center;\n padding: 12px 16px;\n background: var(--hw-primary);\n color: white;\n flex-shrink: 0;\n gap: 10px;\n}\n.hw-header--sub {\n justify-content: space-between;\n background: transparent;\n color: var(--hw-text);\n border-bottom: 1px solid var(--hw-border);\n}\n.hw-header-back {\n width: 28px;\n height: 28px;\n border-radius: 8px;\n border: none;\n background: transparent;\n color: var(--hw-text-3);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: color 0.15s, background 0.15s;\n flex-shrink: 0;\n}\n.hw-header-back svg {\n width: 18px;\n height: 18px;\n}\n.hw-header-back:hover {\n color: var(--hw-text);\n background: var(--hw-bg-subtle);\n}\n.hw-header-identity {\n display: flex;\n align-items: center;\n gap: 10px;\n flex: 1;\n min-width: 0;\n}\n.hw-header-bot-icon {\n width: 28px;\n height: 28px;\n flex-shrink: 0;\n color: var(--hw-text);\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 8px;\n background: var(--hw-agent-bg, var(--hw-agent-bg-default, transparent));\n}\n.hw-header-bot-icon svg {\n width: 24px;\n height: 24px;\n}\n.hw-header-bot-icon--team {\n background: var(--hw-brand, #0a0a0a);\n color: var(--hw-on-brand, #fff);\n}\n.hw-header-agent-img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: inherit;\n}\n.hw-header-bot-icon .hw-agent-img,\n.hw-header-bot-icon .hw-agent-icon {\n border-radius: inherit;\n overflow: hidden;\n}\n.hw-header-bot-icon .hw-agent-img {\n object-fit: var(--hw-agent-fit, var(--hw-agent-fit-default, cover));\n padding: var(--hw-agent-pad, var(--hw-agent-pad-default, 0));\n box-sizing: border-box;\n}\n.hw-widget[data-has-avatar=true] {\n --hw-agent-bg-default: var(--hw-primary);\n --hw-agent-fit-default: contain;\n --hw-agent-pad-default: 6px;\n}\n.hw-header-agent-initials {\n font-size: 11px;\n font-weight: 600;\n line-height: 1;\n}\n.hw-header-info {\n flex: 1;\n min-width: 0;\n}\n.hw-header-name {\n font-size: 14px;\n font-weight: 600;\n line-height: 1.3;\n}\n.hw-header-status {\n font-size: 12px;\n color: var(--hw-text-3);\n line-height: 1.3;\n}\n.hw-header-close {\n width: 28px;\n height: 28px;\n border-radius: 8px;\n border: none;\n background: transparent;\n color: var(--hw-text-3);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n transition:\n background-color 140ms cubic-bezier(0.23, 1, 0.32, 1),\n color 140ms cubic-bezier(0.23, 1, 0.32, 1),\n transform 140ms cubic-bezier(0.23, 1, 0.32, 1);\n flex-shrink: 0;\n}\n.hw-header-close svg {\n width: 20px;\n height: 20px;\n}\n.hw-header-close:hover {\n background: var(--hw-bg-subtle);\n color: var(--hw-text);\n}\n.hw-header-close:active {\n transform: scale(0.92);\n}\n.hw-header--centered {\n justify-content: space-between;\n background: transparent;\n color: var(--hw-text);\n border-bottom: 1px solid var(--hw-border);\n}\n.hw-header--centered .hw-header-title {\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n max-width: calc(100% - 88px);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n text-align: center;\n}\n.hw-header-spacer {\n width: 28px;\n flex-shrink: 0;\n}\n.hw-header--messages {\n justify-content: space-between;\n background: transparent;\n color: var(--hw-text);\n border-bottom: 1px solid var(--hw-border);\n}\n.hw-header-title {\n font-size: 16px;\n font-weight: 600;\n}\n.hw-header-actions {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n.hw-header-action {\n width: 28px;\n height: 28px;\n border-radius: 8px;\n border: none;\n background: transparent;\n color: var(--hw-text-3);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n transition:\n background-color 140ms cubic-bezier(0.23, 1, 0.32, 1),\n color 140ms cubic-bezier(0.23, 1, 0.32, 1),\n transform 140ms cubic-bezier(0.23, 1, 0.32, 1);\n}\n.hw-header-action svg {\n width: 16px;\n height: 16px;\n}\n.hw-header-action:hover {\n background: var(--hw-bg-subtle);\n color: var(--hw-text);\n}\n.hw-header-action:active {\n transform: scale(0.94);\n}\n.hw-card {\n display: flex;\n align-items: center;\n gap: 12px;\n width: 100%;\n padding: 14px 16px;\n border-radius: 14px;\n background: var(--hw-bg);\n border: 1px solid rgba(0, 0, 0, 0.06);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);\n cursor: pointer;\n transition: box-shadow 180ms cubic-bezier(0.23, 1, 0.32, 1), transform 180ms cubic-bezier(0.23, 1, 0.32, 1);\n text-align: left;\n color: var(--hw-text);\n font-family: inherit;\n}\n.hw-card:hover {\n box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.05);\n transform: translateY(-1px);\n}\n.hw-card:active {\n transform: translateY(0) scale(0.99);\n transition-duration: 120ms;\n}\n.hw-card-body {\n flex: 1;\n min-width: 0;\n}\n.hw-card-title {\n font-size: 14px;\n font-weight: 600;\n line-height: 1.3;\n color: var(--hw-text);\n}\n.hw-card-meta {\n font-size: 12px;\n color: var(--hw-text-3);\n line-height: 1.3;\n margin-top: 1px;\n}\n.hw-card-arrow {\n width: 32px;\n height: 32px;\n border-radius: 50%;\n background: var(--hw-primary);\n color: white;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n.hw-card-arrow svg {\n width: 14px;\n height: 14px;\n}\n.hw-msgs-tab {\n flex: 1;\n overflow-y: auto;\n padding: 12px 16px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.hw-recent-card {\n border-radius: 14px;\n background: var(--hw-bg);\n border: 1px solid rgba(0, 0, 0, 0.06);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);\n overflow: hidden;\n}\n.hw-recent-header {\n font-size: 12px;\n font-weight: 600;\n color: var(--hw-text-2);\n padding: 12px 14px 0;\n}\n.hw-recent-row {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n padding: 10px 14px;\n border: none;\n border-bottom: 1px solid var(--hw-border);\n background: none;\n cursor: pointer;\n text-align: left;\n font-family: inherit;\n color: var(--hw-text);\n transition: background-color 140ms cubic-bezier(0.23, 1, 0.32, 1), transform 140ms cubic-bezier(0.23, 1, 0.32, 1);\n position: relative;\n}\n.hw-recent-row:hover {\n background: rgba(0, 0, 0, 0.03);\n}\n.hw-recent-row:active {\n transform: scale(0.995);\n}\n.hw-recent-row--last {\n border-bottom: none;\n}\n.hw-recent-row .hw-conv-card-avatar {\n width: 32px;\n height: 32px;\n border-radius: 8px;\n}\n.hw-recent-row .hw-conv-card-avatar svg {\n width: 18px;\n height: 18px;\n}\n.hw-recent-row .hw-conv-card-name {\n font-size: 13px;\n}\n.hw-recent-row .hw-conv-card-preview {\n font-size: 12px;\n}\n.hw-recent-row--unread .hw-conv-card-name {\n color: var(--hw-text);\n}\n.hw-recent-row--unread .hw-conv-card-time {\n color: var(--hw-primary);\n font-weight: 500;\n}\n.hw-recent-row-badge {\n min-width: 18px;\n height: 18px;\n border-radius: 9px;\n background: var(--hw-primary);\n color: white;\n font-size: 11px;\n font-weight: 600;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 5px;\n flex-shrink: 0;\n font-variant-numeric: tabular-nums;\n}\n.hw-recent-see-all {\n display: block;\n width: 100%;\n padding: 10px 14px;\n text-align: center;\n font-size: 13px;\n font-weight: 500;\n color: var(--hw-text);\n background: none;\n border: none;\n border-top: 1px solid var(--hw-border);\n cursor: pointer;\n font-family: inherit;\n transition: background 0.1s;\n}\n.hw-recent-see-all:hover {\n background: rgba(0, 0, 0, 0.02);\n}\n.hw-conv-card {\n position: relative;\n display: flex;\n flex-direction: column;\n gap: 4px;\n width: 100%;\n padding: 14px 16px;\n border-radius: 14px;\n background: var(--hw-bg);\n border: 1px solid rgba(0, 0, 0, 0.06);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);\n cursor: pointer;\n transition: box-shadow 0.15s, transform 0.1s;\n text-align: left;\n font-family: inherit;\n color: var(--hw-text);\n}\n.hw-conv-card:hover {\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.04);\n}\n.hw-conv-card:active {\n transform: scale(0.99);\n}\n.hw-conv-card-row {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n.hw-conv-card-avatar {\n width: 36px;\n height: 36px;\n border-radius: 10px;\n background: var(--hw-agent-bg, var(--hw-agent-bg-default, var(--hw-bg-subtle)));\n color: var(--hw-text-3);\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n overflow: hidden;\n}\n.hw-conv-card-avatar svg {\n width: 20px;\n height: 20px;\n}\n.hw-conv-card-avatar-img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n.hw-conv-card-avatar .hw-agent-img {\n object-fit: var(--hw-agent-fit, var(--hw-agent-fit-default, cover));\n padding: var(--hw-agent-pad, var(--hw-agent-pad-default, 0));\n box-sizing: border-box;\n}\n.hw-conv-card-avatar--team {\n background: var(--hw-brand, #0a0a0a);\n color: var(--hw-on-brand, #fff);\n}\n.hw-conv-card-avatar-initials {\n font-size: 12px;\n font-weight: 600;\n line-height: 1;\n letter-spacing: 0.02em;\n}\n.hw-conv-card-content {\n flex: 1;\n min-width: 0;\n}\n.hw-conv-card-top {\n display: flex;\n align-items: baseline;\n gap: 8px;\n}\n.hw-conv-card-name {\n flex: 1;\n font-size: 14px;\n font-weight: 600;\n color: var(--hw-text);\n}\n.hw-conv-card-time {\n font-size: 11px;\n color: var(--hw-text-3);\n flex-shrink: 0;\n font-variant-numeric: tabular-nums;\n}\n.hw-conv-card-preview {\n font-size: 13px;\n color: var(--hw-text-2);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n line-height: 1.4;\n margin-top: 1px;\n}\n.hw-conv-card--unread .hw-conv-card-name {\n color: var(--hw-text);\n}\n.hw-conv-card--unread .hw-conv-card-time {\n color: var(--hw-primary);\n font-weight: 500;\n}\n.hw-conv-card-badge {\n position: absolute;\n top: 12px;\n right: 12px;\n min-width: 18px;\n height: 18px;\n border-radius: 9px;\n background: var(--hw-primary);\n color: white;\n font-size: 11px;\n font-weight: 600;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 5px;\n font-variant-numeric: tabular-nums;\n}\n.hw-empty-state {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 32px;\n text-align: center;\n}\n.hw-empty-icon-wrap {\n width: 48px;\n height: 48px;\n border-radius: 50%;\n background: var(--hw-bg-subtle);\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 16px;\n color: var(--hw-text-3);\n}\n.hw-empty-icon-wrap svg {\n width: 24px;\n height: 24px;\n}\n.hw-empty-title {\n font-size: 15px;\n font-weight: 600;\n color: var(--hw-text);\n margin-bottom: 4px;\n}\n.hw-empty-desc {\n font-size: 13px;\n color: var(--hw-text-3);\n margin-bottom: 20px;\n}\n.hw-empty-btn {\n padding: 8px 20px;\n border-radius: 10px;\n background: var(--hw-primary);\n color: white;\n border: none;\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n font-family: inherit;\n transition: background 0.15s;\n}\n.hw-empty-btn:hover {\n background: var(--hw-primary-hover);\n}\n.hw-tabs {\n display: flex;\n border-top: 1px solid var(--hw-border);\n flex-shrink: 0;\n background: var(--hw-bg-subtle);\n}\n.hw-tabs-item {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 2px;\n padding: 8px 0;\n border: none;\n background: none;\n cursor: pointer;\n font-family: inherit;\n font-size: 11px;\n font-weight: 500;\n color: var(--hw-text-3);\n transition: color 0.15s;\n}\n.hw-tabs-item svg {\n width: 22px;\n height: 22px;\n overflow: visible;\n}\n.hw-tabs-item--active {\n color: var(--hw-text);\n}\n.hw-tabs-item:hover {\n color: var(--hw-text-2);\n}\n.hw-tabs-item:active {\n transform: scale(0.94);\n transition: transform 0.14s cubic-bezier(0.23, 1, 0.32, 1), color 0.15s;\n}\n.hw-tabs-icon-wrap {\n position: relative;\n display: inline-flex;\n}\n.hw-tabs-badge {\n position: absolute;\n top: -6px;\n right: -10px;\n min-width: 16px;\n height: 16px;\n border-radius: 8px;\n background: var(--hw-primary);\n color: white;\n font-size: 10px;\n font-weight: 700;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 4px;\n font-variant-numeric: tabular-nums;\n}\n.hw-messages {\n flex: 1;\n overflow-y: auto;\n overflow-x: hidden;\n padding: 16px 20px;\n background: var(--hw-bg-subtle);\n display: flex;\n flex-direction: column;\n gap: 2px;\n overscroll-behavior: contain;\n min-width: 0;\n scrollbar-color: rgba(0, 0, 0, 0.2) transparent;\n scrollbar-width: thin;\n}\n.hw-messages::-webkit-scrollbar {\n width: 10px;\n height: 10px;\n}\n.hw-messages::-webkit-scrollbar-track {\n background: transparent;\n}\n.hw-messages::-webkit-scrollbar-thumb {\n background: rgba(0, 0, 0, 0.16);\n background-clip: content-box;\n border: 3px solid transparent;\n border-radius: 999px;\n}\n.hw-messages::-webkit-scrollbar-thumb:hover {\n background: rgba(0, 0, 0, 0.28);\n background-clip: content-box;\n}\n.hw-widget[data-theme=dark] .hw-messages {\n scrollbar-color: rgba(255, 255, 255, 0.26) transparent;\n}\n.hw-widget[data-theme=dark] .hw-messages::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.2);\n background-clip: content-box;\n}\n.hw-widget[data-theme=dark] .hw-messages::-webkit-scrollbar-thumb:hover {\n background: rgba(255, 255, 255, 0.32);\n background-clip: content-box;\n}\n.hw-empty {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 32px;\n color: var(--hw-text-3);\n text-align: center;\n}\n.hw-empty-icon {\n width: 40px;\n height: 40px;\n margin-bottom: 12px;\n opacity: 0.3;\n}\n.hw-empty-text {\n font-size: 13px;\n}\n.hw-date-sep {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px 0;\n}\n.hw-date-sep-line {\n flex: 1;\n height: 1px;\n background: var(--hw-border-md);\n}\n.hw-date-sep-text {\n font-size: 11px;\n color: var(--hw-text-3);\n font-weight: 500;\n white-space: nowrap;\n}\n.hw-msg {\n display: flex;\n padding: 4px 0;\n max-width: 75%;\n min-width: 0;\n animation: hw-msg-appear 0.25s ease-out;\n}\n@keyframes hw-msg-appear {\n from {\n opacity: 0;\n transform: translateY(6px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n.hw-msg--visitor {\n align-self: flex-end;\n}\n.hw-msg--team,\n.hw-msg--ai {\n align-self: flex-start;\n}\n.hw-msg--ai {\n width: 100%;\n max-width: 100%;\n}\n.hw-msg-body {\n display: flex;\n flex-direction: column;\n min-width: 0;\n max-width: 100%;\n}\n.hw-msg-bubble {\n padding: 10px 14px;\n border-radius: 18px;\n font-size: 14px;\n line-height: 1.45;\n white-space: pre-wrap;\n word-break: break-word;\n overflow-wrap: anywhere;\n max-width: 100%;\n}\n.hw-msg--visitor .hw-msg-bubble {\n background: var(--hw-primary);\n color: white;\n border-bottom-right-radius: 4px;\n}\n.hw-msg--team .hw-msg-bubble {\n background: var(--hw-visitor-bubble-bg);\n color: var(--hw-visitor-bubble-text);\n border-bottom-left-radius: 4px;\n}\n.hw-msg--ai .hw-msg-bubble {\n background: var(--hw-visitor-bubble-bg);\n color: var(--hw-text);\n border-bottom-left-radius: 4px;\n white-space: normal;\n max-width: min(100%, 640px);\n}\n.hw-msg--ai .hw-msg-body {\n width: 100%;\n}\n.hw-msg--ai .hw-msg-bubble:has(.hw-code),\n.hw-msg--ai .hw-msg-bubble:has(pre) {\n width: 100%;\n}\n.hw-quick-replies {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n margin-top: 8px;\n}\n.hw-quick-reply-btn {\n font: inherit;\n font-size: 13px;\n font-weight: 500;\n padding: 6px 14px;\n border-radius: 18px;\n border: 1px solid rgba(0, 0, 0, 0.12);\n background: var(--hw-bg, #fff);\n color: var(--hw-text-1, #1a1a1a);\n cursor: pointer;\n transition:\n background 120ms ease,\n border-color 120ms ease,\n box-shadow 120ms ease,\n transform 80ms ease;\n line-height: 1.3;\n}\n.hw-quick-reply-btn:hover:not(:disabled) {\n border-color: var(--hw-primary);\n background: color-mix(in srgb, var(--hw-primary) 8%, transparent);\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);\n}\n.hw-quick-reply-btn:active:not(:disabled) {\n transform: scale(0.97);\n}\n.hw-quick-reply-btn:disabled {\n cursor: default;\n opacity: 0.4;\n}\n.hw-quick-reply-btn[data-tapped=true] {\n background: var(--hw-primary);\n color: white;\n border-color: var(--hw-primary);\n opacity: 1;\n}\n.hw-quick-replies[data-cancelled=true] .hw-quick-reply-btn {\n border-color: rgba(0, 0, 0, 0.08);\n color: var(--hw-text-muted, #9ca3af);\n}\n.hw-msg--ai .hw-code {\n width: 100%;\n box-sizing: border-box;\n}\n.hw-msg-meta {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-size: 11px;\n color: var(--hw-text-3);\n margin-top: 2px;\n padding: 0 4px;\n font-variant-numeric: tabular-nums;\n}\n.hw-msg-time {\n white-space: nowrap;\n}\n.hw-msg--visitor .hw-msg-meta {\n text-align: right;\n}\n.hw-msg--team .hw-msg-body,\n.hw-msg--ai .hw-msg-body {\n align-items: flex-start;\n}\n.hw-msg--visitor .hw-msg-body {\n align-items: flex-end;\n}\n.hw-msg-sender {\n font-size: 11px;\n font-weight: 500;\n color: var(--hw-text-3);\n margin-bottom: 3px;\n padding: 0 4px;\n}\n.hw-typing {\n display: flex;\n flex-direction: column;\n gap: 3px;\n padding: 8px 0;\n width: fit-content;\n animation: hw-msg-appear 0.25s ease-out;\n}\n.hw-typing-label {\n font-size: 11px;\n font-weight: 500;\n color: var(--hw-text-3);\n padding: 0 4px;\n}\n.hw-typing-dots {\n display: flex;\n gap: 3px;\n padding: 10px 14px;\n width: fit-content;\n background: var(--hw-visitor-bubble-bg);\n border-radius: var(--hw-radius);\n border-bottom-left-radius: 4px;\n}\n.hw-typing-dot {\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background: var(--hw-text-3);\n animation: hw-typing-bounce 1.4s infinite;\n}\n.hw-typing-dot:nth-child(2) {\n animation-delay: 0.2s;\n}\n.hw-typing-dot:nth-child(3) {\n animation-delay: 0.4s;\n}\n@keyframes hw-typing-bounce {\n 0%, 60%, 100% {\n transform: translateY(0);\n }\n 30% {\n transform: translateY(-4px);\n }\n}\n.hw-streaming-cursor {\n display: inline-block;\n width: 2px;\n height: 1em;\n background: currentColor;\n opacity: 0.6;\n margin-left: 1px;\n vertical-align: text-bottom;\n animation: hw-cursor-blink 0.8s step-end infinite;\n}\n@keyframes hw-cursor-blink {\n 50% {\n opacity: 0;\n }\n}\n.hw-link-preview {\n display: flex;\n flex-direction: column;\n border: 1px solid rgba(0, 0, 0, 0.08);\n border-radius: 10px;\n overflow: hidden;\n text-decoration: none;\n color: inherit;\n margin-top: 6px;\n transition: background 0.15s;\n}\n.hw-link-preview:hover {\n background: rgba(0, 0, 0, 0.02);\n}\n.hw-link-preview-img {\n width: 100%;\n max-height: 140px;\n object-fit: cover;\n}\n.hw-link-preview-body {\n padding: 10px 12px;\n display: flex;\n flex-direction: column;\n gap: 3px;\n}\n.hw-link-preview-favicon {\n width: 16px;\n height: 16px;\n border-radius: 2px;\n}\n.hw-link-preview-title {\n font-size: 13px;\n font-weight: 600;\n line-height: 1.3;\n color: var(--hw-text, #1a1a1a);\n}\n.hw-link-preview-desc {\n font-size: 12px;\n line-height: 1.4;\n color: var(--hw-text-muted, #6b7280);\n}\n.hw-link-preview-url {\n font-size: 11px;\n color: var(--hw-text-muted, #9ca3af);\n}\n.hw-msg-links {\n display: flex;\n flex-direction: column;\n gap: 6px;\n max-width: 280px;\n}\n.hw-loading {\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.hw-loading-dots {\n display: flex;\n gap: 4px;\n}\n.hw-loading-dot {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: var(--hw-text-4);\n animation: hw-loading-pulse 1.4s infinite;\n}\n.hw-loading-dot:nth-child(2) {\n animation-delay: 0.2s;\n}\n.hw-loading-dot:nth-child(3) {\n animation-delay: 0.4s;\n}\n@keyframes hw-loading-pulse {\n 0%, 60%, 100% {\n opacity: 0.3;\n transform: scale(0.8);\n }\n 30% {\n opacity: 1;\n transform: scale(1);\n }\n}\n@keyframes hw-skeleton-shimmer {\n 0% {\n background-position: -200px 0;\n }\n 100% {\n background-position: calc(200px + 100%) 0;\n }\n}\n.hw-skeleton {\n background:\n linear-gradient(\n 90deg,\n var(--hw-bg-subtle) 25%,\n rgba(0, 0, 0, 0.04) 50%,\n var(--hw-bg-subtle) 75%);\n background-size: 200px 100%;\n animation: hw-skeleton-shimmer 1.5s ease-in-out infinite;\n border-radius: 6px;\n}\n.hw-skeleton-messages {\n flex: 1;\n display: flex;\n flex-direction: column;\n padding: 16px;\n gap: 16px;\n}\n.hw-skeleton-msg {\n display: flex;\n gap: 10px;\n align-items: flex-start;\n}\n.hw-skeleton-msg--right {\n flex-direction: row-reverse;\n}\n.hw-skeleton-avatar {\n width: 28px;\n height: 28px;\n border-radius: 8px;\n flex-shrink: 0;\n}\n.hw-skeleton-bubble {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n.hw-skeleton-line {\n height: 12px;\n border-radius: 6px;\n}\n.hw-skeleton-convs {\n display: flex;\n flex-direction: column;\n padding: 8px 0;\n}\n.hw-skeleton-conv {\n display: flex;\n gap: 10px;\n align-items: center;\n padding: 10px 16px;\n}\n.hw-skeleton-conv-avatar {\n width: 36px;\n height: 36px;\n border-radius: 8px;\n flex-shrink: 0;\n}\n.hw-skeleton-conv-lines {\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n.hw-skeleton-content {\n display: flex;\n flex-direction: column;\n padding: 12px 16px;\n gap: 12px;\n}\n.hw-skeleton-content-item {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 12px;\n border-radius: 10px;\n background: var(--hw-bg);\n}\n.hw-skeleton-title {\n height: 22px;\n width: 65%;\n border-radius: 6px;\n}\n.hw-skeleton-badge {\n width: 42px;\n height: 18px;\n border-radius: 9px;\n}\n.hw-skeleton-date {\n width: 60px;\n height: 12px;\n border-radius: 6px;\n}\n.hw-skeleton-h2 {\n height: 16px;\n border-radius: 6px;\n}\n.hw-skeleton-bullet {\n padding-left: 20px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.hw-skeleton-bullet-line {\n height: 14px;\n border-radius: 7px;\n}\n.hw-email-card {\n margin: 0 12px;\n padding: 14px 16px 10px;\n border: 1px solid var(--hw-border, rgba(0,0,0,0.08));\n border-radius: 14px;\n background: var(--hw-bg, #fff);\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.03);\n animation: hw-email-slide-in 0.25s ease-out;\n}\n@keyframes hw-email-slide-in {\n from {\n opacity: 0;\n transform: translateY(8px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n.hw-email-card-header {\n display: flex;\n align-items: flex-start;\n gap: 10px;\n margin-bottom: 12px;\n}\n.hw-email-card-icon {\n flex-shrink: 0;\n width: 32px;\n height: 32px;\n border-radius: 8px;\n background: var(--hw-bg-hover, #f5f5f5);\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--hw-text, #1a1a1a);\n}\n.hw-email-card-title {\n font-size: 13px;\n font-weight: 600;\n color: var(--hw-text, #1a1a1a);\n line-height: 1.3;\n margin: 0 0 2px;\n}\n.hw-email-card-subtitle {\n font-size: 12px;\n color: var(--hw-text-2, #888);\n line-height: 1.4;\n margin: 0;\n}\n.hw-email-card-input {\n width: 100%;\n padding: 9px 12px;\n border-radius: 10px;\n border: 1px solid var(--hw-border, rgba(0,0,0,0.1));\n background: var(--hw-bg-subtle, #fafafa);\n color: var(--hw-text, #1a1a1a);\n font-size: 13px;\n outline: none;\n margin-bottom: 8px;\n box-sizing: border-box;\n transition: border-color 0.15s, box-shadow 0.15s;\n}\n.hw-email-card-input::placeholder {\n color: var(--hw-text-3, #999);\n}\n.hw-email-card-input:focus {\n border-color: var(--hw-focus-border, rgba(0,0,0,0.2));\n box-shadow: 0 0 0 2px var(--hw-focus-ring, rgba(0,0,0,0.06));\n}\n.hw-email-card-input--error {\n border-color: #ef4444;\n}\n.hw-email-card-submit {\n width: 100%;\n padding: 9px;\n border-radius: 10px;\n border: none;\n background: var(--hw-brand, #0a0a0a);\n color: var(--hw-on-brand, #fff);\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n transition: opacity 0.15s;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n}\n.hw-email-card-submit:hover:not(:disabled) {\n opacity: 0.88;\n}\n.hw-email-card-submit:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n.hw-email-card--success {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n padding: 10px 16px;\n font-size: 13px;\n color: var(--hw-text-2, #888);\n animation: hw-email-slide-in 0.2s ease-out;\n}\n.hw-email-card--success svg {\n flex-shrink: 0;\n}\n.hw-composer {\n display: flex;\n flex-direction: column;\n padding: 12px 16px;\n background: transparent;\n flex-shrink: 0;\n}\n.hw-composer--compact {\n padding: 8px 12px;\n}\n.hw-composer-box {\n display: flex;\n flex-direction: column;\n border: 2px solid var(--hw-border-md);\n border-radius: 16px;\n overflow: hidden;\n transition: border-color 0.2s;\n background: var(--hw-bg);\n}\n.hw-composer-box:focus-within {\n border-color: var(--hw-focus-border);\n box-shadow: 0 0 0 3px var(--hw-focus-ring);\n}\n.hw-composer-input {\n resize: none;\n border: none;\n padding: 12px 16px 4px;\n font-size: 14px;\n font-family: inherit;\n line-height: 1.4;\n outline: none;\n min-height: 40px;\n max-height: 220px;\n background: transparent;\n color: var(--hw-text);\n field-sizing: content;\n}\n.hw-composer-input:focus {\n outline: none;\n}\n.hw-composer-input:focus-visible {\n outline: none;\n}\n.hw-composer-input::placeholder {\n color: var(--hw-text-4);\n}\n.hw-composer-toolbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 4px 10px 10px;\n}\n.hw-composer-toolbar-left {\n display: flex;\n align-items: center;\n gap: 4px;\n}\n.hw-composer-send {\n width: 32px;\n height: 32px;\n border-radius: 50%;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n transition:\n background-color 140ms cubic-bezier(0.23, 1, 0.32, 1),\n color 140ms cubic-bezier(0.23, 1, 0.32, 1),\n transform 140ms cubic-bezier(0.23, 1, 0.32, 1);\n}\n.hw-composer-send:active:not(:disabled) {\n transform: scale(0.9);\n}\n.hw-composer-send--active {\n background: var(--hw-primary);\n color: white;\n}\n.hw-composer-send--inactive {\n background: var(--hw-border);\n color: var(--hw-text-4);\n cursor: default;\n}\n.hw-composer-send svg {\n width: 14px;\n height: 14px;\n}\n.hw-composer-charcount {\n font-size: 11px;\n color: var(--hw-text-3);\n font-variant-numeric: tabular-nums;\n opacity: 1;\n transform: translateY(0);\n transition:\n color 180ms cubic-bezier(0.23, 1, 0.32, 1),\n opacity 180ms cubic-bezier(0.23, 1, 0.32, 1),\n transform 180ms cubic-bezier(0.23, 1, 0.32, 1);\n}\n@starting-style {\n .hw-composer-charcount {\n opacity: 0;\n transform: translateY(3px);\n }\n}\n.hw-composer-charcount--over {\n color: #ef4444;\n font-weight: 600;\n}\n@media (prefers-reduced-motion: reduce) {\n .hw-composer-charcount {\n transform: none;\n transition: color 160ms ease, opacity 160ms ease;\n }\n @starting-style {\n .hw-composer-charcount {\n transform: none;\n }\n }\n}\n.hw-composer-previews {\n display: flex;\n gap: 6px;\n padding: 8px 10px 0;\n overflow-x: auto;\n scrollbar-width: none;\n}\n.hw-composer-previews::-webkit-scrollbar {\n display: none;\n}\n.hw-composer-preview {\n position: relative;\n width: 48px;\n height: 48px;\n border-radius: 8px;\n overflow: hidden;\n flex-shrink: 0;\n background: var(--hw-border);\n cursor: pointer;\n}\n.hw-composer-preview--error {\n outline: 2px solid #ef4444;\n outline-offset: -2px;\n}\n.hw-composer-preview-img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n.hw-composer-preview-file {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--hw-bg-subtle);\n}\n.hw-composer-preview-ext {\n font-size: 10px;\n font-weight: 700;\n color: var(--hw-text-3);\n text-transform: uppercase;\n}\n.hw-composer-preview-loader {\n position: absolute;\n inset: 0;\n background: rgba(0, 0, 0, 0.35);\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.hw-composer-preview-loader::after {\n content: "";\n width: 16px;\n height: 16px;\n border: 2px solid rgba(255, 255, 255, 0.3);\n border-top-color: white;\n border-radius: 50%;\n animation: hw-spin 0.6s linear infinite;\n}\n@keyframes hw-spin {\n to {\n transform: rotate(360deg);\n }\n}\n.hw-composer-preview-badge {\n position: absolute;\n top: 2px;\n right: 2px;\n width: 16px;\n height: 16px;\n border-radius: 50%;\n background: #ef4444;\n color: white;\n font-size: 10px;\n font-weight: 700;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.hw-composer-preview-remove {\n position: absolute;\n top: 2px;\n right: 2px;\n width: 18px;\n height: 18px;\n border-radius: 50%;\n border: none;\n background: rgba(0, 0, 0, 0.55);\n color: white;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 0;\n transition: opacity 0.15s;\n}\n.hw-composer-preview-remove svg {\n width: 10px;\n height: 10px;\n}\n.hw-composer-preview:hover .hw-composer-preview-remove {\n opacity: 1;\n}\n.hw-composer-attach {\n width: 28px;\n height: 28px;\n border: none;\n background: none;\n color: var(--hw-text-3);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 6px;\n opacity: 0.7;\n transition: opacity 0.15s;\n}\n.hw-composer-attach:hover {\n opacity: 1;\n}\n.hw-composer-attach svg {\n width: 16px;\n height: 16px;\n}\n.hw-msg-images {\n display: flex;\n flex-direction: column;\n gap: 4px;\n margin-bottom: 4px;\n}\n.hw-msg-image-link {\n display: block;\n border-radius: 14px;\n overflow: hidden;\n line-height: 0;\n}\n.hw-msg-image {\n max-width: 140px;\n max-height: 80px;\n object-fit: cover;\n border-radius: 8px;\n outline: 1px solid rgba(0, 0, 0, 0.08);\n outline-offset: -1px;\n}\n.hw-msg-files {\n display: flex;\n flex-direction: column;\n gap: 4px;\n margin-top: 4px;\n}\n.hw-msg-file {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n border-radius: 10px;\n background: var(--hw-bg-subtle);\n text-decoration: none;\n color: var(--hw-text);\n transition: background 0.15s;\n}\n.hw-msg-file:hover {\n background: var(--hw-border);\n}\n.hw-msg-file-icon {\n flex-shrink: 0;\n width: 20px;\n height: 20px;\n color: var(--hw-text-3);\n}\n.hw-msg-file-icon svg {\n width: 100%;\n height: 100%;\n}\n.hw-msg-file-info {\n display: flex;\n flex-direction: column;\n min-width: 0;\n}\n.hw-msg-file-name {\n font-size: 13px;\n font-weight: 500;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.hw-msg-file-size {\n font-size: 11px;\n color: var(--hw-text-3);\n}\n.hw-msg-image-link {\n cursor: pointer;\n border: none;\n padding: 0;\n background: none;\n display: block;\n line-height: 0;\n}\n.hw-hover-preview {\n position: fixed;\n z-index: 99998;\n padding: 6px;\n border-radius: 14px;\n background: white;\n box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.06);\n cursor: pointer;\n animation: hw-hover-in 0.15s ease-out;\n}\n@media (prefers-color-scheme: dark) {\n .hw-hover-preview {\n background: #1c1c1e;\n box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);\n }\n}\n@keyframes hw-hover-in {\n from {\n opacity: 0;\n transform: scale(0.96) translateY(4px);\n }\n to {\n opacity: 1;\n transform: scale(1) translateY(0);\n }\n}\n.hw-hover-preview-img {\n width: 100%;\n max-height: 200px;\n object-fit: contain;\n border-radius: 10px;\n display: block;\n outline: 1px solid rgba(0, 0, 0, 0.08);\n outline-offset: -1px;\n}\n.hw-hover-preview--doc {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 10px 14px;\n}\n.hw-hover-preview-doc-icon {\n width: 28px;\n height: 28px;\n flex-shrink: 0;\n}\n.hw-hover-preview-doc-icon svg {\n width: 100%;\n height: 100%;\n}\n.hw-hover-preview-doc-info {\n display: flex;\n flex-direction: column;\n min-width: 0;\n}\n.hw-hover-preview-doc-name {\n font-size: 13px;\n font-weight: 500;\n color: var(--hw-text);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.hw-hover-preview-doc-hint {\n font-size: 11px;\n color: var(--hw-text-3);\n}\n.hw-event {\n display: flex;\n justify-content: center;\n padding: 8px 16px;\n}\n.hw-event-text {\n font-size: 12px;\n color: var(--hw-text-3);\n text-align: center;\n}\n.hw-event--card {\n justify-content: flex-start;\n align-items: center;\n gap: 10px;\n background: var(--hw-bg-subtle);\n padding: 10px 14px;\n border-radius: 12px;\n margin: 4px 16px;\n}\n.hw-event-avatar {\n width: 32px;\n height: 32px;\n border-radius: 50%;\n background: var(--hw-agent-bg, var(--hw-agent-bg-default, var(--hw-bg-hover, #e0e0e0)));\n color: var(--hw-text-2, #555);\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 11px;\n font-weight: 600;\n flex-shrink: 0;\n overflow: hidden;\n}\n.hw-event-avatar-img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n.hw-event-avatar .hw-agent-img {\n object-fit: var(--hw-agent-fit, var(--hw-agent-fit-default, cover));\n padding: var(--hw-agent-pad, var(--hw-agent-pad-default, 0));\n box-sizing: border-box;\n}\n.hw-event-body {\n font-size: 13px;\n line-height: 1.3;\n}\n.hw-event-name {\n font-weight: 600;\n color: var(--hw-text);\n}\n.hw-event-action {\n color: var(--hw-text-2);\n}\n.hw-resolved-banner {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 12px 16px;\n border-top: 1px solid var(--hw-border);\n background: var(--hw-bg-subtle);\n color: var(--hw-text-2);\n font-size: 13px;\n flex-shrink: 0;\n}\n.hw-new {\n flex: 1;\n display: flex;\n flex-direction: column;\n background: var(--hw-bg-subtle);\n}\n.hw-new-body {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 32px 24px;\n text-align: center;\n}\n.hw-new-welcome {\n flex: 1;\n padding: 16px 20px;\n overflow-y: auto;\n}\n.hw-new-heading {\n font-size: 17px;\n font-weight: 600;\n color: var(--hw-text);\n margin-bottom: 6px;\n}\n.hw-new-desc {\n font-size: 13px;\n color: var(--hw-text-2);\n margin-bottom: 24px;\n}\n.hw-powered {\n text-align: center;\n padding: 8px;\n font-size: 11px;\n color: var(--hw-text-4);\n flex-shrink: 0;\n}\n.hw-powered a {\n color: var(--hw-text-2);\n text-decoration: none;\n font-weight: 500;\n}\n.hw-powered a:hover {\n color: var(--hw-text);\n}\n@media (max-width: 479px) {\n .hw-widget {\n bottom: 16px;\n right: 16px;\n left: auto;\n }\n .hw-window {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n width: 100%;\n height: var(--hw-visible-height, 100%);\n border-radius: 0;\n animation: hw-mob-up 0.3s cubic-bezier(0.22, 1, 0.36, 1);\n }\n .hw-window--closing {\n animation: hw-mob-down 0.2s ease forwards;\n }\n @keyframes hw-mob-up {\n from {\n opacity: 0;\n transform: translateY(100%);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n @keyframes hw-mob-down {\n from {\n opacity: 1;\n transform: translateY(0);\n }\n to {\n opacity: 0;\n transform: translateY(100%);\n }\n }\n .hw-hero {\n padding-top: calc(20px + env(safe-area-inset-top, 0px));\n }\n .hw-header {\n padding-top: env(safe-area-inset-top, 0px);\n }\n .hw-tabs {\n padding-bottom: env(safe-area-inset-bottom, 0px);\n }\n .hw-composer {\n padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));\n }\n .hw-powered {\n padding-bottom: calc(5px + env(safe-area-inset-bottom, 0px));\n }\n .hw-header-close,\n .hw-header-back,\n .hw-header-action {\n width: 34px;\n height: 34px;\n }\n .hw-composer-send {\n width: 40px;\n height: 40px;\n }\n .hw-window ~ .hw-bubble {\n display: none;\n }\n .hw-messages {\n padding: 12px 14px;\n }\n .hw-msg {\n max-width: 82%;\n }\n .hw-msg--ai {\n max-width: 100%;\n }\n}\n.hw-preview {\n position: absolute;\n bottom: calc(100% + 12px);\n right: 0;\n width: 300px;\n max-width: calc(100vw - 40px);\n background: var(--hw-bg);\n border: 1px solid var(--hw-border);\n border-radius: 16px;\n box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);\n animation: hw-preview-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);\n overflow: hidden;\n cursor: pointer;\n transition: transform 0.15s, box-shadow 0.15s;\n}\n.hw-preview.hw-preview--anchored {\n position: static;\n bottom: auto;\n right: auto;\n width: 100%;\n max-width: 100%;\n}\n.hw-preview.hw-preview--anchored .hw-preview-avatar {\n background: none;\n}\n.hw-preview.hw-preview--anchored .hw-preview-avatar img,\n.hw-preview.hw-preview--anchored .hw-preview-avatar svg {\n width: 100%;\n height: 100%;\n object-fit: contain;\n}\n.hw-preview:hover {\n transform: translateY(-2px);\n box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);\n}\n@keyframes hw-preview-in {\n from {\n opacity: 0;\n transform: translateY(8px) scale(0.95);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n}\n@keyframes hw-preview-out {\n from {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n to {\n opacity: 0;\n transform: translateY(8px) scale(0.95);\n }\n}\n.hw-preview-header {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px 14px 0;\n}\n.hw-preview-avatar {\n width: 28px;\n height: 28px;\n border-radius: 50%;\n background:\n linear-gradient(\n 135deg,\n var(--hw-primary),\n color-mix(in srgb, var(--hw-primary) 50%, black));\n display: flex;\n align-items: center;\n justify-content: center;\n color: white;\n flex-shrink: 0;\n overflow: hidden;\n}\n.hw-preview-avatar svg {\n width: 16px;\n height: 16px;\n}\n.hw-preview-name {\n font-size: 13px;\n font-weight: 600;\n color: var(--hw-text);\n flex: 1;\n}\n.hw-preview-close {\n width: 24px;\n height: 24px;\n border: none;\n background: transparent;\n color: var(--hw-text-3);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n transition: background 0.15s, color 0.15s;\n flex-shrink: 0;\n}\n.hw-preview-close:hover {\n background: var(--hw-bg-subtle);\n color: var(--hw-text-2);\n}\n.hw-preview-close:active {\n transform: scale(0.90);\n transition:\n transform 0.14s cubic-bezier(0.23, 1, 0.32, 1),\n background 0.15s,\n color 0.15s;\n}\n.hw-preview-close svg {\n width: 12px;\n height: 12px;\n}\n.hw-preview-body {\n padding: 4px 14px;\n font-size: 14px;\n line-height: 1.45;\n color: var(--hw-text-2);\n}\n.hw-preview-body:first-of-type {\n padding-top: 8px;\n}\n.hw-preview-body:last-child {\n padding-bottom: 14px;\n}\n.hw-preview-footer {\n margin-top: 2px;\n padding: 8px 14px 12px;\n border-top: 1px solid var(--hw-border);\n font-size: 11px;\n line-height: 1.3;\n color: var(--hw-text-2);\n opacity: 0.65;\n}\n.hw-preview-prompt {\n padding: 2px 14px 6px;\n font-size: 14px;\n font-weight: 500;\n color: var(--hw-text-1);\n}\n.hw-preview-quick-replies {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n padding: 0 14px 14px;\n}\n.hw-preview-qr-btn {\n display: inline-flex;\n align-items: center;\n padding: 6px 14px;\n font-size: 13px;\n font-weight: 500;\n line-height: 1.3;\n color: var(--hw-brand, #000);\n background: transparent;\n border: 1px solid var(--hw-border, rgba(0, 0, 0, 0.1));\n border-radius: 18px;\n cursor: pointer;\n transition: background 0.15s, border-color 0.15s;\n}\n.hw-preview-qr-btn:hover {\n background: var(--hw-hover, rgba(0, 0, 0, 0.04));\n border-color: var(--hw-brand, #000);\n}\n.hw-preview--closing {\n animation: hw-preview-out 0.2s ease-in forwards;\n}\n.hw-preview-stack {\n position: absolute;\n bottom: calc(100% + 12px);\n right: 0;\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.hw-preview-stack .hw-preview {\n position: relative;\n bottom: auto;\n right: auto;\n}\n.hw-preview--announcement {\n width: 340px;\n}\n.hw-preview--announcement .hw-preview-body--title {\n font-weight: 600;\n color: var(--hw-text);\n font-size: 15px;\n line-height: 1.3;\n padding-top: 10px;\n}\n.hw-preview--announcement .hw-preview-body--desc {\n font-size: 13px;\n color: var(--hw-text-2);\n line-height: 1.5;\n padding-bottom: 16px;\n}\n.hw-announcement-badge {\n display: inline-block;\n margin: 8px 14px 0;\n padding: 2px 8px;\n font-size: 10px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n color: var(--hw-primary);\n background: color-mix(in srgb, var(--hw-primary) 10%, transparent);\n border-radius: 4px;\n}\n.hw-whats-new {\n border-radius: 14px;\n background: var(--hw-bg);\n border: 1px solid rgba(0, 0, 0, 0.06);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);\n overflow: hidden;\n}\n.hw-whats-new-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 12px 14px 0;\n}\n.hw-whats-new-title {\n font-size: 12px;\n font-weight: 600;\n color: var(--hw-text-2);\n}\n.hw-whats-new-view-all {\n font-size: 11px;\n font-weight: 500;\n color: var(--hw-primary);\n background: none;\n border: none;\n cursor: pointer;\n padding: 0;\n font-family: inherit;\n}\n.hw-whats-new-view-all:hover {\n opacity: 0.8;\n}\n.hw-whats-new-list {\n display: flex;\n flex-direction: column;\n}\n.hw-whats-new-item {\n display: flex;\n flex-direction: column;\n gap: 2px;\n width: 100%;\n padding: 10px 14px;\n border: none;\n border-bottom: 1px solid var(--hw-border);\n background: none;\n cursor: pointer;\n text-align: left;\n font-family: inherit;\n color: var(--hw-text);\n transition: background-color 140ms ease;\n}\n.hw-whats-new-item:last-child {\n border-bottom: none;\n}\n.hw-whats-new-item:hover {\n background: rgba(0, 0, 0, 0.03);\n}\n.hw-whats-new-item-top {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.hw-whats-new-badge {\n font-size: 10px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n color: var(--hw-primary);\n}\n.hw-whats-new-time {\n font-size: 11px;\n color: var(--hw-text-3);\n margin-left: auto;\n}\n.hw-whats-new-item-title {\n font-size: 13px;\n font-weight: 600;\n color: var(--hw-text);\n line-height: 1.3;\n display: flex;\n align-items: baseline;\n gap: 8px;\n}\n.hw-whats-new-time-inline {\n font-size: 11px;\n font-weight: 400;\n color: var(--hw-text-3);\n margin-left: auto;\n flex-shrink: 0;\n}\n.hw-whats-new-item-body {\n font-size: 12px;\n color: var(--hw-text-2);\n line-height: 1.4;\n}\n.hw-tabs-dot {\n position: absolute;\n top: -2px;\n right: -6px;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: var(--hw-primary);\n animation: hw-badge-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);\n}\n.hw-bubble-badge-dot {\n display: block;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: white;\n}\n.hw-content-search {\n padding: 10px 16px;\n}\n.hw-content-search-box {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n background: var(--hw-bg);\n border: 1px solid var(--hw-border-md);\n border-radius: 10px;\n transition: border-color 0.15s, box-shadow 0.15s;\n}\n.hw-content-search-box:focus-within {\n border-color: var(--hw-focus-border);\n box-shadow: 0 0 0 3px var(--hw-focus-ring);\n}\n.hw-content-search-input {\n flex: 1;\n border: none !important;\n outline: none !important;\n box-shadow: none !important;\n background: none;\n font-size: 13px;\n color: var(--hw-text-1);\n font-family: inherit;\n line-height: 1;\n -webkit-appearance: none;\n}\n.hw-content-search-input:focus,\n.hw-content-search-input:focus-visible {\n outline: none !important;\n box-shadow: none !important;\n border: none !important;\n}\n.hw-content-search-input::placeholder {\n color: var(--hw-text-3);\n}\n.hw-content-search-icon {\n width: 15px;\n height: 15px;\n color: var(--hw-text-3);\n flex-shrink: 0;\n}\n.hw-content-list {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n.hw-content-entries {\n flex: 1;\n overflow-y: auto;\n overscroll-behavior: contain;\n}\n.hw-content-entry {\n display: block;\n width: 100%;\n padding: 14px 16px;\n border: none;\n border-bottom: 1px solid var(--hw-border);\n background: none;\n cursor: pointer;\n text-align: left;\n transition: background-color 0.15s ease;\n -webkit-tap-highlight-color: transparent;\n}\n.hw-content-entry:hover {\n background: var(--hw-bg-hover);\n}\n.hw-content-entry:active {\n background: var(--hw-border);\n}\n.hw-content-entry:last-child {\n border-bottom: none;\n}\n.hw-content-entry-main {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n.hw-content-entry-text {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 3px;\n}\n.hw-content-entry-title {\n font-size: 14px;\n font-weight: 600;\n color: var(--hw-text-1);\n line-height: 1.3;\n}\n.hw-content-entry-desc {\n font-size: 13px;\n color: var(--hw-text-2);\n line-height: 1.4;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n.hw-content-entry-meta {\n display: flex;\n align-items: center;\n gap: 6px;\n margin-top: 2px;\n}\n.hw-content-entry-badge {\n font-size: 11px;\n font-weight: 500;\n color: var(--hw-text-3);\n background: var(--hw-bg-hover);\n padding: 1px 6px;\n border-radius: 4px;\n}\n.hw-content-entry-date {\n font-size: 11px;\n color: var(--hw-text-3);\n}\n.hw-content-entry-chevron {\n width: 16px;\n height: 16px;\n color: var(--hw-text-3);\n flex-shrink: 0;\n opacity: 0.5;\n}\n.hw-content-detail {\n padding: 16px;\n overflow-y: auto;\n overscroll-behavior: contain;\n flex: 1;\n min-height: 0;\n}\n.hw-content-detail-header {\n margin-bottom: 16px;\n}\n.hw-content-detail-title {\n font-size: 17px;\n font-weight: 700;\n color: var(--hw-text-1);\n margin: 0 0 6px;\n line-height: 1.3;\n display: flex;\n align-items: center;\n gap: 6px;\n}\n.hw-content-detail-meta {\n display: flex;\n align-items: center;\n gap: 8px;\n flex-wrap: wrap;\n}\n.hw-content-detail-date {\n font-size: 12px;\n color: var(--hw-text-3);\n}\n.hw-content-detail-body {\n font-size: 14px;\n line-height: 1.6;\n color: var(--hw-text-1);\n}\n.hw-markdown h1 {\n font-size: 17px;\n font-weight: 700;\n margin: 0;\n}\n.hw-markdown h2 {\n font-size: 15px;\n font-weight: 600;\n margin: 0;\n}\n.hw-markdown h3 {\n font-size: 14px;\n font-weight: 600;\n margin: 0;\n}\n.hw-markdown p {\n margin: 0;\n}\n.hw-markdown p:empty,\n.hw-markdown div:empty,\n.hw-markdown p:has(> br:only-child),\n.hw-markdown div:has(> br:only-child) {\n display: none;\n}\n.hw-markdown > * + * {\n margin-top: 12px;\n}\n.hw-markdown > * + h1,\n.hw-markdown > * + h2 {\n margin-top: 20px;\n}\n.hw-markdown > * + h3 {\n margin-top: 16px;\n}\n.hw-markdown > h1 + *,\n.hw-markdown > h2 + *,\n.hw-markdown > h3 + * {\n margin-top: 8px;\n}\n.hw-markdown > *:first-child {\n margin-top: 0;\n}\n.hw-markdown > *:last-child {\n margin-bottom: 0;\n}\n.hw-markdown > br {\n display: none;\n}\n.hw-markdown ul {\n margin: 0;\n padding-left: 20px;\n}\n.hw-markdown li {\n margin: 4px 0;\n}\n.hw-markdown code {\n font-family:\n ui-monospace,\n "SF Mono",\n monospace;\n font-size: 12px;\n background: var(--hw-bg-hover);\n padding: 1px 5px;\n border-radius: 4px;\n}\n.hw-code {\n margin: 10px 0;\n border-radius: 10px;\n overflow: hidden;\n border: 1px solid var(--hw-border, rgba(0, 0, 0, 0.08));\n background: var(--hw-bg-hover, #f5f5f4);\n font-family:\n ui-monospace,\n "SF Mono",\n "Menlo",\n monospace;\n}\n.hw-code-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 10px;\n padding: 7px 8px 7px 12px;\n font-size: 11px;\n color: var(--hw-text-2, #6b7280);\n background: rgba(0, 0, 0, 0.03);\n border-bottom: 1px solid var(--hw-border, rgba(0, 0, 0, 0.06));\n}\n.hw-code-lang {\n text-transform: lowercase;\n letter-spacing: 0.02em;\n font-weight: 500;\n}\n.hw-code-actions {\n display: inline-flex;\n align-items: center;\n gap: 1px;\n}\n.hw-code-action {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 22px;\n height: 22px;\n padding: 0;\n font-family: inherit;\n color: var(--hw-text-2, #6b7280);\n background: transparent;\n border: 1px solid transparent;\n border-radius: 6px;\n cursor: pointer;\n opacity: 0.62;\n transition:\n background 120ms ease,\n color 120ms ease,\n opacity 120ms ease,\n scale 120ms ease;\n}\n.hw-code-action:hover {\n color: var(--hw-text, #111);\n background: rgba(0, 0, 0, 0.06);\n opacity: 1;\n}\n.hw-code-action:active {\n scale: 0.96;\n}\n.hw-code-action svg {\n width: 13px;\n height: 13px;\n}\n.hw-code-copy-icon,\n.hw-code-check-icon {\n position: absolute;\n inset: 50% auto auto 50%;\n transition:\n opacity 180ms cubic-bezier(0.2, 0, 0, 1),\n scale 180ms cubic-bezier(0.2, 0, 0, 1),\n filter 180ms cubic-bezier(0.2, 0, 0, 1);\n translate: -50% -50%;\n}\n.hw-code-check-icon {\n filter: blur(4px);\n opacity: 0;\n scale: 0.25;\n}\n.hw-code-copy--copied .hw-code-copy-icon {\n filter: blur(4px);\n opacity: 0;\n scale: 0.25;\n}\n.hw-code-copy--copied .hw-code-check-icon {\n filter: blur(0);\n opacity: 1;\n scale: 1;\n}\n.hw-code-copy-label {\n position: absolute;\n width: 1px;\n height: 1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n}\n.hw-code-copy--copied {\n color: #16a34a;\n}\n.hw-code-copy--failed {\n color: #dc2626;\n}\n.hw-code pre {\n margin: 0;\n padding: 10px 12px;\n background: transparent;\n border-radius: 0;\n overflow-x: auto;\n max-width: 100%;\n max-height: 320px;\n scrollbar-color: rgba(0, 0, 0, 0.22) transparent;\n scrollbar-width: thin;\n}\n.hw-code pre::-webkit-scrollbar {\n width: 10px;\n height: 10px;\n}\n.hw-code pre::-webkit-scrollbar-track {\n background: transparent;\n}\n.hw-code pre::-webkit-scrollbar-thumb {\n background: rgba(0, 0, 0, 0.18);\n background-clip: content-box;\n border: 3px solid transparent;\n border-radius: 999px;\n}\n.hw-code pre::-webkit-scrollbar-thumb:hover {\n background: rgba(0, 0, 0, 0.28);\n background-clip: content-box;\n}\n.hw-code pre code {\n display: block;\n background: transparent;\n padding: 0;\n font-size: 12px;\n line-height: 1.55;\n white-space: pre;\n color: var(--hw-text, #111);\n}\n@media (prefers-color-scheme: dark) {\n .hw-code {\n background: rgba(255, 255, 255, 0.04);\n border-color: rgba(255, 255, 255, 0.08);\n }\n .hw-code-header {\n background: rgba(255, 255, 255, 0.03);\n border-bottom-color: rgba(255, 255, 255, 0.06);\n }\n .hw-code-action:hover,\n .hw-code-action:focus-visible {\n background: rgba(255, 255, 255, 0.08);\n }\n .hw-code pre {\n scrollbar-color: rgba(255, 255, 255, 0.26) transparent;\n }\n .hw-code pre::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.22);\n background-clip: content-box;\n }\n .hw-code pre::-webkit-scrollbar-thumb:hover {\n background: rgba(255, 255, 255, 0.32);\n background-clip: content-box;\n }\n}\n.hw-markdown pre {\n margin: 8px 0;\n padding: 10px 12px;\n background: var(--hw-bg-hover);\n border-radius: 8px;\n overflow-x: auto;\n max-width: 100%;\n}\n.hw-markdown pre code {\n display: block;\n background: transparent;\n padding: 0;\n border-radius: 0;\n font-size: 12px;\n line-height: 1.5;\n white-space: pre;\n word-break: normal;\n color: inherit;\n}\n.hw-msg-bubble pre {\n margin: 6px 0;\n padding: 8px 10px;\n background: rgba(0, 0, 0, 0.06);\n border-radius: 6px;\n overflow-x: auto;\n max-width: 100%;\n}\n.hw-msg-bubble pre code {\n background: transparent;\n padding: 0;\n font-size: 12px;\n line-height: 1.5;\n white-space: pre;\n}\n.hw-msg-bubble .hw-code pre {\n margin: 0;\n padding: 10px 12px;\n background: transparent;\n border-radius: 0;\n}\n.hw-msg-bubble .hw-code pre code {\n background: transparent;\n padding: 0;\n font-size: 12px;\n line-height: 1.55;\n}\n.hw-msg--team .hw-msg-bubble pre,\n.hw-msg--visitor .hw-msg-bubble pre {\n background: rgba(255, 255, 255, 0.12);\n}\n.hw-markdown blockquote {\n margin: 0 0 12px;\n padding: 8px 12px;\n border-left: 3px solid var(--hw-border);\n color: var(--hw-text-2);\n font-style: italic;\n}\n.hw-markdown a {\n color: var(--hw-primary);\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.hw-markdown img {\n max-width: 100%;\n border-radius: 8px;\n margin: 8px 0;\n outline: 1px solid rgba(0, 0, 0, 0.08);\n outline-offset: -1px;\n}\n.hw-markdown hr {\n border: none;\n border-top: 1px solid var(--hw-border);\n margin: 16px 0;\n}\n.hw-content-empty {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 40px 20px;\n text-align: center;\n}\n.hw-content-empty-title {\n font-size: 14px;\n font-weight: 600;\n color: var(--hw-text-1);\n margin-bottom: 4px;\n}\n.hw-content-empty-desc {\n font-size: 12px;\n color: var(--hw-text-3);\n}\n.hw-content-loading {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 40px 20px;\n}\n.hw-content-load-more {\n display: block;\n width: 100%;\n padding: 10px;\n border: none;\n background: none;\n color: var(--hw-primary);\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n text-align: center;\n}\n.hw-content-load-more:hover {\n background: var(--hw-bg-hover);\n}\n.hw-content-load-more:disabled {\n opacity: 0.5;\n cursor: default;\n}\n@media (hover: none) {\n .hw-composer-preview-remove {\n opacity: 0.7;\n }\n}\n.hw-composer--dragging .hw-composer-box {\n border-color: var(--hw-primary);\n background: color-mix(in srgb, var(--hw-primary) 4%, transparent);\n}\n.hw-composer-drop-overlay {\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background: color-mix(in srgb, var(--hw-bg) 90%, transparent);\n border: 2px dashed var(--hw-primary);\n border-radius: 12px;\n z-index: 10;\n pointer-events: none;\n animation: hw-drop-pulse 1.5s ease-in-out infinite;\n}\n.hw-composer-drop-text {\n font-size: 13px;\n font-weight: 500;\n color: var(--hw-primary);\n}\n@keyframes hw-drop-pulse {\n 0%, 100% {\n opacity: 0.8;\n }\n 50% {\n opacity: 1;\n }\n}\n.hw-disconnect {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n padding: 6px 12px;\n background: #fef3c7;\n color: #92400e;\n font-size: 12px;\n font-weight: 500;\n flex-shrink: 0;\n animation: hw-msg-appear 0.25s ease-out;\n}\n.hw-disconnect-dot {\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background: #f59e0b;\n animation: hw-loading-pulse 1.4s infinite;\n}\n.hw-error-state {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 32px 24px;\n text-align: center;\n gap: 12px;\n}\n.hw-error-icon {\n width: 48px;\n height: 48px;\n border-radius: 50%;\n background: #fef2f2;\n color: #ef4444;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.hw-error-icon svg {\n width: 24px;\n height: 24px;\n}\n.hw-error-title {\n font-size: 15px;\n font-weight: 600;\n color: var(--hw-text);\n}\n.hw-error-desc {\n font-size: 13px;\n color: var(--hw-text-2);\n}\n.hw-error-btn {\n padding: 8px 20px;\n border: 1px solid var(--hw-border-md);\n border-radius: 8px;\n background: var(--hw-bg);\n color: var(--hw-text);\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n transition: background 0.15s;\n}\n.hw-error-btn:hover {\n background: var(--hw-bg-hover);\n}\n.hw-send-error {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n background: #fef2f2;\n color: #dc2626;\n font-size: 12px;\n font-weight: 500;\n flex-shrink: 0;\n animation: hw-msg-appear 0.25s ease-out;\n}\n.hw-send-error-retry {\n margin-left: auto;\n padding: 2px 8px;\n border: 1px solid #fca5a5;\n border-radius: 4px;\n background: none;\n color: #dc2626;\n font-size: 11px;\n font-weight: 600;\n cursor: pointer;\n}\n.hw-send-error-retry:hover {\n background: #fee2e2;\n}\n.hw-resolved {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 12px;\n padding: 16px 20px;\n border-top: 1px solid var(--hw-border);\n flex-shrink: 0;\n}\n.hw-resolved-text {\n font-size: 13px;\n color: var(--hw-text-3);\n font-weight: 500;\n}\n.hw-resolved-actions {\n display: flex;\n gap: 8px;\n}\n.hw-resolved-reopen {\n padding: 6px 16px;\n border: 1px solid var(--hw-border-md);\n border-radius: 8px;\n background: var(--hw-bg);\n color: var(--hw-text);\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n transition: background 0.15s;\n}\n.hw-resolved-reopen:hover {\n background: var(--hw-bg-hover);\n}\n.hw-csat {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n}\n.hw-csat-label {\n font-size: 12px;\n color: var(--hw-text-3);\n}\n.hw-csat-buttons {\n display: flex;\n gap: 8px;\n}\n.hw-csat-btn {\n width: 36px;\n height: 36px;\n border: 1px solid var(--hw-border-md);\n border-radius: 8px;\n background: var(--hw-bg);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 18px;\n transition:\n transform 0.15s,\n border-color 0.15s,\n background 0.15s;\n}\n.hw-csat-btn:hover {\n transform: scale(1.1);\n border-color: var(--hw-text-3);\n}\n.hw-csat-btn--selected {\n border-color: var(--hw-primary);\n background: var(--hw-bg-hover);\n transform: scale(1.15);\n}\n.hw-csat-thanks {\n font-size: 12px;\n color: #22c55e;\n font-weight: 500;\n animation: hw-msg-appear 0.25s ease-out;\n}\n.hw-load-more-trigger {\n display: flex;\n justify-content: center;\n min-height: 1px;\n}\n.hw-load-more-trigger:has(.hw-load-more-spinner) {\n padding: 8px 0;\n}\n.hw-load-more-spinner {\n display: flex;\n gap: 3px;\n}\n.hw-load-more-spinner > div {\n width: 5px;\n height: 5px;\n border-radius: 50%;\n background: var(--hw-text-4);\n animation: hw-loading-pulse 1.4s infinite;\n}\n.hw-load-more-spinner > div:nth-child(2) {\n animation-delay: 0.2s;\n}\n.hw-load-more-spinner > div:nth-child(3) {\n animation-delay: 0.4s;\n}\n.hw-drag-handle {\n display: none;\n}\n@media (max-width: 479px) {\n .hw-drag-handle {\n display: flex;\n justify-content: center;\n padding: 8px 0 4px;\n flex-shrink: 0;\n }\n .hw-drag-handle-pill {\n width: 32px;\n height: 4px;\n border-radius: 2px;\n background: var(--hw-text-4);\n }\n}\n.hw-msg-bubble p {\n margin: 0 0 8px;\n}\n.hw-msg-bubble p:last-child {\n margin-bottom: 0;\n}\n.hw-msg-bubble strong {\n font-weight: 600;\n}\n.hw-msg-bubble em {\n font-style: italic;\n}\n.hw-msg-bubble a {\n color: var(--hw-primary);\n text-decoration: underline;\n text-underline-offset: 2px;\n word-break: break-all;\n}\n.hw-msg-bubble a:hover {\n opacity: 0.8;\n}\n.hw-msg--visitor .hw-msg-bubble a {\n color: rgba(255, 255, 255, 0.9);\n}\n.hw-msg--visitor .hw-msg-bubble a:hover {\n color: white;\n}\n.hw-msg-bubble ul,\n.hw-msg-bubble ol {\n margin: 4px 0 8px;\n padding-left: 20px;\n}\n.hw-msg-bubble li {\n margin: 2px 0;\n}\n.hw-msg-bubble code {\n padding: 1px 4px;\n border-radius: 3px;\n background: rgba(0, 0, 0, 0.06);\n font-size: 0.9em;\n font-family:\n ui-monospace,\n SFMono-Regular,\n Menlo,\n monospace;\n}\n.hw-msg-bubble pre {\n margin: 4px 0 8px;\n padding: 8px 10px;\n border-radius: 6px;\n background: rgba(0, 0, 0, 0.06);\n overflow-x: auto;\n font-size: 0.85em;\n}\n.hw-msg-bubble pre code {\n padding: 0;\n background: none;\n}\n.hw-msg-bubble blockquote {\n margin: 4px 0 8px;\n padding: 4px 0 4px 12px;\n border-left: 3px solid var(--hw-border-md);\n color: var(--hw-text-2);\n}\n.hw-widget[data-theme=dark] {\n --hw-bg: #1c1c1e;\n --hw-bg-subtle: #161618;\n --hw-bg-hover: #2c2c2e;\n --hw-border: rgba(255, 255, 255, 0.08);\n --hw-border-md: rgba(255, 255, 255, 0.14);\n --hw-text: #f5f5f5;\n --hw-text-1: #f5f5f5;\n --hw-text-2: #a1a1aa;\n --hw-text-3: #71717a;\n --hw-text-4: #52525b;\n --hw-visitor-bubble-bg: #2c2c2e;\n --hw-visitor-bubble-text: #f5f5f5;\n --hw-focus-border: rgba(255, 255, 255, 0.28);\n --hw-focus-ring: rgba(255, 255, 255, 0.08);\n --hw-brand: #f5f5f5;\n --hw-on-brand: #1c1c1e;\n}\n@media (prefers-color-scheme: dark) {\n .hw-widget:not([data-theme=light]) .hw-messages {\n scrollbar-color: rgba(255, 255, 255, 0.26) transparent;\n }\n .hw-widget:not([data-theme=light]) .hw-messages::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.2);\n background-clip: content-box;\n }\n .hw-widget:not([data-theme=light]) .hw-messages::-webkit-scrollbar-thumb:hover {\n background: rgba(255, 255, 255, 0.32);\n background-clip: content-box;\n }\n .hw-widget:not([data-theme=light]) {\n --hw-bg: #1c1c1e;\n --hw-bg-subtle: #161618;\n --hw-bg-hover: #2c2c2e;\n --hw-border: rgba(255, 255, 255, 0.08);\n --hw-border-md: rgba(255, 255, 255, 0.14);\n --hw-text: #f5f5f5;\n --hw-text-1: #f5f5f5;\n --hw-text-2: #a1a1aa;\n --hw-text-3: #71717a;\n --hw-text-4: #52525b;\n --hw-visitor-bubble-bg: #2c2c2e;\n --hw-visitor-bubble-text: #f5f5f5;\n --hw-focus-border: rgba(255, 255, 255, 0.28);\n --hw-focus-ring: rgba(255, 255, 255, 0.08);\n --hw-brand: #f5f5f5;\n --hw-on-brand: #1c1c1e;\n }\n}\n@media (prefers-color-scheme: dark) {\n .hw-widget:not([data-theme=light]) .hw-header {\n background: var(--hw-bg);\n border-color: var(--hw-border);\n }\n .hw-header-bot-icon {\n background: var(--hw-bg-hover);\n }\n .hw-header-name,\n .hw-header-title {\n color: var(--hw-text);\n }\n .hw-header-status {\n color: var(--hw-text-2);\n }\n .hw-header-close,\n .hw-header-back {\n color: var(--hw-text-2);\n }\n .hw-header-close:hover,\n .hw-header-back:hover {\n background: var(--hw-bg-hover);\n color: var(--hw-text);\n }\n .hw-content-entry {\n background: var(--hw-bg);\n border-color: var(--hw-border);\n }\n .hw-content-entry:hover {\n background: var(--hw-bg-hover);\n border-color: var(--hw-border-md);\n }\n .hw-content-empty,\n .hw-empty {\n color: var(--hw-text-3);\n }\n .hw-conv-card {\n border-color: var(--hw-border);\n }\n .hw-recent-row {\n border-color: var(--hw-border);\n }\n .hw-composer-drop-overlay {\n background: rgba(0, 0, 0, 0.6);\n color: var(--hw-text);\n }\n .hw-composer--dragging .hw-composer-box {\n border-color: var(--hw-focus-border);\n box-shadow: 0 0 0 3px var(--hw-focus-ring);\n }\n .hw-hero {\n background:\n linear-gradient(\n 160deg,\n color-mix(in srgb, var(--hw-primary) 40%, black) 0%,\n var(--hw-primary) 50%,\n color-mix(in srgb, var(--hw-primary) 25%, black) 100%);\n }\n .hw-sheet {\n background: var(--hw-bg);\n }\n .hw-card {\n background: var(--hw-bg-hover);\n border-color: var(--hw-border);\n }\n .hw-card:hover {\n background: #333;\n }\n .hw-window {\n box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.06);\n }\n .hw-bubble:focus-visible {\n outline-color: var(--hw-text-3);\n }\n .hw-msg--visitor .hw-msg-bubble {\n background: var(--hw-primary);\n color: white;\n }\n .hw-msg-bubble code {\n background: rgba(255, 255, 255, 0.08);\n }\n .hw-msg-bubble pre {\n background: rgba(255, 255, 255, 0.08);\n }\n .hw-composer-box {\n background: var(--hw-bg);\n border-color: var(--hw-border);\n }\n .hw-composer-input {\n color: var(--hw-text);\n }\n .hw-tabs {\n background: var(--hw-bg);\n border-color: var(--hw-border);\n }\n .hw-conv-card:hover,\n .hw-recent-row:hover {\n background: var(--hw-bg-hover);\n }\n .hw-disconnect {\n background: #422006;\n color: #fcd34d;\n }\n .hw-send-error {\n background: #450a0a;\n color: #fca5a5;\n }\n .hw-error-icon {\n background: #450a0a;\n color: #f87171;\n }\n .hw-resolved {\n border-color: var(--hw-border);\n }\n .hw-resolved-reopen,\n .hw-csat-btn {\n background: var(--hw-bg-hover);\n border-color: var(--hw-border-md);\n color: var(--hw-text);\n }\n .hw-hover-preview {\n background: #1c1c1e;\n border-color: var(--hw-border);\n }\n .hw-content-search-box {\n background: var(--hw-bg-hover);\n border-color: var(--hw-border-md);\n }\n .hw-preview {\n background: var(--hw-bg);\n border-color: var(--hw-border);\n }\n}\n');
5039
5415
 
5040
5416
  // src/helpway-widget.tsx
5041
- import { jsx as jsx14 } from "react/jsx-runtime";
5417
+ import { jsx as jsx15 } from "react/jsx-runtime";
5042
5418
  function HelpwayWidget({
5043
5419
  apiKey,
5044
5420
  apiUrl,
@@ -5055,7 +5431,7 @@ function HelpwayWidget({
5055
5431
  src
5056
5432
  }) {
5057
5433
  const resolvedApiUrl = apiUrl ?? (src ? src.replace(/\/widget\.js$/, "") : void 0);
5058
- return /* @__PURE__ */ jsx14(
5434
+ return /* @__PURE__ */ jsx15(
5059
5435
  SupportProvider,
5060
5436
  {
5061
5437
  apiKey,
@@ -5068,16 +5444,16 @@ function HelpwayWidget({
5068
5444
  onClose,
5069
5445
  onUnreadChange,
5070
5446
  theme,
5071
- children: /* @__PURE__ */ jsx14(DefaultWidget, { hideLauncher })
5447
+ children: /* @__PURE__ */ jsx15(DefaultWidget, { hideLauncher })
5072
5448
  }
5073
5449
  );
5074
5450
  }
5075
5451
 
5076
5452
  // src/hooks/use-realtime.ts
5077
- import { useEffect as useEffect12 } from "react";
5453
+ import { useEffect as useEffect14 } from "react";
5078
5454
  function useRealtime(handler) {
5079
5455
  const { ws } = useWidgetContext();
5080
- useEffect12(() => {
5456
+ useEffect14(() => {
5081
5457
  return ws.onEvent(handler);
5082
5458
  }, [ws, handler]);
5083
5459
  }
@@ -5088,7 +5464,9 @@ export {
5088
5464
  MarkdownContent,
5089
5465
  MessageBubble,
5090
5466
  MessageList,
5467
+ MessagePreview,
5091
5468
  SupportProvider,
5469
+ WidgetLogo,
5092
5470
  clearVisitorId,
5093
5471
  formatRelativeTime,
5094
5472
  formatTime,