@flamingo-stack/openframe-frontend-core 0.0.646 → 0.0.647-snapshot.20260917173248
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/chat-protocol/index.cjs.map +1 -1
- package/dist/chat-protocol/index.js.map +1 -1
- package/dist/{chunk-ETEM2ZD4.js → chunk-2A4RLR7R.js} +3 -3
- package/dist/{chunk-JFBUXYDK.cjs → chunk-2ENDIKKP.cjs} +15 -15
- package/dist/{chunk-JFBUXYDK.cjs.map → chunk-2ENDIKKP.cjs.map} +1 -1
- package/dist/{chunk-QS55P2TA.js → chunk-2ULLNHL3.js} +6 -6
- package/dist/chunk-2ULLNHL3.js.map +1 -0
- package/dist/{chunk-DULSS7R6.js → chunk-3ORBE27K.js} +832 -547
- package/dist/chunk-3ORBE27K.js.map +1 -0
- package/dist/{chunk-ZW2BEEX2.cjs → chunk-4JRBRMKO.cjs} +25 -25
- package/dist/{chunk-ZW2BEEX2.cjs.map → chunk-4JRBRMKO.cjs.map} +1 -1
- package/dist/{chunk-7UWJMWDH.cjs → chunk-EFPAKLT5.cjs} +784 -499
- package/dist/chunk-EFPAKLT5.cjs.map +1 -0
- package/dist/{chunk-5C7GMRJU.js → chunk-EKLOXVG2.js} +5 -5
- package/dist/{chunk-AYAZU3BO.cjs → chunk-EW3EIPT5.cjs} +5 -5
- package/dist/{chunk-AYAZU3BO.cjs.map → chunk-EW3EIPT5.cjs.map} +1 -1
- package/dist/{chunk-NKMXFBV5.js → chunk-FQ4TZP6K.js} +4 -4
- package/dist/{chunk-5JVN3EVT.cjs → chunk-HN4DLGKP.cjs} +71 -71
- package/dist/{chunk-5JVN3EVT.cjs.map → chunk-HN4DLGKP.cjs.map} +1 -1
- package/dist/{chunk-WJ7PDBPK.cjs → chunk-HXQWGZYG.cjs} +4 -4
- package/dist/{chunk-WJ7PDBPK.cjs.map → chunk-HXQWGZYG.cjs.map} +1 -1
- package/dist/{chunk-5MZZFTME.js → chunk-IUHU5BC2.js} +5 -5
- package/dist/{chunk-ZGWXD2S3.js → chunk-IWEJCDCB.js} +3 -3
- package/dist/{chunk-N2E26OD6.cjs → chunk-LFCMKMHR.cjs} +45 -45
- package/dist/{chunk-N2E26OD6.cjs.map → chunk-LFCMKMHR.cjs.map} +1 -1
- package/dist/{chunk-XJH5M2B7.js → chunk-M6QCADAT.js} +6 -6
- package/dist/{chunk-NWYSHZG7.cjs → chunk-N7AJUG4C.cjs} +22 -22
- package/dist/{chunk-NWYSHZG7.cjs.map → chunk-N7AJUG4C.cjs.map} +1 -1
- package/dist/{chunk-LDJ4TIDC.cjs → chunk-ODXVLFAQ.cjs} +13 -24
- package/dist/chunk-ODXVLFAQ.cjs.map +1 -0
- package/dist/{chunk-4GOJFHJY.js → chunk-OLPU5IVF.js} +2 -2
- package/dist/{chunk-PD47DDHS.js → chunk-PYAFHT6B.js} +7 -18
- package/dist/chunk-PYAFHT6B.js.map +1 -0
- package/dist/{chunk-H4FQRA5O.cjs → chunk-RM5MF2N3.cjs} +3 -3
- package/dist/{chunk-H4FQRA5O.cjs.map → chunk-RM5MF2N3.cjs.map} +1 -1
- package/dist/{chunk-ZDIDA4QG.js → chunk-SBKNMSQR.js} +2 -2
- package/dist/{chunk-GBZ3IR3S.js → chunk-SNQ5KWLP.js} +2 -2
- package/dist/{chunk-LLT5XMP2.js → chunk-UW7XUQFP.js} +3 -3
- package/dist/{chunk-RRSR2XHJ.cjs → chunk-VPEETTUS.cjs} +167 -167
- package/dist/chunk-VPEETTUS.cjs.map +1 -0
- package/dist/{chunk-UR7BC74V.js → chunk-VTLDEZ5D.js} +3 -3
- package/dist/{chunk-XPPGI7SD.js → chunk-WBRO3MX2.js} +2 -2
- package/dist/{chunk-NZ66W56D.cjs → chunk-WMKXHOOD.cjs} +10 -10
- package/dist/{chunk-NZ66W56D.cjs.map → chunk-WMKXHOOD.cjs.map} +1 -1
- package/dist/{chunk-TZO743LD.cjs → chunk-WPNY4XEL.cjs} +3 -3
- package/dist/{chunk-TZO743LD.cjs.map → chunk-WPNY4XEL.cjs.map} +1 -1
- package/dist/{chunk-XATBOM3X.js → chunk-XE5DNWOR.js} +5 -5
- package/dist/{chunk-C6QUB6IS.cjs → chunk-XI3QJD3N.cjs} +22 -22
- package/dist/{chunk-C6QUB6IS.cjs.map → chunk-XI3QJD3N.cjs.map} +1 -1
- package/dist/{chunk-2V7SCIOG.cjs → chunk-YTOUGDPY.cjs} +33 -33
- package/dist/{chunk-2V7SCIOG.cjs.map → chunk-YTOUGDPY.cjs.map} +1 -1
- package/dist/{chunk-X2VTQ3TL.cjs → chunk-YUXFHVC2.cjs} +10 -10
- package/dist/{chunk-X2VTQ3TL.cjs.map → chunk-YUXFHVC2.cjs.map} +1 -1
- package/dist/components/case-studies/index.cjs +14 -14
- package/dist/components/case-studies/index.js +3 -3
- package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +2 -2
- package/dist/components/chat/index.js +1 -1
- package/dist/components/chat/types/message.types.d.ts +5 -0
- package/dist/components/chat/types/message.types.d.ts.map +1 -1
- package/dist/components/chat/utils/cited-sources.d.ts +5 -0
- package/dist/components/chat/utils/cited-sources.d.ts.map +1 -1
- package/dist/components/chat/utils/source-row-cta.d.ts +2 -7
- package/dist/components/chat/utils/source-row-cta.d.ts.map +1 -1
- package/dist/components/contact/index.cjs +4 -4
- package/dist/components/contact/index.js +3 -3
- package/dist/components/docs/index.cjs +7 -7
- package/dist/components/docs/index.js +6 -6
- package/dist/components/embeds/index.cjs +4 -4
- package/dist/components/embeds/index.js +3 -3
- package/dist/components/faq/index.cjs +4 -4
- package/dist/components/faq/index.js +3 -3
- package/dist/components/features/index.cjs +3 -3
- package/dist/components/features/index.js +2 -2
- package/dist/components/help-center-pages/index.cjs +23 -23
- package/dist/components/help-center-pages/index.js +14 -14
- package/dist/components/index.cjs +39 -39
- package/dist/components/index.js +13 -13
- package/dist/components/meeting-scheduler/index.cjs +24 -24
- package/dist/components/meeting-scheduler/index.js +2 -2
- package/dist/components/navigation/index.cjs +6 -6
- package/dist/components/navigation/index.js +5 -5
- package/dist/components/onboarding-guides/index.cjs +6 -6
- package/dist/components/onboarding-guides/index.js +5 -5
- package/dist/components/shared/doc-search/map-doc-search-results.d.ts.map +1 -1
- package/dist/components/tickets/index.cjs +7 -7
- package/dist/components/tickets/index.js +6 -6
- package/dist/components/ui/data-table/data-table-skeleton.d.ts.map +1 -1
- package/dist/components/ui/index.cjs +3 -3
- package/dist/components/ui/index.js +2 -2
- package/dist/components/ui/markdown/mermaid-diagram.d.ts +31 -9
- package/dist/components/ui/markdown/mermaid-diagram.d.ts.map +1 -1
- package/dist/index.cjs +19 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +18 -6
- package/dist/index.js.map +1 -1
- package/dist/utils/index.cjs +163 -0
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +158 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/source-grouping.d.ts +86 -0
- package/dist/utils/source-grouping.d.ts.map +1 -0
- package/dist/utils/source-icons.d.ts +7 -0
- package/dist/utils/source-icons.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/chat/embeddable-chat.tsx +10 -2
- package/src/components/chat/types/message.types.ts +5 -0
- package/src/components/chat/utils/cited-sources.ts +7 -1
- package/src/components/chat/utils/source-row-cta.ts +4 -7
- package/src/components/shared/doc-search/__tests__/map-doc-search-results.test.ts +48 -0
- package/src/components/shared/doc-search/map-doc-search-results.ts +6 -16
- package/src/components/ui/data-table/data-table-skeleton.tsx +15 -7
- package/src/components/ui/markdown/__tests__/mermaid-zoom.test.tsx +117 -0
- package/src/components/ui/markdown/mermaid-diagram.tsx +279 -59
- package/src/utils/__tests__/source-grouping.test.ts +240 -0
- package/src/utils/index.ts +11 -0
- package/src/utils/source-grouping.ts +215 -0
- package/src/utils/source-icons.ts +13 -0
- package/dist/chunk-7UWJMWDH.cjs.map +0 -1
- package/dist/chunk-DULSS7R6.js.map +0 -1
- package/dist/chunk-LDJ4TIDC.cjs.map +0 -1
- package/dist/chunk-PD47DDHS.js.map +0 -1
- package/dist/chunk-QS55P2TA.js.map +0 -1
- package/dist/chunk-RRSR2XHJ.cjs.map +0 -1
- /package/dist/{chunk-ETEM2ZD4.js.map → chunk-2A4RLR7R.js.map} +0 -0
- /package/dist/{chunk-5C7GMRJU.js.map → chunk-EKLOXVG2.js.map} +0 -0
- /package/dist/{chunk-NKMXFBV5.js.map → chunk-FQ4TZP6K.js.map} +0 -0
- /package/dist/{chunk-5MZZFTME.js.map → chunk-IUHU5BC2.js.map} +0 -0
- /package/dist/{chunk-ZGWXD2S3.js.map → chunk-IWEJCDCB.js.map} +0 -0
- /package/dist/{chunk-XJH5M2B7.js.map → chunk-M6QCADAT.js.map} +0 -0
- /package/dist/{chunk-4GOJFHJY.js.map → chunk-OLPU5IVF.js.map} +0 -0
- /package/dist/{chunk-ZDIDA4QG.js.map → chunk-SBKNMSQR.js.map} +0 -0
- /package/dist/{chunk-GBZ3IR3S.js.map → chunk-SNQ5KWLP.js.map} +0 -0
- /package/dist/{chunk-LLT5XMP2.js.map → chunk-UW7XUQFP.js.map} +0 -0
- /package/dist/{chunk-UR7BC74V.js.map → chunk-VTLDEZ5D.js.map} +0 -0
- /package/dist/{chunk-XPPGI7SD.js.map → chunk-WBRO3MX2.js.map} +0 -0
- /package/dist/{chunk-XATBOM3X.js.map → chunk-XE5DNWOR.js.map} +0 -0
|
@@ -1378,6 +1378,7 @@ function extractText(node) {
|
|
|
1378
1378
|
// src/components/ui/markdown/mermaid-diagram.tsx
|
|
1379
1379
|
|
|
1380
1380
|
|
|
1381
|
+
|
|
1381
1382
|
// src/hooks/ui/use-is-hydrated.ts
|
|
1382
1383
|
|
|
1383
1384
|
var subscribe = () => () => {
|
|
@@ -1435,38 +1436,17 @@ async function withRenderTimeout(promise, ms) {
|
|
|
1435
1436
|
}
|
|
1436
1437
|
}
|
|
1437
1438
|
var mermaidStyles = `
|
|
1439
|
+
/* The pan surface is a scroll region with NO scrollbars: drag, wheel,
|
|
1440
|
+
arrows and the toolbar move it (a canvas, the way dbdiagram, Figma and
|
|
1441
|
+
Excalidraw draw one). Two mechanisms for one motion read as a bug. */
|
|
1442
|
+
.mermaid-frame-pan { scrollbar-width: none; -ms-overflow-style: none; }
|
|
1443
|
+
.mermaid-frame-pan::-webkit-scrollbar { display: none; }
|
|
1438
1444
|
.mermaid-svg-container svg {
|
|
1439
|
-
max-width: 100
|
|
1440
|
-
height: auto
|
|
1441
|
-
min-height: 200px;
|
|
1445
|
+
max-width: 100%;
|
|
1446
|
+
height: auto;
|
|
1442
1447
|
font-family: 'DM Sans', sans-serif !important;
|
|
1443
1448
|
font-size: 14px !important;
|
|
1444
1449
|
}
|
|
1445
|
-
@media (min-width: 1520px) {
|
|
1446
|
-
.mermaid-svg-container svg {
|
|
1447
|
-
max-width: 900px !important;
|
|
1448
|
-
max-height: 700px !important;
|
|
1449
|
-
min-height: 300px;
|
|
1450
|
-
font-size: 16px !important;
|
|
1451
|
-
}
|
|
1452
|
-
}
|
|
1453
|
-
@media (min-width: 768px) and (max-width: 1519px) {
|
|
1454
|
-
.mermaid-svg-container svg {
|
|
1455
|
-
max-width: 700px !important;
|
|
1456
|
-
max-height: 600px !important;
|
|
1457
|
-
min-height: 250px;
|
|
1458
|
-
font-size: 15px !important;
|
|
1459
|
-
}
|
|
1460
|
-
}
|
|
1461
|
-
@media (max-width: 767px) {
|
|
1462
|
-
.mermaid-svg-container svg {
|
|
1463
|
-
max-width: 90vw !important;
|
|
1464
|
-
max-height: 400px !important;
|
|
1465
|
-
min-height: 200px;
|
|
1466
|
-
font-size: 13px !important;
|
|
1467
|
-
}
|
|
1468
|
-
}
|
|
1469
|
-
.mermaid-svg-container svg[width] { width: 100% !important; }
|
|
1470
1450
|
.mermaid-svg-container .node rect,
|
|
1471
1451
|
.mermaid-svg-container .node circle,
|
|
1472
1452
|
.mermaid-svg-container .node ellipse,
|
|
@@ -1481,15 +1461,122 @@ var mermaidStyles = `
|
|
|
1481
1461
|
.mermaid-svg-container .edgeLabel text { font-size: 16px !important; }
|
|
1482
1462
|
}
|
|
1483
1463
|
`;
|
|
1464
|
+
var MERMAID_ZOOM_MIN = 0.25;
|
|
1465
|
+
var MERMAID_ZOOM_MAX = 4;
|
|
1466
|
+
var MERMAID_ZOOM_STEP = 1.25;
|
|
1467
|
+
var clampZoom = (z) => Math.min(MERMAID_ZOOM_MAX, Math.max(MERMAID_ZOOM_MIN, z));
|
|
1484
1468
|
var mermaidRenderSeq = 0;
|
|
1485
|
-
var
|
|
1469
|
+
var FRAME_CLASS = {
|
|
1470
|
+
content: "min-h-[200px] max-h-[70svh] md:min-h-[250px]",
|
|
1471
|
+
fold: "h-[70svh] min-h-[320px]"
|
|
1472
|
+
};
|
|
1473
|
+
var MermaidDiagram = ({
|
|
1474
|
+
chart,
|
|
1475
|
+
zoomable = true,
|
|
1476
|
+
frame = "content"
|
|
1477
|
+
}) => {
|
|
1486
1478
|
const [svg, setSvg] = _react.useState.call(void 0, "");
|
|
1487
1479
|
const [error, setError] = _react.useState.call(void 0, "");
|
|
1488
1480
|
const [isLoading, setIsLoading] = _react.useState.call(void 0, true);
|
|
1481
|
+
const [zoom, setZoom] = _react.useState.call(void 0, 1);
|
|
1482
|
+
const [dragging, setDragging] = _react.useState.call(void 0, false);
|
|
1483
|
+
const empty = !chart.trim();
|
|
1484
|
+
const naturalWidth = _react.useMemo.call(void 0, () => {
|
|
1485
|
+
const px = Number(_optionalChain([svg, 'access', _27 => _27.match, 'call', _28 => _28(/max-width:\s*([\d.]+)px/), 'optionalAccess', _29 => _29[1]]));
|
|
1486
|
+
return Number.isFinite(px) && px > 0 ? Math.ceil(px) : null;
|
|
1487
|
+
}, [svg]);
|
|
1488
|
+
const scrollRef = _react.useRef.call(void 0, null);
|
|
1489
|
+
const pendingAnchor = _react.useRef.call(void 0, null);
|
|
1490
|
+
const applyZoom = _react.useCallback.call(void 0, (next, anchor) => {
|
|
1491
|
+
setZoom((current) => {
|
|
1492
|
+
const target = clampZoom(Math.round(next * 100) / 100);
|
|
1493
|
+
if (target === current) return current;
|
|
1494
|
+
const el = scrollRef.current;
|
|
1495
|
+
const ax = _nullishCoalesce(_optionalChain([anchor, 'optionalAccess', _30 => _30.ax]), () => ( (el ? el.clientWidth / 2 : 0)));
|
|
1496
|
+
const ay = _nullishCoalesce(_optionalChain([anchor, 'optionalAccess', _31 => _31.ay]), () => ( (el ? el.clientHeight / 2 : 0)));
|
|
1497
|
+
pendingAnchor.current = { ratio: target / current, ax, ay };
|
|
1498
|
+
return target;
|
|
1499
|
+
});
|
|
1500
|
+
}, []);
|
|
1501
|
+
_react.useLayoutEffect.call(void 0, () => {
|
|
1502
|
+
const el = scrollRef.current;
|
|
1503
|
+
const pending = pendingAnchor.current;
|
|
1504
|
+
if (!el || !pending) return;
|
|
1505
|
+
pendingAnchor.current = null;
|
|
1506
|
+
el.scrollLeft = (el.scrollLeft + pending.ax) * pending.ratio - pending.ax;
|
|
1507
|
+
el.scrollTop = (el.scrollTop + pending.ay) * pending.ratio - pending.ay;
|
|
1508
|
+
}, [zoom]);
|
|
1509
|
+
const zoomBy = _react.useCallback.call(void 0,
|
|
1510
|
+
(factor, anchor) => applyZoom(zoom * factor, anchor),
|
|
1511
|
+
[applyZoom, zoom]
|
|
1512
|
+
);
|
|
1513
|
+
const fit = _react.useCallback.call(void 0, () => {
|
|
1514
|
+
const el = scrollRef.current;
|
|
1515
|
+
const svgEl = _optionalChain([el, 'optionalAccess', _32 => _32.querySelector, 'call', _33 => _33("svg")]);
|
|
1516
|
+
if (!el || !svgEl) return;
|
|
1517
|
+
const box = svgEl.getBoundingClientRect();
|
|
1518
|
+
const w = box.width / zoom;
|
|
1519
|
+
const h = box.height / zoom;
|
|
1520
|
+
if (!(w > 0 && h > 0)) return;
|
|
1521
|
+
const next = Math.min(1, el.clientWidth / w, el.clientHeight / h);
|
|
1522
|
+
pendingAnchor.current = null;
|
|
1523
|
+
setZoom(clampZoom(Math.floor(next * 100) / 100));
|
|
1524
|
+
el.scrollTo({ left: 0, top: 0 });
|
|
1525
|
+
}, [zoom]);
|
|
1526
|
+
_react.useEffect.call(void 0, () => {
|
|
1527
|
+
const el = scrollRef.current;
|
|
1528
|
+
if (!el || !zoomable) return void 0;
|
|
1529
|
+
const onWheel = (e) => {
|
|
1530
|
+
if (!(e.ctrlKey || e.metaKey)) return;
|
|
1531
|
+
e.preventDefault();
|
|
1532
|
+
const rect = el.getBoundingClientRect();
|
|
1533
|
+
applyZoom(zoom * Math.exp(-e.deltaY * 25e-4), { ax: e.clientX - rect.left, ay: e.clientY - rect.top });
|
|
1534
|
+
};
|
|
1535
|
+
el.addEventListener("wheel", onWheel, { passive: false });
|
|
1536
|
+
return () => el.removeEventListener("wheel", onWheel);
|
|
1537
|
+
}, [zoomable, svg, zoom, applyZoom]);
|
|
1538
|
+
const drag = _react.useRef.call(void 0, null);
|
|
1539
|
+
const onPointerDown = (e) => {
|
|
1540
|
+
if (!zoomable || e.button !== 0 || e.pointerType === "touch") return;
|
|
1541
|
+
const el = scrollRef.current;
|
|
1542
|
+
if (!el) return;
|
|
1543
|
+
e.preventDefault();
|
|
1544
|
+
drag.current = { x: e.clientX, y: e.clientY, left: el.scrollLeft, top: el.scrollTop };
|
|
1545
|
+
_optionalChain([el, 'access', _34 => _34.setPointerCapture, 'optionalCall', _35 => _35(e.pointerId)]);
|
|
1546
|
+
el.focus({ preventScroll: true });
|
|
1547
|
+
setDragging(true);
|
|
1548
|
+
};
|
|
1549
|
+
const onPointerMove = (e) => {
|
|
1550
|
+
const d = drag.current;
|
|
1551
|
+
const el = scrollRef.current;
|
|
1552
|
+
if (!d || !el) return;
|
|
1553
|
+
el.scrollLeft = d.left - (e.clientX - d.x);
|
|
1554
|
+
el.scrollTop = d.top - (e.clientY - d.y);
|
|
1555
|
+
};
|
|
1556
|
+
const endDrag = (e) => {
|
|
1557
|
+
if (!drag.current) return;
|
|
1558
|
+
drag.current = null;
|
|
1559
|
+
_optionalChain([scrollRef, 'access', _36 => _36.current, 'optionalAccess', _37 => _37.releasePointerCapture, 'optionalCall', _38 => _38(e.pointerId)]);
|
|
1560
|
+
setDragging(false);
|
|
1561
|
+
};
|
|
1562
|
+
const onKeyDown = (e) => {
|
|
1563
|
+
if (!zoomable || !svg) return;
|
|
1564
|
+
if (e.key === "+" || e.key === "=") zoomBy(MERMAID_ZOOM_STEP);
|
|
1565
|
+
else if (e.key === "-") zoomBy(1 / MERMAID_ZOOM_STEP);
|
|
1566
|
+
else if (e.key === "0") applyZoom(1);
|
|
1567
|
+
else if (e.key === "f" || e.key === "F") fit();
|
|
1568
|
+
else return;
|
|
1569
|
+
e.preventDefault();
|
|
1570
|
+
};
|
|
1489
1571
|
const mounted = useIsHydrated();
|
|
1490
1572
|
_react.useEffect.call(void 0, () => {
|
|
1491
1573
|
let cancelled = false;
|
|
1492
1574
|
const renderId = `mermaid-${mermaidRenderSeq += 1}`;
|
|
1575
|
+
if (empty) {
|
|
1576
|
+
return () => {
|
|
1577
|
+
cancelled = true;
|
|
1578
|
+
};
|
|
1579
|
+
}
|
|
1493
1580
|
const renderMermaid = async () => {
|
|
1494
1581
|
try {
|
|
1495
1582
|
setIsLoading(true);
|
|
@@ -1539,6 +1626,8 @@ var MermaidDiagram = ({ chart }) => {
|
|
|
1539
1626
|
);
|
|
1540
1627
|
if (cancelled) return;
|
|
1541
1628
|
setSvg(renderedSvg);
|
|
1629
|
+
pendingAnchor.current = null;
|
|
1630
|
+
setZoom(1);
|
|
1542
1631
|
setError("");
|
|
1543
1632
|
setIsLoading(false);
|
|
1544
1633
|
} catch (err) {
|
|
@@ -1553,36 +1642,113 @@ var MermaidDiagram = ({ chart }) => {
|
|
|
1553
1642
|
}
|
|
1554
1643
|
return () => {
|
|
1555
1644
|
cancelled = true;
|
|
1556
|
-
_optionalChain([document, 'access',
|
|
1557
|
-
_optionalChain([document, 'access',
|
|
1645
|
+
_optionalChain([document, 'access', _39 => _39.getElementById, 'call', _40 => _40(`d${renderId}`), 'optionalAccess', _41 => _41.remove, 'call', _42 => _42()]);
|
|
1646
|
+
_optionalChain([document, 'access', _43 => _43.getElementById, 'call', _44 => _44(renderId), 'optionalAccess', _45 => _45.remove, 'call', _46 => _46()]);
|
|
1558
1647
|
};
|
|
1559
|
-
}, [chart, mounted]);
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
}
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1648
|
+
}, [chart, empty, mounted]);
|
|
1649
|
+
const frameClass = `${FRAME_CLASS[frame]} flex w-full overflow-auto outline-none focus-visible:ring-1 focus-visible:ring-ods-accent ${zoomable && svg ? `mermaid-frame-pan select-none ${dragging ? "cursor-grabbing" : "cursor-grab"}` : ""}`;
|
|
1650
|
+
const frameStyle = { justifyContent: "safe center", alignItems: "safe center" };
|
|
1651
|
+
const body = error && !empty ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "error-state m-auto rounded-lg border border-ods-border bg-ods-card p-6", children: [
|
|
1652
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "error-icon mb-4 flex justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.AlertCircleIcon, { className: "h-12 w-12 text-ods-error" }) }),
|
|
1653
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "error-title mb-2 text-center font-sans text-lg font-semibold text-ods-error", children: "Diagram Error" }),
|
|
1654
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "error-description mb-4 max-w-full overflow-hidden break-words text-center font-sans text-sm text-ods-text-secondary", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-x-auto", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "pre", { className: "whitespace-pre-wrap break-words text-xs", children: error }) }) })
|
|
1655
|
+
] }) : empty || isLoading || !svg ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "skeleton-code m-auto animate-pulse font-sans text-ods-text-tertiary", children: isLoading ? "Loading diagram renderer..." : "Rendering diagram..." }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1656
|
+
"div",
|
|
1657
|
+
{
|
|
1658
|
+
className: "mermaid-svg-container flex shrink-0 justify-center",
|
|
1659
|
+
"data-testid": "mermaid-svg-container",
|
|
1660
|
+
"data-zoom": zoom,
|
|
1661
|
+
style: {
|
|
1662
|
+
fontSize: "14px",
|
|
1663
|
+
zoom,
|
|
1664
|
+
width: naturalWidth ? `min(${naturalWidth}px, calc(100% * ${zoom}))` : "100%"
|
|
1665
|
+
},
|
|
1666
|
+
dangerouslySetInnerHTML: { __html: svg }
|
|
1667
|
+
}
|
|
1668
|
+
);
|
|
1669
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mermaid-container relative my-6 rounded-lg border border-ods-border bg-ods-card p-4 md:p-6 lg:p-8", children: [
|
|
1571
1670
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "style", { dangerouslySetInnerHTML: { __html: mermaidStyles } }),
|
|
1572
|
-
|
|
1671
|
+
zoomable && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1573
1672
|
"div",
|
|
1574
1673
|
{
|
|
1575
|
-
className: "
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1674
|
+
className: "absolute right-2 top-2 z-10 flex items-center gap-[var(--spacing-system-xxs)] rounded-md bg-ods-card",
|
|
1675
|
+
role: "group",
|
|
1676
|
+
"aria-label": "Diagram zoom",
|
|
1677
|
+
children: [
|
|
1678
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1679
|
+
_chunkF6U2H42Lcjs.Button,
|
|
1680
|
+
{
|
|
1681
|
+
variant: "outline",
|
|
1682
|
+
size: "icon-sm",
|
|
1683
|
+
"aria-label": "Zoom out",
|
|
1684
|
+
title: "Zoom out (\u2212, \u2318/Ctrl + wheel)",
|
|
1685
|
+
disabled: !svg || zoom <= MERMAID_ZOOM_MIN,
|
|
1686
|
+
onClick: () => zoomBy(1 / MERMAID_ZOOM_STEP),
|
|
1687
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ZoomOut, {})
|
|
1688
|
+
}
|
|
1689
|
+
),
|
|
1690
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1691
|
+
_chunkF6U2H42Lcjs.Button,
|
|
1692
|
+
{
|
|
1693
|
+
variant: "outline",
|
|
1694
|
+
size: "compact",
|
|
1695
|
+
"aria-label": "Reset zoom",
|
|
1696
|
+
title: "Back to 100% (0)",
|
|
1697
|
+
disabled: !svg || zoom === 1,
|
|
1698
|
+
onClick: () => applyZoom(1),
|
|
1699
|
+
children: [
|
|
1700
|
+
Math.round(zoom * 100),
|
|
1701
|
+
"%"
|
|
1702
|
+
]
|
|
1703
|
+
}
|
|
1704
|
+
),
|
|
1705
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1706
|
+
_chunkF6U2H42Lcjs.Button,
|
|
1707
|
+
{
|
|
1708
|
+
variant: "outline",
|
|
1709
|
+
size: "icon-sm",
|
|
1710
|
+
"aria-label": "Zoom in",
|
|
1711
|
+
title: "Zoom in (+, \u2318/Ctrl + wheel)",
|
|
1712
|
+
disabled: !svg || zoom >= MERMAID_ZOOM_MAX,
|
|
1713
|
+
onClick: () => zoomBy(MERMAID_ZOOM_STEP),
|
|
1714
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ZoomIn, {})
|
|
1715
|
+
}
|
|
1716
|
+
),
|
|
1717
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1718
|
+
_chunkF6U2H42Lcjs.Button,
|
|
1719
|
+
{
|
|
1720
|
+
variant: "outline",
|
|
1721
|
+
size: "icon-sm",
|
|
1722
|
+
"aria-label": "Fit to frame",
|
|
1723
|
+
title: "Fit the whole diagram in the frame (f)",
|
|
1724
|
+
disabled: !svg,
|
|
1725
|
+
onClick: fit,
|
|
1726
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Maximize2, {})
|
|
1727
|
+
}
|
|
1582
1728
|
)
|
|
1583
|
-
|
|
1729
|
+
]
|
|
1584
1730
|
}
|
|
1585
|
-
)
|
|
1731
|
+
),
|
|
1732
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1733
|
+
"div",
|
|
1734
|
+
{
|
|
1735
|
+
ref: scrollRef,
|
|
1736
|
+
className: frameClass,
|
|
1737
|
+
style: frameStyle,
|
|
1738
|
+
"data-testid": "mermaid-frame",
|
|
1739
|
+
"data-frame": frame,
|
|
1740
|
+
tabIndex: zoomable && svg ? 0 : -1,
|
|
1741
|
+
role: zoomable && svg ? "region" : void 0,
|
|
1742
|
+
"aria-label": zoomable && svg ? "Diagram. Drag to pan; Ctrl or Cmd plus wheel, or + and -, to zoom; 0 resets; f fits." : void 0,
|
|
1743
|
+
title: zoomable && svg ? "Drag to pan \xB7 \u2318/Ctrl + wheel to zoom" : void 0,
|
|
1744
|
+
onPointerDown,
|
|
1745
|
+
onPointerMove,
|
|
1746
|
+
onPointerUp: endDrag,
|
|
1747
|
+
onPointerCancel: endDrag,
|
|
1748
|
+
onKeyDown,
|
|
1749
|
+
children: body
|
|
1750
|
+
}
|
|
1751
|
+
)
|
|
1586
1752
|
] });
|
|
1587
1753
|
};
|
|
1588
1754
|
|
|
@@ -1661,7 +1827,7 @@ function buildBaseComponents({
|
|
|
1661
1827
|
function MarkdownHeading({ node, children }) {
|
|
1662
1828
|
const mapped = useHeadingId(node);
|
|
1663
1829
|
const taken = useAssignedHeadingIds();
|
|
1664
|
-
const explicit = typeof _optionalChain([node, 'optionalAccess',
|
|
1830
|
+
const explicit = typeof _optionalChain([node, 'optionalAccess', _47 => _47.properties, 'optionalAccess', _48 => _48.id]) === "string" && node.properties.id !== "" ? node.properties.id : void 0;
|
|
1665
1831
|
const id = _nullishCoalesce(_nullishCoalesce(explicit, () => ( mapped)), () => ( resolveFallbackHeadingId(_chunkTLLJIGTPcjs.slugifyHeadingText.call(void 0, extractText(children)), taken)));
|
|
1666
1832
|
const EffectiveTag = Tag2 === "h1" && demoteMarkdownH1ToH2 ? "h2" : Tag2;
|
|
1667
1833
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, EffectiveTag, { id: id || void 0, className: headingClassName, children });
|
|
@@ -1738,7 +1904,7 @@ function buildBaseComponents({
|
|
|
1738
1904
|
if (inPageAnchorId === null) return;
|
|
1739
1905
|
if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || e.button !== 0) return;
|
|
1740
1906
|
const target = _chunkTLLJIGTPcjs.getHashTargetElement.call(void 0, inPageAnchorId);
|
|
1741
|
-
if (!_optionalChain([target, 'optionalAccess',
|
|
1907
|
+
if (!_optionalChain([target, 'optionalAccess', _49 => _49.id])) return;
|
|
1742
1908
|
e.preventDefault();
|
|
1743
1909
|
_chunkTLLJIGTPcjs.navigateSamePageHash.call(void 0, `#${target.id}`, { headerOffset: _chunkTLLJIGTPcjs.HUB_HEADER_OFFSET_PX });
|
|
1744
1910
|
};
|
|
@@ -1747,8 +1913,8 @@ function buildBaseComponents({
|
|
|
1747
1913
|
{
|
|
1748
1914
|
href,
|
|
1749
1915
|
className: `relative text-ods-accent no-underline transition-colors duration-200 after:absolute after:-bottom-0.5 after:left-0 after:h-0.5 after:w-0 after:bg-ods-accent after:transition-all after:duration-300 after:content-[''] hover:after:w-full ${linkClassName || ""}`,
|
|
1750
|
-
target: _optionalChain([href, 'optionalAccess',
|
|
1751
|
-
rel: _optionalChain([href, 'optionalAccess',
|
|
1916
|
+
target: _optionalChain([href, 'optionalAccess', _50 => _50.startsWith, 'call', _51 => _51("http")]) ? "_blank" : void 0,
|
|
1917
|
+
rel: _optionalChain([href, 'optionalAccess', _52 => _52.startsWith, 'call', _53 => _53("http")]) ? "noopener noreferrer" : void 0,
|
|
1752
1918
|
onClick: inPageAnchorId !== null ? handleAnchorClick : void 0,
|
|
1753
1919
|
children
|
|
1754
1920
|
}
|
|
@@ -2153,7 +2319,7 @@ function buildSanitizeSchema(options = {}) {
|
|
|
2153
2319
|
clobber: [],
|
|
2154
2320
|
protocols: {
|
|
2155
2321
|
..._rehypesanitize.defaultSchema.protocols,
|
|
2156
|
-
href: [..._nullishCoalesce(_optionalChain([_rehypesanitize.defaultSchema, 'access',
|
|
2322
|
+
href: [..._nullishCoalesce(_optionalChain([_rehypesanitize.defaultSchema, 'access', _54 => _54.protocols, 'optionalAccess', _55 => _55.href]), () => ( [])), "card", "mention"]
|
|
2157
2323
|
}
|
|
2158
2324
|
};
|
|
2159
2325
|
}
|
|
@@ -2385,7 +2551,7 @@ function visualColumn(line, upTo) {
|
|
|
2385
2551
|
return col;
|
|
2386
2552
|
}
|
|
2387
2553
|
function leadingIndent(line) {
|
|
2388
|
-
const ws = _nullishCoalesce(_optionalChain([/^[ \t]*/, 'access',
|
|
2554
|
+
const ws = _nullishCoalesce(_optionalChain([/^[ \t]*/, 'access', _56 => _56.exec, 'call', _57 => _57(line), 'optionalAccess', _58 => _58[0]]), () => ( ""));
|
|
2389
2555
|
return visualColumn(line, ws.length);
|
|
2390
2556
|
}
|
|
2391
2557
|
function charIndexAtColumn(line, col) {
|
|
@@ -2487,7 +2653,7 @@ var LINK_DEF_CONT_PREFIX_RE = / {0,3}(?:>[ \t]?)*[ \t]{0,16}/y;
|
|
|
2487
2653
|
var LINK_DEF_OPEN_RE = new RegExp(`^${LINK_DEF_CONTAINER_PREFIX}\\[(?!\\^)`);
|
|
2488
2654
|
function contPrefixLen(c) {
|
|
2489
2655
|
LINK_DEF_CONT_PREFIX_RE.lastIndex = 0;
|
|
2490
|
-
return _nullishCoalesce(_optionalChain([LINK_DEF_CONT_PREFIX_RE, 'access',
|
|
2656
|
+
return _nullishCoalesce(_optionalChain([LINK_DEF_CONT_PREFIX_RE, 'access', _59 => _59.exec, 'call', _60 => _60(c), 'optionalAccess', _61 => _61[0], 'access', _62 => _62.length]), () => ( 0));
|
|
2491
2657
|
}
|
|
2492
2658
|
function findLabelClose(lines, i, from) {
|
|
2493
2659
|
for (let j = i; j < lines.length; j++) {
|
|
@@ -2655,7 +2821,7 @@ function blankTagAttributes(masked) {
|
|
|
2655
2821
|
}
|
|
2656
2822
|
function footnoteIndentCols(c) {
|
|
2657
2823
|
FOOTNOTE_QUOTE_PREFIX_RE.lastIndex = 0;
|
|
2658
|
-
let q = _nullishCoalesce(_optionalChain([FOOTNOTE_QUOTE_PREFIX_RE, 'access',
|
|
2824
|
+
let q = _nullishCoalesce(_optionalChain([FOOTNOTE_QUOTE_PREFIX_RE, 'access', _63 => _63.exec, 'call', _64 => _64(c), 'optionalAccess', _65 => _65[0], 'access', _66 => _66.length]), () => ( 0));
|
|
2659
2825
|
let col = 0;
|
|
2660
2826
|
for (; q < c.length && isSpaceTab(c[q]); q++) col = c[q] === " " ? col + 4 - col % 4 : col + 1;
|
|
2661
2827
|
return col;
|
|
@@ -3516,7 +3682,7 @@ var MarkdownEngineImpl = ({
|
|
|
3516
3682
|
streaming = false
|
|
3517
3683
|
}) => {
|
|
3518
3684
|
const textSizes = _react.useMemo.call(void 0, () => resolveTextSizeConfig(textSize), [textSize]);
|
|
3519
|
-
const extraTagsKey = _nullishCoalesce(_optionalChain([extraAllowedHtmlTags, 'optionalAccess',
|
|
3685
|
+
const extraTagsKey = _nullishCoalesce(_optionalChain([extraAllowedHtmlTags, 'optionalAccess', _67 => _67.join, 'call', _68 => _68("|")]), () => ( ""));
|
|
3520
3686
|
const effectiveTags = _react.useMemo.call(void 0,
|
|
3521
3687
|
() => buildEffectiveTagSet(extraTagsKey ? extraTagsKey.split("|") : void 0),
|
|
3522
3688
|
[extraTagsKey]
|
|
@@ -3751,7 +3917,7 @@ var AskDisplay = _react.forwardRef.call(void 0, ({ className, cards: cards2, onS
|
|
|
3751
3917
|
{
|
|
3752
3918
|
type: "button",
|
|
3753
3919
|
disabled: !isInteractive,
|
|
3754
|
-
onClick: () => _optionalChain([onSelect, 'optionalCall',
|
|
3920
|
+
onClick: () => _optionalChain([onSelect, 'optionalCall', _69 => _69(option.label)]),
|
|
3755
3921
|
className: _chunkX7CEWD6Vcjs.cn.call(void 0,
|
|
3756
3922
|
"flex w-full items-start gap-[var(--spacing-system-s)] bg-ods-card p-[var(--spacing-system-s)] text-left transition-colors",
|
|
3757
3923
|
optionIndex > 0 && "border-t border-ods-border",
|
|
@@ -4243,13 +4409,13 @@ function OverlayOpenRegistryProvider({ onOpenChange, children }) {
|
|
|
4243
4409
|
() => ({
|
|
4244
4410
|
acquire: () => {
|
|
4245
4411
|
countRef.current += 1;
|
|
4246
|
-
if (countRef.current === 1) _optionalChain([onOpenChangeRef, 'access',
|
|
4412
|
+
if (countRef.current === 1) _optionalChain([onOpenChangeRef, 'access', _70 => _70.current, 'optionalCall', _71 => _71(true)]);
|
|
4247
4413
|
let released = false;
|
|
4248
4414
|
return () => {
|
|
4249
4415
|
if (released) return;
|
|
4250
4416
|
released = true;
|
|
4251
4417
|
countRef.current -= 1;
|
|
4252
|
-
if (countRef.current === 0) _optionalChain([onOpenChangeRef, 'access',
|
|
4418
|
+
if (countRef.current === 0) _optionalChain([onOpenChangeRef, 'access', _72 => _72.current, 'optionalCall', _73 => _73(false)]);
|
|
4253
4419
|
};
|
|
4254
4420
|
}
|
|
4255
4421
|
}),
|
|
@@ -4272,7 +4438,7 @@ var SecondaryAction = ({ action }) => {
|
|
|
4272
4438
|
e.preventDefault();
|
|
4273
4439
|
return;
|
|
4274
4440
|
}
|
|
4275
|
-
_optionalChain([action, 'access',
|
|
4441
|
+
_optionalChain([action, 'access', _74 => _74.onClick, 'optionalCall', _75 => _75()]);
|
|
4276
4442
|
},
|
|
4277
4443
|
[action]
|
|
4278
4444
|
);
|
|
@@ -4316,13 +4482,13 @@ var MenuItem = ({ item, onItemClick }) => {
|
|
|
4316
4482
|
const activate = _react.useCallback.call(void 0, () => {
|
|
4317
4483
|
if (item.disabled) return;
|
|
4318
4484
|
if (item.type === "checkbox") {
|
|
4319
|
-
_optionalChain([item, 'access',
|
|
4320
|
-
_optionalChain([onItemClick, 'optionalCall',
|
|
4485
|
+
_optionalChain([item, 'access', _76 => _76.onClick, 'optionalCall', _77 => _77()]);
|
|
4486
|
+
_optionalChain([onItemClick, 'optionalCall', _78 => _78(item)]);
|
|
4321
4487
|
return;
|
|
4322
4488
|
}
|
|
4323
4489
|
if (item.type === "submenu") return;
|
|
4324
|
-
_optionalChain([item, 'access',
|
|
4325
|
-
_optionalChain([onItemClick, 'optionalCall',
|
|
4490
|
+
_optionalChain([item, 'access', _79 => _79.onClick, 'optionalCall', _80 => _80()]);
|
|
4491
|
+
_optionalChain([onItemClick, 'optionalCall', _81 => _81(item)]);
|
|
4326
4492
|
}, [item, onItemClick]);
|
|
4327
4493
|
const handleClick = _react.useCallback.call(void 0,
|
|
4328
4494
|
(e) => {
|
|
@@ -4348,8 +4514,8 @@ var MenuItem = ({ item, onItemClick }) => {
|
|
|
4348
4514
|
e.stopPropagation();
|
|
4349
4515
|
return;
|
|
4350
4516
|
}
|
|
4351
|
-
_optionalChain([item, 'access',
|
|
4352
|
-
_optionalChain([onItemClick, 'optionalCall',
|
|
4517
|
+
_optionalChain([item, 'access', _82 => _82.onClick, 'optionalCall', _83 => _83()]);
|
|
4518
|
+
_optionalChain([onItemClick, 'optionalCall', _84 => _84(item)]);
|
|
4353
4519
|
},
|
|
4354
4520
|
[item, onItemClick]
|
|
4355
4521
|
);
|
|
@@ -4514,7 +4680,7 @@ var ActionsMenuDropdown = ({
|
|
|
4514
4680
|
}, [open, setOpen]);
|
|
4515
4681
|
const handleItemClick = _react.useCallback.call(void 0,
|
|
4516
4682
|
(item) => {
|
|
4517
|
-
_optionalChain([onItemClick, 'optionalCall',
|
|
4683
|
+
_optionalChain([onItemClick, 'optionalCall', _85 => _85(item)]);
|
|
4518
4684
|
if (item.type !== "checkbox" && item.type !== "submenu" && item.closeOnSelect !== false) {
|
|
4519
4685
|
setOpen(false);
|
|
4520
4686
|
}
|
|
@@ -5461,7 +5627,7 @@ function resolveFromLibrary(iconName) {
|
|
|
5461
5627
|
return void 0;
|
|
5462
5628
|
}
|
|
5463
5629
|
function resolveIcon(iconName, opts) {
|
|
5464
|
-
if (_optionalChain([opts, 'optionalAccess',
|
|
5630
|
+
if (_optionalChain([opts, 'optionalAccess', _86 => _86.variant]) === "brand") {
|
|
5465
5631
|
return getIconComponent(iconName);
|
|
5466
5632
|
}
|
|
5467
5633
|
if (!iconName) return _chunkYRTMAXLEcjs.FileIcon;
|
|
@@ -5679,8 +5845,8 @@ function SlashCommandSuggestions({
|
|
|
5679
5845
|
children: commands.map((cmd, idx) => {
|
|
5680
5846
|
const Icon = resolveIcon(cmd.iconName);
|
|
5681
5847
|
const legacyMeta = !cmd.iconName && cmd.primarySourceId && resolveSourceIcon2 ? resolveSourceIcon2(cmd.primarySourceId) : void 0;
|
|
5682
|
-
const LegacyIcon = _optionalChain([legacyMeta, 'optionalAccess',
|
|
5683
|
-
const title = _nullishCoalesce(_nullishCoalesce(cmd.label, () => ( _optionalChain([legacyMeta, 'optionalAccess',
|
|
5848
|
+
const LegacyIcon = _optionalChain([legacyMeta, 'optionalAccess', _87 => _87.Icon]);
|
|
5849
|
+
const title = _nullishCoalesce(_nullishCoalesce(cmd.label, () => ( _optionalChain([legacyMeta, 'optionalAccess', _88 => _88.label]))), () => ( cmd.id));
|
|
5684
5850
|
const isHighlighted = idx === highlightedIdx;
|
|
5685
5851
|
const slashLabel = cmd.argumentHint ? `/${cmd.id} ${cmd.argumentHint}` : `/${cmd.id}`;
|
|
5686
5852
|
const cardActions = onAction && cmd.actions.length > 0 ? cmd.actions.map((action) => ({
|
|
@@ -5739,13 +5905,13 @@ function parseSegments(value, meta) {
|
|
|
5739
5905
|
if (m.index > last) segs.push({ kind: "text", text: value.slice(last, m.index) });
|
|
5740
5906
|
const token = m[0].slice(1);
|
|
5741
5907
|
const info = meta.get(token);
|
|
5742
|
-
segs.push({ kind: "mention", token, label: _nullishCoalesce(_optionalChain([info, 'optionalAccess',
|
|
5908
|
+
segs.push({ kind: "mention", token, label: _nullishCoalesce(_optionalChain([info, 'optionalAccess', _89 => _89.label]), () => ( token.slice(token.indexOf(":") + 1))), icon: _optionalChain([info, 'optionalAccess', _90 => _90.icon]) });
|
|
5743
5909
|
last = m.index + m[0].length;
|
|
5744
5910
|
}
|
|
5745
5911
|
if (last < value.length) segs.push({ kind: "text", text: value.slice(last) });
|
|
5746
5912
|
return segs;
|
|
5747
5913
|
}
|
|
5748
|
-
var isChip = (n) => n.nodeType === 1 && _optionalChain([n, 'access',
|
|
5914
|
+
var isChip = (n) => n.nodeType === 1 && _optionalChain([n, 'access', _91 => _91.dataset, 'optionalAccess', _92 => _92.token]) !== void 0;
|
|
5749
5915
|
function serialize(el) {
|
|
5750
5916
|
let out = "";
|
|
5751
5917
|
for (const node of Array.from(el.childNodes)) {
|
|
@@ -5799,7 +5965,7 @@ function placeCaretAtOffset(el, offset2) {
|
|
|
5799
5965
|
const node = el.firstChild;
|
|
5800
5966
|
const range = document.createRange();
|
|
5801
5967
|
if (node && node.nodeType === Node.TEXT_NODE) {
|
|
5802
|
-
range.setStart(node, Math.max(0, Math.min(offset2, _nullishCoalesce(_optionalChain([node, 'access',
|
|
5968
|
+
range.setStart(node, Math.max(0, Math.min(offset2, _nullishCoalesce(_optionalChain([node, 'access', _93 => _93.textContent, 'optionalAccess', _94 => _94.length]), () => ( 0)))));
|
|
5803
5969
|
range.collapse(true);
|
|
5804
5970
|
} else {
|
|
5805
5971
|
range.selectNodeContents(el);
|
|
@@ -5857,13 +6023,13 @@ var ChatInput = _react.forwardRef.call(void 0, (allProps, ref) => {
|
|
|
5857
6023
|
const metaRef = _react.useRef.call(void 0, /* @__PURE__ */ new Map());
|
|
5858
6024
|
const focusEditor = _react.useCallback.call(void 0, () => {
|
|
5859
6025
|
if (disabled) return;
|
|
5860
|
-
_optionalChain([editorRef, 'access',
|
|
6026
|
+
_optionalChain([editorRef, 'access', _95 => _95.current, 'optionalAccess', _96 => _96.focus, 'call', _97 => _97({ preventScroll: true })]);
|
|
5861
6027
|
}, [disabled]);
|
|
5862
6028
|
_react.useEffect.call(void 0, () => {
|
|
5863
6029
|
if (autoFocus) focusEditor();
|
|
5864
6030
|
}, [autoFocus, focusEditor]);
|
|
5865
6031
|
_react.useEffect.call(void 0, () => {
|
|
5866
|
-
_optionalChain([onValueChange, 'optionalCall',
|
|
6032
|
+
_optionalChain([onValueChange, 'optionalCall', _98 => _98(value)]);
|
|
5867
6033
|
}, [value, onValueChange]);
|
|
5868
6034
|
const previewTextRef = _react.useRef.call(void 0, previewText);
|
|
5869
6035
|
_react.useEffect.call(void 0, () => {
|
|
@@ -5920,7 +6086,7 @@ var ChatInput = _react.forwardRef.call(void 0, (allProps, ref) => {
|
|
|
5920
6086
|
ref,
|
|
5921
6087
|
() => ({
|
|
5922
6088
|
focus: () => focusEditor(),
|
|
5923
|
-
blur: () => _optionalChain([editorRef, 'access',
|
|
6089
|
+
blur: () => _optionalChain([editorRef, 'access', _99 => _99.current, 'optionalAccess', _100 => _100.blur, 'call', _101 => _101()]),
|
|
5924
6090
|
clear: () => {
|
|
5925
6091
|
metaRef.current = /* @__PURE__ */ new Map();
|
|
5926
6092
|
applyValue("");
|
|
@@ -5955,7 +6121,7 @@ var ChatInput = _react.forwardRef.call(void 0, (allProps, ref) => {
|
|
|
5955
6121
|
return m ? _nullishCoalesce(m[2], () => ( "")) : null;
|
|
5956
6122
|
}, [value, mentionEnabled]);
|
|
5957
6123
|
_react.useEffect.call(void 0, () => {
|
|
5958
|
-
if (mentionEnabled) _optionalChain([onMentionQueryChange, 'optionalCall',
|
|
6124
|
+
if (mentionEnabled) _optionalChain([onMentionQueryChange, 'optionalCall', _102 => _102(mentionQuery)]);
|
|
5959
6125
|
}, [mentionEnabled, mentionQuery, onMentionQueryChange]);
|
|
5960
6126
|
const slashMatch = _react.useMemo.call(void 0, () => slashCommands ? value.match(SLASH_INPUT_TRIGGER) : null, [value, slashCommands]);
|
|
5961
6127
|
const slashPrefix = slashMatch ? _nullishCoalesce(slashMatch[1], () => ( "")) : null;
|
|
@@ -5976,7 +6142,7 @@ var ChatInput = _react.forwardRef.call(void 0, (allProps, ref) => {
|
|
|
5976
6142
|
setHighlightedIdx(0);
|
|
5977
6143
|
}
|
|
5978
6144
|
} catch (err) {
|
|
5979
|
-
if (!cancelled && _optionalChain([err, 'optionalAccess',
|
|
6145
|
+
if (!cancelled && _optionalChain([err, 'optionalAccess', _103 => _103.name]) !== "AbortError") {
|
|
5980
6146
|
console.warn("[chat-input] slash-command fetch failed:", err);
|
|
5981
6147
|
}
|
|
5982
6148
|
}
|
|
@@ -6144,8 +6310,8 @@ var ChatInput = _react.forwardRef.call(void 0, (allProps, ref) => {
|
|
|
6144
6310
|
highlightedIdx,
|
|
6145
6311
|
onHover: setHighlightedIdx,
|
|
6146
6312
|
onSelect: acceptSuggestion,
|
|
6147
|
-
resolveSourceIcon: _optionalChain([slashCommands, 'optionalAccess',
|
|
6148
|
-
onAction: _optionalChain([slashCommands, 'optionalAccess',
|
|
6313
|
+
resolveSourceIcon: _optionalChain([slashCommands, 'optionalAccess', _104 => _104.resolveSourceIcon]),
|
|
6314
|
+
onAction: _optionalChain([slashCommands, 'optionalAccess', _105 => _105.onAction])
|
|
6149
6315
|
}
|
|
6150
6316
|
),
|
|
6151
6317
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
@@ -6588,7 +6754,7 @@ function ChatContextPicker({
|
|
|
6588
6754
|
if (!open) return void 0;
|
|
6589
6755
|
const onDocDown = (e) => {
|
|
6590
6756
|
const target = e.target;
|
|
6591
|
-
if (_optionalChain([rootRef, 'access',
|
|
6757
|
+
if (_optionalChain([rootRef, 'access', _106 => _106.current, 'optionalAccess', _107 => _107.contains, 'call', _108 => _108(target)]) || _optionalChain([target, 'optionalAccess', _109 => _109.closest, 'optionalCall', _110 => _110("[data-context-trigger]")])) return;
|
|
6592
6758
|
onClose();
|
|
6593
6759
|
};
|
|
6594
6760
|
document.addEventListener("mousedown", onDocDown);
|
|
@@ -6596,7 +6762,7 @@ function ChatContextPicker({
|
|
|
6596
6762
|
}, [open, onClose]);
|
|
6597
6763
|
_react.useEffect.call(void 0, () => {
|
|
6598
6764
|
if (!open || view !== "items") return void 0;
|
|
6599
|
-
const id = requestAnimationFrame(() => _optionalChain([searchRef, 'access',
|
|
6765
|
+
const id = requestAnimationFrame(() => _optionalChain([searchRef, 'access', _111 => _111.current, 'optionalAccess', _112 => _112.focus, 'call', _113 => _113()]));
|
|
6600
6766
|
return () => cancelAnimationFrame(id);
|
|
6601
6767
|
}, [open, view]);
|
|
6602
6768
|
_react.useEffect.call(void 0, () => {
|
|
@@ -6678,7 +6844,7 @@ function ChatContextPicker({
|
|
|
6678
6844
|
{
|
|
6679
6845
|
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.Upload02Icon, { size: 24 }),
|
|
6680
6846
|
label: "Upload File",
|
|
6681
|
-
onClick: () => _optionalChain([config, 'access',
|
|
6847
|
+
onClick: () => _optionalChain([config, 'access', _114 => _114.onUploadFile, 'optionalCall', _115 => _115()])
|
|
6682
6848
|
}
|
|
6683
6849
|
),
|
|
6684
6850
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ContextMenuRow, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.PackagePlusIcon, { size: 24 }), label: "Assign Item", onClick: () => setView("types") })
|
|
@@ -6773,7 +6939,7 @@ function ChatContextChipStrip({
|
|
|
6773
6939
|
// `tag` pills (Figma 1:6073): 32px tall, card surface, bordered, mono-
|
|
6774
6940
|
// uppercase label, 16px lead icon + xmark-circle remove. Wraps to new rows.
|
|
6775
6941
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunkX7CEWD6Vcjs.cn.call(void 0, "flex flex-wrap content-center items-center gap-2", className), children: items.map((item) => {
|
|
6776
|
-
const hostNode = _optionalChain([renderItem, 'optionalCall',
|
|
6942
|
+
const hostNode = _optionalChain([renderItem, 'optionalCall', _116 => _116(item)]);
|
|
6777
6943
|
if (hostNode != null) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react.Fragment, { children: hostNode }, itemKey2(item));
|
|
6778
6944
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
6779
6945
|
"div",
|
|
@@ -6927,7 +7093,7 @@ var ToolExecutionDisplay = _react.forwardRef.call(void 0,
|
|
|
6927
7093
|
const isExecuting = message.type === "EXECUTING_TOOL";
|
|
6928
7094
|
const isExecuted = message.type === "EXECUTED_TOOL";
|
|
6929
7095
|
const integratedToolType = message.integratedToolType || "OPENFRAME";
|
|
6930
|
-
const previewText = variant === "client" ? _optionalChain([message, 'access',
|
|
7096
|
+
const previewText = variant === "client" ? _optionalChain([message, 'access', _117 => _117.toolExplanation, 'optionalAccess', _118 => _118.trim, 'call', _119 => _119()]) : _optionalChain([message, 'access', _120 => _120.toolTitle, 'optionalAccess', _121 => _121.trim, 'call', _122 => _122()]);
|
|
6931
7097
|
const argEntries = _react.useMemo.call(void 0, () => {
|
|
6932
7098
|
if (!message.parameters || typeof message.parameters !== "object") return [];
|
|
6933
7099
|
const entries = Object.entries(message.parameters).filter(([, v]) => v !== null && v !== void 0 && v !== "");
|
|
@@ -7046,7 +7212,7 @@ function groupAskRuns(segments) {
|
|
|
7046
7212
|
runs.set(index, [segment]);
|
|
7047
7213
|
return;
|
|
7048
7214
|
}
|
|
7049
|
-
_optionalChain([runs, 'access',
|
|
7215
|
+
_optionalChain([runs, 'access', _123 => _123.get, 'call', _124 => _124(headIndex), 'optionalAccess', _125 => _125.push, 'call', _126 => _126(segment)]);
|
|
7050
7216
|
});
|
|
7051
7217
|
return runs;
|
|
7052
7218
|
}
|
|
@@ -7176,7 +7342,7 @@ var ChatMessageEnhanced = _react.forwardRef.call(void 0,
|
|
|
7176
7342
|
}, [hasMarkerSupport, renderEntityCard, refByKey, segments]);
|
|
7177
7343
|
_react.useEffect.call(void 0, () => {
|
|
7178
7344
|
const cache = renderedCardNodeCache.current;
|
|
7179
|
-
const usedKeys = _optionalChain([renderingPlan, 'optionalAccess',
|
|
7345
|
+
const usedKeys = _optionalChain([renderingPlan, 'optionalAccess', _127 => _127.usedKeys]);
|
|
7180
7346
|
if (!usedKeys) return;
|
|
7181
7347
|
if (cache.size <= usedKeys.size) return;
|
|
7182
7348
|
for (const k of [...cache.keys()]) {
|
|
@@ -7199,7 +7365,7 @@ var ChatMessageEnhanced = _react.forwardRef.call(void 0,
|
|
|
7199
7365
|
const sepIdx = stripped.indexOf(":");
|
|
7200
7366
|
const marker = sepIdx === -1 ? stripped : stripped.slice(0, sepIdx);
|
|
7201
7367
|
const id = sepIdx === -1 ? "" : stripped.slice(sepIdx + 1);
|
|
7202
|
-
const node = _optionalChain([renderMention, 'optionalCall',
|
|
7368
|
+
const node = _optionalChain([renderMention, 'optionalCall', _128 => _128({ marker, id })]);
|
|
7203
7369
|
if (node != null) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: node });
|
|
7204
7370
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-text-secondary opacity-60", children });
|
|
7205
7371
|
}
|
|
@@ -7210,7 +7376,7 @@ var ChatMessageEnhanced = _react.forwardRef.call(void 0,
|
|
|
7210
7376
|
const cardType = stripped.slice(0, sepIdx);
|
|
7211
7377
|
const cardId = stripped.slice(sepIdx + 1);
|
|
7212
7378
|
const key = `${cardType}:${cardId}`;
|
|
7213
|
-
const inline = _optionalChain([renderingPlanRef, 'access',
|
|
7379
|
+
const inline = _optionalChain([renderingPlanRef, 'access', _129 => _129.current, 'optionalAccess', _130 => _130.inlineByKey, 'access', _131 => _131.get, 'call', _132 => _132(key)]);
|
|
7214
7380
|
if (inline != null) return inline;
|
|
7215
7381
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-text-secondary opacity-60", children: cardId });
|
|
7216
7382
|
}
|
|
@@ -7223,7 +7389,7 @@ var ChatMessageEnhanced = _react.forwardRef.call(void 0,
|
|
|
7223
7389
|
};
|
|
7224
7390
|
}, [hasMarkerSupport, hasMentionSupport, renderMention, NavLinkAnchor]);
|
|
7225
7391
|
const renderSegmentBody = (segIndex, text2, isStreaming) => {
|
|
7226
|
-
const parts = _optionalChain([renderingPlan, 'optionalAccess',
|
|
7392
|
+
const parts = _optionalChain([renderingPlan, 'optionalAccess', _133 => _133.partsBySegment, 'access', _134 => _134.get, 'call', _135 => _135(segIndex)]);
|
|
7227
7393
|
if (!parts || parts.length === 0) {
|
|
7228
7394
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7229
7395
|
SimpleMarkdownRenderer,
|
|
@@ -7396,7 +7562,7 @@ var ChatMessageEnhanced = _react.forwardRef.call(void 0,
|
|
|
7396
7562
|
);
|
|
7397
7563
|
ChatMessageEnhanced.displayName = "ChatMessageEnhanced";
|
|
7398
7564
|
var MemoizedChatMessageEnhanced = _react.memo.call(void 0, ChatMessageEnhanced, (prevProps, nextProps) => {
|
|
7399
|
-
return prevProps.role === nextProps.role && prevProps.content === nextProps.content && prevProps.name === nextProps.name && prevProps.avatar === nextProps.avatar && prevProps.isTyping === nextProps.isTyping && _optionalChain([prevProps, 'access',
|
|
7565
|
+
return prevProps.role === nextProps.role && prevProps.content === nextProps.content && prevProps.name === nextProps.name && prevProps.avatar === nextProps.avatar && prevProps.isTyping === nextProps.isTyping && _optionalChain([prevProps, 'access', _136 => _136.timestamp, 'optionalAccess', _137 => _137.getTime, 'call', _138 => _138()]) === _optionalChain([nextProps, 'access', _139 => _139.timestamp, 'optionalAccess', _140 => _140.getTime, 'call', _141 => _141()]) && prevProps.showAvatar === nextProps.showAvatar && prevProps.assistantType === nextProps.assistantType && prevProps.approvalVariant === nextProps.approvalVariant && prevProps.authorType === nextProps.authorType && prevProps.assistantIcon === nextProps.assistantIcon && prevProps.className === nextProps.className && // Reference equality — the host re-uses the same array instance per
|
|
7400
7566
|
// message (it's set once on the optimistic send and never mutated).
|
|
7401
7567
|
prevProps.contextItems === nextProps.contextItems && prevProps.resolveContextIcon === nextProps.resolveContextIcon && prevProps.renderContextItem === nextProps.renderContextItem && // Host keeps this stable (module const / useCallback), so reference
|
|
7402
7568
|
// equality holds across streaming chunks.
|
|
@@ -7663,7 +7829,7 @@ var ChatMessageList = _react.forwardRef.call(void 0,
|
|
|
7663
7829
|
const prevCount = prevRenderRef.current.messageCount;
|
|
7664
7830
|
const prevLastId = prevRenderRef.current.lastMessageId;
|
|
7665
7831
|
const newCount = messages.length;
|
|
7666
|
-
const currentLastId = _optionalChain([messages, 'access',
|
|
7832
|
+
const currentLastId = _optionalChain([messages, 'access', _142 => _142[messages.length - 1], 'optionalAccess', _143 => _143.id]);
|
|
7667
7833
|
prevRenderRef.current = { dialogId, messageCount: newCount, lastMessageId: currentLastId };
|
|
7668
7834
|
if (dialogChanged) {
|
|
7669
7835
|
followBottomRef.current = true;
|
|
@@ -7730,10 +7896,10 @@ var ChatMessageList = _react.forwardRef.call(void 0,
|
|
|
7730
7896
|
};
|
|
7731
7897
|
let touchY = null;
|
|
7732
7898
|
const onTouchStart = (e) => {
|
|
7733
|
-
touchY = _nullishCoalesce(_optionalChain([e, 'access',
|
|
7899
|
+
touchY = _nullishCoalesce(_optionalChain([e, 'access', _144 => _144.touches, 'access', _145 => _145[0], 'optionalAccess', _146 => _146.clientY]), () => ( null));
|
|
7734
7900
|
};
|
|
7735
7901
|
const onTouchMove = (e) => {
|
|
7736
|
-
const y = _optionalChain([e, 'access',
|
|
7902
|
+
const y = _optionalChain([e, 'access', _147 => _147.touches, 'access', _148 => _148[0], 'optionalAccess', _149 => _149.clientY]);
|
|
7737
7903
|
if (y == null || touchY == null) return;
|
|
7738
7904
|
if (y > touchY) disarm();
|
|
7739
7905
|
touchY = y;
|
|
@@ -7863,7 +8029,7 @@ var ChatMessageList = _react.forwardRef.call(void 0,
|
|
|
7863
8029
|
ro.observe(node);
|
|
7864
8030
|
const timer = setTimeout(() => {
|
|
7865
8031
|
ro.disconnect();
|
|
7866
|
-
if (_optionalChain([anchorWatcherRef, 'access',
|
|
8032
|
+
if (_optionalChain([anchorWatcherRef, 'access', _150 => _150.current, 'optionalAccess', _151 => _151.id]) === last.id) {
|
|
7867
8033
|
anchorWatcherRef.current = null;
|
|
7868
8034
|
}
|
|
7869
8035
|
}, 2e3);
|
|
@@ -7893,7 +8059,7 @@ var ChatMessageList = _react.forwardRef.call(void 0,
|
|
|
7893
8059
|
scrollTop: el.scrollTop
|
|
7894
8060
|
};
|
|
7895
8061
|
}
|
|
7896
|
-
_optionalChain([onLoadMoreRef, 'access',
|
|
8062
|
+
_optionalChain([onLoadMoreRef, 'access', _152 => _152.current, 'optionalCall', _153 => _153()]);
|
|
7897
8063
|
}
|
|
7898
8064
|
},
|
|
7899
8065
|
{ root: scrollContainer, rootMargin: "200px", threshold: 0.1 }
|
|
@@ -7927,8 +8093,8 @@ var ChatMessageList = _react.forwardRef.call(void 0,
|
|
|
7927
8093
|
);
|
|
7928
8094
|
}
|
|
7929
8095
|
const lastMessage = messages[messages.length - 1];
|
|
7930
|
-
const lastSegments = Array.isArray(_optionalChain([lastMessage, 'optionalAccess',
|
|
7931
|
-
const lastSegment = _optionalChain([lastSegments, 'optionalAccess',
|
|
8096
|
+
const lastSegments = Array.isArray(_optionalChain([lastMessage, 'optionalAccess', _154 => _154.content])) ? lastMessage.content : null;
|
|
8097
|
+
const lastSegment = _optionalChain([lastSegments, 'optionalAccess', _155 => _155[lastSegments.length - 1]]);
|
|
7932
8098
|
const isPausedOnApproval = !!lastSegment && (lastSegment.type === "approval_request" || lastSegment.type === "approval_batch" || lastSegment.type === "escalation_offer") && (lastSegment.status === void 0 || lastSegment.status === "pending");
|
|
7933
8099
|
const showStreamingLoader = isTyping && !isPausedOnApproval && !(pendingApprovals && pendingApprovals.length > 0);
|
|
7934
8100
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, OverlayOpenRegistryProvider, { onOpenChange: handleOverlayOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex min-h-0 flex-1 flex-col", children: [
|
|
@@ -7971,7 +8137,7 @@ var ChatMessageList = _react.forwardRef.call(void 0,
|
|
|
7971
8137
|
if (message.hidden) return null;
|
|
7972
8138
|
const isEmptyPendingTurn = index === messages.length - 1 && isTyping && message.role === "assistant" && !hasNonEmptyContent(message.content) && (!Array.isArray(message.content) || message.content.every((s) => s.type === "text"));
|
|
7973
8139
|
if (isEmptyPendingTurn) return null;
|
|
7974
|
-
const ownedContent = _optionalChain([renderAfterMessage, 'optionalCall',
|
|
8140
|
+
const ownedContent = _optionalChain([renderAfterMessage, 'optionalCall', _156 => _156(message, index)]);
|
|
7975
8141
|
const row = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7976
8142
|
MemoizedChatMessageEnhanced,
|
|
7977
8143
|
{
|
|
@@ -8151,7 +8317,7 @@ function EntityIcon({
|
|
|
8151
8317
|
size: size2 = 20,
|
|
8152
8318
|
className
|
|
8153
8319
|
}) {
|
|
8154
|
-
if (_optionalChain([icon, 'optionalAccess',
|
|
8320
|
+
if (_optionalChain([icon, 'optionalAccess', _157 => _157.url])) {
|
|
8155
8321
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8156
8322
|
_chunkWLSFBRT5cjs.next_image_default,
|
|
8157
8323
|
{
|
|
@@ -8165,7 +8331,7 @@ function EntityIcon({
|
|
|
8165
8331
|
}
|
|
8166
8332
|
);
|
|
8167
8333
|
}
|
|
8168
|
-
if (_optionalChain([icon, 'optionalAccess',
|
|
8334
|
+
if (_optionalChain([icon, 'optionalAccess', _158 => _158.name]) && BRAND_MARK_NAMES.has(icon.name)) {
|
|
8169
8335
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8170
8336
|
"span",
|
|
8171
8337
|
{
|
|
@@ -8175,8 +8341,8 @@ function EntityIcon({
|
|
|
8175
8341
|
}
|
|
8176
8342
|
);
|
|
8177
8343
|
}
|
|
8178
|
-
const Glyph = resolveIcon(_nullishCoalesce(_optionalChain([icon, 'optionalAccess',
|
|
8179
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Glyph, { size: size2, className, ..._nullishCoalesce(_optionalChain([icon, 'optionalAccess',
|
|
8344
|
+
const Glyph = resolveIcon(_nullishCoalesce(_optionalChain([icon, 'optionalAccess', _159 => _159.name]), () => ( void 0)));
|
|
8345
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Glyph, { size: size2, className, ..._nullishCoalesce(_optionalChain([icon, 'optionalAccess', _160 => _160.props]), () => ( {})) });
|
|
8180
8346
|
}
|
|
8181
8347
|
|
|
8182
8348
|
// src/components/chat/quick-action-chip.tsx
|
|
@@ -8186,7 +8352,7 @@ function getAgentAccent(slug) {
|
|
|
8186
8352
|
return slug === "fae" || slug === "mingo" ? AGENT_ACCENTS[slug] : void 0;
|
|
8187
8353
|
}
|
|
8188
8354
|
function accentFromIdentityIcon(icon) {
|
|
8189
|
-
const color = _optionalChain([icon, 'optionalAccess',
|
|
8355
|
+
const color = _optionalChain([icon, 'optionalAccess', _161 => _161.props, 'optionalAccess', _162 => _162.color]);
|
|
8190
8356
|
return typeof color === "string" && color.length > 0 ? color : void 0;
|
|
8191
8357
|
}
|
|
8192
8358
|
var ACCENT_CLASS = {
|
|
@@ -8268,7 +8434,7 @@ function QuickActionChipButton({
|
|
|
8268
8434
|
className
|
|
8269
8435
|
}) {
|
|
8270
8436
|
const themedIcon = theme && isQuickActionIconSpec(icon) && !icon.accent ? { ...icon, accent: theme.accent } : icon;
|
|
8271
|
-
const resolvedLozenge = lozenge === true ? _optionalChain([theme, 'optionalAccess',
|
|
8437
|
+
const resolvedLozenge = lozenge === true ? _optionalChain([theme, 'optionalAccess', _163 => _163.lozenge]) : lozenge === false ? void 0 : lozenge;
|
|
8272
8438
|
const resolvedIcon = renderQuickActionIcon(themedIcon);
|
|
8273
8439
|
const resolvedLabel = composeChipLabel(label, resolvedLozenge);
|
|
8274
8440
|
const tagVariant = selected ? selectedAccent === "cyan" ? "selectedCyan" : "selected" : variant;
|
|
@@ -8480,7 +8646,7 @@ function MarqueeWall({
|
|
|
8480
8646
|
if (!container || !copy) return;
|
|
8481
8647
|
const size2 = axis === "y" ? copy.offsetHeight : copy.offsetWidth;
|
|
8482
8648
|
copySizeRef.current = size2;
|
|
8483
|
-
const clone = _optionalChain([trackRef, 'access',
|
|
8649
|
+
const clone = _optionalChain([trackRef, 'access', _164 => _164.current, 'optionalAccess', _165 => _165.querySelector, 'call', _166 => _166('[data-marquee-copy="clone"]')]);
|
|
8484
8650
|
wrapSizeRef.current = clone ? axis === "y" ? clone.offsetTop - copy.offsetTop : clone.offsetLeft - copy.offsetLeft : size2 + (typeof copyGap === "number" ? copyGap : 0);
|
|
8485
8651
|
const avail = axis === "y" ? container.clientHeight : container.clientWidth;
|
|
8486
8652
|
setOverflows(size2 > avail + 1);
|
|
@@ -8501,7 +8667,7 @@ function MarqueeWall({
|
|
|
8501
8667
|
_react.useEffect.call(void 0, () => {
|
|
8502
8668
|
const el = containerRef.current;
|
|
8503
8669
|
if (!el || typeof IntersectionObserver === "undefined") return void 0;
|
|
8504
|
-
const io = new IntersectionObserver((entries) => setNearViewport(_nullishCoalesce(_optionalChain([entries, 'access',
|
|
8670
|
+
const io = new IntersectionObserver((entries) => setNearViewport(_nullishCoalesce(_optionalChain([entries, 'access', _167 => _167[0], 'optionalAccess', _168 => _168.isIntersecting]), () => ( true))), {
|
|
8505
8671
|
rootMargin: _chunkTLLJIGTPcjs.NEAR_VIEWPORT_ROOT_MARGIN
|
|
8506
8672
|
});
|
|
8507
8673
|
io.observe(el);
|
|
@@ -8612,7 +8778,7 @@ function MarqueeWall({
|
|
|
8612
8778
|
if (Math.abs(delta) > 3 && !dragMovedRef.current) {
|
|
8613
8779
|
dragMovedRef.current = true;
|
|
8614
8780
|
try {
|
|
8615
|
-
_optionalChain([containerRef, 'access',
|
|
8781
|
+
_optionalChain([containerRef, 'access', _169 => _169.current, 'optionalAccess', _170 => _170.setPointerCapture, 'call', _171 => _171(e.pointerId)]);
|
|
8616
8782
|
} catch (e7) {
|
|
8617
8783
|
}
|
|
8618
8784
|
}
|
|
@@ -8629,7 +8795,7 @@ function MarqueeWall({
|
|
|
8629
8795
|
dragSuppressUntilRef.current = performance.now() + DRAG_RESUME_MS;
|
|
8630
8796
|
if (dragMovedRef.current) {
|
|
8631
8797
|
try {
|
|
8632
|
-
_optionalChain([containerRef, 'access',
|
|
8798
|
+
_optionalChain([containerRef, 'access', _172 => _172.current, 'optionalAccess', _173 => _173.releasePointerCapture, 'call', _174 => _174(e.pointerId)]);
|
|
8633
8799
|
} catch (e8) {
|
|
8634
8800
|
}
|
|
8635
8801
|
}
|
|
@@ -9065,7 +9231,7 @@ var ChatTicketItem = _react.forwardRef.call(void 0,
|
|
|
9065
9231
|
{
|
|
9066
9232
|
ref,
|
|
9067
9233
|
type: "button",
|
|
9068
|
-
onClick: () => _optionalChain([onClick, 'optionalCall',
|
|
9234
|
+
onClick: () => _optionalChain([onClick, 'optionalCall', _175 => _175(ticket.id)]),
|
|
9069
9235
|
className: _chunkX7CEWD6Vcjs.cn.call(void 0,
|
|
9070
9236
|
"flex h-20 w-full items-center gap-4 px-4",
|
|
9071
9237
|
"border-b border-ods-border bg-ods-card",
|
|
@@ -9296,7 +9462,7 @@ function MingoChatHistoryRow({
|
|
|
9296
9462
|
const unread = _nullishCoalesce(dialog.unreadMessagesCount, () => ( 0));
|
|
9297
9463
|
const hasMenu = !!onRequestRename || !!onRequestArchive || !!onRequestCopyLink;
|
|
9298
9464
|
const owner = dialog.owner;
|
|
9299
|
-
const hasAvatar = !!(_optionalChain([owner, 'optionalAccess',
|
|
9465
|
+
const hasAvatar = !!(_optionalChain([owner, 'optionalAccess', _176 => _176.name]) || _optionalChain([owner, 'optionalAccess', _177 => _177.avatarUrl]));
|
|
9300
9466
|
const [menuOpen, setMenuOpen] = _react.useState.call(void 0, false);
|
|
9301
9467
|
const menuItems = [
|
|
9302
9468
|
onRequestCopyLink && {
|
|
@@ -9332,11 +9498,11 @@ function MingoChatHistoryRow({
|
|
|
9332
9498
|
{
|
|
9333
9499
|
role: "button",
|
|
9334
9500
|
tabIndex: 0,
|
|
9335
|
-
onClick: () => _optionalChain([onSelect, 'optionalCall',
|
|
9501
|
+
onClick: () => _optionalChain([onSelect, 'optionalCall', _178 => _178(dialog.id)]),
|
|
9336
9502
|
onKeyDown: (e) => {
|
|
9337
9503
|
if (e.key === "Enter" || e.key === " ") {
|
|
9338
9504
|
e.preventDefault();
|
|
9339
|
-
_optionalChain([onSelect, 'optionalCall',
|
|
9505
|
+
_optionalChain([onSelect, 'optionalCall', _179 => _179(dialog.id)]);
|
|
9340
9506
|
}
|
|
9341
9507
|
},
|
|
9342
9508
|
className: "flex min-w-0 flex-1 cursor-pointer items-center gap-[var(--spacing-system-xsf)] p-[var(--spacing-system-s)] focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ods-accent",
|
|
@@ -9403,8 +9569,8 @@ function MingoChatHistoryRow({
|
|
|
9403
9569
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9404
9570
|
"span",
|
|
9405
9571
|
{
|
|
9406
|
-
onClick: () => _optionalChain([onSelect, 'optionalCall',
|
|
9407
|
-
title: _optionalChain([owner, 'optionalAccess',
|
|
9572
|
+
onClick: () => _optionalChain([onSelect, 'optionalCall', _180 => _180(dialog.id)]),
|
|
9573
|
+
title: _optionalChain([owner, 'optionalAccess', _181 => _181.name]) || void 0,
|
|
9408
9574
|
className: _chunkX7CEWD6Vcjs.cn.call(void 0,
|
|
9409
9575
|
"absolute inset-0 flex cursor-pointer items-center justify-center transition-opacity",
|
|
9410
9576
|
hasMenu && (menuOpen ? "pointer-events-none opacity-0" : "md:group-hover/row:pointer-events-none md:group-hover/row:opacity-0 md:peer-[:focus-within]/menu:pointer-events-none md:peer-[:focus-within]/menu:opacity-0")
|
|
@@ -9414,9 +9580,9 @@ function MingoChatHistoryRow({
|
|
|
9414
9580
|
{
|
|
9415
9581
|
variant: "round",
|
|
9416
9582
|
sizePx: 24,
|
|
9417
|
-
src: _optionalChain([owner, 'optionalAccess',
|
|
9418
|
-
alt: _optionalChain([owner, 'optionalAccess',
|
|
9419
|
-
fallback: _optionalChain([owner, 'optionalAccess',
|
|
9583
|
+
src: _optionalChain([owner, 'optionalAccess', _182 => _182.avatarUrl]) || void 0,
|
|
9584
|
+
alt: _optionalChain([owner, 'optionalAccess', _183 => _183.name]) || void 0,
|
|
9585
|
+
fallback: _optionalChain([owner, 'optionalAccess', _184 => _184.name]) || void 0,
|
|
9420
9586
|
initialsClassName: "text-[10px] text-ods-text-secondary"
|
|
9421
9587
|
}
|
|
9422
9588
|
)
|
|
@@ -9467,7 +9633,7 @@ function MingoChatHistory({
|
|
|
9467
9633
|
className
|
|
9468
9634
|
}) {
|
|
9469
9635
|
const groups = _react.useMemo.call(void 0, () => groupDialogs(dialogs), [dialogs]);
|
|
9470
|
-
const noSearchResults = groups.length === 0 && !!_optionalChain([searchQuery, 'optionalAccess',
|
|
9636
|
+
const noSearchResults = groups.length === 0 && !!_optionalChain([searchQuery, 'optionalAccess', _185 => _185.trim, 'call', _186 => _186()]);
|
|
9471
9637
|
const { scrollRef, fadeTop, fadeBottom, update: updateFade } = useScrollFade();
|
|
9472
9638
|
const sentinelRef = _react.useRef.call(void 0, null);
|
|
9473
9639
|
const onLoadMoreRef = _react.useRef.call(void 0, onLoadMore);
|
|
@@ -9484,7 +9650,7 @@ function MingoChatHistory({
|
|
|
9484
9650
|
const io = new IntersectionObserver(
|
|
9485
9651
|
([entry]) => {
|
|
9486
9652
|
if (entry.isIntersecting && !isLoadingMoreRef.current) {
|
|
9487
|
-
_optionalChain([onLoadMoreRef, 'access',
|
|
9653
|
+
_optionalChain([onLoadMoreRef, 'access', _187 => _187.current, 'optionalCall', _188 => _188()]);
|
|
9488
9654
|
}
|
|
9489
9655
|
},
|
|
9490
9656
|
{ root, rootMargin: "120px", threshold: 0.1 }
|
|
@@ -9668,8 +9834,8 @@ function MingoWelcome({
|
|
|
9668
9834
|
icon: action.icon,
|
|
9669
9835
|
variant: action.variant,
|
|
9670
9836
|
onSelect: action.onClick,
|
|
9671
|
-
onHoverStart: () => _optionalChain([onQuickActionHover, 'optionalCall',
|
|
9672
|
-
onHoverEnd: () => _optionalChain([onQuickActionHoverEnd, 'optionalCall',
|
|
9837
|
+
onHoverStart: () => _optionalChain([onQuickActionHover, 'optionalCall', _189 => _189(action)]),
|
|
9838
|
+
onHoverEnd: () => _optionalChain([onQuickActionHoverEnd, 'optionalCall', _190 => _190()])
|
|
9673
9839
|
})),
|
|
9674
9840
|
agentSlug,
|
|
9675
9841
|
rows: 4,
|
|
@@ -9722,9 +9888,9 @@ function GuideWelcome({
|
|
|
9722
9888
|
props: action.iconProps,
|
|
9723
9889
|
accent: _nullishCoalesce(_nullishCoalesce(action.accent, () => ( accentFromIdentityIcon(icon))), () => ( "cyan"))
|
|
9724
9890
|
},
|
|
9725
|
-
onSelect: () => _optionalChain([onQuickAction, 'optionalCall',
|
|
9726
|
-
onHoverStart: () => _optionalChain([onQuickActionHover, 'optionalCall',
|
|
9727
|
-
onHoverEnd: () => _optionalChain([onQuickActionHoverEnd, 'optionalCall',
|
|
9891
|
+
onSelect: () => _optionalChain([onQuickAction, 'optionalCall', _191 => _191(action)]),
|
|
9892
|
+
onHoverStart: () => _optionalChain([onQuickActionHover, 'optionalCall', _192 => _192(action)]),
|
|
9893
|
+
onHoverEnd: () => _optionalChain([onQuickActionHoverEnd, 'optionalCall', _193 => _193()])
|
|
9728
9894
|
})),
|
|
9729
9895
|
[quickActions, icon, onQuickAction, onQuickActionHover, onQuickActionHoverEnd]
|
|
9730
9896
|
);
|
|
@@ -9900,7 +10066,7 @@ function MingoHistoryRail({
|
|
|
9900
10066
|
onRetry,
|
|
9901
10067
|
className
|
|
9902
10068
|
}) {
|
|
9903
|
-
const hasSearch = !!_optionalChain([searchQuery, 'optionalAccess',
|
|
10069
|
+
const hasSearch = !!_optionalChain([searchQuery, 'optionalAccess', _194 => _194.trim, 'call', _195 => _195()]);
|
|
9904
10070
|
const hasList = dialogs.length > 0 || hasSearch;
|
|
9905
10071
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
9906
10072
|
"div",
|
|
@@ -10026,7 +10192,7 @@ var Modal = _react.forwardRef.call(void 0,
|
|
|
10026
10192
|
document.removeEventListener("focusin", containFocus);
|
|
10027
10193
|
const idx = modalStack.lastIndexOf(stackId);
|
|
10028
10194
|
if (idx !== -1) modalStack.splice(idx, 1);
|
|
10029
|
-
_optionalChain([restoreFocusRef, 'access',
|
|
10195
|
+
_optionalChain([restoreFocusRef, 'access', _196 => _196.current, 'optionalAccess', _197 => _197.focus, 'optionalCall', _198 => _198()]);
|
|
10030
10196
|
};
|
|
10031
10197
|
}, [isOpen]);
|
|
10032
10198
|
_react.useEffect.call(void 0, () => {
|
|
@@ -10276,7 +10442,7 @@ function ChatDialogModals({
|
|
|
10276
10442
|
RenameChatModal,
|
|
10277
10443
|
{
|
|
10278
10444
|
isOpen: renameTarget != null,
|
|
10279
|
-
initialName: _nullishCoalesce(_optionalChain([renameTarget, 'optionalAccess',
|
|
10445
|
+
initialName: _nullishCoalesce(_optionalChain([renameTarget, 'optionalAccess', _199 => _199.title]), () => ( "")),
|
|
10280
10446
|
onClose: () => setRenameTarget(null),
|
|
10281
10447
|
onSave: onConfirmRename
|
|
10282
10448
|
}
|
|
@@ -10348,7 +10514,7 @@ function ChatHeaderSearchField({
|
|
|
10348
10514
|
const finishCollapse = _react.useCallback.call(void 0, () => {
|
|
10349
10515
|
if (collapsedRef.current) return;
|
|
10350
10516
|
collapsedRef.current = true;
|
|
10351
|
-
_optionalChain([onCollapse, 'optionalCall',
|
|
10517
|
+
_optionalChain([onCollapse, 'optionalCall', _200 => _200()]);
|
|
10352
10518
|
}, [onCollapse]);
|
|
10353
10519
|
const beginCollapse = _react.useCallback.call(void 0, () => {
|
|
10354
10520
|
setExiting(true);
|
|
@@ -10670,7 +10836,7 @@ function ChatAttachmentAddButton({
|
|
|
10670
10836
|
const canAddMore = slotsAvailable > 0 && !disabled;
|
|
10671
10837
|
const handlePick = () => {
|
|
10672
10838
|
if (!canAddMore) return;
|
|
10673
|
-
_optionalChain([fileInputRef, 'access',
|
|
10839
|
+
_optionalChain([fileInputRef, 'access', _201 => _201.current, 'optionalAccess', _202 => _202.click, 'call', _203 => _203()]);
|
|
10674
10840
|
};
|
|
10675
10841
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
10676
10842
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -10833,7 +10999,7 @@ function ChatContextMemoryBar({
|
|
|
10833
10999
|
_react.useEffect.call(void 0, () => {
|
|
10834
11000
|
if (!open) return void 0;
|
|
10835
11001
|
const onOutside = (e) => {
|
|
10836
|
-
if (_optionalChain([rootRef, 'access',
|
|
11002
|
+
if (_optionalChain([rootRef, 'access', _204 => _204.current, 'optionalAccess', _205 => _205.contains, 'call', _206 => _206(e.target)])) return;
|
|
10837
11003
|
setOpen(false);
|
|
10838
11004
|
};
|
|
10839
11005
|
document.addEventListener("mousedown", onOutside, true);
|
|
@@ -11132,7 +11298,7 @@ function ChatComposer({
|
|
|
11132
11298
|
const contextEnabled = !!contextPicker && !archived;
|
|
11133
11299
|
const selected = _nullishCoalesce(selectedContextItems, () => ( []));
|
|
11134
11300
|
const memory = _nullishCoalesce(contextMemoryItems, () => ( []));
|
|
11135
|
-
const entityTypes = _optionalChain([contextPicker, 'optionalAccess',
|
|
11301
|
+
const entityTypes = _optionalChain([contextPicker, 'optionalAccess', _207 => _207.entityTypes]);
|
|
11136
11302
|
const iconByType = _react.useMemo.call(void 0, () => {
|
|
11137
11303
|
const map = /* @__PURE__ */ new Map();
|
|
11138
11304
|
for (const t of _nullishCoalesce(entityTypes, () => ( []))) map.set(t.type, t.icon);
|
|
@@ -11159,7 +11325,7 @@ function ChatComposer({
|
|
|
11159
11325
|
startIcon: contextEnabled ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
11160
11326
|
ChatComposerPlusMenu,
|
|
11161
11327
|
{
|
|
11162
|
-
onToggle: () => contextPickerOpen ? _optionalChain([onCloseContextPicker, 'optionalCall',
|
|
11328
|
+
onToggle: () => contextPickerOpen ? _optionalChain([onCloseContextPicker, 'optionalCall', _208 => _208()]) : _optionalChain([onOpenContextPicker, 'optionalCall', _209 => _209()]),
|
|
11163
11329
|
open: contextPickerOpen,
|
|
11164
11330
|
disabled: attachmentsDisabled,
|
|
11165
11331
|
dropdown: contextPicker ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -11168,8 +11334,8 @@ function ChatComposer({
|
|
|
11168
11334
|
open: contextPickerOpen,
|
|
11169
11335
|
config: contextPicker,
|
|
11170
11336
|
selectedItems: selected,
|
|
11171
|
-
onToggleItem: (item) => _optionalChain([onToggleContextItem, 'optionalCall',
|
|
11172
|
-
onClose: () => _optionalChain([onCloseContextPicker, 'optionalCall',
|
|
11337
|
+
onToggleItem: (item) => _optionalChain([onToggleContextItem, 'optionalCall', _210 => _210(item)]),
|
|
11338
|
+
onClose: () => _optionalChain([onCloseContextPicker, 'optionalCall', _211 => _211()]),
|
|
11173
11339
|
mentionQuery
|
|
11174
11340
|
}
|
|
11175
11341
|
) : void 0
|
|
@@ -11360,8 +11526,8 @@ ChatSidebarSkeleton.displayName = "ChatSidebarSkeleton";
|
|
|
11360
11526
|
var DialogListItem = _react.forwardRef.call(void 0,
|
|
11361
11527
|
({ className, dialog, isActive, onDialogSelect, onClick, ...props }, ref) => {
|
|
11362
11528
|
const handleClick = (e) => {
|
|
11363
|
-
_optionalChain([onDialogSelect, 'optionalCall',
|
|
11364
|
-
_optionalChain([onClick, 'optionalCall',
|
|
11529
|
+
_optionalChain([onDialogSelect, 'optionalCall', _212 => _212(dialog.id)]);
|
|
11530
|
+
_optionalChain([onClick, 'optionalCall', _213 => _213(e)]);
|
|
11365
11531
|
};
|
|
11366
11532
|
const formatTimestamp = (timestamp) => {
|
|
11367
11533
|
return _chunkEX5PJGVAcjs.formatDateWithTimezone.call(void 0, timestamp, _chunkEX5PJGVAcjs.VIEWER_TIMEZONE, "numericDateTime24h");
|
|
@@ -11434,7 +11600,7 @@ var ChatSidebar = _react.forwardRef.call(void 0,
|
|
|
11434
11600
|
(entries) => {
|
|
11435
11601
|
const [entry] = entries;
|
|
11436
11602
|
if (entry.isIntersecting && !isFetchingRef.current) {
|
|
11437
|
-
_optionalChain([onLoadMoreRef, 'access',
|
|
11603
|
+
_optionalChain([onLoadMoreRef, 'access', _214 => _214.current, 'optionalCall', _215 => _215()]);
|
|
11438
11604
|
}
|
|
11439
11605
|
},
|
|
11440
11606
|
{ root: scrollContainer, rootMargin: "100px", threshold: 0.1 }
|
|
@@ -11562,7 +11728,7 @@ function isForeignOriginHref(href) {
|
|
|
11562
11728
|
function runNavigation(runtime, href, path, targetPlatform, fallbackNavigate) {
|
|
11563
11729
|
const isNewTab = runtime ? _chunkEX5PJGVAcjs.computeIsNewTab.call(void 0, runtime, href, _nullishCoalesce(targetPlatform, () => ( null))) : false;
|
|
11564
11730
|
if (isNewTab) {
|
|
11565
|
-
if (_optionalChain([runtime, 'optionalAccess',
|
|
11731
|
+
if (_optionalChain([runtime, 'optionalAccess', _216 => _216.navigation, 'access', _217 => _217.openExternal])) runtime.navigation.openExternal(href);
|
|
11566
11732
|
else window.open(href, "_blank", NEW_TAB_FEATURES);
|
|
11567
11733
|
return;
|
|
11568
11734
|
}
|
|
@@ -11570,7 +11736,7 @@ function runNavigation(runtime, href, path, targetPlatform, fallbackNavigate) {
|
|
|
11570
11736
|
if (target.includes("#") && _chunkTLLJIGTPcjs.navigateSamePageHash.call(void 0, target, { headerOffset: _chunkTLLJIGTPcjs.STICKY_HEADER_OFFSET_PX })) {
|
|
11571
11737
|
return;
|
|
11572
11738
|
}
|
|
11573
|
-
const handled = _nullishCoalesce(_optionalChain([runtime, 'optionalAccess',
|
|
11739
|
+
const handled = _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _218 => _218.navigation, 'access', _219 => _219.navigate, 'optionalCall', _220 => _220({ href, path, targetPlatform })]), () => ( false));
|
|
11574
11740
|
if (!handled) {
|
|
11575
11741
|
if (fallbackNavigate) fallbackNavigate(target);
|
|
11576
11742
|
else window.location.assign(target);
|
|
@@ -11629,7 +11795,7 @@ function NavLinkAnchorViaRuntime({
|
|
|
11629
11795
|
targetPlatform,
|
|
11630
11796
|
fallbackNavigate: router.push
|
|
11631
11797
|
});
|
|
11632
|
-
if (handled && !isNewTab && _optionalChain([panel, 'optionalAccess',
|
|
11798
|
+
if (handled && !isNewTab && _optionalChain([panel, 'optionalAccess', _221 => _221.closeChat])) panel.closeChat();
|
|
11633
11799
|
};
|
|
11634
11800
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "a", { href: resolvedHref, ..._chunkEX5PJGVAcjs.newTabAnchorAttrs.call(void 0, isNewTab), onClick, className, children });
|
|
11635
11801
|
}
|
|
@@ -11756,11 +11922,11 @@ var DEFAULT_CAPTIONS_PATH = "/api/captions";
|
|
|
11756
11922
|
function getCaptionsUrl(entityType, entityId, srtContent, options) {
|
|
11757
11923
|
if (!srtContent) return void 0;
|
|
11758
11924
|
const hash = `${srtContent.length}-${srtContent.slice(0, 8).replace(/\s/g, "")}`;
|
|
11759
|
-
const variant = _optionalChain([options, 'optionalAccess',
|
|
11925
|
+
const variant = _optionalChain([options, 'optionalAccess', _222 => _222.variant]) ? `&variant=${options.variant}` : "";
|
|
11760
11926
|
return `${DEFAULT_CAPTIONS_PATH}/${entityType}/${entityId}?v=${hash}${variant}`;
|
|
11761
11927
|
}
|
|
11762
11928
|
function resolveCaptionsBase(endpoints) {
|
|
11763
|
-
return _optionalChain([endpoints, 'optionalAccess',
|
|
11929
|
+
return _optionalChain([endpoints, 'optionalAccess', _223 => _223.captionsUrlPrefix]) || DEFAULT_CAPTIONS_PATH;
|
|
11764
11930
|
}
|
|
11765
11931
|
function rebaseCaptionsUrl(endpoints, url) {
|
|
11766
11932
|
if (!url || !url.startsWith(`${DEFAULT_CAPTIONS_PATH}/`)) return url;
|
|
@@ -11870,7 +12036,7 @@ TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
|
11870
12036
|
// src/components/features/use-captions.ts
|
|
11871
12037
|
|
|
11872
12038
|
function useCaptions() {
|
|
11873
|
-
const endpoints = _nullishCoalesce(_optionalChain([_chunkU2YLMFJKcjs.useChatRuntime.call(void 0, ), 'optionalAccess',
|
|
12039
|
+
const endpoints = _nullishCoalesce(_optionalChain([_chunkU2YLMFJKcjs.useChatRuntime.call(void 0, ), 'optionalAccess', _224 => _224.endpoints]), () => ( null));
|
|
11874
12040
|
return _react.useMemo.call(void 0,
|
|
11875
12041
|
() => ({
|
|
11876
12042
|
forEntity: (entityType, entity) => getEntityCaptionUrls(endpoints, entityType, entity),
|
|
@@ -11899,11 +12065,11 @@ function fetchPriorityProp(priority) {
|
|
|
11899
12065
|
var ENTER_FULLSCREEN_REQUEST = "mediaenterfullscreenrequest";
|
|
11900
12066
|
function isIosAppShell() {
|
|
11901
12067
|
const capacitor = globalThis.Capacitor;
|
|
11902
|
-
return _optionalChain([capacitor, 'optionalAccess',
|
|
12068
|
+
return _optionalChain([capacitor, 'optionalAccess', _225 => _225.isNativePlatform, 'optionalCall', _226 => _226()]) === true && _optionalChain([capacitor, 'access', _227 => _227.getPlatform, 'optionalCall', _228 => _228()]) === "ios";
|
|
11903
12069
|
}
|
|
11904
12070
|
function nativeVideoElement(player) {
|
|
11905
12071
|
const media = player.media;
|
|
11906
|
-
const element = _nullishCoalesce(_optionalChain([media, 'optionalAccess',
|
|
12072
|
+
const element = _nullishCoalesce(_optionalChain([media, 'optionalAccess', _229 => _229.nativeEl]), () => ( media));
|
|
11907
12073
|
return element instanceof HTMLVideoElement ? element : null;
|
|
11908
12074
|
}
|
|
11909
12075
|
function useIosNativeVideoFullscreen(playerRef) {
|
|
@@ -11913,7 +12079,7 @@ function useIosNativeVideoFullscreen(playerRef) {
|
|
|
11913
12079
|
if (!(player instanceof EventTarget)) return void 0;
|
|
11914
12080
|
const takeOver = (event) => {
|
|
11915
12081
|
const video = nativeVideoElement(player);
|
|
11916
|
-
if (!_optionalChain([video, 'optionalAccess',
|
|
12082
|
+
if (!_optionalChain([video, 'optionalAccess', _230 => _230.webkitSupportsFullscreen]) || typeof video.webkitEnterFullscreen !== "function") return;
|
|
11917
12083
|
event.stopImmediatePropagation();
|
|
11918
12084
|
video.webkitEnterFullscreen();
|
|
11919
12085
|
};
|
|
@@ -11947,11 +12113,11 @@ function toMuxPreviewUrl(url, maxResolution = "720p") {
|
|
|
11947
12113
|
function saveDataEnabled() {
|
|
11948
12114
|
if (typeof navigator === "undefined") return false;
|
|
11949
12115
|
const conn = navigator.connection;
|
|
11950
|
-
return _optionalChain([conn, 'optionalAccess',
|
|
12116
|
+
return _optionalChain([conn, 'optionalAccess', _231 => _231.saveData]) === true;
|
|
11951
12117
|
}
|
|
11952
12118
|
function useVideoOriginPreconnect({ supabaseStorageOrigin } = {}) {
|
|
11953
12119
|
const runtime = _chunkU2YLMFJKcjs.useChatRuntime.call(void 0, );
|
|
11954
|
-
const resolvedOrigin = _nullishCoalesce(supabaseStorageOrigin, () => ( _optionalChain([runtime, 'optionalAccess',
|
|
12120
|
+
const resolvedOrigin = _nullishCoalesce(supabaseStorageOrigin, () => ( _optionalChain([runtime, 'optionalAccess', _232 => _232.endpoints, 'access', _233 => _233.supabaseStorageOrigin])));
|
|
11955
12121
|
try {
|
|
11956
12122
|
_reactdom2.default.preconnect(MUX_STREAM_ORIGIN, { crossOrigin: "anonymous" });
|
|
11957
12123
|
_reactdom2.default.preconnect(MUX_IMAGE_ORIGIN, { crossOrigin: "anonymous" });
|
|
@@ -11970,7 +12136,7 @@ function useVideoWarmup({
|
|
|
11970
12136
|
nearMargin = "1000px"
|
|
11971
12137
|
} = {}) {
|
|
11972
12138
|
const runtime = _chunkU2YLMFJKcjs.useChatRuntime.call(void 0, );
|
|
11973
|
-
const resolvedOrigin = _nullishCoalesce(supabaseStorageOrigin, () => ( _optionalChain([runtime, 'optionalAccess',
|
|
12139
|
+
const resolvedOrigin = _nullishCoalesce(supabaseStorageOrigin, () => ( _optionalChain([runtime, 'optionalAccess', _234 => _234.endpoints, 'access', _235 => _235.supabaseStorageOrigin])));
|
|
11974
12140
|
useVideoOriginPreconnect({ supabaseStorageOrigin: resolvedOrigin });
|
|
11975
12141
|
const { ref, isNear } = _chunkTLLJIGTPcjs.useNearViewport.call(void 0, nearMargin);
|
|
11976
12142
|
_react.useEffect.call(void 0, () => {
|
|
@@ -12072,7 +12238,7 @@ if (typeof document !== "undefined") {
|
|
|
12072
12238
|
}
|
|
12073
12239
|
if (typeof window !== "undefined") {
|
|
12074
12240
|
const w = window;
|
|
12075
|
-
if (!_optionalChain([w, 'access',
|
|
12241
|
+
if (!_optionalChain([w, 'access', _236 => _236.chrome, 'optionalAccess', _237 => _237.cast])) {
|
|
12076
12242
|
w.chrome = { ..._nullishCoalesce(w.chrome, () => ( {})), cast: { isAvailable: false } };
|
|
12077
12243
|
}
|
|
12078
12244
|
}
|
|
@@ -12328,7 +12494,7 @@ function FilePlayer({
|
|
|
12328
12494
|
const clearPerfListener = _react.useCallback.call(void 0, () => {
|
|
12329
12495
|
if (perfListenerRef.current) {
|
|
12330
12496
|
try {
|
|
12331
|
-
_optionalChain([hoverPlayerRef, 'access',
|
|
12497
|
+
_optionalChain([hoverPlayerRef, 'access', _238 => _238.current, 'optionalAccess', _239 => _239.removeEventListener, 'optionalCall', _240 => _240("playing", perfListenerRef.current)]);
|
|
12332
12498
|
} catch (e21) {
|
|
12333
12499
|
}
|
|
12334
12500
|
perfListenerRef.current = null;
|
|
@@ -12363,7 +12529,7 @@ function FilePlayer({
|
|
|
12363
12529
|
};
|
|
12364
12530
|
perfListenerRef.current = onPlaying;
|
|
12365
12531
|
try {
|
|
12366
|
-
_optionalChain([el, 'access',
|
|
12532
|
+
_optionalChain([el, 'access', _241 => _241.addEventListener, 'optionalCall', _242 => _242("playing", onPlaying)]);
|
|
12367
12533
|
} catch (e22) {
|
|
12368
12534
|
}
|
|
12369
12535
|
}
|
|
@@ -12371,12 +12537,12 @@ function FilePlayer({
|
|
|
12371
12537
|
el.volume = 0.5;
|
|
12372
12538
|
if (userHasInteracted) {
|
|
12373
12539
|
el.muted = mutedIntentRef.current;
|
|
12374
|
-
_optionalChain([el, 'access',
|
|
12375
|
-
const name = _optionalChain([err, 'optionalAccess',
|
|
12540
|
+
_optionalChain([el, 'access', _243 => _243.play, 'optionalCall', _244 => _244(), 'optionalAccess', _245 => _245.catch, 'optionalCall', _246 => _246((err) => {
|
|
12541
|
+
const name = _optionalChain([err, 'optionalAccess', _247 => _247.name]);
|
|
12376
12542
|
if (name === "NotAllowedError" && hoverActiveRef.current && generation === hoverGenerationRef.current) {
|
|
12377
12543
|
try {
|
|
12378
12544
|
el.muted = true;
|
|
12379
|
-
_optionalChain([el, 'access',
|
|
12545
|
+
_optionalChain([el, 'access', _248 => _248.play, 'optionalCall', _249 => _249(), 'optionalAccess', _250 => _250.catch, 'optionalCall', _251 => _251(() => {
|
|
12380
12546
|
if (hoverActiveRef.current && generation === hoverGenerationRef.current) {
|
|
12381
12547
|
setMutedFallbackBlocked(true);
|
|
12382
12548
|
}
|
|
@@ -12388,7 +12554,7 @@ function FilePlayer({
|
|
|
12388
12554
|
})]);
|
|
12389
12555
|
} else {
|
|
12390
12556
|
el.muted = true;
|
|
12391
|
-
_optionalChain([el, 'access',
|
|
12557
|
+
_optionalChain([el, 'access', _252 => _252.play, 'optionalCall', _253 => _253(), 'optionalAccess', _254 => _254.catch, 'optionalCall', _255 => _255(() => {
|
|
12392
12558
|
if (hoverActiveRef.current && generation === hoverGenerationRef.current) {
|
|
12393
12559
|
setMutedFallbackBlocked(true);
|
|
12394
12560
|
}
|
|
@@ -12418,7 +12584,7 @@ function FilePlayer({
|
|
|
12418
12584
|
clearActivationWaiter();
|
|
12419
12585
|
clearPerfListener();
|
|
12420
12586
|
try {
|
|
12421
|
-
_optionalChain([hoverPlayerRef, 'access',
|
|
12587
|
+
_optionalChain([hoverPlayerRef, 'access', _256 => _256.current, 'optionalAccess', _257 => _257.pause, 'optionalCall', _258 => _258()]);
|
|
12422
12588
|
} catch (e26) {
|
|
12423
12589
|
}
|
|
12424
12590
|
}, [clearActivationWaiter, clearPerfListener]);
|
|
@@ -12430,7 +12596,7 @@ function FilePlayer({
|
|
|
12430
12596
|
if (el) {
|
|
12431
12597
|
el.muted = false;
|
|
12432
12598
|
el.volume = 0.5;
|
|
12433
|
-
_optionalChain([el, 'access',
|
|
12599
|
+
_optionalChain([el, 'access', _259 => _259.play, 'optionalCall', _260 => _260(), 'optionalAccess', _261 => _261.catch, 'optionalCall', _262 => _262(() => {
|
|
12434
12600
|
})]);
|
|
12435
12601
|
}
|
|
12436
12602
|
} catch (e27) {
|
|
@@ -12450,7 +12616,7 @@ function FilePlayer({
|
|
|
12450
12616
|
onMutedFallbackChangeRef.current = onMutedFallbackChange;
|
|
12451
12617
|
});
|
|
12452
12618
|
_react.useEffect.call(void 0, () => {
|
|
12453
|
-
_optionalChain([onMutedFallbackChangeRef, 'access',
|
|
12619
|
+
_optionalChain([onMutedFallbackChangeRef, 'access', _263 => _263.current, 'optionalCall', _264 => _264({
|
|
12454
12620
|
muted: hoverMutedFallback,
|
|
12455
12621
|
blocked: hoverMutedFallback && mutedFallbackBlocked
|
|
12456
12622
|
})]);
|
|
@@ -12469,7 +12635,7 @@ function FilePlayer({
|
|
|
12469
12635
|
if (autoPlay) {
|
|
12470
12636
|
const reportBlocked = () => setMutedFallbackBlocked(true);
|
|
12471
12637
|
try {
|
|
12472
|
-
_optionalChain([mutedEl, 'access',
|
|
12638
|
+
_optionalChain([mutedEl, 'access', _265 => _265.play, 'optionalCall', _266 => _266(), 'optionalAccess', _267 => _267.catch, 'optionalCall', _268 => _268(reportBlocked)]);
|
|
12473
12639
|
} catch (e29) {
|
|
12474
12640
|
reportBlocked();
|
|
12475
12641
|
}
|
|
@@ -12483,12 +12649,12 @@ function FilePlayer({
|
|
|
12483
12649
|
try {
|
|
12484
12650
|
el.muted = false;
|
|
12485
12651
|
el.volume = typeof el.volume === "number" ? el.volume : 1;
|
|
12486
|
-
_optionalChain([el, 'access',
|
|
12487
|
-
const name = _optionalChain([err, 'optionalAccess',
|
|
12652
|
+
_optionalChain([el, 'access', _269 => _269.play, 'optionalCall', _270 => _270(), 'optionalAccess', _271 => _271.catch, 'optionalCall', _272 => _272((err) => {
|
|
12653
|
+
const name = _optionalChain([err, 'optionalAccess', _273 => _273.name]);
|
|
12488
12654
|
if (name !== "NotAllowedError") return;
|
|
12489
12655
|
try {
|
|
12490
12656
|
el.muted = true;
|
|
12491
|
-
_optionalChain([el, 'access',
|
|
12657
|
+
_optionalChain([el, 'access', _274 => _274.play, 'optionalCall', _275 => _275(), 'optionalAccess', _276 => _276.catch, 'optionalCall', _277 => _277(() => {
|
|
12492
12658
|
setMutedFallbackBlocked(true);
|
|
12493
12659
|
setHoverMutedFallback(true);
|
|
12494
12660
|
})]);
|
|
@@ -12504,7 +12670,7 @@ function FilePlayer({
|
|
|
12504
12670
|
}, [autoPlayUnmuted, startMuted, autoPlay]);
|
|
12505
12671
|
_react.useEffect.call(void 0, () => {
|
|
12506
12672
|
const el = hoverPlayerRef.current;
|
|
12507
|
-
if (!_optionalChain([el, 'optionalAccess',
|
|
12673
|
+
if (!_optionalChain([el, 'optionalAccess', _278 => _278.addEventListener])) return void 0;
|
|
12508
12674
|
const onVolumeChange = () => {
|
|
12509
12675
|
if (el.muted === false) {
|
|
12510
12676
|
setMutedFallbackBlocked(false);
|
|
@@ -12517,14 +12683,14 @@ function FilePlayer({
|
|
|
12517
12683
|
}
|
|
12518
12684
|
return () => {
|
|
12519
12685
|
try {
|
|
12520
|
-
_optionalChain([el, 'access',
|
|
12686
|
+
_optionalChain([el, 'access', _279 => _279.removeEventListener, 'optionalCall', _280 => _280("volumechange", onVolumeChange)]);
|
|
12521
12687
|
} catch (e33) {
|
|
12522
12688
|
}
|
|
12523
12689
|
};
|
|
12524
12690
|
}, []);
|
|
12525
12691
|
_react.useEffect.call(void 0, () => {
|
|
12526
12692
|
const el = hoverPlayerRef.current;
|
|
12527
|
-
if (!_optionalChain([el, 'optionalAccess',
|
|
12693
|
+
if (!_optionalChain([el, 'optionalAccess', _281 => _281.addEventListener])) return void 0;
|
|
12528
12694
|
const onPlaying = () => setMutedFallbackBlocked(false);
|
|
12529
12695
|
try {
|
|
12530
12696
|
el.addEventListener("playing", onPlaying);
|
|
@@ -12532,7 +12698,7 @@ function FilePlayer({
|
|
|
12532
12698
|
}
|
|
12533
12699
|
return () => {
|
|
12534
12700
|
try {
|
|
12535
|
-
_optionalChain([el, 'access',
|
|
12701
|
+
_optionalChain([el, 'access', _282 => _282.removeEventListener, 'optionalCall', _283 => _283("playing", onPlaying)]);
|
|
12536
12702
|
} catch (e35) {
|
|
12537
12703
|
}
|
|
12538
12704
|
};
|
|
@@ -12543,15 +12709,15 @@ function FilePlayer({
|
|
|
12543
12709
|
});
|
|
12544
12710
|
_react.useEffect.call(void 0, () => {
|
|
12545
12711
|
const el = hoverPlayerRef.current;
|
|
12546
|
-
if (!_optionalChain([el, 'optionalAccess',
|
|
12547
|
-
const handler = () => _optionalChain([onEndedRef, 'access',
|
|
12712
|
+
if (!_optionalChain([el, 'optionalAccess', _284 => _284.addEventListener])) return void 0;
|
|
12713
|
+
const handler = () => _optionalChain([onEndedRef, 'access', _285 => _285.current, 'optionalCall', _286 => _286()]);
|
|
12548
12714
|
try {
|
|
12549
12715
|
el.addEventListener("ended", handler);
|
|
12550
12716
|
} catch (e36) {
|
|
12551
12717
|
}
|
|
12552
12718
|
return () => {
|
|
12553
12719
|
try {
|
|
12554
|
-
_optionalChain([el, 'access',
|
|
12720
|
+
_optionalChain([el, 'access', _287 => _287.removeEventListener, 'optionalCall', _288 => _288("ended", handler)]);
|
|
12555
12721
|
} catch (e37) {
|
|
12556
12722
|
}
|
|
12557
12723
|
};
|
|
@@ -12560,19 +12726,19 @@ function FilePlayer({
|
|
|
12560
12726
|
_react.useImperativeHandle.call(void 0,
|
|
12561
12727
|
playerHandleRef,
|
|
12562
12728
|
() => ({
|
|
12563
|
-
getCurrentTime: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access',
|
|
12729
|
+
getCurrentTime: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access', _289 => _289.current, 'optionalAccess', _290 => _290.currentTime]), () => ( 0)),
|
|
12564
12730
|
getDuration: () => {
|
|
12565
|
-
const d = _optionalChain([hoverPlayerRef, 'access',
|
|
12731
|
+
const d = _optionalChain([hoverPlayerRef, 'access', _291 => _291.current, 'optionalAccess', _292 => _292.duration]);
|
|
12566
12732
|
return typeof d === "number" && isFinite(d) ? d : 0;
|
|
12567
12733
|
},
|
|
12568
|
-
getPaused: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access',
|
|
12569
|
-
getMuted: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access',
|
|
12734
|
+
getPaused: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access', _293 => _293.current, 'optionalAccess', _294 => _294.paused]), () => ( true)),
|
|
12735
|
+
getMuted: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access', _295 => _295.current, 'optionalAccess', _296 => _296.muted]), () => ( false)),
|
|
12570
12736
|
play: async () => {
|
|
12571
|
-
await _optionalChain([hoverPlayerRef, 'access',
|
|
12737
|
+
await _optionalChain([hoverPlayerRef, 'access', _297 => _297.current, 'optionalAccess', _298 => _298.play, 'optionalCall', _299 => _299()]);
|
|
12572
12738
|
},
|
|
12573
12739
|
pause: () => {
|
|
12574
12740
|
try {
|
|
12575
|
-
_optionalChain([hoverPlayerRef, 'access',
|
|
12741
|
+
_optionalChain([hoverPlayerRef, 'access', _300 => _300.current, 'optionalAccess', _301 => _301.pause, 'optionalCall', _302 => _302()]);
|
|
12576
12742
|
} catch (e38) {
|
|
12577
12743
|
}
|
|
12578
12744
|
},
|
|
@@ -12639,10 +12805,10 @@ function FilePlayer({
|
|
|
12639
12805
|
if (!el) return;
|
|
12640
12806
|
const resumeAt = typeof el.currentTime === "number" ? el.currentTime : 0;
|
|
12641
12807
|
try {
|
|
12642
|
-
_optionalChain([el, 'access',
|
|
12808
|
+
_optionalChain([el, 'access', _303 => _303.load, 'optionalCall', _304 => _304()]);
|
|
12643
12809
|
if (resumeAt > 0 && el.addEventListener && el.removeEventListener) {
|
|
12644
12810
|
const seekBack = () => {
|
|
12645
|
-
_optionalChain([el, 'access',
|
|
12811
|
+
_optionalChain([el, 'access', _305 => _305.removeEventListener, 'optionalCall', _306 => _306("loadedmetadata", seekBack)]);
|
|
12646
12812
|
try {
|
|
12647
12813
|
el.currentTime = resumeAt;
|
|
12648
12814
|
} catch (e40) {
|
|
@@ -12650,7 +12816,7 @@ function FilePlayer({
|
|
|
12650
12816
|
};
|
|
12651
12817
|
el.addEventListener("loadedmetadata", seekBack);
|
|
12652
12818
|
}
|
|
12653
|
-
_optionalChain([el, 'access',
|
|
12819
|
+
_optionalChain([el, 'access', _307 => _307.play, 'optionalCall', _308 => _308(), 'optionalAccess', _309 => _309.catch, 'optionalCall', _310 => _310(() => {
|
|
12654
12820
|
})]);
|
|
12655
12821
|
} catch (e41) {
|
|
12656
12822
|
}
|
|
@@ -12809,7 +12975,7 @@ function YouTubeFacadeInner({
|
|
|
12809
12975
|
const iframe = iframeRef.current;
|
|
12810
12976
|
if (!iframe) return void 0;
|
|
12811
12977
|
function subscribe2() {
|
|
12812
|
-
_optionalChain([iframe, 'optionalAccess',
|
|
12978
|
+
_optionalChain([iframe, 'optionalAccess', _311 => _311.contentWindow, 'optionalAccess', _312 => _312.postMessage, 'call', _313 => _313('{"event":"listening"}', YT_NOCOOKIE_ORIGIN)]);
|
|
12813
12979
|
}
|
|
12814
12980
|
iframe.addEventListener("load", subscribe2);
|
|
12815
12981
|
subscribe2();
|
|
@@ -12830,13 +12996,13 @@ function YouTubeFacadeInner({
|
|
|
12830
12996
|
return;
|
|
12831
12997
|
}
|
|
12832
12998
|
if (payload.event !== "infoDelivery") return;
|
|
12833
|
-
const state = _optionalChain([payload, 'access',
|
|
12999
|
+
const state = _optionalChain([payload, 'access', _314 => _314.info, 'optionalAccess', _315 => _315.playerState]);
|
|
12834
13000
|
if (typeof state !== "number") return;
|
|
12835
13001
|
if (state === YT_STATE_PLAYING) {
|
|
12836
13002
|
if (blurTimer !== null) return;
|
|
12837
13003
|
blurTimer = setTimeout(() => {
|
|
12838
13004
|
blurTimer = null;
|
|
12839
|
-
_optionalChain([iframeRef, 'access',
|
|
13005
|
+
_optionalChain([iframeRef, 'access', _316 => _316.current, 'optionalAccess', _317 => _317.blur, 'call', _318 => _318()]);
|
|
12840
13006
|
}, YT_PLAYING_BLUR_DELAY_MS);
|
|
12841
13007
|
return;
|
|
12842
13008
|
}
|
|
@@ -12857,7 +13023,7 @@ function YouTubeFacadeInner({
|
|
|
12857
13023
|
prevSuspendedRef.current = Boolean(suspended);
|
|
12858
13024
|
if (!activated) return;
|
|
12859
13025
|
if (suspended && !wasSuspended) {
|
|
12860
|
-
_optionalChain([iframeRef, 'access',
|
|
13026
|
+
_optionalChain([iframeRef, 'access', _319 => _319.current, 'optionalAccess', _320 => _320.contentWindow, 'optionalAccess', _321 => _321.postMessage, 'call', _322 => _322(
|
|
12861
13027
|
'{"event":"command","func":"pauseVideo","args":[]}',
|
|
12862
13028
|
YT_NOCOOKIE_ORIGIN
|
|
12863
13029
|
)]);
|
|
@@ -13111,7 +13277,7 @@ function CardsStrip(props) {
|
|
|
13111
13277
|
_react.useEffect.call(void 0, () => {
|
|
13112
13278
|
const el = wrapperRef.current;
|
|
13113
13279
|
if (!el || typeof IntersectionObserver === "undefined") return void 0;
|
|
13114
|
-
const io = new IntersectionObserver((entries) => setNearViewport(_nullishCoalesce(_optionalChain([entries, 'access',
|
|
13280
|
+
const io = new IntersectionObserver((entries) => setNearViewport(_nullishCoalesce(_optionalChain([entries, 'access', _323 => _323[0], 'optionalAccess', _324 => _324.isIntersecting]), () => ( true))), {
|
|
13115
13281
|
rootMargin: "200px"
|
|
13116
13282
|
});
|
|
13117
13283
|
io.observe(el);
|
|
@@ -13133,9 +13299,9 @@ function CardsStrip(props) {
|
|
|
13133
13299
|
const p = hoverPointerRef.current;
|
|
13134
13300
|
if (!p.inside) return;
|
|
13135
13301
|
const el = typeof document !== "undefined" ? document.elementFromPoint(p.x, p.y) : null;
|
|
13136
|
-
const cardEl = _optionalChain([el, 'optionalAccess',
|
|
13137
|
-
const scoped = cardEl && _optionalChain([scrollerRef, 'access',
|
|
13138
|
-
const key = _nullishCoalesce(_optionalChain([scoped, 'optionalAccess',
|
|
13302
|
+
const cardEl = _optionalChain([el, 'optionalAccess', _325 => _325.closest, 'optionalCall', _326 => _326("[data-strip-card-key]")]);
|
|
13303
|
+
const scoped = cardEl && _optionalChain([scrollerRef, 'access', _327 => _327.current, 'optionalAccess', _328 => _328.contains, 'call', _329 => _329(cardEl)]) ? cardEl : null;
|
|
13304
|
+
const key = _nullishCoalesce(_optionalChain([scoped, 'optionalAccess', _330 => _330.getAttribute, 'call', _331 => _331("data-strip-card-key")]), () => ( null));
|
|
13139
13305
|
const current = activeKeyRef.current;
|
|
13140
13306
|
if (key === current) return;
|
|
13141
13307
|
if (current !== null) deactivate(current);
|
|
@@ -13173,7 +13339,7 @@ function CardsStrip(props) {
|
|
|
13173
13339
|
}, [syncHoverToPointer]);
|
|
13174
13340
|
const seamBuffer = _react.useCallback.call(void 0, () => {
|
|
13175
13341
|
const half = singleCopyWidthRef.current;
|
|
13176
|
-
const viewport = _nullishCoalesce(_optionalChain([scrollerRef, 'access',
|
|
13342
|
+
const viewport = _nullishCoalesce(_optionalChain([scrollerRef, 'access', _332 => _332.current, 'optionalAccess', _333 => _333.clientWidth]), () => ( 0));
|
|
13177
13343
|
return Math.max(0, Math.min(200, half / 4, half - viewport - TRACK_GAP_PX - 1));
|
|
13178
13344
|
}, []);
|
|
13179
13345
|
const { posRef: marqueePosRef, glideBy } = _chunkTLLJIGTPcjs.useMarqueeEngine.call(void 0, {
|
|
@@ -13189,7 +13355,7 @@ function CardsStrip(props) {
|
|
|
13189
13355
|
const scroller = scrollerRef.current;
|
|
13190
13356
|
if (scroller) scroller.scrollLeft = pos;
|
|
13191
13357
|
},
|
|
13192
|
-
readBack: () => _nullishCoalesce(_optionalChain([scrollerRef, 'access',
|
|
13358
|
+
readBack: () => _nullishCoalesce(_optionalChain([scrollerRef, 'access', _334 => _334.current, 'optionalAccess', _335 => _335.scrollLeft]), () => ( 0)),
|
|
13193
13359
|
onAfterFrame: syncHoverIfScrolled
|
|
13194
13360
|
});
|
|
13195
13361
|
const [mountedIdx, setMountedIdx] = _react.useState.call(void 0, () => /* @__PURE__ */ new Set());
|
|
@@ -13237,11 +13403,11 @@ function CardsStrip(props) {
|
|
|
13237
13403
|
fn = (el) => {
|
|
13238
13404
|
if (!el) return void 0;
|
|
13239
13405
|
cardElIdxRef.current.set(el, idx);
|
|
13240
|
-
_optionalChain([cardObserverRef, 'access',
|
|
13406
|
+
_optionalChain([cardObserverRef, 'access', _336 => _336.current, 'optionalAccess', _337 => _337.observe, 'call', _338 => _338(el)]);
|
|
13241
13407
|
return () => {
|
|
13242
13408
|
cardElIdxRef.current.delete(el);
|
|
13243
13409
|
cardElNearRef.current.delete(el);
|
|
13244
|
-
_optionalChain([cardObserverRef, 'access',
|
|
13410
|
+
_optionalChain([cardObserverRef, 'access', _339 => _339.current, 'optionalAccess', _340 => _340.unobserve, 'call', _341 => _341(el)]);
|
|
13245
13411
|
};
|
|
13246
13412
|
};
|
|
13247
13413
|
cardRefFns.set(idx, fn);
|
|
@@ -13260,7 +13426,7 @@ function CardsStrip(props) {
|
|
|
13260
13426
|
const track = trackRef.current;
|
|
13261
13427
|
if (!scroller || !track) return;
|
|
13262
13428
|
const firstCard = track.firstElementChild;
|
|
13263
|
-
const step = (_nullishCoalesce(_optionalChain([firstCard, 'optionalAccess',
|
|
13429
|
+
const step = (_nullishCoalesce(_optionalChain([firstCard, 'optionalAccess', _342 => _342.offsetWidth]), () => ( 320))) + TRACK_GAP_PX;
|
|
13264
13430
|
chevronSuppressUntilRef.current = performance.now() + CHEVRON_SUPPRESS_MS;
|
|
13265
13431
|
if (marqueeActiveRef.current) {
|
|
13266
13432
|
glideBy(dir * step);
|
|
@@ -13317,7 +13483,7 @@ function CardsStrip(props) {
|
|
|
13317
13483
|
{
|
|
13318
13484
|
ref: (node) => {
|
|
13319
13485
|
wrapperRef.current = node;
|
|
13320
|
-
_optionalChain([rootRef, 'optionalCall',
|
|
13486
|
+
_optionalChain([rootRef, 'optionalCall', _343 => _343(node)]);
|
|
13321
13487
|
},
|
|
13322
13488
|
className: _chunkX7CEWD6Vcjs.cn.call(void 0, "flex w-full min-w-0 flex-col gap-6", className),
|
|
13323
13489
|
children: [
|
|
@@ -13429,7 +13595,7 @@ function VideoHoverPreviewSurface({
|
|
|
13429
13595
|
if (gateControlled) return void 0;
|
|
13430
13596
|
const el = rootElRef.current;
|
|
13431
13597
|
if (!el || typeof IntersectionObserver === "undefined") return void 0;
|
|
13432
|
-
const io = new IntersectionObserver((entries) => setIsNear(_nullishCoalesce(_optionalChain([entries, 'access',
|
|
13598
|
+
const io = new IntersectionObserver((entries) => setIsNear(_nullishCoalesce(_optionalChain([entries, 'access', _344 => _344[0], 'optionalAccess', _345 => _345.isIntersecting]), () => ( false))), {
|
|
13433
13599
|
rootMargin: _chunkTLLJIGTPcjs.NEAR_VIEWPORT_ROOT_MARGIN
|
|
13434
13600
|
});
|
|
13435
13601
|
io.observe(el);
|
|
@@ -13574,7 +13740,7 @@ function VideoBitesStrip({
|
|
|
13574
13740
|
const filtered = filterPublished ? bites.filter((b) => b.published) : [...bites];
|
|
13575
13741
|
return filtered.sort(sortComparator);
|
|
13576
13742
|
}, [bites, filterPublished, sortComparator]);
|
|
13577
|
-
const warmup = useVideoWarmup({ videoUrl: _optionalChain([items, 'access',
|
|
13743
|
+
const warmup = useVideoWarmup({ videoUrl: _optionalChain([items, 'access', _346 => _346[0], 'optionalAccess', _347 => _347.url]) || null });
|
|
13578
13744
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
13579
13745
|
CardsStrip,
|
|
13580
13746
|
{
|
|
@@ -13641,8 +13807,8 @@ function VideoBiteCard({
|
|
|
13641
13807
|
const controlled = active !== void 0;
|
|
13642
13808
|
const [selfActive, setSelfActive] = _react.useState.call(void 0, false);
|
|
13643
13809
|
const isActive = controlled ? !!active : selfActive;
|
|
13644
|
-
const activate = () => controlled ? _optionalChain([onActivate, 'optionalCall',
|
|
13645
|
-
const deactivate = () => controlled ? _optionalChain([onDeactivate, 'optionalCall',
|
|
13810
|
+
const activate = () => controlled ? _optionalChain([onActivate, 'optionalCall', _348 => _348(key)]) : setSelfActive(true);
|
|
13811
|
+
const deactivate = () => controlled ? _optionalChain([onDeactivate, 'optionalCall', _349 => _349(key)]) : setSelfActive(false);
|
|
13646
13812
|
const titleInputRef = _react.useRef.call(void 0, null);
|
|
13647
13813
|
_chunkTLLJIGTPcjs.useIsomorphicLayoutEffect.call(void 0, () => {
|
|
13648
13814
|
const el = titleInputRef.current;
|
|
@@ -13652,7 +13818,7 @@ function VideoBiteCard({
|
|
|
13652
13818
|
});
|
|
13653
13819
|
const navigate = () => {
|
|
13654
13820
|
if (bite.onNavigate) bite.onNavigate();
|
|
13655
|
-
else _optionalChain([onBiteNavigate, 'optionalCall',
|
|
13821
|
+
else _optionalChain([onBiteNavigate, 'optionalCall', _350 => _350(bite, index)]);
|
|
13656
13822
|
};
|
|
13657
13823
|
const handlePointerEnter = () => {
|
|
13658
13824
|
if (!isTouch) activate();
|
|
@@ -13677,9 +13843,9 @@ function VideoBiteCard({
|
|
|
13677
13843
|
placeholder: "Title (optional)",
|
|
13678
13844
|
"aria-label": "Bite title",
|
|
13679
13845
|
rows: 1,
|
|
13680
|
-
onChange: (e) => _optionalChain([onTitleChange, 'optionalCall',
|
|
13846
|
+
onChange: (e) => _optionalChain([onTitleChange, 'optionalCall', _351 => _351(e.target.value)]),
|
|
13681
13847
|
ref: titleInputRef,
|
|
13682
|
-
onBlur: (e) => _optionalChain([onTitleCommit, 'optionalCall',
|
|
13848
|
+
onBlur: (e) => _optionalChain([onTitleCommit, 'optionalCall', _352 => _352(e.target.value)]),
|
|
13683
13849
|
onClick: (e) => e.stopPropagation(),
|
|
13684
13850
|
className: _chunkX7CEWD6Vcjs.cn.call(void 0,
|
|
13685
13851
|
titleClass,
|
|
@@ -13756,7 +13922,7 @@ function VideoBiteCard({
|
|
|
13756
13922
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
13757
13923
|
"div",
|
|
13758
13924
|
{
|
|
13759
|
-
ref: (node) => _optionalChain([rootRef, 'optionalCall',
|
|
13925
|
+
ref: (node) => _optionalChain([rootRef, 'optionalCall', _353 => _353(node)]),
|
|
13760
13926
|
"aria-hidden": isClone || void 0,
|
|
13761
13927
|
"data-strip-card-key": key,
|
|
13762
13928
|
className: _chunkX7CEWD6Vcjs.cn.call(void 0,
|
|
@@ -13811,8 +13977,8 @@ function EntityVideoSection({
|
|
|
13811
13977
|
const hasHighlight = !!highlightVideoUrl;
|
|
13812
13978
|
const hasVideo = hasFullVideo || hasHighlight;
|
|
13813
13979
|
const derivedCaptions = captionsEntity ? captions.forEntityId(captionsEntity.type, captionsEntity.id) : null;
|
|
13814
|
-
const captionsUrl = _nullishCoalesce(captionsUrlProp, () => ( _optionalChain([derivedCaptions, 'optionalAccess',
|
|
13815
|
-
const highlightCaptionsUrl = _nullishCoalesce(highlightCaptionsUrlProp, () => ( _optionalChain([derivedCaptions, 'optionalAccess',
|
|
13980
|
+
const captionsUrl = _nullishCoalesce(captionsUrlProp, () => ( _optionalChain([derivedCaptions, 'optionalAccess', _354 => _354.captionsUrl])));
|
|
13981
|
+
const highlightCaptionsUrl = _nullishCoalesce(highlightCaptionsUrlProp, () => ( _optionalChain([derivedCaptions, 'optionalAccess', _355 => _355.highlightCaptionsUrl])));
|
|
13816
13982
|
if (!hasVideo && !videoSummary && (!videoBites || videoBites.length === 0)) {
|
|
13817
13983
|
return null;
|
|
13818
13984
|
}
|
|
@@ -14331,7 +14497,7 @@ function DataRoomDocCard({ item, className, badgeText, anchorProps }) {
|
|
|
14331
14497
|
] }) : null,
|
|
14332
14498
|
item.preview ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "flex min-w-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "line-clamp-2 whitespace-pre-wrap break-words text-ods-text-secondary text-h6", children: item.preview }) }) : null
|
|
14333
14499
|
] }),
|
|
14334
|
-
_optionalChain([anchorProps, 'optionalAccess',
|
|
14500
|
+
_optionalChain([anchorProps, 'optionalAccess', _356 => _356.href]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "flex h-5 shrink-0 items-center self-start text-ods-text-secondary", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ExternalLink, { className: "h-3.5 w-3.5" }) }) : null
|
|
14335
14501
|
] });
|
|
14336
14502
|
if (!anchorProps) {
|
|
14337
14503
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `${_chunkEX5PJGVAcjs.COMPACT_CARD_OUTER_STATIC} ${_nullishCoalesce(className, () => ( ""))}`, "aria-label": "No link available", children: body });
|
|
@@ -14359,7 +14525,7 @@ function DataRoomDocCardSkeleton({ className }) {
|
|
|
14359
14525
|
|
|
14360
14526
|
|
|
14361
14527
|
function CampaignCardAdmin({ campaign, className, anchorProps }) {
|
|
14362
|
-
const goalsCount = _optionalChain([campaign, 'access',
|
|
14528
|
+
const goalsCount = _optionalChain([campaign, 'access', _357 => _357.goals, 'optionalAccess', _358 => _358.length]) || 0;
|
|
14363
14529
|
const innerChildren = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
14364
14530
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkEX5PJGVAcjs.COMPACT_CARD_ICON_SLOT, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Megaphone, { className: "h-5 w-5" }) }),
|
|
14365
14531
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: _chunkEX5PJGVAcjs.COMPACT_CARD_TEXT_COL, children: [
|
|
@@ -14653,7 +14819,7 @@ function pickFetchedCardHref({
|
|
|
14653
14819
|
itemHref,
|
|
14654
14820
|
allowComposed
|
|
14655
14821
|
}) {
|
|
14656
|
-
if (_optionalChain([composed, 'optionalAccess',
|
|
14822
|
+
if (_optionalChain([composed, 'optionalAccess', _359 => _359.hostOverride])) {
|
|
14657
14823
|
return { source: "hostOverride", href: composed.href, targetPlatform: composed.targetPlatform };
|
|
14658
14824
|
}
|
|
14659
14825
|
if (itemHref) return { source: "item", href: itemHref };
|
|
@@ -14841,6 +15007,12 @@ var DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID = {
|
|
|
14841
15007
|
function defaultTableIdForDocumentType(documentType) {
|
|
14842
15008
|
return _nullishCoalesce(DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID[documentType], () => ( null));
|
|
14843
15009
|
}
|
|
15010
|
+
function defaultDocumentTypeForTableId(tableId) {
|
|
15011
|
+
for (const [documentType, table] of Object.entries(DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID)) {
|
|
15012
|
+
if (table === tableId) return documentType;
|
|
15013
|
+
}
|
|
15014
|
+
return null;
|
|
15015
|
+
}
|
|
14844
15016
|
|
|
14845
15017
|
// src/components/chat/utils/source-row-cta.ts
|
|
14846
15018
|
|
|
@@ -14897,7 +15069,7 @@ function byKey(key) {
|
|
|
14897
15069
|
return PLATFORM_DOMAINS.find((e) => e.key === key);
|
|
14898
15070
|
}
|
|
14899
15071
|
function envOverrideFor(key) {
|
|
14900
|
-
const envVar = _optionalChain([byKey, 'call',
|
|
15072
|
+
const envVar = _optionalChain([byKey, 'call', _360 => _360(key), 'optionalAccess', _361 => _361.envVar]);
|
|
14901
15073
|
if (!envVar) return null;
|
|
14902
15074
|
return ENV_OVERRIDES[envVar] || null;
|
|
14903
15075
|
}
|
|
@@ -14907,7 +15079,7 @@ function ensureScheme(url) {
|
|
|
14907
15079
|
return `https://${trimmed.replace(/^\/+/, "")}`;
|
|
14908
15080
|
}
|
|
14909
15081
|
function getPlatformProductionUrl(platform) {
|
|
14910
|
-
const resolved = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(envOverrideFor(platform), () => ( _optionalChain([byKey, 'call',
|
|
15082
|
+
const resolved = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(envOverrideFor(platform), () => ( _optionalChain([byKey, 'call', _362 => _362(platform), 'optionalAccess', _363 => _363.defaultUrl]))), () => ( envOverrideFor("flamingo"))), () => ( "https://www.flamingo.run"));
|
|
14911
15083
|
return ensureScheme(resolved);
|
|
14912
15084
|
}
|
|
14913
15085
|
function getPlatformUrl(platform, options = {}) {
|
|
@@ -14916,7 +15088,7 @@ function getPlatformUrl(platform, options = {}) {
|
|
|
14916
15088
|
}
|
|
14917
15089
|
function getDeploymentUrl(options) {
|
|
14918
15090
|
if (typeof window !== "undefined") return window.location.origin;
|
|
14919
|
-
const configured = _optionalChain([options, 'access',
|
|
15091
|
+
const configured = _optionalChain([options, 'access', _364 => _364.configuredUrl, 'optionalAccess', _365 => _365.trim, 'call', _366 => _366()]);
|
|
14920
15092
|
if (configured) return ensureScheme(configured).replace(/\/+$/, "");
|
|
14921
15093
|
if (process.env.VERCEL_ENV === "preview" && process.env.VERCEL_URL) {
|
|
14922
15094
|
return ensureScheme(process.env.VERCEL_URL).replace(/\/+$/, "");
|
|
@@ -14938,7 +15110,7 @@ function getRequestOrigin(headers, options) {
|
|
|
14938
15110
|
const host = headers.get("host");
|
|
14939
15111
|
if (!host) return getDeploymentUrl(options);
|
|
14940
15112
|
const local = LOCAL_HOSTNAME.test(host.replace(/:\d+$/, ""));
|
|
14941
|
-
const proto = _optionalChain([headers, 'access',
|
|
15113
|
+
const proto = _optionalChain([headers, 'access', _367 => _367.get, 'call', _368 => _368("x-forwarded-proto"), 'optionalAccess', _369 => _369.split, 'call', _370 => _370(","), 'access', _371 => _371[0], 'access', _372 => _372.trim, 'call', _373 => _373()]) || (local ? "http" : "https");
|
|
14942
15114
|
return `${proto}://${host}`;
|
|
14943
15115
|
}
|
|
14944
15116
|
function resolveRedirectTarget(origin, target) {
|
|
@@ -14967,7 +15139,7 @@ function toRegistrableBaseDomain(host) {
|
|
|
14967
15139
|
return void 0;
|
|
14968
15140
|
}
|
|
14969
15141
|
function aliasHostsOf(key) {
|
|
14970
|
-
return _nullishCoalesce(_optionalChain([byKey, 'call',
|
|
15142
|
+
return _nullishCoalesce(_optionalChain([byKey, 'call', _374 => _374(key), 'optionalAccess', _375 => _375.aliasHostnames]), () => ( []));
|
|
14971
15143
|
}
|
|
14972
15144
|
function hostsForEntry(entry, opts) {
|
|
14973
15145
|
const resolved = hostOf(getPlatformProductionUrl(entry.key));
|
|
@@ -15016,6 +15188,110 @@ if (_orderIdx("flamingo") > _orderIdx("flamingo-teaser") || _orderIdx("flamingo"
|
|
|
15016
15188
|
);
|
|
15017
15189
|
}
|
|
15018
15190
|
|
|
15191
|
+
// src/utils/source-grouping.ts
|
|
15192
|
+
var DOC_TABLE_TYPES = ["markdown", "data_room_doc"];
|
|
15193
|
+
function groupsByTable(documentType) {
|
|
15194
|
+
return !DOC_TABLE_TYPES.includes(_nullishCoalesce(documentType, () => ( "")));
|
|
15195
|
+
}
|
|
15196
|
+
function recordCountLabel(count) {
|
|
15197
|
+
return `(${count} ${count === 1 ? "record" : "records"})`;
|
|
15198
|
+
}
|
|
15199
|
+
function buildGroupedSource(spec) {
|
|
15200
|
+
const first = spec.rows[0];
|
|
15201
|
+
const externalUrl = _nullishCoalesce(spec.externalUrl, () => ( _optionalChain([first, 'optionalAccess', _376 => _376.externalUrl])));
|
|
15202
|
+
const targetPlatform = spec.targetPlatform !== void 0 ? spec.targetPlatform : _optionalChain([first, 'optionalAccess', _377 => _377.targetPlatform]);
|
|
15203
|
+
return {
|
|
15204
|
+
index: spec.index,
|
|
15205
|
+
name: `${getSourceLabel(spec.sourceRepo)} ${recordCountLabel(spec.rows.length)}`,
|
|
15206
|
+
path: _nullishCoalesce(_optionalChain([first, 'optionalAccess', _378 => _378.path]), () => ( "")),
|
|
15207
|
+
documentType: _nullishCoalesce(_optionalChain([first, 'optionalAccess', _379 => _379.documentType]), () => ( "")),
|
|
15208
|
+
...externalUrl ? { externalUrl } : {},
|
|
15209
|
+
targetPlatform: _nullishCoalesce(targetPlatform, () => ( null)),
|
|
15210
|
+
sourceRepo: spec.sourceRepo,
|
|
15211
|
+
items: spec.rows
|
|
15212
|
+
};
|
|
15213
|
+
}
|
|
15214
|
+
function isGroupedChip(source) {
|
|
15215
|
+
return !!source.items && source.items.length > 0;
|
|
15216
|
+
}
|
|
15217
|
+
function typeOf(source) {
|
|
15218
|
+
return source.documentType || defaultDocumentTypeForTableId(source.sourceRepo) || "";
|
|
15219
|
+
}
|
|
15220
|
+
function joinsTableChip(source) {
|
|
15221
|
+
if (!source.sourceRepo) return false;
|
|
15222
|
+
return groupsByTable(typeOf({ ...source, sourceRepo: source.sourceRepo }));
|
|
15223
|
+
}
|
|
15224
|
+
function rowsOf(source) {
|
|
15225
|
+
if (isGroupedChip(source)) return _nullishCoalesce(source.items, () => ( []));
|
|
15226
|
+
return [
|
|
15227
|
+
{
|
|
15228
|
+
index: source.index,
|
|
15229
|
+
id: _nullishCoalesce(source.id, () => ( "")),
|
|
15230
|
+
documentType: typeOf(source),
|
|
15231
|
+
name: source.name,
|
|
15232
|
+
...source.externalUrl ? { externalUrl: source.externalUrl } : {},
|
|
15233
|
+
targetPlatform: _nullishCoalesce(source.targetPlatform, () => ( null)),
|
|
15234
|
+
path: source.path || null
|
|
15235
|
+
}
|
|
15236
|
+
];
|
|
15237
|
+
}
|
|
15238
|
+
function uniqueRows(rows) {
|
|
15239
|
+
const seen = /* @__PURE__ */ new Set();
|
|
15240
|
+
return rows.filter((row) => {
|
|
15241
|
+
if (!row.id) return true;
|
|
15242
|
+
const identity = `${row.documentType}:${row.id}`;
|
|
15243
|
+
if (seen.has(identity)) return false;
|
|
15244
|
+
seen.add(identity);
|
|
15245
|
+
return true;
|
|
15246
|
+
});
|
|
15247
|
+
}
|
|
15248
|
+
function groupSourcesByTable(sources2) {
|
|
15249
|
+
const membersByTable = /* @__PURE__ */ new Map();
|
|
15250
|
+
for (const source of sources2) {
|
|
15251
|
+
if (!joinsTableChip(source)) continue;
|
|
15252
|
+
const members = _nullishCoalesce(membersByTable.get(source.sourceRepo), () => ( []));
|
|
15253
|
+
members.push(source);
|
|
15254
|
+
membersByTable.set(source.sourceRepo, members);
|
|
15255
|
+
}
|
|
15256
|
+
const emitted = /* @__PURE__ */ new Set();
|
|
15257
|
+
const chips = [];
|
|
15258
|
+
for (const source of sources2) {
|
|
15259
|
+
if (!joinsTableChip(source)) {
|
|
15260
|
+
chips.push(source);
|
|
15261
|
+
continue;
|
|
15262
|
+
}
|
|
15263
|
+
if (emitted.has(source.sourceRepo)) continue;
|
|
15264
|
+
emitted.add(source.sourceRepo);
|
|
15265
|
+
const members = _nullishCoalesce(membersByTable.get(source.sourceRepo), () => ( []));
|
|
15266
|
+
if (members.length === 1 && isGroupedChip(source)) {
|
|
15267
|
+
chips.push(source);
|
|
15268
|
+
continue;
|
|
15269
|
+
}
|
|
15270
|
+
const serverChip = members.find(isGroupedChip);
|
|
15271
|
+
chips.push(
|
|
15272
|
+
buildGroupedSource({
|
|
15273
|
+
index: source.index,
|
|
15274
|
+
sourceRepo: source.sourceRepo,
|
|
15275
|
+
rows: uniqueRows(members.flatMap(rowsOf)),
|
|
15276
|
+
..._optionalChain([serverChip, 'optionalAccess', _380 => _380.externalUrl]) ? { externalUrl: serverChip.externalUrl } : {},
|
|
15277
|
+
...serverChip && serverChip.targetPlatform !== void 0 ? { targetPlatform: serverChip.targetPlatform } : {}
|
|
15278
|
+
})
|
|
15279
|
+
);
|
|
15280
|
+
}
|
|
15281
|
+
return chips;
|
|
15282
|
+
}
|
|
15283
|
+
function formatCitationIndices(indices) {
|
|
15284
|
+
const sorted = [...new Set(indices)].sort((a, b) => a - b);
|
|
15285
|
+
const runs = [];
|
|
15286
|
+
for (let start = 0; start < sorted.length; ) {
|
|
15287
|
+
let end = start;
|
|
15288
|
+
while (end + 1 < sorted.length && sorted[end + 1] === sorted[end] + 1) end++;
|
|
15289
|
+
runs.push(end === start ? `${sorted[start]}` : `${sorted[start]}-${sorted[end]}`);
|
|
15290
|
+
start = end + 1;
|
|
15291
|
+
}
|
|
15292
|
+
return runs.join(", ");
|
|
15293
|
+
}
|
|
15294
|
+
|
|
15019
15295
|
// src/components/chat/utils/source-row-cta.ts
|
|
15020
15296
|
function sanitizePath(path) {
|
|
15021
15297
|
return (path || "").replace(/[^a-zA-Z0-9/_\-.]/g, "");
|
|
@@ -15035,7 +15311,6 @@ function pickSourceIcon(sourceRepo, documentType) {
|
|
|
15035
15311
|
const iconLabel = _nullishCoalesce(documentType, () => ( "Source"));
|
|
15036
15312
|
return { icon, iconLabel };
|
|
15037
15313
|
}
|
|
15038
|
-
var DOC_TABLE_TYPES = ["markdown", "data_room_doc"];
|
|
15039
15314
|
function shouldFallbackToPathNav(row) {
|
|
15040
15315
|
return !!row.documentType && DOC_TABLE_TYPES.includes(row.documentType);
|
|
15041
15316
|
}
|
|
@@ -15048,7 +15323,7 @@ function resolveSourceRowCTA(row, ctx = {}) {
|
|
|
15048
15323
|
if (row.path && shouldFallbackToPathNav(row) && !row.externalUrl) {
|
|
15049
15324
|
const safePath = sanitizePath(row.path);
|
|
15050
15325
|
if (safePath) {
|
|
15051
|
-
const docTarget = row.documentType ? _optionalChain([ctx, 'access',
|
|
15326
|
+
const docTarget = row.documentType ? _optionalChain([ctx, 'access', _381 => _381.docPlatformTargets, 'optionalAccess', _382 => _382[row.documentType]]) : void 0;
|
|
15052
15327
|
if (docTarget) {
|
|
15053
15328
|
const seg = docTarget.basePath.split("/").filter(Boolean).join("/");
|
|
15054
15329
|
const base = `${getPlatformUrl(docTarget.platform)}${seg ? `/${seg}` : ""}/`;
|
|
@@ -15191,8 +15466,8 @@ function cardMenuGroups(href, discuss, openDetails, externalLink) {
|
|
|
15191
15466
|
if (href) {
|
|
15192
15467
|
items.push({
|
|
15193
15468
|
id: "open-details",
|
|
15194
|
-
label: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess',
|
|
15195
|
-
icon: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess',
|
|
15469
|
+
label: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess', _383 => _383.label]), () => ( "Open Details")),
|
|
15470
|
+
icon: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess', _384 => _384.icon]), () => ( /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.EyeIcon, { size: 20 }))),
|
|
15196
15471
|
// Main row → open the entity (same tab, soft Link nav).
|
|
15197
15472
|
href,
|
|
15198
15473
|
// Trailing 40px ↗ side-button → open in a new tab.
|
|
@@ -15252,18 +15527,18 @@ function itemVideoMetadata(item) {
|
|
|
15252
15527
|
for (const v of vals) if (typeof v === "string" && v.length > 0) return v;
|
|
15253
15528
|
return void 0;
|
|
15254
15529
|
};
|
|
15255
|
-
const m = _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15530
|
+
const m = _nullishCoalesce(_optionalChain([item, 'optionalAccess', _385 => _385.metadata]), () => ( {}));
|
|
15256
15531
|
const out = {};
|
|
15257
|
-
const videoUrl = pick(m.videoUrl, _optionalChain([item, 'optionalAccess',
|
|
15258
|
-
const youtubeUrl = pick(m.youtubeUrl, _optionalChain([item, 'optionalAccess',
|
|
15259
|
-
const highlightVideoUrl = pick(m.highlightVideoUrl, _optionalChain([item, 'optionalAccess',
|
|
15532
|
+
const videoUrl = pick(m.videoUrl, _optionalChain([item, 'optionalAccess', _386 => _386.custom_video_url]), _optionalChain([item, 'optionalAccess', _387 => _387.main_video_url]));
|
|
15533
|
+
const youtubeUrl = pick(m.youtubeUrl, _optionalChain([item, 'optionalAccess', _388 => _388.youtube_url]), _optionalChain([item, 'optionalAccess', _389 => _389.testimonial_video_url]));
|
|
15534
|
+
const highlightVideoUrl = pick(m.highlightVideoUrl, _optionalChain([item, 'optionalAccess', _390 => _390.highlight_video_url]));
|
|
15260
15535
|
const videoPoster = pick(
|
|
15261
15536
|
m.videoPoster,
|
|
15262
|
-
_optionalChain([item, 'optionalAccess',
|
|
15263
|
-
_optionalChain([item, 'optionalAccess',
|
|
15264
|
-
_optionalChain([item, 'optionalAccess',
|
|
15537
|
+
_optionalChain([item, 'optionalAccess', _391 => _391.main_video_thumbnail]),
|
|
15538
|
+
_optionalChain([item, 'optionalAccess', _392 => _392.highlight_video_thumbnail]),
|
|
15539
|
+
_optionalChain([item, 'optionalAccess', _393 => _393.featured_image])
|
|
15265
15540
|
);
|
|
15266
|
-
const highlightVideoPoster = pick(m.highlightVideoPoster, _optionalChain([item, 'optionalAccess',
|
|
15541
|
+
const highlightVideoPoster = pick(m.highlightVideoPoster, _optionalChain([item, 'optionalAccess', _394 => _394.highlight_video_thumbnail]));
|
|
15267
15542
|
if (videoUrl) out.videoUrl = videoUrl;
|
|
15268
15543
|
if (youtubeUrl) out.youtubeUrl = youtubeUrl;
|
|
15269
15544
|
if (highlightVideoUrl) out.highlightVideoUrl = highlightVideoUrl;
|
|
@@ -15293,15 +15568,15 @@ function fetchedItemDisplayRef(item, chatRef) {
|
|
|
15293
15568
|
}
|
|
15294
15569
|
function fetchedFaqDisplayRef(item, chatRef) {
|
|
15295
15570
|
const it = item;
|
|
15296
|
-
const answer = typeof _optionalChain([it, 'optionalAccess',
|
|
15571
|
+
const answer = typeof _optionalChain([it, 'optionalAccess', _395 => _395.answer]) === "string" && it.answer.trim().length > 0 ? it.answer.trim() : null;
|
|
15297
15572
|
return {
|
|
15298
15573
|
type: "faq",
|
|
15299
15574
|
id: chatRef.id,
|
|
15300
15575
|
sourceRepo: chatRef.sourceRepo,
|
|
15301
|
-
title: typeof _optionalChain([it, 'optionalAccess',
|
|
15576
|
+
title: typeof _optionalChain([it, 'optionalAccess', _396 => _396.question]) === "string" && it.question ? it.question : chatRef.id,
|
|
15302
15577
|
url: _nullishCoalesce(chatRef.url, () => ( null)),
|
|
15303
15578
|
...answer ? { preview: answer.length > 400 ? `${answer.slice(0, 397)}\u2026` : answer } : {},
|
|
15304
|
-
metadata: typeof _optionalChain([it, 'optionalAccess',
|
|
15579
|
+
metadata: typeof _optionalChain([it, 'optionalAccess', _397 => _397.section]) === "string" && it.section ? { section: it.section } : {}
|
|
15305
15580
|
};
|
|
15306
15581
|
}
|
|
15307
15582
|
function HubspotTicketChatCard({
|
|
@@ -15309,8 +15584,8 @@ function HubspotTicketChatCard({
|
|
|
15309
15584
|
isNewTab,
|
|
15310
15585
|
discuss
|
|
15311
15586
|
}) {
|
|
15312
|
-
const status = typeof _optionalChain([chatRef, 'access',
|
|
15313
|
-
const statusLabel = typeof _optionalChain([chatRef, 'access',
|
|
15587
|
+
const status = typeof _optionalChain([chatRef, 'access', _398 => _398.metadata, 'optionalAccess', _399 => _399.status]) === "string" ? chatRef.metadata.status : void 0;
|
|
15588
|
+
const statusLabel = typeof _optionalChain([chatRef, 'access', _400 => _400.metadata, 'optionalAccess', _401 => _401.statusLabel]) === "string" ? chatRef.metadata.statusLabel : void 0;
|
|
15314
15589
|
const statusText = _nullishCoalesce(statusLabel, () => ( formatStatusToken(status)));
|
|
15315
15590
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15316
15591
|
MingoInfoCard,
|
|
@@ -15333,7 +15608,7 @@ function FaqChatCard({
|
|
|
15333
15608
|
isNewTab,
|
|
15334
15609
|
discuss
|
|
15335
15610
|
}) {
|
|
15336
|
-
const section = typeof _optionalChain([chatRef, 'access',
|
|
15611
|
+
const section = typeof _optionalChain([chatRef, 'access', _402 => _402.metadata, 'optionalAccess', _403 => _403.section]) === "string" ? chatRef.metadata.section.trim() : void 0;
|
|
15337
15612
|
const statusLabel = section && section.length > 0 ? section : "FAQ";
|
|
15338
15613
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15339
15614
|
MingoInfoCard,
|
|
@@ -15353,7 +15628,7 @@ function SlackChatCard({
|
|
|
15353
15628
|
isNewTab,
|
|
15354
15629
|
discuss
|
|
15355
15630
|
}) {
|
|
15356
|
-
const channelName = typeof _optionalChain([chatRef, 'access',
|
|
15631
|
+
const channelName = typeof _optionalChain([chatRef, 'access', _404 => _404.metadata, 'optionalAccess', _405 => _405.channelName]) === "string" ? chatRef.metadata.channelName.trim() : void 0;
|
|
15357
15632
|
const channelPretty = channelName ? channelName.startsWith("#") ? channelName : `#${channelName}` : void 0;
|
|
15358
15633
|
const title = channelPretty ? `${chatRef.title} \xB7 ${channelPretty}` : chatRef.title;
|
|
15359
15634
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -15411,7 +15686,7 @@ function GenericFinancialChatCard({
|
|
|
15411
15686
|
isNewTab,
|
|
15412
15687
|
discuss
|
|
15413
15688
|
}) {
|
|
15414
|
-
const subtitle = typeof _optionalChain([chatRef, 'access',
|
|
15689
|
+
const subtitle = typeof _optionalChain([chatRef, 'access', _406 => _406.metadata, 'optionalAccess', _407 => _407.subtitle]) === "string" ? chatRef.metadata.subtitle : void 0;
|
|
15415
15690
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15416
15691
|
MingoInfoCard,
|
|
15417
15692
|
{
|
|
@@ -15480,12 +15755,12 @@ function ProductReleaseChatCard({
|
|
|
15480
15755
|
discuss
|
|
15481
15756
|
}) {
|
|
15482
15757
|
const releaseProps = buildProps(item);
|
|
15483
|
-
const status = _optionalChain([item, 'optionalAccess',
|
|
15758
|
+
const status = _optionalChain([item, 'optionalAccess', _408 => _408.version]) ? { label: String(item.version), variant: "grey" } : { label: "Release", variant: "grey" };
|
|
15484
15759
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15485
15760
|
EntityMingoCard,
|
|
15486
15761
|
{
|
|
15487
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15488
|
-
description: _optionalChain([item, 'optionalAccess',
|
|
15762
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _409 => _409.title]), () => ( "")),
|
|
15763
|
+
description: _optionalChain([item, 'optionalAccess', _410 => _410.summary]) || releaseProps.formattedDate || void 0,
|
|
15489
15764
|
cover: releaseProps.coverImage || void 0,
|
|
15490
15765
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.Rocket02Icon, { size: 24 }),
|
|
15491
15766
|
status,
|
|
@@ -15502,17 +15777,17 @@ function CampaignChatCard({
|
|
|
15502
15777
|
isNewTab,
|
|
15503
15778
|
discuss
|
|
15504
15779
|
}) {
|
|
15505
|
-
const goalsCount = Array.isArray(_optionalChain([item, 'optionalAccess',
|
|
15780
|
+
const goalsCount = Array.isArray(_optionalChain([item, 'optionalAccess', _411 => _411.goals])) ? item.goals.length : 0;
|
|
15506
15781
|
const meta = [
|
|
15507
|
-
_optionalChain([item, 'optionalAccess',
|
|
15782
|
+
_optionalChain([item, 'optionalAccess', _412 => _412.start_date]) ? _chunkEX5PJGVAcjs.formatDateShort.call(void 0, item.start_date) : null,
|
|
15508
15783
|
goalsCount > 0 ? `${goalsCount} goal${goalsCount !== 1 ? "s" : ""}` : null,
|
|
15509
15784
|
"Marketing campaign"
|
|
15510
15785
|
].filter(Boolean).join(" \xB7 ");
|
|
15511
15786
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15512
15787
|
EntityMingoCard,
|
|
15513
15788
|
{
|
|
15514
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15515
|
-
description: meta || _optionalChain([item, 'optionalAccess',
|
|
15789
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _413 => _413.name]), () => ( "")),
|
|
15790
|
+
description: meta || _optionalChain([item, 'optionalAccess', _414 => _414.description]) || void 0,
|
|
15516
15791
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.Megaphone01Icon, { size: 24 }),
|
|
15517
15792
|
chatRef,
|
|
15518
15793
|
isNewTab,
|
|
@@ -15567,14 +15842,14 @@ function BlogChatCard({
|
|
|
15567
15842
|
hasEmbeddedVideo,
|
|
15568
15843
|
discuss
|
|
15569
15844
|
}) {
|
|
15570
|
-
const category = Array.isArray(_optionalChain([item, 'optionalAccess',
|
|
15845
|
+
const category = Array.isArray(_optionalChain([item, 'optionalAccess', _415 => _415.categories])) ? _nullishCoalesce(_optionalChain([item, 'access', _416 => _416.categories, 'access', _417 => _417.find, 'call', _418 => _418((c) => _optionalChain([c, 'optionalAccess', _419 => _419.name])), 'optionalAccess', _420 => _420.name]), () => ( void 0)) : void 0;
|
|
15571
15846
|
const status = hasEmbeddedVideo ? { label: "Video", variant: "primary" } : category ? { label: category, variant: "grey" } : void 0;
|
|
15572
15847
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15573
15848
|
EntityMingoCard,
|
|
15574
15849
|
{
|
|
15575
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15576
|
-
description: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15577
|
-
cover: entityCover(_optionalChain([item, 'optionalAccess',
|
|
15850
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _421 => _421.title]), () => ( "")),
|
|
15851
|
+
description: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _422 => _422.summary]), () => ( void 0)),
|
|
15852
|
+
cover: entityCover(_optionalChain([item, 'optionalAccess', _423 => _423.featured_image]), ogPlaceholder),
|
|
15578
15853
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.NewspaperIcon, { size: 24 }),
|
|
15579
15854
|
status,
|
|
15580
15855
|
chatRef,
|
|
@@ -15591,13 +15866,13 @@ function CaseStudyChatCard({
|
|
|
15591
15866
|
ogPlaceholder,
|
|
15592
15867
|
discuss
|
|
15593
15868
|
}) {
|
|
15594
|
-
const meta = [_optionalChain([item, 'optionalAccess',
|
|
15869
|
+
const meta = [_optionalChain([item, 'optionalAccess', _424 => _424.msp, 'optionalAccess', _425 => _425.name]), _optionalChain([item, 'optionalAccess', _426 => _426.user, 'optionalAccess', _427 => _427.full_name])].filter(Boolean).join(" \xB7 ");
|
|
15595
15870
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15596
15871
|
EntityMingoCard,
|
|
15597
15872
|
{
|
|
15598
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15599
|
-
description: _optionalChain([item, 'optionalAccess',
|
|
15600
|
-
cover: entityCover(_optionalChain([item, 'optionalAccess',
|
|
15873
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _428 => _428.title]), () => ( "")),
|
|
15874
|
+
description: _optionalChain([item, 'optionalAccess', _429 => _429.summary]) || meta || void 0,
|
|
15875
|
+
cover: entityCover(_optionalChain([item, 'optionalAccess', _430 => _430.featured_image]), ogPlaceholder),
|
|
15601
15876
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.TrophyIcon, { size: 24 }),
|
|
15602
15877
|
status: { label: "Case study", variant: "grey" },
|
|
15603
15878
|
chatRef,
|
|
@@ -15614,13 +15889,13 @@ function CustomerInterviewChatCard({
|
|
|
15614
15889
|
ogPlaceholder,
|
|
15615
15890
|
discuss
|
|
15616
15891
|
}) {
|
|
15617
|
-
const meta = [_optionalChain([item, 'optionalAccess',
|
|
15892
|
+
const meta = [_optionalChain([item, 'optionalAccess', _431 => _431.user, 'optionalAccess', _432 => _432.full_name]), _optionalChain([item, 'optionalAccess', _433 => _433.msp, 'optionalAccess', _434 => _434.name])].filter(Boolean).join(" \xB7 ");
|
|
15618
15893
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15619
15894
|
EntityMingoCard,
|
|
15620
15895
|
{
|
|
15621
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15622
|
-
description: _optionalChain([item, 'optionalAccess',
|
|
15623
|
-
cover: entityCover(_optionalChain([item, 'optionalAccess',
|
|
15896
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _435 => _435.title]), () => ( "")),
|
|
15897
|
+
description: _optionalChain([item, 'optionalAccess', _436 => _436.video_summary]) || meta || void 0,
|
|
15898
|
+
cover: entityCover(_optionalChain([item, 'optionalAccess', _437 => _437.featured_image]), ogPlaceholder),
|
|
15624
15899
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.MicrophoneIcon, { size: 24 }),
|
|
15625
15900
|
status: { label: "Interview", variant: "grey" },
|
|
15626
15901
|
chatRef,
|
|
@@ -15637,13 +15912,13 @@ function InvestorUpdateChatCard({
|
|
|
15637
15912
|
ogPlaceholder,
|
|
15638
15913
|
discuss
|
|
15639
15914
|
}) {
|
|
15640
|
-
const title = _optionalChain([item, 'optionalAccess',
|
|
15915
|
+
const title = _optionalChain([item, 'optionalAccess', _438 => _438.title]) || `Update #${_nullishCoalesce(_optionalChain([item, 'optionalAccess', _439 => _439.update_number]), () => ( "?"))}`;
|
|
15641
15916
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15642
15917
|
EntityMingoCard,
|
|
15643
15918
|
{
|
|
15644
15919
|
title,
|
|
15645
|
-
description: _optionalChain([item, 'optionalAccess',
|
|
15646
|
-
cover: entityCover(_optionalChain([item, 'optionalAccess',
|
|
15920
|
+
description: _optionalChain([item, 'optionalAccess', _440 => _440.strategic_update]) || _optionalChain([item, 'optionalAccess', _441 => _441.content]) || _chunkEX5PJGVAcjs.formatInvestorUpdatePeriod.call(void 0, _nullishCoalesce(_optionalChain([item, 'optionalAccess', _442 => _442.period_start]), () => ( null)), _nullishCoalesce(_optionalChain([item, 'optionalAccess', _443 => _443.period_end]), () => ( null))) || void 0,
|
|
15921
|
+
cover: entityCover(_optionalChain([item, 'optionalAccess', _444 => _444.featured_image]), ogPlaceholder),
|
|
15647
15922
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.PresentationLineIcon, { size: 24 }),
|
|
15648
15923
|
status: { label: "Investor update", variant: "grey" },
|
|
15649
15924
|
chatRef,
|
|
@@ -15660,12 +15935,12 @@ function OnboardingGuideChatCard({
|
|
|
15660
15935
|
ogPlaceholder,
|
|
15661
15936
|
discuss
|
|
15662
15937
|
}) {
|
|
15663
|
-
const cover = _nullishCoalesce(_nullishCoalesce(entityCover(_optionalChain([item, 'optionalAccess',
|
|
15938
|
+
const cover = _nullishCoalesce(_nullishCoalesce(entityCover(_optionalChain([item, 'optionalAccess', _445 => _445.featured_image])), () => ( entityCover(_optionalChain([item, 'optionalAccess', _446 => _446.main_video_thumbnail])))), () => ( entityCover(_optionalChain([item, 'optionalAccess', _447 => _447.og_image_url]), ogPlaceholder)));
|
|
15664
15939
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15665
15940
|
EntityMingoCard,
|
|
15666
15941
|
{
|
|
15667
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15668
|
-
description: _nullishCoalesce(_nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15942
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _448 => _448.title]), () => ( "")),
|
|
15943
|
+
description: _nullishCoalesce(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _449 => _449.summary]), () => ( _optionalChain([item, 'optionalAccess', _450 => _450.description]))), () => ( void 0)),
|
|
15669
15944
|
cover,
|
|
15670
15945
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.CompassIcon, { size: 24 }),
|
|
15671
15946
|
status: { label: "Guide", variant: "grey" },
|
|
@@ -15690,9 +15965,9 @@ function ProgramChatCard({
|
|
|
15690
15965
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15691
15966
|
EntityMingoCard,
|
|
15692
15967
|
{
|
|
15693
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15694
|
-
description: meta || _optionalChain([item, 'optionalAccess',
|
|
15695
|
-
cover: entityCover(_optionalChain([item, 'optionalAccess',
|
|
15968
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _451 => _451.title]), () => ( "")),
|
|
15969
|
+
description: meta || _optionalChain([item, 'optionalAccess', _452 => _452.description]) || void 0,
|
|
15970
|
+
cover: entityCover(_optionalChain([item, 'optionalAccess', _453 => _453.cover_url]), ogPlaceholder),
|
|
15696
15971
|
fallbackIcon: icon,
|
|
15697
15972
|
status: { label, variant: "grey" },
|
|
15698
15973
|
chatRef,
|
|
@@ -15709,10 +15984,10 @@ function RoadmapChatCard({
|
|
|
15709
15984
|
cardType,
|
|
15710
15985
|
discuss
|
|
15711
15986
|
}) {
|
|
15712
|
-
const logoUrl = typeof _optionalChain([item, 'optionalAccess',
|
|
15713
|
-
const useTypeIcon = cardType === "internal_task" || !logoUrl && _optionalChain([item, 'optionalAccess',
|
|
15987
|
+
const logoUrl = typeof _optionalChain([item, 'optionalAccess', _454 => _454.icon]) === "string" && item.icon.startsWith("http") ? item.icon : void 0;
|
|
15988
|
+
const useTypeIcon = cardType === "internal_task" || !logoUrl && _optionalChain([item, 'optionalAccess', _455 => _455.customItemId]) != null;
|
|
15714
15989
|
const defaultIcon = cardType === "delivery_item" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.TruckFastIcon, { size: 24 }) : cardType === "internal_task" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.CheckSquareIcon, { size: 24 }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.MapIcon, { size: 24 });
|
|
15715
|
-
const icon = useTypeIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEX5PJGVAcjs.TaskTypeIcon, { customItemId: _optionalChain([item, 'optionalAccess',
|
|
15990
|
+
const icon = useTypeIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEX5PJGVAcjs.TaskTypeIcon, { customItemId: _optionalChain([item, 'optionalAccess', _456 => _456.customItemId]), className: "size-6" }) : logoUrl ? (
|
|
15716
15991
|
// Contained (not full-bleed) so the integration logo keeps its aspect
|
|
15717
15992
|
// ratio inside the bordered icon box — matches RoadmapCard.
|
|
15718
15993
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWLSFBRT5cjs.next_image_default, { src: logoUrl, alt: "", className: "size-6 object-contain", width: 24, height: 24, unoptimized: true })
|
|
@@ -15723,10 +15998,10 @@ function RoadmapChatCard({
|
|
|
15723
15998
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15724
15999
|
EntityMingoCard,
|
|
15725
16000
|
{
|
|
15726
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15727
|
-
description: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
16001
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _457 => _457.title]), () => ( "")),
|
|
16002
|
+
description: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _458 => _458.description]), () => ( void 0)),
|
|
15728
16003
|
fallbackIcon: icon,
|
|
15729
|
-
status: statusPill(_optionalChain([item, 'optionalAccess',
|
|
16004
|
+
status: statusPill(_optionalChain([item, 'optionalAccess', _459 => _459.status])),
|
|
15730
16005
|
chatRef,
|
|
15731
16006
|
isNewTab,
|
|
15732
16007
|
discuss,
|
|
@@ -15742,7 +16017,7 @@ function refHydratedEntry(docType, label, renderRef) {
|
|
|
15742
16017
|
bareInline: true,
|
|
15743
16018
|
contentRefType: docType,
|
|
15744
16019
|
noComposedHref: true,
|
|
15745
|
-
fallbackHref: (item) => _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
16020
|
+
fallbackHref: (item) => _nullishCoalesce(_optionalChain([item, 'optionalAccess', _460 => _460.url]), () => ( null)),
|
|
15746
16021
|
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MingoInfoCardSkeleton, {}),
|
|
15747
16022
|
render: (item, chatRef, opts) => renderRef(fetchedItemDisplayRef(item, chatRef), opts)
|
|
15748
16023
|
};
|
|
@@ -15799,8 +16074,8 @@ function refGlyphRegistryEntries() {
|
|
|
15799
16074
|
title: displayRef.title,
|
|
15800
16075
|
description: _nullishCoalesce(displayRef.preview, () => ( void 0)),
|
|
15801
16076
|
cover: entityCover(
|
|
15802
|
-
_optionalChain([displayRef, 'access',
|
|
15803
|
-
_nullishCoalesce(_optionalChain([opts, 'access',
|
|
16077
|
+
_optionalChain([displayRef, 'access', _461 => _461.metadata, 'optionalAccess', _462 => _462.videoPoster]),
|
|
16078
|
+
_nullishCoalesce(_optionalChain([opts, 'access', _463 => _463.extras, 'optionalAccess', _464 => _464.buildOgPlaceholderUrl, 'optionalCall', _465 => _465(_nullishCoalesce(displayRef.title, () => ( "")))]), () => ( null))
|
|
15804
16079
|
),
|
|
15805
16080
|
fallbackIcon: cfg.icon(),
|
|
15806
16081
|
status: { label: cfg.label, variant: "grey" },
|
|
@@ -15815,9 +16090,9 @@ function refGlyphRegistryEntries() {
|
|
|
15815
16090
|
}
|
|
15816
16091
|
function fetchedEmployeeEntryDisplayRef(item, chatRef) {
|
|
15817
16092
|
const it = item;
|
|
15818
|
-
const title = typeof _optionalChain([it, 'optionalAccess',
|
|
15819
|
-
const author = typeof _optionalChain([it, 'optionalAccess',
|
|
15820
|
-
const summary = typeof _optionalChain([it, 'optionalAccess',
|
|
16093
|
+
const title = typeof _optionalChain([it, 'optionalAccess', _466 => _466.title]) === "string" && it.title.trim().length > 0 ? it.title.trim() : chatRef.title;
|
|
16094
|
+
const author = typeof _optionalChain([it, 'optionalAccess', _467 => _467.author, 'optionalAccess', _468 => _468.full_name]) === "string" ? it.author.full_name.trim() : "";
|
|
16095
|
+
const summary = typeof _optionalChain([it, 'optionalAccess', _469 => _469.summary]) === "string" ? it.summary.trim() : "";
|
|
15821
16096
|
const preview = [author, summary].filter((x) => x.length > 0).join(" \xB7 ");
|
|
15822
16097
|
return { ...chatRef, title, preview: preview.length > 0 ? preview : chatRef.preview };
|
|
15823
16098
|
}
|
|
@@ -15869,7 +16144,7 @@ function programRegistryEntries() {
|
|
|
15869
16144
|
discuss: opts.discuss,
|
|
15870
16145
|
configKey: cfg.configKey,
|
|
15871
16146
|
label: cfg.configKey.charAt(0).toUpperCase() + cfg.configKey.slice(1),
|
|
15872
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
16147
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _470 => _470.extras, 'optionalAccess', _471 => _471.buildOgPlaceholderUrl, 'optionalCall', _472 => _472(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _473 => _473.title]), () => ( "")))]), () => ( null))
|
|
15873
16148
|
}
|
|
15874
16149
|
)
|
|
15875
16150
|
}));
|
|
@@ -15890,7 +16165,7 @@ var ROADMAP_CARD_CONFIGS = {
|
|
|
15890
16165
|
// The card's destination IS the ClickUp deep link, derived from the
|
|
15891
16166
|
// task id post-fetch (the refs frame used to carry it).
|
|
15892
16167
|
noComposedHref: true,
|
|
15893
|
-
fallbackHref: (item) => _optionalChain([item, 'optionalAccess',
|
|
16168
|
+
fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _474 => _474.id]) != null ? clickupTaskUrl(String(item.id)) : null
|
|
15894
16169
|
}
|
|
15895
16170
|
};
|
|
15896
16171
|
function roadmapRegistryEntries() {
|
|
@@ -15932,8 +16207,8 @@ var CHAT_CARD_REGISTRY = {
|
|
|
15932
16207
|
DeletedDataCard,
|
|
15933
16208
|
{
|
|
15934
16209
|
title: chatRef.title && chatRef.title !== chatRef.id ? chatRef.title : null,
|
|
15935
|
-
entityLabel: _nullishCoalesce(_optionalChain([chatRef, 'access',
|
|
15936
|
-
recoveryNote: _nullishCoalesce(_optionalChain([chatRef, 'access',
|
|
16210
|
+
entityLabel: _nullishCoalesce(_optionalChain([chatRef, 'access', _475 => _475.metadata, 'optionalAccess', _476 => _476.entity_label]), () => ( null)),
|
|
16211
|
+
recoveryNote: _nullishCoalesce(_optionalChain([chatRef, 'access', _477 => _477.metadata, 'optionalAccess', _478 => _478.recovery_note]), () => ( null))
|
|
15937
16212
|
}
|
|
15938
16213
|
)
|
|
15939
16214
|
},
|
|
@@ -15950,7 +16225,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
15950
16225
|
bareInline: true,
|
|
15951
16226
|
contentRefType: "faq",
|
|
15952
16227
|
noComposedHref: true,
|
|
15953
|
-
fallbackHref: (item) => _optionalChain([item, 'optionalAccess',
|
|
16228
|
+
fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _479 => _479.id]) != null ? `/faqs#${faqItemAnchor(item.id)}` : null,
|
|
15954
16229
|
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MingoInfoCardSkeleton, {}),
|
|
15955
16230
|
render: (item, chatRef, opts) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FaqChatCard, { chatRef: fetchedFaqDisplayRef(item, chatRef), isNewTab: opts.isNewTab, discuss: opts.discuss })
|
|
15956
16231
|
},
|
|
@@ -15984,8 +16259,8 @@ var CHAT_CARD_REGISTRY = {
|
|
|
15984
16259
|
chatRef,
|
|
15985
16260
|
isNewTab: opts.isNewTab,
|
|
15986
16261
|
discuss: opts.discuss,
|
|
15987
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
15988
|
-
hasEmbeddedVideo: _optionalChain([chatRef, 'access',
|
|
16262
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _480 => _480.extras, 'optionalAccess', _481 => _481.buildOgPlaceholderUrl, 'optionalCall', _482 => _482(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _483 => _483.title]), () => ( "")))]), () => ( null)),
|
|
16263
|
+
hasEmbeddedVideo: _optionalChain([chatRef, 'access', _484 => _484.metadata, 'optionalAccess', _485 => _485.hasEmbeddedVideo]) === true
|
|
15989
16264
|
}
|
|
15990
16265
|
)
|
|
15991
16266
|
},
|
|
@@ -16001,7 +16276,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
16001
16276
|
chatRef,
|
|
16002
16277
|
isNewTab: opts.isNewTab,
|
|
16003
16278
|
discuss: opts.discuss,
|
|
16004
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
16279
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _486 => _486.extras, 'optionalAccess', _487 => _487.buildOgPlaceholderUrl, 'optionalCall', _488 => _488(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _489 => _489.title]), () => ( "")))]), () => ( null))
|
|
16005
16280
|
}
|
|
16006
16281
|
)
|
|
16007
16282
|
},
|
|
@@ -16017,7 +16292,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
16017
16292
|
chatRef,
|
|
16018
16293
|
isNewTab: opts.isNewTab,
|
|
16019
16294
|
discuss: opts.discuss,
|
|
16020
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
16295
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _490 => _490.extras, 'optionalAccess', _491 => _491.buildOgPlaceholderUrl, 'optionalCall', _492 => _492(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _493 => _493.title]), () => ( "")))]), () => ( null))
|
|
16021
16296
|
}
|
|
16022
16297
|
)
|
|
16023
16298
|
},
|
|
@@ -16027,7 +16302,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
16027
16302
|
bareInline: true,
|
|
16028
16303
|
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEX5PJGVAcjs.ProductReleaseCardSkeleton, { size: "sm" }),
|
|
16029
16304
|
render: (item, chatRef, opts) => {
|
|
16030
|
-
const builder = _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
16305
|
+
const builder = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _494 => _494.extras, 'optionalAccess', _495 => _495.buildProductReleaseCardProps]), () => ( _chunkEX5PJGVAcjs.defaultBuildProductReleaseCardProps));
|
|
16031
16306
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
16032
16307
|
ProductReleaseChatCard,
|
|
16033
16308
|
{
|
|
@@ -16053,7 +16328,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
16053
16328
|
chatRef,
|
|
16054
16329
|
isNewTab: opts.isNewTab,
|
|
16055
16330
|
discuss: opts.discuss,
|
|
16056
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
16331
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _496 => _496.extras, 'optionalAccess', _497 => _497.buildOgPlaceholderUrl, 'optionalCall', _498 => _498(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _499 => _499.title]), () => ( "")))]), () => ( null))
|
|
16057
16332
|
}
|
|
16058
16333
|
)
|
|
16059
16334
|
},
|
|
@@ -16071,7 +16346,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
16071
16346
|
chatRef,
|
|
16072
16347
|
isNewTab: opts.isNewTab,
|
|
16073
16348
|
discuss: opts.discuss,
|
|
16074
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
16349
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _500 => _500.extras, 'optionalAccess', _501 => _501.buildOgPlaceholderUrl, 'optionalCall', _502 => _502(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _503 => _503.title]), () => ( "")))]), () => ( null))
|
|
16075
16350
|
}
|
|
16076
16351
|
)
|
|
16077
16352
|
},
|
|
@@ -16082,13 +16357,13 @@ var CHAT_CARD_REGISTRY = {
|
|
|
16082
16357
|
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CampaignCardAdminSkeleton, {}),
|
|
16083
16358
|
// No public viewer — synthesize the hub-internal admin URL post-fetch
|
|
16084
16359
|
// so the wrapper + isNewTab computation see the actual destination.
|
|
16085
|
-
fallbackHref: (item) => _optionalChain([item, 'optionalAccess',
|
|
16360
|
+
fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _504 => _504.id]) ? `/admin/campaigns/${encodeURIComponent(String(item.id))}` : null,
|
|
16086
16361
|
render: (item, chatRef, opts) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CampaignChatCard, { item, chatRef, isNewTab: opts.isNewTab, discuss: opts.discuss })
|
|
16087
16362
|
},
|
|
16088
16363
|
...roadmapRegistryEntries()
|
|
16089
16364
|
};
|
|
16090
16365
|
function chatCardLabel(docType) {
|
|
16091
|
-
return _optionalChain([CHAT_CARD_REGISTRY, 'access',
|
|
16366
|
+
return _optionalChain([CHAT_CARD_REGISTRY, 'access', _505 => _505[docType], 'optionalAccess', _506 => _506.label]);
|
|
16092
16367
|
}
|
|
16093
16368
|
function ChatCardNavWrap({
|
|
16094
16369
|
href,
|
|
@@ -16104,13 +16379,13 @@ function ChatCardNavWrap({
|
|
|
16104
16379
|
if (!href) return;
|
|
16105
16380
|
const targetEl = e.target;
|
|
16106
16381
|
const host = e.currentTarget;
|
|
16107
|
-
if (!_optionalChain([host, 'optionalAccess',
|
|
16108
|
-
if (_optionalChain([targetEl, 'optionalAccess',
|
|
16109
|
-
if (!_optionalChain([targetEl, 'optionalAccess',
|
|
16382
|
+
if (!_optionalChain([host, 'optionalAccess', _507 => _507.contains, 'call', _508 => _508(targetEl)])) return;
|
|
16383
|
+
if (_optionalChain([targetEl, 'optionalAccess', _509 => _509.closest, 'optionalCall', _510 => _510("button")])) return;
|
|
16384
|
+
if (!_optionalChain([targetEl, 'optionalAccess', _511 => _511.closest, 'optionalCall', _512 => _512("a")])) return;
|
|
16110
16385
|
const handled = executeNavigation({ event: e, runtime, href, path, targetPlatform, fallbackNavigate: router.push });
|
|
16111
16386
|
if (!handled) return;
|
|
16112
16387
|
e.stopPropagation();
|
|
16113
|
-
if (!isNewTab && _optionalChain([panel, 'optionalAccess',
|
|
16388
|
+
if (!isNewTab && _optionalChain([panel, 'optionalAccess', _513 => _513.closeChat])) panel.closeChat();
|
|
16114
16389
|
};
|
|
16115
16390
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "contents", onClickCapture, children });
|
|
16116
16391
|
}
|
|
@@ -16132,7 +16407,7 @@ function ChatCardLoader({
|
|
|
16132
16407
|
title: chatRef.title,
|
|
16133
16408
|
externalUrl: chatRef.url,
|
|
16134
16409
|
targetPlatform: chatRef.targetPlatform,
|
|
16135
|
-
path: typeof _optionalChain([chatRef, 'access',
|
|
16410
|
+
path: typeof _optionalChain([chatRef, 'access', _514 => _514.metadata, 'optionalAccess', _515 => _515.path]) === "string" ? chatRef.metadata.path : null
|
|
16136
16411
|
},
|
|
16137
16412
|
sourceRowCtxFromRuntime(runtime, { baseRoute, chipBasePlatform })
|
|
16138
16413
|
);
|
|
@@ -16146,11 +16421,11 @@ function ChatCardLoader({
|
|
|
16146
16421
|
const entry = CHAT_CARD_REGISTRY[resolvedChatRef.type];
|
|
16147
16422
|
const fetchEntry = entry && entry.contentRefType ? entry : null;
|
|
16148
16423
|
const { item, isLoading, isError, isFetched } = useChatCardItem(
|
|
16149
|
-
_nullishCoalesce(_optionalChain([fetchEntry, 'optionalAccess',
|
|
16424
|
+
_nullishCoalesce(_optionalChain([fetchEntry, 'optionalAccess', _516 => _516.contentRefType]), () => ( "")),
|
|
16150
16425
|
fetchEntry ? resolvedChatRef.id : ""
|
|
16151
16426
|
);
|
|
16152
16427
|
if (!entry) return null;
|
|
16153
|
-
const composedHref = _optionalChain([fetchEntry, 'optionalAccess',
|
|
16428
|
+
const composedHref = _optionalChain([fetchEntry, 'optionalAccess', _517 => _517.contentRefType]) && !resolvedChatRef.url && item ? resolveFetchedCardHref({
|
|
16154
16429
|
contentRefType: fetchEntry.contentRefType,
|
|
16155
16430
|
id: resolvedChatRef.id,
|
|
16156
16431
|
item,
|
|
@@ -16158,7 +16433,7 @@ function ChatCardLoader({
|
|
|
16158
16433
|
}) : null;
|
|
16159
16434
|
const hrefChoice = fetchEntry && !resolvedChatRef.url && item ? pickFetchedCardHref({
|
|
16160
16435
|
composed: composedHref,
|
|
16161
|
-
itemHref: _nullishCoalesce(_optionalChain([fetchEntry, 'access',
|
|
16436
|
+
itemHref: _nullishCoalesce(_optionalChain([fetchEntry, 'access', _518 => _518.fallbackHref, 'optionalCall', _519 => _519(item)]), () => ( null)),
|
|
16162
16437
|
allowComposed: !fetchEntry.noComposedHref
|
|
16163
16438
|
}) : null;
|
|
16164
16439
|
const hrefResolvedChatRef = hrefChoice ? {
|
|
@@ -16192,7 +16467,7 @@ function ChatCardLoader({
|
|
|
16192
16467
|
isNewTab,
|
|
16193
16468
|
discuss
|
|
16194
16469
|
};
|
|
16195
|
-
const path = typeof _optionalChain([finalChatRef, 'access',
|
|
16470
|
+
const path = typeof _optionalChain([finalChatRef, 'access', _520 => _520.metadata, 'optionalAccess', _521 => _521.path]) === "string" ? finalChatRef.metadata.path : null;
|
|
16196
16471
|
const navWrap = (children) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
16197
16472
|
ChatCardNavWrap,
|
|
16198
16473
|
{
|
|
@@ -16216,7 +16491,7 @@ function ChatCardLoader({
|
|
|
16216
16491
|
if (!fetchEntry) {
|
|
16217
16492
|
return finish(entry.render(void 0, finalChatRef, renderOpts));
|
|
16218
16493
|
}
|
|
16219
|
-
if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: _nullishCoalesce(_optionalChain([fetchEntry, 'access',
|
|
16494
|
+
if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: _nullishCoalesce(_optionalChain([fetchEntry, 'access', _522 => _522.skeleton, 'optionalCall', _523 => _523()]), () => ( null)) });
|
|
16220
16495
|
if (!item) {
|
|
16221
16496
|
if (isError) {
|
|
16222
16497
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardLoadFailure, { label: entry.label, id: finalChatRef.id, detail: "Failed to load" });
|
|
@@ -16579,7 +16854,7 @@ function useChunkCatchup({
|
|
|
16579
16854
|
if (catchupRun.current === run) {
|
|
16580
16855
|
if (currentDialogId !== dialogIdRef.current) {
|
|
16581
16856
|
catchupRun.current = null;
|
|
16582
|
-
if (_optionalChain([pendingCatchupRef, 'access',
|
|
16857
|
+
if (_optionalChain([pendingCatchupRef, 'access', _524 => _524.current, 'optionalAccess', _525 => _525.dialogId]) === currentDialogId) {
|
|
16583
16858
|
pendingCatchupRef.current = null;
|
|
16584
16859
|
}
|
|
16585
16860
|
} else {
|
|
@@ -16590,7 +16865,7 @@ function useChunkCatchup({
|
|
|
16590
16865
|
if (pending.dialogId === currentDialogId) {
|
|
16591
16866
|
rearmForQueuedCatchup();
|
|
16592
16867
|
try {
|
|
16593
|
-
await _optionalChain([catchUpChunksRef, 'access',
|
|
16868
|
+
await _optionalChain([catchUpChunksRef, 'access', _526 => _526.current, 'optionalCall', _527 => _527(pending.fromSequenceId)]);
|
|
16594
16869
|
} catch (rerunError) {
|
|
16595
16870
|
console.error("Queued catch-up re-run failed:", rerunError);
|
|
16596
16871
|
}
|
|
@@ -16657,7 +16932,7 @@ function useChunkCatchup({
|
|
|
16657
16932
|
|
|
16658
16933
|
var EMPTY_FRAME = { messages: [], phase: "idle", typing: false, delayMs: 0 };
|
|
16659
16934
|
function prefersReducedMotion() {
|
|
16660
|
-
return typeof window !== "undefined" && _optionalChain([window, 'access',
|
|
16935
|
+
return typeof window !== "undefined" && _optionalChain([window, 'access', _528 => _528.matchMedia, 'optionalCall', _529 => _529("(prefers-reduced-motion: reduce)"), 'access', _530 => _530.matches]) === true;
|
|
16661
16936
|
}
|
|
16662
16937
|
function useScriptedStream(frames, resetKey, enabled = true) {
|
|
16663
16938
|
const [index, setIndex] = _react.useState.call(void 0, 0);
|
|
@@ -16668,7 +16943,7 @@ function useScriptedStream(frames, resetKey, enabled = true) {
|
|
|
16668
16943
|
setIndex(0);
|
|
16669
16944
|
}
|
|
16670
16945
|
_react.useEffect.call(void 0, () => {
|
|
16671
|
-
const mq = _optionalChain([window, 'access',
|
|
16946
|
+
const mq = _optionalChain([window, 'access', _531 => _531.matchMedia, 'optionalCall', _532 => _532("(prefers-reduced-motion: reduce)")]);
|
|
16672
16947
|
const sync = () => setReducedMotion(mq ? mq.matches : prefersReducedMotion());
|
|
16673
16948
|
sync();
|
|
16674
16949
|
if (!mq) return void 0;
|
|
@@ -16811,7 +17086,7 @@ function useJetStreamDialogSubscription({
|
|
|
16811
17086
|
const lifecycle = _chunkI5JVSFNVcjs.startConnectionLifecycle.call(void 0, {
|
|
16812
17087
|
conn: sharedConn,
|
|
16813
17088
|
wsUrl,
|
|
16814
|
-
onBeforeReconnect: () => _optionalChain([onBeforeReconnectRef, 'access',
|
|
17089
|
+
onBeforeReconnect: () => _optionalChain([onBeforeReconnectRef, 'access', _533 => _533.current, 'optionalCall', _534 => _534()]),
|
|
16815
17090
|
backoff: reconnectionBackoffRef.current,
|
|
16816
17091
|
getFreshUrl: () => getNatsWsUrlRef.current(),
|
|
16817
17092
|
// JetStream emits 'error' for protocol-level failures (e.g. -ERR Permissions
|
|
@@ -16826,7 +17101,7 @@ function useJetStreamDialogSubscription({
|
|
|
16826
17101
|
setReconnectionCount((c) => c + 1);
|
|
16827
17102
|
}
|
|
16828
17103
|
hadConnectionBeforeRef.current = true;
|
|
16829
|
-
_optionalChain([onConnectRef, 'access',
|
|
17104
|
+
_optionalChain([onConnectRef, 'access', _535 => _535.current, 'optionalCall', _536 => _536()]);
|
|
16830
17105
|
}
|
|
16831
17106
|
if (status === "error") {
|
|
16832
17107
|
console.warn("[JetStream] NATS protocol error:", evt.data);
|
|
@@ -16836,7 +17111,7 @@ function useJetStreamDialogSubscription({
|
|
|
16836
17111
|
setIsConnected(false);
|
|
16837
17112
|
setIsSubscribed(false);
|
|
16838
17113
|
tearDownSubscription();
|
|
16839
|
-
_optionalChain([onDisconnectRef, 'access',
|
|
17114
|
+
_optionalChain([onDisconnectRef, 'access', _537 => _537.current, 'optionalCall', _538 => _538()]);
|
|
16840
17115
|
}
|
|
16841
17116
|
}
|
|
16842
17117
|
});
|
|
@@ -16962,7 +17237,7 @@ function useJetStreamDialogSubscription({
|
|
|
16962
17237
|
}
|
|
16963
17238
|
subscriptionRef.current = handle;
|
|
16964
17239
|
setIsSubscribed(true);
|
|
16965
|
-
_optionalChain([onSubscribedRef, 'access',
|
|
17240
|
+
_optionalChain([onSubscribedRef, 'access', _539 => _539.current, 'optionalCall', _540 => _540()]);
|
|
16966
17241
|
} catch (e52) {
|
|
16967
17242
|
if (!cancelled) {
|
|
16968
17243
|
setIsSubscribed(false);
|
|
@@ -17078,20 +17353,20 @@ function useNatsDialogSubscription({
|
|
|
17078
17353
|
const tearDownSubscriptions = () => {
|
|
17079
17354
|
subscriptionRefs.current.forEach((sub) => {
|
|
17080
17355
|
try {
|
|
17081
|
-
_optionalChain([sub, 'optionalAccess',
|
|
17356
|
+
_optionalChain([sub, 'optionalAccess', _541 => _541.unsubscribe, 'call', _542 => _542()]);
|
|
17082
17357
|
} catch (e54) {
|
|
17083
17358
|
}
|
|
17084
17359
|
});
|
|
17085
17360
|
subscriptionRefs.current.clear();
|
|
17086
17361
|
lastSubscribedDialogIdRef.current = null;
|
|
17087
|
-
_optionalChain([abortControllerRef, 'access',
|
|
17362
|
+
_optionalChain([abortControllerRef, 'access', _543 => _543.current, 'optionalAccess', _544 => _544.abort, 'call', _545 => _545()]);
|
|
17088
17363
|
abortControllerRef.current = null;
|
|
17089
17364
|
};
|
|
17090
17365
|
const isDisconnectStatus = (status) => status === "closed" || status === "disconnected";
|
|
17091
17366
|
const lifecycle = _chunkI5JVSFNVcjs.startConnectionLifecycle.call(void 0, {
|
|
17092
17367
|
conn: sharedConn,
|
|
17093
17368
|
wsUrl,
|
|
17094
|
-
onBeforeReconnect: () => _optionalChain([onBeforeReconnectRef, 'access',
|
|
17369
|
+
onBeforeReconnect: () => _optionalChain([onBeforeReconnectRef, 'access', _546 => _546.current, 'optionalCall', _547 => _547()]),
|
|
17095
17370
|
backoff: reconnectionBackoffRef.current,
|
|
17096
17371
|
getFreshUrl: () => getNatsWsUrlRef.current(),
|
|
17097
17372
|
shouldRetryOn: isDisconnectStatus,
|
|
@@ -17102,7 +17377,7 @@ function useNatsDialogSubscription({
|
|
|
17102
17377
|
setReconnectionCount((c) => c + 1);
|
|
17103
17378
|
}
|
|
17104
17379
|
hadConnectionBeforeRef.current = true;
|
|
17105
|
-
_optionalChain([onConnectRef, 'access',
|
|
17380
|
+
_optionalChain([onConnectRef, 'access', _548 => _548.current, 'optionalCall', _549 => _549()]);
|
|
17106
17381
|
}
|
|
17107
17382
|
if (status === "error") {
|
|
17108
17383
|
console.warn("[NATS] protocol error:", evt.data);
|
|
@@ -17112,7 +17387,7 @@ function useNatsDialogSubscription({
|
|
|
17112
17387
|
setIsConnected(false);
|
|
17113
17388
|
setIsSubscribed(false);
|
|
17114
17389
|
tearDownSubscriptions();
|
|
17115
|
-
_optionalChain([onDisconnectRef, 'access',
|
|
17390
|
+
_optionalChain([onDisconnectRef, 'access', _550 => _550.current, 'optionalCall', _551 => _551()]);
|
|
17116
17391
|
}
|
|
17117
17392
|
}
|
|
17118
17393
|
});
|
|
@@ -17143,13 +17418,13 @@ function useNatsDialogSubscription({
|
|
|
17143
17418
|
setIsSubscribed(false);
|
|
17144
17419
|
subscriptionRefs.current.forEach((sub) => {
|
|
17145
17420
|
try {
|
|
17146
|
-
_optionalChain([sub, 'optionalAccess',
|
|
17421
|
+
_optionalChain([sub, 'optionalAccess', _552 => _552.unsubscribe, 'call', _553 => _553()]);
|
|
17147
17422
|
} catch (e55) {
|
|
17148
17423
|
}
|
|
17149
17424
|
});
|
|
17150
17425
|
subscriptionRefs.current.clear();
|
|
17151
17426
|
lastSubscribedDialogIdRef.current = null;
|
|
17152
|
-
_optionalChain([abortControllerRef, 'access',
|
|
17427
|
+
_optionalChain([abortControllerRef, 'access', _554 => _554.current, 'optionalAccess', _555 => _555.abort, 'call', _556 => _556()]);
|
|
17153
17428
|
abortControllerRef.current = null;
|
|
17154
17429
|
}
|
|
17155
17430
|
return void 0;
|
|
@@ -17161,12 +17436,12 @@ function useNatsDialogSubscription({
|
|
|
17161
17436
|
if (subscriptionRefs.current.size > 0) {
|
|
17162
17437
|
subscriptionRefs.current.forEach((sub) => {
|
|
17163
17438
|
try {
|
|
17164
|
-
_optionalChain([sub, 'optionalAccess',
|
|
17439
|
+
_optionalChain([sub, 'optionalAccess', _557 => _557.unsubscribe, 'call', _558 => _558()]);
|
|
17165
17440
|
} catch (e56) {
|
|
17166
17441
|
}
|
|
17167
17442
|
});
|
|
17168
17443
|
subscriptionRefs.current.clear();
|
|
17169
|
-
_optionalChain([abortControllerRef, 'access',
|
|
17444
|
+
_optionalChain([abortControllerRef, 'access', _559 => _559.current, 'optionalAccess', _560 => _560.abort, 'call', _561 => _561()]);
|
|
17170
17445
|
}
|
|
17171
17446
|
abortControllerRef.current = new AbortController();
|
|
17172
17447
|
const abort = abortControllerRef.current;
|
|
@@ -17196,7 +17471,7 @@ function useNatsDialogSubscription({
|
|
|
17196
17471
|
});
|
|
17197
17472
|
lastSubscribedDialogIdRef.current = dialogId;
|
|
17198
17473
|
setIsSubscribed(true);
|
|
17199
|
-
_optionalChain([onSubscribedRef, 'access',
|
|
17474
|
+
_optionalChain([onSubscribedRef, 'access', _562 => _562.current, 'optionalCall', _563 => _563()]);
|
|
17200
17475
|
};
|
|
17201
17476
|
if (isConnectedRef.current) {
|
|
17202
17477
|
createSubscriptions();
|
|
@@ -17207,7 +17482,7 @@ function useNatsDialogSubscription({
|
|
|
17207
17482
|
abort.abort();
|
|
17208
17483
|
subscriptions.forEach((sub) => {
|
|
17209
17484
|
try {
|
|
17210
|
-
_optionalChain([sub, 'optionalAccess',
|
|
17485
|
+
_optionalChain([sub, 'optionalAccess', _564 => _564.unsubscribe, 'call', _565 => _565()]);
|
|
17211
17486
|
} catch (e58) {
|
|
17212
17487
|
}
|
|
17213
17488
|
});
|
|
@@ -17246,7 +17521,7 @@ function useNatsDialogSubscription({
|
|
|
17246
17521
|
});
|
|
17247
17522
|
lastSubscribedDialogIdRef.current = currentDialogId;
|
|
17248
17523
|
setIsSubscribed(true);
|
|
17249
|
-
_optionalChain([onSubscribedRef, 'access',
|
|
17524
|
+
_optionalChain([onSubscribedRef, 'access', _566 => _566.current, 'optionalCall', _567 => _567()]);
|
|
17250
17525
|
} else if (subscriptionRefs.current.size > 0) {
|
|
17251
17526
|
setIsSubscribed(true);
|
|
17252
17527
|
}
|
|
@@ -17254,10 +17529,10 @@ function useNatsDialogSubscription({
|
|
|
17254
17529
|
return { isConnected, isSubscribed, reconnectionCount };
|
|
17255
17530
|
}
|
|
17256
17531
|
function buildNatsWsUrl(apiBaseUrl, options) {
|
|
17257
|
-
const path = _optionalChain([options, 'optionalAccess',
|
|
17532
|
+
const path = _optionalChain([options, 'optionalAccess', _568 => _568.source]) === "dashboard" ? "/ws/nats-api" : "/ws/nats";
|
|
17258
17533
|
const u = new URL(path, apiBaseUrl);
|
|
17259
17534
|
u.protocol = u.protocol === "https:" ? "wss:" : "ws:";
|
|
17260
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
17535
|
+
if (_optionalChain([options, 'optionalAccess', _569 => _569.includeAuthParam]) && _optionalChain([options, 'optionalAccess', _570 => _570.token])) {
|
|
17261
17536
|
u.searchParams.set("authorization", options.token);
|
|
17262
17537
|
}
|
|
17263
17538
|
return u.toString();
|
|
@@ -17275,7 +17550,7 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
|
|
|
17275
17550
|
const data = await res.json();
|
|
17276
17551
|
return _nullishCoalesce(data.commands, () => ( []));
|
|
17277
17552
|
} catch (err) {
|
|
17278
|
-
if (_optionalChain([err, 'optionalAccess',
|
|
17553
|
+
if (_optionalChain([err, 'optionalAccess', _571 => _571.name]) === "AbortError") throw err;
|
|
17279
17554
|
console.warn("[chat] slash-commands fetch failed, showing none:", err);
|
|
17280
17555
|
return [];
|
|
17281
17556
|
}
|
|
@@ -17283,8 +17558,8 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
|
|
|
17283
17558
|
var NO_COMMANDS = [];
|
|
17284
17559
|
function useSlashCommands(prefix, commandsUrl) {
|
|
17285
17560
|
const [answered, setAnswered] = _react.useState.call(void 0, null);
|
|
17286
|
-
const commands = prefix != null && _optionalChain([answered, 'optionalAccess',
|
|
17287
|
-
const loading = prefix != null && _optionalChain([answered, 'optionalAccess',
|
|
17561
|
+
const commands = prefix != null && _optionalChain([answered, 'optionalAccess', _572 => _572.prefix]) === prefix ? answered.commands : NO_COMMANDS;
|
|
17562
|
+
const loading = prefix != null && _optionalChain([answered, 'optionalAccess', _573 => _573.prefix]) !== prefix;
|
|
17288
17563
|
_react.useEffect.call(void 0, () => {
|
|
17289
17564
|
if (prefix == null) return void 0;
|
|
17290
17565
|
let cancelled = false;
|
|
@@ -17294,7 +17569,7 @@ function useSlashCommands(prefix, commandsUrl) {
|
|
|
17294
17569
|
const next = await fetchSlashCommands(prefix, ctrl.signal, commandsUrl);
|
|
17295
17570
|
if (!cancelled) setAnswered({ prefix, commands: next });
|
|
17296
17571
|
} catch (err) {
|
|
17297
|
-
if (!cancelled && _optionalChain([err, 'optionalAccess',
|
|
17572
|
+
if (!cancelled && _optionalChain([err, 'optionalAccess', _574 => _574.name]) !== "AbortError") {
|
|
17298
17573
|
console.warn("[use-slash-commands] fetch failed:", err);
|
|
17299
17574
|
setAnswered({ prefix, commands: NO_COMMANDS });
|
|
17300
17575
|
}
|
|
@@ -17317,7 +17592,7 @@ function useSlashCommandRegistry(commandsUrl, options) {
|
|
|
17317
17592
|
const query = _reactquery.useQuery.call(void 0, {
|
|
17318
17593
|
queryKey: ["chat-slash-commands", commandsUrl],
|
|
17319
17594
|
queryFn: ({ signal }) => fetchSlashCommands("", signal, commandsUrl),
|
|
17320
|
-
enabled: _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
17595
|
+
enabled: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _575 => _575.enabled]), () => ( true)),
|
|
17321
17596
|
staleTime: Infinity,
|
|
17322
17597
|
gcTime: Infinity,
|
|
17323
17598
|
// The commands registry is non-critical chrome — a failure degrades to an
|
|
@@ -17356,21 +17631,21 @@ async function fetchEmptyStateConfig(signal, emptyStateUrl) {
|
|
|
17356
17631
|
}
|
|
17357
17632
|
const data = await res.json();
|
|
17358
17633
|
return {
|
|
17359
|
-
name: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
17360
|
-
icon: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
17361
|
-
greeting: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
17362
|
-
enabledRagTableIds: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
17363
|
-
quickActions: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
17364
|
-
suggestedQueries: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
17634
|
+
name: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _576 => _576.name]), () => ( null)),
|
|
17635
|
+
icon: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _577 => _577.icon]), () => ( null)),
|
|
17636
|
+
greeting: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _578 => _578.greeting]), () => ( null)),
|
|
17637
|
+
enabledRagTableIds: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _579 => _579.enabledRagTableIds]), () => ( [])),
|
|
17638
|
+
quickActions: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _580 => _580.quickActions]), () => ( [])),
|
|
17639
|
+
suggestedQueries: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _581 => _581.suggestedQueries]), () => ( []))
|
|
17365
17640
|
};
|
|
17366
17641
|
} catch (err) {
|
|
17367
|
-
if (_optionalChain([err, 'optionalAccess',
|
|
17642
|
+
if (_optionalChain([err, 'optionalAccess', _582 => _582.name]) === "AbortError") throw err;
|
|
17368
17643
|
console.warn("[chat] empty-state config fetch failed, using neutral defaults:", err);
|
|
17369
17644
|
return EMPTY_STATE_FALLBACK;
|
|
17370
17645
|
}
|
|
17371
17646
|
}
|
|
17372
17647
|
function useEmptyStateConfig(emptyStateUrl, options) {
|
|
17373
|
-
const enabled = (_nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
17648
|
+
const enabled = (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _583 => _583.enabled]), () => ( true))) && !!emptyStateUrl;
|
|
17374
17649
|
const query = _reactquery.useQuery.call(void 0, {
|
|
17375
17650
|
queryKey: ["chat-empty-state", emptyStateUrl],
|
|
17376
17651
|
queryFn: ({ signal }) => fetchEmptyStateConfig(signal, emptyStateUrl),
|
|
@@ -17399,7 +17674,7 @@ var CHAT_ATTACHMENT_MAX_SIZE_BYTES = 25 * 1024 * 1024;
|
|
|
17399
17674
|
var STORAGE_CACHE_CONTROL_IMMUTABLE = "public, max-age=31536000, immutable";
|
|
17400
17675
|
function uploadWithProgress(url, file, token, onProgress, signal) {
|
|
17401
17676
|
return new Promise((resolve, reject) => {
|
|
17402
|
-
if (_optionalChain([signal, 'optionalAccess',
|
|
17677
|
+
if (_optionalChain([signal, 'optionalAccess', _584 => _584.aborted])) {
|
|
17403
17678
|
reject(new Error("Upload cancelled"));
|
|
17404
17679
|
return;
|
|
17405
17680
|
}
|
|
@@ -17441,7 +17716,7 @@ function uploadWithProgress(url, file, token, onProgress, signal) {
|
|
|
17441
17716
|
const handleSignalAbort = () => {
|
|
17442
17717
|
xhr.abort();
|
|
17443
17718
|
};
|
|
17444
|
-
_optionalChain([signal, 'optionalAccess',
|
|
17719
|
+
_optionalChain([signal, 'optionalAccess', _585 => _585.addEventListener, 'call', _586 => _586("abort", handleSignalAbort, { once: true, signal: listeners.signal })]);
|
|
17445
17720
|
xhr.upload.addEventListener("progress", handleProgress, { signal: listeners.signal });
|
|
17446
17721
|
xhr.addEventListener("load", handleLoad, { signal: listeners.signal });
|
|
17447
17722
|
xhr.addEventListener("error", handleError, { signal: listeners.signal });
|
|
@@ -17485,10 +17760,10 @@ function useChatAttachments() {
|
|
|
17485
17760
|
try {
|
|
17486
17761
|
sniffed = await _filetype.fileTypeFromBlob.call(void 0, att.file);
|
|
17487
17762
|
} catch (err) {
|
|
17488
|
-
if (_optionalChain([ctrl, 'optionalAccess',
|
|
17763
|
+
if (_optionalChain([ctrl, 'optionalAccess', _587 => _587.signal, 'access', _588 => _588.aborted])) return;
|
|
17489
17764
|
throw new Error(`Could not read file content: ${err instanceof Error ? err.message : String(err)}`);
|
|
17490
17765
|
}
|
|
17491
|
-
if (_optionalChain([ctrl, 'optionalAccess',
|
|
17766
|
+
if (_optionalChain([ctrl, 'optionalAccess', _589 => _589.signal, 'access', _590 => _590.aborted])) return;
|
|
17492
17767
|
if (!sniffed) {
|
|
17493
17768
|
throw new Error("Unrecognized file format");
|
|
17494
17769
|
}
|
|
@@ -17502,7 +17777,7 @@ function useChatAttachments() {
|
|
|
17502
17777
|
const urlResp = await _chunkXOGD2AMEcjs.embedAuthedFetch.call(void 0, uploadUrlEndpoint, {
|
|
17503
17778
|
method: "POST",
|
|
17504
17779
|
headers: { "Content-Type": "application/json" },
|
|
17505
|
-
signal: _optionalChain([ctrl, 'optionalAccess',
|
|
17780
|
+
signal: _optionalChain([ctrl, 'optionalAccess', _591 => _591.signal]),
|
|
17506
17781
|
body: JSON.stringify({
|
|
17507
17782
|
fileName: att.file.name,
|
|
17508
17783
|
// Pass the SNIFFED MIME (not `file.type`, which can be a
|
|
@@ -17531,9 +17806,9 @@ function useChatAttachments() {
|
|
|
17531
17806
|
(pct) => {
|
|
17532
17807
|
updateOne(att.id, { progress: pct });
|
|
17533
17808
|
},
|
|
17534
|
-
_optionalChain([ctrl, 'optionalAccess',
|
|
17809
|
+
_optionalChain([ctrl, 'optionalAccess', _592 => _592.signal])
|
|
17535
17810
|
);
|
|
17536
|
-
if (_optionalChain([ctrl, 'optionalAccess',
|
|
17811
|
+
if (_optionalChain([ctrl, 'optionalAccess', _593 => _593.signal, 'access', _594 => _594.aborted])) return;
|
|
17537
17812
|
updateOne(att.id, {
|
|
17538
17813
|
status: "ready",
|
|
17539
17814
|
progress: 100,
|
|
@@ -17541,7 +17816,7 @@ function useChatAttachments() {
|
|
|
17541
17816
|
viewToken: mintData.viewToken
|
|
17542
17817
|
});
|
|
17543
17818
|
} catch (err) {
|
|
17544
|
-
if (_optionalChain([ctrl, 'optionalAccess',
|
|
17819
|
+
if (_optionalChain([ctrl, 'optionalAccess', _595 => _595.signal, 'access', _596 => _596.aborted])) return;
|
|
17545
17820
|
const message = err instanceof Error ? err.message : String(err);
|
|
17546
17821
|
updateOne(att.id, { status: "error", progress: 0, errorMessage: message });
|
|
17547
17822
|
} finally {
|
|
@@ -17690,11 +17965,11 @@ var ANON_DEFAULTS = {
|
|
|
17690
17965
|
function useResolveChatIdentity(enabled) {
|
|
17691
17966
|
const runtime = _chunkU2YLMFJKcjs.useRequiredChatRuntime.call(void 0, );
|
|
17692
17967
|
const url = runtime.endpoints.identityUrl;
|
|
17693
|
-
const proxyEmail = _nullishCoalesce(_optionalChain([_chunkXOGD2AMEcjs.getEmbedProxyAuth.call(void 0, ), 'optionalAccess',
|
|
17968
|
+
const proxyEmail = _nullishCoalesce(_optionalChain([_chunkXOGD2AMEcjs.getEmbedProxyAuth.call(void 0, ), 'optionalAccess', _597 => _597.email]), () => ( null));
|
|
17694
17969
|
const requestKey = enabled ? `${url}\0${_nullishCoalesce(proxyEmail, () => ( ""))}` : null;
|
|
17695
17970
|
const [resolved, setResolved] = _react.useState.call(void 0, null);
|
|
17696
|
-
const data = _optionalChain([resolved, 'optionalAccess',
|
|
17697
|
-
const isLoading = requestKey !== null && _optionalChain([resolved, 'optionalAccess',
|
|
17971
|
+
const data = _optionalChain([resolved, 'optionalAccess', _598 => _598.key]) === requestKey ? resolved.data : ANON_DEFAULTS;
|
|
17972
|
+
const isLoading = requestKey !== null && _optionalChain([resolved, 'optionalAccess', _599 => _599.key]) !== requestKey;
|
|
17698
17973
|
_react.useEffect.call(void 0, () => {
|
|
17699
17974
|
if (requestKey === null) return void 0;
|
|
17700
17975
|
let cancelled = false;
|
|
@@ -17841,7 +18116,7 @@ function useChat({
|
|
|
17841
18116
|
onMessagesChangeRef.current = onMessagesChange;
|
|
17842
18117
|
});
|
|
17843
18118
|
_react.useEffect.call(void 0, () => {
|
|
17844
|
-
_optionalChain([onMessagesChangeRef, 'access',
|
|
18119
|
+
_optionalChain([onMessagesChangeRef, 'access', _600 => _600.current, 'optionalCall', _601 => _601(messages)]);
|
|
17845
18120
|
}, [messages]);
|
|
17846
18121
|
const {
|
|
17847
18122
|
streamMessage,
|
|
@@ -17878,7 +18153,7 @@ function useChat({
|
|
|
17878
18153
|
name: "You",
|
|
17879
18154
|
content: text2,
|
|
17880
18155
|
timestamp: /* @__PURE__ */ new Date(),
|
|
17881
|
-
..._optionalChain([options, 'optionalAccess',
|
|
18156
|
+
..._optionalChain([options, 'optionalAccess', _602 => _602.hidden]) ? { hidden: true } : {}
|
|
17882
18157
|
};
|
|
17883
18158
|
addMessage(userMessage);
|
|
17884
18159
|
setIsTyping(true);
|
|
@@ -18092,7 +18367,7 @@ function buildConfirmToolBody(request) {
|
|
|
18092
18367
|
async function readServerErrorMessage(response) {
|
|
18093
18368
|
try {
|
|
18094
18369
|
const body = await response.json();
|
|
18095
|
-
if (typeof _optionalChain([body, 'optionalAccess',
|
|
18370
|
+
if (typeof _optionalChain([body, 'optionalAccess', _603 => _603.error]) === "string" && body.error.length > 0) return body.error;
|
|
18096
18371
|
} catch (e60) {
|
|
18097
18372
|
}
|
|
18098
18373
|
return null;
|
|
@@ -18399,7 +18674,7 @@ function youtubeVideoId(value) {
|
|
|
18399
18674
|
const hostname = parsed.hostname.toLowerCase();
|
|
18400
18675
|
const isYoutubeHost = hostname === "youtu.be" || hostname === "youtube.com" || hostname.endsWith(".youtube.com");
|
|
18401
18676
|
if (!isYoutubeHost) return void 0;
|
|
18402
|
-
const fromPath = hostname === "youtu.be" ? parsed.pathname.split("/").filter(Boolean)[0] : _optionalChain([/^\/(?:embed|v|shorts)\/([A-Za-z0-9_-]{11})(?:\/|$)/, 'access',
|
|
18677
|
+
const fromPath = hostname === "youtu.be" ? parsed.pathname.split("/").filter(Boolean)[0] : _optionalChain([/^\/(?:embed|v|shorts)\/([A-Za-z0-9_-]{11})(?:\/|$)/, 'access', _604 => _604.exec, 'call', _605 => _605(parsed.pathname), 'optionalAccess', _606 => _606[1]]);
|
|
18403
18678
|
const id = _nullishCoalesce(_nullishCoalesce(fromPath, () => ( parsed.searchParams.get("v"))), () => ( void 0));
|
|
18404
18679
|
return id && YOUTUBE_ID.test(id) ? id : void 0;
|
|
18405
18680
|
}
|
|
@@ -18518,11 +18793,11 @@ function cards(value, decodedSources) {
|
|
|
18518
18793
|
{
|
|
18519
18794
|
type,
|
|
18520
18795
|
id,
|
|
18521
|
-
title: _nullishCoalesce(_optionalChain([source, 'optionalAccess',
|
|
18522
|
-
url: _nullishCoalesce(_optionalChain([source, 'optionalAccess',
|
|
18523
|
-
..._optionalChain([source, 'optionalAccess',
|
|
18524
|
-
..._optionalChain([source, 'optionalAccess',
|
|
18525
|
-
..._optionalChain([source, 'optionalAccess',
|
|
18796
|
+
title: _nullishCoalesce(_optionalChain([source, 'optionalAccess', _607 => _607.name]), () => ( id)),
|
|
18797
|
+
url: _nullishCoalesce(_optionalChain([source, 'optionalAccess', _608 => _608.externalUrl]), () => ( null)),
|
|
18798
|
+
..._optionalChain([source, 'optionalAccess', _609 => _609.sourceRepo]) ? { sourceRepo: source.sourceRepo } : {},
|
|
18799
|
+
..._optionalChain([source, 'optionalAccess', _610 => _610.targetPlatform]) !== void 0 ? { targetPlatform: source.targetPlatform } : {},
|
|
18800
|
+
..._optionalChain([source, 'optionalAccess', _611 => _611.path]) ? { metadata: { path: source.path } } : {}
|
|
18526
18801
|
}
|
|
18527
18802
|
];
|
|
18528
18803
|
});
|
|
@@ -18548,11 +18823,11 @@ function sourceMetadataEvent(payload) {
|
|
|
18548
18823
|
}
|
|
18549
18824
|
function mergeSourceMetadata(previous, event) {
|
|
18550
18825
|
const byIndex = /* @__PURE__ */ new Map();
|
|
18551
|
-
for (const source of [..._nullishCoalesce(_optionalChain([previous, 'optionalAccess',
|
|
18826
|
+
for (const source of [..._nullishCoalesce(_optionalChain([previous, 'optionalAccess', _612 => _612.sources]), () => ( [])), ..._nullishCoalesce(event.sources, () => ( []))]) {
|
|
18552
18827
|
if (!byIndex.has(source.index)) byIndex.set(source.index, source);
|
|
18553
18828
|
}
|
|
18554
18829
|
const byIdentity = /* @__PURE__ */ new Map();
|
|
18555
|
-
for (const ref of [..._nullishCoalesce(_optionalChain([previous, 'optionalAccess',
|
|
18830
|
+
for (const ref of [..._nullishCoalesce(_optionalChain([previous, 'optionalAccess', _613 => _613.refs]), () => ( [])), ..._nullishCoalesce(event.refs, () => ( []))]) {
|
|
18556
18831
|
const identity = `${ref.type}:${ref.id}`;
|
|
18557
18832
|
if (!byIdentity.has(identity)) byIdentity.set(identity, ref);
|
|
18558
18833
|
}
|
|
@@ -18638,9 +18913,9 @@ function appendToTrailingAssistant(prev, segments) {
|
|
|
18638
18913
|
for (const seg of segments) {
|
|
18639
18914
|
const tail = merged[merged.length - 1];
|
|
18640
18915
|
const key = upsertKey(seg);
|
|
18641
|
-
if (seg.type === "text" && _optionalChain([tail, 'optionalAccess',
|
|
18916
|
+
if (seg.type === "text" && _optionalChain([tail, 'optionalAccess', _614 => _614.type]) === "text") {
|
|
18642
18917
|
merged[merged.length - 1] = { type: "text", text: tail.text + seg.text };
|
|
18643
|
-
} else if (seg.type === "thinking" && _optionalChain([tail, 'optionalAccess',
|
|
18918
|
+
} else if (seg.type === "thinking" && _optionalChain([tail, 'optionalAccess', _615 => _615.type]) === "thinking") {
|
|
18644
18919
|
merged[merged.length - 1] = { type: "thinking", text: tail.text + seg.text };
|
|
18645
18920
|
} else if (key) {
|
|
18646
18921
|
let idx = merged.findIndex((m) => upsertKey(m) === key);
|
|
@@ -18681,7 +18956,7 @@ function applyApprovalStatusToSegment(s, requestId, status, resolvedByName) {
|
|
|
18681
18956
|
}
|
|
18682
18957
|
if (s.type !== "approval_batch") return s;
|
|
18683
18958
|
const isAnchor = s.data.approvalRequestId === requestId;
|
|
18684
|
-
const hasRow = _optionalChain([s, 'access',
|
|
18959
|
+
const hasRow = _optionalChain([s, 'access', _616 => _616.data, 'access', _617 => _617.toolCalls, 'optionalAccess', _618 => _618.some, 'call', _619 => _619((c) => c.toolExecutionRequestId === requestId)]);
|
|
18685
18960
|
if (!isAnchor && !hasRow) return s;
|
|
18686
18961
|
const nextResolvedBy = _nullishCoalesce(resolvedByName, () => ( s.resolvedByName));
|
|
18687
18962
|
const nextExecutions = hasRow ? {
|
|
@@ -18703,8 +18978,8 @@ function applyApprovalStatusToSegment(s, requestId, status, resolvedByName) {
|
|
|
18703
18978
|
};
|
|
18704
18979
|
}
|
|
18705
18980
|
function nextBatchExecution(prevExec, toolData) {
|
|
18706
|
-
if (toolData.type === "EXECUTING_TOOL" && _optionalChain([prevExec, 'optionalAccess',
|
|
18707
|
-
return toolData.type === "EXECUTED_TOOL" ? { status: "done", result: toolData.result, success: toolData.success } : { status: "executing", result: _optionalChain([prevExec, 'optionalAccess',
|
|
18981
|
+
if (toolData.type === "EXECUTING_TOOL" && _optionalChain([prevExec, 'optionalAccess', _620 => _620.status]) === "done") return null;
|
|
18982
|
+
return toolData.type === "EXECUTED_TOOL" ? { status: "done", result: toolData.result, success: toolData.success } : { status: "executing", result: _optionalChain([prevExec, 'optionalAccess', _621 => _621.result]), success: _optionalChain([prevExec, 'optionalAccess', _622 => _622.success]) };
|
|
18708
18983
|
}
|
|
18709
18984
|
function withBatchExecution(seg, execId, state) {
|
|
18710
18985
|
return {
|
|
@@ -18721,11 +18996,11 @@ function projectBatchStatusToMessages(prev, anchorId, status) {
|
|
|
18721
18996
|
}
|
|
18722
18997
|
function projectBatchRowFailureToMessages(prev, rowRequestId) {
|
|
18723
18998
|
return mapSegments(prev, (s) => {
|
|
18724
|
-
if (s.type !== "approval_batch" || !_optionalChain([s, 'access',
|
|
18999
|
+
if (s.type !== "approval_batch" || !_optionalChain([s, 'access', _623 => _623.data, 'access', _624 => _624.toolCalls, 'optionalAccess', _625 => _625.some, 'call', _626 => _626((c) => c.toolExecutionRequestId === rowRequestId)])) {
|
|
18725
19000
|
return s;
|
|
18726
19001
|
}
|
|
18727
|
-
const existing = _optionalChain([s, 'access',
|
|
18728
|
-
if (_optionalChain([existing, 'optionalAccess',
|
|
19002
|
+
const existing = _optionalChain([s, 'access', _627 => _627.data, 'access', _628 => _628.executions, 'optionalAccess', _629 => _629[rowRequestId]]);
|
|
19003
|
+
if (_optionalChain([existing, 'optionalAccess', _630 => _630.status]) === "done") return s;
|
|
18729
19004
|
return withBatchExecution(s, rowRequestId, { status: "done", success: false });
|
|
18730
19005
|
});
|
|
18731
19006
|
}
|
|
@@ -18761,7 +19036,7 @@ function mergeToolExecutionIfPresent(prev, segment) {
|
|
|
18761
19036
|
for (let j = message.segments.length - 1; j >= 0; j--) {
|
|
18762
19037
|
const seg = message.segments[j];
|
|
18763
19038
|
if (execId && seg.type === "approval_batch" && seg.data.toolCalls.some((c) => c.toolExecutionRequestId === execId)) {
|
|
18764
|
-
const prevExec = _optionalChain([seg, 'access',
|
|
19039
|
+
const prevExec = _optionalChain([seg, 'access', _631 => _631.data, 'access', _632 => _632.executions, 'optionalAccess', _633 => _633[execId]]);
|
|
18765
19040
|
const nextExec = nextBatchExecution(prevExec, toolData);
|
|
18766
19041
|
if (nextExec === null) return prev;
|
|
18767
19042
|
if (sameExecutionState(prevExec, nextExec)) return prev;
|
|
@@ -18934,9 +19209,9 @@ var MessageSegmentAccumulator = class {
|
|
|
18934
19209
|
type: "tool_execution",
|
|
18935
19210
|
data: {
|
|
18936
19211
|
...toolData,
|
|
18937
|
-
toolTitle: _nullishCoalesce(_nullishCoalesce(toolData.toolTitle, () => ( _optionalChain([existingExecuting, 'optionalAccess',
|
|
18938
|
-
toolExplanation: _nullishCoalesce(_nullishCoalesce(toolData.toolExplanation, () => ( _optionalChain([existingExecuting, 'optionalAccess',
|
|
18939
|
-
parameters: toolData.parameters || _optionalChain([executingTool, 'optionalAccess',
|
|
19212
|
+
toolTitle: _nullishCoalesce(_nullishCoalesce(toolData.toolTitle, () => ( _optionalChain([existingExecuting, 'optionalAccess', _634 => _634.data, 'access', _635 => _635.toolTitle]))), () => ( _optionalChain([executingTool, 'optionalAccess', _636 => _636.toolTitle]))),
|
|
19213
|
+
toolExplanation: _nullishCoalesce(_nullishCoalesce(toolData.toolExplanation, () => ( _optionalChain([existingExecuting, 'optionalAccess', _637 => _637.data, 'access', _638 => _638.toolExplanation]))), () => ( _optionalChain([executingTool, 'optionalAccess', _639 => _639.toolExplanation]))),
|
|
19214
|
+
parameters: toolData.parameters || _optionalChain([executingTool, 'optionalAccess', _640 => _640.parameters])
|
|
18940
19215
|
}
|
|
18941
19216
|
};
|
|
18942
19217
|
if (existingIndex !== -1) {
|
|
@@ -18960,7 +19235,7 @@ var MessageSegmentAccumulator = class {
|
|
|
18960
19235
|
if (seg.type !== "approval_batch") return seg;
|
|
18961
19236
|
const hasCall = seg.data.toolCalls.some((c) => c.toolExecutionRequestId === execId);
|
|
18962
19237
|
if (!hasCall) return seg;
|
|
18963
|
-
const prev = _optionalChain([seg, 'access',
|
|
19238
|
+
const prev = _optionalChain([seg, 'access', _641 => _641.data, 'access', _642 => _642.executions, 'optionalAccess', _643 => _643[execId]]);
|
|
18964
19239
|
const next = nextBatchExecution(prev, toolData);
|
|
18965
19240
|
matched = true;
|
|
18966
19241
|
if (next === null) return seg;
|
|
@@ -19094,8 +19369,8 @@ var MessageSegmentAccumulator = class {
|
|
|
19094
19369
|
requestId,
|
|
19095
19370
|
{
|
|
19096
19371
|
...pendingApproval,
|
|
19097
|
-
command: _optionalChain([pendingApproval, 'optionalAccess',
|
|
19098
|
-
approvalType: _optionalChain([pendingApproval, 'optionalAccess',
|
|
19372
|
+
command: _optionalChain([pendingApproval, 'optionalAccess', _644 => _644.command]) || "",
|
|
19373
|
+
approvalType: _optionalChain([pendingApproval, 'optionalAccess', _645 => _645.approvalType]) || approvalType
|
|
19099
19374
|
},
|
|
19100
19375
|
status
|
|
19101
19376
|
);
|
|
@@ -19120,9 +19395,9 @@ var MessageSegmentAccumulator = class {
|
|
|
19120
19395
|
type: "escalation_offer",
|
|
19121
19396
|
// The resolved chunk carries no text/origin — a redelivered offer must
|
|
19122
19397
|
// not blank the card the PENDING chunk already painted.
|
|
19123
|
-
data: { offerId, text: text2 || _optionalChain([existing, 'optionalAccess',
|
|
19398
|
+
data: { offerId, text: text2 || _optionalChain([existing, 'optionalAccess', _646 => _646.data, 'access', _647 => _647.text]) || "", origin: _nullishCoalesce(origin, () => ( _optionalChain([existing, 'optionalAccess', _648 => _648.data, 'access', _649 => _649.origin]))) },
|
|
19124
19399
|
status,
|
|
19125
|
-
resolvedByName: _nullishCoalesce(resolvedByName, () => ( _optionalChain([existing, 'optionalAccess',
|
|
19400
|
+
resolvedByName: _nullishCoalesce(resolvedByName, () => ( _optionalChain([existing, 'optionalAccess', _650 => _650.resolvedByName]))),
|
|
19126
19401
|
onApprove: this.callbacks.onEscalationApprove,
|
|
19127
19402
|
onReject: this.callbacks.onEscalationReject
|
|
19128
19403
|
};
|
|
@@ -19447,7 +19722,7 @@ function createChatStreamReducer(options = {}) {
|
|
|
19447
19722
|
let stateCache = null;
|
|
19448
19723
|
function invalidate() {
|
|
19449
19724
|
stateCache = null;
|
|
19450
|
-
_optionalChain([onChange, 'optionalCall',
|
|
19725
|
+
_optionalChain([onChange, 'optionalCall', _651 => _651()]);
|
|
19451
19726
|
}
|
|
19452
19727
|
function getState() {
|
|
19453
19728
|
if (!stateCache) {
|
|
@@ -19463,7 +19738,7 @@ function createChatStreamReducer(options = {}) {
|
|
|
19463
19738
|
return stateCache;
|
|
19464
19739
|
}
|
|
19465
19740
|
function emit(name, ...args) {
|
|
19466
|
-
_optionalChain([onEffect, 'optionalCall',
|
|
19741
|
+
_optionalChain([onEffect, 'optionalCall', _652 => _652({ name, args })]);
|
|
19467
19742
|
}
|
|
19468
19743
|
function setMessagesInternal(next) {
|
|
19469
19744
|
if (next !== messages) {
|
|
@@ -19506,12 +19781,12 @@ function createChatStreamReducer(options = {}) {
|
|
|
19506
19781
|
return stampTrailingAssistantSourceMetadata(stampTrailingAssistantSeq(next, seq));
|
|
19507
19782
|
}
|
|
19508
19783
|
function applySegmentsToState(segments, meta) {
|
|
19509
|
-
const seq = _optionalChain([meta, 'optionalAccess',
|
|
19510
|
-
if (_optionalChain([meta, 'optionalAccess',
|
|
19784
|
+
const seq = _optionalChain([meta, 'optionalAccess', _653 => _653.streamSeq]);
|
|
19785
|
+
if (_optionalChain([meta, 'optionalAccess', _654 => _654.append]) && meta.isCompacting) {
|
|
19511
19786
|
setMessagesInternal(commitTrailingAssistant(upsertTrailingCompaction(messages, segments), seq));
|
|
19512
19787
|
return;
|
|
19513
19788
|
}
|
|
19514
|
-
if (_optionalChain([meta, 'optionalAccess',
|
|
19789
|
+
if (_optionalChain([meta, 'optionalAccess', _655 => _655.append])) {
|
|
19515
19790
|
setMessagesInternal(commitTrailingAssistant(appendToTrailingAssistant(messages, segments), seq));
|
|
19516
19791
|
return;
|
|
19517
19792
|
}
|
|
@@ -19523,7 +19798,7 @@ function createChatStreamReducer(options = {}) {
|
|
|
19523
19798
|
adoptTrailingAssistant = false;
|
|
19524
19799
|
const last = messages[messages.length - 1];
|
|
19525
19800
|
if (!last || last.role !== "assistant" || adoptTail) return;
|
|
19526
|
-
const hasContent = (_nullishCoalesce(_optionalChain([last, 'access',
|
|
19801
|
+
const hasContent = (_nullishCoalesce(_optionalChain([last, 'access', _656 => _656.segments, 'optionalAccess', _657 => _657.length]), () => ( 0))) > 0 || last.content !== "";
|
|
19527
19802
|
if (!hasContent) return;
|
|
19528
19803
|
setMessagesInternal([...messages, { id: nextId("assistant"), role: "assistant", content: "", segments: [] }]);
|
|
19529
19804
|
}
|
|
@@ -19742,13 +20017,13 @@ function createChatStreamReducer(options = {}) {
|
|
|
19742
20017
|
const summary = required ? getCommandText(required) : `Batch of ${toolCalls.length} tool calls`;
|
|
19743
20018
|
pendingEscalated.set(requestId, {
|
|
19744
20019
|
command: summary,
|
|
19745
|
-
explanation: _optionalChain([required, 'optionalAccess',
|
|
20020
|
+
explanation: _optionalChain([required, 'optionalAccess', _658 => _658.toolExplanation]),
|
|
19746
20021
|
approvalType,
|
|
19747
20022
|
toolCalls
|
|
19748
20023
|
});
|
|
19749
20024
|
emit("onEscalatedApproval", requestId, {
|
|
19750
20025
|
command: summary,
|
|
19751
|
-
explanation: _optionalChain([required, 'optionalAccess',
|
|
20026
|
+
explanation: _optionalChain([required, 'optionalAccess', _659 => _659.toolExplanation]),
|
|
19752
20027
|
approvalType
|
|
19753
20028
|
});
|
|
19754
20029
|
break;
|
|
@@ -20132,7 +20407,7 @@ function createChatStreamReducer(options = {}) {
|
|
|
20132
20407
|
const resolveBatch = (status, confirm) => async () => {
|
|
20133
20408
|
setMessagesInternal(projectBatchStatusToMessages(messages, anchorId, status));
|
|
20134
20409
|
for (const id of ids) {
|
|
20135
|
-
const ok = await _optionalChain([confirm, 'optionalCall',
|
|
20410
|
+
const ok = await _optionalChain([confirm, 'optionalCall', _660 => _660(id)]);
|
|
20136
20411
|
if (ok === false) {
|
|
20137
20412
|
setMessagesInternal(projectBatchRowFailureToMessages(messages, id));
|
|
20138
20413
|
}
|
|
@@ -20268,8 +20543,8 @@ function createChatStreamReducer(options = {}) {
|
|
|
20268
20543
|
}
|
|
20269
20544
|
}
|
|
20270
20545
|
}
|
|
20271
|
-
hasEverStreamed = hasEverStreamed || (_nullishCoalesce(_optionalChain([extras, 'optionalAccess',
|
|
20272
|
-
if (_optionalChain([extras, 'optionalAccess',
|
|
20546
|
+
hasEverStreamed = hasEverStreamed || (_nullishCoalesce(_optionalChain([extras, 'optionalAccess', _661 => _661.resumed]), () => ( messages.length > 0)));
|
|
20547
|
+
if (_optionalChain([extras, 'optionalAccess', _662 => _662.agentBusy])) agentBusyState();
|
|
20273
20548
|
invalidate();
|
|
20274
20549
|
}
|
|
20275
20550
|
return {
|
|
@@ -20354,7 +20629,7 @@ function createChatStreamReducer(options = {}) {
|
|
|
20354
20629
|
},
|
|
20355
20630
|
endSseTurn() {
|
|
20356
20631
|
const last = messages[messages.length - 1];
|
|
20357
|
-
if (last && last.role === "assistant" && (_nullishCoalesce(_optionalChain([last, 'access',
|
|
20632
|
+
if (last && last.role === "assistant" && (_nullishCoalesce(_optionalChain([last, 'access', _663 => _663.segments, 'optionalAccess', _664 => _664.length]), () => ( 0))) === 0 && last.content === "") {
|
|
20358
20633
|
messages = messages.slice(0, -1);
|
|
20359
20634
|
}
|
|
20360
20635
|
sseCurrentText = "";
|
|
@@ -20507,10 +20782,10 @@ function createChatDialogStore(options = {}) {
|
|
|
20507
20782
|
if (onEvict) {
|
|
20508
20783
|
const sep = key.indexOf(KEY_SEP);
|
|
20509
20784
|
onEvict(key.slice(0, sep), key.slice(sep + 1), {
|
|
20510
|
-
messages: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess',
|
|
20511
|
-
approvalStatuses: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess',
|
|
20512
|
-
lastAppliedSeq: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess',
|
|
20513
|
-
pendingEchoes: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess',
|
|
20785
|
+
messages: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _665 => _665.state, 'access', _666 => _666.messages]), () => ( EMPTY_STATE.messages)),
|
|
20786
|
+
approvalStatuses: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _667 => _667.state, 'access', _668 => _668.approvalStatuses]), () => ( EMPTY_STATE.approvalStatuses)),
|
|
20787
|
+
lastAppliedSeq: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _669 => _669.getLastAppliedSeq, 'call', _670 => _670()]), () => ( Number.NEGATIVE_INFINITY)),
|
|
20788
|
+
pendingEchoes: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _671 => _671.getPendingEchoes, 'call', _672 => _672()]), () => ( EMPTY_PENDING_ECHOES))
|
|
20514
20789
|
});
|
|
20515
20790
|
}
|
|
20516
20791
|
}
|
|
@@ -20520,12 +20795,12 @@ function createChatDialogStore(options = {}) {
|
|
|
20520
20795
|
const key = keyOf(dialogId, side);
|
|
20521
20796
|
let reducer = reducers.get(key);
|
|
20522
20797
|
if (!reducer) {
|
|
20523
|
-
const base = _nullishCoalesce(_optionalChain([(_nullishCoalesce(createOptions, () => ( defaultCreateOptions))), 'optionalCall',
|
|
20798
|
+
const base = _nullishCoalesce(_optionalChain([(_nullishCoalesce(createOptions, () => ( defaultCreateOptions))), 'optionalCall', _673 => _673(dialogId, side)]), () => ( {}));
|
|
20524
20799
|
const userOnChange = base.onChange;
|
|
20525
20800
|
reducer = createChatStreamReducer({
|
|
20526
20801
|
...base,
|
|
20527
20802
|
onChange: () => {
|
|
20528
|
-
_optionalChain([userOnChange, 'optionalCall',
|
|
20803
|
+
_optionalChain([userOnChange, 'optionalCall', _674 => _674()]);
|
|
20529
20804
|
notify();
|
|
20530
20805
|
}
|
|
20531
20806
|
});
|
|
@@ -20570,7 +20845,7 @@ function createChatDialogStore(options = {}) {
|
|
|
20570
20845
|
};
|
|
20571
20846
|
}
|
|
20572
20847
|
function getSnapshot2(dialogId, side = DEFAULT_DIALOG_SIDE) {
|
|
20573
|
-
return _nullishCoalesce(_optionalChain([reducers, 'access',
|
|
20848
|
+
return _nullishCoalesce(_optionalChain([reducers, 'access', _675 => _675.get, 'call', _676 => _676(keyOf(dialogId, side)), 'optionalAccess', _677 => _677.state]), () => ( EMPTY_STATE));
|
|
20574
20849
|
}
|
|
20575
20850
|
function getServerSnapshot2() {
|
|
20576
20851
|
return EMPTY_STATE;
|
|
@@ -20662,7 +20937,7 @@ function createDeltaBatcher({
|
|
|
20662
20937
|
pending = [];
|
|
20663
20938
|
const key = pendingKey;
|
|
20664
20939
|
for (const delta of batch) applyOne(delta, key);
|
|
20665
|
-
_optionalChain([onFlushed, 'optionalCall',
|
|
20940
|
+
_optionalChain([onFlushed, 'optionalCall', _678 => _678(batch.length)]);
|
|
20666
20941
|
}
|
|
20667
20942
|
function schedule() {
|
|
20668
20943
|
if (raf !== null || timer !== null) return;
|
|
@@ -20686,7 +20961,7 @@ function createDeltaBatcher({
|
|
|
20686
20961
|
}
|
|
20687
20962
|
if (!isDeltaEvent(event)) return false;
|
|
20688
20963
|
const tail = pending[pending.length - 1];
|
|
20689
|
-
const seqAdvances = _optionalChain([tail, 'optionalAccess',
|
|
20964
|
+
const seqAdvances = _optionalChain([tail, 'optionalAccess', _679 => _679.seq]) == null ? event.seq == null : event.seq != null && event.seq > tail.seq;
|
|
20690
20965
|
if (tail && seqAdvances && tail.type === event.type && (tail.type !== "text-delta" || tail.leading === event.leading)) {
|
|
20691
20966
|
pending[pending.length - 1] = {
|
|
20692
20967
|
...tail,
|
|
@@ -20717,7 +20992,7 @@ function useChatStreamReducer({
|
|
|
20717
20992
|
side = DEFAULT_DIALOG_SIDE,
|
|
20718
20993
|
createReducerOptions
|
|
20719
20994
|
}) {
|
|
20720
|
-
const reducer = store.getReducer(dialogId, side, () => _nullishCoalesce(_optionalChain([createReducerOptions, 'optionalCall',
|
|
20995
|
+
const reducer = store.getReducer(dialogId, side, () => _nullishCoalesce(_optionalChain([createReducerOptions, 'optionalCall', _680 => _680()]), () => ( {})));
|
|
20721
20996
|
const getSnapshot2 = _react.useCallback.call(void 0, () => store.getSnapshot(dialogId, side), [store, dialogId, side]);
|
|
20722
20997
|
const getServerSnapshot2 = _react.useCallback.call(void 0, () => store.getServerSnapshot(), [store]);
|
|
20723
20998
|
const subscribe2 = _react.useCallback.call(void 0, (listener) => store.subscribe(listener), [store]);
|
|
@@ -20756,7 +21031,7 @@ var STORAGE_KEY = "conversation";
|
|
|
20756
21031
|
var namespaceFor = (source) => {
|
|
20757
21032
|
const base = `mingo-chat-${source}`;
|
|
20758
21033
|
const auth = _chunkXOGD2AMEcjs.getEmbedProxyAuth.call(void 0, );
|
|
20759
|
-
return _optionalChain([auth, 'optionalAccess',
|
|
21034
|
+
return _optionalChain([auth, 'optionalAccess', _681 => _681.email]) ? `${base}-u-${encodeURIComponent(auth.email.toLowerCase())}` : base;
|
|
20760
21035
|
};
|
|
20761
21036
|
function createChatConversationStorage(source) {
|
|
20762
21037
|
return _chunkXOGD2AMEcjs.createLocalStorageAdapter.call(void 0, {
|
|
@@ -20868,7 +21143,7 @@ function formatSingularLookupInvocation(cmdId, value) {
|
|
|
20868
21143
|
return safe ? `/${cmdId} "${safe}"` : `/${cmdId}`;
|
|
20869
21144
|
}
|
|
20870
21145
|
function extractEntityIdFilter(override, expectedTableId) {
|
|
20871
|
-
const f = _optionalChain([override, 'optionalAccess',
|
|
21146
|
+
const f = _optionalChain([override, 'optionalAccess', _682 => _682.entityIdFilter]);
|
|
20872
21147
|
if (!f) return null;
|
|
20873
21148
|
const tableId = typeof f.tableId === "string" ? f.tableId : "";
|
|
20874
21149
|
const id = typeof f.id === "string" ? f.id : "";
|
|
@@ -20907,7 +21182,7 @@ var AUTO_CONTINUATION_DIRECTIVE_PREFIX = "[internal-auto-continuation]";
|
|
|
20907
21182
|
function buildAutoContinuationDirective(toolName, opts = {}) {
|
|
20908
21183
|
const ticketRef = opts.ticketId ? ` (ticket #${opts.ticketId})` : "";
|
|
20909
21184
|
const ticketHash = opts.ticketId ? ` #${opts.ticketId}` : "";
|
|
20910
|
-
const isClose = toolName === "update_ticket" && _optionalChain([opts, 'access',
|
|
21185
|
+
const isClose = toolName === "update_ticket" && _optionalChain([opts, 'access', _683 => _683.status, 'optionalAccess', _684 => _684.toUpperCase, 'call', _685 => _685()]) === "CLOSED";
|
|
20911
21186
|
if (toolName === "create_ticket") {
|
|
20912
21187
|
return `${AUTO_CONTINUATION_DIRECTIVE_PREFIX} The user just approved create_ticket${ticketRef}. Per ticket-protocol \xA71a, ask 2-4 SHORT, issue-specific diagnostic follow-up questions tailored to the symptom they reported in their original message. When they answer, propose an update_ticket with content_addendum carrying a clean Q&A digest. Do NOT call any tool in this turn \u2014 just write the questions as prose.`;
|
|
20913
21188
|
}
|
|
@@ -20957,7 +21232,7 @@ function useChatHistoryHydration({
|
|
|
20957
21232
|
if (cancelled) return;
|
|
20958
21233
|
if (rows.length === 0) {
|
|
20959
21234
|
const found = isRecord(body) ? body.found : void 0;
|
|
20960
|
-
if (found === false) _optionalChain([onOrphanedConversation, 'optionalCall',
|
|
21235
|
+
if (found === false) _optionalChain([onOrphanedConversation, 'optionalCall', _686 => _686(conversationId)]);
|
|
20961
21236
|
return;
|
|
20962
21237
|
}
|
|
20963
21238
|
const hydrated = [];
|
|
@@ -21101,7 +21376,7 @@ function useManagedDialogList({
|
|
|
21101
21376
|
try {
|
|
21102
21377
|
await deleteDialogCallback(id);
|
|
21103
21378
|
removeLocal(id);
|
|
21104
|
-
_optionalChain([onDialogRemovedRef, 'access',
|
|
21379
|
+
_optionalChain([onDialogRemovedRef, 'access', _687 => _687.current, 'optionalCall', _688 => _688(id, "deleted")]);
|
|
21105
21380
|
} catch (err) {
|
|
21106
21381
|
console.error(`${logTag} deleteDialog failed:`, err);
|
|
21107
21382
|
throw err;
|
|
@@ -21112,7 +21387,7 @@ function useManagedDialogList({
|
|
|
21112
21387
|
const renameDialog = _react.useCallback.call(void 0,
|
|
21113
21388
|
async (id, title) => {
|
|
21114
21389
|
if (!renameDialogCallback) return;
|
|
21115
|
-
const previous = _optionalChain([dialogsRef, 'access',
|
|
21390
|
+
const previous = _optionalChain([dialogsRef, 'access', _689 => _689.current, 'access', _690 => _690.find, 'call', _691 => _691((d) => d.id === id), 'optionalAccess', _692 => _692.title]);
|
|
21116
21391
|
setDialogs((prev) => prev.map((d) => d.id === id ? { ...d, title } : d));
|
|
21117
21392
|
try {
|
|
21118
21393
|
await renameDialogCallback(id, title);
|
|
@@ -21131,7 +21406,7 @@ function useManagedDialogList({
|
|
|
21131
21406
|
try {
|
|
21132
21407
|
await archiveDialogCallback(id);
|
|
21133
21408
|
removeLocal(id);
|
|
21134
|
-
_optionalChain([onDialogRemovedRef, 'access',
|
|
21409
|
+
_optionalChain([onDialogRemovedRef, 'access', _693 => _693.current, 'optionalCall', _694 => _694(id, "archived")]);
|
|
21135
21410
|
} catch (err) {
|
|
21136
21411
|
console.error(`${logTag} archiveDialog failed:`, err);
|
|
21137
21412
|
throw err;
|
|
@@ -21223,7 +21498,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
21223
21498
|
const { active = true } = runtimeOptions;
|
|
21224
21499
|
const runtime = _chunkU2YLMFJKcjs.useRequiredChatRuntime.call(void 0, );
|
|
21225
21500
|
const source = runtime.source || DEFAULT_CHAT_SOURCE;
|
|
21226
|
-
const tableIdForDocumentType = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
21501
|
+
const tableIdForDocumentType = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _695 => _695.tableIdForDocumentType]), () => ( defaultTableIdForDocumentType));
|
|
21227
21502
|
const sendMessageRef = _react.useRef.call(void 0,
|
|
21228
21503
|
() => Promise.resolve(true)
|
|
21229
21504
|
);
|
|
@@ -21259,7 +21534,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
21259
21534
|
if (!restoredConversationRef.current) {
|
|
21260
21535
|
restoredConversationRef.current = true;
|
|
21261
21536
|
pruneStaleChatConversationStorage(source);
|
|
21262
|
-
conversationIdRef.current = _nullishCoalesce(_optionalChain([conversationStorage, 'access',
|
|
21537
|
+
conversationIdRef.current = _nullishCoalesce(_optionalChain([conversationStorage, 'access', _696 => _696.load, 'call', _697 => _697(), 'optionalAccess', _698 => _698.conversationId]), () => ( null));
|
|
21263
21538
|
}
|
|
21264
21539
|
const [conversationId, setConversationId] = _react.useState.call(void 0, () => conversationIdRef.current);
|
|
21265
21540
|
const commitConversationId = _react.useCallback.call(void 0,
|
|
@@ -21350,7 +21625,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
21350
21625
|
const abortControllerRef = _react.useRef.call(void 0, null);
|
|
21351
21626
|
const switchConversation = _react.useCallback.call(void 0,
|
|
21352
21627
|
(id) => {
|
|
21353
|
-
_optionalChain([abortControllerRef, 'access',
|
|
21628
|
+
_optionalChain([abortControllerRef, 'access', _699 => _699.current, 'optionalAccess', _700 => _700.abort, 'call', _701 => _701()]);
|
|
21354
21629
|
flushDeltas();
|
|
21355
21630
|
mutate((r) => r.reset());
|
|
21356
21631
|
hydrationSendCountRef.current = 0;
|
|
@@ -21387,8 +21662,8 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
21387
21662
|
} = useManagedDialogList({
|
|
21388
21663
|
autoLoad: active,
|
|
21389
21664
|
fetchDialogs: fetchActiveDialogs,
|
|
21390
|
-
renameDialog: _optionalChain([conversationsApi, 'optionalAccess',
|
|
21391
|
-
archiveDialog: _optionalChain([conversationsApi, 'optionalAccess',
|
|
21665
|
+
renameDialog: _optionalChain([conversationsApi, 'optionalAccess', _702 => _702.renameDialog]),
|
|
21666
|
+
archiveDialog: _optionalChain([conversationsApi, 'optionalAccess', _703 => _703.archiveDialog]),
|
|
21392
21667
|
pageSize: 20,
|
|
21393
21668
|
search: conversationsApi ? dialogSearch : void 0,
|
|
21394
21669
|
logTag: "[useSseChatAdapter]",
|
|
@@ -21452,7 +21727,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
21452
21727
|
const serverMessage = await readServerErrorMessage(response);
|
|
21453
21728
|
throw new Error(_nullishCoalesce(serverMessage, () => ( `Chat request failed: ${response.status}`)));
|
|
21454
21729
|
}
|
|
21455
|
-
const reader = _optionalChain([response, 'access',
|
|
21730
|
+
const reader = _optionalChain([response, 'access', _704 => _704.body, 'optionalAccess', _705 => _705.getReader, 'call', _706 => _706()]);
|
|
21456
21731
|
if (!reader) throw new Error("No response body");
|
|
21457
21732
|
const frameDecoder = createSseFrameDecoder();
|
|
21458
21733
|
let finished = false;
|
|
@@ -21481,7 +21756,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
21481
21756
|
}
|
|
21482
21757
|
return true;
|
|
21483
21758
|
} catch (err) {
|
|
21484
|
-
if (_optionalChain([err, 'optionalAccess',
|
|
21759
|
+
if (_optionalChain([err, 'optionalAccess', _707 => _707.name]) === "AbortError" || ctrl.signal.aborted) {
|
|
21485
21760
|
return true;
|
|
21486
21761
|
}
|
|
21487
21762
|
flushDeltas();
|
|
@@ -21517,7 +21792,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
21517
21792
|
);
|
|
21518
21793
|
sendMessageRef.current = sendMessage;
|
|
21519
21794
|
const stopMessage = _react.useCallback.call(void 0, () => {
|
|
21520
|
-
_optionalChain([abortControllerRef, 'access',
|
|
21795
|
+
_optionalChain([abortControllerRef, 'access', _708 => _708.current, 'optionalAccess', _709 => _709.abort, 'call', _710 => _710()]);
|
|
21521
21796
|
flushDeltas();
|
|
21522
21797
|
mutate((r) => r.setPhase("idle"));
|
|
21523
21798
|
}, [mutate, flushDeltas]);
|
|
@@ -21553,7 +21828,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
21553
21828
|
let sendIdx = -1;
|
|
21554
21829
|
return state.messages.map((m) => {
|
|
21555
21830
|
const segments = m.segments;
|
|
21556
|
-
const content = typeof m.content === "string" && !segments ? m.content : _nullishCoalesce(_optionalChain([segments, 'optionalAccess',
|
|
21831
|
+
const content = typeof m.content === "string" && !segments ? m.content : _nullishCoalesce(_optionalChain([segments, 'optionalAccess', _711 => _711.filter, 'call', _712 => _712((s) => s.type === "text"), 'access', _713 => _713.map, 'call', _714 => _714((s) => s.text), 'access', _715 => _715.join, 'call', _716 => _716("")]), () => ( ""));
|
|
21557
21832
|
let sources2;
|
|
21558
21833
|
let scrollAnchor;
|
|
21559
21834
|
if (m.role === "user" && !m.hidden) {
|
|
@@ -21562,7 +21837,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
21562
21837
|
if (m.role === "assistant") {
|
|
21563
21838
|
const lookupIdx = sendIdx >= 0 ? sendIdx : 0;
|
|
21564
21839
|
sources2 = sourcesMap.get(lookupIdx);
|
|
21565
|
-
scrollAnchor = _nullishCoalesce(_optionalChain([meta, 'access',
|
|
21840
|
+
scrollAnchor = _nullishCoalesce(_optionalChain([meta, 'access', _717 => _717.get, 'call', _718 => _718(lookupIdx), 'optionalAccess', _719 => _719.scrollAnchor]), () => ( void 0));
|
|
21566
21841
|
}
|
|
21567
21842
|
return {
|
|
21568
21843
|
id: m.id,
|
|
@@ -21589,7 +21864,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
21589
21864
|
);
|
|
21590
21865
|
return;
|
|
21591
21866
|
}
|
|
21592
|
-
const refSlug = typeof _optionalChain([reference, 'access',
|
|
21867
|
+
const refSlug = typeof _optionalChain([reference, 'access', _720 => _720.metadata, 'optionalAccess', _721 => _721.slug]) === "string" && reference.metadata.slug.length > 0 ? reference.metadata.slug : "";
|
|
21593
21868
|
const queryValue = refSlug || sanitizeTitleForChat(reference.title) || reference.id;
|
|
21594
21869
|
const escaped = queryValue.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
21595
21870
|
const text2 = `/${cmdId} display "${escaped}"`;
|
|
@@ -21635,18 +21910,18 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
21635
21910
|
/** True while the mount-time rebuild from the server transcript runs. */
|
|
21636
21911
|
isHydratingHistory,
|
|
21637
21912
|
/** Provider key for the lib's `<ModelDisplay>` icon. */
|
|
21638
|
-
currentProvider: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
21639
|
-
currentModelLabel: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
21640
|
-
currentContextWindowMaxTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
21913
|
+
currentProvider: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _722 => _722.provider]), () => ( null)),
|
|
21914
|
+
currentModelLabel: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _723 => _723.modelLabel]), () => ( null)),
|
|
21915
|
+
currentContextWindowMaxTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _724 => _724.contextWindowMaxTokens]), () => ( null)),
|
|
21641
21916
|
/** Input tokens (known after server's message_start frame; null until). */
|
|
21642
|
-
currentInputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
21917
|
+
currentInputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _725 => _725.inputTokens]), () => ( null)),
|
|
21643
21918
|
/** Output tokens (known only after server's trailing usage frame). */
|
|
21644
|
-
currentOutputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
21919
|
+
currentOutputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _726 => _726.outputTokens]), () => ( null)),
|
|
21645
21920
|
/** Cache hit % (read / total-input × 100). null during streaming. */
|
|
21646
|
-
currentCacheHitRatePct: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
21921
|
+
currentCacheHitRatePct: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _727 => _727.cacheHitRatePct]), () => ( null)),
|
|
21647
21922
|
/** Cross-call usage breakdown (Haiku rewriter/classifier/summarizer
|
|
21648
21923
|
* token counts). null until the trailing usage frame lands. */
|
|
21649
|
-
currentUsageBreakdown: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
21924
|
+
currentUsageBreakdown: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _728 => _728.breakdown]), () => ( null)),
|
|
21650
21925
|
// ─── Dialog management ───────────────────────────────────────────────
|
|
21651
21926
|
// With `chatConversationsUrl` the server transcript store IS the dialog
|
|
21652
21927
|
// list (shared `useManagedDialogList`); selecting a row re-hydrates through
|
|
@@ -21901,7 +22176,7 @@ function decodeNatsChunk(chunk) {
|
|
|
21901
22176
|
userId: typeof data.userId === "string" ? data.userId : void 0,
|
|
21902
22177
|
// Wire shape carries no label; fall back to the id (parity with
|
|
21903
22178
|
// the history path in `process-historical-messages.ts`).
|
|
21904
|
-
contextItems: Array.isArray(data.contextItems) ? data.contextItems.filter((it) => typeof _optionalChain([it, 'optionalAccess',
|
|
22179
|
+
contextItems: Array.isArray(data.contextItems) ? data.contextItems.filter((it) => typeof _optionalChain([it, 'optionalAccess', _729 => _729.type]) === "string" && typeof _optionalChain([it, 'optionalAccess', _730 => _730.id]) === "string").map((it) => ({
|
|
21905
22180
|
type: it.type,
|
|
21906
22181
|
id: it.id,
|
|
21907
22182
|
label: it.id
|
|
@@ -21992,7 +22267,7 @@ function extractIncompleteMessageState(lastMessage) {
|
|
|
21992
22267
|
}
|
|
21993
22268
|
break;
|
|
21994
22269
|
case "approval_batch": {
|
|
21995
|
-
const allDone = !!segment.data.executions && segment.data.toolCalls.every((c) => _optionalChain([segment, 'access',
|
|
22270
|
+
const allDone = !!segment.data.executions && segment.data.toolCalls.every((c) => _optionalChain([segment, 'access', _731 => _731.data, 'access', _732 => _732.executions, 'optionalAccess', _733 => _733[c.toolExecutionRequestId], 'optionalAccess', _734 => _734.status]) === "done");
|
|
21996
22271
|
if (segment.status !== "rejected" && !allDone) {
|
|
21997
22272
|
hasIncompleteState = true;
|
|
21998
22273
|
}
|
|
@@ -22054,11 +22329,11 @@ function extractIncompleteMessageState(lastMessage) {
|
|
|
22054
22329
|
function extractIncompleteTailState(messages) {
|
|
22055
22330
|
if (!messages || messages.length === 0) return void 0;
|
|
22056
22331
|
let start = messages.length;
|
|
22057
|
-
while (start > 0 && _optionalChain([messages, 'access',
|
|
22332
|
+
while (start > 0 && _optionalChain([messages, 'access', _735 => _735[start - 1], 'optionalAccess', _736 => _736.role]) === "assistant") start -= 1;
|
|
22058
22333
|
if (start === messages.length) return void 0;
|
|
22059
22334
|
const segments = [];
|
|
22060
22335
|
for (let i = start; i < messages.length; i += 1) {
|
|
22061
|
-
const content = _optionalChain([messages, 'access',
|
|
22336
|
+
const content = _optionalChain([messages, 'access', _737 => _737[i], 'optionalAccess', _738 => _738.content]);
|
|
22062
22337
|
if (Array.isArray(content)) segments.push(...content);
|
|
22063
22338
|
}
|
|
22064
22339
|
if (segments.length === 0) return void 0;
|
|
@@ -22071,15 +22346,15 @@ function extractIncompleteTailState(messages) {
|
|
|
22071
22346
|
|
|
22072
22347
|
// src/components/chat/utils/process-historical-messages.ts
|
|
22073
22348
|
function getOwnerDisplayName(owner) {
|
|
22074
|
-
if (_optionalChain([owner, 'optionalAccess',
|
|
22349
|
+
if (_optionalChain([owner, 'optionalAccess', _739 => _739.type]) === OWNER_TYPE.ADMIN && owner.user) {
|
|
22075
22350
|
const { firstName, lastName } = owner.user;
|
|
22076
22351
|
const name = [firstName, lastName].filter(Boolean).join(" ");
|
|
22077
22352
|
if (name) return name;
|
|
22078
22353
|
}
|
|
22079
|
-
return _optionalChain([owner, 'optionalAccess',
|
|
22354
|
+
return _optionalChain([owner, 'optionalAccess', _740 => _740.type]) === OWNER_TYPE.ADMIN ? "Admin" : "You";
|
|
22080
22355
|
}
|
|
22081
22356
|
function getOwnerAvatar(owner) {
|
|
22082
|
-
return _nullishCoalesce(_optionalChain([owner, 'optionalAccess',
|
|
22357
|
+
return _nullishCoalesce(_optionalChain([owner, 'optionalAccess', _741 => _741.user, 'optionalAccess', _742 => _742.image, 'optionalAccess', _743 => _743.imageUrl]), () => ( void 0));
|
|
22083
22358
|
}
|
|
22084
22359
|
function pushStandaloneMessages(processedMessages, msg, messageDataArray) {
|
|
22085
22360
|
messageDataArray.forEach((data) => {
|
|
@@ -22269,7 +22544,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
22269
22544
|
event.offerId,
|
|
22270
22545
|
event.text,
|
|
22271
22546
|
event.origin,
|
|
22272
|
-
_nullishCoalesce(_optionalChain([escalationOfferStates, 'optionalAccess',
|
|
22547
|
+
_nullishCoalesce(_optionalChain([escalationOfferStates, 'optionalAccess', _744 => _744[event.offerId]]), () => ( "pending"))
|
|
22273
22548
|
);
|
|
22274
22549
|
break;
|
|
22275
22550
|
case "ticket-escalated":
|
|
@@ -22303,7 +22578,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
22303
22578
|
);
|
|
22304
22579
|
break;
|
|
22305
22580
|
case "escalation-offer-resolved":
|
|
22306
|
-
_optionalChain([offerResolutions, 'optionalAccess',
|
|
22581
|
+
_optionalChain([offerResolutions, 'optionalAccess', _745 => _745.set, 'call', _746 => _746(event.offerId, {
|
|
22307
22582
|
status: event.status,
|
|
22308
22583
|
resolvedByName: event.resolvedByName
|
|
22309
22584
|
})]);
|
|
@@ -22367,7 +22642,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
22367
22642
|
}
|
|
22368
22643
|
}
|
|
22369
22644
|
} else {
|
|
22370
|
-
_optionalChain([escalatedApprovals, 'optionalAccess',
|
|
22645
|
+
_optionalChain([escalatedApprovals, 'optionalAccess', _747 => _747.set, 'call', _748 => _748(event.requestId, {
|
|
22371
22646
|
command: event.command || "",
|
|
22372
22647
|
explanation: event.explanation,
|
|
22373
22648
|
approvalType,
|
|
@@ -22382,8 +22657,8 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
22382
22657
|
const existingStatus = approvalStatuses[requestId];
|
|
22383
22658
|
const status = existingStatus || event.status;
|
|
22384
22659
|
const resolvedByName = event.resolvedByName;
|
|
22385
|
-
const escalatedData = _optionalChain([escalatedApprovals, 'optionalAccess',
|
|
22386
|
-
if (_optionalChain([escalatedData, 'optionalAccess',
|
|
22660
|
+
const escalatedData = _optionalChain([escalatedApprovals, 'optionalAccess', _749 => _749.get, 'call', _750 => _750(requestId)]);
|
|
22661
|
+
if (_optionalChain([escalatedData, 'optionalAccess', _751 => _751.toolCalls]) && escalatedData.toolCalls.length > 0) {
|
|
22387
22662
|
if (batchApprovalsEnabled) {
|
|
22388
22663
|
accumulator.addApprovalBatch(
|
|
22389
22664
|
requestId,
|
|
@@ -22405,7 +22680,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
22405
22680
|
);
|
|
22406
22681
|
}
|
|
22407
22682
|
}
|
|
22408
|
-
_optionalChain([escalatedApprovals, 'optionalAccess',
|
|
22683
|
+
_optionalChain([escalatedApprovals, 'optionalAccess', _752 => _752.delete, 'call', _753 => _753(requestId)]);
|
|
22409
22684
|
break;
|
|
22410
22685
|
}
|
|
22411
22686
|
if (escalatedData) {
|
|
@@ -22414,7 +22689,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
22414
22689
|
explanation: escalatedData.explanation,
|
|
22415
22690
|
approvalType: escalatedData.approvalType
|
|
22416
22691
|
});
|
|
22417
|
-
_optionalChain([escalatedApprovals, 'optionalAccess',
|
|
22692
|
+
_optionalChain([escalatedApprovals, 'optionalAccess', _754 => _754.delete, 'call', _755 => _755(requestId)]);
|
|
22418
22693
|
}
|
|
22419
22694
|
const before = accumulator.getSegments();
|
|
22420
22695
|
const after = accumulator.updateApprovalStatus(requestId, status, resolvedByName);
|
|
@@ -22506,14 +22781,14 @@ function processHistoricalMessages(messages, options = {}) {
|
|
|
22506
22781
|
pushStandaloneMessages(processedMessages, msg, messageDataArray);
|
|
22507
22782
|
return;
|
|
22508
22783
|
}
|
|
22509
|
-
const isUserMessage = _optionalChain([msg, 'access',
|
|
22784
|
+
const isUserMessage = _optionalChain([msg, 'access', _756 => _756.owner, 'optionalAccess', _757 => _757.type]) === OWNER_TYPE.CLIENT || _optionalChain([msg, 'access', _758 => _758.owner, 'optionalAccess', _759 => _759.type]) === OWNER_TYPE.ADMIN;
|
|
22510
22785
|
if (isUserMessage) {
|
|
22511
22786
|
flushAssistantMessage();
|
|
22512
|
-
const userAuthorType = _optionalChain([msg, 'access',
|
|
22787
|
+
const userAuthorType = _optionalChain([msg, 'access', _760 => _760.owner, 'optionalAccess', _761 => _761.type]) === OWNER_TYPE.ADMIN ? "admin" : "user";
|
|
22513
22788
|
messageDataArray.forEach((data) => {
|
|
22514
22789
|
if (data.type === MESSAGE_TYPE.TEXT && "text" in data && data.text) {
|
|
22515
22790
|
const rawContext = data.contextItems;
|
|
22516
|
-
const contextItems = Array.isArray(rawContext) ? rawContext.filter((c) => typeof _optionalChain([c, 'optionalAccess',
|
|
22791
|
+
const contextItems = Array.isArray(rawContext) ? rawContext.filter((c) => typeof _optionalChain([c, 'optionalAccess', _762 => _762.type]) === "string" && typeof _optionalChain([c, 'optionalAccess', _763 => _763.id]) === "string").map((c) => ({ type: c.type, id: c.id, label: c.id })) : void 0;
|
|
22517
22792
|
processedMessages.push({
|
|
22518
22793
|
id: msg.id,
|
|
22519
22794
|
role: "user",
|
|
@@ -22560,7 +22835,7 @@ function processHistoricalMessages(messages, options = {}) {
|
|
|
22560
22835
|
});
|
|
22561
22836
|
const nextMsg = messages[index + 1];
|
|
22562
22837
|
const isLastMessage = index === messages.length - 1;
|
|
22563
|
-
const nextIsFromUser = nextMsg && (_optionalChain([nextMsg, 'access',
|
|
22838
|
+
const nextIsFromUser = nextMsg && (_optionalChain([nextMsg, 'access', _764 => _764.owner, 'optionalAccess', _765 => _765.type]) === OWNER_TYPE.CLIENT || _optionalChain([nextMsg, 'access', _766 => _766.owner, 'optionalAccess', _767 => _767.type]) === OWNER_TYPE.ADMIN);
|
|
22564
22839
|
if (isLastMessage || nextIsFromUser) {
|
|
22565
22840
|
flushAssistantMessage();
|
|
22566
22841
|
}
|
|
@@ -22943,7 +23218,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
22943
23218
|
const connectionState = !active || !dialogId ? "connected" : connectedForDialog === dialogId ? "connected" : "connecting";
|
|
22944
23219
|
const sendMessage = _react.useCallback.call(void 0,
|
|
22945
23220
|
async (text2, sendOptions) => {
|
|
22946
|
-
const hidden = _nullishCoalesce(_optionalChain([sendOptions, 'optionalAccess',
|
|
23221
|
+
const hidden = _nullishCoalesce(_optionalChain([sendOptions, 'optionalAccess', _768 => _768.hidden]), () => ( false));
|
|
22947
23222
|
mutate((r) => r.pushOptimisticSend(text2, hidden));
|
|
22948
23223
|
await publishUserMessage(text2, { hidden, dialogId });
|
|
22949
23224
|
},
|
|
@@ -23036,11 +23311,11 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
23036
23311
|
// Tokens: live `token_usage` frame / dialog snapshot (`dialogTokenUsage`).
|
|
23037
23312
|
// contextWindow uses the dialog's `contextSize` (the "X / Y" denominator,
|
|
23038
23313
|
// matching the /mingo page). cacheHitRate/breakdown are SSE-only → null.
|
|
23039
|
-
currentProvider: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess',
|
|
23040
|
-
currentModelLabel: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess',
|
|
23041
|
-
currentContextWindowMaxTokens: _nullishCoalesce(_nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess',
|
|
23042
|
-
currentInputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess',
|
|
23043
|
-
currentOutputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess',
|
|
23314
|
+
currentProvider: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _769 => _769.provider]), () => ( modelProvider)), () => ( null)),
|
|
23315
|
+
currentModelLabel: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _770 => _770.modelLabel]), () => ( modelLabel)), () => ( null)),
|
|
23316
|
+
currentContextWindowMaxTokens: _nullishCoalesce(_nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _771 => _771.contextSize]), () => ( _optionalChain([liveModel, 'optionalAccess', _772 => _772.contextWindowMaxTokens]))), () => ( null)),
|
|
23317
|
+
currentInputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _773 => _773.inputTokensSize]), () => ( null)),
|
|
23318
|
+
currentOutputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _774 => _774.outputTokensSize]), () => ( null)),
|
|
23044
23319
|
currentCacheHitRatePct: null,
|
|
23045
23320
|
currentUsageBreakdown: null,
|
|
23046
23321
|
// Dialog management
|
|
@@ -23162,7 +23437,7 @@ function useUnifiedChat(options) {
|
|
|
23162
23437
|
[]
|
|
23163
23438
|
);
|
|
23164
23439
|
const displayRefForward = _react.useCallback.call(void 0,
|
|
23165
|
-
(ref) => _optionalChain([activeStateRef, 'access',
|
|
23440
|
+
(ref) => _optionalChain([activeStateRef, 'access', _775 => _775.current, 'access', _776 => _776.displayRef, 'optionalCall', _777 => _777(ref)]),
|
|
23166
23441
|
[]
|
|
23167
23442
|
);
|
|
23168
23443
|
const displayRef = activeState.displayRef ? displayRefForward : void 0;
|
|
@@ -23172,7 +23447,7 @@ function useUnifiedChat(options) {
|
|
|
23172
23447
|
const renameDialog = _react.useCallback.call(void 0, (id, title) => activeStateRef.current.renameDialog(id, title), []);
|
|
23173
23448
|
const archiveDialog = _react.useCallback.call(void 0, (id) => activeStateRef.current.archiveDialog(id), []);
|
|
23174
23449
|
const loadMoreDialogs = _react.useCallback.call(void 0, () => activeStateRef.current.loadMoreDialogs(), []);
|
|
23175
|
-
const setDialogScope = _react.useCallback.call(void 0, (scope) => _optionalChain([activeStateRef, 'access',
|
|
23450
|
+
const setDialogScope = _react.useCallback.call(void 0, (scope) => _optionalChain([activeStateRef, 'access', _778 => _778.current, 'access', _779 => _779.setDialogScope, 'optionalCall', _780 => _780(scope)]), []);
|
|
23176
23451
|
const reloadDialogs = _react.useCallback.call(void 0, () => activeStateRef.current.reloadDialogs(), []);
|
|
23177
23452
|
const loadMoreMessages = _react.useCallback.call(void 0, () => activeStateRef.current.loadMoreMessages(), []);
|
|
23178
23453
|
const approveRequest = _react.useCallback.call(void 0, (requestId) => activeStateRef.current.approveRequest(requestId), []);
|
|
@@ -23280,19 +23555,19 @@ function turnRequestKeys(content) {
|
|
|
23280
23555
|
if (!Array.isArray(content)) return keys;
|
|
23281
23556
|
for (const seg of content) {
|
|
23282
23557
|
if (seg.type === "tool_execution") {
|
|
23283
|
-
const id = _optionalChain([seg, 'access',
|
|
23558
|
+
const id = _optionalChain([seg, 'access', _781 => _781.data, 'optionalAccess', _782 => _782.toolExecutionRequestId]);
|
|
23284
23559
|
if (id) keys.add(id);
|
|
23285
23560
|
} else if (seg.type === "approval_request") {
|
|
23286
|
-
const id = _optionalChain([seg, 'access',
|
|
23561
|
+
const id = _optionalChain([seg, 'access', _783 => _783.data, 'optionalAccess', _784 => _784.requestId]);
|
|
23287
23562
|
if (id) keys.add(id);
|
|
23288
23563
|
} else if (seg.type === "escalation_offer") {
|
|
23289
|
-
const id = _optionalChain([seg, 'access',
|
|
23564
|
+
const id = _optionalChain([seg, 'access', _785 => _785.data, 'optionalAccess', _786 => _786.offerId]);
|
|
23290
23565
|
if (id) keys.add(id);
|
|
23291
23566
|
} else if (seg.type === "approval_batch") {
|
|
23292
23567
|
const data = seg.data;
|
|
23293
|
-
if (_optionalChain([data, 'optionalAccess',
|
|
23294
|
-
for (const call of _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
23295
|
-
if (_optionalChain([call, 'optionalAccess',
|
|
23568
|
+
if (_optionalChain([data, 'optionalAccess', _787 => _787.approvalRequestId])) keys.add(data.approvalRequestId);
|
|
23569
|
+
for (const call of _nullishCoalesce(_optionalChain([data, 'optionalAccess', _788 => _788.toolCalls]), () => ( []))) {
|
|
23570
|
+
if (_optionalChain([call, 'optionalAccess', _789 => _789.toolExecutionRequestId])) keys.add(call.toolExecutionRequestId);
|
|
23296
23571
|
}
|
|
23297
23572
|
}
|
|
23298
23573
|
}
|
|
@@ -23376,18 +23651,18 @@ function mergeHistoryWithRealtime(input) {
|
|
|
23376
23651
|
}
|
|
23377
23652
|
}
|
|
23378
23653
|
const trailing = processedHistory[processedHistory.length - 1];
|
|
23379
|
-
const historyTrailingAssistant = _optionalChain([trailing, 'optionalAccess',
|
|
23380
|
-
const historyBatchId = historyTrailingAssistant && Array.isArray(historyTrailingAssistant.content) ? _nullishCoalesce(_optionalChain([historyTrailingAssistant, 'access',
|
|
23654
|
+
const historyTrailingAssistant = _optionalChain([trailing, 'optionalAccess', _790 => _790.role]) === "assistant" ? trailing : null;
|
|
23655
|
+
const historyBatchId = historyTrailingAssistant && Array.isArray(historyTrailingAssistant.content) ? _nullishCoalesce(_optionalChain([historyTrailingAssistant, 'access', _791 => _791.content, 'access', _792 => _792.find, 'call', _793 => _793((s) => s.type === "approval_batch"), 'optionalAccess', _794 => _794.data, 'optionalAccess', _795 => _795.approvalRequestId]), () => ( null)) : null;
|
|
23381
23656
|
let processedToUse = processedHistory;
|
|
23382
23657
|
const pinnedSyntheticIds = /* @__PURE__ */ new Set();
|
|
23383
23658
|
const droppedSyntheticIds = /* @__PURE__ */ new Set();
|
|
23384
23659
|
if (historyBatchId) {
|
|
23385
23660
|
const batchTwins = existingMessages.filter(
|
|
23386
|
-
(m) => m.role === "assistant" && Array.isArray(m.content) && m.content.some((s) => s.type === "approval_batch" && _optionalChain([s, 'access',
|
|
23661
|
+
(m) => m.role === "assistant" && Array.isArray(m.content) && m.content.some((s) => s.type === "approval_batch" && _optionalChain([s, 'access', _796 => _796.data, 'optionalAccess', _797 => _797.approvalRequestId]) === historyBatchId)
|
|
23387
23662
|
);
|
|
23388
23663
|
const existingWithSameBatch = _nullishCoalesce(batchTwins.find((m) => m.id === streamingMessageId), () => ( batchTwins[batchTwins.length - 1]));
|
|
23389
23664
|
if (existingWithSameBatch && Array.isArray(existingWithSameBatch.content)) {
|
|
23390
|
-
const histSize = Array.isArray(_optionalChain([historyTrailingAssistant, 'optionalAccess',
|
|
23665
|
+
const histSize = Array.isArray(_optionalChain([historyTrailingAssistant, 'optionalAccess', _798 => _798.content])) ? historyTrailingAssistant.content.length : 0;
|
|
23391
23666
|
const realtimeSize = existingWithSameBatch.content.length;
|
|
23392
23667
|
if (existingWithSameBatch.id === streamingMessageId || realtimeSize > histSize) {
|
|
23393
23668
|
processedToUse = processedHistory.slice(0, -1);
|
|
@@ -23420,9 +23695,9 @@ function mergeHistoryWithRealtime(input) {
|
|
|
23420
23695
|
const trailingAssistantText = lastProcessed && lastProcessed.role === "assistant" ? assistantAnswerText(lastProcessed.content) : "";
|
|
23421
23696
|
const windowSignals = collectTwinSignals(processedToUse);
|
|
23422
23697
|
const seenUserSyntheticByContent = /* @__PURE__ */ new Map();
|
|
23423
|
-
const isInWindow = (m) => processedIds.has(m.id) || (_nullishCoalesce(_optionalChain([rawHistoryIds, 'optionalAccess',
|
|
23698
|
+
const isInWindow = (m) => processedIds.has(m.id) || (_nullishCoalesce(_optionalChain([rawHistoryIds, 'optionalAccess', _799 => _799.has, 'call', _800 => _800(m.id)]), () => ( false)));
|
|
23424
23699
|
const firstWindowIndex = existingMessages.findIndex(isInWindow);
|
|
23425
|
-
const isPersistedOlder = (m) => !isClientMintedId(m.id) && (_nullishCoalesce(_optionalChain([m, 'access',
|
|
23700
|
+
const isPersistedOlder = (m) => !isClientMintedId(m.id) && (_nullishCoalesce(_optionalChain([m, 'access', _801 => _801.timestamp, 'optionalAccess', _802 => _802.getTime, 'call', _803 => _803()]), () => ( 0))) <= historyFetchedAt;
|
|
23426
23701
|
let lastOlderPersistedIndex = -1;
|
|
23427
23702
|
if (firstWindowIndex < 0) {
|
|
23428
23703
|
for (const [index, m] of existingMessages.entries()) {
|
|
@@ -23440,7 +23715,7 @@ function mergeHistoryWithRealtime(input) {
|
|
|
23440
23715
|
} else if (pm.role === "assistant") {
|
|
23441
23716
|
windowHasUnstampedAssistant = true;
|
|
23442
23717
|
}
|
|
23443
|
-
const time = _optionalChain([pm, 'access',
|
|
23718
|
+
const time = _optionalChain([pm, 'access', _804 => _804.timestamp, 'optionalAccess', _805 => _805.getTime, 'call', _806 => _806()]);
|
|
23444
23719
|
if (typeof time === "number" && time < windowMinTime) windowMinTime = time;
|
|
23445
23720
|
}
|
|
23446
23721
|
const threadHasClientMintedRow = existingMessages.some((m) => isClientMintedId(m.id));
|
|
@@ -23458,14 +23733,14 @@ function mergeHistoryWithRealtime(input) {
|
|
|
23458
23733
|
const verdict = twinVerdict(windowSignals, m);
|
|
23459
23734
|
return verdict === "unknown" ? !seqCanMislead(m) : verdict === "distinct";
|
|
23460
23735
|
}
|
|
23461
|
-
const time = _optionalChain([m, 'access',
|
|
23736
|
+
const time = _optionalChain([m, 'access', _807 => _807.timestamp, 'optionalAccess', _808 => _808.getTime, 'call', _809 => _809()]);
|
|
23462
23737
|
if (typeof time !== "number" || time > historyFetchedAt) return false;
|
|
23463
23738
|
if (!Number.isFinite(windowMinTime) || time >= windowMinTime) return false;
|
|
23464
23739
|
return twinVerdict(windowSignals, m) === "distinct";
|
|
23465
23740
|
};
|
|
23466
23741
|
const keepRealtime = (m) => {
|
|
23467
23742
|
if (m.role === "user" && isOptimisticId(m.id) && typeof m.content === "string") {
|
|
23468
|
-
const canBeInSnapshot = (_nullishCoalesce(_optionalChain([m, 'access',
|
|
23743
|
+
const canBeInSnapshot = (_nullishCoalesce(_optionalChain([m, 'access', _810 => _810.timestamp, 'optionalAccess', _811 => _811.getTime, 'call', _812 => _812()]), () => ( 0))) <= historyFetchedAt;
|
|
23469
23744
|
return !(canBeInSnapshot && windowSignals.userContents.has(m.content));
|
|
23470
23745
|
}
|
|
23471
23746
|
if (isSyntheticRealtimeId(m.id) && m.id !== streamingMessageId) {
|
|
@@ -23489,7 +23764,7 @@ function mergeHistoryWithRealtime(input) {
|
|
|
23489
23764
|
} else if (typeof m.streamSeq === "number") {
|
|
23490
23765
|
covered = historyMaxStreamSeq > 0 && historyMaxStreamSeq >= m.streamSeq;
|
|
23491
23766
|
} else {
|
|
23492
|
-
covered = historyCoversRealtime !== null ? historyCoversRealtime : (_nullishCoalesce(_optionalChain([m, 'access',
|
|
23767
|
+
covered = historyCoversRealtime !== null ? historyCoversRealtime : (_nullishCoalesce(_optionalChain([m, 'access', _813 => _813.timestamp, 'optionalAccess', _814 => _814.getTime, 'call', _815 => _815()]), () => ( 0))) <= historyFetchedAt;
|
|
23493
23768
|
}
|
|
23494
23769
|
if (covered) return false;
|
|
23495
23770
|
}
|
|
@@ -23598,7 +23873,7 @@ function normalizeHistoricalMessageData(md) {
|
|
|
23598
23873
|
function isHistoricalUserTurn(m) {
|
|
23599
23874
|
return !!m.owner;
|
|
23600
23875
|
}
|
|
23601
|
-
var isTextSegment = (d) => _optionalChain([d, 'optionalAccess',
|
|
23876
|
+
var isTextSegment = (d) => _optionalChain([d, 'optionalAccess', _816 => _816.type]) === "TEXT" && typeof d.text === "string";
|
|
23602
23877
|
var THINK_MS = 550;
|
|
23603
23878
|
var TOKEN_MS = 55;
|
|
23604
23879
|
var USER_MS = 480;
|
|
@@ -24231,7 +24506,7 @@ function useChatDialogManager({
|
|
|
24231
24506
|
const handleConfirmRestore = _react.useCallback.call(void 0, async () => {
|
|
24232
24507
|
if (restoreTarget) {
|
|
24233
24508
|
try {
|
|
24234
|
-
await _optionalChain([unarchiveDialog, 'optionalCall',
|
|
24509
|
+
await _optionalChain([unarchiveDialog, 'optionalCall', _817 => _817(restoreTarget.id)]);
|
|
24235
24510
|
} catch (err) {
|
|
24236
24511
|
console.error("[useChatDialogManager] unarchive failed:", err);
|
|
24237
24512
|
return;
|
|
@@ -24312,7 +24587,7 @@ function splitCitedSources(sources2, content) {
|
|
|
24312
24587
|
}
|
|
24313
24588
|
const cited = sources2.filter((source) => firstMentionAt.has(source.index)).sort((a, b) => (_nullishCoalesce(firstMentionAt.get(a.index), () => ( 0))) - (_nullishCoalesce(firstMentionAt.get(b.index), () => ( 0))));
|
|
24314
24589
|
const uncited = sources2.filter((source) => !firstMentionAt.has(source.index));
|
|
24315
|
-
return { cited, uncited };
|
|
24590
|
+
return { cited: groupSourcesByTable(cited), uncited: groupSourcesByTable(uncited) };
|
|
24316
24591
|
}
|
|
24317
24592
|
|
|
24318
24593
|
// src/components/chat/utils/host-message.ts
|
|
@@ -24498,7 +24773,9 @@ function SourceChip({
|
|
|
24498
24773
|
const ItemIcon = itemCta.icon;
|
|
24499
24774
|
const itemChatRef = itemCta.chatRef;
|
|
24500
24775
|
return {
|
|
24501
|
-
|
|
24776
|
+
// A client-built group keeps each row's own citation number, so the
|
|
24777
|
+
// `[3]` in the answer is findable inside the dropdown.
|
|
24778
|
+
label: item.index === void 0 ? item.name : `[${item.index}] ${item.name}`,
|
|
24502
24779
|
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ItemIcon, { className: "h-3.5 w-3.5" }),
|
|
24503
24780
|
href: _nullishCoalesce(itemCta.href, () => ( void 0)),
|
|
24504
24781
|
targetPlatform: itemCta.targetPlatform,
|
|
@@ -24510,6 +24787,8 @@ function SourceChip({
|
|
|
24510
24787
|
} : void 0
|
|
24511
24788
|
};
|
|
24512
24789
|
});
|
|
24790
|
+
const itemIndices = src.items.flatMap((item) => item.index === void 0 ? [] : [item.index]);
|
|
24791
|
+
const groupIndices = itemIndices.length > 0 ? formatCitationIndices(itemIndices) : `${src.index}`;
|
|
24513
24792
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
24514
24793
|
HoverDropdown,
|
|
24515
24794
|
{
|
|
@@ -24528,7 +24807,7 @@ function SourceChip({
|
|
|
24528
24807
|
icon,
|
|
24529
24808
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "max-w-[160px] truncate", children: [
|
|
24530
24809
|
"[",
|
|
24531
|
-
|
|
24810
|
+
groupIndices,
|
|
24532
24811
|
"] ",
|
|
24533
24812
|
src.name
|
|
24534
24813
|
] })
|
|
@@ -24777,7 +25056,7 @@ function EmbeddableChatInner({
|
|
|
24777
25056
|
}),
|
|
24778
25057
|
[commandsUrl]
|
|
24779
25058
|
);
|
|
24780
|
-
const headerUserName = _optionalChain([identityUser, 'optionalAccess',
|
|
25059
|
+
const headerUserName = _optionalChain([identityUser, 'optionalAccess', _818 => _818.name, 'optionalAccess', _819 => _819.trim, 'call', _820 => _820()]) || [_optionalChain([identityUser, 'optionalAccess', _821 => _821.firstName]), _optionalChain([identityUser, 'optionalAccess', _822 => _822.lastName])].filter(Boolean).join(" ").trim() || _optionalChain([userDisplayName, 'optionalAccess', _823 => _823.trim, 'call', _824 => _824()]) || void 0;
|
|
24781
25060
|
const effectiveModes = _react.useMemo.call(void 0, () => {
|
|
24782
25061
|
if (modes) return modes;
|
|
24783
25062
|
const guideOptions = tableIdForDocumentType ? { tableIdForDocumentType } : {};
|
|
@@ -24792,7 +25071,7 @@ function EmbeddableChatInner({
|
|
|
24792
25071
|
if (controlledActiveMode === void 0) {
|
|
24793
25072
|
setUncontrolledActiveMode(next);
|
|
24794
25073
|
}
|
|
24795
|
-
_optionalChain([onActiveModeChange, 'optionalCall',
|
|
25074
|
+
_optionalChain([onActiveModeChange, 'optionalCall', _825 => _825(next)]);
|
|
24796
25075
|
},
|
|
24797
25076
|
[controlledActiveMode, onActiveModeChange]
|
|
24798
25077
|
);
|
|
@@ -24819,7 +25098,7 @@ function EmbeddableChatInner({
|
|
|
24819
25098
|
);
|
|
24820
25099
|
const effectiveAssistantName = emptyStateConfig.name;
|
|
24821
25100
|
const effectiveAssistantIcon = emptyStateConfig.icon;
|
|
24822
|
-
const headerAssistantName = _nullishCoalesce(effectiveAssistantName, () => ( (typeof _optionalChain([guideWelcome, 'optionalAccess',
|
|
25101
|
+
const headerAssistantName = _nullishCoalesce(effectiveAssistantName, () => ( (typeof _optionalChain([guideWelcome, 'optionalAccess', _826 => _826.title]) === "string" ? guideWelcome.title : null)));
|
|
24823
25102
|
const {
|
|
24824
25103
|
messages: rawMessages,
|
|
24825
25104
|
isLoading: chatLoading,
|
|
@@ -24862,8 +25141,8 @@ function EmbeddableChatInner({
|
|
|
24862
25141
|
const mingoCaps = _react.useMemo.call(void 0,
|
|
24863
25142
|
() => ({
|
|
24864
25143
|
...dialogCapabilities,
|
|
24865
|
-
canRename: _nullishCoalesce(_optionalChain([dialogCapabilities, 'optionalAccess',
|
|
24866
|
-
canArchive: _nullishCoalesce(_optionalChain([dialogCapabilities, 'optionalAccess',
|
|
25144
|
+
canRename: _nullishCoalesce(_optionalChain([dialogCapabilities, 'optionalAccess', _827 => _827.canRename]), () => ( false)),
|
|
25145
|
+
canArchive: _nullishCoalesce(_optionalChain([dialogCapabilities, 'optionalAccess', _828 => _828.canArchive]), () => ( false))
|
|
24867
25146
|
}),
|
|
24868
25147
|
[dialogCapabilities]
|
|
24869
25148
|
);
|
|
@@ -24878,7 +25157,7 @@ function EmbeddableChatInner({
|
|
|
24878
25157
|
void sendMessage(guidePendingPrompt).catch((err) => {
|
|
24879
25158
|
console.error("[EmbeddableChat] guide launcher prompt failed:", err);
|
|
24880
25159
|
});
|
|
24881
|
-
_optionalChain([onGuidePromptConsumed, 'optionalCall',
|
|
25160
|
+
_optionalChain([onGuidePromptConsumed, 'optionalCall', _829 => _829()]);
|
|
24882
25161
|
}, [guidePendingPrompt, activeMode, sendMessage, onGuidePromptConsumed]);
|
|
24883
25162
|
const {
|
|
24884
25163
|
attachments: stagedAttachments,
|
|
@@ -24889,7 +25168,7 @@ function EmbeddableChatInner({
|
|
|
24889
25168
|
clear: clearAttachments
|
|
24890
25169
|
} = useChatAttachments();
|
|
24891
25170
|
const { panelRef: galleryPanelRef, modal: galleryModal } = useChatAttachmentImageGallery();
|
|
24892
|
-
const contextMaxItems = _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess',
|
|
25171
|
+
const contextMaxItems = _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess', _830 => _830.maxItems]), () => ( 10));
|
|
24893
25172
|
const contextPickerForMode = activeMode === "mingo" ? contextPicker : void 0;
|
|
24894
25173
|
const [contextItems, setContextItems] = _react.useState.call(void 0, NO_CONTEXT_ITEMS);
|
|
24895
25174
|
const [contextPickerOpen, setContextPickerOpen] = _react.useState.call(void 0, false);
|
|
@@ -24910,10 +25189,10 @@ function EmbeddableChatInner({
|
|
|
24910
25189
|
}, [activeDialogId, activeMode]);
|
|
24911
25190
|
const mentionMarkerByType = _react.useMemo.call(void 0, () => {
|
|
24912
25191
|
const m = /* @__PURE__ */ new Map();
|
|
24913
|
-
for (const t of _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess',
|
|
25192
|
+
for (const t of _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess', _831 => _831.entityTypes]), () => ( []))) if (t.marker) m.set(t.type, t.marker);
|
|
24914
25193
|
return m;
|
|
24915
|
-
}, [_optionalChain([contextPicker, 'optionalAccess',
|
|
24916
|
-
const contextEntityTypes = _optionalChain([contextPicker, 'optionalAccess',
|
|
25194
|
+
}, [_optionalChain([contextPicker, 'optionalAccess', _832 => _832.entityTypes])]);
|
|
25195
|
+
const contextEntityTypes = _optionalChain([contextPicker, 'optionalAccess', _833 => _833.entityTypes]);
|
|
24917
25196
|
const resolveContextIcon = _react.useMemo.call(void 0, () => {
|
|
24918
25197
|
const byType = /* @__PURE__ */ new Map();
|
|
24919
25198
|
for (const t of _nullishCoalesce(contextEntityTypes, () => ( []))) byType.set(t.type, t.icon);
|
|
@@ -24925,7 +25204,7 @@ function EmbeddableChatInner({
|
|
|
24925
25204
|
if (mentionActiveRef.current) {
|
|
24926
25205
|
if (contextItems.some((p) => `${p.type}:${p.id}` === key)) return;
|
|
24927
25206
|
if (contextItems.length >= contextMaxItems) return;
|
|
24928
|
-
_optionalChain([chatInputRef, 'access',
|
|
25207
|
+
_optionalChain([chatInputRef, 'access', _834 => _834.current, 'optionalAccess', _835 => _835.commitMention, 'call', _836 => _836(mentionTokenOf(key, mentionMarkerByType), {
|
|
24929
25208
|
label: item.label,
|
|
24930
25209
|
icon: resolveContextIcon(item)
|
|
24931
25210
|
})]);
|
|
@@ -24948,9 +25227,9 @@ function EmbeddableChatInner({
|
|
|
24948
25227
|
setContextItems((prev) => prev.filter((p) => `${p.type}:${p.id}` !== key));
|
|
24949
25228
|
if (mentionKeysRef.current.has(key)) {
|
|
24950
25229
|
mentionKeysRef.current.delete(key);
|
|
24951
|
-
const cur = _nullishCoalesce(_optionalChain([chatInputRef, 'access',
|
|
25230
|
+
const cur = _nullishCoalesce(_optionalChain([chatInputRef, 'access', _837 => _837.current, 'optionalAccess', _838 => _838.getValue, 'call', _839 => _839()]), () => ( ""));
|
|
24952
25231
|
const next = cur.replace(`@${mentionTokenOf(key, mentionMarkerByType)}`, "").replace(/\s{2,}/g, " ").trimStart();
|
|
24953
|
-
_optionalChain([chatInputRef, 'access',
|
|
25232
|
+
_optionalChain([chatInputRef, 'access', _840 => _840.current, 'optionalAccess', _841 => _841.setValue, 'call', _842 => _842(next)]);
|
|
24954
25233
|
}
|
|
24955
25234
|
},
|
|
24956
25235
|
[mentionMarkerByType]
|
|
@@ -24972,7 +25251,7 @@ function EmbeddableChatInner({
|
|
|
24972
25251
|
}, []);
|
|
24973
25252
|
const closeContextPicker = _react.useCallback.call(void 0, () => {
|
|
24974
25253
|
if (mentionActiveRef.current) {
|
|
24975
|
-
_optionalChain([chatInputRef, 'access',
|
|
25254
|
+
_optionalChain([chatInputRef, 'access', _843 => _843.current, 'optionalAccess', _844 => _844.removeMentionTrigger, 'call', _845 => _845()]);
|
|
24976
25255
|
}
|
|
24977
25256
|
setContextPickerOpen(false);
|
|
24978
25257
|
setMentionQuery(null);
|
|
@@ -25006,8 +25285,8 @@ function EmbeddableChatInner({
|
|
|
25006
25285
|
[effectiveAssistantIcon]
|
|
25007
25286
|
);
|
|
25008
25287
|
const [timestampCache] = _react.useState.call(void 0, () => /* @__PURE__ */ new Map());
|
|
25009
|
-
const guideUserName = activeMode === "guide" ? [_optionalChain([identityUser, 'optionalAccess',
|
|
25010
|
-
const guideUserAvatar = activeMode === "guide" ? _optionalChain([identityUser, 'optionalAccess',
|
|
25288
|
+
const guideUserName = activeMode === "guide" ? [_optionalChain([identityUser, 'optionalAccess', _846 => _846.firstName]), _optionalChain([identityUser, 'optionalAccess', _847 => _847.lastName])].filter(Boolean).join(" ").trim() || _optionalChain([identityUser, 'optionalAccess', _848 => _848.name, 'optionalAccess', _849 => _849.trim, 'call', _850 => _850()]) || void 0 : void 0;
|
|
25289
|
+
const guideUserAvatar = activeMode === "guide" ? _optionalChain([identityUser, 'optionalAccess', _851 => _851.avatarUrl, 'optionalAccess', _852 => _852.trim, 'call', _853 => _853()]) || void 0 : void 0;
|
|
25011
25290
|
const messages = _react.useMemo.call(void 0, () => {
|
|
25012
25291
|
const options = { userName: guideUserName, userAvatar: guideUserAvatar, timestampCache };
|
|
25013
25292
|
const mapped = rawMessages.map((m) => mapHostMessage(m, options));
|
|
@@ -25181,7 +25460,7 @@ function EmbeddableChatInner({
|
|
|
25181
25460
|
_react.useEffect.call(void 0, () => {
|
|
25182
25461
|
if (!panelBoundary || typeof ResizeObserver === "undefined") return void 0;
|
|
25183
25462
|
const ro = new ResizeObserver((entries) => {
|
|
25184
|
-
const w = _optionalChain([entries, 'access',
|
|
25463
|
+
const w = _optionalChain([entries, 'access', _854 => _854[0], 'optionalAccess', _855 => _855.contentRect, 'optionalAccess', _856 => _856.width]);
|
|
25185
25464
|
if (typeof w === "number") setPanelWidth(w);
|
|
25186
25465
|
});
|
|
25187
25466
|
ro.observe(panelBoundary);
|
|
@@ -25225,17 +25504,17 @@ function EmbeddableChatInner({
|
|
|
25225
25504
|
const stackedListView = isMingoMode && !hasConversation && !archiveOpen && !wideMingo && !composeOpen && !emptyListSkipped;
|
|
25226
25505
|
const headerShowBack = hasConversation || guideCanReturnToMingo;
|
|
25227
25506
|
const freshConversationTitle = isGuideEmpty ? _nullishCoalesce(headerAssistantName, () => ( "Mingo Guide")) : "New Chat";
|
|
25228
|
-
const headerTitle = hasConversation ? _optionalChain([activeDialog, 'optionalAccess',
|
|
25507
|
+
const headerTitle = hasConversation ? _optionalChain([activeDialog, 'optionalAccess', _857 => _857.title]) || freshConversationTitle : isGuideEmpty ? freshConversationTitle : "Current Chats";
|
|
25229
25508
|
const headerBackAriaLabel = hasConversation ? isViewingArchived ? "Back to archive" : "Back" : "Back to Mingo";
|
|
25230
25509
|
const headerOnBack = hasConversation ? handleBack : () => handleActiveModeChange("mingo");
|
|
25231
25510
|
const headerOnRestore = isViewingArchived && unarchiveDialog && activeDialog ? () => setRestoreTarget(activeDialog) : void 0;
|
|
25232
25511
|
const headerOnRename = activeDialogId && activeDialog && mingoCaps.canRename ? () => setRenameTarget(activeDialog) : void 0;
|
|
25233
25512
|
const headerOnArchive = activeDialogId && activeDialog && mingoCaps.canArchive ? () => setArchiveTarget(activeDialog) : void 0;
|
|
25234
|
-
const headerOnCopyLink = activeDialogId && activeDialog && mingoCaps.onCopyLink ? () => _optionalChain([mingoCaps, 'access',
|
|
25513
|
+
const headerOnCopyLink = activeDialogId && activeDialog && mingoCaps.onCopyLink ? () => _optionalChain([mingoCaps, 'access', _858 => _858.onCopyLink, 'optionalCall', _859 => _859(activeDialog)]) : void 0;
|
|
25235
25514
|
const headerOnOpenArchive = fetchArchivedDialogs ? openArchive : void 0;
|
|
25236
|
-
const headerOwner = hasConversation ? _optionalChain([activeDialog, 'optionalAccess',
|
|
25237
|
-
const headerPersonName = _optionalChain([headerOwner, 'optionalAccess',
|
|
25238
|
-
const headerPersonAvatarUrl = headerOwner ? _optionalChain([headerOwner, 'access',
|
|
25515
|
+
const headerOwner = hasConversation ? _optionalChain([activeDialog, 'optionalAccess', _860 => _860.owner]) : void 0;
|
|
25516
|
+
const headerPersonName = _optionalChain([headerOwner, 'optionalAccess', _861 => _861.name, 'optionalAccess', _862 => _862.trim, 'call', _863 => _863()]) || headerUserName;
|
|
25517
|
+
const headerPersonAvatarUrl = headerOwner ? _optionalChain([headerOwner, 'access', _864 => _864.avatarUrl, 'optionalAccess', _865 => _865.trim, 'call', _866 => _866()]) || void 0 : _optionalChain([identityUser, 'optionalAccess', _867 => _867.avatarUrl, 'optionalAccess', _868 => _868.trim, 'call', _869 => _869()]) || _optionalChain([userAvatarUrl, 'optionalAccess', _870 => _870.trim, 'call', _871 => _871()]) || void 0;
|
|
25239
25518
|
const headerAvatar = headerPersonName || headerPersonAvatarUrl ? { name: headerPersonName, avatarUrl: headerPersonAvatarUrl } : void 0;
|
|
25240
25519
|
const handleNewChat = _react.useCallback.call(void 0, () => {
|
|
25241
25520
|
resetToNewChat();
|
|
@@ -25583,9 +25862,9 @@ function EmbeddableChatInner({
|
|
|
25583
25862
|
subtitle: _nullishCoalesce(effectiveGreeting, () => ( void 0)),
|
|
25584
25863
|
subtitleLoading: emptyStateLoading,
|
|
25585
25864
|
...guideWelcome,
|
|
25586
|
-
title: _nullishCoalesce(effectiveAssistantName, () => ( _optionalChain([guideWelcome, 'optionalAccess',
|
|
25587
|
-
icon: _nullishCoalesce(effectiveAssistantIcon, () => ( _optionalChain([guideWelcome, 'optionalAccess',
|
|
25588
|
-
quickActions: agentConfigUrl && guideSuggestedActions.length > 0 ? guideSuggestedActions : _nullishCoalesce(_optionalChain([guideWelcome, 'optionalAccess',
|
|
25865
|
+
title: _nullishCoalesce(effectiveAssistantName, () => ( _optionalChain([guideWelcome, 'optionalAccess', _872 => _872.title]))),
|
|
25866
|
+
icon: _nullishCoalesce(effectiveAssistantIcon, () => ( _optionalChain([guideWelcome, 'optionalAccess', _873 => _873.icon]))),
|
|
25867
|
+
quickActions: agentConfigUrl && guideSuggestedActions.length > 0 ? guideSuggestedActions : _nullishCoalesce(_optionalChain([guideWelcome, 'optionalAccess', _874 => _874.quickActions]), () => ( guideSuggestedActions)),
|
|
25589
25868
|
onQuickAction: (action) => {
|
|
25590
25869
|
setQuickActionPreview(null);
|
|
25591
25870
|
handleSend(_nullishCoalesce(action.prompt, () => ( action.label)));
|
|
@@ -25659,8 +25938,8 @@ function EmbeddableChatInner({
|
|
|
25659
25938
|
selectedContextItems: contextItems,
|
|
25660
25939
|
onToggleContextItem: toggleContextItem,
|
|
25661
25940
|
onRemoveContextItem: removeContextItem,
|
|
25662
|
-
contextMemoryItems: _optionalChain([contextMemory, 'optionalAccess',
|
|
25663
|
-
onRemoveContextMemoryItem: _optionalChain([contextMemory, 'optionalAccess',
|
|
25941
|
+
contextMemoryItems: _optionalChain([contextMemory, 'optionalAccess', _875 => _875.items]),
|
|
25942
|
+
onRemoveContextMemoryItem: _optionalChain([contextMemory, 'optionalAccess', _876 => _876.onRemove]),
|
|
25664
25943
|
contextPickerOpen,
|
|
25665
25944
|
onOpenContextPicker: openContextPicker,
|
|
25666
25945
|
onCloseContextPicker: closeContextPicker,
|
|
@@ -26137,5 +26416,11 @@ function EmbeddableChatInner({
|
|
|
26137
26416
|
|
|
26138
26417
|
|
|
26139
26418
|
|
|
26140
|
-
exports.FloatingTooltip = FloatingTooltip; exports.tagVariants = tagVariants; exports.Tag = Tag; exports.formatTicketRelativeTime = formatTicketRelativeTime; exports.formatTicketFullTimestamp = formatTicketFullTimestamp; exports.formatRelativeTime = formatRelativeTime; exports.formatAbsoluteDate = formatAbsoluteDate; exports.formatDateTime = formatDateTime; exports.getDetailedTimeDifference = getDetailedTimeDifference; exports.isToday = isToday; exports.isWithinMinutes = isWithinMinutes; exports.createUTCTimestamp = createUTCTimestamp; exports.DESIGN_PALETTE = DESIGN_PALETTE; exports.getContrastRatio = getContrastRatio; exports.pickReadableTextColor = pickReadableTextColor; exports.extractDominantColor = extractDominantColor; exports.getBestContrastColor = getBestContrastColor; exports.analyzeImageColor = analyzeImageColor; exports.extractImageEdgeColorAsync = extractImageEdgeColorAsync; exports.getCurrentPlatform = getCurrentPlatform; exports.switchPlatformTheme = switchPlatformTheme; exports.getSemanticColor = getSemanticColor; exports.getPlatformConfig = getPlatformConfig; exports.usePlatformColors = usePlatformColors; exports.getReadableTextColor = getReadableTextColor; exports.HEX_PATTERN = HEX_PATTERN; exports.hexToRgb = hexToRgb2; exports.rgbToHex = rgbToHex; exports.deriveHoverColor = deriveHoverColor; exports.deriveActiveColor = deriveActiveColor; exports.rgbToHsl = rgbToHsl; exports.hslToRgb = hslToRgb; exports.ActionsMenu = ActionsMenu; exports.ActionsMenuDropdown = ActionsMenuDropdown; exports.ColorSwatch = ColorSwatch; exports.TooltipProvider = TooltipProvider; exports.Tooltip = Tooltip; exports.TooltipTrigger = TooltipTrigger; exports.TooltipContent = TooltipContent; exports.resolveTicketStatus = resolveTicketStatus; exports.getTicketStatusConfig = getTicketStatusConfig; exports.getTicketStatusTag = getTicketStatusTag; exports.kindToCanonicalStatus = kindToCanonicalStatus; exports.usesCanonicalStatusStyle = usesCanonicalStatusStyle; exports.resolveStatusTagProps = resolveStatusTagProps; exports.TicketStatusTag = TicketStatusTag; exports.useScrollFade = useScrollFade; exports.ScrollFadeOverlay = ScrollFadeOverlay; exports.ScrollShadow = ScrollShadow; exports.Modal = Modal; exports.ModalContent = ModalContent; exports.ModalTwoColumn = ModalTwoColumn; exports.ModalHeader = ModalHeader; exports.ModalTitle = ModalTitle; exports.ModalFooter = ModalFooter; exports.OVERLAY_BACKDROP_CLASS = OVERLAY_BACKDROP_CLASS; exports.Drawer = Drawer; exports.DrawerTrigger = DrawerTrigger; exports.DrawerClose = DrawerClose; exports.DrawerPortal = DrawerPortal; exports.DrawerOverlay = DrawerOverlay; exports.DrawerContent = DrawerContent; exports.DrawerHeader = DrawerHeader; exports.DrawerTitle = DrawerTitle; exports.DrawerDescription = DrawerDescription; exports.DrawerBody = DrawerBody; exports.DrawerFooter = DrawerFooter; exports.Tabs = Tabs; exports.TabsList = TabsList; exports.TabsTrigger = TabsTrigger; exports.TabsContent = TabsContent; exports.stripInlineMarkdown = stripInlineMarkdown; exports.markdownToPlainText = markdownToPlainText; exports.buildHeadingIdMap = buildHeadingIdMap; exports.useHeadingIdMap = useHeadingIdMap; exports.extractText = extractText; exports.useIsHydrated = useIsHydrated; exports.MermaidDiagram = MermaidDiagram; exports.hasRenderableSrc = hasRenderableSrc; exports.buildStandardLeafRenderers = buildStandardLeafRenderers; exports.SAFE_HTML_TAGS = SAFE_HTML_TAGS; exports.SVG_TAGS = SVG_TAGS; exports.buildEffectiveTagSet = buildEffectiveTagSet; exports.buildSanitizeSchema = buildSanitizeSchema; exports.rehypeStripUnsafe = rehypeStripUnsafe; exports.escapeUnknownHtmlTags = escapeUnknownHtmlTags; exports.cardAwareUrlTransform = cardAwareUrlTransform; exports.splitStreamingBlocks = splitStreamingBlocks; exports.completeStreamingTail = completeStreamingTail; exports.TEXT_SIZE_PRESETS = TEXT_SIZE_PRESETS; exports.resolveTextSizeConfig = resolveTextSizeConfig; exports.NO_BROKEN_LINKS = NO_BROKEN_LINKS; exports.MarkdownEngine = MarkdownEngine; exports.SimpleMarkdownRenderer = SimpleMarkdownRenderer; exports.fetchPriorityProp = fetchPriorityProp; exports.MUX_STREAM_ORIGIN = MUX_STREAM_ORIGIN; exports.MUX_IMAGE_ORIGIN = MUX_IMAGE_ORIGIN; exports.saveDataEnabled = saveDataEnabled; exports.useVideoOriginPreconnect = useVideoOriginPreconnect; exports.useVideoWarmup = useVideoWarmup; exports.VideoPlayBadge = VideoPlayBadge; exports.VideoUnmuteGlyph = VideoUnmuteGlyph; exports.extractYouTubeId = extractYouTubeId; exports.VIDEO_PLAYBACK_FAILED_EVENT = VIDEO_PLAYBACK_FAILED_EVENT; exports.Video = Video2; exports.HoverDropdown = HoverDropdown; exports.ExpandChevron = ExpandChevron; exports.useCollapsible = useCollapsible; exports.getCommandText = getCommandText; exports.ArgRow = ArgRow; exports.ResultBlock = ResultBlock; exports.CommandBlock = CommandBlock; exports.ApprovalStatusTag = ApprovalStatusTag; exports.ApprovalBatchMessage = ApprovalBatchMessage; exports.ApprovalRequestMessage = ApprovalRequestMessage; exports.EscalationOfferMessage = EscalationOfferMessage; exports.formatTime = formatTime; exports.AiAssistantInfo = AiAssistantInfo; exports.TicketEscalatedMessage = TicketEscalatedMessage; exports.MESSAGE_TYPE = MESSAGE_TYPE; exports.SCROLL_ANCHOR = SCROLL_ANCHOR; exports.TICKET_EVENT_KIND = TICKET_EVENT_KIND; exports.TicketEventMessage = TicketEventMessage; exports.ContextCompactionDisplay = ContextCompactionDisplay; exports.ThinkingDisplay = ThinkingDisplay; exports.AskDisplay = AskDisplay; exports.ErrorMessageDisplay = ErrorMessageDisplay; exports.MspOrganizationCard = MspOrganizationCard; exports.MspOrganizationCardSkeleton = MspOrganizationCardSkeleton; exports.ChatContainer = ChatContainer; exports.ChatHeader = ChatHeader; exports.ChatContent = ChatContent; exports.ChatFooter = ChatFooter; exports.ChatTypingIndicator = ChatTypingIndicator; exports.MingoOnboardingCard = MingoOnboardingCard; exports.ICON_REGISTRY = ICON_REGISTRY; exports.normalizeIconKey = normalizeIconKey; exports.getIconComponent = getIconComponent; exports.getDynamicIcon = getDynamicIcon; exports.ICON_ALIASES = ICON_ALIASES; exports.resolveIcon = resolveIcon; exports.ICON_OPTIONS = ICON_OPTIONS; exports.SlashCommandSuggestions = SlashCommandSuggestions; exports.ChatInput = ChatInput; exports.CONTEXT_ROW_CLASS = CONTEXT_ROW_CLASS; exports.CONTEXT_ICON_CLASS = CONTEXT_ICON_CLASS; exports.CONTEXT_LABEL_CLASS = CONTEXT_LABEL_CLASS; exports.CONTEXT_BACK_CLASS = CONTEXT_BACK_CLASS; exports.CONTEXT_STATE_CLASS = CONTEXT_STATE_CLASS; exports.ContextMenuRow = ContextMenuRow; exports.ContextItemsSkeleton = ContextItemsSkeleton; exports.ContextItemsList = ContextItemsList; exports.ContextErrorBoundary = ContextErrorBoundary; exports.CHAT_CONTEXT_ITEMS_DEFAULT_MAX = CHAT_CONTEXT_ITEMS_DEFAULT_MAX; exports.ChatComposerPlusMenu = ChatComposerPlusMenu; exports.ChatContextPicker = ChatContextPicker; exports.ChatContextChipStrip = ChatContextChipStrip; exports.BlockCard = BlockCard; exports.remarkCardLinks = remarkCardLinks; exports.remarkMentionChips = remarkMentionChips; exports.ToolExecutionDisplay = ToolExecutionDisplay; exports.MemoizedChatMessageEnhanced = MemoizedChatMessageEnhanced; exports.ChatMessageSkeleton = ChatMessageSkeleton; exports.ChatMessageListSkeleton = ChatMessageListSkeleton; exports.ChatMessageList = ChatMessageList; exports.useProxiedImageUrl = useProxiedImageUrl; exports.ChatMessageRow = ChatMessageRow; exports.ChatMessageRowSkeleton = ChatMessageRowSkeleton; exports.FAE_AVATAR_DATA_URI = FAE_AVATAR_DATA_URI; exports.AgentMark = AgentMark; exports.EntityIcon = EntityIcon; exports.getAgentAccent = getAgentAccent; exports.accentFromIdentityIcon = accentFromIdentityIcon; exports.isQuickActionIconSpec = isQuickActionIconSpec; exports.renderQuickActionIcon = renderQuickActionIcon; exports.QuickActionChipSkeleton = QuickActionChipSkeleton; exports.QuickActionChipButton = QuickActionChipButton; exports.QuickActionChipFromData = QuickActionChipFromData; exports.useMarqueeSync = useMarqueeSync; exports.getMarqueeTrackOffset = getMarqueeTrackOffset; exports.getMarqueeAppliedOffset = getMarqueeAppliedOffset; exports.getMarqueeCloneTwin = getMarqueeCloneTwin; exports.MarqueeWallFades = MarqueeWallFades; exports.MarqueeWall = MarqueeWall; exports.WALL_SKELETON_LABEL_CH = WALL_SKELETON_LABEL_CH; exports.interleave = interleave; exports.QuickActionWall = QuickActionWall; exports.QuickActionMarquee = QuickActionMarquee; exports.ChatTicketItem = ChatTicketItem; exports.ChatTicketList = ChatTicketList; exports.MingoOnboardingCardSkeleton = MingoOnboardingCardSkeleton; exports.MingoOnboardingListSkeleton = MingoOnboardingListSkeleton; exports.MingoChatHistorySkeleton = MingoChatHistorySkeleton; exports.MingoChatHistory = MingoChatHistory; exports.MingoWelcome = MingoWelcome; exports.GuideWelcome = GuideWelcome; exports.GuideModeBanner = GuideModeBanner; exports.TabSelector = TabSelector; exports.MingoHistoryRail = MingoHistoryRail; exports.RenameChatModal = RenameChatModal; exports.ArchiveChatModal = ArchiveChatModal; exports.UnarchiveChatModal = UnarchiveChatModal; exports.ChatDialogModals = ChatDialogModals; exports.ChatHeaderIconButton = ChatHeaderIconButton; exports.ChatHeaderSearchField = ChatHeaderSearchField; exports.ChatPanelHeader = ChatPanelHeader; exports.CHAT_ATTACHMENT_VIEW_URL_PREFIX = CHAT_ATTACHMENT_VIEW_URL_PREFIX; exports.CHAT_ATTACHMENT_VIEW_TOKEN_QUERY_PARAM = CHAT_ATTACHMENT_VIEW_TOKEN_QUERY_PARAM; exports.ANTHROPIC_SUPPORTED_IMAGE_MIME = ANTHROPIC_SUPPORTED_IMAGE_MIME; exports.buildChatAttachmentViewUrl = buildChatAttachmentViewUrl; exports.escapeMarkdownInline = escapeMarkdownInline; exports.formatChatAttachmentMarkdownForBubble = formatChatAttachmentMarkdownForBubble; exports.CHAT_ATTACHMENT_VIEW_URL_PREFIX_REGEX_ESCAPED = CHAT_ATTACHMENT_VIEW_URL_PREFIX_REGEX_ESCAPED; exports.CHAT_ATTACHMENT_MARKDOWN_PATTERN = CHAT_ATTACHMENT_MARKDOWN_PATTERN; exports.stripChatAttachmentMarkdown = stripChatAttachmentMarkdown; exports.CHAT_ATTACHMENT_MIME_TYPES = CHAT_ATTACHMENT_MIME_TYPES; exports.CHAT_ATTACHMENT_CONCURRENT_UPLOADS_PER_USER = CHAT_ATTACHMENT_CONCURRENT_UPLOADS_PER_USER; exports.ChatAttachmentAddButton = ChatAttachmentAddButton; exports.ChatAttachmentChipStrip = ChatAttachmentChipStrip; exports.ChatContextMemoryBar = ChatContextMemoryBar; exports.HoverCard = HoverCard; exports.HoverCardTrigger = HoverCardTrigger; exports.HoverCardContent = HoverCardContent; exports.ModelDisplay = ModelDisplay; exports.ModelDisplaySkeleton = ModelDisplaySkeleton; exports.ChatComposer = ChatComposer; exports.ChatArchivePage = ChatArchivePage; exports.DialogListItem = DialogListItem; exports.ChatSidebar = ChatSidebar; exports.NEW_TAB_FEATURES = NEW_TAB_FEATURES; exports.isModifierClick = isModifierClick; exports.stripSameOriginToPath = stripSameOriginToPath; exports.resolveExternalNavigation = resolveExternalNavigation; exports.executeNavigation = executeNavigation; exports.executeNavigationImperative = executeNavigationImperative; exports.handleChatNavClick = handleChatNavClick; exports.NavLinkAnchorViaRuntime = NavLinkAnchorViaRuntime; exports.SourceActionButton = SourceActionButton; exports.ADMIN_CONTENT_CARD_GRID_CLASS = ADMIN_CONTENT_CARD_GRID_CLASS; exports.AdminContentCardSkeleton = AdminContentCardSkeleton; exports.AdminContentCardGrid = AdminContentCardGrid; exports.getCaptionsUrl = getCaptionsUrl; exports.rebaseCaptionsUrl = rebaseCaptionsUrl; exports.buildCaptionsUrl = buildCaptionsUrl; exports.getEntityCaptionUrls = getEntityCaptionUrls; exports.getEntityCaptionUrlsById = getEntityCaptionUrlsById; exports.captionsEntityTypeForDocType = captionsEntityTypeForDocType; exports.PAGE_HEADING_CLASS = PAGE_HEADING_CLASS; exports.SECTION_HEADING_CLASS = SECTION_HEADING_CLASS; exports.PageHeading = PageHeading; exports.useCaptions = useCaptions; exports.UserDisplay = UserDisplay; exports.CardHitLayer = CardHitLayer; exports.STRIP_CELL_MAX_WIDTH = STRIP_CELL_MAX_WIDTH; exports.CardsStrip = CardsStrip; exports.VideoHoverPreviewSurface = VideoHoverPreviewSurface; exports.RATIO_GRID_CLASS = RATIO_GRID_CLASS; exports.RATIO_TO_CSS_ASPECT = RATIO_TO_CSS_ASPECT; exports.RatioTabs = RatioTabs; exports.detectAspectRatio = detectAspectRatio; exports.ratioToCategory = ratioToCategory; exports.groupByAspectRatio = groupByAspectRatio; exports.VideoBitesStrip = VideoBitesStrip; exports.VideoBiteCard = VideoBiteCard; exports.EntityVideoSection = EntityVideoSection; exports.ChatVideoEntityCard = ChatVideoEntityCard; exports.GitHubActivityCard = GitHubActivityCard; exports.GitHubActivityCardSkeleton = GitHubActivityCardSkeleton; exports.SlackMessageCard = SlackMessageCard; exports.SlackMessageCardSkeleton = SlackMessageCardSkeleton; exports.HubspotTicketCard = HubspotTicketCard; exports.HubspotTicketCardSkeleton = HubspotTicketCardSkeleton; exports.DataRoomDocCard = DataRoomDocCard; exports.DataRoomDocCardSkeleton = DataRoomDocCardSkeleton; exports.CampaignCardAdmin = CampaignCardAdmin; exports.CampaignCardAdminSkeleton = CampaignCardAdminSkeleton; exports.GenericEntityCard = GenericEntityCard; exports.GenericEntityCardSkeleton = GenericEntityCardSkeleton; exports.faqSectionSlug = faqSectionSlug; exports.faqItemAnchor = faqItemAnchor; exports.parseFaqHash = parseFaqHash; exports.useChatCardItem = useChatCardItem; exports.clickupTaskUrl = clickupTaskUrl; exports.readFetchedCardTitle = readFetchedCardTitle; exports.resolveFetchedCardHref = resolveFetchedCardHref; exports.SOURCE_ICON_NAMES = SOURCE_ICON_NAMES; exports.getSourceIconName = getSourceIconName; exports.SOURCE_LABELS_BY_TABLE = SOURCE_LABELS_BY_TABLE; exports.getSourceLabel = getSourceLabel; exports.DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID = DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID; exports.defaultTableIdForDocumentType = defaultTableIdForDocumentType; exports.byKey = byKey; exports.getPlatformProductionUrl = getPlatformProductionUrl; exports.getPlatformUrl = getPlatformUrl; exports.getDeploymentUrl = getDeploymentUrl; exports.isLocalUrl = isLocalUrl; exports.getRequestOrigin = getRequestOrigin; exports.resolveRedirectTarget = resolveRedirectTarget; exports.getAllPlatformBaseDomains = getAllPlatformBaseDomains; exports.resolveSourceRowCTA = resolveSourceRowCTA; exports.resolveSourceIcon = resolveSourceIcon; exports.chatCardLabel = chatCardLabel; exports.ChatCardLoader = ChatCardLoader; exports.renderChatInlineEntityCard = renderChatInlineEntityCard; exports.CHAT_TYPE = CHAT_TYPE; exports.OWNER_TYPE = OWNER_TYPE; exports.MESSAGE_ROLE = MESSAGE_ROLE; exports.ASSISTANT_TYPE = ASSISTANT_TYPE; exports.AUTHOR_TYPE = AUTHOR_TYPE; exports.APPROVAL_STATUS = APPROVAL_STATUS; exports.APPROVAL_BLOCK_VARIANT = APPROVAL_BLOCK_VARIANT; exports.CONNECTION_STATUS = CONNECTION_STATUS; exports.isStructuredContent = isStructuredContent; exports.normalizeContent = normalizeContent2; exports.NETWORK_CONFIG = NETWORK_CONFIG; exports.EMPTY_DIALOG_CAPABILITIES = EMPTY_DIALOG_CAPABILITIES; exports.useChunkCatchup = useChunkCatchup; exports.useScriptedStream = useScriptedStream; exports.RESYNC_AFTER_HIDDEN_MS = RESYNC_AFTER_HIDDEN_MS; exports.useJetStreamDialogSubscription = useJetStreamDialogSubscription; exports.useNatsDialogSubscription = useNatsDialogSubscription; exports.buildNatsWsUrl = buildNatsWsUrl; exports.fetchSlashCommands = fetchSlashCommands; exports.useSlashCommands = useSlashCommands; exports.useSlashCommandRegistry = useSlashCommandRegistry; exports.fetchEmptyStateConfig = fetchEmptyStateConfig; exports.useEmptyStateConfig = useEmptyStateConfig; exports.useChatAttachments = useChatAttachments; exports.useChatAttachmentImageGallery = useChatAttachmentImageGallery; exports.ChatIdentityProvider = ChatIdentityProvider; exports.useChatIdentity = useChatIdentity; exports.useCloseOnNavigation = useCloseOnNavigation; exports.useSSE = useSSE; exports.useChat = useChat; exports.approvalDisplaysInline = approvalDisplaysInline; exports.appendToTrailingAssistant = appendToTrailingAssistant; exports.upsertTrailingCompaction = upsertTrailingCompaction; exports.applyToolExecutionToMessages = applyToolExecutionToMessages; exports.MessageSegmentAccumulator = MessageSegmentAccumulator; exports.createMessageSegmentAccumulator = createMessageSegmentAccumulator; exports.SCROLL_ANCHOR_WIRE_KEY = SCROLL_ANCHOR_WIRE_KEY; exports.parseScrollAnchor = parseScrollAnchor; exports.createEmptyTurnMeta = createEmptyTurnMeta; exports.createChatStreamReducer = createChatStreamReducer; exports.DEFAULT_DIALOG_SIDE = DEFAULT_DIALOG_SIDE; exports.DEFAULT_MAX_REDUCERS = DEFAULT_MAX_REDUCERS; exports.MAX_PENDING_RETAIN_KEYS = MAX_PENDING_RETAIN_KEYS; exports.createChatDialogStore = createChatDialogStore; exports.createDeltaBatcher = createDeltaBatcher; exports.useChatStreamReducer = useChatStreamReducer; exports.createChatConversationsApi = createChatConversationsApi; exports.parseWireCommandOverride = parseWireCommandOverride; exports.sanitizeTitleForChat = sanitizeTitleForChat; exports.formatSingularLookupInvocation = formatSingularLookupInvocation; exports.extractEntityIdFilter = extractEntityIdFilter; exports.buildDiscussAddendum = buildDiscussAddendum; exports.buildDiscussPrompt = buildDiscussPrompt; exports.AUTO_CONTINUATION_DIRECTIVE_PREFIX = AUTO_CONTINUATION_DIRECTIVE_PREFIX; exports.buildAutoContinuationDirective = buildAutoContinuationDirective; exports.useManagedDialogList = useManagedDialogList; exports.useSseChatAdapter = useSseChatAdapter; exports.extractIncompleteMessageState = extractIncompleteMessageState; exports.extractIncompleteTailState = extractIncompleteTailState; exports.decodeHistoricalMessageData = decodeHistoricalMessageData; exports.processHistoricalMessages = processHistoricalMessages; exports.extractErrorMessages = extractErrorMessages; exports.processHistoricalMessagesWithErrors = processHistoricalMessagesWithErrors; exports.mapProcessedToUnified = mapProcessedToUnified; exports.historicalToUnified = historicalToUnified; exports.useNatsChatAdapter = useNatsChatAdapter; exports.useStableShallow = useStableShallow; exports.useUnifiedChat = useUnifiedChat; exports.SYNTHETIC_REALTIME_ID_PREFIXES = SYNTHETIC_REALTIME_ID_PREFIXES; exports.flattenMessagePagesChronological = flattenMessagePagesChronological; exports.maxPersistedStreamSeq = maxPersistedStreamSeq; exports.mergeHistoryWithRealtime = mergeHistoryWithRealtime; exports.computeHistoryPrepend = computeHistoryPrepend; exports.CHIP_ACTION_BUTTON_CLASS = CHIP_ACTION_BUTTON_CLASS; exports.chatChipClass = chatChipClass; exports.flattenAssistantContent = flattenAssistantContent; exports.normalizeHistoricalMessageData = normalizeHistoricalMessageData; exports.isHistoricalUserTurn = isHistoricalUserTurn; exports.buildStreamFrames = buildStreamFrames; exports.EmbeddableChat = EmbeddableChat;
|
|
26141
|
-
|
|
26419
|
+
|
|
26420
|
+
|
|
26421
|
+
|
|
26422
|
+
|
|
26423
|
+
|
|
26424
|
+
|
|
26425
|
+
exports.FloatingTooltip = FloatingTooltip; exports.tagVariants = tagVariants; exports.Tag = Tag; exports.formatTicketRelativeTime = formatTicketRelativeTime; exports.formatTicketFullTimestamp = formatTicketFullTimestamp; exports.formatRelativeTime = formatRelativeTime; exports.formatAbsoluteDate = formatAbsoluteDate; exports.formatDateTime = formatDateTime; exports.getDetailedTimeDifference = getDetailedTimeDifference; exports.isToday = isToday; exports.isWithinMinutes = isWithinMinutes; exports.createUTCTimestamp = createUTCTimestamp; exports.DESIGN_PALETTE = DESIGN_PALETTE; exports.getContrastRatio = getContrastRatio; exports.pickReadableTextColor = pickReadableTextColor; exports.extractDominantColor = extractDominantColor; exports.getBestContrastColor = getBestContrastColor; exports.analyzeImageColor = analyzeImageColor; exports.extractImageEdgeColorAsync = extractImageEdgeColorAsync; exports.getCurrentPlatform = getCurrentPlatform; exports.switchPlatformTheme = switchPlatformTheme; exports.getSemanticColor = getSemanticColor; exports.getPlatformConfig = getPlatformConfig; exports.usePlatformColors = usePlatformColors; exports.getReadableTextColor = getReadableTextColor; exports.HEX_PATTERN = HEX_PATTERN; exports.hexToRgb = hexToRgb2; exports.rgbToHex = rgbToHex; exports.deriveHoverColor = deriveHoverColor; exports.deriveActiveColor = deriveActiveColor; exports.rgbToHsl = rgbToHsl; exports.hslToRgb = hslToRgb; exports.ActionsMenu = ActionsMenu; exports.ActionsMenuDropdown = ActionsMenuDropdown; exports.ColorSwatch = ColorSwatch; exports.TooltipProvider = TooltipProvider; exports.Tooltip = Tooltip; exports.TooltipTrigger = TooltipTrigger; exports.TooltipContent = TooltipContent; exports.resolveTicketStatus = resolveTicketStatus; exports.getTicketStatusConfig = getTicketStatusConfig; exports.getTicketStatusTag = getTicketStatusTag; exports.kindToCanonicalStatus = kindToCanonicalStatus; exports.usesCanonicalStatusStyle = usesCanonicalStatusStyle; exports.resolveStatusTagProps = resolveStatusTagProps; exports.TicketStatusTag = TicketStatusTag; exports.useScrollFade = useScrollFade; exports.ScrollFadeOverlay = ScrollFadeOverlay; exports.ScrollShadow = ScrollShadow; exports.Modal = Modal; exports.ModalContent = ModalContent; exports.ModalTwoColumn = ModalTwoColumn; exports.ModalHeader = ModalHeader; exports.ModalTitle = ModalTitle; exports.ModalFooter = ModalFooter; exports.OVERLAY_BACKDROP_CLASS = OVERLAY_BACKDROP_CLASS; exports.Drawer = Drawer; exports.DrawerTrigger = DrawerTrigger; exports.DrawerClose = DrawerClose; exports.DrawerPortal = DrawerPortal; exports.DrawerOverlay = DrawerOverlay; exports.DrawerContent = DrawerContent; exports.DrawerHeader = DrawerHeader; exports.DrawerTitle = DrawerTitle; exports.DrawerDescription = DrawerDescription; exports.DrawerBody = DrawerBody; exports.DrawerFooter = DrawerFooter; exports.Tabs = Tabs; exports.TabsList = TabsList; exports.TabsTrigger = TabsTrigger; exports.TabsContent = TabsContent; exports.stripInlineMarkdown = stripInlineMarkdown; exports.markdownToPlainText = markdownToPlainText; exports.buildHeadingIdMap = buildHeadingIdMap; exports.useHeadingIdMap = useHeadingIdMap; exports.extractText = extractText; exports.useIsHydrated = useIsHydrated; exports.MermaidDiagram = MermaidDiagram; exports.hasRenderableSrc = hasRenderableSrc; exports.buildStandardLeafRenderers = buildStandardLeafRenderers; exports.SAFE_HTML_TAGS = SAFE_HTML_TAGS; exports.SVG_TAGS = SVG_TAGS; exports.buildEffectiveTagSet = buildEffectiveTagSet; exports.buildSanitizeSchema = buildSanitizeSchema; exports.rehypeStripUnsafe = rehypeStripUnsafe; exports.escapeUnknownHtmlTags = escapeUnknownHtmlTags; exports.cardAwareUrlTransform = cardAwareUrlTransform; exports.splitStreamingBlocks = splitStreamingBlocks; exports.completeStreamingTail = completeStreamingTail; exports.TEXT_SIZE_PRESETS = TEXT_SIZE_PRESETS; exports.resolveTextSizeConfig = resolveTextSizeConfig; exports.NO_BROKEN_LINKS = NO_BROKEN_LINKS; exports.MarkdownEngine = MarkdownEngine; exports.SimpleMarkdownRenderer = SimpleMarkdownRenderer; exports.fetchPriorityProp = fetchPriorityProp; exports.MUX_STREAM_ORIGIN = MUX_STREAM_ORIGIN; exports.MUX_IMAGE_ORIGIN = MUX_IMAGE_ORIGIN; exports.saveDataEnabled = saveDataEnabled; exports.useVideoOriginPreconnect = useVideoOriginPreconnect; exports.useVideoWarmup = useVideoWarmup; exports.VideoPlayBadge = VideoPlayBadge; exports.VideoUnmuteGlyph = VideoUnmuteGlyph; exports.extractYouTubeId = extractYouTubeId; exports.VIDEO_PLAYBACK_FAILED_EVENT = VIDEO_PLAYBACK_FAILED_EVENT; exports.Video = Video2; exports.HoverDropdown = HoverDropdown; exports.ExpandChevron = ExpandChevron; exports.useCollapsible = useCollapsible; exports.getCommandText = getCommandText; exports.ArgRow = ArgRow; exports.ResultBlock = ResultBlock; exports.CommandBlock = CommandBlock; exports.ApprovalStatusTag = ApprovalStatusTag; exports.ApprovalBatchMessage = ApprovalBatchMessage; exports.ApprovalRequestMessage = ApprovalRequestMessage; exports.EscalationOfferMessage = EscalationOfferMessage; exports.formatTime = formatTime; exports.AiAssistantInfo = AiAssistantInfo; exports.TicketEscalatedMessage = TicketEscalatedMessage; exports.MESSAGE_TYPE = MESSAGE_TYPE; exports.SCROLL_ANCHOR = SCROLL_ANCHOR; exports.TICKET_EVENT_KIND = TICKET_EVENT_KIND; exports.TicketEventMessage = TicketEventMessage; exports.ContextCompactionDisplay = ContextCompactionDisplay; exports.ThinkingDisplay = ThinkingDisplay; exports.AskDisplay = AskDisplay; exports.ErrorMessageDisplay = ErrorMessageDisplay; exports.MspOrganizationCard = MspOrganizationCard; exports.MspOrganizationCardSkeleton = MspOrganizationCardSkeleton; exports.ChatContainer = ChatContainer; exports.ChatHeader = ChatHeader; exports.ChatContent = ChatContent; exports.ChatFooter = ChatFooter; exports.ChatTypingIndicator = ChatTypingIndicator; exports.MingoOnboardingCard = MingoOnboardingCard; exports.ICON_REGISTRY = ICON_REGISTRY; exports.normalizeIconKey = normalizeIconKey; exports.getIconComponent = getIconComponent; exports.getDynamicIcon = getDynamicIcon; exports.ICON_ALIASES = ICON_ALIASES; exports.resolveIcon = resolveIcon; exports.ICON_OPTIONS = ICON_OPTIONS; exports.SlashCommandSuggestions = SlashCommandSuggestions; exports.ChatInput = ChatInput; exports.CONTEXT_ROW_CLASS = CONTEXT_ROW_CLASS; exports.CONTEXT_ICON_CLASS = CONTEXT_ICON_CLASS; exports.CONTEXT_LABEL_CLASS = CONTEXT_LABEL_CLASS; exports.CONTEXT_BACK_CLASS = CONTEXT_BACK_CLASS; exports.CONTEXT_STATE_CLASS = CONTEXT_STATE_CLASS; exports.ContextMenuRow = ContextMenuRow; exports.ContextItemsSkeleton = ContextItemsSkeleton; exports.ContextItemsList = ContextItemsList; exports.ContextErrorBoundary = ContextErrorBoundary; exports.CHAT_CONTEXT_ITEMS_DEFAULT_MAX = CHAT_CONTEXT_ITEMS_DEFAULT_MAX; exports.ChatComposerPlusMenu = ChatComposerPlusMenu; exports.ChatContextPicker = ChatContextPicker; exports.ChatContextChipStrip = ChatContextChipStrip; exports.BlockCard = BlockCard; exports.remarkCardLinks = remarkCardLinks; exports.remarkMentionChips = remarkMentionChips; exports.ToolExecutionDisplay = ToolExecutionDisplay; exports.MemoizedChatMessageEnhanced = MemoizedChatMessageEnhanced; exports.ChatMessageSkeleton = ChatMessageSkeleton; exports.ChatMessageListSkeleton = ChatMessageListSkeleton; exports.ChatMessageList = ChatMessageList; exports.useProxiedImageUrl = useProxiedImageUrl; exports.ChatMessageRow = ChatMessageRow; exports.ChatMessageRowSkeleton = ChatMessageRowSkeleton; exports.FAE_AVATAR_DATA_URI = FAE_AVATAR_DATA_URI; exports.AgentMark = AgentMark; exports.EntityIcon = EntityIcon; exports.getAgentAccent = getAgentAccent; exports.accentFromIdentityIcon = accentFromIdentityIcon; exports.isQuickActionIconSpec = isQuickActionIconSpec; exports.renderQuickActionIcon = renderQuickActionIcon; exports.QuickActionChipSkeleton = QuickActionChipSkeleton; exports.QuickActionChipButton = QuickActionChipButton; exports.QuickActionChipFromData = QuickActionChipFromData; exports.useMarqueeSync = useMarqueeSync; exports.getMarqueeTrackOffset = getMarqueeTrackOffset; exports.getMarqueeAppliedOffset = getMarqueeAppliedOffset; exports.getMarqueeCloneTwin = getMarqueeCloneTwin; exports.MarqueeWallFades = MarqueeWallFades; exports.MarqueeWall = MarqueeWall; exports.WALL_SKELETON_LABEL_CH = WALL_SKELETON_LABEL_CH; exports.interleave = interleave; exports.QuickActionWall = QuickActionWall; exports.QuickActionMarquee = QuickActionMarquee; exports.ChatTicketItem = ChatTicketItem; exports.ChatTicketList = ChatTicketList; exports.MingoOnboardingCardSkeleton = MingoOnboardingCardSkeleton; exports.MingoOnboardingListSkeleton = MingoOnboardingListSkeleton; exports.MingoChatHistorySkeleton = MingoChatHistorySkeleton; exports.MingoChatHistory = MingoChatHistory; exports.MingoWelcome = MingoWelcome; exports.GuideWelcome = GuideWelcome; exports.GuideModeBanner = GuideModeBanner; exports.TabSelector = TabSelector; exports.MingoHistoryRail = MingoHistoryRail; exports.RenameChatModal = RenameChatModal; exports.ArchiveChatModal = ArchiveChatModal; exports.UnarchiveChatModal = UnarchiveChatModal; exports.ChatDialogModals = ChatDialogModals; exports.ChatHeaderIconButton = ChatHeaderIconButton; exports.ChatHeaderSearchField = ChatHeaderSearchField; exports.ChatPanelHeader = ChatPanelHeader; exports.CHAT_ATTACHMENT_VIEW_URL_PREFIX = CHAT_ATTACHMENT_VIEW_URL_PREFIX; exports.CHAT_ATTACHMENT_VIEW_TOKEN_QUERY_PARAM = CHAT_ATTACHMENT_VIEW_TOKEN_QUERY_PARAM; exports.ANTHROPIC_SUPPORTED_IMAGE_MIME = ANTHROPIC_SUPPORTED_IMAGE_MIME; exports.buildChatAttachmentViewUrl = buildChatAttachmentViewUrl; exports.escapeMarkdownInline = escapeMarkdownInline; exports.formatChatAttachmentMarkdownForBubble = formatChatAttachmentMarkdownForBubble; exports.CHAT_ATTACHMENT_VIEW_URL_PREFIX_REGEX_ESCAPED = CHAT_ATTACHMENT_VIEW_URL_PREFIX_REGEX_ESCAPED; exports.CHAT_ATTACHMENT_MARKDOWN_PATTERN = CHAT_ATTACHMENT_MARKDOWN_PATTERN; exports.stripChatAttachmentMarkdown = stripChatAttachmentMarkdown; exports.CHAT_ATTACHMENT_MIME_TYPES = CHAT_ATTACHMENT_MIME_TYPES; exports.CHAT_ATTACHMENT_CONCURRENT_UPLOADS_PER_USER = CHAT_ATTACHMENT_CONCURRENT_UPLOADS_PER_USER; exports.ChatAttachmentAddButton = ChatAttachmentAddButton; exports.ChatAttachmentChipStrip = ChatAttachmentChipStrip; exports.ChatContextMemoryBar = ChatContextMemoryBar; exports.HoverCard = HoverCard; exports.HoverCardTrigger = HoverCardTrigger; exports.HoverCardContent = HoverCardContent; exports.ModelDisplay = ModelDisplay; exports.ModelDisplaySkeleton = ModelDisplaySkeleton; exports.ChatComposer = ChatComposer; exports.ChatArchivePage = ChatArchivePage; exports.DialogListItem = DialogListItem; exports.ChatSidebar = ChatSidebar; exports.NEW_TAB_FEATURES = NEW_TAB_FEATURES; exports.isModifierClick = isModifierClick; exports.stripSameOriginToPath = stripSameOriginToPath; exports.resolveExternalNavigation = resolveExternalNavigation; exports.executeNavigation = executeNavigation; exports.executeNavigationImperative = executeNavigationImperative; exports.handleChatNavClick = handleChatNavClick; exports.NavLinkAnchorViaRuntime = NavLinkAnchorViaRuntime; exports.SourceActionButton = SourceActionButton; exports.ADMIN_CONTENT_CARD_GRID_CLASS = ADMIN_CONTENT_CARD_GRID_CLASS; exports.AdminContentCardSkeleton = AdminContentCardSkeleton; exports.AdminContentCardGrid = AdminContentCardGrid; exports.getCaptionsUrl = getCaptionsUrl; exports.rebaseCaptionsUrl = rebaseCaptionsUrl; exports.buildCaptionsUrl = buildCaptionsUrl; exports.getEntityCaptionUrls = getEntityCaptionUrls; exports.getEntityCaptionUrlsById = getEntityCaptionUrlsById; exports.captionsEntityTypeForDocType = captionsEntityTypeForDocType; exports.PAGE_HEADING_CLASS = PAGE_HEADING_CLASS; exports.SECTION_HEADING_CLASS = SECTION_HEADING_CLASS; exports.PageHeading = PageHeading; exports.useCaptions = useCaptions; exports.UserDisplay = UserDisplay; exports.CardHitLayer = CardHitLayer; exports.STRIP_CELL_MAX_WIDTH = STRIP_CELL_MAX_WIDTH; exports.CardsStrip = CardsStrip; exports.VideoHoverPreviewSurface = VideoHoverPreviewSurface; exports.RATIO_GRID_CLASS = RATIO_GRID_CLASS; exports.RATIO_TO_CSS_ASPECT = RATIO_TO_CSS_ASPECT; exports.RatioTabs = RatioTabs; exports.detectAspectRatio = detectAspectRatio; exports.ratioToCategory = ratioToCategory; exports.groupByAspectRatio = groupByAspectRatio; exports.VideoBitesStrip = VideoBitesStrip; exports.VideoBiteCard = VideoBiteCard; exports.EntityVideoSection = EntityVideoSection; exports.ChatVideoEntityCard = ChatVideoEntityCard; exports.GitHubActivityCard = GitHubActivityCard; exports.GitHubActivityCardSkeleton = GitHubActivityCardSkeleton; exports.SlackMessageCard = SlackMessageCard; exports.SlackMessageCardSkeleton = SlackMessageCardSkeleton; exports.HubspotTicketCard = HubspotTicketCard; exports.HubspotTicketCardSkeleton = HubspotTicketCardSkeleton; exports.DataRoomDocCard = DataRoomDocCard; exports.DataRoomDocCardSkeleton = DataRoomDocCardSkeleton; exports.CampaignCardAdmin = CampaignCardAdmin; exports.CampaignCardAdminSkeleton = CampaignCardAdminSkeleton; exports.GenericEntityCard = GenericEntityCard; exports.GenericEntityCardSkeleton = GenericEntityCardSkeleton; exports.faqSectionSlug = faqSectionSlug; exports.faqItemAnchor = faqItemAnchor; exports.parseFaqHash = parseFaqHash; exports.useChatCardItem = useChatCardItem; exports.clickupTaskUrl = clickupTaskUrl; exports.readFetchedCardTitle = readFetchedCardTitle; exports.resolveFetchedCardHref = resolveFetchedCardHref; exports.SOURCE_ICON_NAMES = SOURCE_ICON_NAMES; exports.getSourceIconName = getSourceIconName; exports.SOURCE_LABELS_BY_TABLE = SOURCE_LABELS_BY_TABLE; exports.getSourceLabel = getSourceLabel; exports.DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID = DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID; exports.defaultTableIdForDocumentType = defaultTableIdForDocumentType; exports.byKey = byKey; exports.getPlatformProductionUrl = getPlatformProductionUrl; exports.getPlatformUrl = getPlatformUrl; exports.getDeploymentUrl = getDeploymentUrl; exports.isLocalUrl = isLocalUrl; exports.getRequestOrigin = getRequestOrigin; exports.resolveRedirectTarget = resolveRedirectTarget; exports.getAllPlatformBaseDomains = getAllPlatformBaseDomains; exports.DOC_TABLE_TYPES = DOC_TABLE_TYPES; exports.groupsByTable = groupsByTable; exports.recordCountLabel = recordCountLabel; exports.buildGroupedSource = buildGroupedSource; exports.groupSourcesByTable = groupSourcesByTable; exports.formatCitationIndices = formatCitationIndices; exports.resolveSourceRowCTA = resolveSourceRowCTA; exports.resolveSourceIcon = resolveSourceIcon; exports.chatCardLabel = chatCardLabel; exports.ChatCardLoader = ChatCardLoader; exports.renderChatInlineEntityCard = renderChatInlineEntityCard; exports.CHAT_TYPE = CHAT_TYPE; exports.OWNER_TYPE = OWNER_TYPE; exports.MESSAGE_ROLE = MESSAGE_ROLE; exports.ASSISTANT_TYPE = ASSISTANT_TYPE; exports.AUTHOR_TYPE = AUTHOR_TYPE; exports.APPROVAL_STATUS = APPROVAL_STATUS; exports.APPROVAL_BLOCK_VARIANT = APPROVAL_BLOCK_VARIANT; exports.CONNECTION_STATUS = CONNECTION_STATUS; exports.isStructuredContent = isStructuredContent; exports.normalizeContent = normalizeContent2; exports.NETWORK_CONFIG = NETWORK_CONFIG; exports.EMPTY_DIALOG_CAPABILITIES = EMPTY_DIALOG_CAPABILITIES; exports.useChunkCatchup = useChunkCatchup; exports.useScriptedStream = useScriptedStream; exports.RESYNC_AFTER_HIDDEN_MS = RESYNC_AFTER_HIDDEN_MS; exports.useJetStreamDialogSubscription = useJetStreamDialogSubscription; exports.useNatsDialogSubscription = useNatsDialogSubscription; exports.buildNatsWsUrl = buildNatsWsUrl; exports.fetchSlashCommands = fetchSlashCommands; exports.useSlashCommands = useSlashCommands; exports.useSlashCommandRegistry = useSlashCommandRegistry; exports.fetchEmptyStateConfig = fetchEmptyStateConfig; exports.useEmptyStateConfig = useEmptyStateConfig; exports.useChatAttachments = useChatAttachments; exports.useChatAttachmentImageGallery = useChatAttachmentImageGallery; exports.ChatIdentityProvider = ChatIdentityProvider; exports.useChatIdentity = useChatIdentity; exports.useCloseOnNavigation = useCloseOnNavigation; exports.useSSE = useSSE; exports.useChat = useChat; exports.approvalDisplaysInline = approvalDisplaysInline; exports.appendToTrailingAssistant = appendToTrailingAssistant; exports.upsertTrailingCompaction = upsertTrailingCompaction; exports.applyToolExecutionToMessages = applyToolExecutionToMessages; exports.MessageSegmentAccumulator = MessageSegmentAccumulator; exports.createMessageSegmentAccumulator = createMessageSegmentAccumulator; exports.SCROLL_ANCHOR_WIRE_KEY = SCROLL_ANCHOR_WIRE_KEY; exports.parseScrollAnchor = parseScrollAnchor; exports.createEmptyTurnMeta = createEmptyTurnMeta; exports.createChatStreamReducer = createChatStreamReducer; exports.DEFAULT_DIALOG_SIDE = DEFAULT_DIALOG_SIDE; exports.DEFAULT_MAX_REDUCERS = DEFAULT_MAX_REDUCERS; exports.MAX_PENDING_RETAIN_KEYS = MAX_PENDING_RETAIN_KEYS; exports.createChatDialogStore = createChatDialogStore; exports.createDeltaBatcher = createDeltaBatcher; exports.useChatStreamReducer = useChatStreamReducer; exports.createChatConversationsApi = createChatConversationsApi; exports.parseWireCommandOverride = parseWireCommandOverride; exports.sanitizeTitleForChat = sanitizeTitleForChat; exports.formatSingularLookupInvocation = formatSingularLookupInvocation; exports.extractEntityIdFilter = extractEntityIdFilter; exports.buildDiscussAddendum = buildDiscussAddendum; exports.buildDiscussPrompt = buildDiscussPrompt; exports.AUTO_CONTINUATION_DIRECTIVE_PREFIX = AUTO_CONTINUATION_DIRECTIVE_PREFIX; exports.buildAutoContinuationDirective = buildAutoContinuationDirective; exports.useManagedDialogList = useManagedDialogList; exports.useSseChatAdapter = useSseChatAdapter; exports.extractIncompleteMessageState = extractIncompleteMessageState; exports.extractIncompleteTailState = extractIncompleteTailState; exports.decodeHistoricalMessageData = decodeHistoricalMessageData; exports.processHistoricalMessages = processHistoricalMessages; exports.extractErrorMessages = extractErrorMessages; exports.processHistoricalMessagesWithErrors = processHistoricalMessagesWithErrors; exports.mapProcessedToUnified = mapProcessedToUnified; exports.historicalToUnified = historicalToUnified; exports.useNatsChatAdapter = useNatsChatAdapter; exports.useStableShallow = useStableShallow; exports.useUnifiedChat = useUnifiedChat; exports.SYNTHETIC_REALTIME_ID_PREFIXES = SYNTHETIC_REALTIME_ID_PREFIXES; exports.flattenMessagePagesChronological = flattenMessagePagesChronological; exports.maxPersistedStreamSeq = maxPersistedStreamSeq; exports.mergeHistoryWithRealtime = mergeHistoryWithRealtime; exports.computeHistoryPrepend = computeHistoryPrepend; exports.CHIP_ACTION_BUTTON_CLASS = CHIP_ACTION_BUTTON_CLASS; exports.chatChipClass = chatChipClass; exports.flattenAssistantContent = flattenAssistantContent; exports.normalizeHistoricalMessageData = normalizeHistoricalMessageData; exports.isHistoricalUserTurn = isHistoricalUserTurn; exports.buildStreamFrames = buildStreamFrames; exports.EmbeddableChat = EmbeddableChat;
|
|
26426
|
+
//# sourceMappingURL=chunk-EFPAKLT5.cjs.map
|