@flamingo-stack/openframe-frontend-core 0.0.816 → 0.0.818
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/build/export-map.json +1 -1
- package/dist/{case-study-card-NLT2JVI7.cjs → case-study-card-IZBMHA6R.cjs} +3 -3
- package/dist/{chunk-VDXI26G7.cjs → chunk-4XASD2TL.cjs} +81 -78
- package/dist/{chunk-5TUR7O7H.cjs → chunk-5AIOYEXW.cjs} +90 -90
- package/dist/{chunk-RYJJHSHV.cjs → chunk-5VRSUEC5.cjs} +23 -23
- package/dist/{chunk-633NTKO2.cjs → chunk-6QT5K5I5.cjs} +31 -53
- package/dist/{chunk-CNTBGJA7.cjs → chunk-A34UNP5V.cjs} +65 -1
- package/dist/{chunk-3ELDGEM2.cjs → chunk-AE22KOW3.cjs} +87 -84
- package/dist/{chunk-EJCUAADF.cjs → chunk-BD42NMCT.cjs} +4 -4
- package/dist/{chunk-7NYWHEQM.cjs → chunk-DGAX5WG2.cjs} +15 -15
- package/dist/{chunk-L7W4455K.cjs → chunk-DL4HWYIB.cjs} +3 -3
- package/dist/chunk-DVHSYPDB.cjs +471 -0
- package/dist/{chunk-GAR2IIU6.cjs → chunk-IM366HS6.cjs} +105 -157
- package/dist/{chunk-7ERD34HQ.cjs → chunk-IQCHV7Z2.cjs} +571 -823
- package/dist/{chunk-3E4FIJAM.cjs → chunk-JTBJB4JF.cjs} +15 -15
- package/dist/{chunk-PAI4A3UM.cjs → chunk-K5IICQNF.cjs} +61 -54
- package/dist/{chunk-JOKOQOLJ.cjs → chunk-LUID2IB3.cjs} +2 -2
- package/dist/{chunk-JOOZTRXQ.cjs → chunk-NEXMK6OP.cjs} +4 -4
- package/dist/{chunk-4PMD3JUC.cjs → chunk-NPNZAAOB.cjs} +2 -2
- package/dist/{chunk-JH65CEO4.cjs → chunk-NWIEZUM7.cjs} +36 -36
- package/dist/{chunk-HM7VCQSX.cjs → chunk-SBFBNOKU.cjs} +4 -4
- package/dist/{chunk-7O7EX7HQ.cjs → chunk-T266OITJ.cjs} +28 -20
- package/dist/{chunk-SWBLTIN4.cjs → chunk-U2THWP25.cjs} +54 -52
- package/dist/{chunk-F4ZJRMMM.cjs → chunk-UDLDXVY4.cjs} +8 -8
- package/dist/{chunk-Y6MJMPHV.cjs → chunk-UEULXVW2.cjs} +32 -84
- package/dist/{chunk-O6VWD2SB.cjs → chunk-VGZXB3SY.cjs} +3 -3
- package/dist/{chunk-ZAWHRYJZ.cjs → chunk-VRXDTRIY.cjs} +45 -45
- package/dist/{chunk-EB7YAUER.cjs → chunk-YHPUD4PM.cjs} +19 -19
- package/dist/{chunk-FUEK43FL.cjs → chunk-YMPPE322.cjs} +206 -200
- package/dist/{chunk-IKB6AZPV.cjs → chunk-ZECG6GU5.cjs} +2 -2
- package/dist/{chunk-53JJLHJM.cjs → chunk-ZWAVMZIF.cjs} +20 -20
- package/dist/{cloud-tenants-SRTX2FZC.cjs → cloud-tenants-V6EV4OGK.cjs} +11 -11
- package/dist/components/announcement-bar.d.ts.map +1 -1
- package/dist/components/announcement-bar.js +5 -5
- package/dist/components/case-studies/index.cjs +26 -26
- package/dist/components/chat/chat-markdown-link.d.ts +15 -0
- package/dist/components/chat/chat-markdown-link.d.ts.map +1 -0
- package/dist/components/chat/chat-markdown-link.js +22 -0
- package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
- package/dist/components/chat/chat-message-enhanced.js +3 -9
- package/dist/components/chat/embeddable-chat.d.ts +4 -8
- package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
- package/dist/components/chat/embeddable-chat.js +31 -125
- package/dist/components/chat/entity-cards/chat-card-disclosure.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/chat-card-disclosure.js +8 -11
- package/dist/components/chat/entity-cards/dispatch.d.ts +8 -15
- package/dist/components/chat/entity-cards/dispatch.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/dispatch.js +22 -40
- package/dist/components/chat/entity-cards/github-activity-card.d.ts +1 -1
- package/dist/components/chat/entity-cards/use-entity-card-link.d.ts +3 -2
- package/dist/components/chat/entity-cards/use-entity-card-link.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/use-entity-card-link.js +6 -4
- package/dist/components/chat/index.cjs +28 -21
- package/dist/components/chat/index.d.ts +2 -2
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/chat/index.js +4 -3
- package/dist/components/chat/{inline-app-link-chip.d.ts → inline-chip.d.ts} +1 -14
- package/dist/components/chat/inline-chip.d.ts.map +1 -0
- package/dist/components/chat/inline-chip.js +27 -0
- package/dist/components/chat/nav-link-anchor-via-runtime.d.ts +45 -11
- package/dist/components/chat/nav-link-anchor-via-runtime.d.ts.map +1 -1
- package/dist/components/chat/nav-link-anchor-via-runtime.js +32 -24
- package/dist/components/chat/source-action-button.d.ts +12 -3
- package/dist/components/chat/source-action-button.d.ts.map +1 -1
- package/dist/components/chat/source-action-button.js +41 -26
- package/dist/components/chat/types/component.types.d.ts +1 -1
- package/dist/components/chat/types/entities/data-room-doc.d.ts +0 -12
- package/dist/components/chat/types/entities/data-room-doc.d.ts.map +1 -1
- package/dist/components/chat/types/message.types.d.ts +1 -1
- package/dist/components/chat/types/message.types.d.ts.map +1 -1
- package/dist/components/chat/utils/chat-nav-resolution.d.ts +1 -6
- package/dist/components/chat/utils/chat-nav-resolution.d.ts.map +1 -1
- package/dist/components/chat/utils/chat-nav-resolution.js +2 -3
- package/dist/components/chat/utils/decide-new-tab.d.ts +0 -3
- package/dist/components/chat/utils/decide-new-tab.d.ts.map +1 -1
- package/dist/components/chat/utils/decide-new-tab.js +0 -1
- package/dist/components/chat/utils/execute-navigation.d.ts +36 -34
- package/dist/components/chat/utils/execute-navigation.d.ts.map +1 -1
- package/dist/components/chat/utils/execute-navigation.js +23 -19
- package/dist/components/chat/utils/index.d.ts +5 -5
- package/dist/components/chat/utils/index.d.ts.map +1 -1
- package/dist/components/chat/utils/index.js +14 -6
- package/dist/components/chat/utils/nav-anchor-props.d.ts +35 -8
- package/dist/components/chat/utils/nav-anchor-props.d.ts.map +1 -1
- package/dist/components/chat/utils/nav-anchor-props.js +14 -5
- package/dist/components/chat/utils/new-tab-rel.d.ts +15 -0
- package/dist/components/chat/utils/new-tab-rel.d.ts.map +1 -0
- package/dist/components/chat/utils/new-tab-rel.js +25 -0
- package/dist/components/chat/utils/source-row-cta.d.ts +9 -48
- package/dist/components/chat/utils/source-row-cta.d.ts.map +1 -1
- package/dist/components/chat/utils/source-row-cta.js +7 -32
- package/dist/components/contact/index.cjs +12 -12
- package/dist/components/docs/index.cjs +15 -15
- package/dist/components/embeds/index.cjs +12 -12
- package/dist/components/faq/index.cjs +13 -13
- package/dist/components/features/devices/devices-table-columns.d.ts.map +1 -1
- package/dist/components/features/devices/devices-table-columns.js +4 -1
- package/dist/components/features/index.cjs +11 -11
- package/dist/components/help-center-pages/index.cjs +105 -105
- package/dist/components/index.cjs +91 -83
- package/dist/components/meeting-scheduler/index.cjs +50 -50
- package/dist/components/navigation/app-header.d.ts +1 -4
- package/dist/components/navigation/app-header.d.ts.map +1 -1
- package/dist/components/navigation/app-header.js +0 -2
- package/dist/components/navigation/index.cjs +14 -14
- package/dist/components/navigation/ticket-alerts-button.d.ts +1 -4
- package/dist/components/navigation/ticket-alerts-button.d.ts.map +1 -1
- package/dist/components/navigation/ticket-alerts-button.js +5 -5
- package/dist/components/onboarding-guides/index.cjs +14 -14
- package/dist/components/product-demo/index.cjs +20 -20
- package/dist/components/related-content/card-registry.d.ts +1 -1
- package/dist/components/related-content/index.cjs +7 -7
- package/dist/components/related-content/related-content-section.d.ts +3 -3
- package/dist/components/related-content/related-content-section.d.ts.map +1 -1
- package/dist/components/related-content/related-content-section.js +5 -3
- package/dist/components/shared/doc-search/resolve-search-result-action.d.ts +10 -3
- package/dist/components/shared/doc-search/resolve-search-result-action.d.ts.map +1 -1
- package/dist/components/shared/doc-search/resolve-search-result-action.js +8 -17
- package/dist/components/shared/doc-search/use-doc-search.d.ts.map +1 -1
- package/dist/components/shared/doc-search/use-doc-search.js +15 -27
- package/dist/components/shared/product-release/product-release-card.d.ts +2 -2
- package/dist/components/shared/product-release/product-releases-view.d.ts.map +1 -1
- package/dist/components/shared/product-release/product-releases-view.js +1 -3
- package/dist/components/tickets/index.cjs +18 -18
- package/dist/components/tickets/ticket-detail-drawer.d.ts.map +1 -1
- package/dist/components/tickets/ticket-detail-drawer.js +6 -3
- package/dist/components/tickets/types.d.ts +1 -1
- package/dist/components/ui/button/button.d.ts +1 -1
- package/dist/components/ui/hover-dropdown.d.ts +2 -2
- package/dist/components/ui/index.cjs +31 -23
- package/dist/components/ui/service-card.d.ts.map +1 -1
- package/dist/components/ui/service-card.js +4 -1
- package/dist/components/vendor-display-button.d.ts.map +1 -1
- package/dist/components/vendor-display-button.js +4 -1
- package/dist/contexts/chat-runtime-context.d.ts +14 -25
- package/dist/contexts/chat-runtime-context.d.ts.map +1 -1
- package/dist/{devices-DL4YU64N.cjs → devices-6KZAJAAS.cjs} +12 -12
- package/dist/{embeddable-chat-YRKMPFDY.cjs → embeddable-chat-5IHA5SUZ.cjs} +95 -193
- package/dist/hooks/index.cjs +5 -5
- package/dist/hooks/use-contact-submission.d.ts.map +1 -1
- package/dist/hooks/use-contact-submission.js +11 -8
- package/dist/index.cjs +40 -34
- package/dist/{knowledge-VQW5JL2Z.cjs → knowledge-I7FDQQYJ.cjs} +12 -12
- package/dist/{logs-IY3WBLMW.cjs → logs-Q7PAVJUG.cjs} +19 -19
- package/dist/{policies-IXWTWMJO.cjs → policies-C3DW5CHS.cjs} +15 -15
- package/dist/{scripts-D5CLO5EG.cjs → scripts-BET663HD.cjs} +16 -16
- package/dist/{software-update-ULNP6CKJ.cjs → software-update-W7ZQXEPK.cjs} +14 -14
- package/dist/utils/index.cjs +116 -89
- package/dist/utils/open-in-new-tab.d.ts +2 -1
- package/dist/utils/open-in-new-tab.d.ts.map +1 -1
- package/dist/utils/open-in-new-tab.js +2 -1
- package/dist/utils/scroll-into-view.d.ts +1 -1
- package/dist/utils/source-grouping.d.ts +2 -2
- package/eslint-config/base.js +11 -0
- package/eslint-config/navigation.js +142 -0
- package/package.json +1 -1
- package/src/components/announcement-bar.tsx +8 -6
- package/src/components/chat/chat-markdown-link.tsx +42 -0
- package/src/components/chat/chat-message-enhanced.tsx +10 -36
- package/src/components/chat/embeddable-chat.tsx +66 -173
- package/src/components/chat/entity-cards/chat-card-disclosure.tsx +9 -13
- package/src/components/chat/entity-cards/data-room-doc-card.tsx +1 -1
- package/src/components/chat/entity-cards/dispatch.tsx +51 -66
- package/src/components/chat/entity-cards/github-activity-card.tsx +1 -1
- package/src/components/chat/entity-cards/use-entity-card-link.ts +11 -16
- package/src/components/chat/index.ts +3 -1
- package/src/components/chat/{inline-app-link-chip.tsx → inline-chip.tsx} +1 -27
- package/src/components/chat/nav-link-anchor-via-runtime.tsx +73 -33
- package/src/components/chat/source-action-button.tsx +57 -33
- package/src/components/chat/types/component.types.ts +1 -1
- package/src/components/chat/types/entities/data-room-doc.ts +0 -12
- package/src/components/chat/types/message.types.ts +1 -1
- package/src/components/chat/utils/chat-nav-resolution.ts +3 -8
- package/src/components/chat/utils/decide-new-tab.ts +0 -3
- package/src/components/chat/utils/execute-navigation.ts +58 -58
- package/src/components/chat/utils/index.ts +13 -6
- package/src/components/chat/utils/nav-anchor-props.ts +56 -9
- package/src/components/chat/utils/new-tab-rel.ts +39 -0
- package/src/components/chat/utils/source-row-cta.ts +21 -102
- package/src/components/features/devices/devices-table-columns.tsx +4 -1
- package/src/components/navigation/app-header.tsx +0 -5
- package/src/components/navigation/ticket-alerts-button.tsx +7 -8
- package/src/components/related-content/card-registry.tsx +1 -1
- package/src/components/related-content/related-content-section.tsx +10 -10
- package/src/components/shared/doc-search/resolve-search-result-action.ts +19 -33
- package/src/components/shared/doc-search/use-doc-search.ts +21 -44
- package/src/components/shared/product-release/product-release-card.tsx +4 -4
- package/src/components/shared/product-release/product-releases-view.tsx +2 -5
- package/src/components/tickets/ticket-detail-drawer.tsx +7 -4
- package/src/components/tickets/types.ts +1 -1
- package/src/components/ui/button/button.tsx +2 -2
- package/src/components/ui/hover-dropdown.tsx +2 -2
- package/src/components/ui/service-card.tsx +4 -1
- package/src/components/vendor-display-button.tsx +5 -2
- package/src/contexts/chat-runtime-context.tsx +18 -23
- package/src/hooks/use-contact-submission.ts +13 -8
- package/src/utils/index.ts +1 -1
- package/src/utils/open-in-new-tab.ts +4 -2
- package/src/utils/scroll-into-view.ts +1 -1
- package/src/utils/source-grouping.ts +2 -2
- package/dist/chunk-RD66AGUI.cjs +0 -156
- package/dist/components/chat/inline-app-link-chip.d.ts.map +0 -1
- package/dist/components/chat/inline-app-link-chip.js +0 -37
|
@@ -9,8 +9,6 @@ import { MessageSquare } from "lucide-react";
|
|
|
9
9
|
import React, { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
10
10
|
import { chatProgressLabel } from "../../chat-protocol/progress.js";
|
|
11
11
|
import { useRequiredChatRuntime } from "../../contexts/chat-runtime-context.js";
|
|
12
|
-
import Link from "../../embed-shims/next-link.js";
|
|
13
|
-
import { useRouter } from "../../embed-shims/next-navigation.js";
|
|
14
12
|
import { useIsHydrated } from "../../hooks/ui/use-is-hydrated.js";
|
|
15
13
|
import { cn } from "../../utils/cn.js";
|
|
16
14
|
import { formatCitationIndices } from "../../utils/source-grouping.js";
|
|
@@ -32,7 +30,7 @@ import { Button } from "../ui/button/index.js";
|
|
|
32
30
|
import { Drawer, DrawerContent } from "../ui/drawer.js";
|
|
33
31
|
import { HoverDropdown } from "../ui/hover-dropdown.js";
|
|
34
32
|
import { TextHold } from "../ui/layout-hold.js";
|
|
35
|
-
import { LoadingItems } from "../ui/loading-scope.js";
|
|
33
|
+
import { LoadingItems, loadingItemProps } from "../ui/loading-scope.js";
|
|
36
34
|
import { CollisionBoundaryContext, PortalContainerContext } from "../ui/portal-container.js";
|
|
37
35
|
import { SKELETON_SURFACE_CLASS } from "../ui/skeleton-surface.js";
|
|
38
36
|
import { SquareAvatar } from "../ui/square-avatar.js";
|
|
@@ -71,14 +69,11 @@ import { SourceActionButton } from "./source-action-button.js";
|
|
|
71
69
|
import { AUTHOR_TYPE, CHAT_APPEARANCE } from "./types/chat.types.js";
|
|
72
70
|
import { ASK_AI_OPEN_EVENT, ASK_AI_OPEN_WITH_REF_EVENT, chatListensForAskAiOpens } from "./utils/ask-ai-events.js";
|
|
73
71
|
import { formatChatAttachmentMarkdownForBubble } from "./utils/chat-attachment-markdown.js";
|
|
74
|
-
import { resolveHrefForRuntime } from "./utils/chat-nav-resolution.js";
|
|
75
72
|
import { chatChipClass } from "./utils/chip-styles.js";
|
|
76
73
|
import { FALLBACK_TOP_RETRIEVED, splitCitedSources } from "./utils/cited-sources.js";
|
|
77
|
-
import { executeNavigation } from "./utils/execute-navigation.js";
|
|
78
74
|
import { flattenAssistantContent } from "./utils/flatten-assistant-content.js";
|
|
79
75
|
import { mapHostMessage, pruneTimestampCache } from "./utils/host-message.js";
|
|
80
76
|
import { resolveIcon } from "./utils/icon-library.js";
|
|
81
|
-
import { computeIsNewTab, newTabAnchorAttrs } from "./utils/nav-anchor-props.js";
|
|
82
77
|
import { formatSingularLookupInvocation } from "./utils/slash-dispatch-utils.js";
|
|
83
78
|
import { resolveSourceRowCTA, sourceRowCtxFromRuntime } from "./utils/source-row-cta.js";
|
|
84
79
|
const HISTORY_RAIL_WIDTH = 320;
|
|
@@ -173,9 +168,9 @@ function dispatchSlashCommandAction(actionId, cmdId, ref) {
|
|
|
173
168
|
}
|
|
174
169
|
}
|
|
175
170
|
const ONE_TEXT_LINE = "\xA0";
|
|
176
|
-
const SOURCE_CHIP_SKELETON_COUNT =
|
|
177
|
-
function SourceChipSkeleton(
|
|
178
|
-
return /* @__PURE__ */ jsxs("span", { "aria-hidden": true, className:
|
|
171
|
+
const SOURCE_CHIP_SKELETON_COUNT = 1;
|
|
172
|
+
function SourceChipSkeleton(props) {
|
|
173
|
+
return /* @__PURE__ */ jsxs("span", { "aria-hidden": true, className: "pointer-events-none inline-flex shrink-0 items-center", ...loadingItemProps(props), children: [
|
|
179
174
|
/* @__PURE__ */ jsxs("span", { className: chatChipClass({ tone: "secondary" }), children: [
|
|
180
175
|
/* @__PURE__ */ jsx("span", { className: cn(SKELETON_SURFACE_CLASS, "inline-block h-3.5 w-3.5 rounded-sm") }),
|
|
181
176
|
/* @__PURE__ */ jsx("span", { className: cn(SKELETON_SURFACE_CLASS, "w-28 rounded-sm"), children: ONE_TEXT_LINE })
|
|
@@ -183,15 +178,10 @@ function SourceChipSkeleton({ className }) {
|
|
|
183
178
|
/* @__PURE__ */ jsx("span", { className: cn(SKELETON_SURFACE_CLASS, "-mr-1 ml-1 inline-block h-5 w-5 rounded-sm") })
|
|
184
179
|
] });
|
|
185
180
|
}
|
|
186
|
-
function SourceChip({
|
|
187
|
-
src,
|
|
188
|
-
|
|
189
|
-
chipBasePlatform,
|
|
190
|
-
onClose,
|
|
191
|
-
onDiscuss
|
|
192
|
-
}) {
|
|
181
|
+
function SourceChip(props) {
|
|
182
|
+
const { src, onDiscuss } = props;
|
|
183
|
+
const marks = loadingItemProps(props);
|
|
193
184
|
const runtime = useRequiredChatRuntime();
|
|
194
|
-
const router = useRouter();
|
|
195
185
|
const cta = resolveSourceRowCTA(
|
|
196
186
|
{
|
|
197
187
|
sourceRepo: src.sourceRepo,
|
|
@@ -202,12 +192,11 @@ function SourceChip({
|
|
|
202
192
|
targetPlatform: src.targetPlatform ?? null,
|
|
203
193
|
path: src.path
|
|
204
194
|
},
|
|
205
|
-
sourceRowCtxFromRuntime(runtime
|
|
195
|
+
sourceRowCtxFromRuntime(runtime)
|
|
206
196
|
);
|
|
207
197
|
const Icon = cta.icon;
|
|
208
198
|
const icon = /* @__PURE__ */ jsx(Icon, { className: "h-3.5 w-3.5" });
|
|
209
199
|
const chipClass = chatChipClass({ tone: "secondary" });
|
|
210
|
-
const decideTab = (href, targetPlatform) => computeIsNewTab(runtime, href, targetPlatform);
|
|
211
200
|
if (src.items && src.items.length > 0) {
|
|
212
201
|
const dropdownItems = src.items.map((item) => {
|
|
213
202
|
const itemCta = resolveSourceRowCTA(
|
|
@@ -220,7 +209,7 @@ function SourceChip({
|
|
|
220
209
|
targetPlatform: item.targetPlatform ?? null,
|
|
221
210
|
path: item.path
|
|
222
211
|
},
|
|
223
|
-
sourceRowCtxFromRuntime(runtime
|
|
212
|
+
sourceRowCtxFromRuntime(runtime)
|
|
224
213
|
);
|
|
225
214
|
const ItemIcon = itemCta.icon;
|
|
226
215
|
const itemChatRef = itemCta.chatRef;
|
|
@@ -241,7 +230,7 @@ function SourceChip({
|
|
|
241
230
|
});
|
|
242
231
|
const itemIndices = src.items.flatMap((item) => item.index === void 0 ? [] : [item.index]);
|
|
243
232
|
const groupIndices = itemIndices.length > 0 ? formatCitationIndices(itemIndices) : `${src.index}`;
|
|
244
|
-
return /* @__PURE__ */ jsx(
|
|
233
|
+
return /* @__PURE__ */ jsx("span", { className: "inline-flex", ...marks, children: /* @__PURE__ */ jsx(
|
|
245
234
|
HoverDropdown,
|
|
246
235
|
{
|
|
247
236
|
items: dropdownItems,
|
|
@@ -265,7 +254,7 @@ function SourceChip({
|
|
|
265
254
|
] })
|
|
266
255
|
] })
|
|
267
256
|
}
|
|
268
|
-
);
|
|
257
|
+
) });
|
|
269
258
|
}
|
|
270
259
|
const displayName = src.name || formatRelativePath(src.path);
|
|
271
260
|
const chipBody = (label) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -277,50 +266,22 @@ function SourceChip({
|
|
|
277
266
|
label
|
|
278
267
|
] })
|
|
279
268
|
] });
|
|
280
|
-
const wrapChip = (clickable) => /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center", children: [
|
|
269
|
+
const wrapChip = (clickable) => /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center", ...marks, children: [
|
|
281
270
|
clickable,
|
|
282
271
|
/* @__PURE__ */ jsx(SourceActionButton, { chatRef: cta.chatRef, onDiscuss, density: "inline", className: "-mr-1 ml-1" })
|
|
283
272
|
] });
|
|
284
|
-
const buildClickHandler = (href, path, targetPlatform, isNewTab) => (e) => {
|
|
285
|
-
const handled = executeNavigation({
|
|
286
|
-
event: e,
|
|
287
|
-
runtime,
|
|
288
|
-
href,
|
|
289
|
-
path,
|
|
290
|
-
targetPlatform,
|
|
291
|
-
fallbackNavigate: router.push
|
|
292
|
-
});
|
|
293
|
-
if (handled && !isNewTab && onClose) onClose();
|
|
294
|
-
};
|
|
295
|
-
if (cta.href && !!src.externalUrl) {
|
|
296
|
-
const resolvedHref = resolveHrefForRuntime(cta.href, runtime);
|
|
297
|
-
const isNewTab = decideTab(resolvedHref, cta.targetPlatform ?? null);
|
|
298
|
-
return wrapChip(
|
|
299
|
-
/* @__PURE__ */ jsx(
|
|
300
|
-
Link,
|
|
301
|
-
{
|
|
302
|
-
href: resolvedHref,
|
|
303
|
-
...newTabAnchorAttrs(isNewTab),
|
|
304
|
-
onClick: buildClickHandler(resolvedHref, null, cta.targetPlatform ?? null, isNewTab),
|
|
305
|
-
className: chipClass,
|
|
306
|
-
children: chipBody(src.name)
|
|
307
|
-
}
|
|
308
|
-
)
|
|
309
|
-
);
|
|
310
|
-
}
|
|
311
273
|
if (cta.href) {
|
|
312
|
-
const
|
|
313
|
-
const isNewTab = decideTab(resolvedHref, cta.targetPlatform ?? null);
|
|
274
|
+
const isEntity = !!src.externalUrl;
|
|
314
275
|
return wrapChip(
|
|
315
276
|
/* @__PURE__ */ jsx(
|
|
316
|
-
|
|
277
|
+
NavLinkAnchorViaRuntime,
|
|
317
278
|
{
|
|
318
|
-
href:
|
|
319
|
-
|
|
320
|
-
|
|
279
|
+
href: cta.href,
|
|
280
|
+
path: isEntity ? null : src.path,
|
|
281
|
+
targetPlatform: cta.targetPlatform ?? null,
|
|
321
282
|
className: chipClass,
|
|
322
|
-
title: displayName,
|
|
323
|
-
children: chipBody(displayName)
|
|
283
|
+
title: isEntity ? void 0 : displayName,
|
|
284
|
+
children: chipBody(isEntity ? src.name : displayName)
|
|
324
285
|
}
|
|
325
286
|
)
|
|
326
287
|
);
|
|
@@ -332,17 +293,15 @@ function SourceChip({
|
|
|
332
293
|
function SourceChips({
|
|
333
294
|
cited,
|
|
334
295
|
uncited,
|
|
335
|
-
baseRoute,
|
|
336
|
-
chipBasePlatform,
|
|
337
|
-
onClose,
|
|
338
296
|
onDiscuss,
|
|
339
|
-
loading
|
|
297
|
+
loading,
|
|
298
|
+
skeletonCount
|
|
340
299
|
}) {
|
|
341
300
|
const [expanded, setExpanded] = useState(false);
|
|
342
301
|
if (loading) {
|
|
343
302
|
return /* @__PURE__ */ jsxs("div", { "aria-hidden": true, className: "mt-2 flex flex-col gap-1.5 border-t border-ods-border pt-2", children: [
|
|
344
303
|
/* @__PURE__ */ jsx("span", { className: "uppercase text-ods-text-muted text-h6", children: /* @__PURE__ */ jsx(TextHold, { children: "Sources" }) }),
|
|
345
|
-
/* @__PURE__ */ jsx("div", { className: "flex flex-nowrap gap-1.5 overflow-hidden", children:
|
|
304
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-nowrap gap-1.5 overflow-hidden", children: /* @__PURE__ */ jsx(LoadingItems, { count: skeletonCount, children: () => /* @__PURE__ */ jsx(SourceChipSkeleton, { "data-loading-item": true }) }) })
|
|
346
305
|
] });
|
|
347
306
|
}
|
|
348
307
|
if (cited.length === 0) {
|
|
@@ -350,17 +309,7 @@ function SourceChips({
|
|
|
350
309
|
if (fallback.length === 0) return null;
|
|
351
310
|
return /* @__PURE__ */ jsxs("div", { className: "mt-2 flex flex-col gap-1.5 border-t border-ods-border pt-2", children: [
|
|
352
311
|
/* @__PURE__ */ jsx("span", { className: "uppercase text-ods-text-muted text-h6", children: "Top retrieved sources" }),
|
|
353
|
-
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1.5", children: fallback.map((src) => /* @__PURE__ */ jsx(
|
|
354
|
-
SourceChip,
|
|
355
|
-
{
|
|
356
|
-
src,
|
|
357
|
-
baseRoute,
|
|
358
|
-
chipBasePlatform,
|
|
359
|
-
onClose,
|
|
360
|
-
onDiscuss
|
|
361
|
-
},
|
|
362
|
-
src.index
|
|
363
|
-
)) })
|
|
312
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1.5", children: fallback.map((src) => /* @__PURE__ */ jsx(SourceChip, { "data-loading-item": true, src, onDiscuss }, src.index)) })
|
|
364
313
|
] });
|
|
365
314
|
}
|
|
366
315
|
const hiddenCount = uncited.length;
|
|
@@ -368,28 +317,8 @@ function SourceChips({
|
|
|
368
317
|
return /* @__PURE__ */ jsxs("div", { className: "mt-2 flex flex-col gap-1.5 border-t border-ods-border pt-2", children: [
|
|
369
318
|
/* @__PURE__ */ jsx("span", { className: "uppercase text-ods-text-muted text-h6", children: "Sources" }),
|
|
370
319
|
/* @__PURE__ */ jsxs("div", { className: `flex flex-wrap gap-1.5 ${expanded ? "max-h-[200px] overflow-y-auto overscroll-contain" : ""}`, children: [
|
|
371
|
-
cited.map((src) => /* @__PURE__ */ jsx(
|
|
372
|
-
|
|
373
|
-
{
|
|
374
|
-
src,
|
|
375
|
-
baseRoute,
|
|
376
|
-
chipBasePlatform,
|
|
377
|
-
onClose,
|
|
378
|
-
onDiscuss
|
|
379
|
-
},
|
|
380
|
-
src.index
|
|
381
|
-
)),
|
|
382
|
-
expanded && uncited.map((src) => /* @__PURE__ */ jsx(
|
|
383
|
-
SourceChip,
|
|
384
|
-
{
|
|
385
|
-
src,
|
|
386
|
-
baseRoute,
|
|
387
|
-
chipBasePlatform,
|
|
388
|
-
onClose,
|
|
389
|
-
onDiscuss
|
|
390
|
-
},
|
|
391
|
-
src.index
|
|
392
|
-
)),
|
|
320
|
+
cited.map((src) => /* @__PURE__ */ jsx(SourceChip, { "data-loading-item": true, src, onDiscuss }, src.index)),
|
|
321
|
+
expanded && uncited.map((src) => /* @__PURE__ */ jsx(SourceChip, { "data-loading-item": true, src, onDiscuss }, src.index)),
|
|
393
322
|
hasOverflow && /* @__PURE__ */ jsx(
|
|
394
323
|
Button,
|
|
395
324
|
{
|
|
@@ -413,8 +342,7 @@ const EmbeddableChat = React.forwardRef(
|
|
|
413
342
|
);
|
|
414
343
|
EmbeddableChat.displayName = "EmbeddableChat";
|
|
415
344
|
function EmbeddableChatInner({
|
|
416
|
-
|
|
417
|
-
chipBasePlatform,
|
|
345
|
+
sourceSkeletonCount = SOURCE_CHIP_SKELETON_COUNT,
|
|
418
346
|
enabledRagTableIds = null,
|
|
419
347
|
emptyStateGreeting = null,
|
|
420
348
|
suggestedQueries = null,
|
|
@@ -757,7 +685,6 @@ function EmbeddableChatInner({
|
|
|
757
685
|
setMentionQuery(query);
|
|
758
686
|
setContextPickerOpen(query !== null);
|
|
759
687
|
}, []);
|
|
760
|
-
const resolvedBaseRoute = baseRoute || (source === "flamingo" ? "/knowledge-base" : "/data-room");
|
|
761
688
|
const handleClose = useCallback(() => setIsOpen(false), [setIsOpen]);
|
|
762
689
|
const closeControl = closable ? handleClose : void 0;
|
|
763
690
|
const handleNavigationClose = useCallback(() => {
|
|
@@ -779,11 +706,9 @@ function EmbeddableChatInner({
|
|
|
779
706
|
(reference) => renderChatInlineEntityCard(reference, {
|
|
780
707
|
onDiscuss: askAbout,
|
|
781
708
|
onDisplay: displayRef,
|
|
782
|
-
baseRoute: resolvedBaseRoute,
|
|
783
|
-
chipBasePlatform,
|
|
784
709
|
extras
|
|
785
710
|
}),
|
|
786
|
-
[askAbout, displayRef,
|
|
711
|
+
[askAbout, displayRef, extras]
|
|
787
712
|
);
|
|
788
713
|
const mingoAssistantIcon = useMemo(
|
|
789
714
|
() => effectiveAssistantIcon ? /* @__PURE__ */ jsx(EntityIcon, { icon: effectiveAssistantIcon, size: 24 }) : /* @__PURE__ */ jsx(AgentMark, { agent: "mingo", className: "h-6 w-6" }),
|
|
@@ -987,33 +912,14 @@ function EmbeddableChatInner({
|
|
|
987
912
|
(message, index) => {
|
|
988
913
|
if (message.role !== "assistant") return null;
|
|
989
914
|
if (chatLoading && index === messages.length - 1) {
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
{
|
|
993
|
-
loading: true,
|
|
994
|
-
cited: [],
|
|
995
|
-
uncited: [],
|
|
996
|
-
baseRoute: resolvedBaseRoute,
|
|
997
|
-
chipBasePlatform,
|
|
998
|
-
onClose: handleNavigationClose
|
|
999
|
-
}
|
|
1000
|
-
) });
|
|
915
|
+
if (sourceSkeletonCount <= 0) return null;
|
|
916
|
+
return /* @__PURE__ */ jsx("div", { className: "pb-2", children: /* @__PURE__ */ jsx(SourceChips, { loading: true, skeletonCount: sourceSkeletonCount, cited: [], uncited: [] }) });
|
|
1001
917
|
}
|
|
1002
918
|
const { cited, uncited } = splitCitedSources(message.sources, flattenAssistantContent(message.content));
|
|
1003
919
|
if (cited.length === 0 && uncited.length === 0) return null;
|
|
1004
|
-
return /* @__PURE__ */ jsx("div", { className: "pb-2", children: /* @__PURE__ */ jsx(
|
|
1005
|
-
SourceChips,
|
|
1006
|
-
{
|
|
1007
|
-
cited,
|
|
1008
|
-
uncited,
|
|
1009
|
-
baseRoute: resolvedBaseRoute,
|
|
1010
|
-
chipBasePlatform,
|
|
1011
|
-
onClose: handleNavigationClose,
|
|
1012
|
-
onDiscuss: askAbout
|
|
1013
|
-
}
|
|
1014
|
-
) });
|
|
920
|
+
return /* @__PURE__ */ jsx("div", { className: "pb-2", children: /* @__PURE__ */ jsx(SourceChips, { cited, uncited, onDiscuss: askAbout, skeletonCount: sourceSkeletonCount }) });
|
|
1015
921
|
},
|
|
1016
|
-
[chatLoading, messages.length,
|
|
922
|
+
[chatLoading, messages.length, askAbout, sourceSkeletonCount]
|
|
1017
923
|
);
|
|
1018
924
|
const [portalHost, setPortalHost] = useState(null);
|
|
1019
925
|
const [panelBoundary, setPanelBoundary] = useState(null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-card-disclosure.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/entity-cards/chat-card-disclosure.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"chat-card-disclosure.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/entity-cards/chat-card-disclosure.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAEjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAMjD,8DAA8D;AAC9D,eAAO,MAAM,oBAAoB;;CAEvB,CAAC;AAEX,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC;AAEtG;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC1C,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,yBAAyB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED,UAAU,sBAAsB;IAC9B,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,mCAAmC;IACn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AAkG;AAClG,wBAAgB,qBAAqB,CAAC,EACpC,IAAI,EACJ,OAAO,GACR,EAAE;IACD,IAAI,EAAE,sBAAsB,CAAC;IAC7B,OAAO,EAAE,OAAO,CAAC;CAClB,GAAG,KAAK,CAAC,YAAY,CAWrB"}
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import { PlayIcon } from "../../icons-v2-generated/media-playback/play-icon.js";
|
|
5
|
-
import { Button } from "../../ui/button/index.js";
|
|
6
5
|
import { ExpandChevron } from "../expand-chevron.js";
|
|
7
6
|
import { useCollapsible } from "../hooks/use-collapsible.js";
|
|
8
|
-
import { CARD_FOOTER_ACTION_CLASS,
|
|
7
|
+
import { CARD_FOOTER_ACTION_CLASS, FooterAction } from "../source-action-button.js";
|
|
9
8
|
import { ChatVideoEntityCard } from "./chat-video-entity-card.js";
|
|
10
9
|
const CHAT_CARD_DISCLOSURE = {
|
|
11
10
|
VIDEO: "VIDEO"
|
|
@@ -59,25 +58,23 @@ function ChatCardDisclosureButton({
|
|
|
59
58
|
loading
|
|
60
59
|
}) {
|
|
61
60
|
const spec = CHAT_CARD_DISCLOSURES[kind];
|
|
62
|
-
if (loading) return /* @__PURE__ */ jsx(FooterActionSkeleton, { label: spec.label, className: CARD_FOOTER_ACTION_CLASS });
|
|
63
61
|
const label = open ? spec.openLabel : spec.label;
|
|
64
62
|
const Icon = spec.icon;
|
|
65
63
|
return /* @__PURE__ */ jsx(
|
|
66
|
-
|
|
64
|
+
FooterAction,
|
|
67
65
|
{
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
rightIcon: /* @__PURE__ */ jsx(ExpandChevron, { expanded: open, className: "!h-3 !w-3" }),
|
|
66
|
+
label,
|
|
67
|
+
icon: /* @__PURE__ */ jsx(Icon, { className: "!h-3 !w-3" }),
|
|
68
|
+
trailingIcon: /* @__PURE__ */ jsx(ExpandChevron, { expanded: open, className: "!h-3 !w-3" }),
|
|
72
69
|
onClick: (e) => {
|
|
73
70
|
e.preventDefault();
|
|
74
71
|
e.stopPropagation();
|
|
75
72
|
onToggle?.();
|
|
76
73
|
},
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
ariaExpanded: open,
|
|
75
|
+
ariaLabel: title ? `${label}: ${title}` : label,
|
|
79
76
|
className: CARD_FOOTER_ACTION_CLASS,
|
|
80
|
-
|
|
77
|
+
loading
|
|
81
78
|
}
|
|
82
79
|
);
|
|
83
80
|
}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Lib-portable refactor of the hub's `components/shared/entity-card-dispatch.tsx`.
|
|
5
5
|
* Drops the hub-only imports:
|
|
6
|
-
* - `
|
|
6
|
+
* - `useNavLinkViaRuntime` → click routing flows through `<NavLinkAnchorViaRuntime>`
|
|
7
7
|
* (reads `useRequiredChatRuntime` internally) or
|
|
8
|
-
* the chat-runtime's `
|
|
8
|
+
* the chat-runtime's `executeNavigation` helper.
|
|
9
9
|
* - `currentPlatform` → runtime.source supplies the identifier.
|
|
10
10
|
* - `buildContentURL` → URLs arrive pre-composed by the server's
|
|
11
11
|
* RAG mapper (`ref.url`); the card just renders.
|
|
@@ -136,8 +136,6 @@ export interface ChatCardDispatchExtras {
|
|
|
136
136
|
}
|
|
137
137
|
/** Per-card render options threaded through from the chat shell. */
|
|
138
138
|
export interface ChatCardRenderOptions {
|
|
139
|
-
baseRoute?: string;
|
|
140
|
-
chipBasePlatform?: string;
|
|
141
139
|
/** Host-supplied builders for cards whose derived props live in hub
|
|
142
140
|
* land (programs + product_release). When omitted, these card types
|
|
143
141
|
* render `null` and the shell falls back to title text. */
|
|
@@ -145,7 +143,7 @@ export interface ChatCardRenderOptions {
|
|
|
145
143
|
/** Pre-computed new-tab decision for the inner anchor's `target`
|
|
146
144
|
* attribute. Required — always computed by `ChatCardLoader` via the
|
|
147
145
|
* same rule source chips use, so the rendered `<a target>` matches
|
|
148
|
-
* whatever `ChatCardNavWrap` + `
|
|
146
|
+
* whatever `ChatCardNavWrap` + `executeNavigation` decide at click
|
|
149
147
|
* time. */
|
|
150
148
|
isNewTab: boolean;
|
|
151
149
|
/** Host-provided "Ask Mingo"/"Display" affordance for this card, resolved
|
|
@@ -206,7 +204,7 @@ interface ChatCardRegistryEntry {
|
|
|
206
204
|
* for ChatRef-shaped items). Result is validated via `safeHref`
|
|
207
205
|
* before being attached to the resolved ref — so the wrapper sees a
|
|
208
206
|
* non-null `href`, the pre-computed `isNewTab` reflects the actual
|
|
209
|
-
* destination, and the click goes through `
|
|
207
|
+
* destination, and the click goes through `executeNavigation` (no
|
|
210
208
|
* silent bypass of embed-mode / close-on-nav). Takes precedence over
|
|
211
209
|
* the `composeContentUrl` fallback below — but NOT over an explicit
|
|
212
210
|
* host `override` for the type (see `pickFetchedCardHref`). */
|
|
@@ -234,8 +232,6 @@ interface ChatCardLoaderProps {
|
|
|
234
232
|
chatRef: ChatRef;
|
|
235
233
|
onDiscuss?: (ref: ChatRef) => void;
|
|
236
234
|
onDisplay?: (ref: ChatRef) => void;
|
|
237
|
-
baseRoute?: string;
|
|
238
|
-
chipBasePlatform?: string;
|
|
239
235
|
extras?: ChatCardDispatchExtras;
|
|
240
236
|
}
|
|
241
237
|
/**
|
|
@@ -246,20 +242,19 @@ interface ChatCardLoaderProps {
|
|
|
246
242
|
* SINGLE URL-RESOLUTION POINT — same code path source chips already
|
|
247
243
|
* had. Before render dispatch:
|
|
248
244
|
* - Pass the ref through `resolveSourceRowCTA` to compute the
|
|
249
|
-
* canonical `{href, targetPlatform}`
|
|
250
|
-
*
|
|
251
|
-
* awareness).
|
|
245
|
+
* canonical `{href, targetPlatform}` through the host's composer
|
|
246
|
+
* (`composeContentUrl`), the one address rule.
|
|
252
247
|
* - Pre-resolve href against `runtime.navigation.defaultContentOrigin`
|
|
253
248
|
* in embed mode (so modifier-click + copy-link land on the hub).
|
|
254
249
|
* - Re-attach the resolved values onto the ref so EVERY downstream
|
|
255
250
|
* card — whether it renders an inner `<a>` from `href` prop
|
|
256
251
|
* (BlogCard, ProgramCard, …) or pulls `anchorProps` from
|
|
257
|
-
* `
|
|
252
|
+
* `navLinkTarget` — sees the SAME canonical URL the
|
|
258
253
|
* chip would render.
|
|
259
254
|
*
|
|
260
255
|
* Eliminates the entire "chip works, inline card doesn't" class of bug.
|
|
261
256
|
*/
|
|
262
|
-
export declare function ChatCardLoader({ chatRef, onDiscuss, onDisplay,
|
|
257
|
+
export declare function ChatCardLoader({ chatRef, onDiscuss, onDisplay, extras }: ChatCardLoaderProps): React.JSX.Element | null;
|
|
263
258
|
/**
|
|
264
259
|
* Render the chat-inline card for a `[card://<type>:<id>]` marker.
|
|
265
260
|
*
|
|
@@ -274,8 +269,6 @@ export declare function ChatCardLoader({ chatRef, onDiscuss, onDisplay, baseRout
|
|
|
274
269
|
export declare function renderChatInlineEntityCard(chatRef: ChatRef, options?: {
|
|
275
270
|
onDiscuss?: (ref: ChatRef) => void;
|
|
276
271
|
onDisplay?: (ref: ChatRef) => void;
|
|
277
|
-
baseRoute?: string;
|
|
278
|
-
chipBasePlatform?: string;
|
|
279
272
|
extras?: ChatCardDispatchExtras;
|
|
280
273
|
}): React.ReactNode;
|
|
281
274
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/entity-cards/dispatch.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/entity-cards/dispatch.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAuD/B,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mDA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