@helpway/react 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -2
- package/dist/index.js +635 -395
- package/dist/index.js.map +1 -1
- package/package.json +5 -3
- package/src/themed/styles.css +190 -38
package/dist/index.js
CHANGED
|
@@ -462,6 +462,23 @@ function createWidgetStore() {
|
|
|
462
462
|
state.setTyping(event.conversationId, false);
|
|
463
463
|
break;
|
|
464
464
|
}
|
|
465
|
+
case "conversationCreated": {
|
|
466
|
+
const conv = event.conversation;
|
|
467
|
+
const alreadyPresent = state.conversations.some((c) => c.id === conv.id);
|
|
468
|
+
if (alreadyPresent) break;
|
|
469
|
+
state.addConversation({
|
|
470
|
+
id: conv.id,
|
|
471
|
+
title: conv.title,
|
|
472
|
+
status: conv.status,
|
|
473
|
+
lastMessageText: conv.lastMessageText ?? null,
|
|
474
|
+
lastMessageAt: conv.lastMessageAt ?? null,
|
|
475
|
+
lastMessageSenderType: conv.lastMessageSenderType ?? null,
|
|
476
|
+
lastMessageSenderName: null,
|
|
477
|
+
lastMessageSenderImage: null,
|
|
478
|
+
unreadCount: 0
|
|
479
|
+
});
|
|
480
|
+
break;
|
|
481
|
+
}
|
|
465
482
|
default:
|
|
466
483
|
break;
|
|
467
484
|
}
|
|
@@ -923,6 +940,7 @@ function useComposer(conversationId) {
|
|
|
923
940
|
const [isSubmitting, setIsSubmitting] = useState2(false);
|
|
924
941
|
const [attachments, setAttachments] = useState2([]);
|
|
925
942
|
const [sendError, setSendError] = useState2(null);
|
|
943
|
+
const [emailGateConvId, setEmailGateConvId] = useState2(null);
|
|
926
944
|
const addFiles = useCallback2(
|
|
927
945
|
async (files) => {
|
|
928
946
|
if (!conversationId) return;
|
|
@@ -1028,6 +1046,9 @@ function useComposer(conversationId) {
|
|
|
1028
1046
|
if (result.item) {
|
|
1029
1047
|
store.getState().replaceMessage(conv.id, optimisticId, result.item);
|
|
1030
1048
|
}
|
|
1049
|
+
if (result.requireEmail) {
|
|
1050
|
+
setEmailGateConvId(conv.id);
|
|
1051
|
+
}
|
|
1031
1052
|
} else {
|
|
1032
1053
|
const result = await client.widget.sendMessage.mutate({
|
|
1033
1054
|
conversationId,
|
|
@@ -1060,7 +1081,8 @@ function useComposer(conversationId) {
|
|
|
1060
1081
|
addFiles,
|
|
1061
1082
|
removeAttachment,
|
|
1062
1083
|
sendError,
|
|
1063
|
-
clearSendError
|
|
1084
|
+
clearSendError,
|
|
1085
|
+
emailGateConvId
|
|
1064
1086
|
};
|
|
1065
1087
|
}
|
|
1066
1088
|
function fileToBase64(file) {
|
|
@@ -1300,27 +1322,179 @@ function useWidget() {
|
|
|
1300
1322
|
import { useCallback as useCallback7, useRef as useRef7, useState as useState7 } from "react";
|
|
1301
1323
|
|
|
1302
1324
|
// src/themed/icons.tsx
|
|
1303
|
-
import {
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1325
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
1326
|
+
function XIcon({ size = 24, ...props }) {
|
|
1327
|
+
return /* @__PURE__ */ jsx2(
|
|
1328
|
+
"svg",
|
|
1329
|
+
{
|
|
1330
|
+
width: typeof size === "number" ? `${size}px` : size,
|
|
1331
|
+
height: typeof size === "number" ? `${size}px` : size,
|
|
1332
|
+
viewBox: "0 0 24 24",
|
|
1333
|
+
fill: "none",
|
|
1334
|
+
"aria-hidden": true,
|
|
1335
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1336
|
+
...props,
|
|
1337
|
+
children: /* @__PURE__ */ jsx2("path", { d: "M6.5 6.5L17.5 17.5M17.5 6.5L6.5 17.5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })
|
|
1338
|
+
}
|
|
1339
|
+
);
|
|
1340
|
+
}
|
|
1341
|
+
function SendIcon({ size = 24, ...props }) {
|
|
1342
|
+
return /* @__PURE__ */ jsx2(
|
|
1343
|
+
"svg",
|
|
1344
|
+
{
|
|
1345
|
+
width: typeof size === "number" ? `${size}px` : size,
|
|
1346
|
+
height: typeof size === "number" ? `${size}px` : size,
|
|
1347
|
+
viewBox: "0 0 24 24",
|
|
1348
|
+
fill: "none",
|
|
1349
|
+
"aria-hidden": true,
|
|
1350
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1351
|
+
...props,
|
|
1352
|
+
children: /* @__PURE__ */ jsx2("path", { d: "M9.61946 10.8613L20.9997 4.55422M9.04735 10.9043L4.10061 5.68812C3.49632 5.05091 3.94803 4 4.82621 4H20.2513C21.0247 4 21.5054 4.84039 21.1132 5.50702L13.1902 18.9762C12.7433 19.7358 11.6035 19.5879 11.3654 18.7393L9.28458 11.3223C9.24066 11.1658 9.15923 11.0223 9.04735 10.9043Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
1353
|
+
}
|
|
1354
|
+
);
|
|
1355
|
+
}
|
|
1356
|
+
function PaperclipIcon({ size = 24, ...props }) {
|
|
1357
|
+
return /* @__PURE__ */ jsx2(
|
|
1358
|
+
"svg",
|
|
1359
|
+
{
|
|
1360
|
+
width: typeof size === "number" ? `${size}px` : size,
|
|
1361
|
+
height: typeof size === "number" ? `${size}px` : size,
|
|
1362
|
+
viewBox: "0 0 24 24",
|
|
1363
|
+
fill: "none",
|
|
1364
|
+
"aria-hidden": true,
|
|
1365
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1366
|
+
...props,
|
|
1367
|
+
children: /* @__PURE__ */ jsx2("path", { d: "M6 11V15C6 18.3137 8.68629 21 12 21C15.3137 21 18 18.3137 18 15V7C18 4.79086 16.2091 3 14 3C11.7909 3 10 4.79086 10 7V15C10 16.1046 10.8954 17 12 17C13.1046 17 14 16.1046 14 15V7", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })
|
|
1368
|
+
}
|
|
1369
|
+
);
|
|
1370
|
+
}
|
|
1371
|
+
function HomeIcon({ size = 24, ...props }) {
|
|
1372
|
+
return /* @__PURE__ */ jsx2(
|
|
1373
|
+
"svg",
|
|
1374
|
+
{
|
|
1375
|
+
width: typeof size === "number" ? `${size}px` : size,
|
|
1376
|
+
height: typeof size === "number" ? `${size}px` : size,
|
|
1377
|
+
viewBox: "0 0 24 24",
|
|
1378
|
+
fill: "none",
|
|
1379
|
+
"aria-hidden": true,
|
|
1380
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1381
|
+
...props,
|
|
1382
|
+
children: /* @__PURE__ */ jsx2("path", { d: "M4 9.77313C4 9.2136 4 8.93383 4.07063 8.67517C4.1332 8.446 4.23609 8.22982 4.3745 8.03675C4.53071 7.81882 4.74784 7.6424 5.1821 7.28957L9.9821 3.38956C10.7014 2.80513 11.0611 2.51291 11.4609 2.40099C11.8135 2.30229 12.1865 2.30229 12.5391 2.40099C12.9389 2.51291 13.2986 2.80513 14.0179 3.38957L18.8179 7.28957C19.2522 7.6424 19.4693 7.81882 19.6255 8.03675C19.7639 8.22982 19.8668 8.446 19.9294 8.67517C20 8.93383 20 9.2136 20 9.77313V16.8C20 17.9201 20 18.4802 19.782 18.908C19.5903 19.2843 19.2843 19.5903 18.908 19.782C18.4802 20 17.9201 20 16.8 20H7.2C6.07989 20 5.51984 20 5.09202 19.782C4.71569 19.5903 4.40973 19.2843 4.21799 18.908C4 18.4802 4 17.9201 4 16.8V9.77313Z", stroke: "currentColor", strokeWidth: "2", strokeLinejoin: "round" })
|
|
1383
|
+
}
|
|
1384
|
+
);
|
|
1385
|
+
}
|
|
1386
|
+
function MessagesIcon({ size = 24, ...props }) {
|
|
1387
|
+
return /* @__PURE__ */ jsxs(
|
|
1388
|
+
"svg",
|
|
1389
|
+
{
|
|
1390
|
+
width: typeof size === "number" ? `${size}px` : size,
|
|
1391
|
+
height: typeof size === "number" ? `${size}px` : size,
|
|
1392
|
+
viewBox: "0 0 24 24",
|
|
1393
|
+
fill: "none",
|
|
1394
|
+
"aria-hidden": true,
|
|
1395
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1396
|
+
...props,
|
|
1397
|
+
children: [
|
|
1398
|
+
/* @__PURE__ */ jsx2("path", { d: "M4.00195 6.00003C4.00195 4.89546 4.89738 4.00003 6.00195 4.00002L18.0019 4C19.1065 4 20.002 4.89543 20.002 6V16.0358C20.002 17.1403 19.1065 18.0358 18.002 18.0358L15.3757 18.0358C15.1427 18.0358 14.9171 18.1171 14.7377 18.2657L11.9977 20.5358L9.29398 18.2694C9.11393 18.1185 8.8865 18.0358 8.65157 18.0358H6.00195C4.89738 18.0358 4.00195 17.1403 4.00195 16.0358V6.00003Z", stroke: "currentColor", strokeWidth: "2", strokeLinejoin: "round" }),
|
|
1399
|
+
/* @__PURE__ */ jsx2("path", { d: "M6.875 11.25C6.875 11.7332 7.26675 12.125 7.75 12.125C8.23325 12.125 8.625 11.7332 8.625 11.25C8.625 10.7668 8.23325 10.375 7.75 10.375C7.26675 10.375 6.875 10.7668 6.875 11.25ZM11.125 11.25C11.125 11.7332 11.5168 12.125 12 12.125C12.4832 12.125 12.875 11.7332 12.875 11.25C12.875 10.7668 12.4832 10.375 12 10.375C11.5168 10.375 11.125 10.7668 11.125 11.25ZM15.375 11.25C15.375 11.7332 15.7668 12.125 16.25 12.125C16.7332 12.125 17.125 11.7332 17.125 11.25C17.125 10.7668 16.7332 10.375 16.25 10.375C15.7668 10.375 15.375 10.7668 15.375 11.25Z", fill: "currentColor", stroke: "currentColor", strokeWidth: "0.75", strokeLinecap: "square" })
|
|
1400
|
+
]
|
|
1401
|
+
}
|
|
1402
|
+
);
|
|
1403
|
+
}
|
|
1404
|
+
function BookIcon({ size = 24, ...props }) {
|
|
1405
|
+
return /* @__PURE__ */ jsx2(
|
|
1406
|
+
"svg",
|
|
1407
|
+
{
|
|
1408
|
+
width: typeof size === "number" ? `${size}px` : size,
|
|
1409
|
+
height: typeof size === "number" ? `${size}px` : size,
|
|
1410
|
+
viewBox: "0 0 24 24",
|
|
1411
|
+
fill: "none",
|
|
1412
|
+
"aria-hidden": true,
|
|
1413
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1414
|
+
...props,
|
|
1415
|
+
children: /* @__PURE__ */ jsx2("path", { d: "M9 6C8.44772 6 8 6.44772 8 7C8 7.55228 8.44772 8 9 8V6ZM15 8C15.5523 8 16 7.55228 16 7C16 6.44772 15.5523 6 15 6V8ZM9 10C8.44772 10 8 10.4477 8 11C8 11.5523 8.44772 12 9 12V10ZM12 12C12.5523 12 13 11.5523 13 11C13 10.4477 12.5523 10 12 10V12ZM7 4H17V2H7V4ZM18 5V19H20V5H18ZM17 20H7V22H17V20ZM6 19V5H4V19H6ZM7 20C6.44771 20 6 19.5523 6 19H4C4 20.6569 5.34315 22 7 22V20ZM18 19C18 19.5523 17.5523 20 17 20V22C18.6569 22 20 20.6569 20 19H18ZM17 4C17.5523 4 18 4.44772 18 5H20C20 3.34315 18.6569 2 17 2V4ZM7 2C5.34315 2 4 3.34315 4 5H6C6 4.44772 6.44772 4 7 4V2ZM18 12V15H20V12H18ZM17 16H7V18H17V16ZM7 22H10V20H7V22ZM7 16C5.34315 16 4 17.3431 4 19H6C6 18.4477 6.44772 18 7 18V16ZM18 15C18 15.5523 17.5523 16 17 16V18C18.6569 18 20 16.6569 20 15H18ZM9 8H15V6H9V8ZM9 12H12V10H9V12Z", fill: "currentColor" })
|
|
1416
|
+
}
|
|
1417
|
+
);
|
|
1418
|
+
}
|
|
1419
|
+
function MegaphoneIcon({ size = 24, ...props }) {
|
|
1420
|
+
return /* @__PURE__ */ jsx2(
|
|
1421
|
+
"svg",
|
|
1422
|
+
{
|
|
1423
|
+
width: typeof size === "number" ? `${size}px` : size,
|
|
1424
|
+
height: typeof size === "number" ? `${size}px` : size,
|
|
1425
|
+
viewBox: "0 0 24 24",
|
|
1426
|
+
fill: "none",
|
|
1427
|
+
"aria-hidden": true,
|
|
1428
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1429
|
+
...props,
|
|
1430
|
+
children: /* @__PURE__ */ jsx2("path", { d: "M17.9961 14.0001C19.6529 14.0001 20.9961 12.657 20.9961 11.0001C20.9961 9.34325 19.6529 8.0001 17.9961 8.0001M12.8254 18.0001C12.4136 19.1653 11.3023 20.0001 9.99609 20.0001C8.33924 20.0001 6.99609 18.657 6.99609 17.0001V15.5001M6.99829 6.5001V15.5001M17.9961 5.73752V16.2627C17.9961 17.617 16.6784 18.5797 15.3882 18.1681L4.38819 14.6585C3.55899 14.394 2.99609 13.6235 2.99609 12.7532V9.24704C2.99609 8.37667 3.55899 7.60622 4.38819 7.34167L15.3882 3.83215C16.6784 3.42051 17.9961 4.38325 17.9961 5.73752Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
1431
|
+
}
|
|
1432
|
+
);
|
|
1433
|
+
}
|
|
1434
|
+
function LightbulbIcon({ size = 24, ...props }) {
|
|
1435
|
+
return /* @__PURE__ */ jsx2(
|
|
1436
|
+
"svg",
|
|
1437
|
+
{
|
|
1438
|
+
width: typeof size === "number" ? `${size}px` : size,
|
|
1439
|
+
height: typeof size === "number" ? `${size}px` : size,
|
|
1440
|
+
viewBox: "0 0 24 24",
|
|
1441
|
+
fill: "none",
|
|
1442
|
+
"aria-hidden": true,
|
|
1443
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1444
|
+
...props,
|
|
1445
|
+
children: /* @__PURE__ */ jsx2("path", { d: "M10 21H14M15.6076 15C17.6404 13.7751 19 11.5463 19 9C19 5.13401 15.866 2 12 2C8.13401 2 5 5.13401 5 9C5 11.5463 6.35958 13.7751 8.39241 15M15.6076 15C15.4111 15.1184 15.2084 15.2274 15 15.3264V17C15 17.5523 14.5523 18 14 18H10C9.44772 18 9 17.5523 9 17V15.3264C8.7916 15.2274 8.58886 15.1184 8.39241 15M15.6076 15H8.39241", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
1446
|
+
}
|
|
1447
|
+
);
|
|
1448
|
+
}
|
|
1449
|
+
function HelpCircleIcon({ size = 24, ...props }) {
|
|
1450
|
+
return /* @__PURE__ */ jsxs(
|
|
1451
|
+
"svg",
|
|
1452
|
+
{
|
|
1453
|
+
width: typeof size === "number" ? `${size}px` : size,
|
|
1454
|
+
height: typeof size === "number" ? `${size}px` : size,
|
|
1455
|
+
viewBox: "0 0 24 24",
|
|
1456
|
+
fill: "none",
|
|
1457
|
+
"aria-hidden": true,
|
|
1458
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1459
|
+
...props,
|
|
1460
|
+
children: [
|
|
1461
|
+
/* @__PURE__ */ jsx2("path", { d: "M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
1462
|
+
/* @__PURE__ */ jsx2("path", { d: "M12 16V16.01", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }),
|
|
1463
|
+
/* @__PURE__ */ jsx2("path", { d: "M12 13C12 11.3608 14 11.9319 14 10C14 8.89543 13.1046 8 12 8C11.2597 8 10.6134 8.4022 10.2676 9", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
1464
|
+
]
|
|
1465
|
+
}
|
|
1466
|
+
);
|
|
1467
|
+
}
|
|
1468
|
+
function NewspaperIcon({ size = 24, ...props }) {
|
|
1469
|
+
return /* @__PURE__ */ jsx2(
|
|
1470
|
+
"svg",
|
|
1471
|
+
{
|
|
1472
|
+
width: typeof size === "number" ? `${size}px` : size,
|
|
1473
|
+
height: typeof size === "number" ? `${size}px` : size,
|
|
1474
|
+
viewBox: "0 0 24 24",
|
|
1475
|
+
fill: "none",
|
|
1476
|
+
"aria-hidden": true,
|
|
1477
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1478
|
+
...props,
|
|
1479
|
+
children: /* @__PURE__ */ jsx2("path", { d: "M16 12V6C16 4.89543 15.1046 4 14 4H5C3.89543 4 3 4.89543 3 6V17.5C3 18.8807 4.11929 20 5.5 20H18.5M16 12V17.5C16 18.8807 17.1193 20 18.5 20M16 12H19C20.1046 12 21 12.8954 21 14V17.5C21 18.8807 19.8807 20 18.5 20M7 16H12M7 8H12V12H7V8Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
1480
|
+
}
|
|
1481
|
+
);
|
|
1482
|
+
}
|
|
1483
|
+
function StarIcon({ size = 24, ...props }) {
|
|
1484
|
+
return /* @__PURE__ */ jsx2(
|
|
1485
|
+
"svg",
|
|
1486
|
+
{
|
|
1487
|
+
width: typeof size === "number" ? `${size}px` : size,
|
|
1488
|
+
height: typeof size === "number" ? `${size}px` : size,
|
|
1489
|
+
viewBox: "0 0 24 24",
|
|
1490
|
+
fill: "none",
|
|
1491
|
+
"aria-hidden": true,
|
|
1492
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1493
|
+
...props,
|
|
1494
|
+
children: /* @__PURE__ */ jsx2("path", { d: "M11.5288 2.29524C11.7179 1.90159 12.2821 1.90159 12.4712 2.29524L14.9458 7.44648C15.0219 7.60491 15.1735 7.71434 15.3487 7.73728L21.0456 8.4832C21.4809 8.5402 21.6552 9.07312 21.3368 9.37342L17.1693 13.303C17.0412 13.4238 16.9832 13.6009 17.0154 13.7735L18.0616 19.3857C18.1416 19.8146 17.6852 20.144 17.2993 19.9359L12.249 17.2133C12.0937 17.1296 11.9063 17.1296 11.751 17.2133L6.70073 19.9359C6.3148 20.144 5.85841 19.8146 5.93837 19.3857L6.98459 13.7735C7.01677 13.6009 6.95885 13.4238 6.83068 13.303L2.66324 9.37342C2.34476 9.07312 2.51909 8.5402 2.95444 8.4832L8.65127 7.73728C8.82648 7.71434 8.97811 7.60491 9.05422 7.44648L11.5288 2.29524Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
1495
|
+
}
|
|
1496
|
+
);
|
|
1497
|
+
}
|
|
1324
1498
|
|
|
1325
1499
|
// src/themed/message-bubble.tsx
|
|
1326
1500
|
import { useCallback as useCallback6, useEffect as useEffect5, useLayoutEffect, useRef as useRef6, useState as useState6 } from "react";
|
|
@@ -1328,7 +1502,7 @@ import { createPortal } from "react-dom";
|
|
|
1328
1502
|
|
|
1329
1503
|
// src/themed/content/simple-markdown.tsx
|
|
1330
1504
|
import { useEffect as useEffect4, useRef as useRef5 } from "react";
|
|
1331
|
-
import { jsx as
|
|
1505
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
1332
1506
|
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>`;
|
|
1333
1507
|
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>`;
|
|
1334
1508
|
function inferCodeLanguage(code, lang) {
|
|
@@ -1410,6 +1584,25 @@ function MarkdownContent({
|
|
|
1410
1584
|
}) {
|
|
1411
1585
|
const rootRef = useRef5(null);
|
|
1412
1586
|
const html = bodyHtml ?? (bodyMarkdown ? renderMarkdown(bodyMarkdown) : "");
|
|
1587
|
+
useEffect4(() => {
|
|
1588
|
+
const root = rootRef.current;
|
|
1589
|
+
if (!root) return;
|
|
1590
|
+
const isWhitespaceOnly = (el) => {
|
|
1591
|
+
const hasNonBrChild = Array.from(el.children).some(
|
|
1592
|
+
(c) => c.tagName !== "BR"
|
|
1593
|
+
);
|
|
1594
|
+
if (hasNonBrChild) return false;
|
|
1595
|
+
const text = el.textContent ?? "";
|
|
1596
|
+
return text.replace(/[\s ]/g, "") === "";
|
|
1597
|
+
};
|
|
1598
|
+
const removeEmpties = () => {
|
|
1599
|
+
const candidates = root.querySelectorAll("p, div");
|
|
1600
|
+
candidates.forEach((el) => {
|
|
1601
|
+
if (isWhitespaceOnly(el)) el.remove();
|
|
1602
|
+
});
|
|
1603
|
+
};
|
|
1604
|
+
removeEmpties();
|
|
1605
|
+
}, [html]);
|
|
1413
1606
|
useEffect4(() => {
|
|
1414
1607
|
const root = rootRef.current;
|
|
1415
1608
|
if (!root) return;
|
|
@@ -1422,7 +1615,7 @@ function MarkdownContent({
|
|
|
1422
1615
|
};
|
|
1423
1616
|
}, []);
|
|
1424
1617
|
if (!html) return null;
|
|
1425
|
-
return /* @__PURE__ */
|
|
1618
|
+
return /* @__PURE__ */ jsx3(
|
|
1426
1619
|
"div",
|
|
1427
1620
|
{
|
|
1428
1621
|
ref: rootRef,
|
|
@@ -1444,13 +1637,11 @@ function flashCopied(btn, failed = false) {
|
|
|
1444
1637
|
}
|
|
1445
1638
|
|
|
1446
1639
|
// src/themed/message-bubble.tsx
|
|
1447
|
-
import { Fragment, jsx as
|
|
1448
|
-
function MessageBubble({ text, sender, senderName,
|
|
1640
|
+
import { Fragment, jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1641
|
+
function MessageBubble({ text, sender, senderName, parts }) {
|
|
1449
1642
|
const senderClass = `hw-msg--${sender}`;
|
|
1450
1643
|
const agentName = useWidgetStore((s) => s.agentConfig?.name) ?? t("widget.helpway_ai");
|
|
1451
|
-
const
|
|
1452
|
-
const meta = sender === "ai" ? `${agentName} \xB7 ${relativeTime}` : relativeTime;
|
|
1453
|
-
const clockTime = formatClockTime(time);
|
|
1644
|
+
const senderLabel = sender === "ai" ? agentName : sender === "team" ? senderName ?? t("widget.support") : null;
|
|
1454
1645
|
const bubbleRef = useRef6(null);
|
|
1455
1646
|
const imageParts = parts?.filter((p) => p.type === "image") ?? [];
|
|
1456
1647
|
const fileParts = parts?.filter((p) => p.type === "file") ?? [];
|
|
@@ -1466,23 +1657,22 @@ function MessageBubble({ text, sender, senderName, time, parts }) {
|
|
|
1466
1657
|
bubble.removeEventListener("click", handleClick);
|
|
1467
1658
|
};
|
|
1468
1659
|
}, [sender]);
|
|
1469
|
-
return /* @__PURE__ */
|
|
1470
|
-
sender === "team" && /* @__PURE__ */
|
|
1471
|
-
imageParts.length > 0 && /* @__PURE__ */
|
|
1472
|
-
hasText && /* @__PURE__ */
|
|
1473
|
-
fileParts.length > 0 && /* @__PURE__ */
|
|
1474
|
-
/* @__PURE__ */
|
|
1475
|
-
/* @__PURE__ */
|
|
1476
|
-
/* @__PURE__ */
|
|
1477
|
-
hasText && /* @__PURE__ */ jsx3(CopyButton, { text })
|
|
1660
|
+
return /* @__PURE__ */ jsx4("div", { className: `hw-msg ${senderClass}`, children: /* @__PURE__ */ jsxs2("div", { className: "hw-msg-body", children: [
|
|
1661
|
+
sender === "team" && /* @__PURE__ */ jsx4("div", { className: "hw-msg-sender", children: senderName ?? t("widget.support") }),
|
|
1662
|
+
imageParts.length > 0 && /* @__PURE__ */ jsx4("div", { className: "hw-msg-images", children: imageParts.map((img, i) => /* @__PURE__ */ jsx4(PreviewableThumbnail, { src: img.url }, i)) }),
|
|
1663
|
+
hasText && /* @__PURE__ */ jsx4("div", { className: "hw-msg-bubble", ref: bubbleRef, children: sender === "ai" || sender === "team" ? /* @__PURE__ */ jsx4("span", { dangerouslySetInnerHTML: { __html: renderMarkdown(text) } }) : /* @__PURE__ */ jsx4("span", { dangerouslySetInnerHTML: { __html: linkifyText(text) } }) }),
|
|
1664
|
+
fileParts.length > 0 && /* @__PURE__ */ jsx4("div", { className: "hw-msg-files", children: fileParts.map((file, i) => /* @__PURE__ */ jsx4(FileCard, { file }, i)) }),
|
|
1665
|
+
/* @__PURE__ */ jsxs2("div", { className: "hw-msg-meta", children: [
|
|
1666
|
+
senderLabel && /* @__PURE__ */ jsx4("span", { className: "hw-msg-sender-label", children: senderLabel }),
|
|
1667
|
+
hasText && /* @__PURE__ */ jsx4(CopyButton, { text })
|
|
1478
1668
|
] })
|
|
1479
1669
|
] }) });
|
|
1480
1670
|
}
|
|
1481
|
-
function PreviewableThumbnail({ src
|
|
1671
|
+
function PreviewableThumbnail({ src }) {
|
|
1482
1672
|
const [hover, setHover] = useState6(false);
|
|
1483
1673
|
const ref = useRef6(null);
|
|
1484
|
-
return /* @__PURE__ */
|
|
1485
|
-
/* @__PURE__ */
|
|
1674
|
+
return /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
1675
|
+
/* @__PURE__ */ jsx4(
|
|
1486
1676
|
"a",
|
|
1487
1677
|
{
|
|
1488
1678
|
ref,
|
|
@@ -1492,10 +1682,10 @@ function PreviewableThumbnail({ src, type }) {
|
|
|
1492
1682
|
className: "hw-msg-image-link",
|
|
1493
1683
|
onMouseEnter: () => setHover(true),
|
|
1494
1684
|
onMouseLeave: () => setHover(false),
|
|
1495
|
-
children: /* @__PURE__ */
|
|
1685
|
+
children: /* @__PURE__ */ jsx4("img", { src, alt: "", className: "hw-msg-image", loading: "lazy" })
|
|
1496
1686
|
}
|
|
1497
1687
|
),
|
|
1498
|
-
hover && /* @__PURE__ */
|
|
1688
|
+
hover && /* @__PURE__ */ jsx4(AnchoredPreview, { src, anchorRef: ref, href: src })
|
|
1499
1689
|
] });
|
|
1500
1690
|
}
|
|
1501
1691
|
var PREVIEWABLE_EXTS = /* @__PURE__ */ new Set(["pdf", "csv", "png", "jpg", "jpeg", "gif", "webp", "svg"]);
|
|
@@ -1505,8 +1695,8 @@ function FileCard({ file }) {
|
|
|
1505
1695
|
const ext = file.fileName.split(".").pop()?.toLowerCase() ?? "";
|
|
1506
1696
|
const isPreviewable = PREVIEWABLE_EXTS.has(ext);
|
|
1507
1697
|
const isImage = file.mimeType.startsWith("image/");
|
|
1508
|
-
return /* @__PURE__ */
|
|
1509
|
-
/* @__PURE__ */
|
|
1698
|
+
return /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
1699
|
+
/* @__PURE__ */ jsxs2(
|
|
1510
1700
|
"a",
|
|
1511
1701
|
{
|
|
1512
1702
|
ref,
|
|
@@ -1517,15 +1707,15 @@ function FileCard({ file }) {
|
|
|
1517
1707
|
onMouseEnter: () => isPreviewable && setHover(true),
|
|
1518
1708
|
onMouseLeave: () => setHover(false),
|
|
1519
1709
|
children: [
|
|
1520
|
-
/* @__PURE__ */
|
|
1521
|
-
/* @__PURE__ */
|
|
1522
|
-
/* @__PURE__ */
|
|
1523
|
-
/* @__PURE__ */
|
|
1710
|
+
/* @__PURE__ */ jsx4("span", { className: "hw-msg-file-icon", children: /* @__PURE__ */ jsx4(FileTypeIcon, { ext }) }),
|
|
1711
|
+
/* @__PURE__ */ jsxs2("span", { className: "hw-msg-file-info", children: [
|
|
1712
|
+
/* @__PURE__ */ jsx4("span", { className: "hw-msg-file-name", children: file.fileName }),
|
|
1713
|
+
/* @__PURE__ */ jsx4("span", { className: "hw-msg-file-size", children: formatFileSize(file.fileSize) })
|
|
1524
1714
|
] })
|
|
1525
1715
|
]
|
|
1526
1716
|
}
|
|
1527
1717
|
),
|
|
1528
|
-
hover && isPreviewable && (isImage ? /* @__PURE__ */
|
|
1718
|
+
hover && isPreviewable && (isImage ? /* @__PURE__ */ jsx4(AnchoredPreview, { src: file.url, anchorRef: ref, href: file.url }) : /* @__PURE__ */ jsx4(AnchoredDocPreview, { fileName: file.fileName, ext, anchorRef: ref, href: file.url }))
|
|
1529
1719
|
] });
|
|
1530
1720
|
}
|
|
1531
1721
|
function AnchoredPreview({
|
|
@@ -1559,7 +1749,7 @@ function AnchoredPreview({
|
|
|
1559
1749
|
};
|
|
1560
1750
|
if (!portalTarget) return null;
|
|
1561
1751
|
return createPortal(
|
|
1562
|
-
/* @__PURE__ */
|
|
1752
|
+
/* @__PURE__ */ jsx4("div", { className: "hw-hover-preview", style, onClick: handleClick, children: /* @__PURE__ */ jsx4("img", { src, alt: "", className: "hw-hover-preview-img" }) }),
|
|
1563
1753
|
portalTarget
|
|
1564
1754
|
);
|
|
1565
1755
|
}
|
|
@@ -1590,17 +1780,17 @@ function AnchoredDocPreview({
|
|
|
1590
1780
|
}, [anchorRef]);
|
|
1591
1781
|
if (!portalTarget) return null;
|
|
1592
1782
|
return createPortal(
|
|
1593
|
-
/* @__PURE__ */
|
|
1783
|
+
/* @__PURE__ */ jsxs2(
|
|
1594
1784
|
"div",
|
|
1595
1785
|
{
|
|
1596
1786
|
className: "hw-hover-preview hw-hover-preview--doc",
|
|
1597
1787
|
style,
|
|
1598
1788
|
onClick: () => window.open(href, "_blank"),
|
|
1599
1789
|
children: [
|
|
1600
|
-
/* @__PURE__ */
|
|
1601
|
-
/* @__PURE__ */
|
|
1602
|
-
/* @__PURE__ */
|
|
1603
|
-
/* @__PURE__ */
|
|
1790
|
+
/* @__PURE__ */ jsx4("div", { className: "hw-hover-preview-doc-icon", children: /* @__PURE__ */ jsx4(FileTypeIcon, { ext }) }),
|
|
1791
|
+
/* @__PURE__ */ jsxs2("div", { className: "hw-hover-preview-doc-info", children: [
|
|
1792
|
+
/* @__PURE__ */ jsx4("span", { className: "hw-hover-preview-doc-name", children: fileName }),
|
|
1793
|
+
/* @__PURE__ */ jsx4("span", { className: "hw-hover-preview-doc-hint", children: t("widget.click_to_open") })
|
|
1604
1794
|
] })
|
|
1605
1795
|
]
|
|
1606
1796
|
}
|
|
@@ -1613,15 +1803,6 @@ function formatFileSize(bytes) {
|
|
|
1613
1803
|
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(0)} KB`;
|
|
1614
1804
|
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
1615
1805
|
}
|
|
1616
|
-
function formatClockTime(value) {
|
|
1617
|
-
const date = new Date(value);
|
|
1618
|
-
if (Number.isNaN(date.getTime())) return "";
|
|
1619
|
-
return date.toLocaleTimeString(void 0, {
|
|
1620
|
-
hour: "2-digit",
|
|
1621
|
-
hour12: false,
|
|
1622
|
-
minute: "2-digit"
|
|
1623
|
-
});
|
|
1624
|
-
}
|
|
1625
1806
|
function CopyButton({ text }) {
|
|
1626
1807
|
const [copied, setCopied] = useState6(false);
|
|
1627
1808
|
const handleCopy = useCallback6(
|
|
@@ -1636,14 +1817,14 @@ function CopyButton({ text }) {
|
|
|
1636
1817
|
},
|
|
1637
1818
|
[text]
|
|
1638
1819
|
);
|
|
1639
|
-
return /* @__PURE__ */
|
|
1820
|
+
return /* @__PURE__ */ jsx4(
|
|
1640
1821
|
"button",
|
|
1641
1822
|
{
|
|
1642
1823
|
type: "button",
|
|
1643
1824
|
className: `hw-msg-copy ${copied ? "hw-msg-copy--done" : ""}`,
|
|
1644
1825
|
onClick: handleCopy,
|
|
1645
1826
|
"aria-label": copied ? t("widget.copied") : t("widget.copy"),
|
|
1646
|
-
children: copied ? /* @__PURE__ */
|
|
1827
|
+
children: copied ? /* @__PURE__ */ jsx4(
|
|
1647
1828
|
"svg",
|
|
1648
1829
|
{
|
|
1649
1830
|
viewBox: "0 0 24 24",
|
|
@@ -1652,9 +1833,9 @@ function CopyButton({ text }) {
|
|
|
1652
1833
|
strokeWidth: 2,
|
|
1653
1834
|
strokeLinecap: "round",
|
|
1654
1835
|
strokeLinejoin: "round",
|
|
1655
|
-
children: /* @__PURE__ */
|
|
1836
|
+
children: /* @__PURE__ */ jsx4("polyline", { points: "20 6 9 17 4 12" })
|
|
1656
1837
|
}
|
|
1657
|
-
) : /* @__PURE__ */
|
|
1838
|
+
) : /* @__PURE__ */ jsxs2(
|
|
1658
1839
|
"svg",
|
|
1659
1840
|
{
|
|
1660
1841
|
viewBox: "0 0 24 24",
|
|
@@ -1664,8 +1845,8 @@ function CopyButton({ text }) {
|
|
|
1664
1845
|
strokeLinecap: "round",
|
|
1665
1846
|
strokeLinejoin: "round",
|
|
1666
1847
|
children: [
|
|
1667
|
-
/* @__PURE__ */
|
|
1668
|
-
/* @__PURE__ */
|
|
1848
|
+
/* @__PURE__ */ jsx4("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
|
|
1849
|
+
/* @__PURE__ */ jsx4("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
|
|
1669
1850
|
]
|
|
1670
1851
|
}
|
|
1671
1852
|
)
|
|
@@ -1684,7 +1865,7 @@ function FileTypeIcon({ ext }) {
|
|
|
1684
1865
|
zip: "#f59e0b"
|
|
1685
1866
|
};
|
|
1686
1867
|
const color = colors[ext] ?? "currentColor";
|
|
1687
|
-
return /* @__PURE__ */
|
|
1868
|
+
return /* @__PURE__ */ jsxs2(
|
|
1688
1869
|
"svg",
|
|
1689
1870
|
{
|
|
1690
1871
|
viewBox: "0 0 24 24",
|
|
@@ -1694,17 +1875,17 @@ function FileTypeIcon({ ext }) {
|
|
|
1694
1875
|
strokeLinecap: "round",
|
|
1695
1876
|
strokeLinejoin: "round",
|
|
1696
1877
|
children: [
|
|
1697
|
-
/* @__PURE__ */
|
|
1698
|
-
/* @__PURE__ */
|
|
1699
|
-
ext === "pdf" && /* @__PURE__ */
|
|
1700
|
-
ext === "csv" && /* @__PURE__ */
|
|
1878
|
+
/* @__PURE__ */ jsx4("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
|
|
1879
|
+
/* @__PURE__ */ jsx4("polyline", { points: "14 2 14 8 20 8" }),
|
|
1880
|
+
ext === "pdf" && /* @__PURE__ */ jsx4("text", { x: "8", y: "18", fontSize: "6", fill: color, stroke: "none", fontWeight: "700", children: "PDF" }),
|
|
1881
|
+
ext === "csv" && /* @__PURE__ */ jsx4("text", { x: "7", y: "18", fontSize: "6", fill: color, stroke: "none", fontWeight: "700", children: "CSV" })
|
|
1701
1882
|
]
|
|
1702
1883
|
}
|
|
1703
1884
|
);
|
|
1704
1885
|
}
|
|
1705
1886
|
|
|
1706
1887
|
// src/themed/composer.tsx
|
|
1707
|
-
import { jsx as
|
|
1888
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1708
1889
|
var MAX_CHARS = 5e3;
|
|
1709
1890
|
var CHAR_WARN_THRESHOLD = 4800;
|
|
1710
1891
|
var ACCEPTED_TYPES = [
|
|
@@ -1815,7 +1996,7 @@ function Composer({
|
|
|
1815
1996
|
const canSend = (hasText || hasAttachments) && !stillUploading;
|
|
1816
1997
|
const showCharCount = text.length >= CHAR_WARN_THRESHOLD;
|
|
1817
1998
|
const isOverLimit = text.length > MAX_CHARS;
|
|
1818
|
-
return /* @__PURE__ */
|
|
1999
|
+
return /* @__PURE__ */ jsx5(
|
|
1819
2000
|
"div",
|
|
1820
2001
|
{
|
|
1821
2002
|
className: `hw-composer ${compact ? "hw-composer--compact" : ""} ${isDragging ? "hw-composer--dragging" : ""}`,
|
|
@@ -1823,9 +2004,9 @@ function Composer({
|
|
|
1823
2004
|
onDragLeave: handleDragLeave,
|
|
1824
2005
|
onDragOver: handleDragOver,
|
|
1825
2006
|
onDrop: handleDrop,
|
|
1826
|
-
children: /* @__PURE__ */
|
|
1827
|
-
isDragging && /* @__PURE__ */
|
|
1828
|
-
attachments && attachments.length > 0 && /* @__PURE__ */
|
|
2007
|
+
children: /* @__PURE__ */ jsxs3("div", { className: "hw-composer-box", style: { position: "relative" }, children: [
|
|
2008
|
+
isDragging && /* @__PURE__ */ jsx5("div", { className: "hw-composer-drop-overlay", children: /* @__PURE__ */ jsx5("span", { className: "hw-composer-drop-text", children: t("widget.drop_files") }) }),
|
|
2009
|
+
attachments && attachments.length > 0 && /* @__PURE__ */ jsx5("div", { className: "hw-composer-previews", children: attachments.map((a) => /* @__PURE__ */ jsx5(
|
|
1829
2010
|
PreviewThumb,
|
|
1830
2011
|
{
|
|
1831
2012
|
attachment: a,
|
|
@@ -1833,7 +2014,7 @@ function Composer({
|
|
|
1833
2014
|
},
|
|
1834
2015
|
a.id
|
|
1835
2016
|
)) }),
|
|
1836
|
-
/* @__PURE__ */
|
|
2017
|
+
/* @__PURE__ */ jsx5(
|
|
1837
2018
|
"textarea",
|
|
1838
2019
|
{
|
|
1839
2020
|
ref,
|
|
@@ -1848,9 +2029,9 @@ function Composer({
|
|
|
1848
2029
|
"aria-label": t("widget.aria_input")
|
|
1849
2030
|
}
|
|
1850
2031
|
),
|
|
1851
|
-
/* @__PURE__ */
|
|
1852
|
-
/* @__PURE__ */
|
|
1853
|
-
/* @__PURE__ */
|
|
2032
|
+
/* @__PURE__ */ jsxs3("div", { className: "hw-composer-toolbar", children: [
|
|
2033
|
+
/* @__PURE__ */ jsxs3("div", { className: "hw-composer-toolbar-left", children: [
|
|
2034
|
+
/* @__PURE__ */ jsx5(
|
|
1854
2035
|
"button",
|
|
1855
2036
|
{
|
|
1856
2037
|
type: "button",
|
|
@@ -1858,10 +2039,10 @@ function Composer({
|
|
|
1858
2039
|
onClick: handleFileClick,
|
|
1859
2040
|
disabled: disabled || isSubmitting,
|
|
1860
2041
|
"aria-label": t("widget.aria_attach"),
|
|
1861
|
-
children: /* @__PURE__ */
|
|
2042
|
+
children: /* @__PURE__ */ jsx5(PaperclipIcon, {})
|
|
1862
2043
|
}
|
|
1863
2044
|
),
|
|
1864
|
-
/* @__PURE__ */
|
|
2045
|
+
/* @__PURE__ */ jsx5(
|
|
1865
2046
|
"input",
|
|
1866
2047
|
{
|
|
1867
2048
|
ref: fileInputRef,
|
|
@@ -1872,9 +2053,9 @@ function Composer({
|
|
|
1872
2053
|
onChange: handleFileChange
|
|
1873
2054
|
}
|
|
1874
2055
|
),
|
|
1875
|
-
showCharCount && /* @__PURE__ */
|
|
2056
|
+
showCharCount && /* @__PURE__ */ jsx5("span", { className: `hw-composer-charcount ${isOverLimit ? "hw-composer-charcount--over" : ""}`, children: MAX_CHARS - text.length })
|
|
1876
2057
|
] }),
|
|
1877
|
-
/* @__PURE__ */
|
|
2058
|
+
/* @__PURE__ */ jsx5(
|
|
1878
2059
|
"button",
|
|
1879
2060
|
{
|
|
1880
2061
|
type: "button",
|
|
@@ -1882,7 +2063,7 @@ function Composer({
|
|
|
1882
2063
|
onClick: onSubmit,
|
|
1883
2064
|
disabled: disabled || !canSend || isSubmitting || isOverLimit,
|
|
1884
2065
|
"aria-label": t("widget.aria_send"),
|
|
1885
|
-
children: /* @__PURE__ */
|
|
2066
|
+
children: /* @__PURE__ */ jsx5(SendIcon, {})
|
|
1886
2067
|
}
|
|
1887
2068
|
)
|
|
1888
2069
|
] })
|
|
@@ -1893,7 +2074,7 @@ function Composer({
|
|
|
1893
2074
|
function PreviewThumb({ attachment: a, onRemove }) {
|
|
1894
2075
|
const [hover, setHover] = useState7(false);
|
|
1895
2076
|
const ref = useRef7(null);
|
|
1896
|
-
return /* @__PURE__ */
|
|
2077
|
+
return /* @__PURE__ */ jsxs3(
|
|
1897
2078
|
"div",
|
|
1898
2079
|
{
|
|
1899
2080
|
ref,
|
|
@@ -1901,20 +2082,20 @@ function PreviewThumb({ attachment: a, onRemove }) {
|
|
|
1901
2082
|
onMouseEnter: () => setHover(true),
|
|
1902
2083
|
onMouseLeave: () => setHover(false),
|
|
1903
2084
|
children: [
|
|
1904
|
-
a.previewUrl ? /* @__PURE__ */
|
|
1905
|
-
a.isUploading && /* @__PURE__ */
|
|
1906
|
-
a.error && /* @__PURE__ */
|
|
1907
|
-
onRemove && /* @__PURE__ */
|
|
2085
|
+
a.previewUrl ? /* @__PURE__ */ jsx5("img", { src: a.previewUrl, alt: a.file.name, className: "hw-composer-preview-img" }) : /* @__PURE__ */ jsx5("div", { className: "hw-composer-preview-file", children: /* @__PURE__ */ jsx5("span", { className: "hw-composer-preview-ext", children: a.file.name.split(".").pop()?.toUpperCase() ?? "FILE" }) }),
|
|
2086
|
+
a.isUploading && /* @__PURE__ */ jsx5("div", { className: "hw-composer-preview-loader" }),
|
|
2087
|
+
a.error && /* @__PURE__ */ jsx5("div", { className: "hw-composer-preview-badge", title: a.error, children: "!" }),
|
|
2088
|
+
onRemove && /* @__PURE__ */ jsx5(
|
|
1908
2089
|
"button",
|
|
1909
2090
|
{
|
|
1910
2091
|
type: "button",
|
|
1911
2092
|
className: "hw-composer-preview-remove",
|
|
1912
2093
|
onClick: onRemove,
|
|
1913
2094
|
"aria-label": t("widget.aria_remove"),
|
|
1914
|
-
children: /* @__PURE__ */
|
|
2095
|
+
children: /* @__PURE__ */ jsx5(XIcon, {})
|
|
1915
2096
|
}
|
|
1916
2097
|
),
|
|
1917
|
-
hover && a.previewUrl && !a.isUploading && /* @__PURE__ */
|
|
2098
|
+
hover && a.previewUrl && !a.isUploading && /* @__PURE__ */ jsx5(AnchoredPreview, { src: a.previewUrl, anchorRef: ref })
|
|
1918
2099
|
]
|
|
1919
2100
|
}
|
|
1920
2101
|
);
|
|
@@ -1932,7 +2113,7 @@ function extractFiles(data) {
|
|
|
1932
2113
|
|
|
1933
2114
|
// src/themed/debug-overlay.tsx
|
|
1934
2115
|
import { useEffect as useEffect6, useMemo, useRef as useRef8, useState as useState8 } from "react";
|
|
1935
|
-
import { jsx as
|
|
2116
|
+
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1936
2117
|
var MAX_EVENTS = 60;
|
|
1937
2118
|
function isDebugEnabled() {
|
|
1938
2119
|
if (typeof window === "undefined") return false;
|
|
@@ -2038,10 +2219,10 @@ function WidgetDebugOverlay() {
|
|
|
2038
2219
|
if (!enabled) return null;
|
|
2039
2220
|
const isTyping = activeId ? typingUsers.get(activeId) : false;
|
|
2040
2221
|
const isAi = activeId ? aiProcessingMap.get(activeId) : false;
|
|
2041
|
-
return /* @__PURE__ */
|
|
2042
|
-
/* @__PURE__ */
|
|
2043
|
-
/* @__PURE__ */
|
|
2044
|
-
/* @__PURE__ */
|
|
2222
|
+
return /* @__PURE__ */ jsxs4("div", { style: styles.wrap, children: [
|
|
2223
|
+
/* @__PURE__ */ jsxs4("div", { style: styles.header, children: [
|
|
2224
|
+
/* @__PURE__ */ jsx6("strong", { children: "hw debug" }),
|
|
2225
|
+
/* @__PURE__ */ jsxs4("span", { style: styles.meta, children: [
|
|
2045
2226
|
" ",
|
|
2046
2227
|
"\xB7 conv ",
|
|
2047
2228
|
activeId ? activeId.slice(0, 10) : "\u2014",
|
|
@@ -2052,29 +2233,29 @@ function WidgetDebugOverlay() {
|
|
|
2052
2233
|
" \xB7 ai ",
|
|
2053
2234
|
isAi ? "Y" : "n"
|
|
2054
2235
|
] }),
|
|
2055
|
-
/* @__PURE__ */
|
|
2056
|
-
/* @__PURE__ */
|
|
2236
|
+
/* @__PURE__ */ jsx6("button", { type: "button", style: styles.btn, onClick: () => setOpen((v) => !v), children: open ? "hide" : "show" }),
|
|
2237
|
+
/* @__PURE__ */ jsx6("button", { type: "button", style: styles.btn, onClick: () => {
|
|
2057
2238
|
eventsRef.current = [];
|
|
2058
2239
|
setEvents([]);
|
|
2059
2240
|
}, children: "clear" })
|
|
2060
2241
|
] }),
|
|
2061
|
-
open && /* @__PURE__ */
|
|
2062
|
-
/* @__PURE__ */
|
|
2063
|
-
/* @__PURE__ */
|
|
2064
|
-
activeMessages.length === 0 ? /* @__PURE__ */
|
|
2065
|
-
/* @__PURE__ */
|
|
2066
|
-
/* @__PURE__ */
|
|
2067
|
-
/* @__PURE__ */
|
|
2068
|
-
/* @__PURE__ */
|
|
2242
|
+
open && /* @__PURE__ */ jsxs4("div", { style: styles.body, children: [
|
|
2243
|
+
/* @__PURE__ */ jsxs4("div", { style: styles.section, children: [
|
|
2244
|
+
/* @__PURE__ */ jsx6("div", { style: styles.sectionTitle, children: "messages (active)" }),
|
|
2245
|
+
activeMessages.length === 0 ? /* @__PURE__ */ jsx6("div", { style: styles.empty, children: "empty" }) : activeMessages.map((m, i) => /* @__PURE__ */ jsxs4("div", { style: styles.row, children: [
|
|
2246
|
+
/* @__PURE__ */ jsx6("span", { style: { ...styles.badge, background: colorFor(senderOf(m)) }, children: i }),
|
|
2247
|
+
/* @__PURE__ */ jsx6("span", { style: styles.sender, children: senderOf(m) }),
|
|
2248
|
+
/* @__PURE__ */ jsx6("span", { style: styles.ts, children: m.createdAt.slice(11, 23) }),
|
|
2249
|
+
/* @__PURE__ */ jsx6("span", { style: styles.text, children: (m.text ?? "").slice(0, 60) })
|
|
2069
2250
|
] }, m.id))
|
|
2070
2251
|
] }),
|
|
2071
|
-
/* @__PURE__ */
|
|
2072
|
-
/* @__PURE__ */
|
|
2073
|
-
events.length === 0 ? /* @__PURE__ */
|
|
2074
|
-
/* @__PURE__ */
|
|
2075
|
-
/* @__PURE__ */
|
|
2076
|
-
/* @__PURE__ */
|
|
2077
|
-
e.detail && /* @__PURE__ */
|
|
2252
|
+
/* @__PURE__ */ jsxs4("div", { style: styles.section, children: [
|
|
2253
|
+
/* @__PURE__ */ jsx6("div", { style: styles.sectionTitle, children: "events" }),
|
|
2254
|
+
events.length === 0 ? /* @__PURE__ */ jsx6("div", { style: styles.empty, children: "no events yet \u2014 send a message" }) : events.map((e) => /* @__PURE__ */ jsxs4("div", { style: styles.row, children: [
|
|
2255
|
+
/* @__PURE__ */ jsx6("span", { style: { ...styles.badge, background: kindColor(e.kind) }, children: e.kind }),
|
|
2256
|
+
/* @__PURE__ */ jsx6("span", { style: styles.ts, children: new Date(e.t).toISOString().slice(11, 23) }),
|
|
2257
|
+
/* @__PURE__ */ jsx6("span", { style: styles.evLabel, children: e.label }),
|
|
2258
|
+
e.detail && /* @__PURE__ */ jsx6("span", { style: styles.detail, children: e.detail })
|
|
2078
2259
|
] }, e.id))
|
|
2079
2260
|
] })
|
|
2080
2261
|
] })
|
|
@@ -2316,39 +2497,96 @@ function useContentTab(tabId) {
|
|
|
2316
2497
|
}
|
|
2317
2498
|
|
|
2318
2499
|
// src/themed/content/content-detail-view.tsx
|
|
2319
|
-
import { jsx as
|
|
2500
|
+
import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
2320
2501
|
function ContentDetailView({
|
|
2321
2502
|
entry,
|
|
2322
2503
|
isLoading
|
|
2323
2504
|
}) {
|
|
2324
2505
|
if (isLoading || !entry) {
|
|
2325
|
-
return /* @__PURE__ */
|
|
2326
|
-
/* @__PURE__ */ jsx6("div", { className: "hw-skeleton hw-skeleton-line", style: { width: "60%", height: 18 } }),
|
|
2327
|
-
/* @__PURE__ */ jsx6("div", { className: "hw-skeleton hw-skeleton-line", style: { width: "35%", height: 12 } }),
|
|
2328
|
-
/* @__PURE__ */ jsxs4("div", { style: { marginTop: 8, display: "flex", flexDirection: "column", gap: 8 }, children: [
|
|
2329
|
-
/* @__PURE__ */ jsx6("div", { className: "hw-skeleton hw-skeleton-line", style: { width: "100%", height: 12 } }),
|
|
2330
|
-
/* @__PURE__ */ jsx6("div", { className: "hw-skeleton hw-skeleton-line", style: { width: "95%", height: 12 } }),
|
|
2331
|
-
/* @__PURE__ */ jsx6("div", { className: "hw-skeleton hw-skeleton-line", style: { width: "80%", height: 12 } }),
|
|
2332
|
-
/* @__PURE__ */ jsx6("div", { className: "hw-skeleton hw-skeleton-line", style: { width: "60%", height: 12 } })
|
|
2333
|
-
] })
|
|
2334
|
-
] });
|
|
2506
|
+
return /* @__PURE__ */ jsx7(ArticleSkeleton, {});
|
|
2335
2507
|
}
|
|
2336
2508
|
const badge = entry.customFields.version ?? entry.customFields.priority ?? entry.customFields.type ?? null;
|
|
2337
|
-
return /* @__PURE__ */
|
|
2338
|
-
/* @__PURE__ */
|
|
2339
|
-
/* @__PURE__ */
|
|
2340
|
-
(badge || entry.publishedAt) && /* @__PURE__ */
|
|
2341
|
-
badge && /* @__PURE__ */
|
|
2342
|
-
entry.publishedAt && /* @__PURE__ */
|
|
2509
|
+
return /* @__PURE__ */ jsxs5("div", { className: "hw-content-detail", children: [
|
|
2510
|
+
/* @__PURE__ */ jsxs5("div", { className: "hw-content-detail-header", children: [
|
|
2511
|
+
/* @__PURE__ */ jsx7("h1", { className: "hw-content-detail-title", children: entry.title }),
|
|
2512
|
+
(badge || entry.publishedAt) && /* @__PURE__ */ jsxs5("div", { className: "hw-content-detail-meta", children: [
|
|
2513
|
+
badge && /* @__PURE__ */ jsx7("span", { className: "hw-content-entry-badge", children: badge }),
|
|
2514
|
+
entry.publishedAt && /* @__PURE__ */ jsx7("span", { className: "hw-content-detail-date", children: formatRelativeTime(entry.publishedAt) })
|
|
2515
|
+
] })
|
|
2516
|
+
] }),
|
|
2517
|
+
(entry.body || entry.bodyHtml) && /* @__PURE__ */ jsx7("div", { className: "hw-content-detail-body", children: /* @__PURE__ */ jsx7(MarkdownContent, { bodyHtml: entry.bodyHtml, bodyMarkdown: entry.body }) })
|
|
2518
|
+
] });
|
|
2519
|
+
}
|
|
2520
|
+
function ArticleSkeleton() {
|
|
2521
|
+
const sections = [
|
|
2522
|
+
{
|
|
2523
|
+
headerWidth: "30%",
|
|
2524
|
+
items: [
|
|
2525
|
+
{ l1: "98%", l2: "62%" },
|
|
2526
|
+
{ l1: "94%", l2: "48%" },
|
|
2527
|
+
{ l1: "96%", l2: "70%" }
|
|
2528
|
+
]
|
|
2529
|
+
},
|
|
2530
|
+
{
|
|
2531
|
+
headerWidth: "26%",
|
|
2532
|
+
items: [
|
|
2533
|
+
{ l1: "92%", l2: "55%" },
|
|
2534
|
+
{ l1: "88%", l2: "40%" }
|
|
2535
|
+
]
|
|
2536
|
+
}
|
|
2537
|
+
];
|
|
2538
|
+
return /* @__PURE__ */ jsxs5("div", { className: "hw-content-detail", children: [
|
|
2539
|
+
/* @__PURE__ */ jsxs5("div", { className: "hw-content-detail-header", children: [
|
|
2540
|
+
/* @__PURE__ */ jsx7("h1", { className: "hw-content-detail-title", children: /* @__PURE__ */ jsx7("span", { className: "hw-skeleton hw-skeleton-title" }) }),
|
|
2541
|
+
/* @__PURE__ */ jsxs5("div", { className: "hw-content-detail-meta", children: [
|
|
2542
|
+
/* @__PURE__ */ jsx7("span", { className: "hw-skeleton hw-skeleton-badge" }),
|
|
2543
|
+
/* @__PURE__ */ jsx7("span", { className: "hw-skeleton hw-skeleton-date" })
|
|
2343
2544
|
] })
|
|
2344
2545
|
] }),
|
|
2345
|
-
|
|
2546
|
+
/* @__PURE__ */ jsx7("div", { className: "hw-content-detail-body", children: /* @__PURE__ */ jsx7("div", { className: "hw-markdown", children: sections.map((s, i) => /* @__PURE__ */ jsx7(
|
|
2547
|
+
SkeletonSection,
|
|
2548
|
+
{
|
|
2549
|
+
headerWidth: s.headerWidth,
|
|
2550
|
+
items: s.items
|
|
2551
|
+
},
|
|
2552
|
+
i
|
|
2553
|
+
)) }) })
|
|
2554
|
+
] });
|
|
2555
|
+
}
|
|
2556
|
+
function SkeletonSection({
|
|
2557
|
+
headerWidth,
|
|
2558
|
+
items
|
|
2559
|
+
}) {
|
|
2560
|
+
return /* @__PURE__ */ jsxs5(Fragment2, { children: [
|
|
2561
|
+
/* @__PURE__ */ jsx7("h2", { children: /* @__PURE__ */ jsx7(
|
|
2562
|
+
"span",
|
|
2563
|
+
{
|
|
2564
|
+
className: "hw-skeleton hw-skeleton-h2",
|
|
2565
|
+
style: { display: "block", width: headerWidth }
|
|
2566
|
+
}
|
|
2567
|
+
) }),
|
|
2568
|
+
items.map((item, j) => /* @__PURE__ */ jsx7("ul", { children: /* @__PURE__ */ jsx7("li", { children: /* @__PURE__ */ jsxs5("div", { className: "hw-skeleton-bullet-lines", children: [
|
|
2569
|
+
/* @__PURE__ */ jsx7(
|
|
2570
|
+
"span",
|
|
2571
|
+
{
|
|
2572
|
+
className: "hw-skeleton hw-skeleton-bullet-line",
|
|
2573
|
+
style: { display: "block", width: item.l1 }
|
|
2574
|
+
}
|
|
2575
|
+
),
|
|
2576
|
+
/* @__PURE__ */ jsx7(
|
|
2577
|
+
"span",
|
|
2578
|
+
{
|
|
2579
|
+
className: "hw-skeleton hw-skeleton-bullet-line",
|
|
2580
|
+
style: { display: "block", width: item.l2, marginTop: 8 }
|
|
2581
|
+
}
|
|
2582
|
+
)
|
|
2583
|
+
] }) }) }, j))
|
|
2346
2584
|
] });
|
|
2347
2585
|
}
|
|
2348
2586
|
|
|
2349
2587
|
// src/themed/content/content-list-view.tsx
|
|
2350
2588
|
import { useCallback as useCallback9, useRef as useRef9, useState as useState10 } from "react";
|
|
2351
|
-
import { jsx as
|
|
2589
|
+
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
2352
2590
|
function ContentListView({
|
|
2353
2591
|
entries,
|
|
2354
2592
|
isLoading,
|
|
@@ -2372,13 +2610,13 @@ function ContentListView({
|
|
|
2372
2610
|
},
|
|
2373
2611
|
[onSearch]
|
|
2374
2612
|
);
|
|
2375
|
-
return /* @__PURE__ */
|
|
2376
|
-
onSearch && /* @__PURE__ */
|
|
2377
|
-
/* @__PURE__ */
|
|
2378
|
-
/* @__PURE__ */
|
|
2379
|
-
/* @__PURE__ */
|
|
2613
|
+
return /* @__PURE__ */ jsxs6("div", { className: "hw-content-list", children: [
|
|
2614
|
+
onSearch && /* @__PURE__ */ jsx8("div", { className: "hw-content-search", children: /* @__PURE__ */ jsxs6("div", { className: "hw-content-search-box", children: [
|
|
2615
|
+
/* @__PURE__ */ jsxs6("svg", { className: "hw-content-search-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
2616
|
+
/* @__PURE__ */ jsx8("circle", { cx: "11", cy: "11", r: "8" }),
|
|
2617
|
+
/* @__PURE__ */ jsx8("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })
|
|
2380
2618
|
] }),
|
|
2381
|
-
/* @__PURE__ */
|
|
2619
|
+
/* @__PURE__ */ jsx8(
|
|
2382
2620
|
"input",
|
|
2383
2621
|
{
|
|
2384
2622
|
type: "text",
|
|
@@ -2389,18 +2627,18 @@ function ContentListView({
|
|
|
2389
2627
|
}
|
|
2390
2628
|
)
|
|
2391
2629
|
] }) }),
|
|
2392
|
-
isLoading && entries.length === 0 && /* @__PURE__ */
|
|
2393
|
-
/* @__PURE__ */
|
|
2394
|
-
/* @__PURE__ */
|
|
2395
|
-
/* @__PURE__ */
|
|
2630
|
+
isLoading && entries.length === 0 && /* @__PURE__ */ jsx8("div", { className: "hw-skeleton-content", children: [1, 2, 3].map((i) => /* @__PURE__ */ jsxs6("div", { className: "hw-skeleton-content-item", children: [
|
|
2631
|
+
/* @__PURE__ */ jsx8("div", { className: "hw-skeleton hw-skeleton-line", style: { width: "70%", height: 14 } }),
|
|
2632
|
+
/* @__PURE__ */ jsx8("div", { className: "hw-skeleton hw-skeleton-line", style: { width: "90%", height: 12 } }),
|
|
2633
|
+
/* @__PURE__ */ jsx8("div", { className: "hw-skeleton hw-skeleton-line", style: { width: "40%", height: 10 } })
|
|
2396
2634
|
] }, i)) }),
|
|
2397
|
-
!isLoading && entries.length === 0 && /* @__PURE__ */
|
|
2398
|
-
/* @__PURE__ */
|
|
2399
|
-
/* @__PURE__ */
|
|
2635
|
+
!isLoading && entries.length === 0 && /* @__PURE__ */ jsxs6("div", { className: "hw-content-empty", children: [
|
|
2636
|
+
/* @__PURE__ */ jsx8("div", { className: "hw-content-empty-title", children: searchText ? t("widget.no_results") : t("widget.nothing_yet") }),
|
|
2637
|
+
/* @__PURE__ */ jsx8("div", { className: "hw-content-empty-desc", children: searchText ? t("widget.try_different") : t("widget.check_back") })
|
|
2400
2638
|
] }),
|
|
2401
|
-
entries.length > 0 && /* @__PURE__ */
|
|
2402
|
-
entries.map((entry) => /* @__PURE__ */
|
|
2403
|
-
hasMore && /* @__PURE__ */
|
|
2639
|
+
entries.length > 0 && /* @__PURE__ */ jsxs6("div", { className: "hw-content-entries", children: [
|
|
2640
|
+
entries.map((entry) => /* @__PURE__ */ jsx8(ContentEntryCard, { entry, onSelect, display }, entry.slug)),
|
|
2641
|
+
hasMore && /* @__PURE__ */ jsx8(
|
|
2404
2642
|
"button",
|
|
2405
2643
|
{
|
|
2406
2644
|
type: "button",
|
|
@@ -2427,16 +2665,16 @@ function ContentEntryCard({
|
|
|
2427
2665
|
const badge = display?.badgeField ? customFields[display.badgeField] ?? null : customFields.version ?? customFields.priority ?? customFields.type ?? null;
|
|
2428
2666
|
const subtitleValue = display?.subtitleField ? (display.subtitleField === "body" ? entry.body : customFields[display.subtitleField]) ?? null : customFields.excerpt ?? customFields.summary ?? customFields.description ?? null;
|
|
2429
2667
|
const preview = subtitleValue ? truncateText(subtitleValue) : truncateText(entry.body);
|
|
2430
|
-
return /* @__PURE__ */
|
|
2431
|
-
/* @__PURE__ */
|
|
2432
|
-
/* @__PURE__ */
|
|
2433
|
-
preview && /* @__PURE__ */
|
|
2434
|
-
(badge || entry.publishedAt) && /* @__PURE__ */
|
|
2435
|
-
badge && /* @__PURE__ */
|
|
2436
|
-
entry.publishedAt && /* @__PURE__ */
|
|
2668
|
+
return /* @__PURE__ */ jsx8("button", { type: "button", className: "hw-content-entry", onClick: () => onSelect(entry.slug), children: /* @__PURE__ */ jsxs6("div", { className: "hw-content-entry-main", children: [
|
|
2669
|
+
/* @__PURE__ */ jsxs6("div", { className: "hw-content-entry-text", children: [
|
|
2670
|
+
/* @__PURE__ */ jsx8("span", { className: "hw-content-entry-title", children: entry.title }),
|
|
2671
|
+
preview && /* @__PURE__ */ jsx8("span", { className: "hw-content-entry-desc", children: preview }),
|
|
2672
|
+
(badge || entry.publishedAt) && /* @__PURE__ */ jsxs6("div", { className: "hw-content-entry-meta", children: [
|
|
2673
|
+
badge && /* @__PURE__ */ jsx8("span", { className: "hw-content-entry-badge", children: badge }),
|
|
2674
|
+
entry.publishedAt && /* @__PURE__ */ jsx8("span", { className: "hw-content-entry-date", children: formatRelativeTime(entry.publishedAt) })
|
|
2437
2675
|
] })
|
|
2438
2676
|
] }),
|
|
2439
|
-
/* @__PURE__ */
|
|
2677
|
+
/* @__PURE__ */ jsx8("svg", { className: "hw-content-entry-chevron", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx8("polyline", { points: "9 18 15 12 9 6" }) })
|
|
2440
2678
|
] }) });
|
|
2441
2679
|
}
|
|
2442
2680
|
|
|
@@ -2660,7 +2898,7 @@ function useGroupedContentTab(tabId) {
|
|
|
2660
2898
|
}
|
|
2661
2899
|
|
|
2662
2900
|
// src/themed/content/grouped-content-tab-view.tsx
|
|
2663
|
-
import { jsx as
|
|
2901
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
2664
2902
|
function GroupedContentTabView({
|
|
2665
2903
|
tab,
|
|
2666
2904
|
subView,
|
|
@@ -2701,10 +2939,10 @@ function GroupedContentTabView({
|
|
|
2701
2939
|
prevSubView.current = subView;
|
|
2702
2940
|
}, [subView, clearCategory]);
|
|
2703
2941
|
if (subView === "content-detail" && detailSlug) {
|
|
2704
|
-
return /* @__PURE__ */
|
|
2942
|
+
return /* @__PURE__ */ jsx9(ContentDetailView, { entry: detail, isLoading: isLoadingDetail });
|
|
2705
2943
|
}
|
|
2706
2944
|
if (subView === "content-category" && activeCategory) {
|
|
2707
|
-
return /* @__PURE__ */
|
|
2945
|
+
return /* @__PURE__ */ jsx9(
|
|
2708
2946
|
ContentListView,
|
|
2709
2947
|
{
|
|
2710
2948
|
entries: items,
|
|
@@ -2718,7 +2956,7 @@ function GroupedContentTabView({
|
|
|
2718
2956
|
}
|
|
2719
2957
|
);
|
|
2720
2958
|
}
|
|
2721
|
-
return /* @__PURE__ */
|
|
2959
|
+
return /* @__PURE__ */ jsx9(
|
|
2722
2960
|
ContentListView,
|
|
2723
2961
|
{
|
|
2724
2962
|
entries: categories,
|
|
@@ -2740,7 +2978,7 @@ function GroupedContentTabView({
|
|
|
2740
2978
|
}
|
|
2741
2979
|
|
|
2742
2980
|
// src/themed/content/content-tab-view.tsx
|
|
2743
|
-
import { jsx as
|
|
2981
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
2744
2982
|
function ContentTabView({
|
|
2745
2983
|
tab,
|
|
2746
2984
|
showDetail,
|
|
@@ -2750,7 +2988,7 @@ function ContentTabView({
|
|
|
2750
2988
|
onSelectCategory
|
|
2751
2989
|
}) {
|
|
2752
2990
|
if (tab.tabType === "grouped" && tab.itemsModelSlug) {
|
|
2753
|
-
return /* @__PURE__ */
|
|
2991
|
+
return /* @__PURE__ */ jsx10(
|
|
2754
2992
|
GroupedContentTabView,
|
|
2755
2993
|
{
|
|
2756
2994
|
tab,
|
|
@@ -2762,7 +3000,7 @@ function ContentTabView({
|
|
|
2762
3000
|
}
|
|
2763
3001
|
);
|
|
2764
3002
|
}
|
|
2765
|
-
return /* @__PURE__ */
|
|
3003
|
+
return /* @__PURE__ */ jsx10(
|
|
2766
3004
|
FlatContentTabView,
|
|
2767
3005
|
{
|
|
2768
3006
|
tab,
|
|
@@ -2798,9 +3036,9 @@ function FlatContentTabView({
|
|
|
2798
3036
|
[fetchEntries]
|
|
2799
3037
|
);
|
|
2800
3038
|
if (showDetail && detailSlug) {
|
|
2801
|
-
return /* @__PURE__ */
|
|
3039
|
+
return /* @__PURE__ */ jsx10(ContentDetailView, { entry: detail, isLoading: isLoadingDetail });
|
|
2802
3040
|
}
|
|
2803
|
-
return /* @__PURE__ */
|
|
3041
|
+
return /* @__PURE__ */ jsx10(
|
|
2804
3042
|
ContentListView,
|
|
2805
3043
|
{
|
|
2806
3044
|
entries,
|
|
@@ -2816,23 +3054,23 @@ function FlatContentTabView({
|
|
|
2816
3054
|
}
|
|
2817
3055
|
|
|
2818
3056
|
// src/themed/content/tab-icon.tsx
|
|
2819
|
-
import { jsx as
|
|
3057
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
2820
3058
|
var ICON_MAP = {
|
|
2821
|
-
book:
|
|
2822
|
-
megaphone:
|
|
2823
|
-
lightbulb:
|
|
2824
|
-
"help-circle":
|
|
2825
|
-
newspaper:
|
|
2826
|
-
star:
|
|
3059
|
+
book: BookIcon,
|
|
3060
|
+
megaphone: MegaphoneIcon,
|
|
3061
|
+
lightbulb: LightbulbIcon,
|
|
3062
|
+
"help-circle": HelpCircleIcon,
|
|
3063
|
+
newspaper: NewspaperIcon,
|
|
3064
|
+
star: StarIcon
|
|
2827
3065
|
};
|
|
2828
3066
|
function ContentTabIconComponent({ icon }) {
|
|
2829
|
-
const Icon = ICON_MAP[icon] ??
|
|
2830
|
-
return /* @__PURE__ */
|
|
3067
|
+
const Icon = ICON_MAP[icon] ?? BookIcon;
|
|
3068
|
+
return /* @__PURE__ */ jsx11(Icon, {});
|
|
2831
3069
|
}
|
|
2832
3070
|
|
|
2833
3071
|
// src/themed/message-list.tsx
|
|
2834
3072
|
import React, { useEffect as useEffect10, useRef as useRef12 } from "react";
|
|
2835
|
-
import { jsx as
|
|
3073
|
+
import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2836
3074
|
function parseParts(raw) {
|
|
2837
3075
|
if (!raw) return null;
|
|
2838
3076
|
if (Array.isArray(raw)) return raw;
|
|
@@ -2902,16 +3140,16 @@ function MessageList({
|
|
|
2902
3140
|
return () => observer.disconnect();
|
|
2903
3141
|
}, [hasMore, onLoadMore, isLoadingMore]);
|
|
2904
3142
|
if (items.length === 0) {
|
|
2905
|
-
return /* @__PURE__ */
|
|
3143
|
+
return /* @__PURE__ */ jsx12(
|
|
2906
3144
|
"div",
|
|
2907
3145
|
{
|
|
2908
3146
|
className: "hw-messages",
|
|
2909
3147
|
role: "log",
|
|
2910
3148
|
"aria-label": t("widget.aria_messages"),
|
|
2911
3149
|
"aria-live": "polite",
|
|
2912
|
-
children: /* @__PURE__ */
|
|
2913
|
-
/* @__PURE__ */
|
|
2914
|
-
/* @__PURE__ */
|
|
3150
|
+
children: /* @__PURE__ */ jsxs7("div", { className: "hw-empty", children: [
|
|
3151
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-empty-icon", children: /* @__PURE__ */ jsx12("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ jsx12("path", { d: "M7.9 20A9 9 0 1 0 4 16.1L2 22Z" }) }) }),
|
|
3152
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-empty-text", children: t("widget.start_a_conversation") })
|
|
2915
3153
|
] })
|
|
2916
3154
|
}
|
|
2917
3155
|
);
|
|
@@ -2921,7 +3159,7 @@ function MessageList({
|
|
|
2921
3159
|
const yesterday = /* @__PURE__ */ new Date();
|
|
2922
3160
|
yesterday.setDate(yesterday.getDate() - 1);
|
|
2923
3161
|
const yesterdayKey = yesterday.toLocaleDateString("en-CA");
|
|
2924
|
-
return /* @__PURE__ */
|
|
3162
|
+
return /* @__PURE__ */ jsxs7(
|
|
2925
3163
|
"div",
|
|
2926
3164
|
{
|
|
2927
3165
|
ref: containerRef,
|
|
@@ -2930,14 +3168,14 @@ function MessageList({
|
|
|
2930
3168
|
"aria-label": t("widget.aria_messages"),
|
|
2931
3169
|
"aria-live": "polite",
|
|
2932
3170
|
children: [
|
|
2933
|
-
/* @__PURE__ */
|
|
2934
|
-
/* @__PURE__ */
|
|
2935
|
-
/* @__PURE__ */
|
|
2936
|
-
/* @__PURE__ */
|
|
3171
|
+
/* @__PURE__ */ jsx12("div", { ref: topRef, className: "hw-load-more-trigger", children: isLoadingMore && /* @__PURE__ */ jsxs7("div", { className: "hw-load-more-spinner", children: [
|
|
3172
|
+
/* @__PURE__ */ jsx12("div", {}),
|
|
3173
|
+
/* @__PURE__ */ jsx12("div", {}),
|
|
3174
|
+
/* @__PURE__ */ jsx12("div", {})
|
|
2937
3175
|
] }) }),
|
|
2938
3176
|
items.map((item) => {
|
|
2939
3177
|
if (item.type === "event") {
|
|
2940
|
-
return /* @__PURE__ */
|
|
3178
|
+
return /* @__PURE__ */ jsx12(EventCard, { text: item.text ?? "" }, item._stableKey ?? item.id);
|
|
2941
3179
|
}
|
|
2942
3180
|
const itemDate = new Date(item.createdAt);
|
|
2943
3181
|
const dateKey = itemDate.toLocaleDateString("en-CA");
|
|
@@ -2950,39 +3188,38 @@ function MessageList({
|
|
|
2950
3188
|
day: "numeric"
|
|
2951
3189
|
});
|
|
2952
3190
|
const sender = item.visitorId ? "visitor" : item.aiAgentId ? "ai" : "team";
|
|
2953
|
-
return /* @__PURE__ */
|
|
2954
|
-
showDateSep && /* @__PURE__ */
|
|
2955
|
-
/* @__PURE__ */
|
|
2956
|
-
/* @__PURE__ */
|
|
2957
|
-
/* @__PURE__ */
|
|
3191
|
+
return /* @__PURE__ */ jsxs7(React.Fragment, { children: [
|
|
3192
|
+
showDateSep && /* @__PURE__ */ jsxs7("div", { className: "hw-date-sep", children: [
|
|
3193
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-date-sep-line" }),
|
|
3194
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-date-sep-text", children: dateLabel }),
|
|
3195
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-date-sep-line" })
|
|
2958
3196
|
] }),
|
|
2959
|
-
/* @__PURE__ */
|
|
3197
|
+
/* @__PURE__ */ jsx12(
|
|
2960
3198
|
MessageBubble,
|
|
2961
3199
|
{
|
|
2962
3200
|
text: item.text ?? "",
|
|
2963
3201
|
sender,
|
|
2964
3202
|
senderName: sender === "visitor" ? visitorName : item.userName ?? void 0,
|
|
2965
|
-
time: item.createdAt,
|
|
2966
3203
|
parts: parseParts(item.parts)
|
|
2967
3204
|
}
|
|
2968
3205
|
)
|
|
2969
3206
|
] }, item._stableKey ?? item.id);
|
|
2970
3207
|
}),
|
|
2971
3208
|
renderAfterMessages,
|
|
2972
|
-
isAiProcessing && /* @__PURE__ */
|
|
2973
|
-
/* @__PURE__ */
|
|
2974
|
-
/* @__PURE__ */
|
|
2975
|
-
/* @__PURE__ */
|
|
2976
|
-
/* @__PURE__ */
|
|
2977
|
-
/* @__PURE__ */
|
|
3209
|
+
isAiProcessing && /* @__PURE__ */ jsxs7("div", { className: "hw-typing", children: [
|
|
3210
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-typing-label", children: agentName }),
|
|
3211
|
+
/* @__PURE__ */ jsxs7("div", { className: "hw-typing-dots", children: [
|
|
3212
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-typing-dot" }),
|
|
3213
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-typing-dot" }),
|
|
3214
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-typing-dot" })
|
|
2978
3215
|
] })
|
|
2979
3216
|
] }),
|
|
2980
|
-
isTyping && !isAiProcessing && /* @__PURE__ */
|
|
2981
|
-
/* @__PURE__ */
|
|
2982
|
-
/* @__PURE__ */
|
|
2983
|
-
/* @__PURE__ */
|
|
3217
|
+
isTyping && !isAiProcessing && /* @__PURE__ */ jsx12("div", { className: "hw-typing", children: /* @__PURE__ */ jsxs7("div", { className: "hw-typing-dots", children: [
|
|
3218
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-typing-dot" }),
|
|
3219
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-typing-dot" }),
|
|
3220
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-typing-dot" })
|
|
2984
3221
|
] }) }),
|
|
2985
|
-
/* @__PURE__ */
|
|
3222
|
+
/* @__PURE__ */ jsx12("div", { ref: bottomRef })
|
|
2986
3223
|
]
|
|
2987
3224
|
}
|
|
2988
3225
|
);
|
|
@@ -3000,20 +3237,20 @@ function EventCard({ text }) {
|
|
|
3000
3237
|
const data = parseEventData(text);
|
|
3001
3238
|
if (data) {
|
|
3002
3239
|
const message = data.action === "joined" ? t("widget.joined") : t("widget.left");
|
|
3003
|
-
return /* @__PURE__ */
|
|
3004
|
-
/* @__PURE__ */
|
|
3005
|
-
/* @__PURE__ */
|
|
3006
|
-
/* @__PURE__ */
|
|
3240
|
+
return /* @__PURE__ */ jsxs7("div", { className: "hw-event hw-event--card", children: [
|
|
3241
|
+
/* @__PURE__ */ jsx12("div", { className: "hw-event-avatar", children: data.image ? /* @__PURE__ */ jsx12("img", { src: data.image, alt: "", className: "hw-event-avatar-img" }) : /* @__PURE__ */ jsx12("span", { children: getInitials(data.name) }) }),
|
|
3242
|
+
/* @__PURE__ */ jsxs7("div", { className: "hw-event-body", children: [
|
|
3243
|
+
/* @__PURE__ */ jsx12("span", { className: "hw-event-name", children: data.name }),
|
|
3007
3244
|
" ",
|
|
3008
|
-
/* @__PURE__ */
|
|
3245
|
+
/* @__PURE__ */ jsx12("span", { className: "hw-event-action", children: message })
|
|
3009
3246
|
] })
|
|
3010
3247
|
] });
|
|
3011
3248
|
}
|
|
3012
|
-
return /* @__PURE__ */
|
|
3249
|
+
return /* @__PURE__ */ jsx12("div", { className: "hw-event", children: /* @__PURE__ */ jsx12("div", { className: "hw-event-text", children: text }) });
|
|
3013
3250
|
}
|
|
3014
3251
|
|
|
3015
3252
|
// src/themed/default-widget.tsx
|
|
3016
|
-
import { Fragment as
|
|
3253
|
+
import { Fragment as Fragment3, jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
3017
3254
|
function resolveLabel2(label) {
|
|
3018
3255
|
if (!label.startsWith("widget.")) return label;
|
|
3019
3256
|
const resolved = t(label);
|
|
@@ -3025,7 +3262,7 @@ var EMPTY_CONTENT_TABS = [];
|
|
|
3025
3262
|
var DEFAULT_EN_WELCOME = "Hi there \u{1F44B}\nHow can we help?";
|
|
3026
3263
|
var DEFAULT_EN_SUBTITLE = "Usually replies in minutes";
|
|
3027
3264
|
function HelpwayMark({ className }) {
|
|
3028
|
-
return /* @__PURE__ */
|
|
3265
|
+
return /* @__PURE__ */ jsx13(
|
|
3029
3266
|
"svg",
|
|
3030
3267
|
{
|
|
3031
3268
|
className,
|
|
@@ -3035,7 +3272,7 @@ function HelpwayMark({ className }) {
|
|
|
3035
3272
|
fill: "none",
|
|
3036
3273
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3037
3274
|
"aria-hidden": "true",
|
|
3038
|
-
children: /* @__PURE__ */
|
|
3275
|
+
children: /* @__PURE__ */ jsx13(
|
|
3039
3276
|
"path",
|
|
3040
3277
|
{
|
|
3041
3278
|
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",
|
|
@@ -3049,11 +3286,11 @@ function WidgetLogo({ className }) {
|
|
|
3049
3286
|
const agentConfig = useWidgetStore((s) => s.agentConfig);
|
|
3050
3287
|
const logoUrl = useWidgetStore((s) => s.website?.logoUrl);
|
|
3051
3288
|
if (agentConfig?.avatarUrl) {
|
|
3052
|
-
return /* @__PURE__ */
|
|
3289
|
+
return /* @__PURE__ */ jsx13("img", { src: agentConfig.avatarUrl, alt: "", className: `hw-agent-img ${className ?? ""}` });
|
|
3053
3290
|
}
|
|
3054
3291
|
if (agentConfig?.avatarPreset) {
|
|
3055
3292
|
const color = agentConfig.brandColor ?? "#0a0a0a";
|
|
3056
|
-
return /* @__PURE__ */
|
|
3293
|
+
return /* @__PURE__ */ jsx13(
|
|
3057
3294
|
"div",
|
|
3058
3295
|
{
|
|
3059
3296
|
className: `hw-agent-icon ${className ?? ""}`,
|
|
@@ -3064,14 +3301,14 @@ function WidgetLogo({ className }) {
|
|
|
3064
3301
|
justifyContent: "center",
|
|
3065
3302
|
borderRadius: 8
|
|
3066
3303
|
},
|
|
3067
|
-
children: /* @__PURE__ */
|
|
3304
|
+
children: /* @__PURE__ */ jsx13(AgentPresetIcon, { presetId: agentConfig.avatarPreset })
|
|
3068
3305
|
}
|
|
3069
3306
|
);
|
|
3070
3307
|
}
|
|
3071
3308
|
if (logoUrl) {
|
|
3072
|
-
return /* @__PURE__ */
|
|
3309
|
+
return /* @__PURE__ */ jsx13("img", { src: logoUrl, alt: "", className: `hw-agent-img ${className ?? ""}` });
|
|
3073
3310
|
}
|
|
3074
|
-
return /* @__PURE__ */
|
|
3311
|
+
return /* @__PURE__ */ jsx13(HelpwayMark, { className });
|
|
3075
3312
|
}
|
|
3076
3313
|
var PRESET_SVG = {
|
|
3077
3314
|
// Helpway brand mark — octagonal chamfer with stylized "W" inside.
|
|
@@ -3130,7 +3367,7 @@ function AgentPresetIcon({ presetId }) {
|
|
|
3130
3367
|
const svgContent = PRESET_SVG[presetId] ?? PRESET_SVG.sparkle;
|
|
3131
3368
|
return (
|
|
3132
3369
|
// biome-ignore lint: trusted static SVG content from our icon library
|
|
3133
|
-
/* @__PURE__ */
|
|
3370
|
+
/* @__PURE__ */ jsx13(
|
|
3134
3371
|
"svg",
|
|
3135
3372
|
{
|
|
3136
3373
|
viewBox: "0 0 24 24",
|
|
@@ -3394,7 +3631,7 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3394
3631
|
const widgetPosition = agentConfig?.widgetPosition ?? "bottom-right";
|
|
3395
3632
|
const launcherStyle = agentConfig?.launcherStyle ?? "icon";
|
|
3396
3633
|
const bubbleStyle = agentConfig?.bubbleStyle ?? "rounded";
|
|
3397
|
-
return /* @__PURE__ */
|
|
3634
|
+
return /* @__PURE__ */ jsxs8(
|
|
3398
3635
|
"div",
|
|
3399
3636
|
{
|
|
3400
3637
|
className: "hw-widget",
|
|
@@ -3406,20 +3643,20 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3406
3643
|
"--hw-window-left": widgetPosition === "bottom-left" ? "0" : "auto"
|
|
3407
3644
|
},
|
|
3408
3645
|
children: [
|
|
3409
|
-
isOpen && !isReady && !hasBootstrapError && /* @__PURE__ */
|
|
3410
|
-
/* @__PURE__ */
|
|
3411
|
-
/* @__PURE__ */
|
|
3412
|
-
/* @__PURE__ */
|
|
3646
|
+
isOpen && !isReady && !hasBootstrapError && /* @__PURE__ */ jsx13("div", { className: `hw-window ${isClosing ? "hw-window--closing" : ""}`, children: /* @__PURE__ */ jsxs8("div", { className: "hw-skeleton-loading", children: [
|
|
3647
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 120 } }),
|
|
3648
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 200 } }),
|
|
3649
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 160 } })
|
|
3413
3650
|
] }) }),
|
|
3414
|
-
isOpen && hasBootstrapError && /* @__PURE__ */
|
|
3415
|
-
/* @__PURE__ */
|
|
3416
|
-
/* @__PURE__ */
|
|
3651
|
+
isOpen && hasBootstrapError && /* @__PURE__ */ jsx13("div", { className: `hw-window ${isClosing ? "hw-window--closing" : ""}`, children: /* @__PURE__ */ jsxs8("div", { className: "hw-bootstrap-error", children: [
|
|
3652
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-bootstrap-error-text", children: t("widget.error_desc") }),
|
|
3653
|
+
/* @__PURE__ */ jsx13("button", { type: "button", className: "hw-bootstrap-error-retry", onClick: retryBootstrap, children: t("widget.retry") })
|
|
3417
3654
|
] }) }),
|
|
3418
|
-
isOpen && isReady && /* @__PURE__ */
|
|
3655
|
+
isOpen && isReady && /* @__PURE__ */ jsxs8(
|
|
3419
3656
|
"div",
|
|
3420
3657
|
{
|
|
3421
3658
|
ref: windowRef,
|
|
3422
|
-
className: `hw-window ${isClosing ? "hw-window--closing" : ""}`,
|
|
3659
|
+
className: `hw-window ${isClosing ? "hw-window--closing" : ""} ${subView === "content-detail" ? "hw-window--reading" : ""}`,
|
|
3423
3660
|
role: "dialog",
|
|
3424
3661
|
"aria-label": t("widget.aria_chat"),
|
|
3425
3662
|
"aria-modal": "true",
|
|
@@ -3427,24 +3664,24 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3427
3664
|
onTouchMove: handleTouchMove,
|
|
3428
3665
|
onTouchEnd: handleTouchEnd,
|
|
3429
3666
|
children: [
|
|
3430
|
-
/* @__PURE__ */
|
|
3431
|
-
wsDisconnected && /* @__PURE__ */
|
|
3432
|
-
/* @__PURE__ */
|
|
3667
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-drag-handle", children: /* @__PURE__ */ jsx13("div", { className: "hw-drag-handle-pill" }) }),
|
|
3668
|
+
wsDisconnected && /* @__PURE__ */ jsxs8("div", { className: "hw-disconnect", children: [
|
|
3669
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-disconnect-dot" }),
|
|
3433
3670
|
t("widget.reconnecting")
|
|
3434
3671
|
] }),
|
|
3435
3672
|
(subView === "content-detail" || subView === "content-category") && (() => {
|
|
3436
3673
|
const tabId = activeTab.replace("content:", "");
|
|
3437
3674
|
const contentTab = contentTabs.find((t2) => t2.id === tabId);
|
|
3438
3675
|
const headerTitle = subView === "content-category" && contentCategoryName ? contentCategoryName : contentTab?.label ? resolveLabel2(contentTab.label) : t("widget.content");
|
|
3439
|
-
return /* @__PURE__ */
|
|
3440
|
-
/* @__PURE__ */
|
|
3676
|
+
return /* @__PURE__ */ jsxs8("div", { className: "hw-header hw-header--centered", children: [
|
|
3677
|
+
/* @__PURE__ */ jsx13(
|
|
3441
3678
|
"button",
|
|
3442
3679
|
{
|
|
3443
3680
|
type: "button",
|
|
3444
3681
|
className: "hw-header-back",
|
|
3445
3682
|
onClick: goBack,
|
|
3446
3683
|
"aria-label": t("widget.aria_back"),
|
|
3447
|
-
children: /* @__PURE__ */
|
|
3684
|
+
children: /* @__PURE__ */ jsx13(
|
|
3448
3685
|
"svg",
|
|
3449
3686
|
{
|
|
3450
3687
|
viewBox: "0 0 24 24",
|
|
@@ -3453,33 +3690,33 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3453
3690
|
strokeWidth: 2,
|
|
3454
3691
|
strokeLinecap: "round",
|
|
3455
3692
|
strokeLinejoin: "round",
|
|
3456
|
-
children: /* @__PURE__ */
|
|
3693
|
+
children: /* @__PURE__ */ jsx13("path", { d: "M15 18l-6-6 6-6" })
|
|
3457
3694
|
}
|
|
3458
3695
|
)
|
|
3459
3696
|
}
|
|
3460
3697
|
),
|
|
3461
|
-
/* @__PURE__ */
|
|
3462
|
-
/* @__PURE__ */
|
|
3698
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-header-title", children: headerTitle }),
|
|
3699
|
+
/* @__PURE__ */ jsx13(
|
|
3463
3700
|
"button",
|
|
3464
3701
|
{
|
|
3465
3702
|
type: "button",
|
|
3466
3703
|
className: "hw-header-close",
|
|
3467
3704
|
onClick: handleClose,
|
|
3468
3705
|
"aria-label": t("widget.aria_close"),
|
|
3469
|
-
children: /* @__PURE__ */
|
|
3706
|
+
children: /* @__PURE__ */ jsx13(XIcon, { size: 20 })
|
|
3470
3707
|
}
|
|
3471
3708
|
)
|
|
3472
3709
|
] });
|
|
3473
3710
|
})(),
|
|
3474
|
-
subView !== null && subView !== "content-detail" && subView !== "content-category" && /* @__PURE__ */
|
|
3475
|
-
/* @__PURE__ */
|
|
3711
|
+
subView !== null && subView !== "content-detail" && subView !== "content-category" && /* @__PURE__ */ jsxs8("div", { className: "hw-header hw-header--sub", children: [
|
|
3712
|
+
/* @__PURE__ */ jsx13(
|
|
3476
3713
|
"button",
|
|
3477
3714
|
{
|
|
3478
3715
|
type: "button",
|
|
3479
3716
|
className: "hw-header-back",
|
|
3480
3717
|
onClick: goBack,
|
|
3481
3718
|
"aria-label": t("widget.aria_back"),
|
|
3482
|
-
children: /* @__PURE__ */
|
|
3719
|
+
children: /* @__PURE__ */ jsx13(
|
|
3483
3720
|
"svg",
|
|
3484
3721
|
{
|
|
3485
3722
|
viewBox: "0 0 24 24",
|
|
@@ -3488,66 +3725,66 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3488
3725
|
strokeWidth: 2,
|
|
3489
3726
|
strokeLinecap: "round",
|
|
3490
3727
|
strokeLinejoin: "round",
|
|
3491
|
-
children: /* @__PURE__ */
|
|
3728
|
+
children: /* @__PURE__ */ jsx13("path", { d: "M15 18l-6-6 6-6" })
|
|
3492
3729
|
}
|
|
3493
3730
|
)
|
|
3494
3731
|
}
|
|
3495
3732
|
),
|
|
3496
|
-
/* @__PURE__ */
|
|
3497
|
-
/* @__PURE__ */
|
|
3498
|
-
/* @__PURE__ */
|
|
3499
|
-
/* @__PURE__ */
|
|
3500
|
-
/* @__PURE__ */
|
|
3733
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-header-identity", children: [
|
|
3734
|
+
/* @__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, {}) }),
|
|
3735
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-header-info", children: [
|
|
3736
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-header-name", children: headerName }),
|
|
3737
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-header-status", children: subtitleText })
|
|
3501
3738
|
] })
|
|
3502
3739
|
] }),
|
|
3503
|
-
/* @__PURE__ */
|
|
3740
|
+
/* @__PURE__ */ jsx13(
|
|
3504
3741
|
"button",
|
|
3505
3742
|
{
|
|
3506
3743
|
type: "button",
|
|
3507
3744
|
className: "hw-header-close",
|
|
3508
3745
|
onClick: handleClose,
|
|
3509
3746
|
"aria-label": t("widget.aria_close"),
|
|
3510
|
-
children: /* @__PURE__ */
|
|
3747
|
+
children: /* @__PURE__ */ jsx13(XIcon, { size: 20 })
|
|
3511
3748
|
}
|
|
3512
3749
|
)
|
|
3513
3750
|
] }),
|
|
3514
|
-
subView === null && activeTab === "home" && /* @__PURE__ */
|
|
3515
|
-
/* @__PURE__ */
|
|
3516
|
-
/* @__PURE__ */
|
|
3517
|
-
/* @__PURE__ */
|
|
3518
|
-
/* @__PURE__ */
|
|
3751
|
+
subView === null && activeTab === "home" && /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
3752
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-hero", children: [
|
|
3753
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-hero-top", children: [
|
|
3754
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-hero-bot-icon", children: /* @__PURE__ */ jsx13(WidgetLogo, {}) }),
|
|
3755
|
+
/* @__PURE__ */ jsx13(
|
|
3519
3756
|
"button",
|
|
3520
3757
|
{
|
|
3521
3758
|
type: "button",
|
|
3522
3759
|
className: "hw-hero-close",
|
|
3523
3760
|
onClick: handleClose,
|
|
3524
3761
|
"aria-label": t("widget.aria_close"),
|
|
3525
|
-
children: /* @__PURE__ */
|
|
3762
|
+
children: /* @__PURE__ */ jsx13(XIcon, { size: 20 })
|
|
3526
3763
|
}
|
|
3527
3764
|
)
|
|
3528
3765
|
] }),
|
|
3529
|
-
/* @__PURE__ */
|
|
3766
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-hero-greeting", children: welcomeMessage.split("\n").map((line, i) => /* @__PURE__ */ jsxs8(
|
|
3530
3767
|
"span",
|
|
3531
3768
|
{
|
|
3532
3769
|
className: i === 0 ? "hw-hero-greeting-name" : "hw-hero-greeting-question",
|
|
3533
3770
|
children: [
|
|
3534
|
-
i > 0 && /* @__PURE__ */
|
|
3771
|
+
i > 0 && /* @__PURE__ */ jsx13("br", {}),
|
|
3535
3772
|
line
|
|
3536
3773
|
]
|
|
3537
3774
|
},
|
|
3538
3775
|
i
|
|
3539
3776
|
)) }),
|
|
3540
|
-
/* @__PURE__ */
|
|
3777
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-hero-subtitle", children: subtitleText })
|
|
3541
3778
|
] }),
|
|
3542
|
-
/* @__PURE__ */
|
|
3543
|
-
/* @__PURE__ */
|
|
3544
|
-
/* @__PURE__ */
|
|
3545
|
-
/* @__PURE__ */
|
|
3546
|
-
/* @__PURE__ */
|
|
3779
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-sheet", children: /* @__PURE__ */ jsxs8("div", { className: "hw-sheet-inner", children: [
|
|
3780
|
+
/* @__PURE__ */ jsxs8("button", { type: "button", className: "hw-card", onClick: openNewConversation, children: [
|
|
3781
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-card-body", children: [
|
|
3782
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-card-title", children: t("widget.send_us_message") }),
|
|
3783
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-card-meta", children: t("widget.reply_time") })
|
|
3547
3784
|
] }),
|
|
3548
|
-
/* @__PURE__ */
|
|
3785
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-card-arrow", children: /* @__PURE__ */ jsx13(SendIcon, {}) })
|
|
3549
3786
|
] }),
|
|
3550
|
-
/* @__PURE__ */
|
|
3787
|
+
/* @__PURE__ */ jsx13(
|
|
3551
3788
|
HomeView,
|
|
3552
3789
|
{
|
|
3553
3790
|
conversations,
|
|
@@ -3557,17 +3794,17 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3557
3794
|
)
|
|
3558
3795
|
] }) })
|
|
3559
3796
|
] }),
|
|
3560
|
-
subView === null && activeTab === "messages" && /* @__PURE__ */
|
|
3561
|
-
/* @__PURE__ */
|
|
3562
|
-
/* @__PURE__ */
|
|
3563
|
-
/* @__PURE__ */
|
|
3797
|
+
subView === null && activeTab === "messages" && /* @__PURE__ */ jsxs8("div", { className: "hw-header hw-header--centered", children: [
|
|
3798
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-header-spacer" }),
|
|
3799
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-header-title", children: t("widget.messages") }),
|
|
3800
|
+
/* @__PURE__ */ jsx13(
|
|
3564
3801
|
"button",
|
|
3565
3802
|
{
|
|
3566
3803
|
type: "button",
|
|
3567
3804
|
className: "hw-header-close",
|
|
3568
3805
|
onClick: handleClose,
|
|
3569
3806
|
"aria-label": t("widget.aria_close"),
|
|
3570
|
-
children: /* @__PURE__ */
|
|
3807
|
+
children: /* @__PURE__ */ jsx13(XIcon, { size: 20 })
|
|
3571
3808
|
}
|
|
3572
3809
|
)
|
|
3573
3810
|
] }),
|
|
@@ -3575,23 +3812,23 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3575
3812
|
const tabId = activeTab.replace("content:", "");
|
|
3576
3813
|
const contentTab = contentTabs.find((t2) => t2.id === tabId);
|
|
3577
3814
|
if (!contentTab) return null;
|
|
3578
|
-
return /* @__PURE__ */
|
|
3579
|
-
/* @__PURE__ */
|
|
3580
|
-
/* @__PURE__ */
|
|
3581
|
-
/* @__PURE__ */
|
|
3815
|
+
return /* @__PURE__ */ jsxs8("div", { className: "hw-header hw-header--centered", children: [
|
|
3816
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-header-spacer" }),
|
|
3817
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-header-title", children: resolveLabel2(contentTab.label) }),
|
|
3818
|
+
/* @__PURE__ */ jsx13(
|
|
3582
3819
|
"button",
|
|
3583
3820
|
{
|
|
3584
3821
|
type: "button",
|
|
3585
3822
|
className: "hw-header-close",
|
|
3586
3823
|
onClick: handleClose,
|
|
3587
3824
|
"aria-label": t("widget.aria_close"),
|
|
3588
|
-
children: /* @__PURE__ */
|
|
3825
|
+
children: /* @__PURE__ */ jsx13(XIcon, { size: 20 })
|
|
3589
3826
|
}
|
|
3590
3827
|
)
|
|
3591
3828
|
] });
|
|
3592
3829
|
})(),
|
|
3593
|
-
(subView !== null || activeTab !== "home") && /* @__PURE__ */
|
|
3594
|
-
subView === null && activeTab === "messages" && /* @__PURE__ */
|
|
3830
|
+
(subView !== null || activeTab !== "home") && /* @__PURE__ */ jsxs8("div", { className: "hw-content", children: [
|
|
3831
|
+
subView === null && activeTab === "messages" && /* @__PURE__ */ jsx13(
|
|
3595
3832
|
MessagesView,
|
|
3596
3833
|
{
|
|
3597
3834
|
conversations,
|
|
@@ -3599,7 +3836,7 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3599
3836
|
onNewClick: openNewConversation
|
|
3600
3837
|
}
|
|
3601
3838
|
),
|
|
3602
|
-
subView === "new" && /* @__PURE__ */
|
|
3839
|
+
subView === "new" && /* @__PURE__ */ jsx13(
|
|
3603
3840
|
NewConversationView,
|
|
3604
3841
|
{
|
|
3605
3842
|
text: newText,
|
|
@@ -3609,12 +3846,12 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3609
3846
|
welcomeMessage
|
|
3610
3847
|
}
|
|
3611
3848
|
),
|
|
3612
|
-
subView === "conversation" && activeId && /* @__PURE__ */
|
|
3849
|
+
subView === "conversation" && activeId && /* @__PURE__ */ jsx13(ConversationView, { conversationId: activeId }),
|
|
3613
3850
|
activeTab.startsWith("content:") && (() => {
|
|
3614
3851
|
const tabId = activeTab.replace("content:", "");
|
|
3615
3852
|
const contentTab = contentTabs.find((t2) => t2.id === tabId);
|
|
3616
3853
|
if (!contentTab) return null;
|
|
3617
|
-
return /* @__PURE__ */
|
|
3854
|
+
return /* @__PURE__ */ jsx13(
|
|
3618
3855
|
ContentTabView,
|
|
3619
3856
|
{
|
|
3620
3857
|
tab: contentTab,
|
|
@@ -3633,7 +3870,7 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3633
3870
|
);
|
|
3634
3871
|
})()
|
|
3635
3872
|
] }),
|
|
3636
|
-
showTabBar && /* @__PURE__ */
|
|
3873
|
+
showTabBar && /* @__PURE__ */ jsx13(
|
|
3637
3874
|
TabBar,
|
|
3638
3875
|
{
|
|
3639
3876
|
activeTab,
|
|
@@ -3643,17 +3880,17 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3643
3880
|
showMessagesTab: agentConfig?.showMessagesTab ?? true
|
|
3644
3881
|
}
|
|
3645
3882
|
),
|
|
3646
|
-
/* @__PURE__ */
|
|
3883
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-powered", children: [
|
|
3647
3884
|
t("widget.powered_by"),
|
|
3648
3885
|
" ",
|
|
3649
|
-
/* @__PURE__ */
|
|
3886
|
+
/* @__PURE__ */ jsx13("a", { href: "https://helpway.ai", target: "_blank", rel: "noopener noreferrer", children: "Helpway" })
|
|
3650
3887
|
] })
|
|
3651
3888
|
]
|
|
3652
3889
|
}
|
|
3653
3890
|
),
|
|
3654
|
-
!isOpen && /* @__PURE__ */
|
|
3655
|
-
/* @__PURE__ */
|
|
3656
|
-
/* @__PURE__ */
|
|
3891
|
+
!isOpen && /* @__PURE__ */ jsx13(MessagePreview, { onOpen: handleBubbleClick }),
|
|
3892
|
+
/* @__PURE__ */ jsx13(WidgetDebugOverlay, {}),
|
|
3893
|
+
/* @__PURE__ */ jsxs8(
|
|
3657
3894
|
"button",
|
|
3658
3895
|
{
|
|
3659
3896
|
ref: bubbleRef,
|
|
@@ -3670,22 +3907,22 @@ function DefaultWidget({ initialOpen = false } = {}) {
|
|
|
3670
3907
|
"aria-expanded": isOpen,
|
|
3671
3908
|
"aria-haspopup": "dialog",
|
|
3672
3909
|
children: [
|
|
3673
|
-
/* @__PURE__ */
|
|
3910
|
+
/* @__PURE__ */ jsx13(
|
|
3674
3911
|
"span",
|
|
3675
3912
|
{
|
|
3676
3913
|
className: `hw-bubble-icon hw-bubble-icon--bot ${isOpen ? "hw-bubble-icon--hidden" : ""}`,
|
|
3677
|
-
children: /* @__PURE__ */
|
|
3914
|
+
children: /* @__PURE__ */ jsx13(WidgetLogo, {})
|
|
3678
3915
|
}
|
|
3679
3916
|
),
|
|
3680
|
-
/* @__PURE__ */
|
|
3917
|
+
/* @__PURE__ */ jsx13(
|
|
3681
3918
|
"span",
|
|
3682
3919
|
{
|
|
3683
3920
|
className: `hw-bubble-icon hw-bubble-icon--close ${!isOpen ? "hw-bubble-icon--hidden" : ""}`,
|
|
3684
|
-
children: /* @__PURE__ */
|
|
3921
|
+
children: /* @__PURE__ */ jsx13(XIcon, { size: 24 })
|
|
3685
3922
|
}
|
|
3686
3923
|
),
|
|
3687
|
-
launcherStyle !== "icon" && !isOpen && /* @__PURE__ */
|
|
3688
|
-
!isOpen && totalUnread > 0 && /* @__PURE__ */
|
|
3924
|
+
launcherStyle !== "icon" && !isOpen && /* @__PURE__ */ jsx13("span", { className: "hw-bubble-label", children: launcherStyle === "help" ? t("widget.help") : companyName }),
|
|
3925
|
+
!isOpen && totalUnread > 0 && /* @__PURE__ */ jsx13("div", { className: "hw-bubble-badge", children: totalUnread })
|
|
3689
3926
|
]
|
|
3690
3927
|
}
|
|
3691
3928
|
)
|
|
@@ -3700,8 +3937,8 @@ function TabBar({
|
|
|
3700
3937
|
contentTabs,
|
|
3701
3938
|
showMessagesTab = true
|
|
3702
3939
|
}) {
|
|
3703
|
-
return /* @__PURE__ */
|
|
3704
|
-
/* @__PURE__ */
|
|
3940
|
+
return /* @__PURE__ */ jsxs8("div", { className: "hw-tabs", role: "tablist", children: [
|
|
3941
|
+
/* @__PURE__ */ jsxs8(
|
|
3705
3942
|
"button",
|
|
3706
3943
|
{
|
|
3707
3944
|
type: "button",
|
|
@@ -3710,12 +3947,12 @@ function TabBar({
|
|
|
3710
3947
|
role: "tab",
|
|
3711
3948
|
"aria-selected": activeTab === "home",
|
|
3712
3949
|
children: [
|
|
3713
|
-
/* @__PURE__ */
|
|
3714
|
-
/* @__PURE__ */
|
|
3950
|
+
/* @__PURE__ */ jsx13(HomeIcon, {}),
|
|
3951
|
+
/* @__PURE__ */ jsx13("span", { children: t("widget.home") })
|
|
3715
3952
|
]
|
|
3716
3953
|
}
|
|
3717
3954
|
),
|
|
3718
|
-
showMessagesTab && /* @__PURE__ */
|
|
3955
|
+
showMessagesTab && /* @__PURE__ */ jsxs8(
|
|
3719
3956
|
"button",
|
|
3720
3957
|
{
|
|
3721
3958
|
type: "button",
|
|
@@ -3724,15 +3961,15 @@ function TabBar({
|
|
|
3724
3961
|
role: "tab",
|
|
3725
3962
|
"aria-selected": activeTab === "messages",
|
|
3726
3963
|
children: [
|
|
3727
|
-
/* @__PURE__ */
|
|
3728
|
-
/* @__PURE__ */
|
|
3729
|
-
unreadCount > 0 && /* @__PURE__ */
|
|
3964
|
+
/* @__PURE__ */ jsxs8("span", { className: "hw-tabs-icon-wrap", children: [
|
|
3965
|
+
/* @__PURE__ */ jsx13(MessagesIcon, {}),
|
|
3966
|
+
unreadCount > 0 && /* @__PURE__ */ jsx13("span", { className: "hw-tabs-badge", children: unreadCount > 99 ? "99+" : unreadCount })
|
|
3730
3967
|
] }),
|
|
3731
|
-
/* @__PURE__ */
|
|
3968
|
+
/* @__PURE__ */ jsx13("span", { children: t("widget.messages") })
|
|
3732
3969
|
]
|
|
3733
3970
|
}
|
|
3734
3971
|
),
|
|
3735
|
-
contentTabs.map((tab) => /* @__PURE__ */
|
|
3972
|
+
contentTabs.map((tab) => /* @__PURE__ */ jsxs8(
|
|
3736
3973
|
"button",
|
|
3737
3974
|
{
|
|
3738
3975
|
type: "button",
|
|
@@ -3741,8 +3978,8 @@ function TabBar({
|
|
|
3741
3978
|
role: "tab",
|
|
3742
3979
|
"aria-selected": activeTab === `content:${tab.id}`,
|
|
3743
3980
|
children: [
|
|
3744
|
-
/* @__PURE__ */
|
|
3745
|
-
/* @__PURE__ */
|
|
3981
|
+
/* @__PURE__ */ jsx13(ContentTabIconComponent, { icon: tab.icon }),
|
|
3982
|
+
/* @__PURE__ */ jsx13("span", { children: resolveLabel2(tab.label) })
|
|
3746
3983
|
]
|
|
3747
3984
|
},
|
|
3748
3985
|
tab.id
|
|
@@ -3756,9 +3993,9 @@ function HomeView({
|
|
|
3756
3993
|
}) {
|
|
3757
3994
|
const recent = conversations.slice(0, 3);
|
|
3758
3995
|
if (recent.length === 0) return null;
|
|
3759
|
-
return /* @__PURE__ */
|
|
3760
|
-
/* @__PURE__ */
|
|
3761
|
-
recent.map((conv, i) => /* @__PURE__ */
|
|
3996
|
+
return /* @__PURE__ */ jsxs8("div", { className: "hw-recent-card", children: [
|
|
3997
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-recent-header", children: t("widget.recent_conversations") }),
|
|
3998
|
+
recent.map((conv, i) => /* @__PURE__ */ jsx13(
|
|
3762
3999
|
ConversationRow,
|
|
3763
4000
|
{
|
|
3764
4001
|
conversation: conv,
|
|
@@ -3767,7 +4004,7 @@ function HomeView({
|
|
|
3767
4004
|
},
|
|
3768
4005
|
conv.id
|
|
3769
4006
|
)),
|
|
3770
|
-
conversations.length > 3 && /* @__PURE__ */
|
|
4007
|
+
conversations.length > 3 && /* @__PURE__ */ jsx13("button", { type: "button", className: "hw-recent-see-all", onClick: onMessagesClick, children: t("widget.see_all") })
|
|
3771
4008
|
] });
|
|
3772
4009
|
}
|
|
3773
4010
|
function MessagesView({
|
|
@@ -3776,28 +4013,28 @@ function MessagesView({
|
|
|
3776
4013
|
onNewClick
|
|
3777
4014
|
}) {
|
|
3778
4015
|
if (conversations.length === 0) {
|
|
3779
|
-
return /* @__PURE__ */
|
|
3780
|
-
/* @__PURE__ */
|
|
3781
|
-
/* @__PURE__ */
|
|
3782
|
-
/* @__PURE__ */
|
|
3783
|
-
/* @__PURE__ */
|
|
4016
|
+
return /* @__PURE__ */ jsxs8("div", { className: "hw-empty-state", children: [
|
|
4017
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-empty-icon-wrap", children: /* @__PURE__ */ jsx13(MessagesIcon, {}) }),
|
|
4018
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-empty-title", children: t("widget.no_messages") }),
|
|
4019
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-empty-desc", children: t("widget.no_messages_desc") }),
|
|
4020
|
+
/* @__PURE__ */ jsx13("button", { type: "button", className: "hw-empty-btn", onClick: onNewClick, children: t("widget.start_conversation") })
|
|
3784
4021
|
] });
|
|
3785
4022
|
}
|
|
3786
|
-
return /* @__PURE__ */
|
|
4023
|
+
return /* @__PURE__ */ jsx13("div", { className: "hw-msgs-tab", children: conversations.map((conv) => /* @__PURE__ */ jsx13(ConversationCard, { conversation: conv, onSelect }, conv.id)) });
|
|
3787
4024
|
}
|
|
3788
4025
|
function ConvCardBody({ conv }) {
|
|
3789
4026
|
const agentName = useWidgetStore((s) => s.agentConfig?.name) ?? "Support";
|
|
3790
4027
|
const isTeam = conv.lastMessageSenderType === "team" && conv.lastMessageSenderName;
|
|
3791
4028
|
const displayName = isTeam ? conv.lastMessageSenderName : agentName;
|
|
3792
4029
|
const preview = conv.lastMessageText ?? t("widget.no_preview");
|
|
3793
|
-
return /* @__PURE__ */
|
|
3794
|
-
/* @__PURE__ */
|
|
3795
|
-
/* @__PURE__ */
|
|
3796
|
-
/* @__PURE__ */
|
|
3797
|
-
/* @__PURE__ */
|
|
3798
|
-
conv.lastMessageAt && /* @__PURE__ */
|
|
4030
|
+
return /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
4031
|
+
/* @__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, {}) }),
|
|
4032
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-conv-card-content", children: [
|
|
4033
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-conv-card-top", children: [
|
|
4034
|
+
/* @__PURE__ */ jsx13("span", { className: "hw-conv-card-name", children: displayName }),
|
|
4035
|
+
conv.lastMessageAt && /* @__PURE__ */ jsx13("span", { className: "hw-conv-card-time", children: formatRelativeTime(conv.lastMessageAt) })
|
|
3799
4036
|
] }),
|
|
3800
|
-
/* @__PURE__ */
|
|
4037
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-conv-card-preview", children: preview })
|
|
3801
4038
|
] })
|
|
3802
4039
|
] });
|
|
3803
4040
|
}
|
|
@@ -3806,15 +4043,15 @@ function ConversationCard({
|
|
|
3806
4043
|
onSelect
|
|
3807
4044
|
}) {
|
|
3808
4045
|
const hasUnread = conv.unreadCount > 0;
|
|
3809
|
-
return /* @__PURE__ */
|
|
4046
|
+
return /* @__PURE__ */ jsxs8(
|
|
3810
4047
|
"button",
|
|
3811
4048
|
{
|
|
3812
4049
|
type: "button",
|
|
3813
4050
|
className: `hw-conv-card ${hasUnread ? "hw-conv-card--unread" : ""}`,
|
|
3814
4051
|
onClick: () => onSelect(conv.id),
|
|
3815
4052
|
children: [
|
|
3816
|
-
/* @__PURE__ */
|
|
3817
|
-
hasUnread && /* @__PURE__ */
|
|
4053
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-conv-card-row", children: /* @__PURE__ */ jsx13(ConvCardBody, { conv }) }),
|
|
4054
|
+
hasUnread && /* @__PURE__ */ jsx13("div", { className: "hw-conv-card-badge", children: conv.unreadCount })
|
|
3818
4055
|
]
|
|
3819
4056
|
}
|
|
3820
4057
|
);
|
|
@@ -3825,20 +4062,20 @@ function ConversationRow({
|
|
|
3825
4062
|
isLast
|
|
3826
4063
|
}) {
|
|
3827
4064
|
const hasUnread = conv.unreadCount > 0;
|
|
3828
|
-
return /* @__PURE__ */
|
|
4065
|
+
return /* @__PURE__ */ jsxs8(
|
|
3829
4066
|
"button",
|
|
3830
4067
|
{
|
|
3831
4068
|
type: "button",
|
|
3832
4069
|
className: `hw-recent-row ${hasUnread ? "hw-recent-row--unread" : ""} ${isLast ? "hw-recent-row--last" : ""}`,
|
|
3833
4070
|
onClick: () => onSelect(conv.id),
|
|
3834
4071
|
children: [
|
|
3835
|
-
/* @__PURE__ */
|
|
3836
|
-
hasUnread && /* @__PURE__ */
|
|
4072
|
+
/* @__PURE__ */ jsx13(ConvCardBody, { conv }),
|
|
4073
|
+
hasUnread && /* @__PURE__ */ jsx13("div", { className: "hw-recent-row-badge", children: conv.unreadCount })
|
|
3837
4074
|
]
|
|
3838
4075
|
}
|
|
3839
4076
|
);
|
|
3840
4077
|
}
|
|
3841
|
-
function InlineEmailPrompt() {
|
|
4078
|
+
function InlineEmailPrompt({ conversationId }) {
|
|
3842
4079
|
const { client, store } = useWidgetContext();
|
|
3843
4080
|
const updateContact = useWidgetStore((s) => s.updateVisitorContact);
|
|
3844
4081
|
const [email, setEmail] = useState12("");
|
|
@@ -3862,7 +4099,10 @@ function InlineEmailPrompt() {
|
|
|
3862
4099
|
setIsSuccess(true);
|
|
3863
4100
|
setIsSubmitting(true);
|
|
3864
4101
|
try {
|
|
3865
|
-
const result = await client.widget.collectEmail.mutate({
|
|
4102
|
+
const result = await client.widget.collectEmail.mutate({
|
|
4103
|
+
email: trimmed,
|
|
4104
|
+
...conversationId ? { conversationId } : {}
|
|
4105
|
+
});
|
|
3866
4106
|
if (result.contact) {
|
|
3867
4107
|
updateContact({
|
|
3868
4108
|
id: result.contact.id,
|
|
@@ -3882,23 +4122,23 @@ function InlineEmailPrompt() {
|
|
|
3882
4122
|
}
|
|
3883
4123
|
};
|
|
3884
4124
|
if (isSuccess) {
|
|
3885
|
-
return /* @__PURE__ */
|
|
3886
|
-
/* @__PURE__ */
|
|
4125
|
+
return /* @__PURE__ */ jsxs8("div", { className: "hw-email-card hw-email-card--success", children: [
|
|
4126
|
+
/* @__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" }) }),
|
|
3887
4127
|
t("widget.email_saved")
|
|
3888
4128
|
] });
|
|
3889
4129
|
}
|
|
3890
|
-
return /* @__PURE__ */
|
|
3891
|
-
/* @__PURE__ */
|
|
3892
|
-
/* @__PURE__ */
|
|
3893
|
-
/* @__PURE__ */
|
|
3894
|
-
/* @__PURE__ */
|
|
4130
|
+
return /* @__PURE__ */ jsxs8("div", { className: "hw-email-card", children: [
|
|
4131
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-email-card-header", children: [
|
|
4132
|
+
/* @__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: [
|
|
4133
|
+
/* @__PURE__ */ jsx13("rect", { x: "2", y: "4", width: "20", height: "16", rx: "2" }),
|
|
4134
|
+
/* @__PURE__ */ jsx13("path", { d: "M22 7l-10 7L2 7" })
|
|
3895
4135
|
] }) }),
|
|
3896
|
-
/* @__PURE__ */
|
|
3897
|
-
/* @__PURE__ */
|
|
3898
|
-
/* @__PURE__ */
|
|
4136
|
+
/* @__PURE__ */ jsxs8("div", { children: [
|
|
4137
|
+
/* @__PURE__ */ jsx13("p", { className: "hw-email-card-title", children: t("widget.email_title") }),
|
|
4138
|
+
/* @__PURE__ */ jsx13("p", { className: "hw-email-card-subtitle", children: t("widget.email_subtitle") })
|
|
3899
4139
|
] })
|
|
3900
4140
|
] }),
|
|
3901
|
-
/* @__PURE__ */
|
|
4141
|
+
/* @__PURE__ */ jsx13(
|
|
3902
4142
|
"input",
|
|
3903
4143
|
{
|
|
3904
4144
|
type: "email",
|
|
@@ -3914,14 +4154,14 @@ function InlineEmailPrompt() {
|
|
|
3914
4154
|
placeholder: t("widget.email_placeholder")
|
|
3915
4155
|
}
|
|
3916
4156
|
),
|
|
3917
|
-
/* @__PURE__ */
|
|
4157
|
+
/* @__PURE__ */ jsx13(
|
|
3918
4158
|
"button",
|
|
3919
4159
|
{
|
|
3920
4160
|
type: "button",
|
|
3921
4161
|
className: "hw-email-card-submit",
|
|
3922
4162
|
onClick: handleSubmit,
|
|
3923
4163
|
disabled: isSubmitting || !email.trim(),
|
|
3924
|
-
children: isSubmitting ? /* @__PURE__ */
|
|
4164
|
+
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")
|
|
3925
4165
|
}
|
|
3926
4166
|
)
|
|
3927
4167
|
] });
|
|
@@ -3933,18 +4173,16 @@ function NewConversationView({
|
|
|
3933
4173
|
isSubmitting,
|
|
3934
4174
|
welcomeMessage
|
|
3935
4175
|
}) {
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
/* @__PURE__ */ jsx12("div", { className: "hw-new-welcome", children: /* @__PURE__ */ jsx12(
|
|
4176
|
+
return /* @__PURE__ */ jsxs8("div", { className: "hw-new", children: [
|
|
4177
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-new-welcome", children: /* @__PURE__ */ jsx13(
|
|
3939
4178
|
MessageBubble,
|
|
3940
4179
|
{
|
|
3941
4180
|
text: welcomeMessage,
|
|
3942
4181
|
sender: "ai",
|
|
3943
|
-
time: welcomeTime,
|
|
3944
4182
|
parts: null
|
|
3945
4183
|
}
|
|
3946
4184
|
) }),
|
|
3947
|
-
/* @__PURE__ */
|
|
4185
|
+
/* @__PURE__ */ jsx13(
|
|
3948
4186
|
Composer,
|
|
3949
4187
|
{
|
|
3950
4188
|
text,
|
|
@@ -3967,7 +4205,8 @@ function ConversationView({ conversationId }) {
|
|
|
3967
4205
|
addFiles,
|
|
3968
4206
|
removeAttachment,
|
|
3969
4207
|
sendError,
|
|
3970
|
-
clearSendError
|
|
4208
|
+
clearSendError,
|
|
4209
|
+
emailGateConvId
|
|
3971
4210
|
} = useComposer(conversationId);
|
|
3972
4211
|
const { isTyping, isAiProcessing, setTyping } = usePresence(conversationId);
|
|
3973
4212
|
const agentConfig = useWidgetStore((s) => s.agentConfig);
|
|
@@ -3982,29 +4221,30 @@ function ConversationView({ conversationId }) {
|
|
|
3982
4221
|
const hasAiReply = items.some(
|
|
3983
4222
|
(it) => it.type === "message" && Boolean(it.aiAgentId)
|
|
3984
4223
|
);
|
|
3985
|
-
const
|
|
4224
|
+
const needsEmailPostReply = !!agentConfig?.requireVisitorEmail && !visitorContact?.email && hasVisitorMessage && hasAiReply;
|
|
4225
|
+
const needsEmail = needsEmailPostReply || !!emailGateConvId;
|
|
3986
4226
|
if (isLoading && items.length === 0) {
|
|
3987
|
-
return /* @__PURE__ */
|
|
3988
|
-
/* @__PURE__ */
|
|
3989
|
-
/* @__PURE__ */
|
|
3990
|
-
/* @__PURE__ */
|
|
3991
|
-
/* @__PURE__ */
|
|
3992
|
-
/* @__PURE__ */
|
|
4227
|
+
return /* @__PURE__ */ jsx13("div", { className: "hw-messages", children: /* @__PURE__ */ jsxs8("div", { className: "hw-skeleton-messages", children: [
|
|
4228
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-skeleton-msg", children: [
|
|
4229
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-avatar" }),
|
|
4230
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-skeleton-bubble", children: [
|
|
4231
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 140 } }),
|
|
4232
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 200 } })
|
|
3993
4233
|
] })
|
|
3994
4234
|
] }),
|
|
3995
|
-
/* @__PURE__ */
|
|
3996
|
-
/* @__PURE__ */
|
|
3997
|
-
/* @__PURE__ */
|
|
3998
|
-
/* @__PURE__ */
|
|
3999
|
-
/* @__PURE__ */
|
|
4000
|
-
/* @__PURE__ */
|
|
4001
|
-
/* @__PURE__ */
|
|
4235
|
+
/* @__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 } }) }) }),
|
|
4236
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-skeleton-msg", children: [
|
|
4237
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-avatar" }),
|
|
4238
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-skeleton-bubble", children: [
|
|
4239
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 180 } }),
|
|
4240
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 120 } }),
|
|
4241
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-skeleton hw-skeleton-line", style: { width: 80 } })
|
|
4002
4242
|
] })
|
|
4003
4243
|
] })
|
|
4004
4244
|
] }) });
|
|
4005
4245
|
}
|
|
4006
|
-
return /* @__PURE__ */
|
|
4007
|
-
/* @__PURE__ */
|
|
4246
|
+
return /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
4247
|
+
/* @__PURE__ */ jsx13(
|
|
4008
4248
|
MessageList,
|
|
4009
4249
|
{
|
|
4010
4250
|
items,
|
|
@@ -4015,11 +4255,11 @@ function ConversationView({ conversationId }) {
|
|
|
4015
4255
|
onLoadMore: loadMore
|
|
4016
4256
|
}
|
|
4017
4257
|
),
|
|
4018
|
-
isResolved ? /* @__PURE__ */
|
|
4019
|
-
needsEmail && /* @__PURE__ */
|
|
4020
|
-
sendError && /* @__PURE__ */
|
|
4258
|
+
isResolved ? /* @__PURE__ */ jsx13(ResolvedBanner, { conversationId }) : /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
4259
|
+
needsEmail && /* @__PURE__ */ jsx13(InlineEmailPrompt, { conversationId: emailGateConvId ?? void 0 }),
|
|
4260
|
+
sendError && /* @__PURE__ */ jsxs8("div", { className: "hw-send-error", children: [
|
|
4021
4261
|
sendError,
|
|
4022
|
-
/* @__PURE__ */
|
|
4262
|
+
/* @__PURE__ */ jsx13(
|
|
4023
4263
|
"button",
|
|
4024
4264
|
{
|
|
4025
4265
|
type: "button",
|
|
@@ -4032,7 +4272,7 @@ function ConversationView({ conversationId }) {
|
|
|
4032
4272
|
}
|
|
4033
4273
|
)
|
|
4034
4274
|
] }),
|
|
4035
|
-
/* @__PURE__ */
|
|
4275
|
+
/* @__PURE__ */ jsx13(
|
|
4036
4276
|
Composer,
|
|
4037
4277
|
{
|
|
4038
4278
|
text,
|
|
@@ -4066,12 +4306,12 @@ function ResolvedBanner({ conversationId }) {
|
|
|
4066
4306
|
client.widget.sendCsat.mutate({ conversationId, rating }).catch(() => {
|
|
4067
4307
|
});
|
|
4068
4308
|
};
|
|
4069
|
-
return /* @__PURE__ */
|
|
4070
|
-
/* @__PURE__ */
|
|
4071
|
-
!csatSubmitted ? /* @__PURE__ */
|
|
4072
|
-
/* @__PURE__ */
|
|
4073
|
-
/* @__PURE__ */
|
|
4074
|
-
/* @__PURE__ */
|
|
4309
|
+
return /* @__PURE__ */ jsxs8("div", { className: "hw-resolved", children: [
|
|
4310
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-resolved-text", children: t("widget.resolved_text") }),
|
|
4311
|
+
!csatSubmitted ? /* @__PURE__ */ jsxs8("div", { className: "hw-csat", children: [
|
|
4312
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-csat-label", children: t("widget.csat_label") }),
|
|
4313
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-csat-buttons", children: [
|
|
4314
|
+
/* @__PURE__ */ jsx13(
|
|
4075
4315
|
"button",
|
|
4076
4316
|
{
|
|
4077
4317
|
type: "button",
|
|
@@ -4081,7 +4321,7 @@ function ResolvedBanner({ conversationId }) {
|
|
|
4081
4321
|
children: "\u{1F44D}"
|
|
4082
4322
|
}
|
|
4083
4323
|
),
|
|
4084
|
-
/* @__PURE__ */
|
|
4324
|
+
/* @__PURE__ */ jsx13(
|
|
4085
4325
|
"button",
|
|
4086
4326
|
{
|
|
4087
4327
|
type: "button",
|
|
@@ -4092,8 +4332,8 @@ function ResolvedBanner({ conversationId }) {
|
|
|
4092
4332
|
}
|
|
4093
4333
|
)
|
|
4094
4334
|
] })
|
|
4095
|
-
] }) : /* @__PURE__ */
|
|
4096
|
-
/* @__PURE__ */
|
|
4335
|
+
] }) : /* @__PURE__ */ jsx13("div", { className: "hw-csat-thanks", children: t("widget.csat_thanks") }),
|
|
4336
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-resolved-actions", children: /* @__PURE__ */ jsx13("button", { type: "button", className: "hw-resolved-reopen", onClick: handleReopen, children: t("widget.send_followup") }) })
|
|
4097
4337
|
] });
|
|
4098
4338
|
}
|
|
4099
4339
|
function MessagePreview({ onOpen }) {
|
|
@@ -4122,7 +4362,7 @@ function MessagePreview({ onOpen }) {
|
|
|
4122
4362
|
dismissPreview();
|
|
4123
4363
|
onOpen();
|
|
4124
4364
|
};
|
|
4125
|
-
return /* @__PURE__ */
|
|
4365
|
+
return /* @__PURE__ */ jsxs8(
|
|
4126
4366
|
"div",
|
|
4127
4367
|
{
|
|
4128
4368
|
className: `hw-preview ${closing ? "hw-preview--closing" : ""}`,
|
|
@@ -4130,21 +4370,21 @@ function MessagePreview({ onOpen }) {
|
|
|
4130
4370
|
role: "button",
|
|
4131
4371
|
tabIndex: 0,
|
|
4132
4372
|
children: [
|
|
4133
|
-
/* @__PURE__ */
|
|
4134
|
-
/* @__PURE__ */
|
|
4135
|
-
/* @__PURE__ */
|
|
4136
|
-
/* @__PURE__ */
|
|
4373
|
+
/* @__PURE__ */ jsxs8("div", { className: "hw-preview-header", children: [
|
|
4374
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-preview-avatar", children: /* @__PURE__ */ jsx13(WidgetLogo, {}) }),
|
|
4375
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-preview-name", children: agentName }),
|
|
4376
|
+
/* @__PURE__ */ jsx13(
|
|
4137
4377
|
"button",
|
|
4138
4378
|
{
|
|
4139
4379
|
type: "button",
|
|
4140
4380
|
className: "hw-preview-close",
|
|
4141
4381
|
onClick: handleClose,
|
|
4142
4382
|
"aria-label": t("widget.aria_dismiss"),
|
|
4143
|
-
children: /* @__PURE__ */
|
|
4383
|
+
children: /* @__PURE__ */ jsx13(XIcon, { size: 20 })
|
|
4144
4384
|
}
|
|
4145
4385
|
)
|
|
4146
4386
|
] }),
|
|
4147
|
-
/* @__PURE__ */
|
|
4387
|
+
/* @__PURE__ */ jsx13("div", { className: "hw-preview-body", children: preview.text })
|
|
4148
4388
|
]
|
|
4149
4389
|
}
|
|
4150
4390
|
);
|
|
@@ -4173,10 +4413,10 @@ function styleInject(css, { insertAt } = {}) {
|
|
|
4173
4413
|
}
|
|
4174
4414
|
|
|
4175
4415
|
// src/themed/styles.css
|
|
4176
|
-
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.hw-widget {\n --hw-primary: #171717;\n --hw-primary-hover: #2a2a2a;\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.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}\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-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}\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-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 overflow: hidden;\n}\n.hw-hero-bot-icon svg {\n width: 32px;\n height: 32px;\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 overflow: hidden;\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: #fff;\n}\n.hw-header-agent-img {\n width: 100%;\n height: 100%;\n object-fit: cover;\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-accent);\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-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--team {\n background: var(--hw-brand, #0a0a0a);\n color: #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-accent);\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-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-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: 3px;\n padding: 0 4px;\n opacity: 1;\n font-variant-numeric: tabular-nums;\n min-height: 20px;\n}\n.hw-msg-time {\n opacity: 0.72;\n}\n.hw-msg-hover-meta {\n max-width: 0;\n opacity: 0;\n overflow: hidden;\n white-space: nowrap;\n transition: max-width 180ms ease, opacity 140ms ease;\n}\n.hw-msg:hover .hw-msg-hover-meta,\n.hw-msg:focus-within .hw-msg-hover-meta {\n max-width: 180px;\n opacity: 1;\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-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-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-surface, #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-brand, #0a0a0a);\n display: flex;\n align-items: center;\n justify-content: center;\n color: #fff;\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-muted, #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, #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;\n}\n.hw-email-card-input:focus {\n border-color: var(--hw-brand, #0a0a0a);\n box-shadow: 0 0 0 2px 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: #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-muted, #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 flex: 1;\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: 120px;\n background: transparent;\n color: var(--hw-text);\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: #e0e0e0;\n color: #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-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.34, 1.56, 0.64, 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.hw-preview--closing {\n animation: hw-preview-out 0.2s ease forwards;\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: 8px 14px 14px;\n font-size: 14px;\n line-height: 1.45;\n color: var(--hw-text-2);\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n overflow: hidden;\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: 20px 0 8px;\n}\n.hw-markdown h2 {\n font-size: 15px;\n font-weight: 600;\n margin: 16px 0 6px;\n}\n.hw-markdown h3 {\n font-size: 14px;\n font-weight: 600;\n margin: 12px 0 4px;\n}\n.hw-markdown p {\n margin: 0 0 12px;\n}\n.hw-markdown ul {\n margin: 0 0 12px;\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 .hw-msg-meta {\n opacity: 1;\n }\n .hw-msg-copy {\n opacity: 1;\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-msg-copy {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 20px;\n height: 20px;\n margin-left: 4px;\n border: none;\n border-radius: 4px;\n background: none;\n color: var(--hw-text-4);\n cursor: pointer;\n vertical-align: middle;\n opacity: 0;\n transition:\n color 0.15s,\n background 0.15s,\n opacity 0.15s;\n padding: 0;\n flex-shrink: 0;\n}\n.hw-msg:hover .hw-msg-copy,\n.hw-msg:focus-within .hw-msg-copy {\n opacity: 1;\n}\n.hw-msg-copy:hover {\n background: var(--hw-bg-hover);\n color: var(--hw-text-2);\n}\n.hw-msg-copy svg {\n width: 12px;\n height: 12px;\n}\n.hw-msg-copy--done {\n color: #22c55e;\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}\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 }\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-msg-copy:hover {\n background: var(--hw-bg-hover);\n color: var(--hw-text-2);\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');
|
|
4416
|
+
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.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.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}\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-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-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 overflow: hidden;\n}\n.hw-hero-bot-icon svg {\n width: 32px;\n height: 32px;\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 overflow: hidden;\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}\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-accent);\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-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--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-accent);\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-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: 3px;\n padding: 0 4px;\n opacity: 0;\n font-variant-numeric: tabular-nums;\n min-height: 0;\n height: 0;\n overflow: hidden;\n transition: opacity 140ms ease, height 140ms ease;\n}\n.hw-msg:hover .hw-msg-meta,\n.hw-msg:focus-within .hw-msg-meta {\n opacity: 1;\n height: 20px;\n min-height: 20px;\n}\n.hw-msg-sender-label {\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-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 flex: 1;\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: 120px;\n background: transparent;\n color: var(--hw-text);\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-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-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.34, 1.56, 0.64, 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.hw-preview--closing {\n animation: hw-preview-out 0.2s ease forwards;\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: 8px 14px 14px;\n font-size: 14px;\n line-height: 1.45;\n color: var(--hw-text-2);\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n overflow: hidden;\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 .hw-msg-meta {\n opacity: 1;\n height: auto;\n min-height: 20px;\n overflow: visible;\n }\n .hw-msg-copy {\n opacity: 1;\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-msg-copy {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 20px;\n height: 20px;\n margin-left: 4px;\n border: none;\n border-radius: 4px;\n background: none;\n color: var(--hw-text-4);\n cursor: pointer;\n vertical-align: middle;\n opacity: 0;\n transition:\n color 0.15s,\n background 0.15s,\n opacity 0.15s;\n padding: 0;\n flex-shrink: 0;\n}\n.hw-msg:hover .hw-msg-copy,\n.hw-msg:focus-within .hw-msg-copy {\n opacity: 1;\n}\n.hw-msg-copy:hover {\n background: var(--hw-bg-hover);\n color: var(--hw-text-2);\n}\n.hw-msg-copy svg {\n width: 12px;\n height: 12px;\n}\n.hw-msg-copy--done {\n color: #22c55e;\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-msg-copy:hover {\n background: var(--hw-bg-hover);\n color: var(--hw-text-2);\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');
|
|
4177
4417
|
|
|
4178
4418
|
// src/helpway-widget.tsx
|
|
4179
|
-
import { jsx as
|
|
4419
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
4180
4420
|
function HelpwayWidget({
|
|
4181
4421
|
apiKey,
|
|
4182
4422
|
apiUrl,
|
|
@@ -4187,7 +4427,7 @@ function HelpwayWidget({
|
|
|
4187
4427
|
src
|
|
4188
4428
|
}) {
|
|
4189
4429
|
const resolvedApiUrl = apiUrl ?? (src ? src.replace(/\/widget\.js$/, "") : void 0);
|
|
4190
|
-
return /* @__PURE__ */
|
|
4430
|
+
return /* @__PURE__ */ jsx14(
|
|
4191
4431
|
SupportProvider,
|
|
4192
4432
|
{
|
|
4193
4433
|
apiKey,
|
|
@@ -4195,7 +4435,7 @@ function HelpwayWidget({
|
|
|
4195
4435
|
locale,
|
|
4196
4436
|
initialConversationId,
|
|
4197
4437
|
onReady,
|
|
4198
|
-
children: /* @__PURE__ */
|
|
4438
|
+
children: /* @__PURE__ */ jsx14(DefaultWidget, {})
|
|
4199
4439
|
}
|
|
4200
4440
|
);
|
|
4201
4441
|
}
|